summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/CMakeLists.txt42
-rw-r--r--indra/newview/app_settings/cmd_line.xml6
-rw-r--r--indra/newview/app_settings/settings.xml437
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/avatarEyesV.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl10
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl10
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl5
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl35
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl8
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl7
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl8
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl8
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl7
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/globalF.glsl (renamed from indra/newview/macmain.h)37
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl18
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/materialV.glsl17
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/moonF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/pbropaqueF.glsl10
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl7
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl347
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/pbrterrainUtilF.glsl473
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/pbrterrainV.glsl96
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl15
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/skyF.glsl60
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/skyV.glsl12
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl5
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/terrainV.glsl12
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/textureUtilV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/treeF.glsl7
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/treeV.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/encodeNormF.glsl34
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/normaldebugF.glsl (renamed from indra/newview/llvectorperfoptions.cpp)16
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/normaldebugG.glsl76
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/normaldebugV.glsl74
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/radianceGenF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/bumpF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/bumpV.glsl5
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl5
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/pbralphaF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl10
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl12
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/fullbrightShinyF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/hazeF.glsl5
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/materialF.glsl30
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl7
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl7
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl80
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/screenSpaceReflPostF.glsl9
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl31
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl10
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/waterHazeF.glsl1
-rw-r--r--indra/newview/app_settings/shaders/class3/environment/underWaterF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/environment/waterF.glsl3
-rw-r--r--indra/newview/featuretable.txt58
-rw-r--r--indra/newview/featuretable_mac.txt59
-rw-r--r--indra/newview/gltf/accessor.cpp84
-rw-r--r--indra/newview/gltf/accessor.h99
-rw-r--r--indra/newview/gltf/animation.cpp287
-rw-r--r--indra/newview/gltf/animation.h179
-rw-r--r--indra/newview/gltf/asset.cpp1098
-rw-r--r--indra/newview/gltf/asset.h339
-rw-r--r--indra/newview/gltf/buffer_util.h402
-rw-r--r--indra/newview/gltf/primitive.cpp400
-rw-r--r--indra/newview/gltf/primitive.h93
-rw-r--r--indra/newview/gltfscenemanager.cpp645
-rw-r--r--indra/newview/gltfscenemanager.h84
-rw-r--r--indra/newview/llagent.cpp302
-rw-r--r--indra/newview/llagent.h136
-rw-r--r--indra/newview/llagentbenefits.cpp66
-rw-r--r--indra/newview/llagentbenefits.h9
-rw-r--r--indra/newview/llagentcamera.cpp147
-rw-r--r--indra/newview/llagentcamera.h54
-rw-r--r--indra/newview/llagentlanguage.cpp2
-rw-r--r--indra/newview/llagentlistener.cpp10
-rw-r--r--indra/newview/llagentpicksinfo.h2
-rw-r--r--indra/newview/llagentpilot.cpp28
-rw-r--r--indra/newview/llagentpilot.h24
-rw-r--r--indra/newview/llagentui.cpp10
-rw-r--r--indra/newview/llagentui.h6
-rw-r--r--indra/newview/llagentwearables.cpp98
-rw-r--r--indra/newview/llagentwearables.h30
-rw-r--r--indra/newview/llaisapi.cpp8
-rw-r--r--indra/newview/llappearancemgr.cpp44
-rw-r--r--indra/newview/llappearancemgr.h6
-rw-r--r--indra/newview/llappviewer.cpp176
-rw-r--r--indra/newview/llappviewer.h17
-rw-r--r--indra/newview/llappviewerlinux_api_dbus.cpp2
-rw-r--r--indra/newview/llappviewermacosx-objc.mm2
-rw-r--r--indra/newview/llappviewermacosx.cpp2
-rw-r--r--indra/newview/llappviewerwin32.cpp29
-rw-r--r--indra/newview/llattachmentsmgr.cpp12
-rw-r--r--indra/newview/llattachmentsmgr.h8
-rw-r--r--indra/newview/llavataractions.cpp10
-rw-r--r--indra/newview/llavatarlist.cpp18
-rw-r--r--indra/newview/llavatarlist.h12
-rw-r--r--indra/newview/llavatarlistitem.cpp16
-rw-r--r--indra/newview/llavatarlistitem.h6
-rw-r--r--indra/newview/llavatarpropertiesprocessor.cpp10
-rw-r--r--indra/newview/llavatarpropertiesprocessor.h10
-rw-r--r--indra/newview/llavatarrenderinfoaccountant.cpp2
-rw-r--r--indra/newview/llblockedlistitem.cpp10
-rw-r--r--indra/newview/llblockedlistitem.h2
-rw-r--r--indra/newview/llblocklist.cpp9
-rw-r--r--indra/newview/llblocklist.h2
-rw-r--r--indra/newview/llbreadcrumbview.cpp31
-rw-r--r--indra/newview/llbreadcrumbview.h30
-rw-r--r--indra/newview/llbreastmotion.cpp395
-rw-r--r--indra/newview/llbreastmotion.h154
-rw-r--r--indra/newview/llbuycurrencyhtml.cpp4
-rw-r--r--indra/newview/llcallbacklist.cpp6
-rw-r--r--indra/newview/llcallingcard.cpp10
-rw-r--r--indra/newview/llcallingcard.h2
-rw-r--r--indra/newview/llchannelmanager.cpp2
-rw-r--r--indra/newview/llchatbar.cpp78
-rw-r--r--indra/newview/llchatbar.h16
-rw-r--r--indra/newview/llchathistory.cpp32
-rw-r--r--indra/newview/llchatitemscontainerctrl.cpp32
-rw-r--r--indra/newview/llchatitemscontainerctrl.h10
-rw-r--r--indra/newview/llchiclet.cpp32
-rw-r--r--indra/newview/llchiclet.h20
-rw-r--r--indra/newview/llchicletbar.cpp6
-rw-r--r--indra/newview/llchicletbar.h4
-rw-r--r--indra/newview/llcofwearables.cpp4
-rw-r--r--indra/newview/llcofwearables.h2
-rw-r--r--indra/newview/llcolorswatch.cpp44
-rw-r--r--indra/newview/llcolorswatch.h20
-rw-r--r--indra/newview/llcommandlineparser.cpp11
-rw-r--r--indra/newview/llcompilequeue.cpp20
-rw-r--r--indra/newview/llcompilequeue.h10
-rw-r--r--indra/newview/llcontrolavatar.cpp12
-rw-r--r--indra/newview/llcontrolavatar.h8
-rw-r--r--indra/newview/llconversationlog.cpp6
-rw-r--r--indra/newview/llconversationlog.h6
-rw-r--r--indra/newview/llconversationloglist.cpp18
-rw-r--r--indra/newview/llconversationloglist.h2
-rw-r--r--indra/newview/llconversationloglistitem.cpp12
-rw-r--r--indra/newview/llconversationloglistitem.h2
-rw-r--r--indra/newview/llconversationmodel.cpp26
-rw-r--r--indra/newview/llconversationmodel.h34
-rw-r--r--indra/newview/llconversationview.cpp30
-rw-r--r--indra/newview/llconversationview.h14
-rw-r--r--indra/newview/llcurrencyuimanager.cpp14
-rw-r--r--indra/newview/lldebugmessagebox.cpp2
-rw-r--r--indra/newview/lldebugmessagebox.h2
-rw-r--r--indra/newview/lldebugview.cpp6
-rw-r--r--indra/newview/lldebugview.h2
-rw-r--r--indra/newview/lldensityctrl.cpp225
-rw-r--r--indra/newview/lldensityctrl.h104
-rw-r--r--indra/newview/lldirpicker.cpp108
-rw-r--r--indra/newview/lldirpicker.h12
-rw-r--r--indra/newview/lldndbutton.cpp2
-rw-r--r--indra/newview/lldndbutton.h6
-rw-r--r--indra/newview/lldonotdisturbnotificationstorage.cpp4
-rw-r--r--indra/newview/lldonotdisturbnotificationstorage.h2
-rw-r--r--indra/newview/lldrawable.cpp78
-rw-r--r--indra/newview/lldrawable.h55
-rw-r--r--indra/newview/lldrawpool.cpp37
-rw-r--r--indra/newview/lldrawpool.h50
-rw-r--r--indra/newview/lldrawpoolalpha.cpp35
-rw-r--r--indra/newview/lldrawpoolalpha.h4
-rw-r--r--indra/newview/lldrawpoolavatar.cpp48
-rw-r--r--indra/newview/lldrawpoolavatar.h8
-rw-r--r--indra/newview/lldrawpoolbump.cpp75
-rw-r--r--indra/newview/lldrawpoolbump.h18
-rw-r--r--indra/newview/lldrawpoolmaterials.cpp2
-rw-r--r--indra/newview/lldrawpoolpbropaque.cpp5
-rw-r--r--indra/newview/lldrawpoolterrain.cpp294
-rw-r--r--indra/newview/lldrawpoolterrain.h10
-rw-r--r--indra/newview/lldrawpooltree.cpp17
-rw-r--r--indra/newview/lldrawpooltree.h2
-rw-r--r--indra/newview/lldrawpoolwater.cpp12
-rw-r--r--indra/newview/lldrawpoolwater.h6
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp57
-rw-r--r--indra/newview/lldrawpoolwlsky.h6
-rw-r--r--indra/newview/lldynamictexture.cpp64
-rw-r--r--indra/newview/lldynamictexture.h16
-rw-r--r--indra/newview/llemote.cpp8
-rw-r--r--indra/newview/llemote.h14
-rw-r--r--indra/newview/llenvironment.cpp16
-rw-r--r--indra/newview/lleventnotifier.cpp6
-rw-r--r--indra/newview/lleventnotifier.h2
-rw-r--r--indra/newview/llexpandabletextbox.cpp24
-rw-r--r--indra/newview/llexpandabletextbox.h4
-rw-r--r--indra/newview/llexternaleditor.cpp8
-rw-r--r--indra/newview/llface.cpp62
-rw-r--r--indra/newview/llface.h22
-rw-r--r--indra/newview/llface.inl160
-rw-r--r--indra/newview/llfasttimerview.cpp66
-rw-r--r--indra/newview/llfasttimerview.h18
-rw-r--r--indra/newview/llfavoritesbar.cpp464
-rw-r--r--indra/newview/llfavoritesbar.h49
-rw-r--r--indra/newview/llfeaturemanager.cpp30
-rw-r--r--indra/newview/llfeaturemanager.h40
-rw-r--r--indra/newview/llfetchedgltfmaterial.cpp72
-rw-r--r--indra/newview/llfetchedgltfmaterial.h17
-rw-r--r--indra/newview/llfilepicker.cpp149
-rw-r--r--indra/newview/llfilepicker.h15
-rw-r--r--indra/newview/llfilepicker_mac.mm2
-rw-r--r--indra/newview/llfirstuse.cpp4
-rw-r--r--indra/newview/llflexibleobject.cpp38
-rw-r--r--indra/newview/llflexibleobject.h10
-rw-r--r--indra/newview/llfloater360capture.cpp12
-rw-r--r--indra/newview/llfloater360capture.h2
-rw-r--r--indra/newview/llfloaterabout.cpp24
-rw-r--r--indra/newview/llfloateraddpaymentmethod.cpp6
-rw-r--r--indra/newview/llfloateraddpaymentmethod.h4
-rw-r--r--indra/newview/llfloaterauction.cpp33
-rw-r--r--indra/newview/llfloaterauction.h6
-rw-r--r--indra/newview/llfloaterautoreplacesettings.cpp2
-rw-r--r--indra/newview/llfloaterautoreplacesettings.h6
-rw-r--r--indra/newview/llfloateravatar.cpp4
-rw-r--r--indra/newview/llfloateravatar.h4
-rw-r--r--indra/newview/llfloateravatarpicker.cpp102
-rw-r--r--indra/newview/llfloateravatarpicker.h26
-rw-r--r--indra/newview/llfloateravatarrendersettings.cpp14
-rw-r--r--indra/newview/llfloateravatarrendersettings.h9
-rw-r--r--indra/newview/llfloateravatartextures.cpp4
-rw-r--r--indra/newview/llfloateravatartextures.h6
-rw-r--r--indra/newview/llfloaterbanduration.cpp6
-rw-r--r--indra/newview/llfloaterbanduration.h2
-rw-r--r--indra/newview/llfloaterbeacons.cpp36
-rw-r--r--indra/newview/llfloaterbeacons.h2
-rw-r--r--indra/newview/llfloaterbigpreview.cpp2
-rw-r--r--indra/newview/llfloaterbigpreview.h2
-rw-r--r--indra/newview/llfloaterbuildoptions.cpp6
-rw-r--r--indra/newview/llfloaterbuildoptions.h6
-rw-r--r--indra/newview/llfloaterbulkpermission.cpp32
-rw-r--r--indra/newview/llfloaterbulkpermission.h18
-rw-r--r--indra/newview/llfloaterbump.cpp4
-rw-r--r--indra/newview/llfloaterbump.h4
-rw-r--r--indra/newview/llfloaterbuy.cpp16
-rw-r--r--indra/newview/llfloaterbuy.h13
-rw-r--r--indra/newview/llfloaterbuycontents.cpp26
-rw-r--r--indra/newview/llfloaterbuycontents.h11
-rw-r--r--indra/newview/llfloaterbuycurrency.cpp38
-rw-r--r--indra/newview/llfloaterbuycurrencyhtml.cpp4
-rw-r--r--indra/newview/llfloaterbuycurrencyhtml.h2
-rw-r--r--indra/newview/llfloaterbuyland.cpp70
-rw-r--r--indra/newview/llfloaterbvhpreview.cpp88
-rw-r--r--indra/newview/llfloaterbvhpreview.h16
-rw-r--r--indra/newview/llfloatercamera.cpp24
-rw-r--r--indra/newview/llfloatercamera.h6
-rw-r--r--indra/newview/llfloatercamerapresets.cpp6
-rw-r--r--indra/newview/llfloatercamerapresets.h4
-rw-r--r--indra/newview/llfloaterchangeitemthumbnail.cpp292
-rw-r--r--indra/newview/llfloaterchangeitemthumbnail.h23
-rw-r--r--indra/newview/llfloaterclassified.cpp4
-rw-r--r--indra/newview/llfloaterclassified.h2
-rw-r--r--indra/newview/llfloatercolorpicker.cpp108
-rw-r--r--indra/newview/llfloatercolorpicker.h38
-rw-r--r--indra/newview/llfloaterconversationlog.cpp2
-rw-r--r--indra/newview/llfloaterconversationlog.h4
-rw-r--r--indra/newview/llfloaterconversationpreview.cpp2
-rw-r--r--indra/newview/llfloaterconversationpreview.h8
-rw-r--r--indra/newview/llfloatercreatelandmark.cpp6
-rw-r--r--indra/newview/llfloatercreatelandmark.h4
-rw-r--r--indra/newview/llfloaterdeleteprefpreset.cpp4
-rw-r--r--indra/newview/llfloaterdeleteprefpreset.h4
-rw-r--r--indra/newview/llfloaterdestinations.cpp4
-rw-r--r--indra/newview/llfloaterdestinations.h4
-rw-r--r--indra/newview/llfloaterdisplayname.cpp10
-rw-r--r--indra/newview/llfloatereditenvironmentbase.cpp2
-rw-r--r--indra/newview/llfloatereditenvironmentbase.h2
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp24
-rw-r--r--indra/newview/llfloatereditextdaycycle.h6
-rw-r--r--indra/newview/llfloatereditsky.cpp699
-rw-r--r--indra/newview/llfloatereditwater.cpp526
-rw-r--r--indra/newview/llfloateremojipicker.cpp74
-rw-r--r--indra/newview/llfloateremojipicker.h4
-rw-r--r--indra/newview/llfloaterenvironmentadjust.cpp12
-rw-r--r--indra/newview/llfloaterenvironmentadjust.h2
-rw-r--r--indra/newview/llfloaterevent.cpp4
-rw-r--r--indra/newview/llfloaterevent.h4
-rw-r--r--indra/newview/llfloaterexperiencepicker.cpp4
-rw-r--r--indra/newview/llfloaterexperiencepicker.h6
-rw-r--r--indra/newview/llfloaterexperienceprofile.cpp66
-rw-r--r--indra/newview/llfloaterexperienceprofile.h4
-rw-r--r--indra/newview/llfloaterexperiences.cpp6
-rw-r--r--indra/newview/llfloaterexperiences.h2
-rw-r--r--indra/newview/llfloaterfixedenvironment.cpp22
-rw-r--r--indra/newview/llfloaterfixedenvironment.h6
-rw-r--r--indra/newview/llfloaterforgetuser.cpp10
-rw-r--r--indra/newview/llfloaterforgetuser.h2
-rw-r--r--indra/newview/llfloatergesture.cpp24
-rw-r--r--indra/newview/llfloatergesture.h2
-rw-r--r--indra/newview/llfloatergodtools.cpp176
-rw-r--r--indra/newview/llfloatergodtools.h10
-rw-r--r--indra/newview/llfloatergotoline.cpp18
-rw-r--r--indra/newview/llfloatergotoline.h6
-rw-r--r--indra/newview/llfloatergridstatus.cpp8
-rw-r--r--indra/newview/llfloatergridstatus.h8
-rw-r--r--indra/newview/llfloatergroups.cpp28
-rw-r--r--indra/newview/llfloatergroups.h14
-rw-r--r--indra/newview/llfloaterhelpbrowser.cpp8
-rw-r--r--indra/newview/llfloaterhelpbrowser.h2
-rw-r--r--indra/newview/llfloaterhoverheight.cpp6
-rw-r--r--indra/newview/llfloaterhoverheight.h2
-rw-r--r--indra/newview/llfloaterhowto.cpp14
-rw-r--r--indra/newview/llfloaterhowto.h4
-rw-r--r--indra/newview/llfloaterhud.cpp6
-rw-r--r--indra/newview/llfloaterhud.h2
-rw-r--r--indra/newview/llfloaterimagepreview.cpp99
-rw-r--r--indra/newview/llfloaterimagepreview.h32
-rw-r--r--indra/newview/llfloaterimcontainer.cpp66
-rw-r--r--indra/newview/llfloaterimcontainer.h21
-rw-r--r--indra/newview/llfloaterimnearbychat.cpp46
-rw-r--r--indra/newview/llfloaterimnearbychat.h14
-rw-r--r--indra/newview/llfloaterimnearbychathandler.cpp10
-rw-r--r--indra/newview/llfloaterimnearbychatlistener.cpp2
-rw-r--r--indra/newview/llfloaterimsession.cpp52
-rw-r--r--indra/newview/llfloaterimsession.h18
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp93
-rw-r--r--indra/newview/llfloaterimsessiontab.h8
-rw-r--r--indra/newview/llfloaterinspect.cpp12
-rw-r--r--indra/newview/llfloaterinspect.h6
-rw-r--r--indra/newview/llfloaterinventorysettings.cpp4
-rw-r--r--indra/newview/llfloaterinventorysettings.h2
-rw-r--r--indra/newview/llfloaterinventorythumbnailshelper.cpp2
-rw-r--r--indra/newview/llfloaterinventorythumbnailshelper.h2
-rw-r--r--indra/newview/llfloaterjoystick.cpp6
-rw-r--r--indra/newview/llfloaterjoystick.h2
-rw-r--r--indra/newview/llfloaterlagmeter.cpp10
-rw-r--r--indra/newview/llfloaterlagmeter.h4
-rw-r--r--indra/newview/llfloaterland.cpp526
-rw-r--r--indra/newview/llfloaterland.h22
-rw-r--r--indra/newview/llfloaterlandholdings.cpp16
-rw-r--r--indra/newview/llfloaterlandholdings.h6
-rw-r--r--indra/newview/llfloaterlinkreplace.cpp20
-rw-r--r--indra/newview/llfloaterlinkreplace.h10
-rw-r--r--indra/newview/llfloaterloadprefpreset.cpp4
-rw-r--r--indra/newview/llfloaterloadprefpreset.h4
-rwxr-xr-xindra/newview/llfloatermap.cpp20
-rw-r--r--indra/newview/llfloatermap.h8
-rw-r--r--indra/newview/llfloatermarketplacelistings.cpp60
-rw-r--r--indra/newview/llfloatermarketplacelistings.h22
-rw-r--r--indra/newview/llfloatermediasettings.cpp4
-rw-r--r--indra/newview/llfloatermediasettings.h8
-rw-r--r--indra/newview/llfloatermemleak.cpp22
-rw-r--r--indra/newview/llfloatermemleak.h6
-rw-r--r--indra/newview/llfloatermodelpreview.cpp32
-rw-r--r--indra/newview/llfloatermodelpreview.h12
-rw-r--r--indra/newview/llfloatermyenvironment.cpp14
-rw-r--r--indra/newview/llfloatermyenvironment.h2
-rw-r--r--indra/newview/llfloatermyscripts.cpp6
-rw-r--r--indra/newview/llfloatermyscripts.h4
-rw-r--r--indra/newview/llfloaternamedesc.cpp30
-rw-r--r--indra/newview/llfloaternamedesc.h14
-rw-r--r--indra/newview/llfloaternewfeaturenotification.cpp6
-rw-r--r--indra/newview/llfloaternewfeaturenotification.h2
-rw-r--r--indra/newview/llfloaternotificationsconsole.cpp18
-rw-r--r--indra/newview/llfloaternotificationsconsole.h4
-rw-r--r--indra/newview/llfloaternotificationstabbed.cpp18
-rw-r--r--indra/newview/llfloaternotificationstabbed.h10
-rw-r--r--indra/newview/llfloaterobjectweights.cpp4
-rw-r--r--indra/newview/llfloaterobjectweights.h2
-rw-r--r--indra/newview/llfloateropenobject.cpp20
-rw-r--r--indra/newview/llfloateropenobject.h4
-rw-r--r--indra/newview/llfloaterpathfindingcharacters.cpp12
-rw-r--r--indra/newview/llfloaterpathfindingcharacters.h8
-rw-r--r--indra/newview/llfloaterpathfindingconsole.cpp238
-rw-r--r--indra/newview/llfloaterpathfindingconsole.h40
-rw-r--r--indra/newview/llfloaterpathfindinglinksets.cpp14
-rw-r--r--indra/newview/llfloaterpathfindinglinksets.h2
-rw-r--r--indra/newview/llfloaterpathfindingobjects.cpp28
-rw-r--r--indra/newview/llfloaterpathfindingobjects.h4
-rw-r--r--indra/newview/llfloaterpay.cpp78
-rw-r--r--indra/newview/llfloaterpay.h2
-rw-r--r--indra/newview/llfloaterperformance.cpp30
-rw-r--r--indra/newview/llfloaterperformance.h2
-rw-r--r--indra/newview/llfloaterperms.cpp14
-rw-r--r--indra/newview/llfloaterperms.h6
-rw-r--r--indra/newview/llfloaterpostprocess.cpp4
-rw-r--r--indra/newview/llfloaterpostprocess.h7
-rw-r--r--indra/newview/llfloaterpreference.cpp150
-rw-r--r--indra/newview/llfloaterpreference.h26
-rw-r--r--indra/newview/llfloaterpreferencesgraphicsadvanced.cpp163
-rw-r--r--indra/newview/llfloaterpreferencesgraphicsadvanced.h5
-rw-r--r--indra/newview/llfloaterpreviewtrash.cpp6
-rw-r--r--indra/newview/llfloaterpreviewtrash.h2
-rw-r--r--indra/newview/llfloaterprofile.cpp4
-rw-r--r--indra/newview/llfloaterprofile.h2
-rw-r--r--indra/newview/llfloaterprofiletexture.cpp24
-rw-r--r--indra/newview/llfloaterprofiletexture.h10
-rw-r--r--indra/newview/llfloaterregiondebugconsole.cpp6
-rw-r--r--indra/newview/llfloaterregiondebugconsole.h3
-rw-r--r--indra/newview/llfloaterregioninfo.cpp639
-rw-r--r--indra/newview/llfloaterregioninfo.h104
-rw-r--r--indra/newview/llfloaterregionrestarting.cpp8
-rw-r--r--indra/newview/llfloaterregionrestarting.h4
-rw-r--r--indra/newview/llfloaterreporter.cpp64
-rw-r--r--indra/newview/llfloaterreporter.h10
-rw-r--r--indra/newview/llfloatersavecamerapreset.cpp6
-rw-r--r--indra/newview/llfloatersavecamerapreset.h4
-rw-r--r--indra/newview/llfloatersaveprefpreset.cpp4
-rw-r--r--indra/newview/llfloatersaveprefpreset.h4
-rw-r--r--indra/newview/llfloatersceneloadstats.cpp4
-rw-r--r--indra/newview/llfloatersceneloadstats.h2
-rw-r--r--indra/newview/llfloaterscriptdebug.cpp30
-rw-r--r--indra/newview/llfloaterscriptdebug.h6
-rw-r--r--indra/newview/llfloaterscriptedprefs.cpp4
-rw-r--r--indra/newview/llfloaterscriptedprefs.h2
-rw-r--r--indra/newview/llfloaterscriptlimits.cpp32
-rw-r--r--indra/newview/llfloaterscriptlimits.h10
-rw-r--r--indra/newview/llfloatersearch.cpp8
-rw-r--r--indra/newview/llfloatersearch.h2
-rw-r--r--indra/newview/llfloatersellland.cpp26
-rw-r--r--indra/newview/llfloatersettingsdebug.cpp50
-rw-r--r--indra/newview/llfloatersettingsdebug.h2
-rw-r--r--indra/newview/llfloatersidepanelcontainer.cpp2
-rw-r--r--indra/newview/llfloatersimplesnapshot.cpp65
-rw-r--r--indra/newview/llfloatersimplesnapshot.h21
-rw-r--r--indra/newview/llfloatersnapshot.cpp146
-rw-r--r--indra/newview/llfloatersnapshot.h28
-rw-r--r--indra/newview/llfloatersounddevices.cpp6
-rw-r--r--indra/newview/llfloatersounddevices.h6
-rw-r--r--indra/newview/llfloaterspellchecksettings.cpp4
-rw-r--r--indra/newview/llfloaterspellchecksettings.h10
-rw-r--r--indra/newview/llfloatertelehub.cpp20
-rw-r--r--indra/newview/llfloatertelehub.h10
-rw-r--r--indra/newview/llfloatertestinspectors.cpp2
-rw-r--r--indra/newview/llfloatertestinspectors.h2
-rw-r--r--indra/newview/llfloatertools.cpp112
-rw-r--r--indra/newview/llfloatertools.h8
-rw-r--r--indra/newview/llfloatertopobjects.cpp12
-rw-r--r--indra/newview/llfloatertopobjects.h4
-rw-r--r--indra/newview/llfloatertos.cpp12
-rw-r--r--indra/newview/llfloatertos.h10
-rw-r--r--indra/newview/llfloatertoybox.cpp6
-rw-r--r--indra/newview/llfloatertoybox.h8
-rw-r--r--indra/newview/llfloatertranslationsettings.cpp24
-rw-r--r--indra/newview/llfloatertranslationsettings.h6
-rw-r--r--indra/newview/llfloateruipreview.cpp172
-rw-r--r--indra/newview/llfloaterurlentry.cpp4
-rw-r--r--indra/newview/llfloaterurlentry.h4
-rw-r--r--indra/newview/llfloatervoiceeffect.cpp4
-rw-r--r--indra/newview/llfloatervoiceeffect.h6
-rw-r--r--indra/newview/llfloatervoicevolume.cpp6
-rw-r--r--indra/newview/llfloaterwebcontent.cpp4
-rw-r--r--indra/newview/llfloaterwebcontent.h2
-rw-r--r--indra/newview/llfloaterwhitelistentry.cpp4
-rw-r--r--indra/newview/llfloaterwhitelistentry.h2
-rw-r--r--indra/newview/llfloaterwindowsize.cpp4
-rw-r--r--indra/newview/llfloaterwindowsize.h2
-rwxr-xr-xindra/newview/llfloaterworldmap.cpp86
-rw-r--r--indra/newview/llfloaterworldmap.h26
-rw-r--r--indra/newview/llfolderviewmodelinventory.h8
-rw-r--r--indra/newview/llfollowcam.cpp8
-rw-r--r--indra/newview/llfollowcam.h2
-rw-r--r--indra/newview/llfriendcard.cpp4
-rw-r--r--indra/newview/llgesturemgr.cpp114
-rw-r--r--indra/newview/llgesturemgr.h22
-rw-r--r--indra/newview/llgiveinventory.cpp10
-rw-r--r--indra/newview/llglsandbox.cpp20
-rw-r--r--indra/newview/llgltfmateriallist.cpp10
-rw-r--r--indra/newview/llgltfmateriallist.h2
-rw-r--r--indra/newview/llgltfmaterialpreviewmgr.cpp590
-rw-r--r--indra/newview/llgltfmaterialpreviewmgr.h78
-rw-r--r--indra/newview/llgroupactions.cpp6
-rw-r--r--indra/newview/llgrouplist.cpp14
-rw-r--r--indra/newview/llgrouplist.h6
-rw-r--r--indra/newview/llgroupmgr.cpp108
-rw-r--r--indra/newview/llgroupmgr.h38
-rw-r--r--indra/newview/llheroprobemanager.cpp607
-rw-r--r--indra/newview/llheroprobemanager.h156
-rw-r--r--indra/newview/llhints.cpp6
-rw-r--r--indra/newview/llhudeffect.cpp16
-rw-r--r--indra/newview/llhudeffect.h14
-rw-r--r--indra/newview/llhudeffectbeam.cpp2
-rw-r--r--indra/newview/llhudeffectlookat.cpp50
-rw-r--r--indra/newview/llhudeffectlookat.h4
-rw-r--r--indra/newview/llhudeffectpointat.cpp18
-rw-r--r--indra/newview/llhudeffectpointat.h4
-rw-r--r--indra/newview/llhudeffecttrail.cpp6
-rw-r--r--indra/newview/llhudeffecttrail.h2
-rw-r--r--indra/newview/llhudicon.cpp16
-rw-r--r--indra/newview/llhudicon.h10
-rw-r--r--indra/newview/llhudmanager.cpp6
-rw-r--r--indra/newview/llhudmanager.h2
-rw-r--r--indra/newview/llhudnametag.cpp60
-rw-r--r--indra/newview/llhudnametag.h30
-rw-r--r--indra/newview/llhudobject.cpp8
-rw-r--r--indra/newview/llhudobject.h6
-rw-r--r--indra/newview/llhudrender.cpp4
-rw-r--r--indra/newview/llhudrender.h4
-rw-r--r--indra/newview/llhudtext.cpp42
-rw-r--r--indra/newview/llhudtext.h30
-rw-r--r--indra/newview/llhudview.cpp4
-rw-r--r--indra/newview/llhudview.h2
-rw-r--r--indra/newview/llimpanel.cpp978
-rw-r--r--indra/newview/llimpanel.h212
-rw-r--r--indra/newview/llimprocessing.cpp40
-rw-r--r--indra/newview/llimprocessing.h2
-rw-r--r--indra/newview/llimview.cpp104
-rw-r--r--indra/newview/llimview.h16
-rw-r--r--indra/newview/llinspect.cpp8
-rw-r--r--indra/newview/llinspect.h4
-rw-r--r--indra/newview/llinspectavatar.cpp6
-rw-r--r--indra/newview/llinspectobject.cpp12
-rw-r--r--indra/newview/llinspectremoteobject.cpp6
-rw-r--r--indra/newview/llinspecttexture.cpp2
-rw-r--r--indra/newview/llinspecttoast.cpp10
-rw-r--r--indra/newview/llinventorybridge.cpp672
-rw-r--r--indra/newview/llinventorybridge.h139
-rw-r--r--indra/newview/llinventoryclipboard.cpp110
-rw-r--r--indra/newview/llinventoryclipboard.h86
-rw-r--r--indra/newview/llinventoryfilter.cpp150
-rw-r--r--indra/newview/llinventoryfilter.h4
-rw-r--r--indra/newview/llinventoryfunctions.cpp187
-rw-r--r--indra/newview/llinventoryfunctions.h28
-rw-r--r--indra/newview/llinventorygallery.cpp353
-rw-r--r--indra/newview/llinventorygallery.h35
-rw-r--r--indra/newview/llinventorygallerymenu.cpp294
-rw-r--r--indra/newview/llinventoryicon.cpp4
-rw-r--r--indra/newview/llinventoryicon.h4
-rw-r--r--indra/newview/llinventorylistitem.cpp12
-rw-r--r--indra/newview/llinventorylistitem.h8
-rw-r--r--indra/newview/llinventorymodel.cpp84
-rw-r--r--indra/newview/llinventorymodel.h22
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.cpp12
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.h2
-rw-r--r--indra/newview/llinventoryobserver.cpp14
-rw-r--r--indra/newview/llinventoryobserver.h4
-rw-r--r--indra/newview/llinventorypanel.cpp86
-rw-r--r--indra/newview/llinventorypanel.h30
-rw-r--r--indra/newview/lljoystickbutton.cpp46
-rw-r--r--indra/newview/lljoystickbutton.h40
-rw-r--r--indra/newview/lllandmarkactions.cpp6
-rw-r--r--indra/newview/lllandmarkactions.h2
-rw-r--r--indra/newview/lllandmarklist.cpp4
-rw-r--r--indra/newview/lllandmarklist.h6
-rw-r--r--indra/newview/lllegacyatmospherics.cpp4
-rw-r--r--indra/newview/lllegacyatmospherics.h2
-rw-r--r--indra/newview/lllistbrowser.cpp31
-rw-r--r--indra/newview/lllistbrowser.h30
-rw-r--r--indra/newview/lllocalbitmaps.cpp10
-rw-r--r--indra/newview/lllocalbitmaps.h2
-rw-r--r--indra/newview/lllocalgltfmaterials.cpp4
-rw-r--r--indra/newview/lllocalgltfmaterials.h2
-rw-r--r--indra/newview/lllocationinputctrl.cpp28
-rw-r--r--indra/newview/lllocationinputctrl.h10
-rw-r--r--indra/newview/lllogchat.cpp12
-rw-r--r--indra/newview/lllogininstance.cpp12
-rw-r--r--indra/newview/llmanip.cpp58
-rw-r--r--indra/newview/llmanip.h20
-rw-r--r--indra/newview/llmaniprotate.cpp405
-rw-r--r--indra/newview/llmaniprotate.h20
-rw-r--r--indra/newview/llmanipscale.cpp76
-rw-r--r--indra/newview/llmanipscale.h26
-rw-r--r--indra/newview/llmaniptranslate.cpp347
-rw-r--r--indra/newview/llmaniptranslate.h18
-rw-r--r--indra/newview/llmarketplacefunctions.cpp2
-rw-r--r--indra/newview/llmaterialeditor.cpp81
-rw-r--r--indra/newview/llmaterialeditor.h4
-rw-r--r--indra/newview/llmaterialmgr.h2
-rw-r--r--indra/newview/llmediactrl.cpp94
-rw-r--r--indra/newview/llmediactrl.h34
-rw-r--r--indra/newview/llmediadataclient.cpp8
-rw-r--r--indra/newview/llmediadataclient.h4
-rw-r--r--indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp4
-rw-r--r--indra/newview/llmenuoptionpathfindingrebakenavmesh.h2
-rw-r--r--indra/newview/llmeshrepository.cpp32
-rw-r--r--indra/newview/llmeshrepository.h2
-rw-r--r--indra/newview/llmimetypes.cpp8
-rw-r--r--indra/newview/llmimetypes.h4
-rw-r--r--indra/newview/llmodelpreview.cpp46
-rw-r--r--indra/newview/llmodelpreview.h8
-rw-r--r--indra/newview/llmorphview.cpp8
-rw-r--r--indra/newview/llmorphview.h6
-rw-r--r--indra/newview/llmoveview.cpp60
-rw-r--r--indra/newview/llmoveview.h18
-rw-r--r--indra/newview/llmutelist.cpp70
-rw-r--r--indra/newview/llmutelist.h20
-rw-r--r--indra/newview/llnamebox.cpp6
-rw-r--r--indra/newview/llnamebox.h6
-rw-r--r--indra/newview/llnameeditor.cpp4
-rw-r--r--indra/newview/llnameeditor.h2
-rw-r--r--indra/newview/llnamelistctrl.cpp32
-rw-r--r--indra/newview/llnamelistctrl.h18
-rw-r--r--indra/newview/llnavigationbar.cpp26
-rwxr-xr-xindra/newview/llnavigationbar.h12
-rw-r--r--indra/newview/llnetmap.cpp66
-rw-r--r--indra/newview/llnetmap.h26
-rw-r--r--indra/newview/llnotificationhandlerutil.cpp2
-rw-r--r--indra/newview/llnotificationlistitem.cpp88
-rw-r--r--indra/newview/llnotificationlistitem.h16
-rw-r--r--indra/newview/lloutfitgallery.cpp85
-rw-r--r--indra/newview/lloutfitgallery.h16
-rw-r--r--indra/newview/lloutfitslist.cpp31
-rw-r--r--indra/newview/lloutfitslist.h8
-rw-r--r--indra/newview/lloutputmonitorctrl.cpp14
-rw-r--r--indra/newview/lloutputmonitorctrl.h2
-rw-r--r--indra/newview/llpanelavatar.cpp11
-rw-r--r--indra/newview/llpanelavatar.h4
-rw-r--r--indra/newview/llpanelavatartag.cpp8
-rw-r--r--indra/newview/llpanelavatartag.h6
-rw-r--r--indra/newview/llpanelblockedlist.cpp24
-rw-r--r--indra/newview/llpanelblockedlist.h12
-rw-r--r--indra/newview/llpanelclassified.cpp10
-rw-r--r--indra/newview/llpanelclassified.h4
-rw-r--r--indra/newview/llpanelcontents.cpp16
-rw-r--r--indra/newview/llpanelcontents.h2
-rw-r--r--indra/newview/llpaneleditsky.cpp58
-rw-r--r--indra/newview/llpaneleditsky.h16
-rw-r--r--indra/newview/llpaneleditwater.cpp10
-rw-r--r--indra/newview/llpaneleditwater.h4
-rw-r--r--indra/newview/llpaneleditwearable.cpp124
-rw-r--r--indra/newview/llpaneleditwearable.h12
-rw-r--r--indra/newview/llpanelemojicomplete.cpp50
-rw-r--r--indra/newview/llpanelemojicomplete.h18
-rw-r--r--indra/newview/llpanelenvironment.cpp14
-rw-r--r--indra/newview/llpanelenvironment.h8
-rw-r--r--indra/newview/llpanelexperiencelisteditor.cpp6
-rw-r--r--indra/newview/llpanelexperiencelisteditor.h2
-rw-r--r--indra/newview/llpanelexperiencelog.cpp10
-rw-r--r--indra/newview/llpanelexperiencelog.h2
-rw-r--r--indra/newview/llpanelexperiencepicker.cpp40
-rw-r--r--indra/newview/llpanelexperiencepicker.h2
-rw-r--r--indra/newview/llpanelexperiences.cpp8
-rw-r--r--indra/newview/llpanelexperiences.h5
-rw-r--r--indra/newview/llpanelface.cpp143
-rw-r--r--indra/newview/llpanelface.h13
-rw-r--r--indra/newview/llpanelgroup.cpp24
-rw-r--r--indra/newview/llpanelgroup.h16
-rw-r--r--indra/newview/llpanelgroupbulk.cpp14
-rw-r--r--indra/newview/llpanelgroupbulkban.cpp18
-rw-r--r--indra/newview/llpanelgroupbulkban.h2
-rw-r--r--indra/newview/llpanelgroupcreate.cpp30
-rw-r--r--indra/newview/llpanelgroupcreate.h4
-rw-r--r--indra/newview/llpanelgroupexperiences.cpp2
-rw-r--r--indra/newview/llpanelgroupexperiences.h2
-rw-r--r--indra/newview/llpanelgroupgeneral.cpp76
-rw-r--r--indra/newview/llpanelgroupgeneral.h6
-rw-r--r--indra/newview/llpanelgroupinvite.cpp32
-rw-r--r--indra/newview/llpanelgroupinvite.h8
-rw-r--r--indra/newview/llpanelgrouplandmoney.cpp16
-rw-r--r--indra/newview/llpanelgrouplandmoney.h4
-rw-r--r--indra/newview/llpanelgroupnotices.cpp87
-rw-r--r--indra/newview/llpanelgroupnotices.h4
-rw-r--r--indra/newview/llpanelgrouproles.cpp350
-rw-r--r--indra/newview/llpanelgrouproles.h49
-rw-r--r--indra/newview/llpanelhome.cpp4
-rw-r--r--indra/newview/llpanelhome.h2
-rw-r--r--indra/newview/llpanelland.cpp38
-rw-r--r--indra/newview/llpanelland.h4
-rw-r--r--indra/newview/llpanellandaudio.cpp18
-rw-r--r--indra/newview/llpanellandaudio.h2
-rw-r--r--indra/newview/llpanellandmarkinfo.cpp30
-rw-r--r--indra/newview/llpanellandmarkinfo.h8
-rw-r--r--indra/newview/llpanellandmarks.cpp40
-rw-r--r--indra/newview/llpanellandmarks.h8
-rw-r--r--indra/newview/llpanellandmedia.cpp18
-rw-r--r--indra/newview/llpanellandmedia.h2
-rw-r--r--indra/newview/llpanellogin.cpp50
-rw-r--r--indra/newview/llpanellogin.h17
-rw-r--r--indra/newview/llpanelmaininventory.cpp193
-rw-r--r--indra/newview/llpanelmaininventory.h22
-rw-r--r--indra/newview/llpanelmarketplaceinbox.cpp18
-rw-r--r--indra/newview/llpanelmarketplaceinbox.h8
-rw-r--r--indra/newview/llpanelmarketplaceinboxinventory.cpp6
-rw-r--r--indra/newview/llpanelmarketplaceinboxinventory.h6
-rw-r--r--indra/newview/llpanelmediasettingsgeneral.cpp2
-rw-r--r--indra/newview/llpanelmediasettingsgeneral.h2
-rw-r--r--indra/newview/llpanelmediasettingspermissions.cpp6
-rw-r--r--indra/newview/llpanelmediasettingspermissions.h2
-rw-r--r--indra/newview/llpanelmediasettingssecurity.cpp2
-rw-r--r--indra/newview/llpanelmediasettingssecurity.h2
-rw-r--r--indra/newview/llpanelnearbymedia.cpp152
-rw-r--r--indra/newview/llpanelnearbymedia.h20
-rw-r--r--indra/newview/llpanelobject.cpp300
-rw-r--r--indra/newview/llpanelobject.h18
-rw-r--r--indra/newview/llpanelobjectinventory.cpp270
-rw-r--r--indra/newview/llpanelobjectinventory.h14
-rw-r--r--indra/newview/llpaneloutfitedit.cpp48
-rw-r--r--indra/newview/llpaneloutfitedit.h4
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp6
-rw-r--r--indra/newview/llpaneloutfitsinventory.h2
-rw-r--r--indra/newview/llpanelpeople.cpp58
-rw-r--r--indra/newview/llpanelpeople.h14
-rw-r--r--indra/newview/llpanelpermissions.cpp380
-rw-r--r--indra/newview/llpanelpermissions.h2
-rw-r--r--indra/newview/llpanelplaceinfo.cpp10
-rw-r--r--indra/newview/llpanelplaceinfo.h4
-rw-r--r--indra/newview/llpanelplaceprofile.cpp18
-rw-r--r--indra/newview/llpanelplaceprofile.h4
-rw-r--r--indra/newview/llpanelplaces.cpp52
-rw-r--r--indra/newview/llpanelplaces.h8
-rw-r--r--indra/newview/llpanelplacestab.h2
-rw-r--r--indra/newview/llpanelpresetscamerapulldown.cpp8
-rw-r--r--indra/newview/llpanelpresetscamerapulldown.h2
-rw-r--r--indra/newview/llpanelpresetspulldown.cpp10
-rw-r--r--indra/newview/llpanelpresetspulldown.h2
-rw-r--r--indra/newview/llpanelprimmediacontrols.cpp74
-rw-r--r--indra/newview/llpanelprimmediacontrols.h16
-rw-r--r--indra/newview/llpanelprofile.cpp256
-rw-r--r--indra/newview/llpanelprofile.h22
-rw-r--r--indra/newview/llpanelprofileclassifieds.cpp68
-rw-r--r--indra/newview/llpanelprofileclassifieds.h10
-rw-r--r--indra/newview/llpanelprofilepicks.cpp62
-rw-r--r--indra/newview/llpanelprofilepicks.h8
-rw-r--r--indra/newview/llpanelpulldown.cpp26
-rw-r--r--indra/newview/llpanelpulldown.h20
-rw-r--r--indra/newview/llpanelsnapshot.cpp10
-rw-r--r--indra/newview/llpanelsnapshot.h8
-rw-r--r--indra/newview/llpanelsnapshotinventory.cpp18
-rw-r--r--indra/newview/llpanelsnapshotlocal.cpp4
-rw-r--r--indra/newview/llpanelsnapshotoptions.cpp4
-rw-r--r--indra/newview/llpanelsnapshotpostcard.cpp6
-rw-r--r--indra/newview/llpanelsnapshotprofile.cpp4
-rw-r--r--indra/newview/llpanelteleporthistory.cpp18
-rw-r--r--indra/newview/llpanelteleporthistory.h4
-rw-r--r--indra/newview/llpaneltiptoast.cpp6
-rw-r--r--indra/newview/llpaneltiptoast.h2
-rw-r--r--indra/newview/llpaneltopinfobar.cpp10
-rw-r--r--indra/newview/llpaneltopinfobar.h8
-rw-r--r--indra/newview/llpanelvoicedevicesettings.cpp26
-rw-r--r--indra/newview/llpanelvoicedevicesettings.h6
-rw-r--r--indra/newview/llpanelvoiceeffect.cpp4
-rw-r--r--indra/newview/llpanelvoiceeffect.h4
-rw-r--r--indra/newview/llpanelvolume.cpp153
-rw-r--r--indra/newview/llpanelvolume.h4
-rw-r--r--indra/newview/llpanelvolumepulldown.cpp6
-rw-r--r--indra/newview/llpanelvolumepulldown.h2
-rw-r--r--indra/newview/llpanelwearing.cpp18
-rw-r--r--indra/newview/llpanelwearing.h2
-rw-r--r--indra/newview/llparcelselection.cpp12
-rw-r--r--indra/newview/llparcelselection.h8
-rw-r--r--indra/newview/llpathfindingcharacter.cpp2
-rw-r--r--indra/newview/llpathfindingcharacter.h4
-rw-r--r--indra/newview/llpathfindinglinkset.cpp24
-rw-r--r--indra/newview/llpathfindinglinkset.h20
-rw-r--r--indra/newview/llpathfindinglinksetlist.cpp42
-rw-r--r--indra/newview/llpathfindinglinksetlist.h4
-rw-r--r--indra/newview/llpathfindingmanager.cpp8
-rw-r--r--indra/newview/llpathfindingmanager.h6
-rw-r--r--indra/newview/llpathfindingobject.h6
-rw-r--r--indra/newview/llpathfindingpathtool.cpp56
-rw-r--r--indra/newview/llpathfindingpathtool.h18
-rw-r--r--indra/newview/llperfstats.cpp4
-rw-r--r--indra/newview/llphysicsmotion.cpp58
-rw-r--r--indra/newview/llphysicsmotion.h12
-rw-r--r--indra/newview/llplacesfolderview.cpp4
-rw-r--r--indra/newview/llplacesfolderview.h2
-rw-r--r--indra/newview/llplacesinventorypanel.cpp10
-rw-r--r--indra/newview/llplacesinventorypanel.h2
-rw-r--r--indra/newview/llpopupview.cpp46
-rw-r--r--indra/newview/llpopupview.h22
-rw-r--r--indra/newview/llpresetsmanager.cpp2
-rw-r--r--indra/newview/llpreview.cpp54
-rw-r--r--indra/newview/llpreview.h31
-rw-r--r--indra/newview/llpreviewanim.cpp24
-rw-r--r--indra/newview/llpreviewanim.h2
-rw-r--r--indra/newview/llpreviewgesture.cpp206
-rw-r--r--indra/newview/llpreviewgesture.h10
-rw-r--r--indra/newview/llpreviewnotecard.cpp64
-rw-r--r--indra/newview/llpreviewnotecard.h8
-rw-r--r--indra/newview/llpreviewscript.cpp243
-rw-r--r--indra/newview/llpreviewscript.h68
-rw-r--r--indra/newview/llpreviewsound.cpp2
-rw-r--r--indra/newview/llpreviewsound.h2
-rw-r--r--indra/newview/llpreviewtexture.cpp66
-rw-r--r--indra/newview/llpreviewtexture.h24
-rw-r--r--indra/newview/llprogressview.cpp67
-rw-r--r--indra/newview/llprogressview.h10
-rw-r--r--indra/newview/llreflectionmap.cpp9
-rw-r--r--indra/newview/llreflectionmap.h13
-rw-r--r--indra/newview/llreflectionmapmanager.cpp210
-rw-r--r--indra/newview/llreflectionmapmanager.h20
-rw-r--r--indra/newview/llregioninfomodel.cpp4
-rw-r--r--indra/newview/llregioninfomodel.h2
-rw-r--r--indra/newview/llsavedsettingsglue.cpp59
-rw-r--r--indra/newview/llsavedsettingsglue.h46
-rw-r--r--indra/newview/llscenemonitor.cpp10
-rw-r--r--indra/newview/llscenemonitor.h2
-rw-r--r--indra/newview/llsceneview.cpp2
-rw-r--r--indra/newview/llscreenchannel.cpp24
-rw-r--r--indra/newview/llscreenchannel.h4
-rw-r--r--indra/newview/llscripteditor.cpp4
-rw-r--r--indra/newview/llscripteditor.h2
-rw-r--r--indra/newview/llscriptfloater.cpp10
-rw-r--r--indra/newview/llscriptfloater.h2
-rw-r--r--indra/newview/llscrollingpanelparam.cpp85
-rw-r--r--indra/newview/llscrollingpanelparam.h19
-rw-r--r--indra/newview/llscrollingpanelparambase.cpp8
-rw-r--r--indra/newview/llscrollingpanelparambase.h6
-rw-r--r--indra/newview/llsearchableui.cpp4
-rw-r--r--indra/newview/llsearchcombobox.cpp10
-rw-r--r--indra/newview/llsearchcombobox.h4
-rw-r--r--indra/newview/llsechandler_basic.cpp30
-rw-r--r--indra/newview/llselectmgr.cpp886
-rw-r--r--indra/newview/llselectmgr.h269
-rw-r--r--indra/newview/llsetkeybinddialog.cpp32
-rw-r--r--indra/newview/llsetkeybinddialog.h8
-rw-r--r--indra/newview/llsettingspicker.cpp30
-rw-r--r--indra/newview/llsettingspicker.h6
-rw-r--r--indra/newview/llsettingsvo.cpp45
-rw-r--r--indra/newview/llshareavatarhandler.cpp2
-rw-r--r--indra/newview/llsidepanelappearance.cpp54
-rw-r--r--indra/newview/llsidepanelappearance.h12
-rw-r--r--indra/newview/llsidepanelinventory.cpp10
-rw-r--r--indra/newview/llsidepanelinventory.h6
-rw-r--r--indra/newview/llsidepanelinventorysubpanel.cpp30
-rw-r--r--indra/newview/llsidepanelinventorysubpanel.h12
-rw-r--r--indra/newview/llsidepaneliteminfo.cpp124
-rw-r--r--indra/newview/llsidepaneliteminfo.h2
-rw-r--r--indra/newview/llsidepaneltaskinfo.cpp330
-rw-r--r--indra/newview/llsidepaneltaskinfo.h4
-rw-r--r--indra/newview/llsidetraypanelcontainer.cpp4
-rw-r--r--indra/newview/llsidetraypanelcontainer.h4
-rw-r--r--indra/newview/llsky.cpp4
-rw-r--r--indra/newview/llsky.h2
-rw-r--r--indra/newview/llsnapshotlivepreview.cpp158
-rw-r--r--indra/newview/llsnapshotlivepreview.h56
-rw-r--r--indra/newview/llspatialpartition.cpp319
-rw-r--r--indra/newview/llspatialpartition.h63
-rw-r--r--indra/newview/llspeakers.cpp42
-rw-r--r--indra/newview/llspeakers.h24
-rw-r--r--indra/newview/llspeakingindicatormanager.cpp14
-rw-r--r--indra/newview/llsplitbutton.cpp30
-rw-r--r--indra/newview/llsplitbutton.h6
-rw-r--r--indra/newview/llsprite.cpp8
-rw-r--r--indra/newview/llsprite.h8
-rw-r--r--indra/newview/llstartup.cpp203
-rw-r--r--indra/newview/llstatusbar.cpp56
-rw-r--r--indra/newview/llstatusbar.h8
-rw-r--r--indra/newview/llsurface.cpp40
-rw-r--r--indra/newview/llsurface.h16
-rw-r--r--indra/newview/llsurfacepatch.cpp285
-rw-r--r--indra/newview/llsurfacepatch.h37
-rw-r--r--indra/newview/llsyswellitem.cpp4
-rw-r--r--indra/newview/llsyswellitem.h2
-rw-r--r--indra/newview/llsyswellwindow.cpp26
-rw-r--r--indra/newview/llsyswellwindow.h16
-rw-r--r--indra/newview/lltexturecache.cpp45
-rw-r--r--indra/newview/lltexturecache.h20
-rw-r--r--indra/newview/lltexturectrl.cpp350
-rw-r--r--indra/newview/lltexturectrl.h139
-rw-r--r--indra/newview/lltexturefetch.cpp87
-rw-r--r--indra/newview/lltexturefetch.h4
-rw-r--r--indra/newview/lltextureview.cpp67
-rw-r--r--indra/newview/lltextureview.h17
-rw-r--r--indra/newview/llthumbnailctrl.cpp12
-rw-r--r--indra/newview/llthumbnailctrl.h4
-rw-r--r--indra/newview/lltinygltfhelper.cpp111
-rw-r--r--indra/newview/lltinygltfhelper.h10
-rw-r--r--indra/newview/lltoast.cpp36
-rw-r--r--indra/newview/lltoast.h20
-rw-r--r--indra/newview/lltoastalertpanel.cpp42
-rw-r--r--indra/newview/lltoastalertpanel.h16
-rw-r--r--indra/newview/lltoastgroupnotifypanel.cpp16
-rw-r--r--indra/newview/lltoastimpanel.cpp34
-rw-r--r--indra/newview/lltoastimpanel.h4
-rw-r--r--indra/newview/lltoastnotifypanel.cpp18
-rw-r--r--indra/newview/lltoastnotifypanel.h4
-rw-r--r--indra/newview/lltoastpanel.cpp4
-rw-r--r--indra/newview/lltoastscriptquestion.cpp10
-rw-r--r--indra/newview/lltoastscriptquestion.h4
-rw-r--r--indra/newview/lltoastscripttextbox.cpp2
-rw-r--r--indra/newview/lltool.cpp58
-rw-r--r--indra/newview/lltool.h44
-rw-r--r--indra/newview/lltoolbarview.cpp18
-rw-r--r--indra/newview/lltoolbarview.h8
-rw-r--r--indra/newview/lltoolbrush.cpp50
-rw-r--r--indra/newview/lltoolbrush.h14
-rw-r--r--indra/newview/lltoolcomp.cpp162
-rw-r--r--indra/newview/lltoolcomp.h80
-rw-r--r--indra/newview/lltooldraganddrop.cpp368
-rw-r--r--indra/newview/lltooldraganddrop.h92
-rw-r--r--indra/newview/lltoolface.cpp14
-rw-r--r--indra/newview/lltoolface.h4
-rw-r--r--indra/newview/lltoolfocus.cpp86
-rw-r--r--indra/newview/lltoolfocus.h24
-rw-r--r--indra/newview/lltoolgrab.cpp128
-rw-r--r--indra/newview/lltoolgrab.h40
-rw-r--r--indra/newview/lltoolgun.cpp16
-rw-r--r--indra/newview/lltoolgun.h8
-rw-r--r--indra/newview/lltoolindividual.cpp12
-rw-r--r--indra/newview/lltoolindividual.h4
-rw-r--r--indra/newview/lltoolmgr.cpp14
-rw-r--r--indra/newview/lltoolmgr.h4
-rw-r--r--indra/newview/lltoolmorph.cpp44
-rw-r--r--indra/newview/lltoolmorph.h22
-rw-r--r--indra/newview/lltoolobjpicker.cpp28
-rw-r--r--indra/newview/lltoolobjpicker.h8
-rw-r--r--indra/newview/lltoolpie.cpp180
-rw-r--r--indra/newview/lltoolpie.h38
-rw-r--r--indra/newview/lltoolpipette.cpp32
-rw-r--r--indra/newview/lltoolpipette.h12
-rw-r--r--indra/newview/lltoolplacer.cpp66
-rw-r--r--indra/newview/lltoolplacer.h12
-rw-r--r--indra/newview/lltoolselect.cpp52
-rw-r--r--indra/newview/lltoolselect.h8
-rw-r--r--indra/newview/lltoolselectland.cpp50
-rw-r--r--indra/newview/lltoolselectland.h16
-rw-r--r--indra/newview/lltoolselectrect.cpp34
-rw-r--r--indra/newview/lltoolselectrect.h10
-rw-r--r--indra/newview/lltracker.cpp70
-rw-r--r--indra/newview/lltracker.h16
-rw-r--r--indra/newview/lltrackpicker.cpp10
-rw-r--r--indra/newview/lltrackpicker.h2
-rw-r--r--indra/newview/lltransientdockablefloater.cpp2
-rw-r--r--indra/newview/lltransientdockablefloater.h6
-rw-r--r--indra/newview/lltransientfloatermgr.cpp2
-rw-r--r--indra/newview/lltransientfloatermgr.h2
-rw-r--r--indra/newview/lltranslate.cpp243
-rw-r--r--indra/newview/lltranslate.h5
-rw-r--r--indra/newview/lluiavatar.cpp2
-rw-r--r--indra/newview/lluploaddialog.cpp8
-rw-r--r--indra/newview/llurl.cpp4
-rw-r--r--indra/newview/llurl.h2
-rw-r--r--indra/newview/llurllineeditorctrl.cpp2
-rw-r--r--indra/newview/llurllineeditorctrl.h2
-rw-r--r--indra/newview/llvectorperfoptions.h32
-rw-r--r--indra/newview/llviewerassetstorage.cpp12
-rw-r--r--indra/newview/llviewerassetstorage.h12
-rw-r--r--indra/newview/llviewerassetupload.cpp10
-rw-r--r--indra/newview/llvieweraudio.cpp25
-rw-r--r--indra/newview/llviewercamera.cpp80
-rw-r--r--indra/newview/llviewercamera.h18
-rw-r--r--indra/newview/llviewercontrol.cpp81
-rw-r--r--indra/newview/llviewercontrol.h2
-rw-r--r--indra/newview/llviewerdisplay.cpp124
-rw-r--r--indra/newview/llviewerdisplay.h16
-rw-r--r--indra/newview/llviewerfoldertype.cpp74
-rw-r--r--indra/newview/llviewerfoldertype.h4
-rw-r--r--indra/newview/llviewergesture.cpp32
-rw-r--r--indra/newview/llviewergesture.h16
-rw-r--r--indra/newview/llviewerinput.cpp92
-rw-r--r--indra/newview/llviewerinput.h26
-rw-r--r--indra/newview/llviewerinventory.cpp70
-rw-r--r--indra/newview/llviewerinventory.h22
-rw-r--r--indra/newview/llviewerjoint.cpp14
-rw-r--r--indra/newview/llviewerjoint.h4
-rw-r--r--indra/newview/llviewerjointattachment.cpp62
-rw-r--r--indra/newview/llviewerjointattachment.h28
-rw-r--r--indra/newview/llviewerjointmesh.cpp20
-rw-r--r--indra/newview/llviewerjointmesh.h16
-rw-r--r--indra/newview/llviewerjoystick.cpp12
-rw-r--r--indra/newview/llviewermedia.cpp42
-rw-r--r--indra/newview/llviewermedia.h40
-rw-r--r--indra/newview/llviewermediafocus.cpp28
-rw-r--r--indra/newview/llviewermediafocus.h10
-rw-r--r--indra/newview/llviewermenu.cpp531
-rw-r--r--indra/newview/llviewermenu.h28
-rw-r--r--indra/newview/llviewermenufile.cpp127
-rw-r--r--indra/newview/llviewermessage.cpp200
-rw-r--r--indra/newview/llviewermessage.h12
-rw-r--r--indra/newview/llviewerobject.cpp858
-rw-r--r--indra/newview/llviewerobject.h275
-rw-r--r--indra/newview/llviewerobjectlist.cpp52
-rw-r--r--indra/newview/llviewerobjectlist.h8
-rw-r--r--indra/newview/llvieweroctree.cpp42
-rw-r--r--indra/newview/llvieweroctree.h24
-rw-r--r--indra/newview/llviewerparcelmedia.cpp19
-rw-r--r--indra/newview/llviewerparcelmediaautoplay.cpp14
-rw-r--r--indra/newview/llviewerparcelmediaautoplay.h4
-rw-r--r--indra/newview/llviewerparcelmgr.cpp182
-rw-r--r--indra/newview/llviewerparcelmgr.h48
-rwxr-xr-xindra/newview/llviewerparceloverlay.cpp28
-rw-r--r--indra/newview/llviewerparceloverlay.h14
-rw-r--r--indra/newview/llviewerpartsim.cpp42
-rw-r--r--indra/newview/llviewerpartsim.h10
-rw-r--r--indra/newview/llviewerpartsource.cpp20
-rw-r--r--indra/newview/llviewerpartsource.h14
-rwxr-xr-xindra/newview/llviewerregion.cpp217
-rw-r--r--indra/newview/llviewerregion.h134
-rw-r--r--indra/newview/llviewershadermgr.cpp352
-rw-r--r--indra/newview/llviewershadermgr.h46
-rw-r--r--indra/newview/llviewerstats.cpp2
-rw-r--r--indra/newview/llviewertexlayer.cpp76
-rw-r--r--indra/newview/llviewertexlayer.h30
-rw-r--r--indra/newview/llviewertexteditor.cpp136
-rw-r--r--indra/newview/llviewertexteditor.h24
-rw-r--r--indra/newview/llviewertexture.cpp360
-rw-r--r--indra/newview/llviewertexture.h169
-rw-r--r--indra/newview/llviewertexturelist.cpp118
-rw-r--r--indra/newview/llviewertexturelist.h54
-rw-r--r--indra/newview/llviewerthrottle.cpp2
-rw-r--r--indra/newview/llviewerthrottle.h2
-rw-r--r--indra/newview/llviewerwearable.cpp36
-rw-r--r--indra/newview/llviewerwearable.h10
-rw-r--r--indra/newview/llviewerwindow.cpp697
-rw-r--r--indra/newview/llviewerwindow.h178
-rw-r--r--indra/newview/llvlcomposition.cpp734
-rw-r--r--indra/newview/llvlcomposition.h94
-rw-r--r--indra/newview/llvlmanager.cpp2
-rw-r--r--indra/newview/llvoavatar.cpp829
-rw-r--r--indra/newview/llvoavatar.h201
-rw-r--r--indra/newview/llvoavatarself.cpp197
-rw-r--r--indra/newview/llvoavatarself.h60
-rw-r--r--indra/newview/llvocache.cpp284
-rw-r--r--indra/newview/llvocache.h31
-rw-r--r--indra/newview/llvograss.cpp54
-rw-r--r--indra/newview/llvograss.h16
-rw-r--r--indra/newview/llvoicecallhandler.cpp2
-rw-r--r--indra/newview/llvoicechannel.cpp42
-rw-r--r--indra/newview/llvoicechannel.h14
-rw-r--r--indra/newview/llvoiceclient.cpp48
-rw-r--r--indra/newview/llvoiceclient.h46
-rw-r--r--indra/newview/llvoicevisualizer.cpp6
-rw-r--r--indra/newview/llvoicevisualizer.h2
-rw-r--r--indra/newview/llvoicevivox.cpp102
-rw-r--r--indra/newview/llvoicevivox.h26
-rw-r--r--indra/newview/llvopartgroup.cpp34
-rw-r--r--indra/newview/llvopartgroup.h12
-rw-r--r--indra/newview/llvosky.cpp100
-rw-r--r--indra/newview/llvosky.h14
-rw-r--r--indra/newview/llvosurfacepatch.cpp265
-rw-r--r--indra/newview/llvosurfacepatch.h30
-rw-r--r--indra/newview/llvotree.cpp33
-rw-r--r--indra/newview/llvotree.h10
-rw-r--r--indra/newview/llvovolume.cpp481
-rw-r--r--indra/newview/llvovolume.h90
-rw-r--r--indra/newview/llvowater.cpp28
-rw-r--r--indra/newview/llvowater.h16
-rw-r--r--indra/newview/llvowlsky.cpp20
-rw-r--r--indra/newview/llvowlsky.h6
-rw-r--r--indra/newview/llwearableitemslist.cpp40
-rw-r--r--indra/newview/llwearableitemslist.h12
-rw-r--r--indra/newview/llwearablelist.cpp6
-rw-r--r--indra/newview/llwebprofile.cpp6
-rw-r--r--indra/newview/llwindebug.cpp2
-rw-r--r--indra/newview/llwindowlistener.cpp2
-rw-r--r--indra/newview/llworld.cpp18
-rw-r--r--indra/newview/llworld.h2
-rw-r--r--indra/newview/llworldmapmessage.cpp6
-rwxr-xr-xindra/newview/llworldmapview.cpp100
-rw-r--r--indra/newview/llworldmapview.h30
-rw-r--r--indra/newview/llworldmipmap.cpp2
-rw-r--r--indra/newview/llxmlrpclistener.cpp94
-rwxr-xr-xindra/newview/macview.r123
-rw-r--r--indra/newview/pipeline.cpp313
-rw-r--r--indra/newview/pipeline.h23
-rw-r--r--indra/newview/skins/default/textures/icons/AddItem_Disabled.pngbin186 -> 403 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/AddItem_Off.pngbin184 -> 397 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/AddItem_Press.pngbin181 -> 392 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/AudioMute_Off.pngbin600 -> 800 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/AudioMute_Over.pngbin587 -> 787 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Audio_Off.pngbin467 -> 596 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Audio_Press.pngbin477 -> 585 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/BackArrow_Off.pngbin227 -> 434 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/ClipboardMenu_Disabled.pngbin231 -> 406 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/ClipboardMenu_Off.pngbin231 -> 392 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/ClipboardMenu_Press.pngbin224 -> 403 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/ClipboardSmallMenu_Disabled.pngbin218 -> 395 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/ClipboardSmallMenu_Off.pngbin217 -> 386 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/ClipboardSmallMenu_Press.pngbin215 -> 395 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Conv_log_inbox.pngbin556 -> 544 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Conv_toolbar_add_person.pngbin373 -> 522 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_ne.pngbin215 -> 428 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_sw.pngbin211 -> 428 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Conv_toolbar_call_log.pngbin546 -> 592 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Conv_toolbar_close.pngbin275 -> 479 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Conv_toolbar_collapse.pngbin345 -> 538 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Conv_toolbar_expand.pngbin342 -> 533 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Conv_toolbar_hang_up.pngbin459 -> 609 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Conv_toolbar_open_call.pngbin366 -> 546 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Conv_toolbar_plus.pngbin144 -> 368 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Conv_toolbar_sort.pngbin230 -> 424 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Copy.pngbin481 -> 588 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/CopyBright.pngbin519 -> 615 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Default_Outfit_Photo.pngbin19459 -> 13832 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/DownArrow_Off.pngbin217 -> 431 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Edit_Wrench.pngbin452 -> 502 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/ExternalBrowser_Off.pngbin279 -> 476 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Facebook.pngbin365 -> 576 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Female.pngbin309 -> 489 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/ForSale_Badge.pngbin5727 -> 5896 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/ForwardArrow_Off.pngbin220 -> 424 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/ForwardArrow_Press.pngbin220 -> 424 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Generic_Group.pngbin1523 -> 2683 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Generic_Group_Large.pngbin5274 -> 2772 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Generic_Object_Small.pngbin410 -> 502 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Generic_Person.pngbin481 -> 544 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Generic_Person_Large.pngbin51508 -> 2510 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Hierarchy_View_Disabled.pngbin178 -> 401 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Hierarchy_View_On.pngbin306 -> 356 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Icon_Attachment_Large.pngbin4182 -> 1436 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Icon_Attachment_Small.pngbin3774 -> 1383 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Icon_For_Sale.pngbin572 -> 729 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Icon_Notification_Condense.pngbin262 -> 465 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Icon_Notification_Expand.pngbin239 -> 427 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Info.pngbin351 -> 535 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Info_Over.pngbin376 -> 520 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Info_Small.pngbin371 -> 478 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Alpha.pngbin319 -> 494 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Animation.pngbin496 -> 708 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_BodyShape.pngbin641 -> 828 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_CallingCard.pngbin295 -> 462 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Clothing.pngbin253 -> 463 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Eye.pngbin491 -> 654 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_FolderClosed.pngbin219 -> 441 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_FolderOpen.pngbin361 -> 614 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Gesture.pngbin408 -> 615 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Gloves.pngbin366 -> 582 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Hair.pngbin377 -> 551 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Invalid.pngbin329 -> 539 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Jacket.pngbin591 -> 893 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Landmark.pngbin582 -> 965 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Link.pngbin317 -> 367 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_LinkFolder.pngbin296 -> 508 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_LinkItem.pngbin296 -> 508 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_LookFolderClosed.pngbin391 -> 538 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_LookFolderOpen.pngbin538 -> 697 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_LostClosed.pngbin526 -> 495 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_LostOpen.pngbin708 -> 745 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Material.pngbin684 -> 1008 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Mesh.pngbin751 -> 977 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Notecard.pngbin222 -> 414 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Object.pngbin333 -> 575 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Object_Multi.pngbin774 -> 976 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Pants.pngbin377 -> 611 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Physics.pngbin539 -> 758 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Script.pngbin469 -> 551 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Settings.pngbin925 -> 1623 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_SettingsDay.pngbin925 -> 1812 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_SettingsSky.pngbin883 -> 1811 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_SettingsWater.pngbin764 -> 1621 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Shirt.pngbin402 -> 612 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Shoe.pngbin54133 -> 3875 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Skin.pngbin393 -> 627 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Skirt.pngbin494 -> 702 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Snapshot.pngbin535 -> 722 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Socks.pngbin358 -> 565 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Sound.pngbin404 -> 584 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_StockFolderClosed.pngbin1143 -> 1120 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_StockFolderOpen.pngbin1319 -> 1282 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_SysClosed.pngbin643 -> 656 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_SysOpen.pngbin734 -> 766 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Tattoo.pngbin416 -> 559 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Texture.pngbin157 -> 379 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Toolbar_SearchVisibility.pngbin756 -> 722 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_TrashClosed.pngbin465 -> 480 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_TrashOpen.pngbin457 -> 479 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Underpants.pngbin418 -> 577 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Undershirt.pngbin208 -> 423 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Universal.pngbin1189 -> 1081 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_UnknownObject.pngbin1048 -> 1752 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_VersionFolderClosed.pngbin1132 -> 1120 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_VersionFolderOpen.pngbin1521 -> 1438 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/List_View_Disabled.pngbin158 -> 374 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/List_View_On.pngbin160 -> 379 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Lock.pngbin343 -> 577 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Locked_Icon.pngbin306 -> 471 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Male.pngbin302 -> 494 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Microphone_On.pngbin340 -> 520 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/MinusItem_Disabled.pngbin173 -> 370 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/MinusItem_Off.pngbin178 -> 377 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/MinusItem_Press.pngbin172 -> 373 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OptionsMenu_Disabled.pngbin343 -> 520 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OptionsMenu_Off.pngbin336 -> 523 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OptionsMenu_Press.pngbin318 -> 506 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Disabled.pngbin1848 -> 2032 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Off.pngbin1835 -> 2063 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_On.pngbin1851 -> 1977 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_On_Over.pngbin1863 -> 1963 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Over.pngbin1826 -> 2048 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Press.pngbin1891 -> 2196 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Progress_1.pngbin1848 -> 2041 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Progress_2.pngbin1807 -> 1977 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Progress_3.pngbin1819 -> 2036 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Progress_4.pngbin1894 -> 2128 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Progress_5.pngbin1921 -> 2197 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Progress_6.pngbin1853 -> 2077 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Selected.pngbin1894 -> 2074 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Selected_Disabled.pngbin1840 -> 2084 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Selected_Over.pngbin1870 -> 1963 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_Selected_Press.pngbin1912 -> 2122 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_BuildNo_Dark.pngbin516 -> 721 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_BuildNo_Light.pngbin505 -> 730 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_Build_Dark.pngbin343 -> 527 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_DamageNo_Dark.pngbin457 -> 636 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_Damage_Dark.pngbin325 -> 511 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_Exp_Color.pngbin272 -> 460 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_FlyNo_Dark.pngbin681 -> 943 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_FlyNo_Light.pngbin696 -> 934 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_Fly_Dark.pngbin474 -> 524 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_ForSale_Light.pngbin561 -> 652 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_Health_Dark.pngbin285 -> 600 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_M_Dark.pngbin348 -> 490 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_M_Light.pngbin335 -> 488 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_PG_Dark.pngbin400 -> 495 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_PG_Light.pngbin403 -> 492 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_PushNo_Dark.pngbin523 -> 683 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_PushNo_Light.pngbin516 -> 654 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_Push_Dark.pngbin430 -> 596 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_R_Dark.pngbin357 -> 490 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_R_Light.pngbin355 -> 487 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_ScriptsNo_Dark.pngbin620 -> 723 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_Scripts_Dark.pngbin471 -> 553 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_SeeAVsOff_Dark.pngbin680 -> 660 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_SeeAVsOff_Light.pngbin680 -> 655 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_SeeAVsOn_Dark.pngbin452 -> 502 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_SeeAVsOn_Light.pngbin453 -> 503 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_VoiceNo_Dark.pngbin492 -> 710 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_VoiceNo_Light.pngbin516 -> 710 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_Voice_Dark.pngbin380 -> 550 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_Voice_Light.pngbin405 -> 599 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Pathfinding_Dirty.pngbin553 -> 713 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Pathfinding_Disabled.pngbin384 -> 579 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Pause_Off.pngbin163 -> 385 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Pause_Over.pngbin160 -> 380 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Pause_Press.pngbin156 -> 376 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Person_Check.pngbin925 -> 855 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Person_Star.pngbin739 -> 690 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Play_Off.pngbin293 -> 451 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Play_Over.pngbin258 -> 443 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Play_Press.pngbin287 -> 448 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Presets_Icon.pngbin1293 -> 1069 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Presets_Icon_Graphic.pngbin366 -> 535 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Profile_Friend_Offline.pngbin208 -> 420 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Profile_Friend_Online.pngbin189 -> 433 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Profile_Perm_Find_Disabled.pngbin1608 -> 1008 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Profile_Perm_Find_Enabled.pngbin1287 -> 1051 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Profile_Perm_Objects_Disabled.pngbin1356 -> 888 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Profile_Perm_Objects_Enabled.pngbin1137 -> 949 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Profile_Perm_Online_Disabled.pngbin1312 -> 897 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Profile_Perm_Online_Enabled.pngbin1150 -> 939 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_1.pngbin470 -> 678 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_10.pngbin461 -> 671 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_11.pngbin475 -> 674 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_12.pngbin455 -> 685 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_2.pngbin453 -> 675 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_3.pngbin454 -> 679 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_4.pngbin454 -> 673 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_5.pngbin468 -> 671 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_6.pngbin462 -> 684 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_7.pngbin469 -> 674 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_8.pngbin454 -> 680 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_9.pngbin469 -> 680 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Refresh_Off.pngbin483 -> 624 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/SL_Logo.pngbin1484 -> 1515 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Search_Icon.pngbin552 -> 628 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Shirt_Large.pngbin471 -> 641 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Shop.pngbin473 -> 523 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/SkipBackward_Off.pngbin293 -> 477 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/SkipForward_Off.pngbin304 -> 469 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/StopReload_Off.pngbin533 -> 639 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/StopReload_Over.pngbin529 -> 626 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Stop_Off.pngbin148 -> 363 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Sync_Disabled.pngbin1187 -> 1089 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Sync_Enabled.pngbin1168 -> 1052 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Sync_Progress_1.pngbin1149 -> 1080 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Sync_Progress_2.pngbin1147 -> 1077 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Sync_Progress_3.pngbin1211 -> 1114 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Sync_Progress_4.pngbin1205 -> 1108 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Sync_Progress_5.pngbin1137 -> 1070 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Sync_Progress_6.pngbin1164 -> 1095 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/System_Notification_Large.pngbin1804 -> 1170 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/System_Notification_Small.pngbin661 -> 593 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/TrashItem_Disabled.pngbin196 -> 416 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/TrashItem_Off.pngbin201 -> 415 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/TrashItem_Press.pngbin201 -> 407 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/UnZoom_Off.pngbin423 -> 587 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/UpArrow_Off.pngbin219 -> 428 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Video_URL_Off.pngbin282 -> 466 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/VoicePTT_Lvl1.pngbin557 -> 847 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/VoicePTT_Lvl2.pngbin663 -> 963 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/VoicePTT_Lvl3.pngbin607 -> 952 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/VoicePTT_Off.pngbin461 -> 583 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/VoicePTT_On.pngbin451 -> 669 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Web_Profile_Off.pngbin410 -> 460 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/YouAreHere_Badge.pngbin6143 -> 6385 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Zoom_Off.pngbin435 -> 598 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/add_icon.pngbin3386 -> 727 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/back_arrow_off.pngbin1261 -> 1223 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/back_arrow_over.pngbin1277 -> 1256 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/back_arrow_press.pngbin1329 -> 1417 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/check_mark.pngbin1044 -> 1227 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/collapse_to_one_line.pngbin538 -> 621 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/copy_clipboard.pngbin3443 -> 831 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/delete_icon.pngbin3570 -> 829 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/edit_mine.pngbin639 -> 896 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/edit_theirs.pngbin634 -> 902 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/emoji_picker_icon.pngbin921 -> 787 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/expand_one_liner.pngbin545 -> 627 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/file_upload.pngbin3191 -> 660 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/hand.pngbin957 -> 1183 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/map_placeholder.pngbin7694 -> 8718 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/multi_folder_mode.pngbin2786 -> 349 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/nearby_chat_icon.pngbin399 -> 586 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/object_icon.pngbin410 -> 502 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/paste_clipboard.pngbin3412 -> 828 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/pop_up_caution.pngbin642 -> 765 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/profile_badge_beta.pngbin3223 -> 664 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/profile_badge_beta_lifetime.pngbin3221 -> 661 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/profile_badge_lifetime.pngbin3302 -> 816 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/profile_badge_linden.pngbin3521 -> 1101 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/profile_badge_pplus_lifetime.pngbin3311 -> 800 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/profile_badge_premium_lifetime.pngbin3301 -> 797 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/profile_group_visibility_eye_off.pngbin507 -> 656 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/profile_group_visibility_eye_off_pressed.pngbin639 -> 656 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/profile_group_visibility_eye_on.pngbin485 -> 616 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/profile_group_visibility_eye_on_pressed.pngbin609 -> 646 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/remove_icon.pngbin3446 -> 741 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/see_me_online.pngbin330 -> 645 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/see_on_map.pngbin613 -> 950 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/single_folder_back.pngbin3276 -> 643 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/single_folder_forward.pngbin3260 -> 644 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/single_folder_mode.pngbin2780 -> 356 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/single_folder_up.pngbin3118 -> 581 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/snapshot_icon.pngbin3341 -> 737 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/texture_icon.pngbin2812 -> 385 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/thumbnail_fallback_icon.pngbin6162 -> 2220 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/unknown_icon.pngbin884 -> 1177 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Arrow_Down.pngbin467 -> 517 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Arrow_Left.pngbin311 -> 485 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Arrow_Right.pngbin313 -> 487 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Arrow_Small_Left.pngbin223 -> 414 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Arrow_Small_Right.pngbin217 -> 414 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Arrow_Small_Up.pngbin382 -> 493 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Arrow_Up.pngbin363 -> 528 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Badge_Background.pngbin1352 -> 1266 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Badge_Border.pngbin1565 -> 1392 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Disabled.pngbin801 -> 851 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Off.pngbin1873 -> 1563 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Over.pngbin1828 -> 1600 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Press.pngbin1851 -> 1809 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Disabled.pngbin746 -> 796 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Off.pngbin1726 -> 1449 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Over.pngbin1696 -> 1478 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Press.pngbin1767 -> 1697 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Disabled.pngbin538 -> 588 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Off.pngbin1388 -> 1267 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Over.pngbin1410 -> 1305 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Press.pngbin1477 -> 1475 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Checkbox_Disabled.pngbin306 -> 470 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Checkbox_Off.pngbin322 -> 480 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Checkbox_On.pngbin577 -> 635 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Checkbox_On_Disabled.pngbin558 -> 621 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Checkbox_On_Press.pngbin612 -> 647 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Checkbox_Press.pngbin373 -> 515 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ComboButton_Disabled.pngbin450 -> 575 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ComboButton_Hover.pngbin459 -> 552 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ComboButton_Off.pngbin470 -> 583 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ComboButton_On.pngbin486 -> 843 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ComboButton_Selected.pngbin539 -> 630 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ComboButton_UpOff.pngbin466 -> 553 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ComboButton_UpSelected.pngbin536 -> 603 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/DisclosureArrow_Opened_Off.pngbin173 -> 392 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/DropDown_Disabled.pngbin600 -> 669 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/DropDown_Off.pngbin603 -> 678 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/DropDown_On.pngbin638 -> 869 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/DropDown_Press.pngbin679 -> 702 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/DropTarget.pngbin479 -> 604 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Error_Tag_Background.pngbin1354 -> 1317 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Linden_Dollar_Alert.pngbin66186 -> 66143 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Linden_Dollar_Background.pngbin56298 -> 56654 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ListItem_Over.pngbin244 -> 443 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ListItem_Select.pngbin251 -> 460 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/MarketplaceBtn_Off.pngbin1067 -> 911 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/MarketplaceBtn_Selected.pngbin1086 -> 912 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Marketplace_Dropzone_Background.pngbin459 -> 639 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/New_Tag_Background.pngbin957 -> 948 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/New_Tag_Border.pngbin969 -> 963 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ProgressBar.pngbin316 -> 414 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ProgressBarSolid.pngbin208 -> 378 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ProgressTrack.pngbin192 -> 399 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/PushButton_Disabled.pngbin461 -> 569 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/PushButton_Login.pngbin1485 -> 1437 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/PushButton_Login_Over.pngbin1568 -> 1516 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/PushButton_Login_Pressed.pngbin1569 -> 1493 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/PushButton_Off.pngbin464 -> 579 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/PushButton_On.pngbin490 -> 835 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/PushButton_On_Selected.pngbin572 -> 998 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/PushButton_Over.pngbin457 -> 589 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/PushButton_Press.pngbin520 -> 614 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/PushButton_Selected.pngbin520 -> 614 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/PushButton_Selected_Disabled.pngbin490 -> 835 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/PushButton_Selected_Press.pngbin572 -> 998 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/RadioButton_Disabled.pngbin541 -> 606 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/RadioButton_Off.pngbin563 -> 628 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/RadioButton_On.pngbin627 -> 679 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/RadioButton_On_Disabled.pngbin605 -> 652 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/RadioButton_On_Press.pngbin641 -> 688 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/RadioButton_Press.pngbin589 -> 666 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollArrow_Down.pngbin239 -> 443 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollArrow_Down_Opaque.pngbin355 -> 470 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollArrow_Down_Over_Opaque.pngbin315 -> 445 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollArrow_Left.pngbin271 -> 454 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollArrow_Left_Opaque.pngbin311 -> 418 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollArrow_Left_Over_Opaque.pngbin330 -> 431 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollArrow_Right.pngbin260 -> 445 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollArrow_Right_Opaque.pngbin311 -> 420 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollArrow_Right_Over_Opaque.pngbin324 -> 429 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollArrow_Up.pngbin262 -> 465 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollArrow_Up_Opaque.pngbin352 -> 458 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollArrow_Up_Over_Opaque.pngbin329 -> 468 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz.pngbin364 -> 509 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollThumb_Vert.pngbin323 -> 494 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollTrack_Horiz.pngbin153 -> 364 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollTrack_Vert.pngbin150 -> 361 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Disabled.pngbin378 -> 513 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Off.pngbin386 -> 521 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Over.pngbin384 -> 527 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Press.pngbin455 -> 576 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected.pngbin455 -> 576 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Disabled.pngbin404 -> 812 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Over.pngbin394 -> 797 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Press.pngbin495 -> 920 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Disabled.pngbin277 -> 454 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected.pngbin359 -> 524 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Disabled.pngbin308 -> 613 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Press.pngbin393 -> 728 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Disabled.pngbin380 -> 525 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Off.pngbin391 -> 531 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Selected.pngbin502 -> 947 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Over.pngbin398 -> 539 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Press.pngbin459 -> 585 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected.pngbin459 -> 585 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Disabled.pngbin420 -> 811 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Press.pngbin502 -> 947 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SliderThumb_Disabled.pngbin429 -> 592 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SliderThumb_Off.pngbin475 -> 579 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SliderThumb_Press.pngbin470 -> 582 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SliderTrack_Horiz.pngbin225 -> 420 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SliderTrack_Vert.pngbin232 -> 417 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Stepper_Down_Off.pngbin300 -> 477 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Stepper_Down_Press.pngbin343 -> 502 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Stepper_Up_Off.pngbin315 -> 482 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Stepper_Up_Press.pngbin384 -> 521 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/TextField_Active.pngbin225 -> 435 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/TextField_Disabled.pngbin225 -> 436 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/TextField_Off.pngbin224 -> 434 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/TextField_Search_Active.pngbin923 -> 903 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/TextField_Search_Disabled.pngbin943 -> 886 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/TextField_Search_Highlight.pngbin16287 -> 3250 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/TextField_Search_Off.pngbin958 -> 901 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Tooltip.pngbin402 -> 404 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/bevel_background.pngbin365 -> 451 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/buy_off.pngbin399 -> 520 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/buy_over.pngbin415 -> 541 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/buy_press.pngbin461 -> 588 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/horizontal_drag_handle.pngbin217 -> 389 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/jump_left_in.pngbin342 -> 434 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/jump_left_out.pngbin321 -> 422 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/jump_right_in.pngbin320 -> 426 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/jump_right_out.pngbin315 -> 423 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/track_control_moon_back.pngbin913 -> 1767 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/track_control_moon_front.pngbin1156 -> 2060 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/track_control_rotate_bottom.pngbin874 -> 1125 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/track_control_rotate_bottom_active.pngbin362 -> 617 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/track_control_rotate_left_side.pngbin870 -> 1107 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/track_control_rotate_left_side_active.pngbin340 -> 561 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/track_control_rotate_right_side.pngbin879 -> 1121 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/track_control_rotate_right_side_active.pngbin358 -> 591 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/track_control_rotate_top.pngbin883 -> 1133 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/track_control_rotate_top_active.pngbin367 -> 627 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/track_control_sphere.pngbin6863 -> 7537 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/track_control_sun_back.pngbin856 -> 1626 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/track_control_sun_front.pngbin1053 -> 1911 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/vertical_drag_handle.pngbin238 -> 396 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Dragbar.pngbin348 -> 503 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Flyout_Left.pngbin271 -> 421 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Flyout_Pointer.pngbin236 -> 436 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Flyout_Right.pngbin280 -> 423 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Close_Foreground.pngbin352 -> 402 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Close_Press.pngbin263 -> 416 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Close_Toast.pngbin460 -> 579 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Dock_Foreground.pngbin263 -> 413 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Dock_Press.pngbin263 -> 428 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Gear.pngbin6229 -> 4355 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Gear_Background.pngbin370 -> 515 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Gear_Foreground.pngbin371 -> 516 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Gear_Press.pngbin365 -> 510 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Help_Foreground.pngbin451 -> 501 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Help_Press.pngbin451 -> 501 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Minimize_Foreground.pngbin301 -> 351 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Minimize_Press.pngbin301 -> 351 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Restore_Foreground.pngbin446 -> 450 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Restore_Press.pngbin406 -> 456 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Undock_Foreground.pngbin268 -> 415 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Inspector_Background.pngbin348 -> 462 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Inspector_Hover.pngbin414 -> 645 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Inspector_I.pngbin548 -> 547 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Resize_Corner.pngbin137 -> 358 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Toast_Background.pngbin349 -> 460 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Toast_CloseBtn.pngbin471 -> 579 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Toast_Over.pngbin400 -> 647 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Volume_Background.pngbin589 -> 674 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Wearables_Divider.pngbin97 -> 311 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Window_Background.pngbin509 -> 508 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Window_Foreground.pngbin508 -> 517 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Window_NoTitle_Background.pngbin289 -> 425 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Window_NoTitle_Foreground.pngbin290 -> 424 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/add_payment_image_center.pngbin31996 -> 32262 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/add_payment_image_left.pngbin30102 -> 30551 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/add_payment_image_right.pngbin29761 -> 30121 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/hint_arrow_down.pngbin573 -> 623 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/hint_arrow_left.pngbin482 -> 532 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/hint_arrow_lower_left.pngbin490 -> 540 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/hint_arrow_right.pngbin513 -> 563 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/hint_arrow_up.pngbin587 -> 637 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/hint_background.pngbin1532 -> 1582 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/login_sl_logo.pngbin5764 -> 6180 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/login_sl_logo_small.pngbin4802 -> 5204 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/startup_logo.pngbin2457 -> 3446 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/yellow_gradient.pngbin1125 -> 1733 bytes
-rw-r--r--indra/newview/skins/default/xui/de/floater_texture_fetch_debugger.xml77
-rw-r--r--indra/newview/skins/default/xui/de/panel_region_terrain.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_adjust_environment.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_change_item_thumbnail.xml20
-rw-r--r--indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml237
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml51
-rw-r--r--indra/newview/skins/default/xui/en/menu_gallery_inventory.xml228
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory_add.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_nearby_media.xml25
-rw-r--r--indra/newview/skins/default/xui/en/menu_object.xml48
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml111
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml122
-rw-r--r--indra/newview/skins/default/xui/en/panel_performance_nearby.xml41
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml64
-rw-r--r--indra/newview/skins/default/xui/en/panel_region_terrain.xml124
-rw-r--r--indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml4
-rw-r--r--indra/newview/skins/default/xui/es/floater_texture_fetch_debugger.xml77
-rw-r--r--indra/newview/skins/default/xui/es/panel_region_terrain.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/floater_texture_fetch_debugger.xml77
-rw-r--r--indra/newview/skins/default/xui/fr/panel_region_terrain.xml2
-rw-r--r--indra/newview/skins/default/xui/it/floater_texture_fetch_debugger.xml77
-rw-r--r--indra/newview/skins/default/xui/it/panel_region_terrain.xml2
-rw-r--r--indra/newview/skins/default/xui/ja/floater_outfit_photo_preview.xml18
-rw-r--r--indra/newview/skins/default/xui/ja/floater_simple_outfit_snapshot.xml7
-rw-r--r--indra/newview/skins/default/xui/ja/floater_texture_fetch_debugger.xml77
-rw-r--r--indra/newview/skins/default/xui/ja/panel_preferences_grids.xml21
-rw-r--r--indra/newview/skins/default/xui/ja/panel_region_terrain.xml2
-rw-r--r--indra/newview/skins/default/xui/pl/floater_outfit_photo_preview.xml13
-rw-r--r--indra/newview/skins/default/xui/pl/floater_simple_outfit_snapshot.xml6
-rw-r--r--indra/newview/skins/default/xui/pl/floater_texture_fetch_debugger.xml73
-rw-r--r--indra/newview/skins/default/xui/pl/panel_region_terrain.xml2
-rw-r--r--indra/newview/skins/default/xui/pt/floater_texture_fetch_debugger.xml77
-rw-r--r--indra/newview/skins/default/xui/pt/panel_region_terrain.xml2
-rw-r--r--indra/newview/skins/default/xui/ru/floater_texture_fetch_debugger.xml77
-rw-r--r--indra/newview/skins/default/xui/ru/panel_region_terrain.xml2
-rw-r--r--indra/newview/skins/default/xui/tr/floater_texture_fetch_debugger.xml77
-rw-r--r--indra/newview/skins/default/xui/tr/panel_region_terrain.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/floater_texture_fetch_debugger.xml77
-rw-r--r--indra/newview/skins/default/xui/zh/panel_region_terrain.xml2
-rw-r--r--indra/newview/tests/llagentaccess_test.cpp4
-rw-r--r--indra/newview/tests/lllogininstance_test.cpp28
-rw-r--r--indra/newview/tests/llsecapi_test.cpp10
-rw-r--r--indra/newview/tests/llsechandler_basic_test.cpp8
-rw-r--r--indra/newview/tests/llslurl_test.cpp10
-rw-r--r--indra/newview/tests/llviewerassetstats_test.cpp2
-rw-r--r--indra/newview/tests/llviewercontrollistener_test.cpp4
-rw-r--r--indra/newview/tests/llviewerhelputil_test.cpp6
-rw-r--r--indra/newview/tests/llviewernetwork_test.cpp10
-rw-r--r--indra/newview/tests/llworldmap_test.cpp2
-rw-r--r--indra/newview/tests/llworldmipmap_test.cpp4
-rwxr-xr-xindra/newview/viewer_manifest.py39
1555 files changed, 29436 insertions, 22734 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index a6ae041935..213b2e32b7 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -16,11 +16,9 @@ include(CubemapToEquirectangularJS)
include(DBusGlib)
include(DragDrop)
include(EXPAT)
-include(FMODSTUDIO)
include(Hunspell)
include(ICU4C)
include(JPEGEncoderBasic)
-include(JsonCpp)
include(LLAppearance)
include(LLAudio)
include(LLCA)
@@ -38,6 +36,7 @@ include(OpenGL)
include(OpenSSL)
include(PNG)
include(TemplateCheck)
+include(TinyEXR)
include(ThreeJS)
include(Tracy)
include(UI)
@@ -72,8 +71,12 @@ if (NOT HAVOK_TPV)
endif()
endif (NOT HAVOK_TPV)
-
set(viewer_SOURCE_FILES
+ gltfscenemanager.cpp
+ gltf/asset.cpp
+ gltf/accessor.cpp
+ gltf/primitive.cpp
+ gltf/animation.cpp
groupchatlistener.cpp
llaccountingcostmanager.cpp
llaisapi.cpp
@@ -106,7 +109,6 @@ set(viewer_SOURCE_FILES
llblockedlistitem.cpp
llblocklist.cpp
llbox.cpp
- llbreadcrumbview.cpp
llbrowsernotification.cpp
llbuycurrencyhtml.cpp
llcallingcard.cpp
@@ -313,6 +315,7 @@ set(viewer_SOURCE_FILES
llgiveinventory.cpp
llglsandbox.cpp
llgltfmateriallist.cpp
+ llgltfmaterialpreviewmgr.cpp
llgroupactions.cpp
llgroupiconctrl.cpp
llgrouplist.cpp
@@ -361,7 +364,6 @@ set(viewer_SOURCE_FILES
lllandmarkactions.cpp
lllandmarklist.cpp
lllegacyatmospherics.cpp
- lllistbrowser.cpp
lllistcontextmenu.cpp
lllistview.cpp
lllocalbitmaps.cpp
@@ -523,10 +525,10 @@ set(viewer_SOURCE_FILES
llrecentpeople.cpp
llreflectionmap.cpp
llreflectionmapmanager.cpp
+ llheroprobemanager.cpp
llregioninfomodel.cpp
llregionposition.cpp
llremoteparcelrequest.cpp
- llsavedsettingsglue.cpp
llsaveoutfitcombobtn.cpp
llscenemonitor.cpp
llsceneview.cpp
@@ -623,7 +625,6 @@ set(viewer_SOURCE_FILES
llurlhistory.cpp
llurllineeditorctrl.cpp
llurlwhitelist.cpp
- llvectorperfoptions.cpp
llversioninfo.cpp
llviewchildren.cpp
llviewerassetstats.cpp
@@ -726,7 +727,13 @@ set(VIEWER_BINARY_NAME "secondlife-bin" CACHE STRING
set(viewer_HEADER_FILES
CMakeLists.txt
ViewerInstall.cmake
+ gltfscenemanager.h
groupchatlistener.h
+ gltf/asset.h
+ gltf/accessor.h
+ gltf/buffer_util.h
+ gltf/primitive.h
+ gltf/animation.h
llaccountingcost.h
llaccountingcostmanager.h
llaisapi.h
@@ -760,7 +767,6 @@ set(viewer_HEADER_FILES
llblockedlistitem.h
llblocklist.h
llbox.h
- llbreadcrumbview.h
llbuycurrencyhtml.h
llcallingcard.h
llcapabilityprovider.h
@@ -969,6 +975,7 @@ set(viewer_HEADER_FILES
llgesturemgr.h
llgiveinventory.h
llgltfmateriallist.h
+ llgltfmaterialpreviewmgr.h
llgroupactions.h
llgroupiconctrl.h
llgrouplist.h
@@ -1016,7 +1023,6 @@ set(viewer_HEADER_FILES
lllandmarkactions.h
lllandmarklist.h
lllightconstants.h
- lllistbrowser.h
lllistcontextmenu.h
lllistview.h
lllocalbitmaps.h
@@ -1165,12 +1171,12 @@ set(viewer_HEADER_FILES
llrecentpeople.h
llreflectionmap.h
llreflectionmapmanager.h
+ llheroprobemanager.h
llregioninfomodel.h
llregionposition.h
llremoteparcelrequest.h
llresourcedata.h
llrootview.h
- llsavedsettingsglue.h
llsaveoutfitcombobtn.h
llscenemonitor.h
llsceneview.h
@@ -1271,7 +1277,6 @@ set(viewer_HEADER_FILES
llurlhistory.h
llurllineeditorctrl.h
llurlwhitelist.h
- llvectorperfoptions.h
llversioninfo.h
llviewchildren.h
llviewerassetstats.h
@@ -1363,7 +1368,6 @@ set(viewer_HEADER_FILES
llworldmapview.h
llxmlrpclistener.h
llxmlrpctransaction.h
- macmain.h
noise.h
pipeline.h
roles_constants.h
@@ -1412,7 +1416,6 @@ if (DARWIN)
# Add resource files to the project.
set(viewer_RESOURCE_FILES
secondlife.icns
- macview.r
Info-SecondLife.plist
SecondLife.xib/
# CMake doesn't seem to support Xcode language variants well just yet
@@ -1742,13 +1745,6 @@ if (WINDOWS)
)
endif (ADDRESS_SIZE EQUAL 64)
- if (TARGET ll::fmodstudio)
- list(APPEND COPY_INPUT_DEPENDENCIES
- ${SHARED_LIB_STAGING_DIR}/fmod.dll
- ${SHARED_LIB_STAGING_DIR}/fmodL.dll
- )
- endif ()
-
if (TARGET ll::openal)
list(APPEND COPY_INPUT_DEPENDENCIES
${SHARED_LIB_STAGING_DIR}/OpenAL32.dll
@@ -1765,7 +1761,6 @@ if (WINDOWS)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
- "--fmodstudio=${USE_FMODSTUDIO}"
"--openal=${USE_OPENAL}"
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=$<CONFIG>
@@ -1825,7 +1820,6 @@ if (WINDOWS)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
- "--fmodstudio=${USE_FMODSTUDIO}"
"--openal=${USE_OPENAL}"
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=$<CONFIG>
@@ -1975,7 +1969,6 @@ if (LINUX)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
- "--fmodstudio=${USE_FMODSTUDIO}"
"--openal=${USE_OPENAL}"
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=${CMAKE_BUILD_TYPE}
@@ -2003,7 +1996,6 @@ if (LINUX)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
- "--fmodstudio=${USE_FMODSTUDIO}"
"--openal=${USE_OPENAL}"
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=${CMAKE_BUILD_TYPE}
@@ -2081,7 +2073,6 @@ if (DARWIN)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
- "--fmodstudio=${USE_FMODSTUDIO}"
"--openal=${USE_OPENAL}"
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=$<CONFIG>
@@ -2116,7 +2107,6 @@ if (DARWIN)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
- "--fmodstudio=${USE_FMODSTUDIO}"
"--openal=${USE_OPENAL}"
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=$<CONFIG>
diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml
index 340334aee8..e16a5c7e76 100644
--- a/indra/newview/app_settings/cmd_line.xml
+++ b/indra/newview/app_settings/cmd_line.xml
@@ -209,12 +209,6 @@
<string>NoAudio</string>
</map>
- <key>nofmod</key>
- <map>
- <key>map-to</key>
- <string>UseMediaPluginsForStreamingAudio</string>
- </map>
-
<key>noninteractive</key>
<map>
<key>desc</key>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 2f7c256b49..af63d6ff87 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -7066,17 +7066,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>UseMediaPluginsForStreamingAudio</key>
- <map>
- <key>Comment</key>
- <string>Use media plugins (VLC) for streaming audio.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>NoHardwareProbe</key>
<map>
<key>Comment</key>
@@ -8732,7 +8721,7 @@
<key>OctreeAlphaDistanceFactor</key>
<map>
<key>Comment</key>
- <string>Multiplier on alpha object distance for determining octree node size </string>
+ <string>Multiplier on alpha object distance for determining octree node size. First two parameters are currently unused. Third parameter is distance at which to perform detailed alpha sorting.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -8741,7 +8730,7 @@
<array>
<real>0.1</real>
<real>0.0</real>
- <real>0.0</real>
+ <real>64.0</real>
</array>
</map>
@@ -8817,17 +8806,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>AlwaysRenderFriends</key>
- <map>
- <key>Comment</key>
- <string>Always render friends regardless of max complexity</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>RenderAvatar</key>
<map>
<key>Comment</key>
@@ -8861,17 +8839,6 @@
<key>Value</key>
<real>32.0</real>
</map>
- <key>RenderCloudShadowAmbianceFactor</key>
- <map>
- <key>Comment</key>
- <string>Amount that cloud shadow (aka cloud coverage) contributes to reflection probe ambiance</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>0.1</real>
- </map>
<key>RenderCPUBasis</key>
<map>
<key>Comment</key>
@@ -9011,7 +8978,7 @@
<key>RenderHiDPI</key>
<map>
<key>Comment</key>
- <string>Enable support for HiDPI displays, like Retina (MacOS X ONLY, requires restart)</string>
+ <string>Enable support for HiDPI displays, like Retina (macOS ONLY, requires restart)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -9186,6 +9153,17 @@
<real>0.00</real>
</array>
</map>
+ <key>RenderMirrors</key>
+ <map>
+ <key>Comment</key>
+ <string>Renders realtime mirrors.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>RenderScreenSpaceReflections</key>
<map>
<key>Comment</key>
@@ -9296,6 +9274,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>RenderDesaturateIrradiance</key>
+ <map>
+ <key>Comment</key>
+ <string>Desaturate irradiance to remove blue tint</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>RenderDebugAlphaMask</key>
<map>
<key>Comment</key>
@@ -9362,6 +9351,50 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>RenderHDRIExposure</key>
+ <map>
+ <key>Comment</key>
+ <string>Exposure adjustment of HDRI when previewing an HDRI. Units are EV. Sane values would be -10 to 10.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>0.0</real>
+ </map>
+ <key>RenderHDRIRotation</key>
+ <map>
+ <key>Comment</key>
+ <string>Rotation (in degrees) of environment when previewing an HDRI.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>0.0</real>
+ </map>
+ <key>RenderHDRISplitScreen</key>
+ <map>
+ <key>Comment</key>
+ <string>What percentage of screen to render using HDRI vs EEP sky.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>1.0</real>
+ </map>
+ <key>RenderHDRIIrradianceOnly</key>
+ <map>
+ <key>Comment</key>
+ <string>Only use HDRI sky for irradiance map when RenderHDRISplitScreen is 0</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>RenderMaxOpenGLVersion</key>
<map>
<key>Comment</key>
@@ -9376,7 +9409,7 @@
<key>RenderMaxVRAMBudget</key>
<map>
<key>Comment</key>
- <string>Maximum amount of texture memory to budget for (in MB), or 0 for autodetect. Requires restart.</string>
+ <string>Maximum amount of texture memory to budget for (in MB), or 0 for autodetect.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -9395,6 +9428,17 @@
<key>Value</key>
<integer>16</integer>
</map>
+ <key>RenderMaxTextureResolution</key>
+ <map>
+ <key>Comment</key>
+ <string>Maximum texture resolution to download for non-boosted textures.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>2048</integer>
+ </map>
<key>RenderDebugTextureBind</key>
<map>
<key>Comment</key>
@@ -10368,6 +10412,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>NameTagDebugAVRezState</key>
+ <map>
+ <key>Comment</key>
+ <string>Show Avatar Rez state in name tag</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>RenderInitError</key>
<map>
<key>Comment</key>
@@ -10390,6 +10445,50 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>RenderHeroProbeResolution</key>
+ <map>
+ <key>Comment</key>
+ <string>Resolution to render hero probes used for mirrors, water, etc.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>1024</integer>
+ </map>
+ <key>RenderHeroProbeDistance</key>
+ <map>
+ <key>Comment</key>
+ <string>Distance in meters for hero probes to render out to.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>8</real>
+ </map>
+ <key>RenderHeroProbeUpdateRate</key>
+ <map>
+ <key>Comment</key>
+ <string>How many frames to wait for until it's time to render the probe. E.g., every other frame (1), every two frames (2), every three frames (3) etc.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>2</integer>
+ </map>
+ <key>RenderHeroProbeConservativeUpdateMultiplier</key>
+ <map>
+ <key>Comment</key>
+ <string>How many probe updates to wait until it's time to update faces that are not directly facing the camera. Acts as a multiplier. E.g., frames to the periphery of the camera updating once every 3 updates, vs ones directly facing the camera updating every update.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>16</integer>
+ </map>
<key>RenderReflectionProbeVolumes</key>
<map>
<key>Comment</key>
@@ -10602,38 +10701,49 @@
<integer>3</integer>
</map>
<key>RenderReflectionRes</key>
- <map>
- <key>Comment</key>
- <string>Reflection map resolution.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>64</integer>
- </map>
- <key>RenderResolutionDivisor</key>
- <map>
- <key>Comment</key>
- <string>Divisor for rendering 3D scene at reduced resolution.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>U32</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>RenderShaderLightingMaxLevel</key>
- <map>
- <key>Comment</key>
- <string>Max lighting level to use in the shader (class 3 is default, 2 is less lights, 1 is sun/moon only. Works around shader compiler bugs on certain platforms.)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>3</integer>
- </map>
+ <map>
+ <key>Comment</key>
+ <string>Reflection map resolution.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>64</integer>
+ </map>
+ <key>RenderReservedTextureIndices</key>
+ <map>
+ <key>Comment</key>
+ <string>Count of texture indices to reserve for shadow and reflection maps when using indexed texture rendering. Probably only want to set from the login screen.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>14</integer>
+ </map>
+ <key>RenderResolutionDivisor</key>
+ <map>
+ <key>Comment</key>
+ <string>Divisor for rendering 3D scene at reduced resolution.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
+ <key>RenderShaderLightingMaxLevel</key>
+ <map>
+ <key>Comment</key>
+ <string>Max lighting level to use in the shader (class 3 is default, 2 is less lights, 1 is sun/moon only. Works around shader compiler bugs on certain platforms.)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>3</integer>
+ </map>
<key>RenderSkyAutoAdjustLegacy</key>
<map>
<key>Comment</key>
@@ -10756,6 +10866,17 @@
<key>Value</key>
<real>0.5</real>
</map>
+ <key>RenderDiffuseLuminanceScale</key>
+ <map>
+ <key>Comment</key>
+ <string>Luminance adjustment for diffuse surfaces to aid auto-exposure behavior</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>0.5</real>
+ </map>
<key>RenderShaderLODThreshold</key>
<map>
<key>Comment</key>
@@ -10814,7 +10935,7 @@
<key>RenderTerrainScale</key>
<map>
<key>Comment</key>
- <string>Terrain detail texture scale</string>
+ <string>Terrain detail texture scale (meters)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -10822,6 +10943,83 @@
<key>Value</key>
<real>12.0</real>
</map>
+ <key>RenderTerrainPBREnabled</key>
+ <map>
+ <key>Comment</key>
+ <string>EXPERIMENTAL: Enable PBR Terrain features.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>RenderTerrainPBRForce</key>
+ <map>
+ <key>Comment</key>
+ <string>Force-load PBR terrain if enabled</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>RenderTerrainPBRDetail</key>
+ <map>
+ <key>Comment</key>
+ <string>Detail level for PBR terrain. 0 is full detail. Negative values drop rendering features, in accordance with the GLTF specification when possible, which reduces the number of texture binds.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>RenderTerrainPBRScale</key>
+ <map>
+ <key>Comment</key>
+ <string>PBR terrain detail texture scale (meters)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>8.0</real>
+ </map>
+ <key>RenderTerrainPBRPlanarSampleCount</key>
+ <map>
+ <key>Comment</key>
+ <string>How many UV planes to sample PBR terrain textures from. 1 is "flat", 3 is triplanar mapping (aka box mapping)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <real>3</real>
+ </map>
+ <key>RenderTerrainPBRTriplanarBlendFactor</key>
+ <map>
+ <key>Comment</key>
+ <string>Higher values create sharper transitions, but are more likely to produce artifacts.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>8.0</real>
+ </map>
+ <key>RenderTerrainPBRNormalsEnabled</key>
+ <map>
+ <key>Comment</key>
+ <string>EXPERIMENTAL: Change normal gen for PBR Terrain.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>RenderTrackerBeacon</key>
<map>
<key>Comment</key>
@@ -10921,16 +11119,16 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>RenderUseImpostors</key>
+ <key>RenderAvatarComplexityMode</key>
<map>
- <key>Comment</key>
- <string>OBSOLETE and UNUSED. See RenderAvatarMaxNonImpostors and RenderAvatarMaxComplexity.</string>
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
+ <key>Comment</key>
+ <string>0 - complexity limit applies to everyone, 1 - always show friends, 2 - only show friends</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <real>0</real>
</map>
<key>RenderAvatarMaxNonImpostors</key>
<map>
@@ -13065,6 +13263,28 @@
<key>Value</key>
<string />
</map>
+ <key>TextureScaleMinAreaFactor</key>
+ <map>
+ <key>Comment</key>
+ <string>Limits how texture scale affects area calculation.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>0.04</real>
+ </map>
+ <key>TextureScaleMaxAreaFactor</key>
+ <map>
+ <key>Comment</key>
+ <string>Limits how texture scale affects area calculation.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>25.0</real>
+ </map>
<key>ThreadPoolSizes</key>
<map>
<key>Comment</key>
@@ -13752,6 +13972,17 @@
<key>Value</key>
<integer>2</integer>
</map>
+ <key>UIPreviewMaterial</key>
+ <map>
+ <key>Comment</key>
+ <string>Whether or not PBR material swatch is enabled</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <real>0</real>
+ </map>
<key>UIResizeBarHeight</key>
<map>
<key>Comment</key>
@@ -15667,7 +15898,7 @@
<key>Type</key>
<string>S32</string>
<key>Value</key>
- <integer>2048</integer>
+ <integer>1024</integer>
</map>
<key>max_texture_dimension_Y</key>
<map>
@@ -15678,7 +15909,7 @@
<key>Type</key>
<string>S32</string>
<key>Value</key>
- <integer>2048</integer>
+ <integer>1024</integer>
</map>
<!-- End of back compatibility settings -->
<key>teleport_offer_invitation_max_length</key>
@@ -16554,6 +16785,50 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>LocalTerrainAsset1</key>
+ <map>
+ <key>Comment</key>
+ <string>If set to a non-null UUID, overrides the terrain asset locally for all regions with material assets. Local terrain assets are not visible to others. Please keep in mind that this debug setting may be temporary. Do not rely on this setting existing in future viewer builds.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string>00000000-0000-0000-0000-000000000000</string>
+ </map>
+ <key>LocalTerrainAsset2</key>
+ <map>
+ <key>Comment</key>
+ <string>If set to a non-null UUID, overrides the terrain asset locally for all regions with material assets. Local terrain assets are not visible to others. Please keep in mind that this debug setting may be temporary. Do not rely on this setting existing in future viewer builds.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string>00000000-0000-0000-0000-000000000000</string>
+ </map>
+ <key>LocalTerrainAsset3</key>
+ <map>
+ <key>Comment</key>
+ <string>If set to a non-null UUID, overrides the terrain asset locally for all regions with material assets. Local terrain assets are not visible to others. Please keep in mind that this debug setting may be temporary. Do not rely on this setting existing in future viewer builds.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string>00000000-0000-0000-0000-000000000000</string>
+ </map>
+ <key>LocalTerrainAsset4</key>
+ <map>
+ <key>Comment</key>
+ <string>If set to a non-null UUID, overrides the terrain asset locally for all regions with material assets. Local terrain assets are not visible to others. Please keep in mind that this debug setting may be temporary. Do not rely on this setting existing in future viewer builds.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string>00000000-0000-0000-0000-000000000000</string>
+ </map>
<key>PathfindingRetrieveNeighboringRegion</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarEyesV.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarEyesV.glsl
index 83b0ba096c..43863dd37a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarEyesV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarEyesV.glsl
@@ -26,6 +26,7 @@
uniform mat3 normal_matrix;
uniform mat4 texture_matrix0;
uniform mat4 modelview_projection_matrix;
+uniform mat4 modelview_matrix;
in vec3 position;
in vec3 normal;
@@ -35,10 +36,12 @@ in vec2 texcoord0;
out vec3 vary_normal;
out vec4 vertex_color;
out vec2 vary_texcoord0;
+out vec3 vary_position;
void main()
{
//transform vertex
+ vary_position = (modelview_matrix * vec4(position.xyz, 1.0)).xyz;
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl
index 6ebe4ce251..db7597dd74 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl
@@ -25,7 +25,7 @@
/*[EXTRA_CODE_HERE]*/
-out vec4 frag_data[3];
+out vec4 frag_data[4];
uniform sampler2D diffuseMap;
@@ -33,11 +33,14 @@ uniform float minimum_alpha;
in vec3 vary_normal;
in vec2 vary_texcoord0;
+in vec3 vary_position;
-vec2 encode_normal(vec3 n);
+void mirrorClip(vec3 pos);
void main()
{
+ mirrorClip(vary_position);
+
vec4 diff = texture(diffuseMap, vary_texcoord0.xy);
if (diff.a < minimum_alpha)
@@ -48,6 +51,7 @@ void main()
frag_data[0] = vec4(diff.rgb, 0.0);
frag_data[1] = vec4(0,0,0,0);
vec3 nvn = normalize(vary_normal);
- frag_data[2] = vec4(encode_normal(nvn.xyz), 0.0, GBUFFER_FLAG_HAS_ATMOS);
+ frag_data[2] = vec4(nvn.xyz, GBUFFER_FLAG_HAS_ATMOS);
+ frag_data[3] = vec4(0);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl
index bc0c11ec46..5cc2846156 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl
@@ -35,6 +35,7 @@ in vec4 weight;
out vec3 vary_normal;
out vec2 vary_texcoord0;
+out vec3 vary_position;
void main()
{
@@ -57,6 +58,7 @@ void main()
vary_normal = norm;
+ vary_position = pos.xyz;
gl_Position = projection_matrix * pos;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl
index 08baf98686..8627ab1852 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl
@@ -40,12 +40,12 @@ uniform float kern_scale;
in vec2 vary_fragcoord;
vec4 getPosition(vec2 pos_screen);
-vec3 getNorm(vec2 pos_screen);
+vec4 getNorm(vec2 pos_screen);
void main()
{
vec2 tc = vary_fragcoord.xy;
- vec3 norm = getNorm(tc);
+ vec4 norm = getNorm(tc);
vec3 pos = getPosition(tc).xyz;
vec4 ccol = texture(lightMap, tc).rgba;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl b/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl
index 35f483f633..8483f257fa 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl
@@ -37,11 +37,13 @@ in vec3 vary_mat2;
in vec4 vertex_color;
in vec2 vary_texcoord0;
+in vec3 vary_position;
-vec2 encode_normal(vec3 n);
-
+void mirrorClip(vec3 pos);
void main()
{
+ mirrorClip(vary_position);
+
vec4 col = texture(diffuseMap, vary_texcoord0.xy);
if(col.a < minimum_alpha)
@@ -60,6 +62,6 @@ void main()
frag_data[1] = vertex_color.aaaa; // spec
//frag_data[1] = vec4(vec3(vertex_color.a), vertex_color.a+(1.0-vertex_color.a)*vertex_color.a); // spec - from former class3 - maybe better, but not so well tested
vec3 nvn = normalize(tnorm);
- frag_data[2] = vec4(encode_normal(nvn), vertex_color.a, GBUFFER_FLAG_HAS_ATMOS);
- frag_data[3] = vec4(0);
+ frag_data[2] = vec4(nvn, GBUFFER_FLAG_HAS_ATMOS);
+ frag_data[3] = vec4(vertex_color.a, 0, 0, 0);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl b/indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl
index 3af2eab1e4..74319349f6 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl
@@ -23,6 +23,7 @@
* $/LicenseInfo$
*/
+uniform mat4 modelview_matrix;
uniform mat3 normal_matrix;
uniform mat4 texture_matrix0;
uniform mat4 modelview_projection_matrix;
@@ -38,11 +39,11 @@ out vec3 vary_mat1;
out vec3 vary_mat2;
out vec4 vertex_color;
out vec2 vary_texcoord0;
+out vec3 vary_position;
#ifdef HAS_SKIN
mat4 getObjectSkinnedTransform();
uniform mat4 projection_matrix;
-uniform mat4 modelview_matrix;
#endif
void main()
@@ -52,11 +53,13 @@ void main()
mat4 mat = getObjectSkinnedTransform();
mat = modelview_matrix * mat;
vec3 pos = (mat*vec4(position.xyz, 1.0)).xyz;
+ vary_position = pos;
gl_Position = projection_matrix*vec4(pos, 1.0);
vec3 n = normalize((mat * vec4(normal.xyz+position.xyz, 1.0)).xyz-pos.xyz);
vec3 t = normalize((mat * vec4(tangent.xyz+position.xyz, 1.0)).xyz-pos.xyz);
#else
+ vary_position = (modelview_matrix*vec4(position.xyz, 1.0)).xyz;
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
vec3 n = normalize(normal_matrix * normal);
vec3 t = normalize(normal_matrix * tangent.xyz);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
index f9ebf33b4a..f6696e270c 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
@@ -50,6 +50,7 @@ SOFTWARE.
uniform sampler2D normalMap;
uniform sampler2D depthMap;
+uniform sampler2D emissiveRect;
uniform sampler2D projectionMap; // rgba
uniform sampler2D brdfLut;
@@ -140,40 +141,20 @@ vec2 getScreenCoordinate(vec2 screenpos)
return sc - vec2(1.0, 1.0);
}
-// See: https://aras-p.info/texts/CompactNormalStorage.html
-// Method #4: Spheremap Transform, Lambert Azimuthal Equal-Area projection
-vec3 getNorm(vec2 screenpos)
+vec4 getNorm(vec2 screenpos)
{
- vec2 enc = texture(normalMap, screenpos.xy).xy;
- vec2 fenc = enc*4-2;
- float f = dot(fenc,fenc);
- float g = sqrt(1-f/4);
- vec3 n;
- n.xy = fenc*g;
- n.z = 1-f/2;
- return n;
-}
-
-vec3 getNormalFromPacked(vec4 packedNormalEnvIntensityFlags)
-{
- vec2 enc = packedNormalEnvIntensityFlags.xy;
- vec2 fenc = enc*4-2;
- float f = dot(fenc,fenc);
- float g = sqrt(1-f/4);
- vec3 n;
- n.xy = fenc*g;
- n.z = 1-f/2;
- return normalize(n); // TODO: Is this normalize redundant?
+ return texture(normalMap, screenpos.xy);
}
// return packedNormalEnvIntensityFlags since GBUFFER_FLAG_HAS_PBR needs .w
// See: C++: addDeferredAttachments(), GLSL: softenLightF
vec4 getNormalEnvIntensityFlags(vec2 screenpos, out vec3 n, out float envIntensity)
{
- vec4 packedNormalEnvIntensityFlags = texture(normalMap, screenpos.xy);
- n = getNormalFromPacked( packedNormalEnvIntensityFlags );
- envIntensity = packedNormalEnvIntensityFlags.z;
- return packedNormalEnvIntensityFlags;
+ vec4 norm = texture(normalMap, screenpos.xy);
+ n = norm.xyz;
+ envIntensity = texture(emissiveRect, screenpos.xy).r;
+
+ return norm;
}
// get linear depth value given a depth buffer sample d and znear and zfar values
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl
index 6f3b94f734..82d5d363d2 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl
@@ -31,14 +31,18 @@ uniform float minimum_alpha;
uniform sampler2D diffuseMap;
+in vec3 vary_position;
+
in vec3 vary_normal;
in vec4 vertex_color;
in vec2 vary_texcoord0;
-vec2 encode_normal(vec3 n);
+void mirrorClip(vec3 pos);
void main()
{
+ mirrorClip(vary_position);
+
vec4 col = texture(diffuseMap, vary_texcoord0.xy) * vertex_color;
if (col.a < minimum_alpha)
@@ -49,7 +53,7 @@ void main()
frag_data[0] = vec4(col.rgb, 0.0);
frag_data[1] = vec4(0,0,0,0); // spec
vec3 nvn = normalize(vary_normal);
- frag_data[2] = vec4(encode_normal(nvn.xyz), 0.0, GBUFFER_FLAG_HAS_ATMOS);
+ frag_data[2] = vec4(nvn.xyz, GBUFFER_FLAG_HAS_ATMOS);
frag_data[3] = vec4(0);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl
index e5f2af2c53..788ea633fc 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl
@@ -28,16 +28,19 @@
out vec4 frag_data[4];
in vec3 vary_normal;
+in vec3 vary_position;
uniform float minimum_alpha;
in vec4 vertex_color;
in vec2 vary_texcoord0;
-vec2 encode_normal(vec3 n);
+void mirrorClip(vec3 pos);
void main()
{
+ mirrorClip(vary_position);
+
vec4 col = diffuseLookup(vary_texcoord0.xy) * vertex_color;
if (col.a < minimum_alpha)
@@ -48,6 +51,6 @@ void main()
frag_data[0] = vec4(col.rgb, 0.0);
frag_data[1] = vec4(0,0,0,0);
vec3 nvn = normalize(vary_normal);
- frag_data[2] = vec4(encode_normal(nvn.xyz), 0.0, GBUFFER_FLAG_HAS_ATMOS);
+ frag_data[2] = vec4(nvn.xyz, GBUFFER_FLAG_HAS_ATMOS);
frag_data[3] = vec4(0);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl
index 234f096ed5..22e6d60419 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl
@@ -34,8 +34,6 @@ uniform sampler2D diffuseMap;
in vec3 vary_normal;
in vec2 vary_texcoord0;
-vec2 encode_normal(vec3 n);
-
void main()
{
vec4 col = texture(diffuseMap, vary_texcoord0.xy);
@@ -48,7 +46,7 @@ void main()
frag_data[0] = vec4(col.rgb, 0.0);
frag_data[1] = vec4(0,0,0,0); // spec
vec3 nvn = normalize(vary_normal);
- frag_data[2] = vec4(encode_normal(nvn.xyz), 0.0, GBUFFER_FLAG_HAS_ATMOS);
+ frag_data[2] = vec4(nvn.xyz, GBUFFER_FLAG_HAS_ATMOS);
frag_data[3] = vec4(0);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl
index 68fb8bf499..799fc62a42 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl
@@ -32,17 +32,19 @@ uniform sampler2D diffuseMap;
in vec3 vary_normal;
in vec4 vertex_color;
in vec2 vary_texcoord0;
+in vec3 vary_position;
-vec2 encode_normal(vec3 n);
+void mirrorClip(vec3 pos);
void main()
{
+ mirrorClip(vary_position);
vec3 col = vertex_color.rgb * texture(diffuseMap, vary_texcoord0.xy).rgb;
frag_data[0] = vec4(col, 0.0);
frag_data[1] = vertex_color.aaaa; // spec
//frag_data[1] = vec4(vec3(vertex_color.a), vertex_color.a+(1.0-vertex_color.a)*vertex_color.a); // spec - from former class3 - maybe better, but not so well tested
vec3 nvn = normalize(vary_normal);
- frag_data[2] = vec4(encode_normal(nvn.xyz), vertex_color.a, GBUFFER_FLAG_HAS_ATMOS);
- frag_data[3] = vec4(0);
+ frag_data[2] = vec4(nvn.xyz, GBUFFER_FLAG_HAS_ATMOS);
+ frag_data[3] = vec4(vertex_color.a, 0, 0, 0);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl
index 93d561504e..3362a180c6 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl
@@ -30,12 +30,14 @@ out vec4 frag_data[4];
in vec3 vary_normal;
in vec4 vertex_color;
in vec2 vary_texcoord0;
+in vec3 vary_position;
-vec2 encode_normal(vec3 n);
+void mirrorClip(vec3 pos);
vec3 linear_to_srgb(vec3 c);
void main()
{
+ mirrorClip(vary_position);
vec3 col = vertex_color.rgb * diffuseLookup(vary_texcoord0.xy).rgb;
vec3 spec;
@@ -44,6 +46,6 @@ void main()
frag_data[0] = vec4(col, 0.0);
frag_data[1] = vec4(spec, vertex_color.a); // spec
vec3 nvn = normalize(vary_normal);
- frag_data[2] = vec4(encode_normal(nvn.xyz), vertex_color.a, GBUFFER_FLAG_HAS_ATMOS);
- frag_data[3] = vec4(0);
+ frag_data[2] = vec4(nvn.xyz, GBUFFER_FLAG_HAS_ATMOS);
+ frag_data[3] = vec4(vertex_color.a, 0, 0, 0);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl
index 2402cc3b70..64230dc680 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl
@@ -36,13 +36,16 @@ out vec3 vary_normal;
out vec4 vertex_color;
out vec2 vary_texcoord0;
+out vec3 vary_position;
void passTextureIndex();
+uniform mat4 modelview_matrix;
+
#ifdef HAS_SKIN
mat4 getObjectSkinnedTransform();
uniform mat4 projection_matrix;
-uniform mat4 modelview_matrix;
+
#endif
void main()
@@ -51,9 +54,11 @@ void main()
mat4 mat = getObjectSkinnedTransform();
mat = modelview_matrix * mat;
vec4 pos = mat * vec4(position.xyz, 1.0);
+ vary_position = pos.xyz;
gl_Position = projection_matrix * pos;
vary_normal = normalize((mat*vec4(normal.xyz+position.xyz,1.0)).xyz-pos.xyz);
#else
+ vary_position = (modelview_matrix * vec4(position.xyz, 1.0)).xyz;
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
vary_normal = normalize(normal_matrix * normal);
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl b/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl
index 9ac4ceb37e..eff7221ae7 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl
@@ -28,7 +28,9 @@
out vec4 frag_color;
uniform sampler2D emissiveRect;
+#ifdef USE_LAST_EXPOSURE
uniform sampler2D exposureMap;
+#endif
uniform float dt;
uniform vec2 noiseVec;
@@ -51,10 +53,12 @@ void main()
L /= max_L;
L = pow(L, 2.0);
float s = mix(dynamic_exposure_params.z, dynamic_exposure_params.y, L);
-
+
+#ifdef USE_LAST_EXPOSURE
float prev = texture(exposureMap, vec2(0.5,0.5)).r;
s = mix(prev, s, min(dt*2.0*abs(prev-s), 0.04));
+#endif
frag_color = max(vec4(s, s, s, dt), vec4(0.0));
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
index a6fab10791..52dfed06ae 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
@@ -50,9 +50,11 @@ void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, ou
vec4 applySkyAndWaterFog(vec3 pos, vec3 additive, vec3 atten, vec4 color);
#endif
+void mirrorClip(vec3 pos);
+
void main()
{
-
+ mirrorClip(vary_position);
#ifdef IS_ALPHA
waterClip(vary_position.xyz);
#endif
diff --git a/indra/newview/macmain.h b/indra/newview/app_settings/shaders/class1/deferred/globalF.glsl
index 11c909a8c3..7e3e7d9271 100644
--- a/indra/newview/macmain.h
+++ b/indra/newview/app_settings/shaders/class1/deferred/globalF.glsl
@@ -1,10 +1,9 @@
/**
- * @file macmain.h
- * @brief Main Mac viewer defines
+ * @file class1/deferred/globalF.glsl
*
- * $LicenseInfo:firstyear=2003&license=viewerlgpl$
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
* Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
+ * Copyright (C) 2024, 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,21 +23,23 @@
* $/LicenseInfo$
*/
-/* main.h */
-#define rMenuBar 128 /* menu bar */
+ // Global helper functions included in every fragment shader
+ // DO NOT declare sampler uniforms here as OS X doesn't compile
+ // them out
-#define mApple 128 /* Apple menu */
-#define iAbout 1
+uniform float mirror_flag;
+uniform vec4 clipPlane;
+uniform float clipSign;
-#define mFile 129 /* File menu */
-#define iNew 1
-#define iClose 4
-#define iQuitSeparator 10
-#define iQuit 11
+void mirrorClip(vec3 pos)
+{
+ if (mirror_flag > 0)
+ {
+ if ((dot(pos.xyz, clipPlane.xyz) + clipPlane.w) < 0.0)
+ {
+ discard;
+ }
+ }
+}
-#define mEdit 130 /* Edit menu */
-
-#define kAboutBox 200 /* Dialog resource for About box */
-
-#define kSleepTime 32767
diff --git a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
index aae595f619..c64f65e32c 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
@@ -37,7 +37,6 @@ uniform sampler2D specularMap;
in vec2 vary_texcoord0;
vec3 linear_to_srgb(vec3 c);
-vec2 encode_normal (vec3 n);
void main()
{
@@ -53,6 +52,6 @@ void main()
frag_data[0] = vec4(col.rgb, 0.0);
frag_data[1] = spec;
- frag_data[2] = vec4(encode_normal(norm.xyz),0,GBUFFER_FLAG_HAS_ATMOS);
+ frag_data[2] = vec4(norm.xyz, GBUFFER_FLAG_HAS_ATMOS);
frag_data[3] = vec4(0);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl b/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl
index c8afacf9bb..95b2f80e06 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl
@@ -34,6 +34,8 @@ in vec2 vary_fragcoord;
uniform sampler2D diffuseRect;
uniform sampler2D emissiveRect;
+uniform sampler2D normalMap;
+uniform float diffuse_luminance_scale;
float lum(vec3 col)
{
@@ -45,7 +47,21 @@ void main()
{
vec2 tc = vary_fragcoord*0.6+0.2;
tc.y -= 0.1; // HACK - nudge exposure sample down a little bit to favor ground over sky
- vec3 c = texture(diffuseRect, tc).rgb + texture(emissiveRect, tc).rgb;
+ vec3 c = texture(diffuseRect, tc).rgb;
+
+ vec4 norm = texture(normalMap, tc);
+
+ if (!GET_GBUFFER_FLAG(GBUFFER_FLAG_HAS_HDRI) &&
+ !GET_GBUFFER_FLAG(GBUFFER_FLAG_SKIP_ATMOS))
+ {
+ // Apply the diffuse luminance scale to objects but not the sky
+ // Prevents underexposing when looking at bright environments
+ // while still allowing for realistically bright skies.
+ c *= diffuse_luminance_scale;
+ }
+
+ c += texture(emissiveRect, tc).rgb;
+
float L = lum(c);
frag_color = vec4(max(L, 0.0));
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl
index 7cdddfe8db..ddf878ae60 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl
@@ -28,25 +28,18 @@
#define DIFFUSE_ALPHA_MODE_MASK 2
#define DIFFUSE_ALPHA_MODE_EMISSIVE 3
-#ifdef HAS_SKIN
uniform mat4 modelview_matrix;
uniform mat4 projection_matrix;
+uniform mat4 modelview_projection_matrix;
+
+#ifdef HAS_SKIN
mat4 getObjectSkinnedTransform();
#else
uniform mat3 normal_matrix;
-uniform mat4 modelview_projection_matrix;
-#endif
-
-#if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_BLEND)
-
-#if !defined(HAS_SKIN)
-uniform mat4 modelview_matrix;
#endif
out vec3 vary_position;
-#endif
-
uniform mat4 texture_matrix0;
in vec3 position;
@@ -85,9 +78,7 @@ void main()
vec3 pos = (mat*vec4(position.xyz,1.0)).xyz;
-#if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_BLEND)
vary_position = pos;
-#endif
gl_Position = projection_matrix*vec4(pos,1.0);
@@ -133,10 +124,8 @@ void main()
vertex_color = diffuse_color;
-#if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_BLEND)
#if !defined(HAS_SKIN)
vary_position = (modelview_matrix*vec4(position.xyz, 1.0)).xyz;
#endif
-#endif
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl b/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl
index 183354b9bd..6ef556d7e8 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl
@@ -55,7 +55,7 @@ void main()
frag_data[0] = vec4(0);
frag_data[1] = vec4(0.0);
- frag_data[2] = vec4(0.0, 0.0, 0.0, GBUFFER_FLAG_HAS_ATMOS);
+ frag_data[2] = vec4(0.0, 0.0, 0.0, GBUFFER_FLAG_SKIP_ATMOS);
frag_data[3] = vec4(c.rgb, c.a);
// Added and commented out for a ground truth. Do not uncomment - Geenz
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbropaqueF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbropaqueF.glsl
index faa273b834..1d5f810cf3 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/pbropaqueF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/pbropaqueF.glsl
@@ -54,14 +54,20 @@ in vec2 emissive_texcoord;
uniform float minimum_alpha; // PBR alphaMode: MASK, See: mAlphaCutoff, setAlphaCutoff()
-vec2 encode_normal(vec3 n);
vec3 linear_to_srgb(vec3 c);
vec3 srgb_to_linear(vec3 c);
+uniform vec4 clipPlane;
+uniform float clipSign;
+
+void mirrorClip(vec3 pos);
+
uniform mat3 normal_matrix;
void main()
{
+ mirrorClip(vary_position);
+
vec4 basecolor = texture(diffuseMap, base_color_texcoord.xy).rgba;
if (basecolor.a < minimum_alpha)
{
@@ -103,7 +109,7 @@ void main()
// See: C++: addDeferredAttachments(), GLSL: softenLightF
frag_data[0] = max(vec4(col, 0.0), vec4(0)); // Diffuse
frag_data[1] = max(vec4(spec.rgb,vertex_color.a), vec4(0)); // PBR linear packed Occlusion, Roughness, Metal.
- frag_data[2] = max(vec4(encode_normal(tnorm), vertex_color.a, GBUFFER_FLAG_HAS_PBR), vec4(0)); // normal, environment intensity, flags
+ frag_data[2] = vec4(tnorm, GBUFFER_FLAG_HAS_PBR); // normal, environment intensity, flags
frag_data[3] = max(vec4(emissive,0), vec4(0)); // PBR sRGB Emissive
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl
index 160ae7a215..5e0141910b 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl
@@ -28,8 +28,9 @@
//deferred opaque implementation
-#ifdef HAS_SKIN
uniform mat4 modelview_matrix;
+
+#ifdef HAS_SKIN
uniform mat4 projection_matrix;
mat4 getObjectSkinnedTransform();
#else
@@ -59,6 +60,7 @@ out vec4 vertex_color;
out vec3 vary_tangent;
flat out float vary_sign;
out vec3 vary_normal;
+out vec3 vary_position;
vec2 texture_transform(vec2 vertex_texcoord, vec4[2] khr_gltf_transform, mat4 sl_animation_transform);
vec3 tangent_space_transform(vec4 vertex_tangent, vec3 vertex_normal, vec4[2] khr_gltf_transform, mat4 sl_animation_transform);
@@ -71,10 +73,11 @@ void main()
mat = modelview_matrix * mat;
vec3 pos = (mat*vec4(position.xyz,1.0)).xyz;
-
+ vary_position = pos;
gl_Position = projection_matrix*vec4(pos,1.0);
#else
+ vary_position = (modelview_matrix*vec4(position.xyz, 1.0)).xyz;
//transform vertex
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl
new file mode 100644
index 0000000000..de4745c1c4
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl
@@ -0,0 +1,347 @@
+/**
+ * @file class1\deferred\terrainF.glsl
+ *
+ * $LicenseInfo:firstyear=2023&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2023, 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$
+ */
+
+/*[EXTRA_CODE_HERE]*/
+
+#define TERRAIN_PBR_DETAIL_EMISSIVE 0
+#define TERRAIN_PBR_DETAIL_OCCLUSION -1
+#define TERRAIN_PBR_DETAIL_NORMAL -2
+#define TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS -3
+
+#if TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 3
+#define TerrainCoord vec4[2]
+#elif TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 1
+#define TerrainCoord vec2
+#endif
+
+#define MIX_X 1 << 3
+#define MIX_Y 1 << 4
+#define MIX_Z 1 << 5
+#define MIX_W 1 << 6
+
+struct TerrainMix
+{
+ vec4 weight;
+ int type;
+};
+
+TerrainMix get_terrain_mix_weights(float alpha1, float alpha2, float alphaFinal);
+
+struct PBRMix
+{
+ vec4 col; // RGB color with alpha, linear space
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_OCCLUSION)
+ vec3 orm; // Occlusion, roughness, metallic
+#elif (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ vec2 rm; // Roughness, metallic
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
+ vec3 vNt; // Unpacked normal texture sample, vector
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ vec3 emissive; // RGB emissive color, linear space
+#endif
+};
+
+PBRMix init_pbr_mix();
+
+PBRMix terrain_sample_and_multiply_pbr(
+ TerrainCoord terrain_coord
+ , sampler2D tex_col
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ , sampler2D tex_orm
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
+ , sampler2D tex_vNt
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ , sampler2D tex_emissive
+#endif
+ , vec4 factor_col
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_OCCLUSION)
+ , vec3 factor_orm
+#elif (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ , vec2 factor_rm
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ , vec3 factor_emissive
+#endif
+ );
+
+PBRMix mix_pbr(PBRMix mix1, PBRMix mix2, float mix2_weight);
+
+out vec4 frag_data[4];
+
+uniform sampler2D alpha_ramp;
+
+// https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#additional-textures
+uniform sampler2D detail_0_base_color;
+uniform sampler2D detail_1_base_color;
+uniform sampler2D detail_2_base_color;
+uniform sampler2D detail_3_base_color;
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
+uniform sampler2D detail_0_normal;
+uniform sampler2D detail_1_normal;
+uniform sampler2D detail_2_normal;
+uniform sampler2D detail_3_normal;
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+uniform sampler2D detail_0_metallic_roughness;
+uniform sampler2D detail_1_metallic_roughness;
+uniform sampler2D detail_2_metallic_roughness;
+uniform sampler2D detail_3_metallic_roughness;
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+uniform sampler2D detail_0_emissive;
+uniform sampler2D detail_1_emissive;
+uniform sampler2D detail_2_emissive;
+uniform sampler2D detail_3_emissive;
+#endif
+
+uniform vec4[4] baseColorFactors; // See also vertex_color in pbropaqueV.glsl
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+uniform vec4 metallicFactors;
+uniform vec4 roughnessFactors;
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+uniform vec3[4] emissiveColors;
+#endif
+uniform vec4 minimum_alphas; // PBR alphaMode: MASK, See: mAlphaCutoff, setAlphaCutoff()
+
+#if TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 3
+in vec4[2] vary_coords;
+#endif
+in vec3 vary_position;
+in vec3 vary_normal;
+in vec3 vary_tangent;
+flat in float vary_sign;
+in vec4 vary_texcoord0;
+in vec4 vary_texcoord1;
+
+void mirrorClip(vec3 position);
+
+float terrain_mix(TerrainMix tm, vec4 tms4);
+
+void main()
+{
+ // Make sure we clip the terrain if we're in a mirror.
+ mirrorClip(vary_position);
+
+#if TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 3
+ TerrainCoord terrain_texcoord = vary_coords;
+#elif TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 1
+ TerrainCoord terrain_texcoord = vary_texcoord0.xy;
+#endif
+
+ float alpha1 = texture(alpha_ramp, vary_texcoord0.zw).a;
+ float alpha2 = texture(alpha_ramp,vary_texcoord1.xy).a;
+ float alphaFinal = texture(alpha_ramp, vary_texcoord1.zw).a;
+
+ TerrainMix tm = get_terrain_mix_weights(alpha1, alpha2, alphaFinal);
+
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_OCCLUSION)
+ // RGB = Occlusion, Roughness, Metal
+ // default values, see LLViewerTexture::sDefaultPBRORMImagep
+ // occlusion 1.0
+ // roughness 0.0
+ // metal 0.0
+ vec3[4] orm_factors;
+ orm_factors[0] = vec3(1.0, roughnessFactors.x, metallicFactors.x);
+ orm_factors[1] = vec3(1.0, roughnessFactors.y, metallicFactors.y);
+ orm_factors[2] = vec3(1.0, roughnessFactors.z, metallicFactors.z);
+ orm_factors[3] = vec3(1.0, roughnessFactors.w, metallicFactors.w);
+#elif (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ vec2[4] rm_factors;
+ rm_factors[0] = vec2(roughnessFactors.x, metallicFactors.x);
+ rm_factors[1] = vec2(roughnessFactors.y, metallicFactors.y);
+ rm_factors[2] = vec2(roughnessFactors.z, metallicFactors.z);
+ rm_factors[3] = vec2(roughnessFactors.w, metallicFactors.w);
+#endif
+
+ PBRMix mix = init_pbr_mix();
+ PBRMix mix2;
+ switch (tm.type & MIX_X)
+ {
+ case MIX_X:
+ mix2 = terrain_sample_and_multiply_pbr(
+ terrain_texcoord
+ , detail_0_base_color
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ , detail_0_metallic_roughness
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
+ , detail_0_normal
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ , detail_0_emissive
+#endif
+ , baseColorFactors[0]
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_OCCLUSION)
+ , orm_factors[0]
+#elif (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ , rm_factors[0]
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ , emissiveColors[0]
+#endif
+ );
+ mix = mix_pbr(mix, mix2, tm.weight.x);
+ break;
+ default:
+ break;
+ }
+ switch (tm.type & MIX_Y)
+ {
+ case MIX_Y:
+ mix2 = terrain_sample_and_multiply_pbr(
+ terrain_texcoord
+ , detail_1_base_color
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ , detail_1_metallic_roughness
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
+ , detail_1_normal
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ , detail_1_emissive
+#endif
+ , baseColorFactors[1]
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_OCCLUSION)
+ , orm_factors[1]
+#elif (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ , rm_factors[1]
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ , emissiveColors[1]
+#endif
+ );
+ mix = mix_pbr(mix, mix2, tm.weight.y);
+ break;
+ default:
+ break;
+ }
+ switch (tm.type & MIX_Z)
+ {
+ case MIX_Z:
+ mix2 = terrain_sample_and_multiply_pbr(
+ terrain_texcoord
+ , detail_2_base_color
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ , detail_2_metallic_roughness
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
+ , detail_2_normal
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ , detail_2_emissive
+#endif
+ , baseColorFactors[2]
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_OCCLUSION)
+ , orm_factors[2]
+#elif (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ , rm_factors[2]
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ , emissiveColors[2]
+#endif
+ );
+ mix = mix_pbr(mix, mix2, tm.weight.z);
+ break;
+ default:
+ break;
+ }
+ switch (tm.type & MIX_W)
+ {
+ case MIX_W:
+ mix2 = terrain_sample_and_multiply_pbr(
+ terrain_texcoord
+ , detail_3_base_color
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ , detail_3_metallic_roughness
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
+ , detail_3_normal
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ , detail_3_emissive
+#endif
+ , baseColorFactors[3]
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_OCCLUSION)
+ , orm_factors[3]
+#elif (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ , rm_factors[3]
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ , emissiveColors[3]
+#endif
+ );
+ mix = mix_pbr(mix, mix2, tm.weight.w);
+ break;
+ default:
+ break;
+ }
+
+ float minimum_alpha = terrain_mix(tm, minimum_alphas);
+ if (mix.col.a < minimum_alpha)
+ {
+ discard;
+ }
+ float base_color_factor_alpha = terrain_mix(tm, vec4(baseColorFactors[0].z, baseColorFactors[1].z, baseColorFactors[2].z, baseColorFactors[3].z));
+
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
+ // from mikktspace.com
+ vec3 vNt = mix.vNt;
+ vec3 vN = vary_normal;
+ vec3 vT = vary_tangent.xyz;
+
+ vec3 vB = vary_sign * cross(vN, vT);
+ vec3 tnorm = normalize( vNt.x * vT + vNt.y * vB + vNt.z * vN );
+
+ tnorm *= gl_FrontFacing ? 1.0 : -1.0;
+#else
+ vec3 tnorm = vary_normal;
+ tnorm *= gl_FrontFacing ? 1.0 : -1.0;
+#endif
+
+
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+#define emissive mix.emissive
+#else
+#define emissive vec3(0)
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_OCCLUSION)
+#define orm mix.orm
+#elif (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+#define orm vec3(1.0, mix.rm)
+#else
+// Matte plastic potato terrain
+#define orm vec3(1.0, 1.0, 0.0)
+#endif
+ frag_data[0] = max(vec4(mix.col.xyz, 0.0), vec4(0)); // Diffuse
+ frag_data[1] = max(vec4(orm.rgb, base_color_factor_alpha), vec4(0)); // PBR linear packed Occlusion, Roughness, Metal.
+ frag_data[2] = vec4(tnorm, GBUFFER_FLAG_HAS_PBR); // normal, flags
+ frag_data[3] = max(vec4(emissive,0), vec4(0)); // PBR sRGB Emissive
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbrterrainUtilF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainUtilF.glsl
new file mode 100644
index 0000000000..935c3f9301
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainUtilF.glsl
@@ -0,0 +1,473 @@
+/**
+ * @file class1\deferred\pbrterrainUtilF.glsl
+ *
+ * $LicenseInfo:firstyear=2023&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2023, 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$
+ */
+
+/*[EXTRA_CODE_HERE]*/
+
+/**
+ * Triplanar mapping implementation adapted from Inigo Quilez' example shader,
+ * MIT license.
+ * https://www.shadertoy.com/view/MtsGWH
+ * Copyright © 2015 Inigo Quilez
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions: The above copyright
+ * notice and this permission notice shall be included in all copies or
+ * substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS",
+ * WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
+ * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#define TERRAIN_PBR_DETAIL_EMISSIVE 0
+#define TERRAIN_PBR_DETAIL_OCCLUSION -1
+#define TERRAIN_PBR_DETAIL_NORMAL -2
+#define TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS -3
+
+in vec3 vary_vertex_normal;
+
+vec3 srgb_to_linear(vec3 c);
+
+// A relatively agressive threshold for terrain material mixing sampling
+// cutoff. This ensures that only one or two materials are used in most places,
+// making PBR terrain blending more performant. Should be greater than 0 to work.
+#define TERRAIN_RAMP_MIX_THRESHOLD 0.1
+// A small threshold for triplanar mapping sampling cutoff. This and
+// TERRAIN_TRIPLANAR_BLEND_FACTOR together ensures that only one or two samples
+// per texture are used in most places, making triplanar mapping more
+// performant. Should be greater than 0 to work.
+// There's also an artistic design choice in the use of these factors, and the
+// use of triplanar generally. Don't take these triplanar constants for granted.
+#define TERRAIN_TRIPLANAR_MIX_THRESHOLD 0.01
+
+#define SAMPLE_X 1 << 0
+#define SAMPLE_Y 1 << 1
+#define SAMPLE_Z 1 << 2
+#define MIX_X 1 << 3
+#define MIX_Y 1 << 4
+#define MIX_Z 1 << 5
+#define MIX_W 1 << 6
+
+struct PBRMix
+{
+ vec4 col; // RGB color with alpha, linear space
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_OCCLUSION)
+ vec3 orm; // Occlusion, roughness, metallic
+#elif (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ vec2 rm; // Roughness, metallic
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
+ vec3 vNt; // Unpacked normal texture sample, vector
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ vec3 emissive; // RGB emissive color, linear space
+#endif
+};
+
+PBRMix init_pbr_mix()
+{
+ PBRMix mix;
+ mix.col = vec4(0);
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_OCCLUSION)
+ mix.orm = vec3(0);
+#elif (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ mix.rm = vec2(0);
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
+ mix.vNt = vec3(0);
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ mix.emissive = vec3(0);
+#endif
+ return mix;
+}
+
+// Usage example, for two weights:
+// vec2 weights = ... // Weights must add up to 1
+// PBRMix mix = init_pbr_mix();
+// PBRMix mix1 = ...
+// mix = mix_pbr(mix, mix1, weights.x);
+// PBRMix mix2 = ...
+// mix = mix_pbr(mix, mix2, weights.y);
+PBRMix mix_pbr(PBRMix mix1, PBRMix mix2, float mix2_weight)
+{
+ PBRMix mix;
+ mix.col = mix1.col + (mix2.col * mix2_weight);
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_OCCLUSION)
+ mix.orm = mix1.orm + (mix2.orm * mix2_weight);
+#elif (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ mix.rm = mix1.rm + (mix2.rm * mix2_weight);
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
+ mix.vNt = mix1.vNt + (mix2.vNt * mix2_weight);
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ mix.emissive = mix1.emissive + (mix2.emissive * mix2_weight);
+#endif
+ return mix;
+}
+
+PBRMix sample_pbr(
+ vec2 uv
+ , sampler2D tex_col
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ , sampler2D tex_orm
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
+ , sampler2D tex_vNt
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ , sampler2D tex_emissive
+#endif
+ )
+{
+ PBRMix mix;
+ mix.col = texture(tex_col, uv);
+ mix.col.rgb = srgb_to_linear(mix.col.rgb);
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_OCCLUSION)
+ mix.orm = texture(tex_orm, uv).xyz;
+#elif (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ mix.rm = texture(tex_orm, uv).yz;
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
+ mix.vNt = texture(tex_vNt, uv).xyz*2.0-1.0;
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ mix.emissive = srgb_to_linear(texture(tex_emissive, uv).xyz);
+#endif
+ return mix;
+}
+
+struct TerrainTriplanar
+{
+ vec3 weight;
+ int type;
+};
+
+struct TerrainMix
+{
+ vec4 weight;
+ int type;
+};
+
+#define TerrainMixSample vec4[4]
+#define TerrainMixSample3 vec3[4]
+
+TerrainMix get_terrain_mix_weights(float alpha1, float alpha2, float alphaFinal)
+{
+ TerrainMix tm;
+ vec4 sample_x = vec4(1,0,0,0);
+ vec4 sample_y = vec4(0,1,0,0);
+ vec4 sample_z = vec4(0,0,1,0);
+ vec4 sample_w = vec4(0,0,0,1);
+
+ tm.weight = mix( mix(sample_w, sample_z, alpha2), mix(sample_y, sample_x, alpha1), alphaFinal );
+ tm.weight -= TERRAIN_RAMP_MIX_THRESHOLD;
+ ivec4 usage = max(ivec4(0), ivec4(ceil(tm.weight)));
+ // Prevent negative weights and keep weights balanced
+ tm.weight = tm.weight*vec4(usage);
+ tm.weight /= (tm.weight.x + tm.weight.y + tm.weight.z + tm.weight.w);
+
+ tm.type = (usage.x * MIX_X) |
+ (usage.y * MIX_Y) |
+ (usage.z * MIX_Z) |
+ (usage.w * MIX_W);
+ return tm;
+}
+
+TerrainTriplanar _t_triplanar()
+{
+ float sharpness = TERRAIN_TRIPLANAR_BLEND_FACTOR;
+ float threshold = TERRAIN_TRIPLANAR_MIX_THRESHOLD;
+ vec3 weight_signed = pow(abs(vary_vertex_normal), vec3(sharpness));
+ weight_signed /= (weight_signed.x + weight_signed.y + weight_signed.z);
+ weight_signed -= vec3(threshold);
+ TerrainTriplanar tw;
+ // *NOTE: Make sure the threshold doesn't affect the materials
+ tw.weight = max(vec3(0), weight_signed);
+ tw.weight /= (tw.weight.x + tw.weight.y + tw.weight.z);
+ ivec3 usage = ivec3(round(max(vec3(0), sign(weight_signed))));
+ tw.type = ((usage.x) * SAMPLE_X) |
+ ((usage.y) * SAMPLE_Y) |
+ ((usage.z) * SAMPLE_Z);
+ return tw;
+}
+
+// Assume weights add to 1
+float terrain_mix(TerrainMix tm, vec4 tms4)
+{
+ return (tm.weight.x * tms4[0]) +
+ (tm.weight.y * tms4[1]) +
+ (tm.weight.z * tms4[2]) +
+ (tm.weight.w * tms4[3]);
+}
+
+#if TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 3
+// Triplanar mapping
+
+// Pre-transformed texture coordinates for each axial uv slice (Packing: xy, yz, (-x)z, unused)
+#define TerrainCoord vec4[2]
+
+vec2 _t_uv(vec2 uv_unflipped, float sign_or_zero)
+{
+ // Handle case where sign is 0
+ float sign = (2.0*sign_or_zero) + 1.0;
+ sign /= abs(sign);
+ // If the vertex normal is negative, flip the texture back
+ // right-side up.
+ vec2 uv = uv_unflipped * vec2(sign, 1);
+ return uv;
+}
+
+vec3 _t_normal_post_1(vec3 vNt0, float sign_or_zero)
+{
+ // Assume normal is unpacked
+ vec3 vNt1 = vNt0;
+ // Get sign
+ float sign = sign_or_zero;
+ // Handle case where sign is 0
+ sign = (2.0*sign) + 1.0;
+ sign /= abs(sign);
+ // If the sign is negative, rotate normal by 180 degrees
+ vNt1.xy = (min(0, sign) * vNt1.xy) + (min(0, -sign) * -vNt1.xy);
+ return vNt1;
+}
+
+// Triplanar-specific normal texture fixes
+vec3 _t_normal_post_x(vec3 vNt0)
+{
+ vec3 vNt_x = _t_normal_post_1(vNt0, sign(vary_vertex_normal.x));
+ // *HACK: Transform normals according to orientation of the UVs
+ vNt_x.xy = vec2(-vNt_x.y, vNt_x.x);
+ return vNt_x;
+}
+vec3 _t_normal_post_y(vec3 vNt0)
+{
+ vec3 vNt_y = _t_normal_post_1(vNt0, sign(vary_vertex_normal.y));
+ // *HACK: Transform normals according to orientation of the UVs
+ vNt_y.xy = -vNt_y.xy;
+ return vNt_y;
+}
+vec3 _t_normal_post_z(vec3 vNt0)
+{
+ vec3 vNt_z = _t_normal_post_1(vNt0, sign(vary_vertex_normal.z));
+ return vNt_z;
+}
+
+PBRMix terrain_sample_pbr(
+ TerrainCoord terrain_coord
+ , TerrainTriplanar tw
+ , sampler2D tex_col
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ , sampler2D tex_orm
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
+ , sampler2D tex_vNt
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ , sampler2D tex_emissive
+#endif
+ )
+{
+ PBRMix mix = init_pbr_mix();
+
+#define get_uv_x() _t_uv(terrain_coord[0].zw, sign(vary_vertex_normal.x))
+#define get_uv_y() _t_uv(terrain_coord[1].xy, sign(vary_vertex_normal.y))
+#define get_uv_z() _t_uv(terrain_coord[0].xy, sign(vary_vertex_normal.z))
+ switch (tw.type & SAMPLE_X)
+ {
+ case SAMPLE_X:
+ PBRMix mix_x = sample_pbr(
+ get_uv_x()
+ , tex_col
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ , tex_orm
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
+ , tex_vNt
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ , tex_emissive
+#endif
+ );
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
+ // Triplanar-specific normal texture fix
+ mix_x.vNt = _t_normal_post_x(mix_x.vNt);
+#endif
+ mix = mix_pbr(mix, mix_x, tw.weight.x);
+ break;
+ default:
+ break;
+ }
+
+ switch (tw.type & SAMPLE_Y)
+ {
+ case SAMPLE_Y:
+ PBRMix mix_y = sample_pbr(
+ get_uv_y()
+ , tex_col
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ , tex_orm
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
+ , tex_vNt
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ , tex_emissive
+#endif
+ );
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
+ // Triplanar-specific normal texture fix
+ mix_y.vNt = _t_normal_post_y(mix_y.vNt);
+#endif
+ mix = mix_pbr(mix, mix_y, tw.weight.y);
+ break;
+ default:
+ break;
+ }
+
+ switch (tw.type & SAMPLE_Z)
+ {
+ case SAMPLE_Z:
+ PBRMix mix_z = sample_pbr(
+ get_uv_z()
+ , tex_col
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ , tex_orm
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
+ , tex_vNt
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ , tex_emissive
+#endif
+ );
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
+ // Triplanar-specific normal texture fix
+ // *NOTE: Bottom face has not been tested
+ mix_z.vNt = _t_normal_post_z(mix_z.vNt);
+#endif
+ mix = mix_pbr(mix, mix_z, tw.weight.z);
+ break;
+ default:
+ break;
+ }
+
+ return mix;
+}
+
+#elif TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 1
+
+#define TerrainCoord vec2
+
+#define terrain_sample_pbr sample_pbr
+
+#endif
+
+PBRMix multiply_factors_pbr(
+ PBRMix mix_in
+ , vec4 factor_col
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_OCCLUSION)
+ , vec3 factor_orm
+#elif (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ , vec2 factor_rm
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ , vec3 factor_emissive
+#endif
+ )
+{
+ PBRMix mix = mix_in;
+ mix.col *= factor_col;
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_OCCLUSION)
+ mix.orm *= factor_orm;
+#elif (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ mix.rm *= factor_rm;
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ mix.emissive *= factor_emissive;
+#endif
+ return mix;
+}
+
+PBRMix terrain_sample_and_multiply_pbr(
+ TerrainCoord terrain_coord
+ , sampler2D tex_col
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ , sampler2D tex_orm
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
+ , sampler2D tex_vNt
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ , sampler2D tex_emissive
+#endif
+ , vec4 factor_col
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_OCCLUSION)
+ , vec3 factor_orm
+#elif (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ , vec2 factor_rm
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ , vec3 factor_emissive
+#endif
+ )
+{
+ PBRMix mix = terrain_sample_pbr(
+ terrain_coord
+#if TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 3
+ , _t_triplanar()
+#endif
+ , tex_col
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ , tex_orm
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
+ , tex_vNt
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ , tex_emissive
+#endif
+ );
+
+ mix = multiply_factors_pbr(mix
+ , factor_col
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_OCCLUSION)
+ , factor_orm
+#elif (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ , factor_rm
+#endif
+#if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ , factor_emissive
+#endif
+ );
+
+ return mix;
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbrterrainV.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainV.glsl
new file mode 100644
index 0000000000..489fc26e3f
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainV.glsl
@@ -0,0 +1,96 @@
+/**
+ * @file class1\environment\pbrterrainV.glsl
+ *
+ * $LicenseInfo:firstyear=2023&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2023, 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$
+ */
+
+uniform mat3 normal_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
+uniform mat4 modelview_projection_matrix;
+
+in vec3 position;
+in vec3 normal;
+in vec4 tangent;
+in vec4 diffuse_color;
+in vec2 texcoord1;
+
+#if TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 3
+out vec4[2] vary_coords;
+#endif
+out vec3 vary_vertex_normal; // Used by pbrterrainUtilF.glsl
+out vec3 vary_normal;
+out vec3 vary_tangent;
+flat out float vary_sign;
+out vec4 vary_texcoord0;
+out vec4 vary_texcoord1;
+out vec3 vary_position;
+
+// *HACK: tangent_space_transform should use texture_normal_transform, or maybe
+// we shouldn't use tangent_space_transform at all. See the call to
+// tangent_space_transform below.
+uniform vec4[2] texture_base_color_transform;
+
+vec2 texture_transform(vec2 vertex_texcoord, vec4[2] khr_gltf_transform, mat4 sl_animation_transform);
+vec3 tangent_space_transform(vec4 vertex_tangent, vec3 vertex_normal, vec4[2] khr_gltf_transform, mat4 sl_animation_transform);
+
+void main()
+{
+ //transform vertex
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vary_position = (modelview_matrix*vec4(position.xyz, 1.0)).xyz;
+
+ vec3 n = normal_matrix * normal;
+ vary_vertex_normal = normal;
+ vec3 t = normal_matrix * tangent.xyz;
+
+ vary_tangent = normalize(t);
+ // *TODO: Decide if we want this. It may be better to just calculate the
+ // tangents on-the-fly in the fragment shader, due to the subtleties of the
+ // effect of triplanar mapping on UVs.
+ // *HACK: Should be using texture_normal_transform here. The KHR texture
+ // transform spec requires handling texture transforms separately for each
+ // individual texture.
+ vary_tangent = normalize(tangent_space_transform(vec4(t, tangent.w), n, texture_base_color_transform, texture_matrix0));
+ vary_sign = tangent.w;
+ vary_normal = normalize(n);
+
+ // Transform and pass tex coords
+ // *HACK: texture_base_color_transform is used for all of these here, but
+ // the KHR texture transform spec requires handling texture transforms
+ // separately for each individual texture.
+#if TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 3
+ // xy
+ vary_coords[0].xy = texture_transform(position.xy, texture_base_color_transform, texture_matrix0);
+ // yz
+ vary_coords[0].zw = texture_transform(position.yz, texture_base_color_transform, texture_matrix0);
+ // (-x)z
+ vary_coords[1].xy = texture_transform(position.xz * vec2(-1, 1), texture_base_color_transform, texture_matrix0);
+#elif TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 1
+ vary_texcoord0.xy = texture_transform(position.xy, texture_base_color_transform, texture_matrix0);
+#endif
+
+ vec4 tc = vec4(texcoord1,0,1);
+ vary_texcoord0.zw = tc.xy;
+ vary_texcoord1.xy = tc.xy-vec2(2.0, 0.0);
+ vary_texcoord1.zw = tc.xy-vec2(1.0, 0.0);
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl
index 3443785e1a..1629ed91c8 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl
@@ -97,6 +97,7 @@ vec3 toneMapACES_Hill(vec3 color)
uniform float exposure;
uniform float gamma;
+uniform float aces_mix;
vec3 toneMap(vec3 color)
{
@@ -106,7 +107,7 @@ vec3 toneMap(vec3 color)
color *= exposure * exp_scale;
// mix ACES and Linear here as a compromise to avoid over-darkening legacy content
- color = mix(toneMapACES_Hill(color), color, 0.3);
+ color = mix(toneMapACES_Hill(color), color, aces_mix);
#endif
return color;
@@ -152,6 +153,15 @@ float noise(vec2 x) {
//=============================
+void debugExposure(inout vec3 color)
+{
+ float exp_scale = texture(exposureMap, vec2(0.5,0.5)).r;
+ exp_scale *= 0.5;
+ if (abs(vary_fragcoord.y-exp_scale) < 0.01 && vary_fragcoord.x < 0.1)
+ {
+ color = vec3(1,0,0);
+ }
+}
vec3 legacyGamma(vec3 color)
{
@@ -180,7 +190,8 @@ void main()
vec3 seed = (diff.rgb+vec3(1.0))*vec3(tc.xy, tc.x+tc.y);
vec3 nz = vec3(noise(seed.rg), noise(seed.gb), noise(seed.rb));
diff.rgb += nz*0.003;
-
+
+ //debugExposure(diff.rgb);
frag_color = max(diff, vec4(0));
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
index 9d9ba49d82..785c748234 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
@@ -27,6 +27,15 @@
in vec3 vary_HazeColor;
in float vary_LightNormPosDot;
+#ifdef HAS_HDRI
+in vec4 vary_position;
+in vec3 vary_rel_pos;
+uniform float sky_hdr_scale;
+uniform float hdri_split_screen;
+uniform mat3 env_mat;
+uniform sampler2D environmentMap;
+#endif
+
uniform sampler2D rainbow_map;
uniform sampler2D halo_map;
@@ -37,6 +46,9 @@ uniform float ice_level;
out vec4 frag_data[4];
vec3 srgb_to_linear(vec3 c);
+vec3 linear_to_srgb(vec3 c);
+
+#define PI 3.14159265
/////////////////////////////////////////////////////////////////////////
// The fragment shader for the sky
@@ -71,24 +83,42 @@ vec3 halo22(float d)
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.
-
- vec3 color = vary_HazeColor;
-
- float rel_pos_lightnorm = vary_LightNormPosDot;
- float optic_d = rel_pos_lightnorm;
- vec3 halo_22 = halo22(optic_d);
- color.rgb += rainbow(optic_d);
- color.rgb += halo_22;
- color.rgb *= 2.;
- color.rgb = clamp(color.rgb, vec3(0), vec3(5));
+ vec3 color;
+#ifdef HAS_HDRI
+ vec3 frag_coord = vary_position.xyz/vary_position.w;
+ if (-frag_coord.x > ((1.0-hdri_split_screen)*2.0-1.0))
+ {
+ vec3 pos = normalize(vary_rel_pos);
+ pos = env_mat * pos;
+ vec2 texCoord = vec2(atan(pos.z, pos.x) + PI, acos(pos.y)) / vec2(2.0 * PI, PI);
+ color = textureLod(environmentMap, texCoord.xy, 0).rgb * sky_hdr_scale;
+ color = min(color, vec3(8192*8192*16)); // stupidly large value arrived at by binary search -- avoids framebuffer corruption from some HDRIs
+
+ frag_data[2] = vec4(0.0,0.0,0.0,GBUFFER_FLAG_HAS_HDRI);
+ }
+ else
+#endif
+ {
+ // 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.
+
+ color = vary_HazeColor;
+
+ float rel_pos_lightnorm = vary_LightNormPosDot;
+ float optic_d = rel_pos_lightnorm;
+ vec3 halo_22 = halo22(optic_d);
+ color.rgb += rainbow(optic_d);
+ color.rgb += halo_22;
+ color.rgb *= 2.;
+ color.rgb = clamp(color.rgb, vec3(0), vec3(5));
+
+ frag_data[2] = vec4(0.0,0.0,0.0,GBUFFER_FLAG_SKIP_ATMOS);
+ }
frag_data[0] = vec4(0);
frag_data[1] = vec4(0);
- frag_data[2] = vec4(0.0,0.0,0.0,GBUFFER_FLAG_SKIP_ATMOS); //1.0 in norm.w masks off fog
frag_data[3] = vec4(color.rgb, 1.0);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl
index 17ce2dee5b..24d2db2183 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl
@@ -35,6 +35,11 @@ in vec3 position;
out vec3 vary_HazeColor;
out float vary_LightNormPosDot;
+#ifdef HAS_HDRI
+out vec4 vary_position;
+out vec3 vary_rel_pos;
+#endif
+
// Inputs
uniform vec3 camPosLocal;
@@ -72,6 +77,11 @@ void main()
// Get relative position
vec3 rel_pos = position.xyz - camPosLocal.xyz + vec3(0, 50, 0);
+#ifdef HAS_HDRI
+ vary_rel_pos = rel_pos;
+ vary_position = pos;
+#endif
+
// Adj position vector to clamp altitude
if (rel_pos.y > 0.)
{
@@ -98,7 +108,7 @@ void main()
vec3 light_atten = (blue_density + vec3(haze_density * 0.25)) * (density_multiplier * max_y);
// Calculate relative weights
- vec3 combined_haze = abs(blue_density) + vec3(abs(haze_density));
+ vec3 combined_haze = max(abs(blue_density) + vec3(abs(haze_density)), vec3(1e-6));
vec3 blue_weight = blue_density / combined_haze;
vec3 haze_weight = haze_density / combined_haze;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl b/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl
index f6d509e2c6..5f598f84a7 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl
@@ -38,10 +38,11 @@ in vec3 vary_normal;
in vec4 vary_texcoord0;
in vec4 vary_texcoord1;
-vec2 encode_normal(vec3 n);
+void mirrorClip(vec3 position);
void main()
{
+ mirrorClip(pos);
/// Note: This should duplicate the blending functionality currently used for the terrain rendering.
vec4 color0 = texture(detail_0, vary_texcoord0.xy);
@@ -59,7 +60,7 @@ void main()
frag_data[0] = outColor;
frag_data[1] = vec4(0.0,0.0,0.0,-1.0);
vec3 nvn = normalize(vary_normal);
- frag_data[2] = vec4(encode_normal(nvn.xyz), 0.0, GBUFFER_FLAG_HAS_ATMOS);
+ frag_data[2] = vec4(nvn.xyz, GBUFFER_FLAG_HAS_ATMOS);
frag_data[3] = vec4(0);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/terrainV.glsl b/indra/newview/app_settings/shaders/class1/deferred/terrainV.glsl
index f6d3b59e85..8e1e4b54d5 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/terrainV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/terrainV.glsl
@@ -25,12 +25,12 @@
uniform mat3 normal_matrix;
uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
uniform mat4 modelview_projection_matrix;
in vec3 position;
in vec3 normal;
in vec4 diffuse_color;
-in vec2 texcoord0;
in vec2 texcoord1;
out vec3 pos;
@@ -41,18 +41,16 @@ out vec4 vary_texcoord1;
uniform vec4 object_plane_s;
uniform vec4 object_plane_t;
-vec4 texgen_object(vec4 vpos, vec4 tc, mat4 mat, vec4 tp0, vec4 tp1)
+vec2 texgen_object(vec4 vpos, mat4 mat, vec4 tp0, vec4 tp1)
{
vec4 tcoord;
tcoord.x = dot(vpos, tp0);
tcoord.y = dot(vpos, tp1);
- tcoord.z = tc.z;
- tcoord.w = tc.w;
tcoord = mat * tcoord;
- return tcoord;
+ return tcoord.xy;
}
void main()
@@ -62,12 +60,12 @@ void main()
vec4 t_pos = modelview_projection_matrix * pre_pos;
gl_Position = t_pos;
- pos = t_pos.xyz;
+ pos = (modelview_matrix*pre_pos).xyz;
vary_normal = normalize(normal_matrix * normal);
// Transform and pass tex coords
- vary_texcoord0.xy = texgen_object(vec4(position, 1.0), vec4(texcoord0,0,1), texture_matrix0, object_plane_s, object_plane_t).xy;
+ vary_texcoord0.xy = texgen_object(vec4(position, 1.0), texture_matrix0, object_plane_s, object_plane_t);
vec4 t = vec4(texcoord1,0,1);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/textureUtilV.glsl b/indra/newview/app_settings/shaders/class1/deferred/textureUtilV.glsl
index 636dfed4ba..732333311c 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/textureUtilV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/textureUtilV.glsl
@@ -65,7 +65,7 @@ vec2 texture_transform(vec2 vertex_texcoord, vec4[2] khr_gltf_transform, mat4 sl
// Apply texture animation first to avoid shearing and other artifacts
texcoord = (sl_animation_transform * vec4(texcoord, 0, 1)).xy;
// Convert to left-handed coordinate system. The offset of 1 is necessary
- // for rotations to be applied correctly.
+ // for rotation and scale to be applied correctly.
texcoord.y = 1.0 - texcoord.y;
texcoord = khr_texture_transform(texcoord, khr_gltf_transform[0].xy, khr_gltf_transform[0].z, khr_gltf_transform[1].xy);
// Convert back to right-handed coordinate system
diff --git a/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl b/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl
index e2d87e68fa..708acd0194 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl
@@ -32,13 +32,14 @@ uniform sampler2D diffuseMap;
in vec4 vertex_color;
in vec3 vary_normal;
in vec2 vary_texcoord0;
+in vec3 vary_position;
uniform float minimum_alpha;
-vec2 encode_normal(vec3 n);
-
+void mirrorClip(vec3 pos);
void main()
{
+ mirrorClip(vary_position);
vec4 col = texture(diffuseMap, vary_texcoord0.xy);
if (col.a < minimum_alpha)
{
@@ -48,6 +49,6 @@ void main()
frag_data[0] = vec4(vertex_color.rgb*col.rgb, 0.0);
frag_data[1] = vec4(0,0,0,0);
vec3 nvn = normalize(vary_normal);
- frag_data[2] = vec4(encode_normal(nvn.xyz), 0.0, GBUFFER_FLAG_HAS_ATMOS);
+ frag_data[2] = vec4(nvn.xyz, GBUFFER_FLAG_HAS_ATMOS);
frag_data[3] = vec4(0);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/treeV.glsl b/indra/newview/app_settings/shaders/class1/deferred/treeV.glsl
index ce8a10712c..c84fccd4c6 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/treeV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/treeV.glsl
@@ -24,6 +24,7 @@
*/
uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
uniform mat4 modelview_projection_matrix;
uniform mat3 normal_matrix;
@@ -34,11 +35,14 @@ in vec2 texcoord0;
out vec3 vary_normal;
out vec4 vertex_color;
out vec2 vary_texcoord0;
+out vec3 vary_position;
void main()
{
//transform vertex
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vary_position = (modelview_matrix*vec4(position.xyz, 1.0)).xyz;
+
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
vary_normal = normalize(normal_matrix * normal);
diff --git a/indra/newview/app_settings/shaders/class1/environment/encodeNormF.glsl b/indra/newview/app_settings/shaders/class1/environment/encodeNormF.glsl
deleted file mode 100644
index 6cd2445522..0000000000
--- a/indra/newview/app_settings/shaders/class1/environment/encodeNormF.glsl
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * @file encodeNormF.glsl
- *
- * $LicenseInfo:firstyear=2018&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2018, 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$
- */
-
-// Lambert Azimuthal Equal-Area projection
-// See: https://aras-p.info/texts/CompactNormalStorage.html
-// Also see: A_bit_more_deferred_-_CryEngine3.ppt
-vec2 encode_normal(vec3 n)
-{
- float f = sqrt(8 * n.z + 8);
- return n.xy / f + 0.5;
-}
-
diff --git a/indra/newview/llvectorperfoptions.cpp b/indra/newview/app_settings/shaders/class1/interface/normaldebugF.glsl
index b80058d98c..388042e7e0 100644
--- a/indra/newview/llvectorperfoptions.cpp
+++ b/indra/newview/app_settings/shaders/class1/interface/normaldebugF.glsl
@@ -1,10 +1,9 @@
/**
- * @file llvectorperfoptions.h
- * @brief SSE/SSE2 vector math performance options.
+ * @file normaldebugF.glsl
*
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $LicenseInfo:firstyear=2023&license=viewerlgpl$
* Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
+ * Copyright (C) 2023, 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,6 +23,11 @@
* $/LicenseInfo$
*/
-#include "llviewerprecompiledheaders.h"
+out vec4 frag_color;
-// Deprecated - moved into llviewerjointmesh
+in vec4 vertex_color;
+
+void main()
+{
+ frag_color = max(vertex_color, vec4(0));
+}
diff --git a/indra/newview/app_settings/shaders/class1/interface/normaldebugG.glsl b/indra/newview/app_settings/shaders/class1/interface/normaldebugG.glsl
new file mode 100644
index 0000000000..51d05cd507
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/normaldebugG.glsl
@@ -0,0 +1,76 @@
+/**
+ * @file normaldebugG.glsl
+ *
+ * $LicenseInfo:firstyear=2023&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2023, 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$
+ */
+
+// *NOTE: Geometry shaders have a reputation for being slow. Consider using
+// compute shaders instead, which have a reputation for being fast. This
+// geometry shader in particular seems to run fine on my machine, but I won't
+// vouch for this in performance-critical areas.
+// -Cosmic,2023-09-28
+
+out vec4 vertex_color;
+
+in vec4 normal_g[];
+#ifdef HAS_ATTRIBUTE_TANGENT
+in vec4 tangent_g[];
+#endif
+
+layout(triangles) in;
+#ifdef HAS_ATTRIBUTE_TANGENT
+layout(line_strip, max_vertices = 12) out;
+#else
+layout(line_strip, max_vertices = 6) out;
+#endif
+
+void triangle_normal_debug(int i)
+{
+ // Normal
+ vec4 normal_color = vec4(1.0, 1.0, 0.0, 1.0);
+ gl_Position = gl_in[i].gl_Position;
+ vertex_color = normal_color;
+ EmitVertex();
+ gl_Position = normal_g[i];
+ vertex_color = normal_color;
+ EmitVertex();
+ EndPrimitive();
+
+#ifdef HAS_ATTRIBUTE_TANGENT
+ // Tangent
+ vec4 tangent_color = vec4(0.0, 1.0, 1.0, 1.0);
+ gl_Position = gl_in[i].gl_Position;
+ vertex_color = tangent_color;
+ EmitVertex();
+ gl_Position = tangent_g[i];
+ vertex_color = tangent_color;
+ EmitVertex();
+ EndPrimitive();
+#endif
+}
+
+void main()
+{
+ triangle_normal_debug(0);
+ triangle_normal_debug(1);
+ triangle_normal_debug(2);
+}
diff --git a/indra/newview/app_settings/shaders/class1/interface/normaldebugV.glsl b/indra/newview/app_settings/shaders/class1/interface/normaldebugV.glsl
new file mode 100644
index 0000000000..b198bc2485
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/normaldebugV.glsl
@@ -0,0 +1,74 @@
+/**
+ * @file normaldebugV.glsl
+ *
+ * $LicenseInfo:firstyear=2023&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2023, 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$
+ */
+
+in vec3 position;
+in vec3 normal;
+out vec4 normal_g;
+#ifdef HAS_ATTRIBUTE_TANGENT
+in vec4 tangent;
+out vec4 tangent_g;
+#endif
+
+uniform float debug_normal_draw_length;
+
+#ifdef HAS_SKIN
+mat4 getObjectSkinnedTransform();
+#else
+uniform mat3 normal_matrix;
+#endif
+uniform mat4 projection_matrix;
+uniform mat4 modelview_matrix;
+
+// *NOTE: Should use the modelview_projection_matrix here in the non-skinned
+// case for efficiency, but opting for the simplier implementation for now as
+// this is debug code. Also, the skinned version hasn't beeen tested yet.
+// world_pos = mat * vec4(position.xyz, 1.0)
+vec4 get_screen_normal(vec3 position, vec4 world_pos, vec3 normal, mat4 mat)
+{
+ vec4 world_norm = mat * vec4((position + normal), 1.0);
+ world_norm.xyz -= world_pos.xyz;
+ world_norm.xyz = debug_normal_draw_length * normalize(world_norm.xyz);
+ world_norm.xyz += world_pos.xyz;
+ return projection_matrix * world_norm;
+}
+
+void main()
+{
+#ifdef HAS_SKIN
+ mat4 mat = getObjectSkinnedTransform();
+ mat = modelview_matrix * mat;
+#else
+#define mat modelview_matrix
+#endif
+
+ vec4 world_pos = mat * vec4(position.xyz,1.0);
+
+ gl_Position = projection_matrix * world_pos;
+ normal_g = get_screen_normal(position.xyz, world_pos, normal.xyz, mat);
+#ifdef HAS_ATTRIBUTE_TANGENT
+ tangent_g = get_screen_normal(position.xyz, world_pos, tangent.xyz, mat);
+#endif
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/interface/radianceGenF.glsl b/indra/newview/app_settings/shaders/class1/interface/radianceGenF.glsl
index 9ecdf0bf77..c1ed1bfe6e 100644
--- a/indra/newview/app_settings/shaders/class1/interface/radianceGenF.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/radianceGenF.glsl
@@ -38,6 +38,7 @@ in vec3 vary_dir;
uniform float mipLevel;
uniform int u_width;
uniform float max_probe_lod;
+uniform float probe_strength;
// =============================================================================================================
@@ -129,7 +130,7 @@ vec4 prefilterEnvMap(vec3 R)
float totalWeight = 0.0;
float envMapDim = float(textureSize(reflectionProbes, 0).s);
float roughness = mipLevel/max_probe_lod;
- int numSamples = max(int(32*roughness), 1);
+ int numSamples = max(int(PROBE_FILTER_SAMPLES*roughness), 1);
float numMips = max_probe_lod+1;
@@ -163,5 +164,6 @@ void main()
{
vec3 N = normalize(vary_dir);
frag_color = max(prefilterEnvMap(N), vec4(0));
+ frag_color.a *= probe_strength;
}
// =============================================================================================================
diff --git a/indra/newview/app_settings/shaders/class1/objects/bumpF.glsl b/indra/newview/app_settings/shaders/class1/objects/bumpF.glsl
index 67c99530e3..142f2a5d71 100644
--- a/indra/newview/app_settings/shaders/class1/objects/bumpF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/bumpF.glsl
@@ -30,9 +30,13 @@ uniform sampler2D texture1;
in vec2 vary_texcoord0;
in vec2 vary_texcoord1;
+in vec3 vary_position;
+
+void mirrorClip(vec3 pos);
void main()
{
+ mirrorClip(vary_position);
float tex0 = texture(texture0, vary_texcoord0.xy).a;
float tex1 = texture(texture1, vary_texcoord1.xy).a;
diff --git a/indra/newview/app_settings/shaders/class1/objects/bumpV.glsl b/indra/newview/app_settings/shaders/class1/objects/bumpV.glsl
index 7d5417919e..b8a02fbdec 100644
--- a/indra/newview/app_settings/shaders/class1/objects/bumpV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/bumpV.glsl
@@ -23,6 +23,7 @@
* $/LicenseInfo$
*/
+uniform mat4 modelview_matrix;
uniform mat4 texture_matrix0;
uniform mat4 modelview_projection_matrix;
@@ -32,11 +33,11 @@ in vec2 texcoord1;
out vec2 vary_texcoord0;
out vec2 vary_texcoord1;
+out vec3 vary_position;
#ifdef HAS_SKIN
mat4 getObjectSkinnedTransform();
uniform mat4 projection_matrix;
-uniform mat4 modelview_matrix;
#endif
void main()
@@ -46,8 +47,10 @@ void main()
mat4 mat = getObjectSkinnedTransform();
mat = modelview_matrix * mat;
vec4 pos = mat * vec4(position.xyz, 1.0);
+ vary_position = pos.xyz;
gl_Position = projection_matrix * pos;
#else
+ vary_position = (modelview_matrix * vec4(position.xyz, 1.0)).xyz;
gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
#endif
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl
index a1da4b1f9a..40b7f9cf0e 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl
@@ -66,7 +66,7 @@ void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, ou
// I had thought blue_density and haze_density should have equal weighting,
// but attenuation due to haze_density tends to seem too strong
- vec3 combined_haze = blue_density + vec3(haze_density);
+ vec3 combined_haze = max(blue_density + vec3(haze_density), vec3(1e-6));
vec3 blue_weight = blue_density / combined_haze;
vec3 haze_weight = vec3(haze_density) / combined_haze;
@@ -98,7 +98,7 @@ void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, ou
haze_glow = max(haze_glow, .001); // set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot)
haze_glow *= glow.x;
// higher glow.x gives dimmer glow (because next step is 1 / "angle")
- haze_glow = pow(haze_glow, glow.z);
+ haze_glow = clamp(pow(haze_glow, glow.z), -10, 10);
// glow.z should be negative, so we're doing a sort of (1 / "angle") function
// add "minimum anti-solar illumination"
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
index acd32a81b3..7a1a54a77a 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
@@ -68,7 +68,6 @@ void waterClip(vec3 pos);
vec3 srgb_to_linear(vec3 c);
vec3 linear_to_srgb(vec3 c);
-vec2 encode_normal (vec3 n);
vec4 applySkyAndWaterFog(vec3 pos, vec3 additive, vec3 atten, vec4 color);
void calcAtmosphericVarsLinear(vec3 inPositionEye, vec3 norm, vec3 light_dir, out vec3 sunlit, out vec3 amblit, out vec3 atten, out vec3 additive);
@@ -78,6 +77,8 @@ float sampleDirectionalShadow(vec3 pos, vec3 norm, vec2 pos_screen);
float getAmbientClamp();
+void mirrorClip(vec3 pos);
+
void sampleReflectionProbesLegacy(inout vec3 ambenv, inout vec3 glossenv, inout vec3 legacyenv,
vec2 tc, vec3 pos, vec3 norm, float glossiness, float envIntensity, bool transparent, vec3 amblit_linear);
@@ -167,6 +168,8 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 diffuse, vec3 v, vec3 n, vec
void main()
{
+ mirrorClip(vary_position);
+
vec2 frag = vary_fragcoord.xy/vary_fragcoord.z*0.5+0.5;
vec4 pos = vec4(vary_position, 1.0);
diff --git a/indra/newview/app_settings/shaders/class2/deferred/pbralphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/pbralphaF.glsl
index 003dd05e6f..059c2a64ce 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/pbralphaF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/pbralphaF.glsl
@@ -90,6 +90,7 @@ float sampleDirectionalShadow(vec3 pos, vec3 norm, vec2 pos_screen);
void sampleReflectionProbes(inout vec3 ambenv, inout vec3 glossenv,
vec2 tc, vec3 pos, vec3 norm, float glossiness, bool transparent, vec3 amblit_linear);
+void mirrorClip(vec3 pos);
void waterClip(vec3 pos);
void calcDiffuseSpecular(vec3 baseColor, float metallic, inout vec3 diffuseColor, inout vec3 specularColor);
@@ -156,6 +157,8 @@ vec3 calcPointLightOrSpotLight(vec3 diffuseColor, vec3 specularColor,
void main()
{
+ mirrorClip(vary_position);
+
vec3 color = vec3(0,0,0);
vec3 light_dir = (sun_up_factor == 1) ? sun_dir : moon_dir;
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
index 1ea57516a4..1bd5f5a718 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
@@ -35,7 +35,7 @@ in vec2 vary_fragcoord;
uniform vec3 sun_dir;
uniform float shadow_bias;
-vec3 getNorm(vec2 pos_screen);
+vec4 getNorm(vec2 pos_screen);
vec4 getPosition(vec2 pos_screen);
float sampleDirectionalShadow(vec3 pos, vec3 norm, vec2 pos_screen);
@@ -45,13 +45,13 @@ void main()
{
vec2 pos_screen = vary_fragcoord.xy;
vec4 pos = getPosition(pos_screen);
- vec3 norm = getNorm(pos_screen);
+ vec4 norm = getNorm(pos_screen);
vec4 col;
- col.r = sampleDirectionalShadow(pos.xyz, norm, pos_screen);
+ col.r = sampleDirectionalShadow(pos.xyz, norm.xyz, pos_screen);
col.g = 1.0f;
- col.b = sampleSpotShadow(pos.xyz, norm, 0, pos_screen);
- col.a = sampleSpotShadow(pos.xyz, norm, 1, pos_screen);
+ col.b = sampleSpotShadow(pos.xyz, norm.xyz, 0, pos_screen);
+ col.a = sampleSpotShadow(pos.xyz, norm.xyz, 1, pos_screen);
frag_color = clamp(col, vec4(0), vec4(1));
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
index 0126e09d4c..e0333b6044 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
@@ -32,7 +32,7 @@ out vec4 frag_color;
in vec2 vary_fragcoord;
vec4 getPosition(vec2 pos_screen);
-vec3 getNorm(vec2 pos_screen);
+vec4 getNorm(vec2 pos_screen);
float sampleDirectionalShadow(vec3 shadow_pos, vec3 norm, vec2 pos_screen);
float sampleSpotShadow(vec3 shadow_pos, vec3 norm, int index, vec2 pos_screen);
@@ -42,13 +42,13 @@ void main()
{
vec2 pos_screen = vary_fragcoord.xy;
vec4 pos = getPosition(pos_screen);
- vec3 norm = getNorm(pos_screen);
+ vec4 norm = getNorm(pos_screen);
vec4 col;
- col.r = sampleDirectionalShadow(pos.xyz, norm, pos_screen);
- col.g = calcAmbientOcclusion(pos, norm, pos_screen);
- col.b = sampleSpotShadow(pos.xyz, norm, 0, pos_screen);
- col.a = sampleSpotShadow(pos.xyz, norm, 1, pos_screen);
+ col.r = sampleDirectionalShadow(pos.xyz, norm.xyz, pos_screen);
+ col.g = calcAmbientOcclusion(pos, norm.xyz, pos_screen);
+ col.b = sampleSpotShadow(pos.xyz, norm.xyz, 0, pos_screen);
+ col.a = sampleSpotShadow(pos.xyz, norm.xyz, 1, pos_screen);
frag_color = clamp(col, vec4(0), vec4(1));
}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/fullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class3/deferred/fullbrightShinyF.glsl
index 8430cca325..c382a9fbc0 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/fullbrightShinyF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/fullbrightShinyF.glsl
@@ -53,8 +53,11 @@ void sampleReflectionProbesLegacy(inout vec3 ambenv, inout vec3 glossenv, inout
void applyLegacyEnv(inout vec3 color, vec3 legacyenv, vec4 spec, vec3 pos, vec3 norm, float envIntensity);
+void mirrorClip(vec3 pos);
+
void main()
{
+ mirrorClip(vary_position);
#ifdef HAS_DIFFUSE_LOOKUP
vec4 color = diffuseLookup(vary_texcoord0.xy);
#else
diff --git a/indra/newview/app_settings/shaders/class3/deferred/hazeF.glsl b/indra/newview/app_settings/shaders/class3/deferred/hazeF.glsl
index 0b154e82ad..4af57e3b80 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/hazeF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/hazeF.glsl
@@ -33,7 +33,7 @@ uniform vec3 moon_dir;
uniform int sun_up_factor;
in vec2 vary_fragcoord;
-vec3 getNorm(vec2 pos_screen);
+vec4 getNorm(vec2 pos_screen);
vec4 getPositionWithDepth(vec2 pos_screen, float depth);
void calcAtmosphericVarsLinear(vec3 inPositionEye, vec3 norm, vec3 light_dir, out vec3 sunlit, out vec3 amblit, out vec3 atten, out vec3 additive);
@@ -53,8 +53,7 @@ void main()
vec2 tc = vary_fragcoord.xy;
float depth = getDepth(tc.xy);
vec4 pos = getPositionWithDepth(tc, depth);
- vec4 norm = texture(normalMap, tc);
- norm.xyz = getNorm(tc);
+ vec4 norm = getNorm(tc);
vec3 light_dir = (sun_up_factor == 1) ? sun_dir : moon_dir;
vec3 color = vec3(0);
diff --git a/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl
index ec1e49eeb4..2a20eb79d2 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl
@@ -45,6 +45,13 @@ void calcHalfVectors(vec3 lv, vec3 n, vec3 v, out vec3 h, out vec3 l, out float
vec3 srgb_to_linear(vec3 cs);
vec3 linear_to_srgb(vec3 cs);
+uniform mat4 modelview_matrix;
+uniform mat3 normal_matrix;
+
+in vec3 vary_position;
+
+void mirrorClip(vec3 pos);
+
#if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_BLEND)
out vec4 frag_color;
@@ -66,12 +73,12 @@ uniform vec4 morphFactor;
uniform vec3 camPosLocal;
uniform mat3 env_mat;
+uniform float is_mirror;
+
uniform vec3 sun_dir;
uniform vec3 moon_dir;
in vec2 vary_fragcoord;
-in vec3 vary_position;
-
uniform mat4 proj_mat;
uniform mat4 inv_proj;
uniform vec2 screen_res;
@@ -209,8 +216,6 @@ in vec3 vary_normal;
in vec4 vertex_color;
in vec2 vary_texcoord0;
-vec2 encode_normal(vec3 n);
-
// get the transformed normal and apply glossiness component from normal map
vec3 getNormal(inout float glossiness)
{
@@ -285,12 +290,12 @@ float getShadow(vec3 pos, vec3 norm)
void main()
{
+ mirrorClip(vary_position);
waterClip();
// diffcol == diffuse map combined with vertex color
vec4 diffcol = texture(diffuseMap, vary_texcoord0.xy);
diffcol.rgb *= vertex_color.rgb;
-
alphaMask(diffcol.a);
// spec == specular map combined with specular color
@@ -299,8 +304,6 @@ void main()
float glossiness = specular_color.a;
vec3 norm = getNormal(glossiness);
- vec2 abnormal = encode_normal(norm.xyz);
-
float emissive = getEmissive(diffcol);
#if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_BLEND)
@@ -407,10 +410,15 @@ void main()
#else // mode is not DIFFUSE_ALPHA_MODE_BLEND, encode to gbuffer
// deferred path // See: C++: addDeferredAttachment(), shader: softenLightF.glsl
- frag_data[0] = vec4(diffcol.rgb, emissive); // gbuffer is sRGB for legacy materials
- frag_data[1] = vec4(spec.rgb, glossiness); // XYZ = Specular color. W = Specular exponent.
- frag_data[2] = vec4(encode_normal(norm), env, GBUFFER_FLAG_HAS_ATMOS);; // XY = Normal. Z = Env. intensity. W = 1 skip atmos (mask off fog)
- frag_data[3] = vec4(0);
+
+ float flag = GBUFFER_FLAG_HAS_ATMOS;
+
+ frag_data[0] = max(vec4(diffcol.rgb, emissive), vec4(0)); // gbuffer is sRGB for legacy materials
+ frag_data[1] = max(vec4(spec.rgb, glossiness), vec4(0)); // XYZ = Specular color. W = Specular exponent.
+ frag_data[2] = vec4(norm, flag); // XY = Normal. Z = Env. intensity. W = 1 skip atmos (mask off fog)
+ frag_data[3] = vec4(env, 0, 0, 0);
+
#endif
}
+
diff --git a/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl
index ec8168465e..edfd6cbced 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl
@@ -48,7 +48,7 @@ in vec4 vary_fragcoord;
void calcHalfVectors(vec3 lv, vec3 n, vec3 v, out vec3 h, out vec3 l, out float nh, out float nl, out float nv, out float vh, out float lightDist);
float calcLegacyDistanceAttenuation(float distance, float falloff);
vec4 getPosition(vec2 pos_screen);
-vec4 getNormalEnvIntensityFlags(vec2 screenpos, out vec3 n, out float envIntensity);
+vec4 getNorm(vec2 screenpos);
vec2 getScreenXY(vec4 clip);
vec2 getScreenCoord(vec4 clip);
vec3 srgb_to_linear(vec3 c);
@@ -74,9 +74,8 @@ void main()
discard;
}
- float envIntensity; // not used for this shader
- vec3 n;
- vec4 norm = getNormalEnvIntensityFlags(tc, n, envIntensity); // need `norm.w` for GET_GBUFFER_FLAG()
+ vec4 norm = getNorm(tc); // need `norm.w` for GET_GBUFFER_FLAG()
+ vec3 n = norm.xyz;
vec4 spec = texture(specularRect, tc);
vec3 diffuse = texture(diffuseRect, tc).rgb;
diff --git a/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl
index 31af1208bd..60be9f4407 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl
@@ -52,7 +52,7 @@ uniform vec4 viewport;
void calcHalfVectors(vec3 lv, vec3 n, vec3 v, out vec3 h, out vec3 l, out float nh, out float nl, out float nv, out float vh, out float lightDist);
float calcLegacyDistanceAttenuation(float distance, float falloff);
-vec4 getNormalEnvIntensityFlags(vec2 screenpos, out vec3 n, out float envIntensity);
+vec4 getNorm(vec2 screenpos);
vec4 getPosition(vec2 pos_screen);
vec2 getScreenXY(vec4 clip);
vec2 getScreenCoord(vec4 clip);
@@ -72,9 +72,8 @@ void main()
vec2 tc = getScreenCoord(vary_fragcoord);
vec3 pos = getPosition(tc).xyz;
- float envIntensity;
- vec3 n;
- vec4 norm = getNormalEnvIntensityFlags(tc, n, envIntensity); // need `norm.w` for GET_GBUFFER_FLAG()
+ vec4 norm = getNorm(tc); // need `norm.w` for GET_GBUFFER_FLAG()
+ vec3 n = norm.xyz;
vec3 diffuse = texture(diffuseRect, tc).rgb;
vec4 spec = texture(specularRect, tc);
diff --git a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
index 906e66ecc8..90c84cc428 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
@@ -31,6 +31,7 @@ float tapScreenSpaceReflection(int totalSamples, vec2 tc, vec3 viewPos, vec3 n,
uniform samplerCubeArray reflectionProbes;
uniform samplerCubeArray irradianceProbes;
+
uniform sampler2D sceneMap;
uniform int cube_snapshot;
uniform float max_probe_lod;
@@ -47,6 +48,7 @@ layout (std140) uniform ReflectionProbes
/// box[0..2] - plane 0 .. 2 in [A,B,C,D] notation
// box[3][0..2] - plane thickness
mat4 refBox[MAX_REFMAP_COUNT];
+ mat4 heroBox;
// list of bounding spheres for reflection probes sorted by distance to camera (closest first)
vec4 refSphere[MAX_REFMAP_COUNT];
// extra parameters
@@ -55,6 +57,7 @@ layout (std140) uniform ReflectionProbes
// z - fade in
// w - znear
vec4 refParams[MAX_REFMAP_COUNT];
+ vec4 heroSphere;
// index of cube map in reflectionProbes for a corresponding reflection probe
// e.g. cube map channel of refSphere[2] is stored in refIndex[2]
// refIndex.x - cubemap channel in reflectionProbes
@@ -70,6 +73,10 @@ layout (std140) uniform ReflectionProbes
// number of reflection probes present in refSphere
int refmapCount;
+
+ int heroShape;
+ int heroMipCount;
+ int heroProbeCount;
};
// Inputs
@@ -365,11 +372,11 @@ return texCUBE(envMap, ReflDirectionWS);
// i - probe index in refBox/refSphere
// d - distance to nearest wall in clip space
// scale - scale of box, default 1.0
-vec3 boxIntersect(vec3 origin, vec3 dir, int i, out float d, float scale)
+vec3 boxIntersect(vec3 origin, vec3 dir, mat4 i, out float d, float scale)
{
// Intersection with OBB convert to unit box space
// Transform in local unit parallax cube space (scaled and rotated)
- mat4 clipToLocal = refBox[i];
+ mat4 clipToLocal = i;
vec3 RayLS = mat3(clipToLocal) * dir;
vec3 PositionLS = (clipToLocal * vec4(origin, 1.0)).xyz;
@@ -388,7 +395,7 @@ vec3 boxIntersect(vec3 origin, vec3 dir, int i, out float d, float scale)
return IntersectPositionCS;
}
-vec3 boxIntersect(vec3 origin, vec3 dir, int i, out float d)
+vec3 boxIntersect(vec3 origin, vec3 dir, mat4 i, out float d)
{
return boxIntersect(origin, dir, i, d, 1.0);
}
@@ -443,9 +450,9 @@ void boxIntersectionDebug( in vec3 ro, in vec3 p, vec3 boxSize, inout vec4 col)
}
-void boxIntersectDebug(vec3 origin, vec3 pos, int i, inout vec4 col)
+void boxIntersectDebug(vec3 origin, vec3 pos, mat4 i, inout vec4 col)
{
- mat4 clipToLocal = refBox[i];
+ mat4 clipToLocal = i;
// transform into unit cube space
origin = (clipToLocal * vec4(origin, 1.0)).xyz;
@@ -462,7 +469,7 @@ void boxIntersectDebug(vec3 origin, vec3 pos, int i, inout vec4 col)
// r - radius of probe influence volume
// i - index of probe in refSphere
// dw - distance weight
-float sphereWeight(vec3 pos, vec3 dir, vec3 origin, float r, int i, out float dw)
+float sphereWeight(vec3 pos, vec3 dir, vec3 origin, float r, vec4 i, out float dw)
{
float r1 = r * 0.5; // 50% of radius (outer sphere to start interpolating down)
vec3 delta = pos.xyz - origin;
@@ -471,7 +478,7 @@ float sphereWeight(vec3 pos, vec3 dir, vec3 origin, float r, int i, out float dw
float atten = 1.0 - max(d2 - r1, 0.0) / max((r - r1), 0.001);
float w = 1.0 / d2;
- w *= refParams[i].z;
+ w *= i.z;
dw = w * atten * max(r, 1.0)*4;
@@ -497,7 +504,7 @@ vec3 tapRefMap(vec3 pos, vec3 dir, out float w, out float dw, float lod, vec3 c,
if (refIndex[i].w < 0)
{ // box probe
float d = 0;
- v = boxIntersect(pos, dir, i, d);
+ v = boxIntersect(pos, dir, refBox[i], d);
w = max(d, 0.001);
}
@@ -511,7 +518,7 @@ vec3 tapRefMap(vec3 pos, vec3 dir, out float w, out float dw, float lod, vec3 c,
refIndex[i].w < 1 ? 4096.0*4096.0 : // <== effectively disable parallax correction for automatically placed probes to keep from bombing the world with obvious spheres
rr);
- w = sphereWeight(pos, dir, refSphere[i].xyz, r, i, dw);
+ w = sphereWeight(pos, dir, refSphere[i].xyz, r, refParams[i], dw);
}
v -= c;
@@ -537,7 +544,7 @@ vec3 tapIrradianceMap(vec3 pos, vec3 dir, out float w, out float dw, vec3 c, int
if (refIndex[i].w < 0)
{
float d = 0.0;
- v = boxIntersect(pos, dir, i, d, 3.0);
+ v = boxIntersect(pos, dir, refBox[i], d, 3.0);
w = max(d, 0.001);
}
else
@@ -551,7 +558,7 @@ vec3 tapIrradianceMap(vec3 pos, vec3 dir, out float w, out float dw, vec3 c, int
refIndex[i].w < 1 ? 4096.0*4096.0 : // <== effectively disable parallax correction for automatically placed probes to keep from bombing the world with obvious spheres
rr);
- w = sphereWeight(pos, dir, refSphere[i].xyz, r, i, dw);
+ w = sphereWeight(pos, dir, refSphere[i].xyz, r, refParams[i], dw);
}
v -= c;
@@ -681,6 +688,49 @@ vec3 sampleProbeAmbient(vec3 pos, vec3 dir, vec3 amblit)
return col[1]+col[0];
}
+#if defined(HERO_PROBES)
+
+uniform vec4 clipPlane;
+uniform samplerCubeArray heroProbes;
+
+void tapHeroProbe(inout vec3 glossenv, vec3 pos, vec3 norm, float glossiness)
+{
+ float clipDist = dot(pos.xyz, clipPlane.xyz) + clipPlane.w;
+ float w = 0;
+ float dw = 0;
+ float falloffMult = 10;
+ vec3 refnormpersp = reflect(pos.xyz, norm.xyz);
+ if (heroShape < 1)
+ {
+ float d = 0;
+ boxIntersect(pos, norm, heroBox, d, 1.0);
+
+ w = max(d, 0);
+ }
+ else
+ {
+ float r = heroSphere.w;
+
+ w = sphereWeight(pos, refnormpersp, heroSphere.xyz, r, vec4(1), dw);
+ }
+
+ clipDist = clipDist * 0.95 + 0.05;
+ clipDist = clamp(clipDist * falloffMult, 0, 1);
+ w = clamp(w * falloffMult * clipDist, 0, 1);
+ w = mix(0, w, clamp(glossiness - 0.75, 0, 1) * 4); // We only generate a quarter of the mips for the hero probes. Linearly interpolate between normal probes and hero probes based upon glossiness.
+ glossenv = mix(glossenv, textureLod(heroProbes, vec4(env_mat * refnormpersp, 0), (1.0-glossiness)*heroMipCount).xyz, w);
+}
+
+#else
+
+void tapHeroProbe(inout vec3 glossenv, vec3 pos, vec3 norm, float glossiness)
+{
+}
+
+#endif
+
+
+
void doProbeSample(inout vec3 ambenv, inout vec3 glossenv,
vec2 tc, vec3 pos, vec3 norm, float glossiness, bool transparent, vec3 amblit)
{
@@ -712,6 +762,8 @@ void doProbeSample(inout vec3 ambenv, inout vec3 glossenv,
glossenv = mix(glossenv, ssr.rgb, ssr.a);
}
#endif
+
+ tapHeroProbe(glossenv, pos, norm, glossiness);
}
void sampleReflectionProbes(inout vec3 ambenv, inout vec3 glossenv,
@@ -747,7 +799,7 @@ void debugTapRefMap(vec3 pos, vec3 dir, float depth, int i, inout vec4 col)
{
if (refIndex[i].w < 0)
{
- boxIntersectDebug(origin, pos, i, col);
+ boxIntersectDebug(origin, pos, refBox[i], col);
}
else
{
@@ -799,6 +851,7 @@ void sampleReflectionProbesLegacy(inout vec3 ambenv, inout vec3 glossenv, inout
{
float lod = (1.0-glossiness)*reflection_lods;
glossenv = sampleProbes(pos, normalize(refnormpersp), lod);
+
}
if (envIntensity > 0.0)
@@ -826,6 +879,9 @@ void sampleReflectionProbesLegacy(inout vec3 ambenv, inout vec3 glossenv, inout
}
#endif
+ tapHeroProbe(glossenv, pos, norm, glossiness);
+ tapHeroProbe(legacyenv, pos, norm, 1.0);
+
glossenv = clamp(glossenv, vec3(0), vec3(10));
}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/screenSpaceReflPostF.glsl b/indra/newview/app_settings/shaders/class3/deferred/screenSpaceReflPostF.glsl
index dbf20fe2d8..deb276ef9d 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/screenSpaceReflPostF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/screenSpaceReflPostF.glsl
@@ -40,14 +40,13 @@ uniform sampler2D specularRect;
uniform sampler2D diffuseRect;
uniform sampler2D diffuseMap;
-vec3 getNorm(vec2 screenpos);
+vec4 getNorm(vec2 screenpos);
float getDepth(vec2 pos_screen);
float linearDepth(float d, float znear, float zfar);
float linearDepth01(float d, float znear, float zfar);
vec4 getPositionWithDepth(vec2 pos_screen, float depth);
vec4 getPosition(vec2 pos_screen);
-vec4 getNormalEnvIntensityFlags(vec2 screenpos, out vec3 n, out float envIntensity);
float random (vec2 uv);
@@ -57,9 +56,7 @@ void main()
{
vec2 tc = vary_fragcoord.xy;
float depth = linearDepth01(getDepth(tc), zNear, zFar);
- float envIntensity;
- vec3 n;
- vec4 norm = getNormalEnvIntensityFlags(tc, n, envIntensity); // need `norm.w` for GET_GBUFFER_FLAG()
+ vec4 norm = getNorm(tc); // need `norm.w` for GET_GBUFFER_FLAG()
vec3 pos = getPositionWithDepth(tc, getDepth(tc)).xyz;
vec4 spec = texture(specularRect, tc);
vec2 hitpixel;
@@ -84,7 +81,7 @@ void main()
vec4 collectedColor = vec4(0);
- float w = tapScreenSpaceReflection(4, tc, pos, n, collectedColor, diffuseMap, 0);
+ float w = tapScreenSpaceReflection(4, tc, pos, norm.xyz, collectedColor, diffuseMap, 0);
collectedColor.rgb *= specCol.rgb;
diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
index 5e8fe9301a..96c32734e4 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
@@ -50,6 +50,7 @@ uniform float ssao_irradiance_max;
#endif
// Inputs
+uniform vec4 clipPlane;
uniform mat3 env_mat;
uniform mat3 ssao_effect_mat;
uniform vec3 sun_dir;
@@ -60,7 +61,7 @@ in vec2 vary_fragcoord;
uniform mat4 inv_proj;
uniform vec2 screen_res;
-vec3 getNorm(vec2 pos_screen);
+vec4 getNorm(vec2 pos_screen);
vec4 getPositionWithDepth(vec2 pos_screen, float depth);
void calcAtmosphericVarsLinear(vec3 inPositionEye, vec3 norm, vec3 light_dir, out vec3 sunlit, out vec3 amblit, out vec3 atten, out vec3 additive);
@@ -127,13 +128,13 @@ void main()
vec2 tc = vary_fragcoord.xy;
float depth = getDepth(tc.xy);
vec4 pos = getPositionWithDepth(tc, depth);
- vec4 norm = texture(normalMap, tc);
- float envIntensity = norm.z;
- norm.xyz = getNorm(tc);
+ vec4 norm = getNorm(tc);
+ vec3 colorEmissive = texture(emissiveRect, tc).rgb;
+ float envIntensity = colorEmissive.r;
vec3 light_dir = (sun_up_factor == 1) ? sun_dir : moon_dir;
vec4 baseColor = texture(diffuseRect, tc);
- vec4 spec = texture(specularRect, vary_fragcoord.xy); // NOTE: PBR linear Emissive
+ vec4 spec = texture(specularRect, tc); // NOTE: PBR linear Emissive
#if defined(HAS_SUN_SHADOW) || defined(HAS_SSAO)
vec2 scol_ambocc = texture(lightMap, vary_fragcoord.xy).rg;
@@ -168,17 +169,17 @@ void main()
if (GET_GBUFFER_FLAG(GBUFFER_FLAG_HAS_PBR))
{
- vec3 orm = texture(specularRect, tc).rgb;
+ vec3 orm = spec.rgb;
float perceptualRoughness = orm.g;
float metallic = orm.b;
float ao = orm.r;
- vec3 colorEmissive = texture(emissiveRect, tc).rgb;
+
// PBR IBL
float gloss = 1.0 - perceptualRoughness;
sampleReflectionProbes(irradiance, radiance, tc, pos.xyz, norm.xyz, gloss, false, amblit_linear);
-
+
adjustIrradiance(irradiance, ambocc);
vec3 diffuseColor;
@@ -188,10 +189,15 @@ void main()
vec3 v = -normalize(pos.xyz);
color = pbrBaseLight(diffuseColor, specularColor, metallic, v, norm.xyz, perceptualRoughness, light_dir, sunlit_linear, scol, radiance, irradiance, colorEmissive, ao, additive, atten);
}
- else if (!GET_GBUFFER_FLAG(GBUFFER_FLAG_HAS_ATMOS))
+ else if (GET_GBUFFER_FLAG(GBUFFER_FLAG_HAS_HDRI))
+ {
+ // actual HDRI sky, just copy color value
+ color = colorEmissive.rgb;
+ }
+ else if (GET_GBUFFER_FLAG(GBUFFER_FLAG_SKIP_ATMOS))
{
- //should only be true of WL sky, just port over base color value
- color = texture(emissiveRect, tc).rgb;
+ //should only be true of WL sky, port over base color value and scale for fake HDR
+ color = colorEmissive.rgb;
color = srgb_to_linear(color);
color *= sky_hdr_scale;
}
@@ -209,7 +215,7 @@ void main()
vec3 legacyenv = vec3(0);
sampleReflectionProbesLegacy(irradiance, glossenv, legacyenv, tc, pos.xyz, norm.xyz, spec.a, envIntensity, false, amblit_linear);
-
+
adjustIrradiance(irradiance, ambocc);
// apply lambertian IBL only (see pbrIbl)
@@ -244,6 +250,7 @@ void main()
// add radiance map
applyGlossEnv(color, glossenv, spec, pos.xyz, norm.xyz);
+
}
color.rgb = mix(color.rgb, baseColor.rgb, baseColor.a);
diff --git a/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl
index d31b37fb60..319fa86148 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl
@@ -72,7 +72,7 @@ uniform mat4 inv_proj;
void calcHalfVectors(vec3 lv, vec3 n, vec3 v, out vec3 h, out vec3 l, out float nh, out float nl, out float nv, out float vh, out float lightDist);
float calcLegacyDistanceAttenuation(float distance, float falloff);
bool clipProjectedLightVars(vec3 center, vec3 pos, out float dist, out float l_dist, out vec3 lv, out vec4 proj_tc );
-vec4 getNormalEnvIntensityFlags(vec2 screenpos, out vec3 n, out float envIntensity);
+vec4 getNorm(vec2 screenpos);
vec3 getProjectedLightAmbiance(float amb_da, float attenuation, float lit, float nl, float noise, vec2 projected_uv);
vec3 getProjectedLightDiffuseColor(float light_distance, vec2 projected_uv );
vec2 getScreenCoord(vec4 clip);
@@ -121,9 +121,8 @@ void main()
shadow = clamp(shadow, 0.0, 1.0);
}
- float envIntensity;
- vec3 n;
- vec4 norm = getNormalEnvIntensityFlags(tc, n, envIntensity);
+ vec4 norm = getNorm(tc);
+ vec3 n = norm.xyz;
float dist_atten = calcLegacyDistanceAttenuation(dist, falloff);
if (dist_atten <= 0.0)
@@ -145,7 +144,6 @@ void main()
if (GET_GBUFFER_FLAG(GBUFFER_FLAG_HAS_PBR))
{
- vec3 colorEmissive = texture(emissiveRect, tc).rgb;
vec3 orm = spec.rgb;
float perceptualRoughness = orm.g;
float metallic = orm.b;
@@ -182,6 +180,8 @@ void main()
}
else
{
+ float envIntensity = texture(emissiveRect, tc).r;
+
diffuse = srgb_to_linear(diffuse);
spec.rgb = srgb_to_linear(spec.rgb);
diff --git a/indra/newview/app_settings/shaders/class3/deferred/waterHazeF.glsl b/indra/newview/app_settings/shaders/class3/deferred/waterHazeF.glsl
index f6b8299f91..f6bef1e498 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/waterHazeF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/waterHazeF.glsl
@@ -56,7 +56,6 @@ void main()
}
vec4 pos = getPositionWithDepth(tc, depth);
- vec4 norm = texture(normalMap, tc);
vec4 fogged = getWaterFogView(pos.xyz);
diff --git a/indra/newview/app_settings/shaders/class3/environment/underWaterF.glsl b/indra/newview/app_settings/shaders/class3/environment/underWaterF.glsl
index 223e55eb69..ef086fc3be 100644
--- a/indra/newview/app_settings/shaders/class3/environment/underWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class3/environment/underWaterF.glsl
@@ -55,9 +55,11 @@ in vec4 view;
in vec3 vary_position;
vec4 applyWaterFogViewLinearNoClip(vec3 pos, vec4 color);
+void mirrorClip(vec3 position);
void main()
{
+ mirrorClip(vary_position);
vec4 color;
//get detail normals
diff --git a/indra/newview/app_settings/shaders/class3/environment/waterF.glsl b/indra/newview/app_settings/shaders/class3/environment/waterF.glsl
index b364e454e8..b2a81aa025 100644
--- a/indra/newview/app_settings/shaders/class3/environment/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class3/environment/waterF.glsl
@@ -35,6 +35,8 @@ vec3 scaleSoftClipFragLinear(vec3 l);
void calcAtmosphericVarsLinear(vec3 inPositionEye, vec3 norm, vec3 light_dir, out vec3 sunlit, out vec3 amblit, out vec3 atten, out vec3 additive);
vec4 applyWaterFogViewLinear(vec3 pos, vec4 color);
+void mirrorClip(vec3 pos);
+
// PBR interface
vec2 BRDF(float NoV, float roughness);
@@ -129,6 +131,7 @@ vec3 getPositionWithNDC(vec3 ndc);
void main()
{
+ mirrorClip(vary_position);
vN = vary_normal;
vT = vary_tangent;
vB = cross(vN, vT);
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index f92d9a2a0e..3e1e235fcd 100644
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -1,4 +1,4 @@
-version 59
+version 60
// The version number above should be incremented IF AND ONLY IF some
// change has been made that is sufficiently important to justify
// resetting the graphics preferences of all users to the recommended
@@ -48,6 +48,8 @@ RenderReflectionsEnabled 1 1
RenderReflectionProbeDetail 1 2
RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
+RenderTerrainPBRDetail 1 0
+RenderTerrainPBRPlanarSampleCount 1 3
RenderTreeLODFactor 1 1.0
RenderVBOEnable 1 1
RenderVBOMappingDisable 1 1
@@ -94,6 +96,8 @@ RenderReflectionsEnabled 1 1
RenderReflectionProbeDetail 1 0
RenderTerrainDetail 1 0
RenderTerrainLODFactor 1 1
+RenderTerrainPBRDetail 1 -4
+RenderTerrainPBRPlanarSampleCount 1 1
RenderTreeLODFactor 1 0
RenderVolumeLODFactor 1 1.125
RenderDeferredSSAO 1 0
@@ -103,6 +107,11 @@ WLSkyDetail 1 96
RenderFSAASamples 1 0
RenderScreenSpaceReflections 1 0
RenderReflectionProbeLevel 1 0
+RenderMirrors 1 0
+RenderHeroProbeResolution 1 256
+RenderHeroProbeDistance 1 4
+RenderHeroProbeUpdateRate 1 4
+RenderHeroProbeConservativeUpdateMultiplier 1 16
//
// Medium Low Graphics Settings
@@ -123,6 +132,8 @@ RenderReflectionsEnabled 1 1
RenderReflectionProbeDetail 1 0
RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 1.0
+RenderTerrainPBRDetail 1 -1
+RenderTerrainPBRPlanarSampleCount 1 1
RenderTreeLODFactor 1 0.5
RenderVolumeLODFactor 1 1.125
RenderDeferredSSAO 1 0
@@ -132,6 +143,11 @@ WLSkyDetail 1 96
RenderFSAASamples 1 0
RenderScreenSpaceReflections 1 0
RenderReflectionProbeLevel 1 0
+RenderMirrors 1 0
+RenderHeroProbeResolution 1 256
+RenderHeroProbeDistance 1 6
+RenderHeroProbeUpdateRate 1 3
+RenderHeroProbeConservativeUpdateMultiplier 1 16
//
// Medium Graphics Settings (standard)
@@ -150,6 +166,8 @@ RenderLocalLightCount 1 512
RenderTransparentWater 1 0
RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
+RenderTerrainPBRDetail 1 0
+RenderTerrainPBRPlanarSampleCount 1 1
RenderTreeLODFactor 1 0.5
RenderVolumeLODFactor 1 1.25
RenderDeferredSSAO 1 0
@@ -161,6 +179,11 @@ RenderReflectionsEnabled 1 1
RenderReflectionProbeDetail 1 0
RenderScreenSpaceReflections 1 0
RenderReflectionProbeLevel 1 1
+RenderMirrors 1 0
+RenderHeroProbeResolution 1 512
+RenderHeroProbeDistance 1 6
+RenderHeroProbeUpdateRate 1 3
+RenderHeroProbeConservativeUpdateMultiplier 1 16
//
// Medium High Graphics Settings
@@ -179,6 +202,8 @@ RenderLocalLightCount 1 1024
RenderTransparentWater 1 1
RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
+RenderTerrainPBRDetail 1 0
+RenderTerrainPBRPlanarSampleCount 1 1
RenderTreeLODFactor 1 0.5
RenderVolumeLODFactor 1 1.375
RenderDeferredSSAO 1 0
@@ -190,6 +215,11 @@ RenderReflectionsEnabled 1 1
RenderReflectionProbeDetail 1 1
RenderScreenSpaceReflections 1 0
RenderReflectionProbeLevel 1 2
+RenderMirrors 1 0
+RenderHeroProbeResolution 1 512
+RenderHeroProbeDistance 1 6
+RenderHeroProbeUpdateRate 1 2
+RenderHeroProbeConservativeUpdateMultiplier 1 8
//
// High Graphics Settings (SSAO + sun shadows)
@@ -208,6 +238,8 @@ RenderLocalLightCount 1 2048
RenderTransparentWater 1 1
RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
+RenderTerrainPBRDetail 1 0
+RenderTerrainPBRPlanarSampleCount 1 3
RenderTreeLODFactor 1 0.5
RenderVolumeLODFactor 1 1.5
RenderDeferredSSAO 1 1
@@ -219,6 +251,11 @@ RenderReflectionsEnabled 1 1
RenderReflectionProbeDetail 1 1
RenderScreenSpaceReflections 1 0
RenderReflectionProbeLevel 1 3
+RenderMirrors 1 0
+RenderHeroProbeResolution 1 1024
+RenderHeroProbeDistance 1 8
+RenderHeroProbeUpdateRate 1 2
+RenderHeroProbeConservativeUpdateMultiplier 1 8
//
// High Ultra Graphics Settings (deferred + SSAO + all shadows)
@@ -236,6 +273,8 @@ RenderMaxPartCount 1 4096
RenderLocalLightCount 1 4096
RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
+RenderTerrainPBRDetail 1 0
+RenderTerrainPBRPlanarSampleCount 1 3
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
RenderVolumeLODFactor 1 1.75
@@ -248,6 +287,11 @@ RenderReflectionsEnabled 1 1
RenderReflectionProbeDetail 1 1
RenderScreenSpaceReflections 1 0
RenderReflectionProbeLevel 1 3
+RenderMirrors 1 0
+RenderHeroProbeResolution 1 1024
+RenderHeroProbeDistance 1 16
+RenderHeroProbeUpdateRate 1 1
+RenderHeroProbeConservativeUpdateMultiplier 1 4
//
// Ultra graphics (REALLY PURTY!)
@@ -264,6 +308,8 @@ RenderLocalLightCount 1 8192
RenderMaxPartCount 1 8192
RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
+RenderTerrainPBRDetail 1 0
+RenderTerrainPBRPlanarSampleCount 1 3
RenderTransparentWater 1 1
RenderTreeLODFactor 1 1.0
RenderVolumeLODFactor 1 2.0
@@ -277,6 +323,11 @@ RenderReflectionsEnabled 1 1
RenderReflectionProbeDetail 1 1
RenderScreenSpaceReflections 1 0
RenderReflectionProbeLevel 1 3
+RenderMirrors 1 1
+RenderHeroProbeResolution 1 2048
+RenderHeroProbeDistance 1 16
+RenderHeroProbeUpdateRate 1 1
+RenderHeroProbeConservativeUpdateMultiplier 1 4
//
// Class Unknown Hardware (unknown)
@@ -285,6 +336,7 @@ list Unknown
RenderShadowDetail 1 0
RenderDeferredSSAO 1 0
RenderUseAdvancedAtmospherics 1 0
+RenderMirrors 1 0
//
// VRAM > 512MB
@@ -306,6 +358,7 @@ RenderTransparentWater 1 0
RenderDeferredSSAO 0 0
RenderShadowDetail 0 0
RenderReflectionProbeDetail 0 -1
+RenderMirrors 0 0
list Intel
RenderAnisotropic 1 0
@@ -320,4 +373,7 @@ list GL3
RenderFSAASamples 0 0
RenderReflectionsEnabled 0 0
RenderReflectionProbeDetail 0 0
+RenderMirrors 0 0
+list TexUnit16orLess
+RenderTerrainPBRDetail 1 -1
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index 40aaccc8cb..2ffefadcc1 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -1,4 +1,4 @@
-version 56
+version 57
// The version number above should be incremented IF AND ONLY IF some
// change has been made that is sufficiently important to justify
// resetting the graphics preferences of all users to the recommended
@@ -45,6 +45,8 @@ RenderObjectBump 1 1
RenderLocalLightCount 1 4096
RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
+RenderTerrainPBRDetail 1 0
+RenderTerrainPBRPlanarSampleCount 1 3
RenderTransparentWater 1 1
RenderTreeLODFactor 1 1.0
RenderVBOEnable 1 1
@@ -89,6 +91,8 @@ RenderLocalLightCount 1 8
RenderMaxPartCount 1 0
RenderTerrainDetail 1 0
RenderTerrainLODFactor 1 1
+RenderTerrainPBRDetail 1 -4
+RenderTerrainPBRPlanarSampleCount 1 1
RenderTransparentWater 1 0
RenderTreeLODFactor 1 0
RenderVolumeLODFactor 1 1.125
@@ -101,6 +105,11 @@ RenderReflectionsEnabled 1 1
RenderReflectionProbeDetail 1 0
RenderScreenSpaceReflections 1 0
RenderReflectionProbeLevel 1 0
+RenderMirrors 1 0
+RenderHeroProbeResolution 1 256
+RenderHeroProbeDistance 1 4
+RenderHeroProbeUpdateRate 1 4
+RenderHeroProbeConservativeUpdateMultiplier 1 16
//
// Medium Low Graphics Settings
@@ -118,6 +127,8 @@ RenderMaxPartCount 1 2048
RenderLocalLightCount 1 256
RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 1.0
+RenderTerrainPBRDetail 1 -1
+RenderTerrainPBRPlanarSampleCount 1 1
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
RenderVolumeLODFactor 1 1.125
@@ -130,6 +141,11 @@ RenderReflectionsEnabled 1 1
RenderReflectionProbeDetail 1 0
RenderScreenSpaceReflections 1 0
RenderReflectionProbeLevel 1 0
+RenderMirrors 1 0
+RenderHeroProbeResolution 1 256
+RenderHeroProbeDistance 1 6
+RenderHeroProbeUpdateRate 1 3
+RenderHeroProbeConservativeUpdateMultiplier 1 16
//
// Medium Graphics Settings (standard)
@@ -147,6 +163,8 @@ RenderMaxPartCount 1 4096
RenderLocalLightCount 1 512
RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
+RenderTerrainPBRDetail 1 0
+RenderTerrainPBRPlanarSampleCount 1 1
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
RenderVolumeLODFactor 1 1.25
@@ -159,6 +177,11 @@ RenderReflectionsEnabled 1 1
RenderReflectionProbeDetail 1 0
RenderScreenSpaceReflections 1 0
RenderReflectionProbeLevel 1 0
+RenderMirrors 1 0
+RenderHeroProbeResolution 1 512
+RenderHeroProbeDistance 1 6
+RenderHeroProbeUpdateRate 1 3
+RenderHeroProbeConservativeUpdateMultiplier 1 16
//
// Medium High Graphics Settings
@@ -176,6 +199,8 @@ RenderMaxPartCount 1 4096
RenderLocalLightCount 1 1024
RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
+RenderTerrainPBRDetail 1 0
+RenderTerrainPBRPlanarSampleCount 1 1
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
RenderVolumeLODFactor 1 1.375
@@ -188,6 +213,11 @@ RenderReflectionsEnabled 1 1
RenderReflectionProbeDetail 1 0
RenderScreenSpaceReflections 1 0
RenderReflectionProbeLevel 1 0
+RenderMirrors 1 0
+RenderHeroProbeResolution 1 512
+RenderHeroProbeDistance 1 6
+RenderHeroProbeUpdateRate 1 2
+RenderHeroProbeConservativeUpdateMultiplier 1 8
//
// High Graphics Settings (SSAO + sun shadows)
@@ -205,6 +235,8 @@ RenderMaxPartCount 1 4096
RenderLocalLightCount 1 2048
RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
+RenderTerrainPBRDetail 1 0
+RenderTerrainPBRPlanarSampleCount 1 3
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
RenderVolumeLODFactor 1 1.5
@@ -217,6 +249,11 @@ RenderReflectionsEnabled 1 1
RenderReflectionProbeDetail 1 1
RenderScreenSpaceReflections 1 0
RenderReflectionProbeLevel 1 1
+RenderMirrors 1 0
+RenderHeroProbeResolution 1 1024
+RenderHeroProbeDistance 1 8
+RenderHeroProbeUpdateRate 1 2
+RenderHeroProbeConservativeUpdateMultiplier 1 8
//
// High Ultra Graphics Settings (SSAO + all shadows)
@@ -234,6 +271,8 @@ RenderMaxPartCount 1 4096
RenderLocalLightCount 1 4096
RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
+RenderTerrainPBRDetail 1 0
+RenderTerrainPBRPlanarSampleCount 1 3
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
RenderVolumeLODFactor 1 1.75
@@ -246,6 +285,11 @@ RenderReflectionsEnabled 1 1
RenderReflectionProbeDetail 1 1
RenderScreenSpaceReflections 1 0
RenderReflectionProbeLevel 1 2
+RenderMirrors 1 0
+RenderHeroProbeResolution 1 1024
+RenderHeroProbeDistance 1 16
+RenderHeroProbeUpdateRate 1 1
+RenderHeroProbeConservativeUpdateMultiplier 1 4
//
// Ultra graphics (REALLY PURTY!)
@@ -262,6 +306,8 @@ RenderLocalLightCount 1 8192
RenderMaxPartCount 1 8192
RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
+RenderTerrainPBRDetail 1 0
+RenderTerrainPBRPlanarSampleCount 1 3
RenderTransparentWater 1 1
RenderTreeLODFactor 1 1.0
RenderVolumeLODFactor 1 2.0
@@ -275,6 +321,11 @@ RenderReflectionsEnabled 1 1
RenderReflectionProbeDetail 1 1
RenderScreenSpaceReflections 1 0
RenderReflectionProbeLevel 1 3
+RenderMirrors 1 1
+RenderHeroProbeResolution 1 2048
+RenderHeroProbeDistance 1 16
+RenderHeroProbeUpdateRate 1 1
+RenderHeroProbeConservativeUpdateMultiplier 1 4
//
// Class Unknown Hardware (unknown)
@@ -283,6 +334,7 @@ list Unknown
RenderShadowDetail 1 0
RenderDeferredSSAO 1 0
RenderUseAdvancedAtmospherics 1 0
+RenderMirrors 1 0
//
@@ -304,10 +356,14 @@ RenderTerrainDetail 1 0
RenderDeferredSSAO 0 0
RenderUseAdvancedAtmospherics 0 0
RenderShadowDetail 0 0
+RenderMirrors 0 0
list TexUnit8orLess
RenderDeferredSSAO 0 0
+list TexUnit16orLess
+RenderTerrainPBRDetail 1 -1
+
list AMD
RenderDeferredSSAO 1 0
@@ -319,3 +375,4 @@ list GL3
RenderFSAASamples 0 0
RenderReflectionProbeDetail 0 0
RenderReflectionsEnabled 0 0
+RenderMirrors 0 0
diff --git a/indra/newview/gltf/accessor.cpp b/indra/newview/gltf/accessor.cpp
new file mode 100644
index 0000000000..9bfdc2afa6
--- /dev/null
+++ b/indra/newview/gltf/accessor.cpp
@@ -0,0 +1,84 @@
+/**
+ * @file accessor.cpp
+ * @brief LL GLTF Implementation
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, 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 "asset.h"
+
+using namespace LL::GLTF;
+
+void Buffer::erase(Asset& asset, S32 offset, S32 length)
+{
+ S32 idx = this - &asset.mBuffers[0];
+
+ mData.erase(mData.begin() + offset, mData.begin() + offset + length);
+
+ for (BufferView& view : asset.mBufferViews)
+ {
+ if (view.mBuffer == idx)
+ {
+ if (view.mByteOffset >= offset)
+ {
+ view.mByteOffset -= length;
+ }
+ }
+ }
+}
+
+const Buffer& Buffer::operator=(const tinygltf::Buffer& src)
+{
+ mData = src.data;
+ mName = src.name;
+ mUri = src.uri;
+ return *this;
+}
+
+const BufferView& BufferView::operator=(const tinygltf::BufferView& src)
+{
+ mBuffer = src.buffer;
+ mByteLength = src.byteLength;
+ mByteOffset = src.byteOffset;
+ mByteStride = src.byteStride;
+ mTarget = src.target;
+ mName = src.name;
+ return *this;
+}
+
+const Accessor& Accessor::operator=(const tinygltf::Accessor& src)
+{
+ mBufferView = src.bufferView;
+ mByteOffset = src.byteOffset;
+ mComponentType = src.componentType;
+ mCount = src.count;
+ mType = src.type;
+ mNormalized = src.normalized;
+ mName = src.name;
+ mMax = src.maxValues;
+ mMin = src.minValues;
+
+ return *this;
+}
+
diff --git a/indra/newview/gltf/accessor.h b/indra/newview/gltf/accessor.h
new file mode 100644
index 0000000000..6849cd8609
--- /dev/null
+++ b/indra/newview/gltf/accessor.h
@@ -0,0 +1,99 @@
+#pragma once
+
+/**
+ * @file asset.h
+ * @brief LL GLTF Implementation
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, 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 "../lltinygltfhelper.h"
+#include "llstrider.h"
+
+// LL GLTF Implementation
+namespace LL
+{
+ namespace GLTF
+ {
+ class Asset;
+
+ constexpr S32 INVALID_INDEX = -1;
+
+ class Buffer
+ {
+ public:
+ std::vector<U8> mData;
+ std::string mName;
+ std::string mUri;
+
+ // erase the given range from this buffer.
+ // also updates all buffer views in given asset that reference this buffer
+ void erase(Asset& asset, S32 offset, S32 length);
+
+ const Buffer& operator=(const tinygltf::Buffer& src);
+ };
+
+ class BufferView
+ {
+ public:
+ S32 mBuffer = INVALID_INDEX;
+ S32 mByteLength;
+ S32 mByteOffset;
+ S32 mByteStride;
+ S32 mTarget;
+ S32 mComponentType;
+
+ std::string mName;
+
+ const BufferView& operator=(const tinygltf::BufferView& src);
+
+ };
+
+ class Accessor
+ {
+ public:
+ S32 mBufferView = INVALID_INDEX;
+ S32 mByteOffset;
+ S32 mComponentType;
+ S32 mCount;
+ std::vector<double> mMax;
+ std::vector<double> mMin;
+
+ enum class Type : S32
+ {
+ SCALAR = TINYGLTF_TYPE_SCALAR,
+ VEC2 = TINYGLTF_TYPE_VEC2,
+ VEC3 = TINYGLTF_TYPE_VEC3,
+ VEC4 = TINYGLTF_TYPE_VEC4,
+ MAT2 = TINYGLTF_TYPE_MAT2,
+ MAT3 = TINYGLTF_TYPE_MAT3,
+ MAT4 = TINYGLTF_TYPE_MAT4
+ };
+
+ S32 mType;
+ bool mNormalized;
+ std::string mName;
+
+ const Accessor& operator=(const tinygltf::Accessor& src);
+ };
+ }
+}
diff --git a/indra/newview/gltf/animation.cpp b/indra/newview/gltf/animation.cpp
new file mode 100644
index 0000000000..da6d02b356
--- /dev/null
+++ b/indra/newview/gltf/animation.cpp
@@ -0,0 +1,287 @@
+/**
+ * @file animation.cpp
+ * @brief LL GLTF Animation Implementation
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, 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 "asset.h"
+#include "buffer_util.h"
+
+using namespace LL::GLTF;
+
+void Animation::allocateGLResources(Asset& asset)
+{
+ if (!mSamplers.empty())
+ {
+ mMinTime = FLT_MAX;
+ mMaxTime = -FLT_MAX;
+ for (auto& sampler : mSamplers)
+ {
+ sampler.allocateGLResources(asset);
+ mMinTime = llmin(sampler.mMinTime, mMinTime);
+ mMaxTime = llmax(sampler.mMaxTime, mMaxTime);
+ }
+ }
+ else
+ {
+ mMinTime = mMaxTime = 0.f;
+ }
+
+ for (auto& channel : mRotationChannels)
+ {
+ channel.allocateGLResources(asset, mSamplers[channel.mSampler]);
+ }
+
+ for (auto& channel : mTranslationChannels)
+ {
+ channel.allocateGLResources(asset, mSamplers[channel.mSampler]);
+ }
+}
+
+void Animation::update(Asset& asset, F32 dt)
+{
+ mTime += dt;
+
+ apply(asset, mTime);
+}
+
+void Animation::apply(Asset& asset, float time)
+{
+ // convert time to animation loop time
+ time = fmod(time, mMaxTime - mMinTime) + mMinTime;
+
+ // apply each channel
+ for (auto& channel : mRotationChannels)
+ {
+ channel.apply(asset, mSamplers[channel.mSampler], time);
+ }
+
+ for (auto& channel : mTranslationChannels)
+ {
+ channel.apply(asset, mSamplers[channel.mSampler], time);
+ }
+};
+
+
+void Animation::Sampler::allocateGLResources(Asset& asset)
+{
+ Accessor& accessor = asset.mAccessors[mInput];
+ mMinTime = accessor.mMin[0];
+ mMaxTime = accessor.mMax[0];
+
+ mFrameTimes.resize(accessor.mCount);
+
+ LLStrider<F32> frame_times = mFrameTimes.data();
+ copy(asset, accessor, frame_times);
+}
+
+void Animation::Sampler::getFrameInfo(Asset& asset, F32 time, U32& frameIndex, F32& t)
+{
+ if (time < mMinTime)
+ {
+ frameIndex = 0;
+ t = 0.0f;
+ return;
+ }
+
+ if (mFrameTimes.size() > 1)
+ {
+ if (time > mMaxTime)
+ {
+ frameIndex = mFrameTimes.size() - 2;
+ t = 1.0f;
+ return;
+ }
+
+ frameIndex = mFrameTimes.size() - 2;
+ t = 1.f;
+
+ for (U32 i = 0; i < mFrameTimes.size() - 1; i++)
+ {
+ if (time >= mFrameTimes[i] && time < mFrameTimes[i + 1])
+ {
+ frameIndex = i;
+ t = (time - mFrameTimes[i]) / (mFrameTimes[i + 1] - mFrameTimes[i]);
+ return;
+ }
+ }
+ }
+ else
+ {
+ frameIndex = 0;
+ t = 0.0f;
+ }
+}
+
+void Animation::RotationChannel::allocateGLResources(Asset& asset, Animation::Sampler& sampler)
+{
+ Accessor& accessor = asset.mAccessors[sampler.mOutput];
+
+ copy(asset, accessor, mRotations);
+}
+
+void Animation::RotationChannel::apply(Asset& asset, Sampler& sampler, F32 time)
+{
+ U32 frameIndex;
+ F32 t;
+
+ Node& node = asset.mNodes[mTarget.mNode];
+
+ sampler.getFrameInfo(asset, time, frameIndex, t);
+
+ if (sampler.mFrameTimes.size() == 1)
+ {
+ node.setRotation(mRotations[0]);
+ }
+ else
+ {
+ // interpolate
+ LLQuaternion q0(mRotations[frameIndex].get_value());
+ LLQuaternion q1(mRotations[frameIndex + 1].get_value());
+
+ LLQuaternion qf = slerp(t, q0, q1);
+
+ qf.normalize();
+ node.setRotation(glh::quaternionf(qf.mQ));
+ }
+}
+
+void Animation::TranslationChannel::allocateGLResources(Asset& asset, Animation::Sampler& sampler)
+{
+ Accessor& accessor = asset.mAccessors[sampler.mOutput];
+
+ copy(asset, accessor, mTranslations);
+}
+
+void Animation::TranslationChannel::apply(Asset& asset, Sampler& sampler, F32 time)
+{
+ U32 frameIndex;
+ F32 t;
+
+ Node& node = asset.mNodes[mTarget.mNode];
+
+ sampler.getFrameInfo(asset, time, frameIndex, t);
+
+ if (sampler.mFrameTimes.size() == 1)
+ {
+ node.setTranslation(mTranslations[0]);
+ }
+ else
+ {
+ // interpolate
+ const glh::vec3f& v0 = mTranslations[frameIndex];
+ const glh::vec3f& v1 = mTranslations[frameIndex + 1];
+
+ glh::vec3f vf = v0 + t * (v1 - v0);
+
+ node.setTranslation(vf);
+ }
+}
+
+void Animation::ScaleChannel::allocateGLResources(Asset& asset, Animation::Sampler& sampler)
+{
+ Accessor& accessor = asset.mAccessors[sampler.mOutput];
+
+ copy(asset, accessor, mScales);
+}
+
+void Animation::ScaleChannel::apply(Asset& asset, Sampler& sampler, F32 time)
+{
+ U32 frameIndex;
+ F32 t;
+
+ Node& node = asset.mNodes[mTarget.mNode];
+
+ sampler.getFrameInfo(asset, time, frameIndex, t);
+
+ if (sampler.mFrameTimes.size() == 1)
+ {
+ node.setScale(mScales[0]);
+ }
+ else
+ {
+ // interpolate
+ const glh::vec3f& v0 = mScales[frameIndex];
+ const glh::vec3f& v1 = mScales[frameIndex + 1];
+
+ glh::vec3f vf = v0 + t * (v1 - v0);
+
+ node.setScale(vf);
+ }
+}
+
+const Animation& Animation::operator=(const tinygltf::Animation& src)
+{
+ mName = src.name;
+
+ mSamplers.resize(src.samplers.size());
+ for (U32 i = 0; i < src.samplers.size(); ++i)
+ {
+ mSamplers[i] = src.samplers[i];
+ }
+
+ for (U32 i = 0; i < src.channels.size(); ++i)
+ {
+ if (src.channels[i].target_path == "rotation")
+ {
+ mRotationChannels.push_back(RotationChannel());
+ mRotationChannels.back() = src.channels[i];
+ }
+
+ if (src.channels[i].target_path == "translation")
+ {
+ mTranslationChannels.push_back(TranslationChannel());
+ mTranslationChannels.back() = src.channels[i];
+ }
+
+ if (src.channels[i].target_path == "scale")
+ {
+ mScaleChannels.push_back(ScaleChannel());
+ mScaleChannels.back() = src.channels[i];
+ }
+ }
+
+ return *this;
+}
+
+void Skin::allocateGLResources(Asset& asset)
+{
+ if (mInverseBindMatrices != INVALID_INDEX)
+ {
+ Accessor& accessor = asset.mAccessors[mInverseBindMatrices];
+ copy(asset, accessor, mInverseBindMatricesData);
+ }
+}
+
+const Skin& Skin::operator=(const tinygltf::Skin& src)
+{
+ mName = src.name;
+ mSkeleton = src.skeleton;
+ mInverseBindMatrices = src.inverseBindMatrices;
+ mJoints = src.joints;
+
+ return *this;
+}
+
diff --git a/indra/newview/gltf/animation.h b/indra/newview/gltf/animation.h
new file mode 100644
index 0000000000..cc2045ebb2
--- /dev/null
+++ b/indra/newview/gltf/animation.h
@@ -0,0 +1,179 @@
+#pragma once
+
+/**
+ * @file animation.h
+ * @brief LL GLTF Animation Implementation
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, 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 "accessor.h"
+
+// LL GLTF Implementation
+namespace LL
+{
+ namespace GLTF
+ {
+ class Asset;
+
+ class Animation
+ {
+ public:
+ class Sampler
+ {
+ public:
+ std::vector<F32> mFrameTimes;
+
+ F32 mMinTime = -FLT_MAX;
+ F32 mMaxTime = FLT_MAX;
+
+ S32 mInput = INVALID_INDEX;
+ S32 mOutput = INVALID_INDEX;
+ std::string mInterpolation;
+
+ void allocateGLResources(Asset& asset);
+
+ const Sampler& operator=(const tinygltf::AnimationSampler& src)
+ {
+ mInput = src.input;
+ mOutput = src.output;
+ mInterpolation = src.interpolation;
+
+ return *this;
+ }
+
+ // get the frame index and time for the specified time
+ // asset -- the asset to reference for Accessors
+ // time -- the animation time to get the frame info for
+ // frameIndex -- index of the closest frame that precedes the specified time
+ // t - interpolant value between the frameIndex and the next frame
+ void getFrameInfo(Asset& asset, F32 time, U32& frameIndex, F32& t);
+ };
+
+ class Channel
+ {
+ public:
+ class Target
+ {
+ public:
+ S32 mNode = INVALID_INDEX;
+ std::string mPath;
+ };
+
+ S32 mSampler = INVALID_INDEX;
+ Target mTarget;
+
+ const Channel& operator=(const tinygltf::AnimationChannel& src)
+ {
+ mSampler = src.sampler;
+
+ mTarget.mNode = src.target_node;
+ mTarget.mPath = src.target_path;
+
+ return *this;
+ }
+
+ };
+
+ class RotationChannel : public Channel
+ {
+ public:
+ std::vector<glh::quaternionf> mRotations;
+
+ const RotationChannel& operator=(const tinygltf::AnimationChannel& src)
+ {
+ Channel::operator=(src);
+ return *this;
+ }
+
+ // prepare data needed for rendering
+ // asset -- asset to reference for Accessors
+ // sampler -- Sampler associated with this channel
+ void allocateGLResources(Asset& asset, Sampler& sampler);
+
+ void apply(Asset& asset, Sampler& sampler, F32 time);
+ };
+
+ class TranslationChannel : public Channel
+ {
+ public:
+ std::vector<glh::vec3f> mTranslations;
+
+ const TranslationChannel& operator=(const tinygltf::AnimationChannel& src)
+ {
+ Channel::operator=(src);
+ return *this;
+ }
+
+ // prepare data needed for rendering
+ // asset -- asset to reference for Accessors
+ // sampler -- Sampler associated with this channel
+ void allocateGLResources(Asset& asset, Sampler& sampler);
+
+ void apply(Asset& asset, Sampler& sampler, F32 time);
+ };
+
+ class ScaleChannel : public Channel
+ {
+ public:
+ std::vector<glh::vec3f> mScales;
+
+ const ScaleChannel& operator=(const tinygltf::AnimationChannel& src)
+ {
+ Channel::operator=(src);
+ return *this;
+ }
+
+ // prepare data needed for rendering
+ // asset -- asset to reference for Accessors
+ // sampler -- Sampler associated with this channel
+ void allocateGLResources(Asset& asset, Sampler& sampler);
+
+ void apply(Asset& asset, Sampler& sampler, F32 time);
+ };
+
+ std::string mName;
+ std::vector<Sampler> mSamplers;
+
+ // min/max time values for all samplers combined
+ F32 mMinTime = 0.f;
+ F32 mMaxTime = 0.f;
+
+ // current time of the animation
+ F32 mTime = 0.f;
+
+ std::vector<RotationChannel> mRotationChannels;
+ std::vector<TranslationChannel> mTranslationChannels;
+ std::vector<ScaleChannel> mScaleChannels;
+
+ const Animation& operator=(const tinygltf::Animation& src);
+
+ void allocateGLResources(Asset& asset);
+
+ void update(Asset& asset, float dt);
+
+ // apply this animation at the specified time
+ void apply(Asset& asset, F32 time);
+ };
+
+ }
+}
diff --git a/indra/newview/gltf/asset.cpp b/indra/newview/gltf/asset.cpp
new file mode 100644
index 0000000000..42f064699c
--- /dev/null
+++ b/indra/newview/gltf/asset.cpp
@@ -0,0 +1,1098 @@
+/**
+ * @file asset.cpp
+ * @brief LL GLTF Implementation
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, 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 "asset.h"
+#include "llvolumeoctree.h"
+#include "../llviewershadermgr.h"
+#include "../llviewercontrol.h"
+#include "../llviewertexturelist.h"
+
+using namespace LL::GLTF;
+
+namespace LL
+{
+ namespace GLTF
+ {
+ template <typename T, typename U>
+ void copy(const std::vector<T>& src, std::vector<U>& dst)
+ {
+ dst.resize(src.size());
+ for (U32 i = 0; i < src.size(); ++i)
+ {
+ copy(src[i], dst[i]);
+ }
+ }
+
+ void copy(const Node& src, tinygltf::Node& dst)
+ {
+ if (src.mMatrixValid)
+ {
+ if (!src.mMatrix.asMatrix4().isIdentity())
+ {
+ dst.matrix.resize(16);
+ for (U32 i = 0; i < 16; ++i)
+ {
+ dst.matrix[i] = src.mMatrix.getF32ptr()[i];
+ }
+ }
+ }
+ else if (src.mTRSValid)
+ {
+ if (!src.mRotation.equals(glh::quaternionf::identity(), FLT_EPSILON))
+ {
+ dst.rotation.resize(4);
+ for (U32 i = 0; i < 4; ++i)
+ {
+ dst.rotation[i] = src.mRotation.get_value()[i];
+ }
+ }
+
+ if (src.mTranslation != glh::vec3f(0.f, 0.f, 0.f))
+ {
+ dst.translation.resize(3);
+ for (U32 i = 0; i < 3; ++i)
+ {
+ dst.translation[i] = src.mTranslation.v[i];
+ }
+ }
+
+ if (src.mScale != glh::vec3f(1.f, 1.f, 1.f))
+ {
+ dst.scale.resize(3);
+ for (U32 i = 0; i < 3; ++i)
+ {
+ dst.scale[i] = src.mScale.v[i];
+ }
+ }
+ }
+
+ dst.children = src.mChildren;
+ dst.mesh = src.mMesh;
+ dst.skin = src.mSkin;
+ dst.name = src.mName;
+ }
+
+ void copy(const Scene& src, tinygltf::Scene& dst)
+ {
+ dst.nodes = src.mNodes;
+ dst.name = src.mName;
+ }
+
+ void copy(const Primitive& src, tinygltf::Primitive& dst)
+ {
+ for (auto& attrib : src.mAttributes)
+ {
+ dst.attributes[attrib.first] = attrib.second;
+ }
+ dst.indices = src.mIndices;
+ dst.material = src.mMaterial;
+ dst.mode = src.mMode;
+ }
+
+ void copy(const Mesh& src, tinygltf::Mesh& mesh)
+ {
+ copy(src.mPrimitives, mesh.primitives);
+ mesh.weights = src.mWeights;
+ mesh.name = src.mName;
+ }
+
+ void copy(const Material::TextureInfo& src, tinygltf::TextureInfo& dst)
+ {
+ dst.index = src.mIndex;
+ dst.texCoord = src.mTexCoord;
+ }
+
+ void copy(const Material::OcclusionTextureInfo& src, tinygltf::OcclusionTextureInfo& dst)
+ {
+ dst.index = src.mIndex;
+ dst.texCoord = src.mTexCoord;
+ dst.strength = src.mStrength;
+ }
+
+ void copy(const Material::NormalTextureInfo& src, tinygltf::NormalTextureInfo& dst)
+ {
+ dst.index = src.mIndex;
+ dst.texCoord = src.mTexCoord;
+ dst.scale = src.mScale;
+ }
+
+ void copy(const Material::PbrMetallicRoughness& src, tinygltf::PbrMetallicRoughness& dst)
+ {
+ dst.baseColorFactor = { src.mBaseColorFactor.v[0], src.mBaseColorFactor.v[1], src.mBaseColorFactor.v[2], src.mBaseColorFactor.v[3] };
+ copy(src.mBaseColorTexture, dst.baseColorTexture);
+ dst.metallicFactor = src.mMetallicFactor;
+ dst.roughnessFactor = src.mRoughnessFactor;
+ copy(src.mMetallicRoughnessTexture, dst.metallicRoughnessTexture);
+ }
+
+ void copy(const Material& src, tinygltf::Material& material)
+ {
+ material.name = src.mName;
+
+ material.emissiveFactor = { src.mEmissiveFactor.v[0], src.mEmissiveFactor.v[1], src.mEmissiveFactor.v[2] };
+ copy(src.mPbrMetallicRoughness, material.pbrMetallicRoughness);
+ copy(src.mNormalTexture, material.normalTexture);
+ copy(src.mEmissiveTexture, material.emissiveTexture);
+ }
+
+ void copy(const Texture& src, tinygltf::Texture& texture)
+ {
+ texture.sampler = src.mSampler;
+ texture.source = src.mSource;
+ texture.name = src.mName;
+ }
+
+ void copy(const Sampler& src, tinygltf::Sampler& sampler)
+ {
+ sampler.magFilter = src.mMagFilter;
+ sampler.minFilter = src.mMinFilter;
+ sampler.wrapS = src.mWrapS;
+ sampler.wrapT = src.mWrapT;
+ sampler.name = src.mName;
+ }
+
+ void copy(const Skin& src, tinygltf::Skin& skin)
+ {
+ skin.joints = src.mJoints;
+ skin.inverseBindMatrices = src.mInverseBindMatrices;
+ skin.skeleton = src.mSkeleton;
+ skin.name = src.mName;
+ }
+
+ void copy(const Accessor& src, tinygltf::Accessor& accessor)
+ {
+ accessor.bufferView = src.mBufferView;
+ accessor.byteOffset = src.mByteOffset;
+ accessor.componentType = src.mComponentType;
+ accessor.minValues = src.mMin;
+ accessor.maxValues = src.mMax;
+
+ accessor.count = src.mCount;
+ accessor.type = src.mType;
+ accessor.normalized = src.mNormalized;
+ accessor.name = src.mName;
+ }
+
+ void copy(const Animation::Sampler& src, tinygltf::AnimationSampler& sampler)
+ {
+ sampler.input = src.mInput;
+ sampler.output = src.mOutput;
+ sampler.interpolation = src.mInterpolation;
+ }
+
+ void copy(const Animation::Channel& src, tinygltf::AnimationChannel& channel)
+ {
+ channel.sampler = src.mSampler;
+ channel.target_node = src.mTarget.mNode;
+ channel.target_path = src.mTarget.mPath;
+ }
+
+ void copy(const Animation& src, tinygltf::Animation& animation)
+ {
+ animation.name = src.mName;
+
+ copy(src.mSamplers, animation.samplers);
+
+ U32 channel_count = src.mRotationChannels.size() + src.mTranslationChannels.size() + src.mScaleChannels.size();
+
+ animation.channels.resize(channel_count);
+
+ U32 idx = 0;
+ for (U32 i = 0; i < src.mTranslationChannels.size(); ++i)
+ {
+ copy(src.mTranslationChannels[i], animation.channels[idx++]);
+ }
+
+ for (U32 i = 0; i < src.mRotationChannels.size(); ++i)
+ {
+ copy(src.mRotationChannels[i], animation.channels[idx++]);
+ }
+
+ for (U32 i = 0; i < src.mScaleChannels.size(); ++i)
+ {
+ copy(src.mScaleChannels[i], animation.channels[idx++]);
+ }
+ }
+
+ void copy(const Buffer& src, tinygltf::Buffer& buffer)
+ {
+ buffer.uri = src.mUri;
+ buffer.data = src.mData;
+ buffer.name = src.mName;
+ }
+
+ void copy(const BufferView& src, tinygltf::BufferView& bufferView)
+ {
+ bufferView.buffer = src.mBuffer;
+ bufferView.byteOffset = src.mByteOffset;
+ bufferView.byteLength = src.mByteLength;
+ bufferView.byteStride = src.mByteStride;
+ bufferView.target = src.mTarget;
+ bufferView.name = src.mName;
+ }
+
+ void copy(const Image& src, tinygltf::Image& image)
+ {
+ image.name = src.mName;
+ image.width = src.mWidth;
+ image.height = src.mHeight;
+ image.component = src.mComponent;
+ image.bits = src.mBits;
+ image.pixel_type = src.mPixelType;
+
+ image.image = src.mData;
+ image.bufferView = src.mBufferView;
+ image.mimeType = src.mMimeType;
+ image.uri = src.mUri;
+ }
+
+ void copy(const Asset & src, tinygltf::Model& dst)
+ {
+ dst.defaultScene = src.mDefaultScene;
+ dst.asset.copyright = src.mCopyright;
+ dst.asset.version = src.mVersion;
+ dst.asset.minVersion = src.mMinVersion;
+ dst.asset.generator = "Linden Lab Experimental GLTF Export";
+ dst.asset.extras = src.mExtras;
+
+ copy(src.mScenes, dst.scenes);
+ copy(src.mNodes, dst.nodes);
+ copy(src.mMeshes, dst.meshes);
+ copy(src.mMaterials, dst.materials);
+ copy(src.mBuffers, dst.buffers);
+ copy(src.mBufferViews, dst.bufferViews);
+ copy(src.mTextures, dst.textures);
+ copy(src.mSamplers, dst.samplers);
+ copy(src.mImages, dst.images);
+ copy(src.mAccessors, dst.accessors);
+ copy(src.mAnimations, dst.animations);
+ copy(src.mSkins, dst.skins);
+ }
+ }
+}
+void Scene::updateTransforms(Asset& asset)
+{
+ LLMatrix4a identity;
+ identity.setIdentity();
+ for (auto& nodeIndex : mNodes)
+ {
+ Node& node = asset.mNodes[nodeIndex];
+ node.updateTransforms(asset, identity);
+ }
+}
+
+void Scene::updateRenderTransforms(Asset& asset, const LLMatrix4a& modelview)
+{
+ for (auto& nodeIndex : mNodes)
+ {
+ Node& node = asset.mNodes[nodeIndex];
+ node.updateRenderTransforms(asset, modelview);
+ }
+}
+
+void Node::updateRenderTransforms(Asset& asset, const LLMatrix4a& modelview)
+{
+ matMul(mMatrix, modelview, mRenderMatrix);
+
+ for (auto& childIndex : mChildren)
+ {
+ Node& child = asset.mNodes[childIndex];
+ child.updateRenderTransforms(asset, mRenderMatrix);
+ }
+}
+
+LLMatrix4a inverse(const LLMatrix4a& mat);
+
+void Node::updateTransforms(Asset& asset, const LLMatrix4a& parentMatrix)
+{
+ makeMatrixValid();
+ matMul(mMatrix, parentMatrix, mAssetMatrix);
+ mAssetMatrixInv = inverse(mAssetMatrix);
+
+ S32 my_index = this - &asset.mNodes[0];
+
+ for (auto& childIndex : mChildren)
+ {
+ Node& child = asset.mNodes[childIndex];
+ child.mParent = my_index;
+ child.updateTransforms(asset, mAssetMatrix);
+ }
+}
+
+void Asset::updateTransforms()
+{
+ for (auto& scene : mScenes)
+ {
+ scene.updateTransforms(*this);
+ }
+}
+
+void Asset::updateRenderTransforms(const LLMatrix4a& modelview)
+{
+#if 0
+ // traverse hierarchy and update render transforms from scratch
+ for (auto& scene : mScenes)
+ {
+ scene.updateRenderTransforms(*this, modelview);
+ }
+#else
+ // use mAssetMatrix to update render transforms from node list
+ for (auto& node : mNodes)
+ {
+ //if (node.mMesh != INVALID_INDEX)
+ {
+ matMul(node.mAssetMatrix, modelview, node.mRenderMatrix);
+ }
+ }
+
+#endif
+
+}
+
+S32 Asset::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
+ LLVector4a* intersection, // return the intersection point
+ LLVector2* tex_coord, // return the texture coordinates of the intersection point
+ LLVector4a* normal, // return the surface normal at the intersection point
+ LLVector4a* tangent, // return the surface tangent at the intersection point
+ S32* primitive_hitp
+)
+{
+ S32 node_hit = -1;
+ S32 primitive_hit = -1;
+
+ LLVector4a local_start;
+ LLVector4a asset_end = end;
+ LLVector4a local_end;
+ LLVector4a p;
+
+
+ for (auto& node : mNodes)
+ {
+ if (node.mMesh != INVALID_INDEX)
+ {
+
+ bool newHit = false;
+
+ // transform start and end to this node's local space
+ node.mAssetMatrixInv.affineTransform(start, local_start);
+ node.mAssetMatrixInv.affineTransform(asset_end, local_end);
+
+ Mesh& mesh = mMeshes[node.mMesh];
+ for (auto& primitive : mesh.mPrimitives)
+ {
+ const LLVolumeTriangle* tri = primitive.lineSegmentIntersect(local_start, local_end, &p, tex_coord, normal, tangent);
+ if (tri)
+ {
+ newHit = true;
+ local_end = p;
+
+ // pointer math to get the node index
+ node_hit = &node - &mNodes[0];
+ llassert(&mNodes[node_hit] == &node);
+
+ //pointer math to get the primitive index
+ primitive_hit = &primitive - &mesh.mPrimitives[0];
+ llassert(&mesh.mPrimitives[primitive_hit] == &primitive);
+ }
+ }
+
+ if (newHit)
+ {
+ // shorten line segment on hit
+ node.mAssetMatrix.affineTransform(p, asset_end);
+
+ // transform results back to asset space
+ if (intersection)
+ {
+ *intersection = asset_end;
+ }
+
+ if (normal || tangent)
+ {
+ LLMatrix4 normalMatrix(node.mAssetMatrixInv.getF32ptr());
+
+ normalMatrix.transpose();
+
+ LLMatrix4a norm_mat;
+ norm_mat.loadu((F32*)normalMatrix.mMatrix);
+
+ if (normal)
+ {
+ LLVector4a n = *normal;
+ F32 w = n.getF32ptr()[3];
+ n.getF32ptr()[3] = 0.0f;
+
+ norm_mat.affineTransform(n, *normal);
+ normal->getF32ptr()[3] = w;
+ }
+
+ if (tangent)
+ {
+ LLVector4a t = *tangent;
+ F32 w = t.getF32ptr()[3];
+ t.getF32ptr()[3] = 0.0f;
+
+ norm_mat.affineTransform(t, *tangent);
+ tangent->getF32ptr()[3] = w;
+ }
+ }
+ }
+ }
+ }
+
+ if (node_hit != -1)
+ {
+ if (primitive_hitp)
+ {
+ *primitive_hitp = primitive_hit;
+ }
+ }
+
+ return node_hit;
+}
+
+
+void Node::makeMatrixValid()
+{
+ if (!mMatrixValid && mTRSValid)
+ {
+ glh::matrix4f rot;
+ mRotation.get_value(rot);
+
+ glh::matrix4f trans;
+ trans.set_translate(mTranslation);
+
+ glh::matrix4f sc;
+ sc.set_scale(mScale);
+
+ glh::matrix4f t;
+ //t = sc * rot * trans;
+ //t = trans * rot * sc; // best so far, still wrong on negative scale
+ //t = sc * trans * rot;
+ t = trans * sc * rot;
+
+ mMatrix.loadu(t.m);
+ mMatrixValid = true;
+ }
+
+ llassert(mMatrixValid);
+}
+
+void Node::makeTRSValid()
+{
+ if (!mTRSValid && mMatrixValid)
+ {
+ glh::matrix4f t(mMatrix.getF32ptr());
+
+ glh::vec4f p = t.get_column(3);
+ mTranslation.set_value(p.v[0], p.v[1], p.v[2]);
+
+ mScale.set_value(t.get_column(0).length(), t.get_column(1).length(), t.get_column(2).length());
+ mRotation.set_value(t);
+ mTRSValid = true;
+ }
+
+ llassert(mTRSValid);
+}
+
+void Node::setRotation(const glh::quaternionf& q)
+{
+ makeTRSValid();
+ mRotation = q;
+ mMatrixValid = false;
+}
+
+void Node::setTranslation(const glh::vec3f& t)
+{
+ makeTRSValid();
+ mTranslation = t;
+ mMatrixValid = false;
+}
+
+void Node::setScale(const glh::vec3f& s)
+{
+ makeTRSValid();
+ mScale = s;
+ mMatrixValid = false;
+}
+
+const Node& Node::operator=(const tinygltf::Node& src)
+{
+ F32* dstMatrix = mMatrix.getF32ptr();
+
+ if (src.matrix.size() == 16)
+ {
+ // Node has a transformation matrix, just copy it
+ for (U32 i = 0; i < 16; ++i)
+ {
+ dstMatrix[i] = (F32)src.matrix[i];
+ }
+
+ mMatrixValid = true;
+ }
+ else if (!src.rotation.empty() || !src.translation.empty() || !src.scale.empty())
+ {
+ // node has rotation/translation/scale, convert to matrix
+ if (src.rotation.size() == 4)
+ {
+ mRotation = glh::quaternionf((F32)src.rotation[0], (F32)src.rotation[1], (F32)src.rotation[2], (F32)src.rotation[3]);
+ }
+
+ if (src.translation.size() == 3)
+ {
+ mTranslation = glh::vec3f((F32)src.translation[0], (F32)src.translation[1], (F32)src.translation[2]);
+ }
+
+ glh::vec3f scale;
+ if (src.scale.size() == 3)
+ {
+ mScale = glh::vec3f((F32)src.scale[0], (F32)src.scale[1], (F32)src.scale[2]);
+ }
+ else
+ {
+ mScale.set_value(1.f, 1.f, 1.f);
+ }
+
+ mTRSValid = true;
+ }
+ else
+ {
+ // node specifies no transformation, set to identity
+ mMatrix.setIdentity();
+ mMatrixValid = true;
+ }
+
+ mChildren = src.children;
+ mMesh = src.mesh;
+ mSkin = src.skin;
+ mName = src.name;
+
+ return *this;
+}
+
+void Asset::render(bool opaque, bool rigged)
+{
+ if (rigged)
+ {
+ gGL.loadIdentity();
+ }
+
+ for (auto& node : mNodes)
+ {
+ if (node.mSkin != INVALID_INDEX)
+ {
+ if (rigged)
+ {
+ Skin& skin = mSkins[node.mSkin];
+ skin.uploadMatrixPalette(*this, node);
+ }
+ else
+ {
+ //skip static nodes if we're rendering rigged
+ continue;
+ }
+ }
+ else if (rigged)
+ {
+ // skip rigged nodes if we're not rendering rigged
+ continue;
+ }
+
+
+ if (node.mMesh != INVALID_INDEX)
+ {
+ Mesh& mesh = mMeshes[node.mMesh];
+ for (auto& primitive : mesh.mPrimitives)
+ {
+ if (!rigged)
+ {
+ gGL.loadMatrix((F32*)node.mRenderMatrix.mMatrix);
+ }
+ bool cull = true;
+ if (primitive.mMaterial != INVALID_INDEX)
+ {
+ Material& material = mMaterials[primitive.mMaterial];
+
+ if ((material.mMaterial->mAlphaMode == LLGLTFMaterial::ALPHA_MODE_BLEND) == opaque)
+ {
+ continue;
+ }
+ material.mMaterial->bind();
+ cull = !material.mMaterial->mDoubleSided;
+ }
+ else
+ {
+ if (!opaque)
+ {
+ continue;
+ }
+ LLFetchedGLTFMaterial::sDefault.bind();
+ }
+
+ LLGLDisable cull_face(!cull ? GL_CULL_FACE : 0);
+
+ primitive.mVertexBuffer->setBuffer();
+ if (primitive.mVertexBuffer->getNumIndices() > 0)
+ {
+ primitive.mVertexBuffer->draw(primitive.mGLMode, primitive.mVertexBuffer->getNumIndices(), 0);
+ }
+ else
+ {
+ primitive.mVertexBuffer->drawArrays(primitive.mGLMode, 0, primitive.mVertexBuffer->getNumVerts());
+ }
+
+ }
+ }
+ }
+}
+
+void Asset::renderOpaque()
+{
+ render(true);
+}
+
+void Asset::renderTransparent()
+{
+ render(false);
+}
+
+void Asset::update()
+{
+ F32 dt = gFrameTimeSeconds - mLastUpdateTime;
+
+ if (dt > 0.f)
+ {
+ mLastUpdateTime = gFrameTimeSeconds;
+ if (mAnimations.size() > 0)
+ {
+ static LLCachedControl<U32> anim_idx(gSavedSettings, "GLTFAnimationIndex", 0);
+ static LLCachedControl<F32> anim_speed(gSavedSettings, "GLTFAnimationSpeed", 1.f);
+
+ U32 idx = llclamp(anim_idx(), 0U, mAnimations.size() - 1);
+ mAnimations[idx].update(*this, dt*anim_speed);
+ }
+
+ updateTransforms();
+ }
+}
+
+void Asset::allocateGLResources(const std::string& filename, const tinygltf::Model& model)
+{
+ // do images first as materials may depend on images
+ for (auto& image : mImages)
+ {
+ image.allocateGLResources();
+ }
+
+ // do materials before meshes as meshes may depend on materials
+ for (U32 i = 0; i < mMaterials.size(); ++i)
+ {
+ mMaterials[i].allocateGLResources(*this);
+ LLTinyGLTFHelper::getMaterialFromModel(filename, model, i, mMaterials[i].mMaterial, mMaterials[i].mName, true);
+ }
+
+ for (auto& mesh : mMeshes)
+ {
+ mesh.allocateGLResources(*this);
+ }
+
+ for (auto& animation : mAnimations)
+ {
+ animation.allocateGLResources(*this);
+ }
+
+ for (auto& skin : mSkins)
+ {
+ skin.allocateGLResources(*this);
+ }
+}
+
+const Asset& Asset::operator=(const tinygltf::Model& src)
+{
+ mVersion = src.asset.version;
+ mMinVersion = src.asset.minVersion;
+ mGenerator = src.asset.generator;
+ mCopyright = src.asset.copyright;
+ mExtras = src.asset.extras;
+
+ mDefaultScene = src.defaultScene;
+
+
+ mScenes.resize(src.scenes.size());
+ for (U32 i = 0; i < src.scenes.size(); ++i)
+ {
+ mScenes[i] = src.scenes[i];
+ }
+
+ mNodes.resize(src.nodes.size());
+ for (U32 i = 0; i < src.nodes.size(); ++i)
+ {
+ mNodes[i] = src.nodes[i];
+ }
+
+ mMeshes.resize(src.meshes.size());
+ for (U32 i = 0; i < src.meshes.size(); ++i)
+ {
+ mMeshes[i] = src.meshes[i];
+ }
+
+ mMaterials.resize(src.materials.size());
+ for (U32 i = 0; i < src.materials.size(); ++i)
+ {
+ mMaterials[i] = src.materials[i];
+ }
+
+ mBuffers.resize(src.buffers.size());
+ for (U32 i = 0; i < src.buffers.size(); ++i)
+ {
+ mBuffers[i] = src.buffers[i];
+ }
+
+ mBufferViews.resize(src.bufferViews.size());
+ for (U32 i = 0; i < src.bufferViews.size(); ++i)
+ {
+ mBufferViews[i] = src.bufferViews[i];
+ }
+
+ mTextures.resize(src.textures.size());
+ for (U32 i = 0; i < src.textures.size(); ++i)
+ {
+ mTextures[i] = src.textures[i];
+ }
+
+ mSamplers.resize(src.samplers.size());
+ for (U32 i = 0; i < src.samplers.size(); ++i)
+ {
+ mSamplers[i] = src.samplers[i];
+ }
+
+ mImages.resize(src.images.size());
+ for (U32 i = 0; i < src.images.size(); ++i)
+ {
+ mImages[i] = src.images[i];
+ }
+
+ mAccessors.resize(src.accessors.size());
+ for (U32 i = 0; i < src.accessors.size(); ++i)
+ {
+ mAccessors[i] = src.accessors[i];
+ }
+
+ mAnimations.resize(src.animations.size());
+ for (U32 i = 0; i < src.animations.size(); ++i)
+ {
+ mAnimations[i] = src.animations[i];
+ }
+
+ mSkins.resize(src.skins.size());
+ for (U32 i = 0; i < src.skins.size(); ++i)
+ {
+ mSkins[i] = src.skins[i];
+ }
+
+ return *this;
+}
+
+void Asset::save(tinygltf::Model& dst)
+{
+ LL::GLTF::copy(*this, dst);
+}
+
+void Asset::decompose(const std::string& filename)
+{
+ // get folder path
+ std::string folder = gDirUtilp->getDirName(filename);
+
+ // decompose images
+ for (auto& image : mImages)
+ {
+ image.decompose(*this, folder);
+ }
+}
+
+void Asset::eraseBufferView(S32 bufferView)
+{
+ mBufferViews.erase(mBufferViews.begin() + bufferView);
+
+ for (auto& accessor : mAccessors)
+ {
+ if (accessor.mBufferView > bufferView)
+ {
+ accessor.mBufferView--;
+ }
+ }
+
+ for (auto& image : mImages)
+ {
+ if (image.mBufferView > bufferView)
+ {
+ image.mBufferView--;
+ }
+ }
+
+}
+
+void Image::decompose(Asset& asset, const std::string& folder)
+{
+ std::string name = mName;
+ if (name.empty())
+ {
+ S32 idx = this - asset.mImages.data();
+ name = llformat("image_%d", idx);
+ }
+
+ if (mBufferView != INVALID_INDEX)
+ {
+ // save original image
+ BufferView& bufferView = asset.mBufferViews[mBufferView];
+ Buffer& buffer = asset.mBuffers[bufferView.mBuffer];
+
+ std::string extension;
+
+ if (mMimeType == "image/jpeg")
+ {
+ extension = ".jpg";
+ }
+ else if (mMimeType == "image/png")
+ {
+ extension = ".png";
+ }
+ else
+ {
+ extension = ".bin";
+ }
+
+ std::string filename = folder + "/" + name + "." + extension;
+
+ // set URI to non-j2c file for now, but later we'll want to reference the j2c hash
+ mUri = name + "." + extension;
+
+ std::ofstream file(filename, std::ios::binary);
+ file.write((const char*)buffer.mData.data() + bufferView.mByteOffset, bufferView.mByteLength);
+
+ buffer.erase(asset, bufferView.mByteOffset, bufferView.mByteLength);
+
+ asset.eraseBufferView(mBufferView);
+ }
+
+ if (!mData.empty())
+ {
+ // save j2c image
+ std::string filename = folder + "/" + name + ".j2c";
+
+ LLPointer<LLImageRaw> raw = new LLImageRaw(mWidth, mHeight, mComponent);
+ U8* data = raw->allocateData();
+ llassert(mData.size() == raw->getDataSize());
+ memcpy(data, mData.data(), mData.size());
+
+ LLViewerTextureList::createUploadFile(raw, filename, 4096);
+
+ mData.clear();
+ }
+
+ mWidth = -1;
+ mHeight = -1;
+ mComponent = -1;
+ mBits = -1;
+ mPixelType = -1;
+ mMimeType = "";
+
+}
+
+const Material::TextureInfo& Material::TextureInfo::operator=(const tinygltf::TextureInfo& src)
+{
+ mIndex = src.index;
+ mTexCoord = src.texCoord;
+ return *this;
+}
+
+const Material::OcclusionTextureInfo& Material::OcclusionTextureInfo::operator=(const tinygltf::OcclusionTextureInfo& src)
+{
+ mIndex = src.index;
+ mTexCoord = src.texCoord;
+ mStrength = src.strength;
+ return *this;
+}
+
+const Material::NormalTextureInfo& Material::NormalTextureInfo::operator=(const tinygltf::NormalTextureInfo& src)
+{
+ mIndex = src.index;
+ mTexCoord = src.texCoord;
+ mScale = src.scale;
+ return *this;
+}
+
+const Material::PbrMetallicRoughness& Material::PbrMetallicRoughness::operator=(const tinygltf::PbrMetallicRoughness& src)
+{
+ if (src.baseColorFactor.size() == 4)
+ {
+ mBaseColorFactor.set_value(src.baseColorFactor[0], src.baseColorFactor[1], src.baseColorFactor[2], src.baseColorFactor[3]);
+ }
+
+ mBaseColorTexture = src.baseColorTexture;
+ mMetallicFactor = src.metallicFactor;
+ mRoughnessFactor = src.roughnessFactor;
+ mMetallicRoughnessTexture = src.metallicRoughnessTexture;
+
+ return *this;
+}
+const Material& Material::operator=(const tinygltf::Material& src)
+{
+ mName = src.name;
+
+ if (src.emissiveFactor.size() == 3)
+ {
+ mEmissiveFactor.set_value(src.emissiveFactor[0], src.emissiveFactor[1], src.emissiveFactor[2]);
+ }
+
+ mPbrMetallicRoughness = src.pbrMetallicRoughness;
+ mNormalTexture = src.normalTexture;
+ mOcclusionTexture = src.occlusionTexture;
+ mEmissiveTexture = src.emissiveTexture;
+
+ mAlphaMode = src.alphaMode;
+ mAlphaCutoff = src.alphaCutoff;
+ mDoubleSided = src.doubleSided;
+
+ return *this;
+}
+
+void Material::allocateGLResources(Asset& asset)
+{
+ // allocate material
+ mMaterial = new LLFetchedGLTFMaterial();
+}
+
+const Mesh& Mesh::operator=(const tinygltf::Mesh& src)
+{
+ mPrimitives.resize(src.primitives.size());
+ for (U32 i = 0; i < src.primitives.size(); ++i)
+ {
+ mPrimitives[i] = src.primitives[i];
+ }
+
+ mWeights = src.weights;
+ mName = src.name;
+
+ return *this;
+}
+
+void Mesh::allocateGLResources(Asset& asset)
+{
+ for (auto& primitive : mPrimitives)
+ {
+ primitive.allocateGLResources(asset);
+ }
+}
+
+const Scene& Scene::operator=(const tinygltf::Scene& src)
+{
+ mNodes = src.nodes;
+ mName = src.name;
+
+ return *this;
+}
+
+const Texture& Texture::operator=(const tinygltf::Texture& src)
+{
+ mSampler = src.sampler;
+ mSource = src.source;
+ mName = src.name;
+
+ return *this;
+}
+
+const Sampler& Sampler::operator=(const tinygltf::Sampler& src)
+{
+ mMagFilter = src.magFilter;
+ mMinFilter = src.minFilter;
+ mWrapS = src.wrapS;
+ mWrapT = src.wrapT;
+ mName = src.name;
+
+ return *this;
+}
+
+void Skin::uploadMatrixPalette(Asset& asset, Node& node)
+{
+ // prepare matrix palette
+
+ // modelview will be applied by the shader, so assume matrix palette is in asset space
+ std::vector<glh::matrix4f> t_mp;
+
+ t_mp.resize(mJoints.size());
+
+ for (U32 i = 0; i < mJoints.size(); ++i)
+ {
+ Node& joint = asset.mNodes[mJoints[i]];
+
+ //t_mp[i].set_value(joint.mRenderMatrix.getF32ptr());
+ //t_mp[i] = t_mp[i] * mInverseBindMatricesData[i];
+
+ //t_mp[i].set_value(joint.mRenderMatrix.getF32ptr());
+ //t_mp[i] = mInverseBindMatricesData[i] * t_mp[i];
+
+ t_mp[i].set_value(joint.mRenderMatrix.getF32ptr());
+ t_mp[i] = t_mp[i] * mInverseBindMatricesData[i];
+
+ }
+
+ std::vector<F32> glmp;
+
+ glmp.resize(mJoints.size() * 12);
+
+ F32* mp = glmp.data();
+
+ for (U32 i = 0; i < mJoints.size(); ++i)
+ {
+ F32* m = (F32*)t_mp[i].m;
+
+ U32 idx = i * 12;
+
+ mp[idx + 0] = m[0];
+ mp[idx + 1] = m[1];
+ mp[idx + 2] = m[2];
+ mp[idx + 3] = m[12];
+
+ mp[idx + 4] = m[4];
+ mp[idx + 5] = m[5];
+ mp[idx + 6] = m[6];
+ mp[idx + 7] = m[13];
+
+ mp[idx + 8] = m[8];
+ mp[idx + 9] = m[9];
+ mp[idx + 10] = m[10];
+ mp[idx + 11] = m[14];
+ }
+
+ LLGLSLShader::sCurBoundShaderPtr->uniformMatrix3x4fv(LLViewerShaderMgr::AVATAR_MATRIX,
+ mJoints.size(),
+ FALSE,
+ (GLfloat*)glmp.data());
+}
+
diff --git a/indra/newview/gltf/asset.h b/indra/newview/gltf/asset.h
new file mode 100644
index 0000000000..5a62313705
--- /dev/null
+++ b/indra/newview/gltf/asset.h
@@ -0,0 +1,339 @@
+#pragma once
+
+/**
+ * @file asset.h
+ * @brief LL GLTF Implementation
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, 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 "llvertexbuffer.h"
+#include "llvolumeoctree.h"
+#include "../lltinygltfhelper.h"
+#include "accessor.h"
+#include "primitive.h"
+#include "animation.h"
+
+extern F32SecondsImplicit gFrameTimeSeconds;
+
+// LL GLTF Implementation
+namespace LL
+{
+ namespace GLTF
+ {
+ class Asset;
+
+ class Material
+ {
+ public:
+ class TextureInfo
+ {
+ public:
+ S32 mIndex = INVALID_INDEX;
+ S32 mTexCoord = 0;
+
+ const TextureInfo& operator=(const tinygltf::TextureInfo& src);
+ };
+
+ class NormalTextureInfo : public TextureInfo
+ {
+ public:
+ F32 mScale = 1.0f;
+
+ const NormalTextureInfo& operator=(const tinygltf::NormalTextureInfo& src);
+ };
+
+ class OcclusionTextureInfo : public TextureInfo
+ {
+ public:
+ F32 mStrength = 1.0f;
+
+ const OcclusionTextureInfo& operator=(const tinygltf::OcclusionTextureInfo& src);
+ };
+
+ class PbrMetallicRoughness
+ {
+ public:
+ glh::vec4f mBaseColorFactor = glh::vec4f(1.f,1.f,1.f,1.f);
+ TextureInfo mBaseColorTexture;
+ F32 mMetallicFactor = 1.0f;
+ F32 mRoughnessFactor = 1.0f;
+ TextureInfo mMetallicRoughnessTexture;
+ const PbrMetallicRoughness& operator=(const tinygltf::PbrMetallicRoughness& src);
+ };
+
+
+ // use LLFetchedGLTFMaterial for now, but eventually we'll want to use
+ // a more flexible GLTF material implementation instead of the fixed packing
+ // version we use for sharable GLTF material assets
+ LLPointer<LLFetchedGLTFMaterial> mMaterial;
+ PbrMetallicRoughness mPbrMetallicRoughness;
+ NormalTextureInfo mNormalTexture;
+ OcclusionTextureInfo mOcclusionTexture;
+ TextureInfo mEmissiveTexture;
+
+
+ std::string mName;
+ glh::vec3f mEmissiveFactor = glh::vec3f(0.f, 0.f, 0.f);
+ std::string mAlphaMode = "OPAQUE";
+ F32 mAlphaCutoff = 0.5f;
+ bool mDoubleSided = false;
+
+
+ const Material& operator=(const tinygltf::Material& src);
+
+ void allocateGLResources(Asset& asset);
+ };
+
+ class Mesh
+ {
+ public:
+ std::vector<Primitive> mPrimitives;
+ std::vector<double> mWeights;
+ std::string mName;
+
+ const Mesh& operator=(const tinygltf::Mesh& src);
+
+ void allocateGLResources(Asset& asset);
+ };
+
+ class Node
+ {
+ public:
+ LLMatrix4a mMatrix; //local transform
+ LLMatrix4a mRenderMatrix; //transform for rendering
+ LLMatrix4a mAssetMatrix; //transform from local to asset space
+ LLMatrix4a mAssetMatrixInv; //transform from asset to local space
+
+ glh::vec3f mTranslation;
+ glh::quaternionf mRotation;
+ glh::vec3f mScale;
+
+ // if true, mMatrix is valid and up to date
+ bool mMatrixValid = false;
+
+ // if true, translation/rotation/scale are valid and up to date
+ bool mTRSValid = false;
+
+ bool mNeedsApplyMatrix = false;
+
+ std::vector<S32> mChildren;
+ S32 mParent = INVALID_INDEX;
+
+ S32 mMesh = INVALID_INDEX;
+ S32 mSkin = INVALID_INDEX;
+
+ std::string mName;
+
+ const Node& operator=(const tinygltf::Node& src);
+
+ // Set mRenderMatrix to a transform that can be used for the current render pass
+ // modelview -- parent's render matrix
+ void updateRenderTransforms(Asset& asset, const LLMatrix4a& modelview);
+
+ // update mAssetMatrix and mAssetMatrixInv
+ void updateTransforms(Asset& asset, const LLMatrix4a& parentMatrix);
+
+ // ensure mMatrix is valid -- if mMatrixValid is false and mTRSValid is true, will update mMatrix to match Translation/Rotation/Scale
+ void makeMatrixValid();
+
+ // ensure Translation/Rotation/Scale are valid -- if mTRSValid is false and mMatrixValid is true, will update Translation/Rotation/Scale to match mMatrix
+ void makeTRSValid();
+
+ // Set rotation of this node
+ // SIDE EFFECT: invalidates mMatrix
+ void setRotation(const glh::quaternionf& rotation);
+
+ // Set translation of this node
+ // SIDE EFFECT: invalidates mMatrix
+ void setTranslation(const glh::vec3f& translation);
+
+ // Set scale of this node
+ // SIDE EFFECT: invalidates mMatrix
+ void setScale(const glh::vec3f& scale);
+ };
+
+ class Skin
+ {
+ public:
+ S32 mInverseBindMatrices = INVALID_INDEX;
+ S32 mSkeleton = INVALID_INDEX;
+ std::vector<S32> mJoints;
+ std::string mName;
+ std::vector<glh::matrix4f> mInverseBindMatricesData;
+
+ void allocateGLResources(Asset& asset);
+ void uploadMatrixPalette(Asset& asset, Node& node);
+
+ const Skin& operator=(const tinygltf::Skin& src);
+ };
+
+ class Scene
+ {
+ public:
+ std::vector<S32> mNodes;
+ std::string mName;
+
+ const Scene& operator=(const tinygltf::Scene& src);
+
+ void updateTransforms(Asset& asset);
+ void updateRenderTransforms(Asset& asset, const LLMatrix4a& modelview);
+ };
+
+ class Texture
+ {
+ public:
+ S32 mSampler = INVALID_INDEX;
+ S32 mSource = INVALID_INDEX;
+ std::string mName;
+
+ const Texture& operator=(const tinygltf::Texture& src);
+ };
+
+ class Sampler
+ {
+ public:
+ S32 mMagFilter;
+ S32 mMinFilter;
+ S32 mWrapS;
+ S32 mWrapT;
+ std::string mName;
+
+ const Sampler& operator=(const tinygltf::Sampler& src);
+ };
+
+ class Image
+ {
+ public:
+ std::string mName;
+ std::string mUri;
+ std::string mMimeType;
+
+ S32 mBufferView = INVALID_INDEX;
+
+ std::vector<U8> mData;
+ S32 mWidth;
+ S32 mHeight;
+ S32 mComponent;
+ S32 mBits;
+ S32 mPixelType;
+
+ LLPointer<LLViewerFetchedTexture> mTexture;
+
+ const Image& operator=(const tinygltf::Image& src)
+ {
+ mName = src.name;
+ mUri = src.uri;
+ mMimeType = src.mimeType;
+ mData = src.image;
+ mWidth = src.width;
+ mHeight = src.height;
+ mComponent = src.component;
+ mBits = src.bits;
+ mBufferView = src.bufferView;
+ mPixelType = src.pixel_type;
+ return *this;
+ }
+
+ // save image clear local data, and set uri
+ void decompose(Asset& asset, const std::string& filename);
+
+ void allocateGLResources()
+ {
+ // allocate texture
+
+ }
+ };
+
+ // C++ representation of a GLTF Asset
+ class Asset
+ {
+ public:
+ std::vector<Scene> mScenes;
+ std::vector<Node> mNodes;
+ std::vector<Mesh> mMeshes;
+ std::vector<Material> mMaterials;
+ std::vector<Buffer> mBuffers;
+ std::vector<BufferView> mBufferViews;
+ std::vector<Texture> mTextures;
+ std::vector<Sampler> mSamplers;
+ std::vector<Image> mImages;
+ std::vector<Accessor> mAccessors;
+ std::vector<Animation> mAnimations;
+ std::vector<Skin> mSkins;
+
+ std::string mVersion;
+ std::string mGenerator;
+ std::string mMinVersion;
+ std::string mCopyright;
+
+ S32 mDefaultScene = INVALID_INDEX;
+ tinygltf::Value mExtras;
+
+
+ // the last time update() was called according to gFrameTimeSeconds
+ F32 mLastUpdateTime = gFrameTimeSeconds;
+
+ // prepare the asset for rendering
+ void allocateGLResources(const std::string& filename, const tinygltf::Model& model);
+
+ // Called periodically (typically once per frame)
+ // Any ongoing work (such as animations) should be handled here
+ // NOT guaranteed to be called every frame
+ // MAY be called more than once per frame
+ // Upon return, all Node Matrix transforms should be up to date
+ void update();
+
+ // update asset-to-node and node-to-asset transforms
+ void updateTransforms();
+
+ // update node render transforms
+ void updateRenderTransforms(const LLMatrix4a& modelview);
+
+ void render(bool opaque, bool rigged = false);
+ void renderOpaque();
+ void renderTransparent();
+
+ // return the index of the node that the line segment intersects with, or -1 if no hit
+ // input and output values must be in this asset's local coordinate frame
+ S32 lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
+ LLVector4a* intersection = nullptr, // return the intersection point
+ LLVector2* tex_coord = nullptr, // return the texture coordinates of the intersection point
+ LLVector4a* normal = nullptr, // return the surface normal at the intersection point
+ LLVector4a* tangent = nullptr, // return the surface tangent at the intersection point
+ S32* primitive_hitp = nullptr // return the index of the primitive that was hit
+ );
+
+ const Asset& operator=(const tinygltf::Model& src);
+
+ // save the asset to a tinygltf model
+ void save(tinygltf::Model& dst);
+
+ // decompose the asset to the given .gltf file
+ void decompose(const std::string& filename);
+
+ // remove the bufferview at the given index
+ // updates all bufferview indices in this Asset as needed
+ void eraseBufferView(S32 bufferView);
+ };
+ }
+}
diff --git a/indra/newview/gltf/buffer_util.h b/indra/newview/gltf/buffer_util.h
new file mode 100644
index 0000000000..4e6f5901e7
--- /dev/null
+++ b/indra/newview/gltf/buffer_util.h
@@ -0,0 +1,402 @@
+#pragma once
+
+/**
+ * @file buffer_util.inl
+ * @brief LL GLTF Implementation
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, 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$
+ */
+
+// inline template implementations for copying data out of GLTF buffers
+// DO NOT include from header files to avoid the need to rebuild the whole project
+// whenever we add support for more types
+
+#ifdef _MSC_VER
+#define LL_FUNCSIG __FUNCSIG__
+#else
+#define LL_FUNCSIG __PRETTY_FUNCTION__
+#endif
+
+namespace LL
+{
+ namespace GLTF
+ {
+ // copy one Scalar from src to dst
+ template<class S, class T>
+ static void copyScalar(S* src, T& dst)
+ {
+ LL_ERRS() << "TODO: implement " << LL_FUNCSIG << LL_ENDL;
+ }
+
+ // copy one vec2 from src to dst
+ template<class S, class T>
+ static void copyVec2(S* src, T& dst)
+ {
+ LL_ERRS() << "TODO: implement " << LL_FUNCSIG << LL_ENDL;
+ }
+
+ // copy one vec3 from src to dst
+ template<class S, class T>
+ static void copyVec3(S* src, T& dst)
+ {
+ LL_ERRS() << "TODO: implement " << LL_FUNCSIG << LL_ENDL;
+ }
+
+ // copy one vec4 from src to dst
+ template<class S, class T>
+ static void copyVec4(S* src, T& dst)
+ {
+ LL_ERRS() << "TODO: implement " << LL_FUNCSIG << LL_ENDL;
+ }
+
+ // copy one vec2 from src to dst
+ template<class S, class T>
+ static void copyMat2(S* src, T& dst)
+ {
+ LL_ERRS() << "TODO: implement " << LL_FUNCSIG << LL_ENDL;
+ }
+
+ // copy one vec3 from src to dst
+ template<class S, class T>
+ static void copyMat3(S* src, T& dst)
+ {
+ LL_ERRS() << "TODO: implement " << LL_FUNCSIG << LL_ENDL;
+ }
+
+ // copy one vec4 from src to dst
+ template<class S, class T>
+ static void copyMat4(S* src, T& dst)
+ {
+ LL_ERRS() << "TODO: implement " << LL_FUNCSIG << LL_ENDL;
+ }
+
+ //=========================================================================================================
+ // concrete implementations for different types of source and destination
+ //=========================================================================================================
+
+// suppress unused function warning -- clang complains here but these specializations are definitely used
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-function"
+#endif
+
+ template<>
+ void copyScalar<F32, F32>(F32* src, F32& dst)
+ {
+ dst = *src;
+ }
+
+ template<>
+ void copyScalar<U32, U32>(U32* src, U32& dst)
+ {
+ dst = *src;
+ }
+
+ template<>
+ void copyScalar<U32, U16>(U32* src, U16& dst)
+ {
+ dst = *src;
+ }
+
+ template<>
+ void copyScalar<U16, U16>(U16* src, U16& dst)
+ {
+ dst = *src;
+ }
+
+ template<>
+ void copyScalar<U16, U32>(U16* src, U32& dst)
+ {
+ dst = *src;
+ }
+
+ template<>
+ void copyScalar<U8, U16>(U8* src, U16& dst)
+ {
+ dst = *src;
+ }
+
+ template<>
+ void copyScalar<U8, U32>(U8* src, U32& dst)
+ {
+ dst = *src;
+ }
+
+ template<>
+ void copyVec2<F32, LLVector2>(F32* src, LLVector2& dst)
+ {
+ dst.set(src[0], src[1]);
+ }
+
+ template<>
+ void copyVec3<F32, glh::vec3f>(F32* src, glh::vec3f& dst)
+ {
+ dst.set_value(src[0], src[1], src[2]);
+ }
+
+ template<>
+ void copyVec3<F32, LLVector4a>(F32* src, LLVector4a& dst)
+ {
+ dst.load3(src);
+ }
+
+ template<>
+ void copyVec3<U16, LLColor4U>(U16* src, LLColor4U& dst)
+ {
+ dst.set(src[0], src[1], src[2], 255);
+ }
+
+ template<>
+ void copyVec4<U8, LLColor4U>(U8* src, LLColor4U& dst)
+ {
+ dst.set(src[0], src[1], src[2], src[3]);
+ }
+
+ template<>
+ void copyVec4<U16, LLColor4U>(U16* src, LLColor4U& dst)
+ {
+ dst.set(src[0], src[1], src[2], src[3]);
+ }
+
+ template<>
+ void copyVec4<F32, LLColor4U>(F32* src, LLColor4U& dst)
+ {
+ dst.set(src[0]*255, src[1]*255, src[2]*255, src[3]*255);
+ }
+
+ template<>
+ void copyVec4<F32, LLVector4a>(F32* src, LLVector4a& dst)
+ {
+ dst.loadua(src);
+ }
+
+ template<>
+ void copyVec4<U16, LLVector4a>(U16* src, LLVector4a& dst)
+ {
+ dst.set(src[0], src[1], src[2], src[3]);
+ }
+
+ template<>
+ void copyVec4<U8, LLVector4a>(U8* src, LLVector4a& dst)
+ {
+ dst.set(src[0], src[1], src[2], src[3]);
+ }
+
+ template<>
+ void copyVec4<F32, glh::quaternionf>(F32* src, glh::quaternionf& dst)
+ {
+ dst.set_value(src);
+ }
+
+ template<>
+ void copyMat4<F32, glh::matrix4f>(F32* src, glh::matrix4f& dst)
+ {
+ dst.set_value(src);
+ }
+
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif
+
+ //=========================================================================================================
+
+ // copy from src to dst, stride is the number of bytes between each element in src, count is number of elements to copy
+ template<class S, class T>
+ static void copyScalar(S* src, LLStrider<T> dst, S32 stride, S32 count)
+ {
+ for (S32 i = 0; i < count; ++i)
+ {
+ copyScalar(src, *dst);
+ dst++;
+ src = (S*)((U8*)src + stride);
+ }
+ }
+
+ // copy from src to dst, stride is the number of bytes between each element in src, count is number of elements to copy
+ template<class S, class T>
+ static void copyVec2(S* src, LLStrider<T> dst, S32 stride, S32 count)
+ {
+ for (S32 i = 0; i < count; ++i)
+ {
+ copyVec2(src, *dst);
+ dst++;
+ src = (S*)((U8*)src + stride);
+ }
+ }
+
+ // copy from src to dst, stride is the number of bytes between each element in src, count is number of elements to copy
+ template<class S, class T>
+ static void copyVec3(S* src, LLStrider<T> dst, S32 stride, S32 count)
+ {
+ for (S32 i = 0; i < count; ++i)
+ {
+ copyVec3(src, *dst);
+ dst++;
+ src = (S*)((U8*)src + stride);
+ }
+ }
+
+ // copy from src to dst, stride is the number of bytes between each element in src, count is number of elements to copy
+ template<class S, class T>
+ static void copyVec4(S* src, LLStrider<T> dst, S32 stride, S32 count)
+ {
+ for (S32 i = 0; i < count; ++i)
+ {
+ copyVec4(src, *dst);
+ dst++;
+ src = (S*)((U8*)src + stride);
+ }
+ }
+
+ // copy from src to dst, stride is the number of bytes between each element in src, count is number of elements to copy
+ template<class S, class T>
+ static void copyMat2(S* src, LLStrider<T> dst, S32 stride, S32 count)
+ {
+ for (S32 i = 0; i < count; ++i)
+ {
+ copyMat2(src, *dst);
+ dst++;
+ src = (S*)((U8*)src + stride);
+ }
+ }
+
+ // copy from src to dst, stride is the number of bytes between each element in src, count is number of elements to copy
+ template<class S, class T>
+ static void copyMat3(S* src, LLStrider<T> dst, S32 stride, S32 count)
+ {
+ for (S32 i = 0; i < count; ++i)
+ {
+ copyMat3(src, *dst);
+ dst++;
+ src = (S*)((U8*)src + stride);
+ }
+ }
+
+ // copy from src to dst, stride is the number of bytes between each element in src, count is number of elements to copy
+ template<class S, class T>
+ static void copyMat4(S* src, LLStrider<T> dst, S32 stride, S32 count)
+ {
+ for (S32 i = 0; i < count; ++i)
+ {
+ copyMat4(src, *dst);
+ dst++;
+ src = (S*)((U8*)src + stride);
+ }
+ }
+
+ template<class S, class T>
+ static void copy(Asset& asset, Accessor& accessor, const S* src, LLStrider<T>& dst, S32 byteStride)
+ {
+ if (accessor.mType == (S32)Accessor::Type::SCALAR)
+ {
+ S32 stride = byteStride == 0 ? sizeof(S) * 1 : byteStride;
+ copyScalar((S*)src, dst, stride, accessor.mCount);
+ }
+ else if (accessor.mType == (S32)Accessor::Type::VEC2)
+ {
+ S32 stride = byteStride == 0 ? sizeof(S) * 2 : byteStride;
+ copyVec2((S*)src, dst, stride, accessor.mCount);
+ }
+ else if (accessor.mType == (S32)Accessor::Type::VEC3)
+ {
+ S32 stride = byteStride == 0 ? sizeof(S) * 3 : byteStride;
+ copyVec3((S*)src, dst, stride, accessor.mCount);
+ }
+ else if (accessor.mType == (S32)Accessor::Type::VEC4)
+ {
+ S32 stride = byteStride == 0 ? sizeof(S) * 4 : byteStride;
+ copyVec4((S*)src, dst, stride, accessor.mCount);
+ }
+ else if (accessor.mType == (S32)Accessor::Type::MAT2)
+ {
+ S32 stride = byteStride == 0 ? sizeof(S) * 4 : byteStride;
+ copyMat2((S*)src, dst, stride, accessor.mCount);
+ }
+ else if (accessor.mType == (S32)Accessor::Type::MAT3)
+ {
+ S32 stride = byteStride == 0 ? sizeof(S) * 9 : byteStride;
+ copyMat3((S*)src, dst, stride, accessor.mCount);
+ }
+ else if (accessor.mType == (S32)Accessor::Type::MAT4)
+ {
+ S32 stride = byteStride == 0 ? sizeof(S) * 16 : byteStride;
+ copyMat4((S*)src, dst, stride, accessor.mCount);
+ }
+ else
+ {
+ LL_ERRS("GLTF") << "Unsupported accessor type" << LL_ENDL;
+ }
+ }
+
+ // copy data from accessor to strider
+ template<class T>
+ static void copy(Asset& asset, Accessor& accessor, LLStrider<T>& dst)
+ {
+ const BufferView& bufferView = asset.mBufferViews[accessor.mBufferView];
+ const Buffer& buffer = asset.mBuffers[bufferView.mBuffer];
+ const U8* src = buffer.mData.data() + bufferView.mByteOffset + accessor.mByteOffset;
+
+ if (accessor.mComponentType == TINYGLTF_COMPONENT_TYPE_FLOAT)
+ {
+ LL::GLTF::copy(asset, accessor, (const F32*)src, dst, bufferView.mByteStride);
+ }
+ else if (accessor.mComponentType == TINYGLTF_COMPONENT_TYPE_UNSIGNED_SHORT)
+ {
+ LL::GLTF::copy(asset, accessor, (const U16*)src, dst, bufferView.mByteStride);
+ }
+ else if (accessor.mComponentType == TINYGLTF_COMPONENT_TYPE_UNSIGNED_INT)
+ {
+ LL::GLTF::copy(asset, accessor, (const U32*)src, dst, bufferView.mByteStride);
+ }
+ else if (accessor.mComponentType == TINYGLTF_COMPONENT_TYPE_UNSIGNED_BYTE)
+ {
+ LL::GLTF::copy(asset, accessor, (const U8*)src, dst, bufferView.mByteStride);
+ }
+ else if (accessor.mComponentType == TINYGLTF_COMPONENT_TYPE_SHORT)
+ {
+ LL::GLTF::copy(asset, accessor, (const S16*)src, dst, bufferView.mByteStride);
+ }
+ else if (accessor.mComponentType == TINYGLTF_COMPONENT_TYPE_BYTE)
+ {
+ LL::GLTF::copy(asset, accessor, (const S8*)src, dst, bufferView.mByteStride);
+ }
+ else if (accessor.mComponentType == TINYGLTF_COMPONENT_TYPE_DOUBLE)
+ {
+ LL::GLTF::copy(asset, accessor, (const F64*)src, dst, bufferView.mByteStride);
+ }
+ else
+ {
+ LL_ERRS("GLTF") << "Unsupported component type" << LL_ENDL;
+ }
+ }
+
+ // copy data from accessor to vector
+ template<class T>
+ static void copy(Asset& asset, Accessor& accessor, std::vector<T>& dst)
+ {
+ dst.resize(accessor.mCount);
+ LLStrider<T> strider = dst.data();
+ copy(asset, accessor, strider);
+ }
+ }
+}
+
diff --git a/indra/newview/gltf/primitive.cpp b/indra/newview/gltf/primitive.cpp
new file mode 100644
index 0000000000..b57a0af18d
--- /dev/null
+++ b/indra/newview/gltf/primitive.cpp
@@ -0,0 +1,400 @@
+/**
+ * @file primitive.cpp
+ * @brief LL GLTF Implementation
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, 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 "asset.h"
+#include "buffer_util.h"
+
+#include "../lltinygltfhelper.h"
+
+using namespace LL::GLTF;
+
+void Primitive::allocateGLResources(Asset& asset)
+{
+ // allocate vertex buffer
+ // We diverge from the intent of the GLTF format here to work with our existing render pipeline
+ // GLTF wants us to copy the buffer views into GPU storage as is and build render commands that source that data.
+ // For our engine, though, it's better to rearrange the buffers at load time into a layout that's more consistent.
+ // The GLTF native approach undoubtedly works well if you can count on VAOs, but VAOs perform much worse with our scenes.
+
+ // load vertex data
+ for (auto& it : mAttributes)
+ {
+ const std::string& attribName = it.first;
+ Accessor& accessor = asset.mAccessors[it.second];
+
+ // load vertex data
+ if (attribName == "POSITION")
+ {
+ copy(asset, accessor, mPositions);
+ }
+ else if (attribName == "NORMAL")
+ {
+ copy(asset, accessor, mNormals);
+ }
+ else if (attribName == "TANGENT")
+ {
+ copy(asset, accessor, mTangents);
+ }
+ else if (attribName == "COLOR_0")
+ {
+ copy(asset, accessor, mColors);
+ }
+ else if (attribName == "TEXCOORD_0")
+ {
+ copy(asset, accessor, mTexCoords);
+ }
+ else if (attribName == "JOINTS_0")
+ {
+ copy(asset, accessor, mJoints);
+ }
+ else if (attribName == "WEIGHTS_0")
+ {
+ copy(asset, accessor, mWeights);
+ }
+ }
+
+ // copy index buffer
+ if (mIndices != INVALID_INDEX)
+ {
+ Accessor& accessor = asset.mAccessors[mIndices];
+ copy(asset, accessor, mIndexArray);
+ }
+
+ U32 mask = ATTRIBUTE_MASK;
+
+ if (!mWeights.empty())
+ {
+ mask |= LLVertexBuffer::MAP_WEIGHT4;
+ }
+
+ mVertexBuffer = new LLVertexBuffer(mask);
+ mVertexBuffer->allocateBuffer(mPositions.size(), mIndexArray.size()*2); // double the size of the index buffer for 32-bit indices
+
+ mVertexBuffer->setBuffer();
+ mVertexBuffer->setPositionData(mPositions.data());
+
+ if (!mIndexArray.empty())
+ {
+ mVertexBuffer->setIndexData(mIndexArray.data());
+ }
+
+ if (mTexCoords.empty())
+ {
+ mTexCoords.resize(mPositions.size());
+ }
+
+ // flip texcoord y, upload, then flip back (keep the off-spec data in vram only)
+ for (auto& tc : mTexCoords)
+ {
+ tc[1] = 1.f - tc[1];
+ }
+ mVertexBuffer->setTexCoordData(mTexCoords.data());
+
+ for (auto& tc : mTexCoords)
+ {
+ tc[1] = 1.f - tc[1];
+ }
+
+ if (mColors.empty())
+ {
+ mColors.resize(mPositions.size(), LLColor4U::white);
+ }
+
+ // bake material basecolor into color array
+ if (mMaterial != INVALID_INDEX)
+ {
+ const Material& material = asset.mMaterials[mMaterial];
+ LLColor4 baseColor = material.mMaterial->mBaseColor;
+ for (auto& dst : mColors)
+ {
+ dst = LLColor4U(baseColor * LLColor4(dst));
+ }
+ }
+
+ mVertexBuffer->setColorData(mColors.data());
+
+ if (mNormals.empty())
+ {
+ mNormals.resize(mPositions.size(), LLVector4a(0, 0, 1, 0));
+ }
+
+ mVertexBuffer->setNormalData(mNormals.data());
+
+ if (mTangents.empty())
+ {
+ // TODO: generate tangents if needed
+ mTangents.resize(mPositions.size(), LLVector4a(1, 0, 0, 1));
+ }
+
+ mVertexBuffer->setTangentData(mTangents.data());
+
+ if (!mWeights.empty())
+ {
+ std::vector<LLVector4a> weight_data;
+ weight_data.resize(mWeights.size());
+
+ F32 max_weight = 1.f - FLT_EPSILON*100.f;
+ LLVector4a maxw(max_weight, max_weight, max_weight, max_weight);
+ for (U32 i = 0; i < mWeights.size(); ++i)
+ {
+ LLVector4a& w = weight_data[i];
+ w.setMin(mWeights[i], maxw);
+ w.add(mJoints[i]);
+ };
+
+ mVertexBuffer->setWeight4Data(weight_data.data());
+ }
+
+ createOctree();
+
+ mVertexBuffer->unbind();
+}
+
+void initOctreeTriangle(LLVolumeTriangle* tri, F32 scaler, S32 i0, S32 i1, S32 i2, const LLVector4a& v0, const LLVector4a& v1, const LLVector4a& v2)
+{
+ //store pointers to vertex data
+ tri->mV[0] = &v0;
+ tri->mV[1] = &v1;
+ tri->mV[2] = &v2;
+
+ //store indices
+ tri->mIndex[0] = i0;
+ tri->mIndex[1] = i1;
+ tri->mIndex[2] = i2;
+
+ //get minimum point
+ LLVector4a min = v0;
+ min.setMin(min, v1);
+ min.setMin(min, v2);
+
+ //get maximum point
+ LLVector4a max = v0;
+ max.setMax(max, v1);
+ max.setMax(max, v2);
+
+ //compute center
+ LLVector4a center;
+ center.setAdd(min, max);
+ center.mul(0.5f);
+
+ tri->mPositionGroup = center;
+
+ //compute "radius"
+ LLVector4a size;
+ size.setSub(max, min);
+
+ tri->mRadius = size.getLength3().getF32() * scaler;
+}
+
+void Primitive::createOctree()
+{
+ // create octree
+ mOctree = new LLVolumeOctree();
+
+ F32 scaler = 0.25f;
+
+ if (mMode == TINYGLTF_MODE_TRIANGLES)
+ {
+ const U32 num_triangles = mVertexBuffer->getNumIndices() / 3;
+ // Initialize all the triangles we need
+ mOctreeTriangles.resize(num_triangles);
+
+ for (U32 triangle_index = 0; triangle_index < num_triangles; ++triangle_index)
+ { //for each triangle
+ const U32 index = triangle_index * 3;
+ LLVolumeTriangle* tri = &mOctreeTriangles[triangle_index];
+ S32 i0 = mIndexArray[index];
+ S32 i1 = mIndexArray[index + 1];
+ S32 i2 = mIndexArray[index + 2];
+
+ const LLVector4a& v0 = mPositions[i0];
+ const LLVector4a& v1 = mPositions[i1];
+ const LLVector4a& v2 = mPositions[i2];
+
+ initOctreeTriangle(tri, scaler, i0, i1, i2, v0, v1, v2);
+
+ //insert
+ mOctree->insert(tri);
+ }
+ }
+ else if (mMode == TINYGLTF_MODE_TRIANGLE_STRIP)
+ {
+ const U32 num_triangles = mVertexBuffer->getNumIndices() - 2;
+ // Initialize all the triangles we need
+ mOctreeTriangles.resize(num_triangles);
+
+ for (U32 triangle_index = 0; triangle_index < num_triangles; ++triangle_index)
+ { //for each triangle
+ const U32 index = triangle_index + 2;
+ LLVolumeTriangle* tri = &mOctreeTriangles[triangle_index];
+ S32 i0 = mIndexArray[index];
+ S32 i1 = mIndexArray[index - 1];
+ S32 i2 = mIndexArray[index - 2];
+
+ const LLVector4a& v0 = mPositions[i0];
+ const LLVector4a& v1 = mPositions[i1];
+ const LLVector4a& v2 = mPositions[i2];
+
+ initOctreeTriangle(tri, scaler, i0, i1, i2, v0, v1, v2);
+
+ //insert
+ mOctree->insert(tri);
+ }
+ }
+ else if (mMode == TINYGLTF_MODE_TRIANGLE_FAN)
+ {
+ const U32 num_triangles = mVertexBuffer->getNumIndices() - 2;
+ // Initialize all the triangles we need
+ mOctreeTriangles.resize(num_triangles);
+
+ for (U32 triangle_index = 0; triangle_index < num_triangles; ++triangle_index)
+ { //for each triangle
+ const U32 index = triangle_index + 2;
+ LLVolumeTriangle* tri = &mOctreeTriangles[triangle_index];
+ S32 i0 = mIndexArray[0];
+ S32 i1 = mIndexArray[index - 1];
+ S32 i2 = mIndexArray[index - 2];
+
+ const LLVector4a& v0 = mPositions[i0];
+ const LLVector4a& v1 = mPositions[i1];
+ const LLVector4a& v2 = mPositions[i2];
+
+ initOctreeTriangle(tri, scaler, i0, i1, i2, v0, v1, v2);
+
+ //insert
+ mOctree->insert(tri);
+ }
+ }
+ else if (mMode == TINYGLTF_MODE_POINTS ||
+ mMode == TINYGLTF_MODE_LINE ||
+ mMode == TINYGLTF_MODE_LINE_LOOP ||
+ mMode == TINYGLTF_MODE_LINE_STRIP)
+ {
+ // nothing to do, no volume... maybe add some collision geometry around these primitive types?
+ }
+
+ else
+ {
+ LL_ERRS() << "Unsupported Primitive mode" << LL_ENDL;
+ }
+
+ //remove unneeded octree layers
+ while (!mOctree->balance()) {}
+
+ //calculate AABB for each node
+ LLVolumeOctreeRebound rebound;
+ rebound.traverse(mOctree);
+}
+
+const LLVolumeTriangle* Primitive::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
+ LLVector4a* intersection, LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent_out)
+{
+ if (mOctree.isNull())
+ {
+ return nullptr;
+ }
+
+ LLVector4a dir;
+ dir.setSub(end, start);
+
+ F32 closest_t = 2.f; // must be larger than 1
+
+ //create a proxy LLVolumeFace for the raycast
+ LLVolumeFace face;
+ face.mPositions = mPositions.data();
+ face.mTexCoords = mTexCoords.data();
+ face.mNormals = mNormals.data();
+ face.mTangents = mTangents.data();
+ face.mIndices = nullptr; // unreferenced
+
+ face.mNumIndices = mIndexArray.size();
+ face.mNumVertices = mPositions.size();
+
+ LLOctreeTriangleRayIntersect intersect(start, dir, &face, &closest_t, intersection, tex_coord, normal, tangent_out);
+ intersect.traverse(mOctree);
+
+ // null out proxy data so it doesn't get freed
+ face.mPositions = face.mNormals = face.mTangents = nullptr;
+ face.mIndices = nullptr;
+ face.mTexCoords = nullptr;
+
+ return intersect.mHitTriangle;
+}
+
+Primitive::~Primitive()
+{
+ mOctree = nullptr;
+}
+
+
+const Primitive& Primitive::operator=(const tinygltf::Primitive& src)
+{
+ // load material
+ mMaterial = src.material;
+
+ // load mode
+ mMode = src.mode;
+
+ // load indices
+ mIndices = src.indices;
+
+ // load attributes
+ for (auto& it : src.attributes)
+ {
+ mAttributes[it.first] = it.second;
+ }
+
+ switch (mMode)
+ {
+ case TINYGLTF_MODE_POINTS:
+ mGLMode = LLRender::POINTS;
+ break;
+ case TINYGLTF_MODE_LINE:
+ mGLMode = LLRender::LINES;
+ break;
+ case TINYGLTF_MODE_LINE_LOOP:
+ mGLMode = LLRender::LINE_LOOP;
+ break;
+ case TINYGLTF_MODE_LINE_STRIP:
+ mGLMode = LLRender::LINE_STRIP;
+ break;
+ case TINYGLTF_MODE_TRIANGLES:
+ mGLMode = LLRender::TRIANGLES;
+ break;
+ case TINYGLTF_MODE_TRIANGLE_STRIP:
+ mGLMode = LLRender::TRIANGLE_STRIP;
+ break;
+ case TINYGLTF_MODE_TRIANGLE_FAN:
+ mGLMode = LLRender::TRIANGLE_FAN;
+ break;
+ default:
+ mGLMode = GL_TRIANGLES;
+ }
+
+ return *this;
+}
diff --git a/indra/newview/gltf/primitive.h b/indra/newview/gltf/primitive.h
new file mode 100644
index 0000000000..07e8e7deb2
--- /dev/null
+++ b/indra/newview/gltf/primitive.h
@@ -0,0 +1,93 @@
+#pragma once
+
+/**
+ * @file primitive.h
+ * @brief LL GLTF Implementation
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, 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 "llvertexbuffer.h"
+#include "llvolumeoctree.h"
+
+// LL GLTF Implementation
+namespace LL
+{
+ namespace GLTF
+ {
+ class Asset;
+
+ constexpr U32 ATTRIBUTE_MASK =
+ LLVertexBuffer::MAP_VERTEX |
+ LLVertexBuffer::MAP_NORMAL |
+ LLVertexBuffer::MAP_TEXCOORD0 |
+ LLVertexBuffer::MAP_TANGENT |
+ LLVertexBuffer::MAP_COLOR;
+
+ class Primitive
+ {
+ public:
+ ~Primitive();
+
+ // GPU copy of mesh data
+ LLPointer<LLVertexBuffer> mVertexBuffer;
+
+ // CPU copy of mesh data
+ std::vector<LLVector2> mTexCoords;
+ std::vector<LLVector4a> mNormals;
+ std::vector<LLVector4a> mTangents;
+ std::vector<LLVector4a> mPositions;
+ std::vector<LLVector4a> mJoints;
+ std::vector<LLVector4a> mWeights;
+ std::vector<LLColor4U> mColors;
+ std::vector<U32> mIndexArray;
+
+ // raycast acceleration structure
+ LLPointer<LLVolumeOctree> mOctree;
+ std::vector<LLVolumeTriangle> mOctreeTriangles;
+
+ S32 mMaterial = -1;
+ U32 mMode = TINYGLTF_MODE_TRIANGLES; // default to triangles
+ U32 mGLMode = LLRender::TRIANGLES;
+ S32 mIndices = -1;
+ std::unordered_map<std::string, int> mAttributes;
+
+ // create octree based on vertex buffer
+ // must be called before buffer is unmapped and after buffer is populated with good data
+ void createOctree();
+
+ //get the LLVolumeTriangle that intersects with the given line segment at the point
+ //closest to start. Moves end to the point of intersection. Returns nullptr if no intersection.
+ //Line segment must be in the same coordinate frame as this Primitive
+ const LLVolumeTriangle* lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
+ LLVector4a* intersection = NULL, // return the intersection point
+ LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
+ LLVector4a* normal = NULL, // return the surface normal at the intersection point
+ LLVector4a* tangent = NULL // return the surface tangent at the intersection point
+ );
+
+ const Primitive& operator=(const tinygltf::Primitive& src);
+
+ void allocateGLResources(Asset& asset);
+ };
+ }
+}
diff --git a/indra/newview/gltfscenemanager.cpp b/indra/newview/gltfscenemanager.cpp
new file mode 100644
index 0000000000..6533f283e2
--- /dev/null
+++ b/indra/newview/gltfscenemanager.cpp
@@ -0,0 +1,645 @@
+/**
+ * @file gltfscenemanager.cpp
+ * @brief Builds menus out of items.
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, 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 "gltfscenemanager.h"
+#include "llviewermenufile.h"
+#include "llappviewer.h"
+#include "lltinygltfhelper.h"
+#include "llvertexbuffer.h"
+#include "llselectmgr.h"
+#include "llagent.h"
+#include "llnotificationsutil.h"
+#include "llvoavatarself.h"
+#include "llvolumeoctree.h"
+#include "gltf/asset.h"
+#include "pipeline.h"
+#include "llviewershadermgr.h"
+
+
+using namespace LL;
+
+// temporary location of LL GLTF Implementation
+using namespace LL::GLTF;
+
+void GLTFSceneManager::load()
+{
+ LLViewerObject* obj = LLSelectMgr::instance().getSelection()->getFirstRootObject();
+
+ if (obj)
+ {
+ // Load a scene from disk
+ LLFilePickerReplyThread::startPicker(
+ [](const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter load_filter, LLFilePicker::ESaveFilter save_filter)
+ {
+ if (LLAppViewer::instance()->quitRequested())
+ {
+ return;
+ }
+ if (filenames.size() > 0)
+ {
+ GLTFSceneManager::instance().load(filenames[0]);
+ }
+ },
+ LLFilePicker::FFLOAD_GLTF,
+ false);
+ }
+ else
+ {
+ LLNotificationsUtil::add("GLTFOpenSelection");
+ }
+}
+
+void GLTFSceneManager::saveAs()
+{
+ LLViewerObject* obj = LLSelectMgr::instance().getSelection()->getFirstRootObject();
+ if (obj && obj->mGLTFAsset)
+ {
+ LLFilePickerReplyThread::startPicker(
+ [](const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter load_filter, LLFilePicker::ESaveFilter save_filter)
+ {
+ if (LLAppViewer::instance()->quitRequested())
+ {
+ return;
+ }
+ if (filenames.size() > 0)
+ {
+ GLTFSceneManager::instance().save(filenames[0]);
+ }
+ },
+ LLFilePicker::FFSAVE_GLTF,
+ "scene.gltf");
+ }
+ else
+ {
+ LLNotificationsUtil::add("GLTFSaveSelection");
+ }
+}
+
+void GLTFSceneManager::decomposeSelection()
+{
+ LLViewerObject* obj = LLSelectMgr::instance().getSelection()->getFirstRootObject();
+ if (obj && obj->mGLTFAsset)
+ {
+ LLFilePickerReplyThread::startPicker(
+ [](const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter load_filter, LLFilePicker::ESaveFilter save_filter)
+ {
+ if (LLAppViewer::instance()->quitRequested())
+ {
+ return;
+ }
+ if (filenames.size() > 0)
+ {
+ GLTFSceneManager::instance().decomposeSelection(filenames[0]);
+ }
+ },
+ LLFilePicker::FFSAVE_GLTF,
+ "scene.gltf");
+ }
+ else
+ {
+ LLNotificationsUtil::add("GLTFSaveSelection");
+ }
+}
+
+void GLTFSceneManager::decomposeSelection(const std::string& filename)
+{
+ LLViewerObject* obj = LLSelectMgr::instance().getSelection()->getFirstRootObject();
+ if (obj && obj->mGLTFAsset)
+ {
+ // copy asset out for decomposition
+ Asset asset = *obj->mGLTFAsset;
+
+ // decompose the asset into component parts
+ asset.decompose(filename);
+
+ // copy decomposed asset into tinygltf for serialization
+ tinygltf::Model model;
+ asset.save(model);
+
+ LLTinyGLTFHelper::saveModel(filename, model);
+ }
+}
+
+void GLTFSceneManager::save(const std::string& filename)
+{
+ LLViewerObject* obj = LLSelectMgr::instance().getSelection()->getFirstRootObject();
+ if (obj && obj->mGLTFAsset)
+ {
+ Asset* asset = obj->mGLTFAsset.get();
+ tinygltf::Model model;
+ asset->save(model);
+
+ LLTinyGLTFHelper::saveModel(filename, model);
+ }
+}
+
+void GLTFSceneManager::load(const std::string& filename)
+{
+ tinygltf::Model model;
+ LLTinyGLTFHelper::loadModel(filename, model);
+
+ std::shared_ptr<Asset> asset = std::make_shared<Asset>();
+ *asset = model;
+
+ gDebugProgram.bind(); // bind a shader to satisfy LLVertexBuffer assertions
+ asset->allocateGLResources(filename, model);
+ asset->updateTransforms();
+
+ // hang the asset off the currently selected object, or off of the avatar if no object is selected
+ LLViewerObject* obj = LLSelectMgr::instance().getSelection()->getFirstRootObject();
+
+ if (obj)
+ { // assign to self avatar
+ obj->mGLTFAsset = asset;
+
+ if (std::find(mObjects.begin(), mObjects.end(), obj) == mObjects.end())
+ {
+ mObjects.push_back(obj);
+ }
+ }
+}
+
+GLTFSceneManager::~GLTFSceneManager()
+{
+ mObjects.clear();
+}
+
+void GLTFSceneManager::renderOpaque()
+{
+ render(true);
+}
+
+void GLTFSceneManager::renderAlpha()
+{
+ render(false);
+}
+
+void GLTFSceneManager::update()
+{
+ for (U32 i = 0; i < mObjects.size(); ++i)
+ {
+ if (mObjects[i]->isDead() || mObjects[i]->mGLTFAsset == nullptr)
+ {
+ mObjects.erase(mObjects.begin() + i);
+ --i;
+ continue;
+ }
+
+ mObjects[i]->mGLTFAsset->update();
+ }
+}
+
+void GLTFSceneManager::render(bool opaque, bool rigged)
+{
+ // for debugging, just render the whole scene as opaque
+ // by traversing the whole scenegraph
+ // Assumes camera transform is already set and
+ // appropriate shader is already bound
+
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+
+ for (U32 i = 0; i < mObjects.size(); ++i)
+ {
+ if (mObjects[i]->isDead() || mObjects[i]->mGLTFAsset == nullptr)
+ {
+ mObjects.erase(mObjects.begin() + i);
+ --i;
+ continue;
+ }
+
+ Asset* asset = mObjects[i]->mGLTFAsset.get();
+
+ gGL.pushMatrix();
+
+ LLMatrix4a mat = mObjects[i]->getGLTFAssetToAgentTransform();
+
+ LLMatrix4a modelview;
+ modelview.loadu(gGLModelView);
+
+ matMul(mat, modelview, modelview);
+
+ asset->updateRenderTransforms(modelview);
+ asset->render(opaque, rigged);
+
+ gGL.popMatrix();
+ }
+}
+
+LLMatrix4a inverse(const LLMatrix4a& mat)
+{
+ glh::matrix4f m((F32*)mat.mMatrix);
+ m = m.inverse();
+ LLMatrix4a ret;
+ ret.loadu(m.m);
+ return ret;
+}
+
+bool GLTFSceneManager::lineSegmentIntersect(LLVOVolume* obj, Asset* asset, const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_unselectable, S32* node_hit, S32* primitive_hit,
+ LLVector4a* intersection, LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent)
+
+{
+ // line segment intersection test
+ // start and end should be in agent space
+ // volume space and asset space should be the same coordinate frame
+ // results should be transformed back to agent space
+
+ bool ret = false;
+
+ LLVector4a local_start;
+ LLVector4a local_end;
+
+ LLMatrix4a asset_to_agent = obj->getGLTFAssetToAgentTransform();
+ LLMatrix4a agent_to_asset = inverse(asset_to_agent);
+
+ agent_to_asset.affineTransform(start, local_start);
+ agent_to_asset.affineTransform(end, local_end);
+
+ LLVector4a p;
+ LLVector4a n;
+ LLVector2 tc;
+ LLVector4a tn;
+
+ if (intersection != NULL)
+ {
+ p = *intersection;
+ }
+
+ if (tex_coord != NULL)
+ {
+ tc = *tex_coord;
+ }
+
+ if (normal != NULL)
+ {
+ n = *normal;
+ }
+
+ if (tangent != NULL)
+ {
+ tn = *tangent;
+ }
+
+ S32 hit_node_index = asset->lineSegmentIntersect(local_start, local_end, &p, &tc, &n, &tn, primitive_hit);
+
+ if (hit_node_index >= 0)
+ {
+ local_end = p;
+ if (node_hit != NULL)
+ {
+ *node_hit = hit_node_index;
+ }
+
+ if (intersection != NULL)
+ {
+ asset_to_agent.affineTransform(p, *intersection);
+ }
+
+ if (normal != NULL)
+ {
+ LLVector3 v_n(n.getF32ptr());
+ normal->load3(obj->volumeDirectionToAgent(v_n).mV);
+ (*normal).normalize3fast();
+ }
+
+ if (tangent != NULL)
+ {
+ LLVector3 v_tn(tn.getF32ptr());
+
+ LLVector4a trans_tangent;
+ trans_tangent.load3(obj->volumeDirectionToAgent(v_tn).mV);
+
+ LLVector4Logical mask;
+ mask.clear();
+ mask.setElement<3>();
+
+ tangent->setSelectWithMask(mask, tn, trans_tangent);
+ (*tangent).normalize3fast();
+ }
+
+ if (tex_coord != NULL)
+ {
+ *tex_coord = tc;
+ }
+
+ ret = true;
+ }
+
+ return ret;
+}
+
+LLDrawable* GLTFSceneManager::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
+ BOOL pick_transparent,
+ BOOL pick_rigged,
+ BOOL pick_unselectable,
+ BOOL pick_reflection_probe,
+ S32* node_hit, // return the index of the node that was hit
+ S32* primitive_hit, // return the index of the primitive that was hit
+ LLVector4a* intersection, // return the intersection point
+ LLVector2* tex_coord, // return the texture coordinates of the intersection point
+ LLVector4a* normal, // return the surface normal at the intersection point
+ LLVector4a* tangent) // return the surface tangent at the intersection point
+{
+ LLDrawable* drawable = nullptr;
+
+ LLVector4a local_end = end;
+ LLVector4a position;
+
+ for (U32 i = 0; i < mObjects.size(); ++i)
+ {
+ if (mObjects[i]->isDead() || mObjects[i]->mGLTFAsset == nullptr || !mObjects[i]->getVolume())
+ {
+ mObjects.erase(mObjects.begin() + i);
+ --i;
+ continue;
+ }
+
+ // temporary debug -- always double check objects that have GLTF scenes hanging off of them even if the ray doesn't intersect the object bounds
+ if (lineSegmentIntersect((LLVOVolume*) mObjects[i].get(), mObjects[i]->mGLTFAsset.get(), start, local_end, -1, pick_transparent, pick_rigged, pick_unselectable, node_hit, primitive_hit, &position, tex_coord, normal, tangent))
+ {
+ local_end = position;
+ if (intersection)
+ {
+ *intersection = position;
+ }
+ drawable = mObjects[i]->mDrawable;
+ }
+ }
+
+ return drawable;
+}
+
+void drawBoxOutline(const LLVector4a& pos, const LLVector4a& size);
+
+extern LLVector4a gDebugRaycastStart;
+extern LLVector4a gDebugRaycastEnd;
+
+void renderOctreeRaycast(const LLVector4a& start, const LLVector4a& end, const LLVolumeOctree* octree);
+
+void renderAssetDebug(LLViewerObject* obj, Asset* asset)
+{
+ // render debug
+ // assumes appropriate shader is already bound
+ // assumes modelview matrix is already set
+
+ gGL.pushMatrix();
+
+ // get raycast in asset space
+ LLMatrix4a agent_to_asset = obj->getAgentToGLTFAssetTransform();
+
+ LLVector4a start;
+ LLVector4a end;
+
+ agent_to_asset.affineTransform(gDebugRaycastStart, start);
+ agent_to_asset.affineTransform(gDebugRaycastEnd, end);
+
+
+ for (auto& node : asset->mNodes)
+ {
+ Mesh& mesh = asset->mMeshes[node.mMesh];
+
+ if (node.mMesh != INVALID_INDEX)
+ {
+ gGL.loadMatrix((F32*)node.mRenderMatrix.mMatrix);
+
+ // draw bounding box of mesh primitives
+ if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_BBOXES))
+ {
+ gGL.color3f(0.f, 1.f, 1.f);
+
+ for (auto& primitive : mesh.mPrimitives)
+ {
+ auto* listener = (LLVolumeOctreeListener*) primitive.mOctree->getListener(0);
+
+ LLVector4a center = listener->mBounds[0];
+ LLVector4a size = listener->mBounds[1];
+
+ drawBoxOutline(center, size);
+ }
+ }
+
+#if 0
+ if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_RAYCAST))
+ {
+ gGL.flush();
+ glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+
+ // convert raycast to node local space
+ LLVector4a local_start;
+ LLVector4a local_end;
+
+ node.mAssetMatrixInv.affineTransform(start, local_start);
+ node.mAssetMatrixInv.affineTransform(end, local_end);
+
+ for (auto& primitive : mesh.mPrimitives)
+ {
+ if (primitive.mOctree.notNull())
+ {
+ renderOctreeRaycast(local_start, local_end, primitive.mOctree);
+ }
+ }
+
+ gGL.flush();
+ glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+ }
+#endif
+ }
+ }
+
+ gGL.popMatrix();
+}
+
+void GLTFSceneManager::renderDebug()
+{
+ if (!gPipeline.hasRenderDebugMask(
+ LLPipeline::RENDER_DEBUG_BBOXES |
+ LLPipeline::RENDER_DEBUG_RAYCAST |
+ LLPipeline::RENDER_DEBUG_NODES))
+ {
+ return;
+ }
+
+ gDebugProgram.bind();
+
+ LLGLDisable cullface(GL_CULL_FACE);
+ LLGLEnable blend(GL_BLEND);
+ gGL.setSceneBlendType(LLRender::BT_ALPHA);
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+ gPipeline.disableLights();
+
+ // force update all mRenderMatrix, not just nodes with meshes
+ for (auto& obj : mObjects)
+ {
+ if (obj->isDead() || obj->mGLTFAsset == nullptr)
+ {
+ continue;
+ }
+
+ LLMatrix4a mat = obj->getGLTFAssetToAgentTransform();
+
+ LLMatrix4a modelview;
+ modelview.loadu(gGLModelView);
+
+ matMul(mat, modelview, modelview);
+
+ Asset* asset = obj->mGLTFAsset.get();
+
+ for (auto& node : asset->mNodes)
+ {
+ matMul(node.mAssetMatrix, modelview, node.mRenderMatrix);
+ }
+ }
+
+ for (auto& obj : mObjects)
+ {
+ if (obj->isDead() || obj->mGLTFAsset == nullptr)
+ {
+ continue;
+ }
+
+ Asset* asset = obj->mGLTFAsset.get();
+
+ LLMatrix4a mat = obj->getGLTFAssetToAgentTransform();
+
+ LLMatrix4a modelview;
+ modelview.loadu(gGLModelView);
+
+ matMul(mat, modelview, modelview);
+
+ renderAssetDebug(obj, asset);
+ }
+
+ if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_NODES))
+ { //render node hierarchy
+
+ for (U32 i = 0; i < 2; ++i)
+ {
+ LLGLDepthTest depth(GL_TRUE, i == 0 ? GL_FALSE : GL_TRUE, i == 0 ? GL_GREATER : GL_LEQUAL);
+ LLGLState blend(GL_BLEND, i == 0 ? TRUE : FALSE);
+
+
+ gGL.pushMatrix();
+
+ for (auto& obj : mObjects)
+ {
+ if (obj->isDead() || obj->mGLTFAsset == nullptr)
+ {
+ continue;
+ }
+
+ LLMatrix4a mat = obj->getGLTFAssetToAgentTransform();
+
+ LLMatrix4a modelview;
+ modelview.loadu(gGLModelView);
+
+ matMul(mat, modelview, modelview);
+
+ Asset* asset = obj->mGLTFAsset.get();
+
+ for (auto& node : asset->mNodes)
+ {
+ // force update all mRenderMatrix, not just nodes with meshes
+ matMul(node.mAssetMatrix, modelview, node.mRenderMatrix);
+
+ gGL.loadMatrix(node.mRenderMatrix.getF32ptr());
+ // render x-axis red, y-axis green, z-axis blue
+ gGL.color4f(1.f, 0.f, 0.f, 0.5f);
+ gGL.begin(LLRender::LINES);
+ gGL.vertex3f(0.f, 0.f, 0.f);
+ gGL.vertex3f(1.f, 0.f, 0.f);
+ gGL.end();
+ gGL.flush();
+
+ gGL.color4f(0.f, 1.f, 0.f, 0.5f);
+ gGL.begin(LLRender::LINES);
+ gGL.vertex3f(0.f, 0.f, 0.f);
+ gGL.vertex3f(0.f, 1.f, 0.f);
+ gGL.end();
+ gGL.flush();
+
+ gGL.begin(LLRender::LINES);
+ gGL.color4f(0.f, 0.f, 1.f, 0.5f);
+ gGL.vertex3f(0.f, 0.f, 0.f);
+ gGL.vertex3f(0.f, 0.f, 1.f);
+ gGL.end();
+ gGL.flush();
+
+ // render path to child nodes cyan
+ gGL.color4f(0.f, 1.f, 1.f, 0.5f);
+ gGL.begin(LLRender::LINES);
+ for (auto& child_idx : node.mChildren)
+ {
+ Node& child = asset->mNodes[child_idx];
+ gGL.vertex3f(0.f, 0.f, 0.f);
+ gGL.vertex3fv(child.mMatrix.getTranslation().getF32ptr());
+ }
+ gGL.end();
+ gGL.flush();
+ }
+ }
+
+ gGL.popMatrix();
+ }
+
+ }
+
+
+ if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_RAYCAST))
+ {
+ S32 node_hit = -1;
+ S32 primitive_hit = -1;
+ LLVector4a intersection;
+
+ LLDrawable* drawable = lineSegmentIntersect(gDebugRaycastStart, gDebugRaycastEnd, TRUE, TRUE, TRUE, TRUE, &node_hit, &primitive_hit, &intersection, nullptr, nullptr, nullptr);
+
+ if (drawable)
+ {
+ gGL.pushMatrix();
+ Asset* asset = drawable->getVObj()->mGLTFAsset.get();
+ Node* node = &asset->mNodes[node_hit];
+ Primitive* primitive = &asset->mMeshes[node->mMesh].mPrimitives[primitive_hit];
+
+ gGL.flush();
+ glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+ gGL.color3f(1, 0, 1);
+ drawBoxOutline(intersection, LLVector4a(0.1f, 0.1f, 0.1f, 0.f));
+
+ gGL.loadMatrix((F32*) node->mRenderMatrix.mMatrix);
+
+
+
+ auto* listener = (LLVolumeOctreeListener*) primitive->mOctree->getListener(0);
+ drawBoxOutline(listener->mBounds[0], listener->mBounds[1]);
+
+ gGL.flush();
+ glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+ gGL.popMatrix();
+ }
+ }
+ gDebugProgram.unbind();
+}
+
diff --git a/indra/newview/gltfscenemanager.h b/indra/newview/gltfscenemanager.h
new file mode 100644
index 0000000000..e380be7e3c
--- /dev/null
+++ b/indra/newview/gltfscenemanager.h
@@ -0,0 +1,84 @@
+#pragma once
+
+/**
+ * @file gltfscenemanager.h
+ * @brief Builds menus out of items.
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, 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 "llsingleton.h"
+#include "llviewerobject.h"
+class LLVOVolume;
+class LLDrawable;
+
+namespace LL
+{
+ namespace GLTF
+ {
+ class Asset;
+ }
+}
+
+namespace LL
+{
+ class GLTFSceneManager : public LLSimpleton<GLTFSceneManager>
+ {
+ public:
+ ~GLTFSceneManager();
+ // load GLTF file from disk
+
+ void load(); // open filepicker to choose asset
+ void load(const std::string& filename); // load asset from filename
+
+ void saveAs(); // open filepicker and choose file to save selected asset to
+ void save(const std::string& filename); // save selected asset to filename (suitable for use in external programs)
+ void decomposeSelection(); // open file picker and choose a location to decompose to
+ void decomposeSelection(const std::string& filename); // decompose selected asset into simulator-ready .gltf, .bin, and .j2c files
+
+ void update();
+ void render(bool opaque, bool rigged = false);
+ void renderOpaque();
+ void renderAlpha();
+
+ LLDrawable* lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
+ BOOL pick_transparent,
+ BOOL pick_rigged,
+ BOOL pick_unselectable,
+ BOOL pick_reflection_probe,
+ S32* node_hit, // return the index of the node that was hit
+ S32* primitive_hit, // return the index of the primitive that was hit
+ LLVector4a* intersection, // return the intersection point
+ LLVector2* tex_coord, // return the texture coordinates of the intersection point
+ LLVector4a* normal, // return the surface normal at the intersection point
+ LLVector4a* tangent); // return the surface tangent at the intersection point
+
+ bool lineSegmentIntersect(LLVOVolume* obj, GLTF::Asset* asset, const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_unselectable, S32* face_hitp, S32* primitive_hitp,
+ LLVector4a* intersection, LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent);
+
+ void renderDebug();
+
+ std::vector<LLPointer<LLViewerObject>> mObjects;
+ };
+}
+
+
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 13501833b2..efa0865b7e 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -102,7 +102,7 @@ using namespace LLAvatarAppearanceDefines;
extern LLMenuBarGL* gMenuBarView;
-const BOOL ANIMATE = TRUE;
+const bool ANIMATE = true;
const U8 AGENT_STATE_TYPING = 0x04;
const U8 AGENT_STATE_EDITING = 0x10;
@@ -186,7 +186,7 @@ private:
class LLTeleportRequestViaLure : public LLTeleportRequestViaLandmark
{
public:
- LLTeleportRequestViaLure(const LLUUID &pLureId, BOOL pIsLureGodLike);
+ LLTeleportRequestViaLure(const LLUUID &pLureId, bool pIsLureGodLike);
virtual ~LLTeleportRequestViaLure();
virtual void toOstream(std::ostream& os) const;
@@ -196,10 +196,10 @@ public:
virtual void startTeleport();
protected:
- inline BOOL isLureGodLike() const {return mIsLureGodLike;};
+ inline bool isLureGodLike() const {return mIsLureGodLike;};
private:
- BOOL mIsLureGodLike;
+ bool mIsLureGodLike;
};
class LLTeleportRequestViaLocation : public LLTeleportRequest
@@ -372,7 +372,7 @@ bool LLAgent::isMicrophoneOn(const LLSD& sdname)
//-----------------------------------------------------------------------------
LLAgent::LLAgent() :
mGroupPowers(0),
- mHideGroupTitle(FALSE),
+ mHideGroupTitle(false),
mGroupID(),
mInitialized(false),
@@ -404,7 +404,7 @@ LLAgent::LLAgent() :
mHttpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID),
mTeleportState(TELEPORT_NONE),
mRegionp(NULL),
- mInterestListMode(LLViewerRegion::IL_MODE_DEFAULT),
+ mInterestListMode(IL_MODE_DEFAULT),
mAgentOriginGlobal(),
mPositionGlobal(),
@@ -416,24 +416,24 @@ LLAgent::LLAgent() :
mRenderState(0),
mTypingTimer(),
- mViewsPushed(FALSE),
+ mViewsPushed(false),
- mCustomAnim(FALSE),
- mShowAvatar(TRUE),
+ mCustomAnim(false),
+ mShowAvatar(true),
mFrameAgent(),
mIsDoNotDisturb(false),
mControlFlags(0x00000000),
- mbFlagsDirty(FALSE),
- mbFlagsNeedReset(FALSE),
+ mbFlagsDirty(false),
+ mbFlagsNeedReset(false),
- mAutoPilot(FALSE),
- mAutoPilotFlyOnStop(FALSE),
- mAutoPilotAllowFlying(TRUE),
+ mAutoPilot(false),
+ mAutoPilotFlyOnStop(false),
+ mAutoPilotAllowFlying(true),
mAutoPilotTargetGlobal(),
mAutoPilotStopDistance(1.f),
- mAutoPilotUseRotation(FALSE),
+ mAutoPilotUseRotation(false),
mAutoPilotTargetFacing(LLVector3::zero),
mAutoPilotTargetDist(0.f),
mAutoPilotNoProgressFrameCount(0),
@@ -441,18 +441,18 @@ LLAgent::LLAgent() :
mAutoPilotFinishedCallback(NULL),
mAutoPilotCallbackData(NULL),
- mMovementKeysLocked(FALSE),
+ mMovementKeysLocked(false),
mEffectColor(new LLUIColor(LLColor4(0.f, 1.f, 1.f, 1.f))),
- mHaveHomePosition(FALSE),
+ mHaveHomePosition(false),
mHomeRegionHandle( 0 ),
mNearChatRadius(CHAT_NORMAL_RADIUS / 2.f),
mNextFidgetTime(0.f),
mCurrentFidget(0),
mFirstLogin(false),
- mOutfitChosen(FALSE),
+ mOutfitChosen(false),
mVoiceConnected(false),
@@ -480,7 +480,7 @@ void LLAgent::init()
{
mMoveTimer.start();
- gSavedSettings.declareBOOL("SlowMotionAnimation", FALSE, "Declared in code", LLControlVariable::PERSIST_NO);
+ gSavedSettings.declareBOOL("SlowMotionAnimation", false, "Declared in code", LLControlVariable::PERSIST_NO);
gSavedSettings.getControl("SlowMotionAnimation")->getSignal()->connect(boost::bind(&handleSlowMotionAnimation, _2));
// *Note: this is where LLViewerCamera::getInstance() used to be constructed.
@@ -846,26 +846,26 @@ void LLAgent::movePitch(F32 mag)
// Does this parcel allow you to fly?
-BOOL LLAgent::canFly()
+bool LLAgent::canFly()
{
- if (isGodlike()) return TRUE;
+ if (isGodlike()) return true;
LLViewerRegion* regionp = getRegion();
- if (regionp && regionp->getBlockFly()) return FALSE;
+ if (regionp && regionp->getBlockFly()) return false;
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
- if (!parcel) return FALSE;
+ if (!parcel) return false;
// Allow owners to fly on their own land.
if (LLViewerParcelMgr::isParcelOwnedByAgent(parcel, GP_LAND_ALLOW_FLY))
{
- return TRUE;
+ return true;
}
return parcel->getAllowFly();
}
-BOOL LLAgent::getFlying() const
+bool LLAgent::getFlying() const
{
return mControlFlags & AGENT_CONTROL_FLY;
}
@@ -873,7 +873,7 @@ BOOL LLAgent::getFlying() const
//-----------------------------------------------------------------------------
// setFlying()
//-----------------------------------------------------------------------------
-void LLAgent::setFlying(BOOL fly, BOOL fail_sound)
+void LLAgent::setFlying(bool fly, bool fail_sound)
{
if (isAgentAvatarValid())
{
@@ -896,7 +896,7 @@ void LLAgent::setFlying(BOOL fly, BOOL fail_sound)
if (fly)
{
- BOOL was_flying = getFlying();
+ bool was_flying = getFlying();
if (!canFly() && !was_flying)
{
// parcel doesn't let you start fly
@@ -923,7 +923,7 @@ void LLAgent::setFlying(BOOL fly, BOOL fail_sound)
// Update Movement Controls according to Fly mode
LLFloaterMove::setFlyingMode(fly);
- mbFlagsDirty = TRUE;
+ mbFlagsDirty = true;
}
@@ -939,7 +939,7 @@ void LLAgent::toggleFlying()
LLToolPie::instance().stopClickToWalk();
}
- BOOL fly = !gAgent.getFlying();
+ bool fly = !gAgent.getFlying();
gAgent.mMoveTimer.reset();
LLFirstUse::notMoving(false);
@@ -951,7 +951,7 @@ void LLAgent::toggleFlying()
// static
bool LLAgent::enableFlying()
{
- BOOL sitting = FALSE;
+ bool sitting = false;
if (isAgentAvatarValid())
{
sitting = gAgentAvatarp->isSitting();
@@ -962,7 +962,7 @@ bool LLAgent::enableFlying()
// static
bool LLAgent::isSitting()
{
- BOOL sitting = FALSE;
+ bool sitting = false;
if (isAgentAvatarValid())
{
sitting = gAgentAvatarp->isSitting();
@@ -998,9 +998,9 @@ void LLAgent::capabilityReceivedCallback(const LLUUID &region_id, LLViewerRegion
LLAppViewer::instance()->updateNameLookupUrl(regionp);
}
- if (gAgent.getInterestListMode() == LLViewerRegion::IL_MODE_360)
+ if (gAgent.getInterestListMode() == IL_MODE_360)
{
- gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_360);
+ gAgent.changeInterestListMode(IL_MODE_360);
}
}
}
@@ -1147,7 +1147,7 @@ void LLAgent::removeRegionChangedCallback(boost::signals2::connection callback)
//-----------------------------------------------------------------------------
// inPrelude()
//-----------------------------------------------------------------------------
-BOOL LLAgent::inPrelude()
+bool LLAgent::inPrelude()
{
return mRegionp && mRegionp->isPrelude();
}
@@ -1166,7 +1166,7 @@ std::string LLAgent::getRegionCapability(const std::string &name)
// canManageEstate()
//-----------------------------------------------------------------------------
-BOOL LLAgent::canManageEstate() const
+bool LLAgent::canManageEstate() const
{
return mRegionp && mRegionp->canManageEstate();
}
@@ -1542,7 +1542,7 @@ U32 LLAgent::getControlFlags()
void LLAgent::setControlFlags(U32 mask)
{
mControlFlags |= mask;
- mbFlagsDirty = TRUE;
+ mbFlagsDirty = true;
}
@@ -1555,14 +1555,14 @@ void LLAgent::clearControlFlags(U32 mask)
mControlFlags &= ~mask;
if (old_flags != mControlFlags)
{
- mbFlagsDirty = TRUE;
+ mbFlagsDirty = true;
}
}
//-----------------------------------------------------------------------------
// controlFlagsDirty()
//-----------------------------------------------------------------------------
-BOOL LLAgent::controlFlagsDirty() const
+bool LLAgent::controlFlagsDirty() const
{
return mbFlagsDirty;
}
@@ -1572,7 +1572,7 @@ BOOL LLAgent::controlFlagsDirty() const
//-----------------------------------------------------------------------------
void LLAgent::enableControlFlagReset()
{
- mbFlagsNeedReset = TRUE;
+ mbFlagsNeedReset = true;
}
//-----------------------------------------------------------------------------
@@ -1582,8 +1582,8 @@ void LLAgent::resetControlFlags()
{
if (mbFlagsNeedReset)
{
- mbFlagsNeedReset = FALSE;
- mbFlagsDirty = FALSE;
+ mbFlagsNeedReset = false;
+ mbFlagsDirty = false;
// reset all of the ephemeral flags
// some flags are managed elsewhere
mControlFlags &= AGENT_CONTROL_AWAY | AGENT_CONTROL_FLY | AGENT_CONTROL_MOUSELOOK;
@@ -1630,7 +1630,7 @@ void LLAgent::clearAFK()
//-----------------------------------------------------------------------------
// getAFK()
//-----------------------------------------------------------------------------
-BOOL LLAgent::getAFK() const
+bool LLAgent::getAFK() const
{
return (mControlFlags & AGENT_CONTROL_AWAY) != 0;
}
@@ -1667,11 +1667,11 @@ void LLAgent::startAutoPilotGlobal(
const LLVector3d &target_global,
const std::string& behavior_name,
const LLQuaternion *target_rotation,
- void (*finish_callback)(BOOL, void *),
+ void (*finish_callback)(bool, void *),
void *callback_data,
F32 stop_distance,
F32 rot_threshold,
- BOOL allow_flying)
+ bool allow_flying)
{
if (!isAgentAvatarValid())
{
@@ -1728,38 +1728,38 @@ void LLAgent::startAutoPilotGlobal(
}
else
{
- mAutoPilotFlyOnStop = FALSE;
+ mAutoPilotFlyOnStop = false;
}
if (distance > 30.0 && mAutoPilotAllowFlying)
{
- setFlying(TRUE);
+ setFlying(true);
}
if ( distance > 1.f &&
mAutoPilotAllowFlying &&
heightDelta > (sqrtf(mAutoPilotStopDistance) + 1.f))
{
- setFlying(TRUE);
+ setFlying(true);
// Do not force flying for "Sit" behavior to prevent flying after pressing "Stand"
// from an object. See EXT-1655.
if ("Sit" != mAutoPilotBehaviorName)
- mAutoPilotFlyOnStop = TRUE;
+ mAutoPilotFlyOnStop = true;
}
- mAutoPilot = TRUE;
+ mAutoPilot = true;
setAutoPilotTargetGlobal(target_global);
if (target_rotation)
{
- mAutoPilotUseRotation = TRUE;
+ mAutoPilotUseRotation = true;
mAutoPilotTargetFacing = LLVector3::x_axis * *target_rotation;
mAutoPilotTargetFacing.mV[VZ] = 0.f;
mAutoPilotTargetFacing.normalize();
}
else
{
- mAutoPilotUseRotation = FALSE;
+ mAutoPilotUseRotation = false;
}
mAutoPilotNoProgressFrameCount = 0;
@@ -1797,7 +1797,7 @@ void LLAgent::setAutoPilotTargetGlobal(const LLVector3d &target_global)
//-----------------------------------------------------------------------------
// startFollowPilot()
//-----------------------------------------------------------------------------
-void LLAgent::startFollowPilot(const LLUUID &leader_id, BOOL allow_flying, F32 stop_distance)
+void LLAgent::startFollowPilot(const LLUUID &leader_id, bool allow_flying, F32 stop_distance)
{
mLeaderID = leader_id;
if ( mLeaderID.isNull() ) return;
@@ -1823,11 +1823,11 @@ void LLAgent::startFollowPilot(const LLUUID &leader_id, BOOL allow_flying, F32 s
//-----------------------------------------------------------------------------
// stopAutoPilot()
//-----------------------------------------------------------------------------
-void LLAgent::stopAutoPilot(BOOL user_cancel)
+void LLAgent::stopAutoPilot(bool user_cancel)
{
if (mAutoPilot)
{
- mAutoPilot = FALSE;
+ mAutoPilot = false;
if (mAutoPilotUseRotation && !user_cancel)
{
resetAxes(mAutoPilotTargetFacing);
@@ -1885,7 +1885,7 @@ void LLAgent::autoPilot(F32 *delta_yaw)
if (gAgentAvatarp->mInAir && mAutoPilotAllowFlying)
{
- setFlying(TRUE);
+ setFlying(true);
}
LLVector3 at;
@@ -2080,7 +2080,7 @@ void LLAgent::propagate(const F32 dt)
// handle auto-land behavior
if (isAgentAvatarValid())
{
- BOOL in_air = gAgentAvatarp->mInAir;
+ bool in_air = gAgentAvatarp->mInAir;
LLVector3 land_vel = getVelocity();
land_vel.mV[VZ] = 0.f;
@@ -2090,7 +2090,7 @@ void LLAgent::propagate(const F32 dt)
&& gSavedSettings.getBOOL("AutomaticFly"))
{
// land automatically
- setFlying(FALSE);
+ setFlying(false);
}
}
@@ -2154,23 +2154,23 @@ std::ostream& operator<<(std::ostream &s, const LLAgent &agent)
return s;
}
-// TRUE if your own avatar needs to be rendered. Usually only
+// true if your own avatar needs to be rendered. Usually only
// in third person and build.
//-----------------------------------------------------------------------------
// needsRenderAvatar()
//-----------------------------------------------------------------------------
-BOOL LLAgent::needsRenderAvatar()
+bool LLAgent::needsRenderAvatar()
{
if (gAgentCamera.cameraMouselook() && !LLVOAvatar::sVisibleInFirstPerson)
{
- return FALSE;
+ return false;
}
return mShowAvatar && mOutfitChosen;
}
-// TRUE if we need to render your own avatar's head.
-BOOL LLAgent::needsRenderHead()
+// true if we need to render your own avatar's head.
+bool LLAgent::needsRenderHead()
{
return (LLVOAvatar::sVisibleInFirstPerson && LLPipeline::sReflectionRender) || (mShowAvatar && !gAgentCamera.cameraMouselook());
}
@@ -2203,7 +2203,7 @@ void LLAgent::startTyping()
sendAnimationRequest(ANIM_AGENT_TYPE, ANIM_REQUEST_START);
}
(LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"))->
- sendChatFromViewer("", CHAT_TYPE_START, FALSE);
+ sendChatFromViewer("", CHAT_TYPE_START, false);
}
//-----------------------------------------------------------------------------
@@ -2216,7 +2216,7 @@ void LLAgent::stopTyping()
clearRenderState(AGENT_STATE_TYPING);
sendAnimationRequest(ANIM_AGENT_TYPE, ANIM_REQUEST_STOP);
(LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"))->
- sendChatFromViewer("", CHAT_TYPE_STOP, FALSE);
+ sendChatFromViewer("", CHAT_TYPE_STOP, false);
}
}
@@ -2291,19 +2291,19 @@ void LLAgent::endAnimationUpdateUI()
// show mouse cursor
gViewerWindow->showCursor();
// show menus
- gMenuBarView->setVisible(TRUE);
- LLNavigationBar::getInstance()->setVisible(TRUE && gSavedSettings.getBOOL("ShowNavbarNavigationPanel"));
+ gMenuBarView->setVisible(true);
+ LLNavigationBar::getInstance()->setVisible(true && gSavedSettings.getBOOL("ShowNavbarNavigationPanel"));
gStatusBar->setVisibleForMouselook(true);
static LLCachedControl<bool> show_mini_location_panel(gSavedSettings, "ShowMiniLocationPanel");
if (show_mini_location_panel)
{
- LLPanelTopInfoBar::getInstance()->setVisible(TRUE);
+ LLPanelTopInfoBar::getInstance()->setVisible(true);
}
- LLChicletBar::getInstance()->setVisible(TRUE);
+ LLChicletBar::getInstance()->setVisible(true);
- LLPanelStandStopFlying::getInstance()->setVisible(TRUE);
+ LLPanelStandStopFlying::getInstance()->setVisible(true);
LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset);
@@ -2315,7 +2315,7 @@ void LLAgent::endAnimationUpdateUI()
}
// Only pop if we have pushed...
- if (TRUE == mViewsPushed)
+ if (true == mViewsPushed)
{
#if 0 // Use this once all floaters are registered
LLFloaterReg::restoreVisibleInstances();
@@ -2340,14 +2340,14 @@ void LLAgent::endAnimationUpdateUI()
gFloaterView->popVisibleAll(skip_list);
#endif
- mViewsPushed = FALSE;
+ mViewsPushed = false;
}
gAgentCamera.setLookAt(LOOKAT_TARGET_CLEAR);
if( gMorphView )
{
- gMorphView->setVisible( FALSE );
+ gMorphView->setVisible( false );
}
// Disable mouselook-specific animations
@@ -2386,7 +2386,7 @@ void LLAgent::endAnimationUpdateUI()
if( gMorphView )
{
- gMorphView->setVisible( FALSE );
+ gMorphView->setVisible( false );
}
if (isAgentAvatarValid())
@@ -2396,7 +2396,7 @@ void LLAgent::endAnimationUpdateUI()
sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_STOP);
sendAnimationRequest(ANIM_AGENT_CUSTOMIZE_DONE, ANIM_REQUEST_START);
- mCustomAnim = FALSE ;
+ mCustomAnim = false ;
}
}
@@ -2412,19 +2412,19 @@ void LLAgent::endAnimationUpdateUI()
{
// clean up UI
// first show anything hidden by UI toggle
- gViewerWindow->setUIVisibility(TRUE);
+ gViewerWindow->setUIVisibility(true);
// then hide stuff we want hidden for mouselook
gToolBarView->setToolBarsVisible(false);
- gMenuBarView->setVisible(FALSE);
- LLNavigationBar::getInstance()->setVisible(FALSE);
+ gMenuBarView->setVisible(false);
+ LLNavigationBar::getInstance()->setVisible(false);
gStatusBar->setVisibleForMouselook(false);
- LLPanelTopInfoBar::getInstance()->setVisible(FALSE);
+ LLPanelTopInfoBar::getInstance()->setVisible(false);
- LLChicletBar::getInstance()->setVisible(FALSE);
+ LLChicletBar::getInstance()->setVisible(false);
- LLPanelStandStopFlying::getInstance()->setVisible(FALSE);
+ LLPanelStandStopFlying::getInstance()->setVisible(false);
// clear out camera lag effect
gAgentCamera.clearCameraLag();
@@ -2434,7 +2434,7 @@ void LLAgent::endAnimationUpdateUI()
LLToolMgr::getInstance()->setCurrentToolset(gMouselookToolset);
- mViewsPushed = TRUE;
+ mViewsPushed = true;
if (mMouselookModeInSignal)
{
@@ -2451,15 +2451,15 @@ void LLAgent::endAnimationUpdateUI()
LLFloaterView::skip_list_t skip_list;
skip_list.insert(LLFloaterReg::findInstance("mini_map"));
skip_list.insert(LLFloaterReg::findInstance("beacons"));
- gFloaterView->pushVisibleAll(FALSE, skip_list);
+ gFloaterView->pushVisibleAll(false, skip_list);
#endif
if( gMorphView )
{
- gMorphView->setVisible(FALSE);
+ gMorphView->setVisible(false);
}
- gConsole->setVisible( TRUE );
+ gConsole->setVisible( true );
if (isAgentAvatarValid())
{
@@ -2508,7 +2508,7 @@ void LLAgent::endAnimationUpdateUI()
if( gMorphView )
{
- gMorphView->setVisible( TRUE );
+ gMorphView->setVisible( true );
}
// freeze avatar
@@ -3061,7 +3061,7 @@ bool LLAgent::requestGetCapability(const std::string &capName, httpCallback_t cb
return false;
}
-BOOL LLAgent::getAdminOverride() const
+bool LLAgent::getAdminOverride() const
{
return mAgentAccess->getAdminOverride();
}
@@ -3071,7 +3071,7 @@ void LLAgent::setMaturity(char text)
mAgentAccess->setMaturity(text);
}
-void LLAgent::setAdminOverride(BOOL b)
+void LLAgent::setAdminOverride(bool b)
{
mAgentAccess->setAdminOverride(b);
}
@@ -3123,7 +3123,7 @@ void LLAgent::buildFullnameAndTitle(std::string& name) const
}
}
-BOOL LLAgent::isInGroup(const LLUUID& group_id, BOOL ignore_god_mode /* FALSE */) const
+bool LLAgent::isInGroup(const LLUUID& group_id, bool ignore_god_mode /* false */) const
{
if (!ignore_god_mode && isGodlike())
return true;
@@ -3133,33 +3133,33 @@ BOOL LLAgent::isInGroup(const LLUUID& group_id, BOOL ignore_god_mode /* FALSE */
{
if(mGroups[i].mID == group_id)
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
// This implementation should mirror LLAgentInfo::hasPowerInGroup
-BOOL LLAgent::hasPowerInGroup(const LLUUID& group_id, U64 power) const
+bool LLAgent::hasPowerInGroup(const LLUUID& group_id, U64 power) const
{
if (isGodlikeWithoutAdminMenuFakery())
return true;
// GP_NO_POWERS can also mean no power is enough to grant an ability.
- if (GP_NO_POWERS == power) return FALSE;
+ if (GP_NO_POWERS == power) return false;
U32 count = mGroups.size();
for(U32 i = 0; i < count; ++i)
{
if(mGroups[i].mID == group_id)
{
- return (BOOL)((mGroups[i].mPowers & power) > 0);
+ return (bool)((mGroups[i].mPowers & power) > 0);
}
}
- return FALSE;
+ return false;
}
-BOOL LLAgent::hasPowerInActiveGroup(U64 power) const
+bool LLAgent::hasPowerInActiveGroup(U64 power) const
{
return (mGroupID.notNull() && (hasPowerInGroup(mGroupID, power)));
}
@@ -3181,7 +3181,7 @@ U64 LLAgent::getPowerInGroup(const LLUUID& group_id) const
return GP_NO_POWERS;
}
-BOOL LLAgent::getGroupData(const LLUUID& group_id, LLGroupData& data) const
+bool LLAgent::getGroupData(const LLUUID& group_id, LLGroupData& data) const
{
S32 count = mGroups.size();
for(S32 i = 0; i < count; ++i)
@@ -3189,10 +3189,10 @@ BOOL LLAgent::getGroupData(const LLUUID& group_id, LLGroupData& data) const
if(mGroups[i].mID == group_id)
{
data = mGroups[i];
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
S32 LLAgent::getGroupContribution(const LLUUID& group_id) const
@@ -3209,7 +3209,7 @@ S32 LLAgent::getGroupContribution(const LLUUID& group_id) const
return 0;
}
-BOOL LLAgent::setGroupContribution(const LLUUID& group_id, S32 contribution)
+bool LLAgent::setGroupContribution(const LLUUID& group_id, S32 contribution)
{
S32 count = mGroups.size();
for(S32 i = 0; i < count; ++i)
@@ -3226,13 +3226,13 @@ BOOL LLAgent::setGroupContribution(const LLUUID& group_id, S32 contribution)
msg->addUUID("GroupID", group_id);
msg->addS32("Contribution", contribution);
sendReliableMessage();
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
-BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOOL list_in_profile)
+bool LLAgent::setUserGroupFlags(const LLUUID& group_id, bool accept_notices, bool list_in_profile)
{
S32 count = mGroups.size();
for(S32 i = 0; i < count; ++i)
@@ -3252,13 +3252,13 @@ BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOO
msg->nextBlock("NewData");
msg->addBOOL("ListInProfile", list_in_profile);
sendReliableMessage();
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
-BOOL LLAgent::canJoinGroups() const
+bool LLAgent::canJoinGroups() const
{
return (S32)mGroups.size() < LLAgentBenefitsMgr::current().getGroupMembershipLimit();
}
@@ -3312,7 +3312,7 @@ void LLAgent::sendAnimationRequests(const std::vector<LLUUID> &anim_ids, EAnimRe
}
msg->nextBlockFast(_PREHASH_AnimationList);
msg->addUUIDFast(_PREHASH_AnimID, (anim_ids[i]) );
- msg->addBOOLFast(_PREHASH_StartAnim, (request == ANIM_REQUEST_START) ? TRUE : FALSE);
+ msg->addBOOLFast(_PREHASH_StartAnim, (request == ANIM_REQUEST_START) ? true : false);
num_valid_anims++;
}
@@ -3339,7 +3339,7 @@ void LLAgent::sendAnimationRequest(const LLUUID &anim_id, EAnimRequest request)
msg->nextBlockFast(_PREHASH_AnimationList);
msg->addUUIDFast(_PREHASH_AnimID, (anim_id) );
- msg->addBOOLFast(_PREHASH_StartAnim, (request == ANIM_REQUEST_START) ? TRUE : FALSE);
+ msg->addBOOLFast(_PREHASH_StartAnim, (request == ANIM_REQUEST_START) ? true : false);
msg->nextBlockFast(_PREHASH_PhysicalAvatarEventList);
msg->addBinaryDataFast(_PREHASH_TypeData, NULL, 0);
@@ -3363,7 +3363,7 @@ void LLAgent::sendAnimationStateReset()
msg->nextBlockFast(_PREHASH_AnimationList);
msg->addUUIDFast(_PREHASH_AnimID, LLUUID::null );
- msg->addBOOLFast(_PREHASH_StartAnim, FALSE);
+ msg->addBOOLFast(_PREHASH_StartAnim, false);
msg->nextBlockFast(_PREHASH_PhysicalAvatarEventList);
msg->addBinaryDataFast(_PREHASH_TypeData, NULL, 0);
@@ -3404,7 +3404,7 @@ void LLAgent::sendWalkRun(bool running)
msgsys->nextBlockFast(_PREHASH_AgentData);
msgsys->addUUIDFast(_PREHASH_AgentID, getID());
msgsys->addUUIDFast(_PREHASH_SessionID, getSessionID());
- msgsys->addBOOLFast(_PREHASH_AlwaysRun, BOOL(running) );
+ msgsys->addBOOLFast(_PREHASH_AlwaysRun, bool(running) );
sendReliableMessage();
}
}
@@ -3416,23 +3416,23 @@ void LLAgent::friendsChanged()
mProxyForAgents = collector.mProxy;
}
-BOOL LLAgent::isGrantedProxy(const LLPermissions& perm)
+bool LLAgent::isGrantedProxy(const LLPermissions& perm)
{
return (mProxyForAgents.count(perm.getOwner()) > 0);
}
-BOOL LLAgent::allowOperation(PermissionBit op,
+bool LLAgent::allowOperation(PermissionBit op,
const LLPermissions& perm,
U64 group_proxy_power,
U8 god_minimum)
{
// Check god level.
- if (getGodLevel() >= god_minimum) return TRUE;
+ if (getGodLevel() >= god_minimum) return true;
- if (!perm.isOwned()) return FALSE;
+ if (!perm.isOwned()) return false;
// A group member with group_proxy_power can act as owner.
- BOOL is_group_owned;
+ bool is_group_owned;
LLUUID owner_id;
perm.getOwnership(owner_id, is_group_owned);
LLUUID group_id(perm.getGroup());
@@ -3488,37 +3488,37 @@ void LLAgent::initOriginGlobal(const LLVector3d &origin_global)
mAgentOriginGlobal = origin_global;
}
-BOOL LLAgent::leftButtonGrabbed() const
+bool LLAgent::leftButtonGrabbed() const
{
- const BOOL camera_mouse_look = gAgentCamera.cameraMouselook();
+ const bool camera_mouse_look = gAgentCamera.cameraMouselook();
return (!camera_mouse_look && mControlsTakenCount[CONTROL_LBUTTON_DOWN_INDEX] > 0)
|| (camera_mouse_look && mControlsTakenCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0)
|| (!camera_mouse_look && mControlsTakenPassedOnCount[CONTROL_LBUTTON_DOWN_INDEX] > 0)
|| (camera_mouse_look && mControlsTakenPassedOnCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0);
}
-BOOL LLAgent::rotateGrabbed() const
+bool LLAgent::rotateGrabbed() const
{
return (mControlsTakenCount[CONTROL_YAW_POS_INDEX] > 0)
|| (mControlsTakenCount[CONTROL_YAW_NEG_INDEX] > 0);
}
-BOOL LLAgent::forwardGrabbed() const
+bool LLAgent::forwardGrabbed() const
{
return (mControlsTakenCount[CONTROL_AT_POS_INDEX] > 0);
}
-BOOL LLAgent::backwardGrabbed() const
+bool LLAgent::backwardGrabbed() const
{
return (mControlsTakenCount[CONTROL_AT_NEG_INDEX] > 0);
}
-BOOL LLAgent::upGrabbed() const
+bool LLAgent::upGrabbed() const
{
return (mControlsTakenCount[CONTROL_UP_POS_INDEX] > 0);
}
-BOOL LLAgent::downGrabbed() const
+bool LLAgent::downGrabbed() const
{
return (mControlsTakenCount[CONTROL_UP_NEG_INDEX] > 0);
}
@@ -3814,9 +3814,9 @@ void LLAgent::processScriptControlChange(LLMessageSystem *msg, void **)
S32 block_count = msg->getNumberOfBlocks("Data");
for (S32 block_index = 0; block_index < block_count; block_index++)
{
- BOOL take_controls;
+ bool take_controls;
U32 controls;
- BOOL passon;
+ bool passon;
U32 i;
msg->getBOOL("Data", "TakeControls", take_controls, block_index);
if (take_controls)
@@ -3938,19 +3938,19 @@ void LLAgent::processControlRelease(LLMessageSystem *msg, void **)
}
*/
-BOOL LLAgent::anyControlGrabbed() const
+bool LLAgent::anyControlGrabbed() const
{
for (U32 i = 0; i < TOTAL_CONTROLS; i++)
{
if (gAgent.mControlsTakenCount[i] > 0)
- return TRUE;
+ return true;
if (gAgent.mControlsTakenPassedOnCount[i] > 0)
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-BOOL LLAgent::isControlGrabbed(S32 control_index) const
+bool LLAgent::isControlGrabbed(S32 control_index) const
{
return mControlsTakenCount[control_index] > 0;
}
@@ -3966,22 +3966,22 @@ void LLAgent::forceReleaseControls()
void LLAgent::setHomePosRegion( const U64& region_handle, const LLVector3& pos_region)
{
- mHaveHomePosition = TRUE;
+ mHaveHomePosition = true;
mHomeRegionHandle = region_handle;
mHomePosRegion = pos_region;
}
-BOOL LLAgent::getHomePosGlobal( LLVector3d* pos_global )
+bool LLAgent::getHomePosGlobal( LLVector3d* pos_global )
{
if(!mHaveHomePosition)
{
- return FALSE;
+ return false;
}
F32 x = 0;
F32 y = 0;
from_region_handle( mHomeRegionHandle, &x, &y);
pos_global->setVec( x + mHomePosRegion.mV[VX], y + mHomePosRegion.mV[VY], mHomePosRegion.mV[VZ] );
- return TRUE;
+ return true;
}
bool LLAgent::isInHomeRegion()
@@ -4064,7 +4064,7 @@ bool LLAgent::teleportCore(bool is_local)
// Close all pie menus, deselect land, etc.
// Don't change the camera until we know teleport succeeded. JC
- gAgentCamera.resetView(FALSE);
+ gAgentCamera.resetView(false);
// local logic
add(LLStatViewer::TELEPORT, 1);
@@ -4075,7 +4075,7 @@ bool LLAgent::teleportCore(bool is_local)
}
else
{
- gTeleportDisplay = TRUE;
+ gTeleportDisplay = true;
LL_INFOS("Teleport") << "Non-local, setting teleport state to TELEPORT_START" << LL_ENDL;
gAgent.setTeleportState( LLAgent::TELEPORT_START );
}
@@ -4108,7 +4108,7 @@ void LLAgent::clearTeleportRequest()
{
if(LLVoiceClient::instanceExists())
{
- LLVoiceClient::getInstance()->setHidden(FALSE);
+ LLVoiceClient::getInstance()->setHidden(false);
}
mTeleportRequest.reset();
mTPNeedsNeabyChatSeparator = false;
@@ -4138,7 +4138,7 @@ void LLAgent::startTeleportRequest()
LL_INFOS("Telport") << "Agent handling start teleport request." << LL_ENDL;
if(LLVoiceClient::instanceExists())
{
- LLVoiceClient::getInstance()->setHidden(TRUE);
+ LLVoiceClient::getInstance()->setHidden(true);
}
if (hasPendingTeleportRequest())
{
@@ -4146,7 +4146,7 @@ void LLAgent::startTeleportRequest()
mTeleportCanceled.reset();
if (!isMaturityPreferenceSyncedWithServer())
{
- gTeleportDisplay = TRUE;
+ gTeleportDisplay = true;
LL_INFOS("Teleport") << "Maturity preference not synced yet, setting teleport state to TELEPORT_PENDING" << LL_ENDL;
setTeleportState(TELEPORT_PENDING);
}
@@ -4221,13 +4221,13 @@ void LLAgent::handleTeleportFailed()
LL_WARNS("Teleport") << "Agent handling teleport failure!" << LL_ENDL;
if(LLVoiceClient::instanceExists())
{
- LLVoiceClient::getInstance()->setHidden(FALSE);
+ LLVoiceClient::getInstance()->setHidden(false);
}
setTeleportState(LLAgent::TELEPORT_NONE);
// Unlock the UI if the progress bar has been shown.
-// gViewerWindow->setShowProgress(FALSE);
-// gTeleportDisplay = FALSE;
+// gViewerWindow->setShowProgress(false);
+// gTeleportDisplay = false;
if (mTeleportRequest)
{
@@ -4273,14 +4273,14 @@ void LLAgent::addTPNearbyChatSeparator()
LLChat chat;
chat.mFromName = location_name;
- chat.mMuted = FALSE;
+ chat.mMuted = false;
chat.mFromID = LLUUID::null;
chat.mSourceType = CHAT_SOURCE_TELEPORT;
chat.mChatStyle = CHAT_STYLE_TELEPORT_SEP;
chat.mText = "";
LLSD args;
- args["do_not_log"] = TRUE;
+ args["do_not_log"] = true;
nearby_chat->addMessage(chat, true, args);
}
}
@@ -4364,13 +4364,13 @@ void LLAgent::doTeleportViaLandmark(const LLUUID& landmark_asset_id)
}
}
-void LLAgent::teleportViaLure(const LLUUID& lure_id, BOOL godlike)
+void LLAgent::teleportViaLure(const LLUUID& lure_id, bool godlike)
{
mTeleportRequest = LLTeleportRequestPtr(new LLTeleportRequestViaLure(lure_id, godlike));
startTeleportRequest();
}
-void LLAgent::doTeleportViaLure(const LLUUID& lure_id, BOOL godlike)
+void LLAgent::doTeleportViaLure(const LLUUID& lure_id, bool godlike)
{
LLViewerRegion* regionp = getRegion();
if(regionp && teleportCore())
@@ -4437,7 +4437,7 @@ void LLAgent::restoreCanceledTeleportRequest()
gAgent.setTeleportState( LLAgent::TELEPORT_REQUESTED );
mTeleportRequest = mTeleportCanceled;
mTeleportCanceled.reset();
- gTeleportDisplay = TRUE;
+ gTeleportDisplay = true;
gTeleportDisplayTimer.reset();
}
}
@@ -4515,7 +4515,7 @@ void LLAgent::doTeleportViaLocationLookAt(const LLVector3d& pos_global)
if(!gAgentCamera.isfollowCamLocked())
{
- gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); // detach camera form avatar, so it keeps direction
+ gAgentCamera.setFocusOnAvatar(false, ANIMATE); // detach camera form avatar, so it keeps direction
}
U64 region_handle = to_region_handle(pos_global);
@@ -4601,7 +4601,7 @@ void LLAgent::stopCurrentAnimations()
else
{
// stop this animation locally
- gAgentAvatarp->stopMotion(anim_it->first, TRUE);
+ gAgentAvatarp->stopMotion(anim_it->first, true);
// ...and tell the server to tell everyone.
anim_ids.push_back(anim_it->first);
}
@@ -4698,7 +4698,7 @@ void LLAgent::requestEnterGodMode()
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_RequestBlock);
- msg->addBOOLFast(_PREHASH_Godlike, TRUE);
+ msg->addBOOLFast(_PREHASH_Godlike, true);
msg->addUUIDFast(_PREHASH_Token, LLUUID::null);
// simulators need to know about your request
@@ -4713,7 +4713,7 @@ void LLAgent::requestLeaveGodMode()
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_RequestBlock);
- msg->addBOOLFast(_PREHASH_Godlike, FALSE);
+ msg->addBOOLFast(_PREHASH_Godlike, false);
msg->addUUIDFast(_PREHASH_Token, LLUUID::null);
// simulator needs to know about your request
@@ -4906,7 +4906,7 @@ const std::string& LLAgent::getTeleportStateName() const
void LLAgent::parseTeleportMessages(const std::string& xml_filename)
{
LLXMLNodePtr root;
- BOOL success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root);
+ bool success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root);
if (!success || !root || !root->hasName( "teleport_messages" ))
{
@@ -5094,7 +5094,7 @@ void LLTeleportRequestViaLandmark::restartTeleport()
// LLTeleportRequestViaLure
//-----------------------------------------------------------------------------
-LLTeleportRequestViaLure::LLTeleportRequestViaLure(const LLUUID &pLureId, BOOL pIsLureGodLike)
+LLTeleportRequestViaLure::LLTeleportRequestViaLure(const LLUUID &pLureId, bool pIsLureGodLike)
: LLTeleportRequestViaLandmark(pLureId),
mIsLureGodLike(pIsLureGodLike)
{
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 43b4457bf5..f076409eb2 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -43,7 +43,7 @@
#include <boost/shared_ptr.hpp>
#include <boost/signals2.hpp>
-extern const BOOL ANIMATE;
+extern const bool ANIMATE;
extern const U8 AGENT_STATE_TYPING; // Typing indication
extern const U8 AGENT_STATE_EDITING; // Set when agent has objects selected
@@ -78,8 +78,8 @@ struct LLGroupData
LLUUID mID;
LLUUID mInsigniaID;
U64 mPowers;
- BOOL mAcceptNotices;
- BOOL mListInProfile;
+ bool mAcceptNotices;
+ bool mListInProfile;
S32 mContribution;
std::string mName;
};
@@ -118,7 +118,7 @@ private:
public:
void onAppFocusGained();
void setFirstLogin(bool b);
- // Return TRUE if the database reported this login as the first for this particular user.
+ // Return true if the database reported this login as the first for this particular user.
bool isFirstLogin() const { return mFirstLogin; }
bool isInitialized() const { return mInitialized; }
@@ -169,10 +169,10 @@ public:
// On the very first login, outfit needs to be chosen by some
// mechanism, usually by loading the requested initial outfit. We
// don't render the avatar until the choice is made.
- BOOL isOutfitChosen() const { return mOutfitChosen; }
- void setOutfitChosen(BOOL b) { mOutfitChosen = b; }
+ bool isOutfitChosen() const { return mOutfitChosen; }
+ void setOutfitChosen(bool b) { mOutfitChosen = b; }
private:
- BOOL mOutfitChosen;
+ bool mOutfitChosen;
/** Identity
** **
@@ -238,13 +238,13 @@ private:
public:
void setStartPosition(U32 location_id); // Marks current location as start, sends information to servers
void setHomePosRegion(const U64& region_handle, const LLVector3& pos_region);
- BOOL getHomePosGlobal(LLVector3d* pos_global);
+ bool getHomePosGlobal(LLVector3d* pos_global);
bool isInHomeRegion();
private:
void setStartPositionSuccess(const LLSD &result);
- BOOL mHaveHomePosition;
+ bool mHaveHomePosition;
U64 mHomeRegionHandle;
LLVector3 mHomePosRegion;
@@ -271,7 +271,7 @@ public:
void setRegion(LLViewerRegion *regionp);
LLViewerRegion *getRegion() const;
LLHost getRegionHost() const;
- BOOL inPrelude();
+ bool inPrelude();
// Capability
std::string getRegionCapability(const std::string &name); // short hand for if (getRegion()) { getRegion()->getCapability(name) }
@@ -352,11 +352,11 @@ private:
// Fly
//--------------------------------------------------------------------
public:
- BOOL getFlying() const;
- void setFlying(BOOL fly, BOOL fail_sound = FALSE);
+ bool getFlying() const;
+ void setFlying(bool fly, bool fail_sound = false);
static void toggleFlying();
static bool enableFlying();
- BOOL canFly(); // Does this parcel allow you to fly?
+ bool canFly(); // Does this parcel allow you to fly?
static bool isSitting();
//--------------------------------------------------------------------
@@ -409,7 +409,7 @@ private:
public:
void setAFK();
void clearAFK();
- BOOL getAFK() const;
+ bool getAFK() const;
static const F32 MIN_AFK_TIME;
//--------------------------------------------------------------------
@@ -461,12 +461,12 @@ private:
// Grab
//--------------------------------------------------------------------
public:
- BOOL leftButtonGrabbed() const;
- BOOL rotateGrabbed() const;
- BOOL forwardGrabbed() const;
- BOOL backwardGrabbed() const;
- BOOL upGrabbed() const;
- BOOL downGrabbed() const;
+ bool leftButtonGrabbed() const;
+ bool rotateGrabbed() const;
+ bool forwardGrabbed() const;
+ bool backwardGrabbed() const;
+ bool upGrabbed() const;
+ bool downGrabbed() const;
//--------------------------------------------------------------------
// Controls
@@ -475,22 +475,22 @@ public:
U32 getControlFlags();
void setControlFlags(U32 mask); // Performs bitwise mControlFlags |= mask
void clearControlFlags(U32 mask); // Performs bitwise mControlFlags &= ~mask
- BOOL controlFlagsDirty() const;
+ bool controlFlagsDirty() const;
void enableControlFlagReset();
void resetControlFlags();
- BOOL anyControlGrabbed() const; // True iff a script has taken over a control
- BOOL isControlGrabbed(S32 control_index) const;
+ bool anyControlGrabbed() const; // True iff a script has taken over a control
+ bool isControlGrabbed(S32 control_index) const;
// Send message to simulator to force grabbed controls to be
// released, in case of a poorly written script.
void forceReleaseControls();
- void setFlagsDirty() { mbFlagsDirty = TRUE; }
+ void setFlagsDirty() { mbFlagsDirty = true; }
private:
S32 mControlsTakenCount[TOTAL_CONTROLS];
S32 mControlsTakenPassedOnCount[TOTAL_CONTROLS];
U32 mControlFlags; // Replacement for the mFooKey's
- BOOL mbFlagsDirty;
- BOOL mbFlagsNeedReset; // ! HACK ! For preventing incorrect flags sent when crossing region boundaries
+ bool mbFlagsDirty;
+ bool mbFlagsNeedReset; // ! HACK ! For preventing incorrect flags sent when crossing region boundaries
//--------------------------------------------------------------------
// Animations
@@ -506,8 +506,8 @@ public:
void endAnimationUpdateUI();
void unpauseAnimation() { mPauseRequest = NULL; }
- BOOL getCustomAnim() const { return mCustomAnim; }
- void setCustomAnim(BOOL anim) { mCustomAnim = anim; }
+ bool getCustomAnim() const { return mCustomAnim; }
+ void setCustomAnim(bool anim) { mCustomAnim = anim; }
typedef boost::signals2::signal<void ()> camera_signal_t;
boost::signals2::connection setMouselookModeInCallback( const camera_signal_t::slot_type& cb );
@@ -516,9 +516,9 @@ public:
private:
camera_signal_t* mMouselookModeInSignal;
camera_signal_t* mMouselookModeOutSignal;
- BOOL mCustomAnim; // Current animation is ANIM_AGENT_CUSTOMIZE ?
+ bool mCustomAnim; // Current animation is ANIM_AGENT_CUSTOMIZE ?
LLPointer<LLPauseRequestHandle> mPauseRequest;
- BOOL mViewsPushed; // Keep track of whether or not we have pushed views
+ bool mViewsPushed; // Keep track of whether or not we have pushed views
/** Animation
** **
@@ -544,8 +544,8 @@ public:
void moveYaw(F32 mag, bool reset_view = true);
void movePitch(F32 mag);
- BOOL isMovementLocked() const { return mMovementKeysLocked; }
- void setMovementLocked(BOOL set_locked) { mMovementKeysLocked = set_locked; }
+ bool isMovementLocked() const { return mMovementKeysLocked; }
+ void setMovementLocked(bool set_locked) { mMovementKeysLocked = set_locked; }
//--------------------------------------------------------------------
// Move the avatar's frame
@@ -564,12 +564,12 @@ public:
// Autopilot
//--------------------------------------------------------------------
public:
- BOOL getAutoPilot() const { return mAutoPilot; }
+ bool getAutoPilot() const { return mAutoPilot; }
LLVector3d getAutoPilotTargetGlobal() const { return mAutoPilotTargetGlobal; }
LLUUID getAutoPilotLeaderID() const { return mLeaderID; }
F32 getAutoPilotStopDistance() const { return mAutoPilotStopDistance; }
F32 getAutoPilotTargetDist() const { return mAutoPilotTargetDist; }
- BOOL getAutoPilotUseRotation() const { return mAutoPilotUseRotation; }
+ bool getAutoPilotUseRotation() const { return mAutoPilotUseRotation; }
LLVector3 getAutoPilotTargetFacing() const { return mAutoPilotTargetFacing; }
F32 getAutoPilotRotationThreshold() const { return mAutoPilotRotationThreshold; }
std::string getAutoPilotBehaviorName() const { return mAutoPilotBehaviorName; }
@@ -577,30 +577,30 @@ public:
void startAutoPilotGlobal(const LLVector3d &pos_global,
const std::string& behavior_name = std::string(),
const LLQuaternion *target_rotation = NULL,
- void (*finish_callback)(BOOL, void *) = NULL, void *callback_data = NULL,
+ void (*finish_callback)(bool, void *) = NULL, void *callback_data = NULL,
F32 stop_distance = 0.f, F32 rotation_threshold = 0.03f,
- BOOL allow_flying = TRUE);
- void startFollowPilot(const LLUUID &leader_id, BOOL allow_flying = TRUE, F32 stop_distance = 0.5f);
- void stopAutoPilot(BOOL user_cancel = FALSE);
+ bool allow_flying = true);
+ void startFollowPilot(const LLUUID &leader_id, bool allow_flying = true, F32 stop_distance = 0.5f);
+ void stopAutoPilot(bool user_cancel = false);
void setAutoPilotTargetGlobal(const LLVector3d &target_global);
void autoPilot(F32 *delta_yaw); // Autopilot walking action, angles in radians
void renderAutoPilotTarget();
private:
- BOOL mAutoPilot;
- BOOL mAutoPilotFlyOnStop;
- BOOL mAutoPilotAllowFlying;
+ bool mAutoPilot;
+ bool mAutoPilotFlyOnStop;
+ bool mAutoPilotAllowFlying;
LLVector3d mAutoPilotTargetGlobal;
F32 mAutoPilotStopDistance;
- BOOL mAutoPilotUseRotation;
+ bool mAutoPilotUseRotation;
LLVector3 mAutoPilotTargetFacing;
F32 mAutoPilotTargetDist;
S32 mAutoPilotNoProgressFrameCount;
F32 mAutoPilotRotationThreshold;
std::string mAutoPilotBehaviorName;
- void (*mAutoPilotFinishedCallback)(BOOL, void *);
+ void (*mAutoPilotFinishedCallback)(bool, void *);
void* mAutoPilotCallbackData;
LLUUID mLeaderID;
- BOOL mMovementKeysLocked;
+ bool mMovementKeysLocked;
/** Movement
** **
@@ -644,7 +644,7 @@ private:
public:
void teleportViaLandmark(const LLUUID& landmark_id); // Teleport to a landmark
void teleportHome() { teleportViaLandmark(LLUUID::null); } // Go home
- void teleportViaLure(const LLUUID& lure_id, BOOL godlike); // To an invited location
+ void teleportViaLure(const LLUUID& lure_id, bool godlike); // To an invited location
void teleportViaLocation(const LLVector3d& pos_global); // To a global location - this will probably need to be deprecated
void teleportViaLocationLookAt(const LLVector3d& pos_global);// To a global location, preserving camera rotation
void teleportCancel(); // May or may not be allowed by server
@@ -690,7 +690,7 @@ private:
const LLVector3& pos_local, // Go to a named location home
bool look_at_from_camera = false);
void doTeleportViaLandmark(const LLUUID& landmark_id); // Teleport to a landmark
- void doTeleportViaLure(const LLUUID& lure_id, BOOL godlike); // To an invited location
+ void doTeleportViaLure(const LLUUID& lure_id, bool godlike); // To an invited location
void doTeleportViaLocation(const LLVector3d& pos_global); // To a global location - this will probably need to be deprecated
void doTeleportViaLocationLookAt(const LLVector3d& pos_global);// To a global location, preserving camera rotation
@@ -738,14 +738,14 @@ private:
public:
// Checks if agent can modify an object based on the permissions and the agent's proxy status.
- BOOL isGrantedProxy(const LLPermissions& perm);
- BOOL allowOperation(PermissionBit op,
+ bool isGrantedProxy(const LLPermissions& perm);
+ bool allowOperation(PermissionBit op,
const LLPermissions& perm,
U64 group_proxy_power = 0,
U8 god_minimum = GOD_MAINTENANCE);
const LLAgentAccess& getAgentAccess();
- BOOL canManageEstate() const;
- BOOL getAdminOverride() const;
+ bool canManageEstate() const;
+ bool getAdminOverride() const;
private:
LLAgentAccess * mAgentAccess;
@@ -756,7 +756,7 @@ public:
bool isGodlike() const;
bool isGodlikeWithoutAdminMenuFakery() const;
U8 getGodLevel() const;
- void setAdminOverride(BOOL b);
+ void setAdminOverride(bool b);
void setGodLevel(U8 god_level);
void requestEnterGodMode();
void requestLeaveGodMode();
@@ -827,13 +827,13 @@ private:
public:
LLQuaternion getHeadRotation();
- BOOL needsRenderAvatar(); // TRUE when camera mode is such that your own avatar should draw
- BOOL needsRenderHead();
- void setShowAvatar(BOOL show) { mShowAvatar = show; }
- BOOL getShowAvatar() const { return mShowAvatar; }
+ bool needsRenderAvatar(); // true when camera mode is such that your own avatar should draw
+ bool needsRenderHead();
+ void setShowAvatar(bool show) { mShowAvatar = show; }
+ bool getShowAvatar() const { return mShowAvatar; }
private:
- BOOL mShowAvatar; // Should we render the avatar?
+ bool mShowAvatar; // Should we render the avatar?
//--------------------------------------------------------------------
// Rendering state bitmap helpers
@@ -865,15 +865,15 @@ private:
public:
const LLUUID &getGroupID() const { return mGroupID; }
- // Get group information by group_id, or FALSE if not in group.
- BOOL getGroupData(const LLUUID& group_id, LLGroupData& data) const;
+ // Get group information by group_id, or false if not in group.
+ bool getGroupData(const LLUUID& group_id, LLGroupData& data) const;
// Get just the agent's contribution to the given group.
S32 getGroupContribution(const LLUUID& group_id) const;
// Update internal datastructures and update the server.
- BOOL setGroupContribution(const LLUUID& group_id, S32 contribution);
- BOOL setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOOL list_in_profile);
+ bool setGroupContribution(const LLUUID& group_id, S32 contribution);
+ bool setUserGroupFlags(const LLUUID& group_id, bool accept_notices, bool list_in_profile);
const std::string &getGroupName() const { return mGroupName; }
- BOOL canJoinGroups() const;
+ bool canJoinGroups() const;
private:
std::string mGroupName;
LLUUID mGroupID;
@@ -883,10 +883,10 @@ private:
//--------------------------------------------------------------------
public:
// Checks against all groups in the entire agent group list.
- BOOL isInGroup(const LLUUID& group_id, BOOL ingnore_God_mod = FALSE) const;
+ bool isInGroup(const LLUUID& group_id, bool ingnore_God_mod = false) const;
protected:
// Only used for building titles.
- BOOL isGroupMember() const { return !mGroupID.isNull(); }
+ bool isGroupMember() const { return !mGroupID.isNull(); }
public:
std::vector<LLGroupData> mGroups;
@@ -894,18 +894,18 @@ public:
// Group Title
//--------------------------------------------------------------------
public:
- void setHideGroupTitle(BOOL hide) { mHideGroupTitle = hide; }
- BOOL isGroupTitleHidden() const { return mHideGroupTitle; }
+ void setHideGroupTitle(bool hide) { mHideGroupTitle = hide; }
+ bool isGroupTitleHidden() const { return mHideGroupTitle; }
private:
std::string mGroupTitle; // Honorific, like "Sir"
- BOOL mHideGroupTitle;
+ bool mHideGroupTitle;
//--------------------------------------------------------------------
// Group Powers
//--------------------------------------------------------------------
public:
- BOOL hasPowerInGroup(const LLUUID& group_id, U64 power) const;
- BOOL hasPowerInActiveGroup(const U64 power) const;
+ bool hasPowerInGroup(const LLUUID& group_id, U64 power) const;
+ bool hasPowerInActiveGroup(const U64 power) const;
U64 getPowerInGroup(const LLUUID& group_id) const;
U64 mGroupPowers;
diff --git a/indra/newview/llagentbenefits.cpp b/indra/newview/llagentbenefits.cpp
index 2d219735a0..0717d92ea7 100644
--- a/indra/newview/llagentbenefits.cpp
+++ b/indra/newview/llagentbenefits.cpp
@@ -25,6 +25,7 @@
#include "llviewerprecompiledheaders.h"
#include "llagentbenefits.h"
+#include "llviewertexture.h"
LLAgentBenefits::LLAgentBenefits():
m_initalized(false),
@@ -95,6 +96,26 @@ bool LLAgentBenefits::init(const LLSD& benefits_sd)
return false;
}
+ if (benefits_sd.has("large_texture_upload_cost"))
+ {
+ LLSD large_texture_cost = benefits_sd.get("large_texture_upload_cost");
+ if (large_texture_cost.isArray())
+ {
+ LLSD::array_const_iterator end = large_texture_cost.endArray();
+ LLSD::array_const_iterator it = large_texture_cost.beginArray();
+ for (; it != end; ++it)
+ {
+ m_2k_texture_upload_cost.push_back(it->asInteger());
+ }
+ std::sort(m_2k_texture_upload_cost.begin(), m_2k_texture_upload_cost.end());
+ }
+ }
+
+ if (m_2k_texture_upload_cost.empty())
+ {
+ m_2k_texture_upload_cost.push_back(m_texture_upload_cost);
+ }
+
// FIXME PREMIUM - either use this field or get rid of it
m_initalized = true;
return true;
@@ -140,12 +161,55 @@ S32 LLAgentBenefits::getTextureUploadCost() const
return m_texture_upload_cost;
}
+S32 LLAgentBenefits::getTextureUploadCost(const LLViewerTexture* tex) const
+{
+ if (tex)
+ {
+ S32 area = tex->getFullHeight() * tex->getFullWidth();
+ if (area >= MIN_2K_TEXTURE_AREA)
+ {
+ return get2KTextureUploadCost(area);
+ }
+ else
+ {
+ return getTextureUploadCost();
+ }
+ }
+ return getTextureUploadCost();
+}
+
+S32 LLAgentBenefits::getTextureUploadCost(const LLImageBase* tex) const
+{
+ if (tex)
+ {
+ S32 area = tex->getHeight() * tex->getWidth();
+ if (area >= MIN_2K_TEXTURE_AREA)
+ {
+ return get2KTextureUploadCost(area);
+ }
+ else
+ {
+ return getTextureUploadCost();
+ }
+ }
+ return getTextureUploadCost();
+}
+
+S32 LLAgentBenefits::get2KTextureUploadCost(S32 area) const
+{
+ if (m_2k_texture_upload_cost.empty())
+ {
+ return m_texture_upload_cost;
+ }
+ return m_2k_texture_upload_cost[0];
+}
+
bool LLAgentBenefits::findUploadCost(LLAssetType::EType& asset_type, S32& cost) const
{
bool succ = false;
if (asset_type == LLAssetType::AT_TEXTURE)
{
- cost = getTextureUploadCost();
+ cost = getTextureUploadCost();
succ = true;
}
else if (asset_type == LLAssetType::AT_SOUND)
diff --git a/indra/newview/llagentbenefits.h b/indra/newview/llagentbenefits.h
index 48aa6bd869..962d0f9371 100644
--- a/indra/newview/llagentbenefits.h
+++ b/indra/newview/llagentbenefits.h
@@ -30,9 +30,14 @@
#include "llsd.h"
#include "llassettype.h"
+class LLViewerTexture;
+class LLImageBase;
+
class LLAgentBenefits
{
public:
+ static constexpr S32 MIN_2K_TEXTURE_AREA = 1024 * 1024 + 1;
+
LLAgentBenefits();
~LLAgentBenefits();
LOG_CLASS(LLAgentBenefits);
@@ -47,6 +52,9 @@ public:
S32 getPicksLimit() const;
S32 getSoundUploadCost() const;
S32 getTextureUploadCost() const;
+ S32 getTextureUploadCost(const LLViewerTexture* tex) const;
+ S32 getTextureUploadCost(const LLImageBase* tex) const;
+ S32 get2KTextureUploadCost(S32 area) const;
bool findUploadCost(LLAssetType::EType& asset_type, S32& cost) const;
@@ -59,6 +67,7 @@ private:
S32 m_picks_limit;
S32 m_sound_upload_cost;
S32 m_texture_upload_cost;
+ std::vector<S32> m_2k_texture_upload_cost;
bool m_initalized;
};
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 0d0d6e7e46..fd6901a783 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -123,14 +123,14 @@ LLAgentCamera::LLAgentCamera() :
mHUDTargetZoom(1.f),
mHUDCurZoom(1.f),
- mForceMouselook(FALSE),
+ mForceMouselook(false),
mCameraMode( CAMERA_MODE_THIRD_PERSON ),
mLastCameraMode( CAMERA_MODE_THIRD_PERSON ),
mCameraPreset(CAMERA_PRESET_REAR_VIEW),
- mCameraAnimating( FALSE ),
+ mCameraAnimating( false ),
mAnimationCameraStartGlobal(),
mAnimationFocusStartGlobal(),
mAnimationTimer(),
@@ -146,21 +146,21 @@ LLAgentCamera::LLAgentCamera() :
mTargetCameraDistance(2.f),
mCameraZoomFraction(1.f), // deprecated
mThirdPersonHeadOffset(0.f, 0.f, 1.f),
- mSitCameraEnabled(FALSE),
+ mSitCameraEnabled(false),
mCameraSmoothingLastPositionGlobal(),
mCameraSmoothingLastPositionAgent(),
mCameraSmoothingStop(false),
mCameraUpVector(LLVector3::z_axis), // default is straight up
- mFocusOnAvatar(TRUE),
- mAllowChangeToFollow(FALSE),
+ mFocusOnAvatar(true),
+ mAllowChangeToFollow(false),
mFocusGlobal(),
mFocusTargetGlobal(),
mFocusObject(NULL),
mFocusObjectDist(0.f),
mFocusObjectOffset(),
- mTrackFocusObject(TRUE),
+ mTrackFocusObject(true),
mAtKey(0), // Either 1, 0, or -1... indicates that movement-key is pressed
mWalkKey(0), // like AtKey, but causes less forward thrust
@@ -279,7 +279,7 @@ LLAgentCamera::~LLAgentCamera()
//-----------------------------------------------------------------------------
// resetView()
//-----------------------------------------------------------------------------
-void LLAgentCamera::resetView(BOOL reset_camera, BOOL change_camera)
+void LLAgentCamera::resetView(bool reset_camera, bool change_camera)
{
if (gDisconnected)
{
@@ -288,7 +288,7 @@ void LLAgentCamera::resetView(BOOL reset_camera, BOOL change_camera)
if (gAgent.getAutoPilot())
{
- gAgent.stopAutoPilot(TRUE);
+ gAgent.stopAutoPilot(true);
}
LLSelectMgr::getInstance()->unhighlightAll();
@@ -348,7 +348,7 @@ void LLAgentCamera::resetView(BOOL reset_camera, BOOL change_camera)
gAgent.resetAxes(lerp(gAgent.getAtAxis(), agent_at_axis, LLSmoothInterpolation::getInterpolant(0.3f)));
}
- setFocusOnAvatar(TRUE, ANIMATE);
+ setFocusOnAvatar(true, ANIMATE);
mCameraFOVZoomFactor = 0.f;
}
@@ -381,7 +381,7 @@ void LLAgentCamera::unlockView()
{
setFocusGlobal(LLVector3d::zero, gAgentAvatarp->mID);
}
- setFocusOnAvatar(FALSE, FALSE); // no animation
+ setFocusOnAvatar(false, false); // no animation
}
}
@@ -572,16 +572,16 @@ LLVector3 LLAgentCamera::calcFocusOffset(LLViewerObject *object, LLVector3 origi
//-----------------------------------------------------------------------------
// calcCameraMinDistance()
//-----------------------------------------------------------------------------
-BOOL LLAgentCamera::calcCameraMinDistance(F32 &obj_min_distance)
+bool LLAgentCamera::calcCameraMinDistance(F32 &obj_min_distance)
{
- BOOL soft_limit = FALSE; // is the bounding box to be treated literally (volumes) or as an approximation (avatars)
+ bool soft_limit = false; // is the bounding box to be treated literally (volumes) or as an approximation (avatars)
if (!mFocusObject || mFocusObject->isDead() ||
mFocusObject->isMesh() ||
isDisableCameraConstraints())
{
obj_min_distance = 0.f;
- return TRUE;
+ return true;
}
if (mFocusObject->mDrawable.isNull())
@@ -593,7 +593,7 @@ BOOL LLAgentCamera::calcCameraMinDistance(F32 &obj_min_distance)
LL_ERRS() << "Focus object with no drawable!" << LL_ENDL;
#endif
obj_min_distance = 0.f;
- return TRUE;
+ return true;
}
LLQuaternion inv_object_rot = ~mFocusObject->getRenderRotation();
@@ -612,20 +612,20 @@ BOOL LLAgentCamera::calcCameraMinDistance(F32 &obj_min_distance)
object_extents.mV[VX] *= AVATAR_ZOOM_MIN_X_FACTOR;
object_extents.mV[VY] *= AVATAR_ZOOM_MIN_Y_FACTOR;
object_extents.mV[VZ] *= AVATAR_ZOOM_MIN_Z_FACTOR;
- soft_limit = TRUE;
+ soft_limit = true;
}
LLVector3 abs_target_offset = target_offset_origin;
abs_target_offset.abs();
LLVector3 target_offset_dir = target_offset_origin;
- BOOL target_outside_object_extents = FALSE;
+ bool target_outside_object_extents = false;
for (U32 i = VX; i <= VZ; i++)
{
if (abs_target_offset.mV[i] * 2.f > object_extents.mV[i] + OBJECT_EXTENTS_PADDING)
{
- target_outside_object_extents = TRUE;
+ target_outside_object_extents = true;
}
if (camera_offset_target.mV[i] > 0.f)
{
@@ -722,11 +722,11 @@ BOOL LLAgentCamera::calcCameraMinDistance(F32 &obj_min_distance)
{
if (camera_offset_clip > 0.f && target_offset_clip > 0.f)
{
- return FALSE;
+ return false;
}
else if (camera_offset_clip < 0.f && target_offset_clip < 0.f)
{
- return FALSE;
+ return false;
}
}
@@ -735,7 +735,7 @@ BOOL LLAgentCamera::calcCameraMinDistance(F32 &obj_min_distance)
obj_min_distance += LLViewerCamera::getInstance()->getNear() + (soft_limit ? 0.1f : 0.2f);
- return TRUE;
+ return true;
}
F32 LLAgentCamera::getCameraZoomFraction(bool get_third_person)
@@ -749,11 +749,6 @@ F32 LLAgentCamera::getCameraZoomFraction(bool get_third_person)
return mHUDTargetZoom;
}
- if (isDisableCameraConstraints())
- {
- return mCameraZoomFraction;
- }
-
if (get_third_person || (mFocusOnAvatar && cameraThirdPerson()))
{
return clamp_rescale(mCameraZoomFraction, MIN_ZOOM_FRACTION, MAX_ZOOM_FRACTION, 1.f, 0.f);
@@ -767,6 +762,10 @@ F32 LLAgentCamera::getCameraZoomFraction(bool get_third_person)
F32 min_zoom;
F32 max_zoom = getCameraMaxZoomDistance();
+ if (isDisableCameraConstraints())
+ {
+ max_zoom = MAX_CAMERA_DISTANCE_FROM_OBJECT;
+ }
F32 distance = (F32)mCameraFocusOffsetTarget.magVec();
if (mFocusObject.notNull())
@@ -798,10 +797,6 @@ void LLAgentCamera::setCameraZoomFraction(F32 fraction)
{
mHUDTargetZoom = fraction;
}
- else if (isDisableCameraConstraints())
- {
- mCameraZoomFraction = fraction;
- }
else if (mFocusOnAvatar && cameraThirdPerson())
{
mCameraZoomFraction = rescale(fraction, 0.f, 1.f, MAX_ZOOM_FRACTION, MIN_ZOOM_FRACTION);
@@ -816,6 +811,10 @@ void LLAgentCamera::setCameraZoomFraction(F32 fraction)
{
F32 min_zoom = LAND_MIN_ZOOM;
F32 max_zoom = getCameraMaxZoomDistance();
+ if (isDisableCameraConstraints())
+ {
+ max_zoom = MAX_CAMERA_DISTANCE_FROM_OBJECT;
+ }
if (mFocusObject.notNull())
{
@@ -994,7 +993,7 @@ void LLAgentCamera::cameraOrbitIn(const F32 meters)
if (!gSavedSettings.getBOOL("FreezeTime") && mCameraZoomFraction < MIN_ZOOM_FRACTION && meters > 0.f)
{
// No need to animate, camera is already there.
- changeCameraToMouselook(FALSE);
+ changeCameraToMouselook(false);
}
if (!isDisableCameraConstraints())
@@ -1195,7 +1194,7 @@ void LLAgentCamera::updateLookAt(const S32 mouse_x, const S32 mouse_y)
static LLTrace::BlockTimerStatHandle FTM_UPDATE_CAMERA("Camera");
-extern BOOL gCubeSnapshot;
+extern bool gCubeSnapshot;
//-----------------------------------------------------------------------------
// updateCamera()
@@ -1226,8 +1225,8 @@ void LLAgentCamera::updateCamera()
if (cameraThirdPerson() && (mFocusOnAvatar || mAllowChangeToFollow) && LLFollowCamMgr::getInstance()->getActiveFollowCamParams())
{
- mAllowChangeToFollow = FALSE;
- mFocusOnAvatar = TRUE;
+ mAllowChangeToFollow = false;
+ mFocusOnAvatar = true;
changeCameraToFollow();
}
@@ -1334,12 +1333,12 @@ void LLAgentCamera::updateCamera()
}
else
{
- changeCameraToThirdPerson(TRUE);
+ changeCameraToThirdPerson(true);
}
}
}
- BOOL hit_limit;
+ bool hit_limit;
LLVector3d camera_pos_global;
LLVector3d camera_target_global = calcCameraPositionTargetGlobal(&hit_limit);
mCameraVirtualPositionAgent = gAgent.getPosAgentFromGlobal(camera_target_global);
@@ -1349,7 +1348,7 @@ void LLAgentCamera::updateCamera()
mCameraFOVZoomFactor = calcCameraFOVZoomFactor();
camera_target_global = focus_target_global + (camera_target_global - focus_target_global) * (1.f + mCameraFOVZoomFactor);
- gAgent.setShowAvatar(TRUE); // can see avatar by default
+ gAgent.setShowAvatar(true); // can see avatar by default
// Adjust position for animation
if (mCameraAnimating)
@@ -1362,8 +1361,8 @@ void LLAgentCamera::updateCamera()
// linear interpolation
F32 fraction_of_animation = time / mAnimationDuration;
- BOOL isfirstPerson = mCameraMode == CAMERA_MODE_MOUSELOOK;
- BOOL wasfirstPerson = mLastCameraMode == CAMERA_MODE_MOUSELOOK;
+ bool isfirstPerson = mCameraMode == CAMERA_MODE_MOUSELOOK;
+ bool wasfirstPerson = mLastCameraMode == CAMERA_MODE_MOUSELOOK;
F32 fraction_animation_to_skip;
if (mAnimationCameraStartGlobal == camera_target_global)
@@ -1382,7 +1381,7 @@ void LLAgentCamera::updateCamera()
{
if (fraction_of_animation < animation_start_fraction || fraction_of_animation > animation_finish_fraction )
{
- gAgent.setShowAvatar(FALSE);
+ gAgent.setShowAvatar(false);
}
// ...adjust position for animation
@@ -1393,13 +1392,13 @@ void LLAgentCamera::updateCamera()
else
{
// ...animation complete
- mCameraAnimating = FALSE;
+ mCameraAnimating = false;
camera_pos_global = camera_target_global;
mFocusGlobal = focus_target_global;
gAgent.endAnimationUpdateUI();
- gAgent.setShowAvatar(TRUE);
+ gAgent.setShowAvatar(true);
}
if (isAgentAvatarValid() && (mCameraMode != CAMERA_MODE_MOUSELOOK))
@@ -1411,11 +1410,11 @@ void LLAgentCamera::updateCamera()
{
camera_pos_global = camera_target_global;
mFocusGlobal = focus_target_global;
- gAgent.setShowAvatar(TRUE);
+ gAgent.setShowAvatar(true);
}
// smoothing
- if (TRUE)
+ if (true)
{
LLVector3d agent_pos = gAgent.getPositionGlobal();
LLVector3d camera_pos_agent = camera_pos_global - agent_pos;
@@ -1428,7 +1427,7 @@ void LLAgentCamera::updateCamera()
{
const F32 SMOOTHING_HALF_LIFE = 0.02f;
- F32 smoothing = LLSmoothInterpolation::getInterpolant(gSavedSettings.getF32("CameraPositionSmoothing") * SMOOTHING_HALF_LIFE, FALSE);
+ F32 smoothing = LLSmoothInterpolation::getInterpolant(gSavedSettings.getF32("CameraPositionSmoothing") * SMOOTHING_HALF_LIFE, false);
if (mFocusOnAvatar && !mFocusObject) // we differentiate on avatar mode
{
@@ -1751,7 +1750,7 @@ F32 LLAgentCamera::calcCameraFOVZoomFactor()
//-----------------------------------------------------------------------------
// calcCameraPositionTargetGlobal()
//-----------------------------------------------------------------------------
-LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
+LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(bool *hit_limit)
{
// Compute base camera position and look-at points.
F32 camera_land_height;
@@ -1759,7 +1758,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
gAgent.getPositionGlobal() :
gAgent.getPosGlobalFromAgent(getAvatarRootPosition());
- BOOL isConstrained = FALSE;
+ bool isConstrained = false;
LLVector3d head_offset;
head_offset.setVec(mThirdPersonHeadOffset);
@@ -1985,7 +1984,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
if(camera_distance > max_dist)
{
camera_position_global = gAgent.getPositionGlobal() + (max_dist/camera_distance)*camera_offset;
- isConstrained = TRUE;
+ isConstrained = true;
}
}
@@ -1996,7 +1995,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
// {
// camera_position_global = last_position_global;
//
-// isConstrained = TRUE;
+// isConstrained = true;
// }
}
@@ -2007,7 +2006,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
if (camera_position_global.mdV[VZ] < minZ)
{
camera_position_global.mdV[VZ] = minZ;
- isConstrained = TRUE;
+ isConstrained = true;
}
if (hit_limit)
@@ -2089,7 +2088,7 @@ void LLAgentCamera::handleScrollWheel(S32 clicks)
mFollowCam.zoom(clicks);
if (mFollowCam.isZoomedToMinimumDistance())
{
- changeCameraToMouselook(FALSE);
+ changeCameraToMouselook(false);
}
}
}
@@ -2165,7 +2164,7 @@ void LLAgentCamera::resetCamera()
//-----------------------------------------------------------------------------
// changeCameraToMouselook()
//-----------------------------------------------------------------------------
-void LLAgentCamera::changeCameraToMouselook(BOOL animate)
+void LLAgentCamera::changeCameraToMouselook(bool animate)
{
if (!gSavedSettings.getBOOL("EnableMouselook")
|| LLViewerJoystick::getInstance()->getOverrideCamera())
@@ -2215,7 +2214,7 @@ void LLAgentCamera::changeCameraToMouselook(BOOL animate)
}
else
{
- mCameraAnimating = FALSE;
+ mCameraAnimating = false;
gAgent.endAnimationUpdateUI();
}
}
@@ -2251,7 +2250,7 @@ void LLAgentCamera::changeCameraToDefault()
//-----------------------------------------------------------------------------
// changeCameraToFollow()
//-----------------------------------------------------------------------------
-void LLAgentCamera::changeCameraToFollow(BOOL animate)
+void LLAgentCamera::changeCameraToFollow(bool animate)
{
if (LLViewerJoystick::getInstance()->getOverrideCamera())
{
@@ -2262,7 +2261,7 @@ void LLAgentCamera::changeCameraToFollow(BOOL animate)
{
if (mCameraMode == CAMERA_MODE_MOUSELOOK)
{
- animate = FALSE;
+ animate = false;
}
startCameraAnimation();
@@ -2296,7 +2295,7 @@ void LLAgentCamera::changeCameraToFollow(BOOL animate)
}
else
{
- mCameraAnimating = FALSE;
+ mCameraAnimating = false;
gAgent.endAnimationUpdateUI();
}
}
@@ -2305,7 +2304,7 @@ void LLAgentCamera::changeCameraToFollow(BOOL animate)
//-----------------------------------------------------------------------------
// changeCameraToThirdPerson()
//-----------------------------------------------------------------------------
-void LLAgentCamera::changeCameraToThirdPerson(BOOL animate)
+void LLAgentCamera::changeCameraToThirdPerson(bool animate)
{
if (LLViewerJoystick::getInstance()->getOverrideCamera())
{
@@ -2344,7 +2343,7 @@ void LLAgentCamera::changeCameraToThirdPerson(BOOL animate)
{
mCurrentCameraDistance = MIN_CAMERA_DISTANCE;
mTargetCameraDistance = MIN_CAMERA_DISTANCE;
- animate = FALSE;
+ animate = false;
}
updateLastCamera();
mCameraMode = CAMERA_MODE_THIRD_PERSON;
@@ -2367,7 +2366,7 @@ void LLAgentCamera::changeCameraToThirdPerson(BOOL animate)
}
else
{
- mCameraAnimating = FALSE;
+ mCameraAnimating = false;
gAgent.endAnimationUpdateUI();
}
}
@@ -2407,7 +2406,7 @@ void LLAgentCamera::changeCameraToCustomizeAvatar()
gFocusMgr.setMouseCapture( NULL );
if( gMorphView )
{
- gMorphView->setVisible( TRUE );
+ gMorphView->setVisible( true );
}
// Remove any pitch or rotation from the avatar
LLVector3 at = gAgent.getAtAxis();
@@ -2416,7 +2415,7 @@ void LLAgentCamera::changeCameraToCustomizeAvatar()
gAgent.resetAxes(at);
gAgent.sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_START);
- gAgent.setCustomAnim(TRUE);
+ gAgent.setCustomAnim(true);
gAgentAvatarp->startMotion(ANIM_AGENT_CUSTOMIZE);
LLMotion* turn_motion = gAgentAvatarp->findMotion(ANIM_AGENT_CUSTOMIZE);
@@ -2452,7 +2451,7 @@ void LLAgentCamera::switchCameraPreset(ECameraPreset preset)
mCameraZoomFraction = 1.f;
//focusing on avatar in that case means following him on movements
- mFocusOnAvatar = TRUE;
+ mFocusOnAvatar = true;
mCameraPreset = preset;
@@ -2490,7 +2489,7 @@ void LLAgentCamera::startCameraAnimation()
mAnimationFocusStartGlobal = mFocusGlobal;
setAnimationDuration(gSavedSettings.getF32("ZoomTime"));
mAnimationTimer.reset();
- mCameraAnimating = TRUE;
+ mCameraAnimating = true;
}
//-----------------------------------------------------------------------------
@@ -2498,7 +2497,7 @@ void LLAgentCamera::startCameraAnimation()
//-----------------------------------------------------------------------------
void LLAgentCamera::stopCameraAnimation()
{
- mCameraAnimating = FALSE;
+ mCameraAnimating = false;
}
void LLAgentCamera::clearFocusObject()
@@ -2525,7 +2524,7 @@ void LLAgentCamera::setFocusGlobal(const LLPickInfo& pick)
{
LLViewerObject* objectp = gObjectList.findObject(pick.mObjectID);
- if (objectp)
+ if (objectp && pick.mGLTFNodeIndex == -1)
{
// focus on object plus designated offset
// which may or may not be same as pick.mPosGlobal
@@ -2678,7 +2677,7 @@ void LLAgentCamera::setCameraPosAndFocusGlobal(const LLVector3d& camera_pos, con
//-----------------------------------------------------------------------------
void LLAgentCamera::setSitCamera(const LLUUID &object_id, const LLVector3 &camera_pos, const LLVector3 &camera_focus)
{
- BOOL camera_enabled = !object_id.isNull();
+ bool camera_enabled = !object_id.isNull();
if (camera_enabled)
{
@@ -2689,7 +2688,7 @@ void LLAgentCamera::setSitCamera(const LLUUID &object_id, const LLVector3 &camer
mSitCameraPos = camera_pos;
mSitCameraFocus = camera_focus;
mSitCameraReferenceObject = reference_object;
- mSitCameraEnabled = TRUE;
+ mSitCameraEnabled = true;
}
}
else
@@ -2697,14 +2696,14 @@ void LLAgentCamera::setSitCamera(const LLUUID &object_id, const LLVector3 &camer
mSitCameraPos.clearVec();
mSitCameraFocus.clearVec();
mSitCameraReferenceObject = NULL;
- mSitCameraEnabled = FALSE;
+ mSitCameraEnabled = false;
}
}
//-----------------------------------------------------------------------------
// setFocusOnAvatar()
//-----------------------------------------------------------------------------
-void LLAgentCamera::setFocusOnAvatar(BOOL focus_on_avatar, BOOL animate, BOOL reset_axes)
+void LLAgentCamera::setFocusOnAvatar(bool focus_on_avatar, bool animate, bool reset_axes)
{
if (focus_on_avatar != mFocusOnAvatar)
{
@@ -2751,14 +2750,14 @@ void LLAgentCamera::setFocusOnAvatar(BOOL focus_on_avatar, BOOL animate, BOOL re
{
// keep camera focus point consistent, even though it is now unlocked
setFocusGlobal(gAgent.getPositionGlobal() + calcThirdPersonFocusOffset(), gAgent.getID());
- mAllowChangeToFollow = FALSE;
+ mAllowChangeToFollow = false;
}
mFocusOnAvatar = focus_on_avatar;
}
-BOOL LLAgentCamera::setLookAt(ELookAtType target_type, LLViewerObject *object, LLVector3 position)
+bool LLAgentCamera::setLookAt(ELookAtType target_type, LLViewerObject *object, LLVector3 position)
{
if(object && object->isAttachment())
{
@@ -2827,7 +2826,7 @@ void LLAgentCamera::lookAtLastChat()
new_camera_pos += left * 0.3f;
new_camera_pos += up * 0.2f;
- setFocusOnAvatar(FALSE, FALSE);
+ setFocusOnAvatar(false, false);
if (chatter_av->mHeadp)
{
@@ -2858,7 +2857,7 @@ void LLAgentCamera::lookAtLastChat()
new_camera_pos += left * 0.3f;
new_camera_pos += up * 0.2f;
- setFocusOnAvatar(FALSE, FALSE);
+ setFocusOnAvatar(false, false);
setFocusGlobal(chatter->getPositionGlobal(), gAgent.getLastChatter());
mCameraFocusOffsetTarget = gAgent.getPosGlobalFromAgent(new_camera_pos) - chatter->getPositionGlobal();
@@ -2870,12 +2869,12 @@ bool LLAgentCamera::isfollowCamLocked()
return mFollowCam.getPositionLocked();
}
-BOOL LLAgentCamera::setPointAt(EPointAtType target_type, LLViewerObject *object, LLVector3 position)
+bool LLAgentCamera::setPointAt(EPointAtType target_type, LLViewerObject *object, LLVector3 position)
{
// disallow pointing at attachments and avatars
if (object && (object->isAttachment() || object->isAvatar()))
{
- return FALSE;
+ return false;
}
if (!mPointAt || mPointAt->isDead())
{
diff --git a/indra/newview/llagentcamera.h b/indra/newview/llagentcamera.h
index d27cdb0c5c..f28a49d046 100644
--- a/indra/newview/llagentcamera.h
+++ b/indra/newview/llagentcamera.h
@@ -89,14 +89,14 @@ private:
//--------------------------------------------------------------------
public:
void changeCameraToDefault();
- void changeCameraToMouselook(BOOL animate = TRUE);
- void changeCameraToThirdPerson(BOOL animate = TRUE);
+ void changeCameraToMouselook(bool animate = true);
+ void changeCameraToThirdPerson(bool animate = true);
void changeCameraToCustomizeAvatar(); // Trigger transition animation
- void changeCameraToFollow(BOOL animate = TRUE); // Ventrella
- BOOL cameraThirdPerson() const { return (mCameraMode == CAMERA_MODE_THIRD_PERSON && mLastCameraMode == CAMERA_MODE_THIRD_PERSON); }
- BOOL cameraMouselook() const { return (mCameraMode == CAMERA_MODE_MOUSELOOK && mLastCameraMode == CAMERA_MODE_MOUSELOOK); }
- BOOL cameraCustomizeAvatar() const { return (mCameraMode == CAMERA_MODE_CUSTOMIZE_AVATAR /*&& !mCameraAnimating*/); }
- BOOL cameraFollow() const { return (mCameraMode == CAMERA_MODE_FOLLOW && mLastCameraMode == CAMERA_MODE_FOLLOW); }
+ void changeCameraToFollow(bool animate = true); // Ventrella
+ bool cameraThirdPerson() const { return (mCameraMode == CAMERA_MODE_THIRD_PERSON && mLastCameraMode == CAMERA_MODE_THIRD_PERSON); }
+ bool cameraMouselook() const { return (mCameraMode == CAMERA_MODE_MOUSELOOK && mLastCameraMode == CAMERA_MODE_MOUSELOOK); }
+ bool cameraCustomizeAvatar() const { return (mCameraMode == CAMERA_MODE_CUSTOMIZE_AVATAR /*&& !mCameraAnimating*/); }
+ bool cameraFollow() const { return (mCameraMode == CAMERA_MODE_FOLLOW && mLastCameraMode == CAMERA_MODE_FOLLOW); }
ECameraMode getCameraMode() const { return mCameraMode; }
ECameraMode getLastCameraMode() const { return mLastCameraMode; }
void updateCamera(); // Call once per frame to update camera location/orientation
@@ -139,10 +139,10 @@ private:
public:
LLVector3d getCameraPositionGlobal() const;
const LLVector3 &getCameraPositionAgent() const;
- LLVector3d calcCameraPositionTargetGlobal(BOOL *hit_limit = NULL); // Calculate the camera position target
+ LLVector3d calcCameraPositionTargetGlobal(bool *hit_limit = NULL); // Calculate the camera position target
F32 getCameraMinOffGround(); // Minimum height off ground for this mode, meters
void setCameraCollidePlane(const LLVector4 &plane) { mCameraCollidePlane = plane; }
- BOOL calcCameraMinDistance(F32 &obj_min_distance);
+ bool calcCameraMinDistance(F32 &obj_min_distance);
F32 getCurrentCameraBuildOffset() { return (F32)mCameraFocusOffset.length(); }
void clearCameraLag() { mCameraLag.clearVec(); }
private:
@@ -175,12 +175,12 @@ private:
//--------------------------------------------------------------------
public:
void setupSitCamera();
- BOOL sitCameraEnabled() { return mSitCameraEnabled; }
+ bool sitCameraEnabled() { return mSitCameraEnabled; }
void setSitCamera(const LLUUID &object_id,
const LLVector3 &camera_pos = LLVector3::zero, const LLVector3 &camera_focus = LLVector3::zero);
private:
LLPointer<LLViewerObject> mSitCameraReferenceObject; // Object to which camera is related when sitting
- BOOL mSitCameraEnabled; // Use provided camera information when sitting?
+ bool mSitCameraEnabled; // Use provided camera information when sitting?
LLVector3 mSitCameraPos; // Root relative camera pos when sitting
LLVector3 mSitCameraFocus; // Root relative camera target when sitting
@@ -188,15 +188,15 @@ private:
// Animation
//--------------------------------------------------------------------
public:
- void setCameraAnimating(BOOL b) { mCameraAnimating = b; }
- BOOL getCameraAnimating() { return mCameraAnimating; }
+ void setCameraAnimating(bool b) { mCameraAnimating = b; }
+ bool getCameraAnimating() { return mCameraAnimating; }
void setAnimationDuration(F32 seconds);
void startCameraAnimation();
void stopCameraAnimation();
private:
LLFrameTimer mAnimationTimer; // Seconds that transition animation has been active
F32 mAnimationDuration; // In seconds
- BOOL mCameraAnimating; // Camera is transitioning from one mode to another
+ bool mCameraAnimating; // Camera is transitioning from one mode to another
LLVector3d mAnimationCameraStartGlobal; // Camera start position, global coords
LLVector3d mAnimationFocusStartGlobal; // Camera focus point, global coords
@@ -206,43 +206,43 @@ private:
public:
LLVector3d calcFocusPositionTargetGlobal();
LLVector3 calcFocusOffset(LLViewerObject *object, LLVector3 pos_agent, S32 x, S32 y);
- BOOL getFocusOnAvatar() const { return mFocusOnAvatar; }
+ bool getFocusOnAvatar() const { return mFocusOnAvatar; }
LLPointer<LLViewerObject>& getFocusObject() { return mFocusObject; }
F32 getFocusObjectDist() const { return mFocusObjectDist; }
void updateFocusOffset();
void validateFocusObject();
void setFocusGlobal(const LLPickInfo& pick);
void setFocusGlobal(const LLVector3d &focus, const LLUUID &object_id = LLUUID::null);
- void setFocusOnAvatar(BOOL focus, BOOL animate, BOOL reset_axes = TRUE);
+ void setFocusOnAvatar(bool focus, bool animate, bool reset_axes = true);
void setCameraPosAndFocusGlobal(const LLVector3d& pos, const LLVector3d& focus, const LLUUID &object_id);
void clearFocusObject();
void setFocusObject(LLViewerObject* object);
- void setAllowChangeToFollow(BOOL focus) { mAllowChangeToFollow = focus; }
- void setObjectTracking(BOOL track) { mTrackFocusObject = track; }
+ void setAllowChangeToFollow(bool focus) { mAllowChangeToFollow = focus; }
+ void setObjectTracking(bool track) { mTrackFocusObject = track; }
const LLVector3d &getFocusGlobal() const { return mFocusGlobal; }
const LLVector3d &getFocusTargetGlobal() const { return mFocusTargetGlobal; }
private:
LLVector3d mCameraFocusOffset; // Offset from focus point in build mode
LLVector3d mCameraFocusOffsetTarget; // Target towards which we are lerping the camera's focus offset
- BOOL mFocusOnAvatar;
- BOOL mAllowChangeToFollow;
+ bool mFocusOnAvatar;
+ bool mAllowChangeToFollow;
LLVector3d mFocusGlobal;
LLVector3d mFocusTargetGlobal;
LLPointer<LLViewerObject> mFocusObject;
F32 mFocusObjectDist;
LLVector3 mFocusObjectOffset;
- BOOL mTrackFocusObject;
+ bool mTrackFocusObject;
//--------------------------------------------------------------------
// Lookat / Pointat
//--------------------------------------------------------------------
public:
void updateLookAt(const S32 mouse_x, const S32 mouse_y);
- BOOL setLookAt(ELookAtType target_type, LLViewerObject *object = NULL, LLVector3 position = LLVector3::zero);
+ bool setLookAt(ELookAtType target_type, LLViewerObject *object = NULL, LLVector3 position = LLVector3::zero);
ELookAtType getLookAtType();
void lookAtLastChat();
void slamLookAt(const LLVector3 &look_at); // Set the physics data
- BOOL setPointAt(EPointAtType target_type, LLViewerObject *object = NULL, LLVector3 position = LLVector3::zero);
+ bool setPointAt(EPointAtType target_type, LLViewerObject *object = NULL, LLVector3 position = LLVector3::zero);
EPointAtType getPointAtType();
public:
LLPointer<LLHUDEffectLookAt> mLookAt;
@@ -294,7 +294,7 @@ public:
//--------------------------------------------------------------------
public:
// Called whenever the agent moves. Puts camera back in default position, deselects items, etc.
- void resetView(BOOL reset_camera = TRUE, BOOL change_camera = FALSE);
+ void resetView(bool reset_camera = true, bool change_camera = false);
// Called on camera movement. Unlocks camera from the default position behind the avatar.
void unlockView();
public:
@@ -304,10 +304,10 @@ public:
// Mouselook
//--------------------------------------------------------------------
public:
- BOOL getForceMouselook() const { return mForceMouselook; }
- void setForceMouselook(BOOL mouselook) { mForceMouselook = mouselook; }
+ bool getForceMouselook() const { return mForceMouselook; }
+ void setForceMouselook(bool mouselook) { mForceMouselook = mouselook; }
private:
- BOOL mForceMouselook;
+ bool mForceMouselook;
//--------------------------------------------------------------------
// HUD
diff --git a/indra/newview/llagentlanguage.cpp b/indra/newview/llagentlanguage.cpp
index cdb0e3302d..4e039cae6a 100644
--- a/indra/newview/llagentlanguage.cpp
+++ b/indra/newview/llagentlanguage.cpp
@@ -48,7 +48,7 @@ void LLAgentLanguage::onChange()
{
// Clear inventory cache so that default names of inventory items
// appear retranslated (EXT-8308).
- gSavedSettings.setBOOL("PurgeCacheOnNextStartup", TRUE);
+ gSavedSettings.setBOOL("PurgeCacheOnNextStartup", true);
}
// send language settings to the sim
diff --git a/indra/newview/llagentlistener.cpp b/indra/newview/llagentlistener.cpp
index 77a3d47aea..d6f4e1a720 100644
--- a/indra/newview/llagentlistener.cpp
+++ b/indra/newview/llagentlistener.cpp
@@ -347,10 +347,10 @@ void LLAgentListener::startAutoPilot(LLSD const & event_data)
rotation_threshold = event_data["rotation_threshold"].asReal();
}
- BOOL allow_flying = TRUE;
+ bool allow_flying = true;
if (event_data.has("allow_flying"))
{
- allow_flying = (BOOL) event_data["allow_flying"].asBoolean();
+ allow_flying = (bool) event_data["allow_flying"].asBoolean();
mAgent.setFlying(allow_flying);
}
@@ -411,10 +411,10 @@ void LLAgentListener::startFollowPilot(LLSD const & event_data)
{
LLUUID target_id;
- BOOL allow_flying = TRUE;
+ bool allow_flying = true;
if (event_data.has("allow_flying"))
{
- allow_flying = (BOOL) event_data["allow_flying"].asBoolean();
+ allow_flying = (bool) event_data["allow_flying"].asBoolean();
}
if (event_data.has("leader_id"))
@@ -469,7 +469,7 @@ void LLAgentListener::setAutoPilotTarget(LLSD const & event_data) const
void LLAgentListener::stopAutoPilot(LLSD const & event_data) const
{
- BOOL user_cancel = FALSE;
+ bool user_cancel = false;
if (event_data.has("user_cancel"))
{
user_cancel = event_data["user_cancel"].asBoolean();
diff --git a/indra/newview/llagentpicksinfo.h b/indra/newview/llagentpicksinfo.h
index 21df036cb7..8f9bf99d07 100644
--- a/indra/newview/llagentpicksinfo.h
+++ b/indra/newview/llagentpicksinfo.h
@@ -60,7 +60,7 @@ public:
S32 getMaxNumberOfPicks() { return mMaxNumberOfPicks; }
/**
- * Returns TRUE if Agent has maximum allowed number of Picks.
+ * Returns true if Agent has maximum allowed number of Picks.
*/
bool isPickLimitReached();
diff --git a/indra/newview/llagentpilot.cpp b/indra/newview/llagentpilot.cpp
index cfc445f998..c62431db91 100644
--- a/indra/newview/llagentpilot.cpp
+++ b/indra/newview/llagentpilot.cpp
@@ -42,15 +42,15 @@ LLAgentPilot gAgentPilot;
LLAgentPilot::LLAgentPilot() :
mNumRuns(-1),
- mQuitAfterRuns(FALSE),
- mRecording(FALSE),
+ mQuitAfterRuns(false),
+ mRecording(false),
mLastRecordTime(0.f),
- mStarted(FALSE),
- mPlaying(FALSE),
+ mStarted(false),
+ mPlaying(false),
mCurrentAction(0),
- mOverrideCamera(FALSE),
- mLoop(TRUE),
- mReplaySession(FALSE)
+ mOverrideCamera(false),
+ mLoop(true),
+ mReplaySession(false)
{
}
@@ -221,14 +221,14 @@ void LLAgentPilot::startRecord()
mActions.clear();
mTimer.reset();
addAction(STRAIGHT);
- mRecording = TRUE;
+ mRecording = true;
}
void LLAgentPilot::stopRecord()
{
gAgentPilot.addAction(STRAIGHT);
gAgentPilot.save();
- mRecording = FALSE;
+ mRecording = false;
}
void LLAgentPilot::addAction(enum EActionType action_type)
@@ -252,7 +252,7 @@ void LLAgentPilot::startPlayback()
{
if (!mPlaying)
{
- mPlaying = TRUE;
+ mPlaying = true;
mCurrentAction = 0;
mTimer.reset();
@@ -261,12 +261,12 @@ void LLAgentPilot::startPlayback()
LL_INFOS() << "Starting playback, moving to waypoint 0" << LL_ENDL;
gAgent.startAutoPilotGlobal(mActions[0].mTarget);
moveCamera();
- mStarted = FALSE;
+ mStarted = false;
}
else
{
LL_INFOS() << "No autopilot data, cancelling!" << LL_ENDL;
- mPlaying = FALSE;
+ mPlaying = false;
}
}
}
@@ -275,7 +275,7 @@ void LLAgentPilot::stopPlayback()
{
if (mPlaying)
{
- mPlaying = FALSE;
+ mPlaying = false;
mCurrentAction = 0;
mTimer.reset();
gAgent.stopAutoPilot();
@@ -347,7 +347,7 @@ void LLAgentPilot::updateTarget()
{
LL_INFOS() << "At start, beginning playback" << LL_ENDL;
mTimer.reset();
- mStarted = TRUE;
+ mStarted = true;
}
}
}
diff --git a/indra/newview/llagentpilot.h b/indra/newview/llagentpilot.h
index f6b6376086..fcfb051dd9 100644
--- a/indra/newview/llagentpilot.h
+++ b/indra/newview/llagentpilot.h
@@ -68,35 +68,35 @@ public:
void addWaypoint();
void moveCamera();
- void setReplaySession(BOOL new_val) { mReplaySession = new_val; }
- BOOL getReplaySession() { return mReplaySession; }
+ void setReplaySession(bool new_val) { mReplaySession = new_val; }
+ bool getReplaySession() { return mReplaySession; }
- void setLoop(BOOL new_val) { mLoop = new_val; }
- BOOL getLoop() { return mLoop; }
+ void setLoop(bool new_val) { mLoop = new_val; }
+ bool getLoop() { return mLoop; }
- void setQuitAfterRuns(BOOL quit_val) { mQuitAfterRuns = quit_val; }
+ void setQuitAfterRuns(bool quit_val) { mQuitAfterRuns = quit_val; }
void setNumRuns(S32 num_runs) { mNumRuns = num_runs; }
private:
- BOOL mLoop;
- BOOL mReplaySession;
+ bool mLoop;
+ bool mReplaySession;
S32 mNumRuns;
- BOOL mQuitAfterRuns;
+ bool mQuitAfterRuns;
void setAutopilotTarget(const S32 id);
- BOOL mRecording;
+ bool mRecording;
F32 mLastRecordTime;
- BOOL mStarted;
- BOOL mPlaying;
+ bool mStarted;
+ bool mPlaying;
S32 mCurrentAction;
- BOOL mOverrideCamera;
+ bool mOverrideCamera;
class Action
{
diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp
index acb1a37ff5..5e1e4c5272 100644
--- a/indra/newview/llagentui.cpp
+++ b/indra/newview/llagentui.cpp
@@ -68,19 +68,19 @@ void LLAgentUI::buildSLURL(LLSLURL& slurl, const bool escaped /*= true*/)
}
//static
-BOOL LLAgentUI::checkAgentDistance(const LLVector3& pole, F32 radius)
+bool LLAgentUI::checkAgentDistance(const LLVector3& pole, F32 radius)
{
F32 delta_x = gAgent.getPositionAgent().mV[VX] - pole.mV[VX];
F32 delta_y = gAgent.getPositionAgent().mV[VY] - pole.mV[VY];
return sqrt( delta_x* delta_x + delta_y* delta_y ) < radius;
}
-BOOL LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt,const LLVector3& agent_pos_region)
+bool LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt,const LLVector3& agent_pos_region)
{
LLViewerRegion* region = gAgent.getRegion();
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
- if (!region || !parcel) return FALSE;
+ if (!region || !parcel) return false;
S32 pos_x = S32(agent_pos_region.mV[VX] + 0.5f);
S32 pos_y = S32(agent_pos_region.mV[VY] + 0.5f);
@@ -186,9 +186,9 @@ BOOL LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt,const
}
}
str = buffer;
- return TRUE;
+ return true;
}
-BOOL LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt)
+bool LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt)
{
return buildLocationString(str,fmt, gAgent.getPositionAgent());
}
diff --git a/indra/newview/llagentui.h b/indra/newview/llagentui.h
index bb48dad14c..dcd715f87a 100644
--- a/indra/newview/llagentui.h
+++ b/indra/newview/llagentui.h
@@ -46,14 +46,14 @@ public:
static void buildSLURL(LLSLURL& slurl, const bool escaped = true);
//build location string using the current position of gAgent.
- static BOOL buildLocationString(std::string& str, ELocationFormat fmt = LOCATION_FORMAT_LANDMARK);
+ static bool buildLocationString(std::string& str, ELocationFormat fmt = LOCATION_FORMAT_LANDMARK);
//build location string using a region position of the avatar.
- static BOOL buildLocationString(std::string& str, ELocationFormat fmt,const LLVector3& agent_pos_region);
+ static bool buildLocationString(std::string& str, ELocationFormat fmt,const LLVector3& agent_pos_region);
/**
* @brief Check whether the agent is in neighborhood of the pole Within same region
* @return true if the agent is in neighborhood.
*/
- static BOOL checkAgentDistance(const LLVector3& local_pole, F32 radius);
+ static bool checkAgentDistance(const LLVector3& local_pole, F32 radius);
};
#endif //LLAGENTUI_H
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index db99f20775..4a66bef86e 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -56,7 +56,7 @@
LLAgentWearables gAgentWearables;
-BOOL LLAgentWearables::mInitialWearablesUpdateReceived = FALSE;
+bool LLAgentWearables::mInitialWearablesUpdateReceived = false;
using namespace LLAvatarAppearanceDefines;
@@ -76,7 +76,7 @@ void set_default_permissions(LLViewerInventoryItem* item)
item->setPermissions(perm);
- item->updateServer(FALSE);
+ item->updateServer(false);
}
}
@@ -194,7 +194,7 @@ struct LLAgentDumper
LLAgentWearables::LLAgentWearables() :
LLWearableData(),
- mWearablesLoaded(FALSE)
+ mWearablesLoaded(false)
, mCOFChangeInProgress(false)
{
}
@@ -304,7 +304,7 @@ void LLAgentWearables::addWearabletoAgentInventoryDone(const LLWearableType::ETy
item->setAssetUUID(wearable->getAssetID());
item->setTransactionID(wearable->getTransactionID());
gInventory.addChangedMask(LLInventoryObserver::INTERNAL, item_id);
- item->updateServer(FALSE);
+ item->updateServer(false);
}
gInventory.notifyObservers();
}
@@ -375,7 +375,7 @@ void LLAgentWearables::saveWearableAs(const LLWearableType::EType type,
const U32 index,
const std::string& new_name,
const std::string& description,
- BOOL save_in_lost_and_found)
+ bool save_in_lost_and_found)
{
if (!isWearableCopyable(type, index))
{
@@ -493,13 +493,13 @@ void LLAgentWearables::setWearableName(const LLUUID& item_id, const std::string&
}
-BOOL LLAgentWearables::isWearableModifiable(LLWearableType::EType type, U32 index) const
+bool LLAgentWearables::isWearableModifiable(LLWearableType::EType type, U32 index) const
{
LLUUID item_id = getWearableItemID(type, index);
- return item_id.notNull() ? isWearableModifiable(item_id) : FALSE;
+ return item_id.notNull() ? isWearableModifiable(item_id) : false;
}
-BOOL LLAgentWearables::isWearableModifiable(const LLUUID& item_id) const
+bool LLAgentWearables::isWearableModifiable(const LLUUID& item_id) const
{
const LLUUID& linked_id = gInventory.getLinkedItemID(item_id);
if (linked_id.notNull())
@@ -508,13 +508,13 @@ BOOL LLAgentWearables::isWearableModifiable(const LLUUID& item_id) const
if (item && item->getPermissions().allowModifyBy(gAgent.getID(),
gAgent.getGroupID()))
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
-BOOL LLAgentWearables::isWearableCopyable(LLWearableType::EType type, U32 index) const
+bool LLAgentWearables::isWearableCopyable(LLWearableType::EType type, U32 index) const
{
LLUUID item_id = getWearableItemID(type, index);
if (!item_id.isNull())
@@ -523,27 +523,11 @@ BOOL LLAgentWearables::isWearableCopyable(LLWearableType::EType type, U32 index)
if (item && item->getPermissions().allowCopyBy(gAgent.getID(),
gAgent.getGroupID()))
{
- return TRUE;
+ return true;
}
}
- return FALSE;
-}
-
-/*
- U32 LLAgentWearables::getWearablePermMask(LLWearableType::EType type)
- {
- LLUUID item_id = getWearableItemID(type);
- if (!item_id.isNull())
- {
- LLInventoryItem* item = gInventory.getItem(item_id);
- if (item)
- {
- return item->getPermissions().getMaskOwner();
- }
- }
- return PERM_NONE;
- }
-*/
+ return false;
+}
LLInventoryItem* LLAgentWearables::getWearableInventoryItem(LLWearableType::EType type, U32 index)
{
@@ -617,13 +601,13 @@ const LLViewerWearable* LLAgentWearables::getViewerWearable(const LLWearableType
}
// static
-BOOL LLAgentWearables::selfHasWearable(LLWearableType::EType type)
+bool LLAgentWearables::selfHasWearable(LLWearableType::EType type)
{
return (gAgentWearables.getWearableCount(type) > 0);
}
// virtual
-void LLAgentWearables::wearableUpdated(LLWearable *wearable, BOOL removed)
+void LLAgentWearables::wearableUpdated(LLWearable *wearable, bool removed)
{
if (isAgentAvatarValid())
{
@@ -675,9 +659,9 @@ const LLUUID LLAgentWearables::getWearableAssetID(LLWearableType::EType type, U3
return LLUUID();
}
-BOOL LLAgentWearables::isWearingItem(const LLUUID& item_id) const
+bool LLAgentWearables::isWearingItem(const LLUUID& item_id) const
{
- return getWearableFromItemID(item_id) != NULL;
+ return getWearableFromItemID(item_id) != nullptr;
}
void LLAgentWearables::addLocalTextureObject(const LLWearableType::EType wearable_type, const LLAvatarAppearanceDefines::ETextureIndex texture_type, U32 wearable_index)
@@ -772,21 +756,21 @@ void LLAgentWearables::createStandardWearables()
if (!isAgentAvatarValid()) return;
- const BOOL create[LLWearableType::WT_COUNT] =
+ constexpr bool create[LLWearableType::WT_COUNT] =
{
- TRUE, //LLWearableType::WT_SHAPE
- TRUE, //LLWearableType::WT_SKIN
- TRUE, //LLWearableType::WT_HAIR
- TRUE, //LLWearableType::WT_EYES
- TRUE, //LLWearableType::WT_SHIRT
- TRUE, //LLWearableType::WT_PANTS
- TRUE, //LLWearableType::WT_SHOES
- TRUE, //LLWearableType::WT_SOCKS
- FALSE, //LLWearableType::WT_JACKET
- FALSE, //LLWearableType::WT_GLOVES
- TRUE, //LLWearableType::WT_UNDERSHIRT
- TRUE, //LLWearableType::WT_UNDERPANTS
- FALSE //LLWearableType::WT_SKIRT
+ true, //LLWearableType::WT_SHAPE
+ true, //LLWearableType::WT_SKIN
+ true, //LLWearableType::WT_HAIR
+ true, //LLWearableType::WT_EYES
+ true, //LLWearableType::WT_SHIRT
+ true, //LLWearableType::WT_PANTS
+ true, //LLWearableType::WT_SHOES
+ true, //LLWearableType::WT_SOCKS
+ false, //LLWearableType::WT_JACKET
+ false, //LLWearableType::WT_GLOVES
+ true, //LLWearableType::WT_UNDERSHIRT
+ true, //LLWearableType::WT_UNDERPANTS
+ false //LLWearableType::WT_SKIRT
};
LLPointer<LLInventoryCallback> cb = new OnWearableItemCreatedCB;
@@ -865,7 +849,7 @@ void LLAgentWearables::makeNewOutfitDone(S32 type, U32 index)
void LLAgentWearables::addWearableToAgentInventory(LLPointer<LLInventoryCallback> cb,
LLViewerWearable* wearable,
const LLUUID& category_id,
- BOOL notify)
+ bool notify)
{
create_inventory_wearable(gAgent.getID(),
gAgent.getSessionID(),
@@ -987,7 +971,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
S32 matched = 0, mismatched = 0;
const S32 arr_size = LLWearableType::WT_COUNT;
S32 type_counts[arr_size];
- BOOL update_inventory = FALSE;
+ bool update_inventory{ false };
std::fill(type_counts,type_counts+arr_size,0);
for (S32 i = 0; i < count; i++)
{
@@ -1025,7 +1009,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
<< curr_wearable->getName() << " vs " << new_item->getName()
<< " item ids " << curr_wearable->getItemID() << " vs " << new_item->getUUID()
<< LL_ENDL;
- update_inventory = TRUE;
+ update_inventory = true;
continue;
}
// If we got here, everything matches.
@@ -1092,7 +1076,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
pushWearable(type,new_wearable);
}
- const BOOL removed = FALSE;
+ constexpr bool removed = false;
wearableUpdated(new_wearable, removed);
}
}
@@ -1110,7 +1094,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
if (isAgentAvatarValid())
{
- gAgentAvatarp->setCompositeUpdatesEnabled(TRUE);
+ gAgentAvatarp->setCompositeUpdatesEnabled(true);
// If we have not yet declouded, we may want to use
// baked texture UUIDs sent from the first objectUpdate message
@@ -1124,7 +1108,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
}
// Start rendering & update the server
- mWearablesLoaded = TRUE;
+ mWearablesLoaded = true;
notifyLoadingFinished();
@@ -1434,7 +1418,7 @@ void LLAgentWearables::userAttachMultipleAttachments(LLInventoryModel::item_arra
++it)
{
const LLInventoryItem* item = *it;
- LLAttachmentsMgr::instance().addAttachmentRequest(item->getLinkedUUID(), 0, TRUE);
+ LLAttachmentsMgr::instance().addAttachmentRequest(item->getLinkedUUID(), 0, true);
}
}
@@ -1452,7 +1436,7 @@ bool LLAgentWearables::canMoveWearable(const LLUUID& item_id, bool closer_to_bod
return wearable != marginal_wearable;
}
-BOOL LLAgentWearables::areWearablesLoaded() const
+bool LLAgentWearables::areWearablesLoaded() const
{
return mWearablesLoaded;
}
@@ -1620,7 +1604,7 @@ void LLAgentWearables::editWearable(const LLUUID& item_id)
return;
}
- const BOOL disable_camera_switch = LLWearableType::getInstance()->getDisableCameraSwitch(wearable->getType());
+ const bool disable_camera_switch = LLWearableType::getInstance()->getDisableCameraSwitch(wearable->getType());
LLPanel* panel = LLFloaterSidePanelContainer::getPanel("appearance");
LLSidepanelAppearance::editWearable(wearable, panel, disable_camera_switch);
}
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index e20f5df7fa..bb7837acf8 100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -66,16 +66,14 @@ public:
// Queries
//--------------------------------------------------------------------
public:
- BOOL isWearingItem(const LLUUID& item_id) const;
- BOOL isWearableModifiable(LLWearableType::EType type, U32 index /*= 0*/) const;
- BOOL isWearableModifiable(const LLUUID& item_id) const;
+ bool isWearingItem(const LLUUID& item_id) const;
+ bool isWearableModifiable(LLWearableType::EType type, U32 index /*= 0*/) const;
+ bool isWearableModifiable(const LLUUID& item_id) const;
- BOOL isWearableCopyable(LLWearableType::EType type, U32 index /*= 0*/) const;
- BOOL areWearablesLoaded() const;
+ bool isWearableCopyable(LLWearableType::EType type, U32 index /*= 0*/) const;
+ bool areWearablesLoaded() const;
bool isCOFChangeInProgress() const { return mCOFChangeInProgress; }
F32 getCOFChangeTime() const { return mCOFChangeTimer.getElapsedTimeF32(); }
- void updateWearablesLoaded();
- void checkWearablesLoaded() const;
bool canMoveWearable(const LLUUID& item_id, bool closer_to_body) const;
// Note: False for shape, skin, eyes, and hair, unless you have MORE than 1.
@@ -95,13 +93,13 @@ public:
LLViewerWearable* getViewerWearable(const LLWearableType::EType type, U32 index /*= 0*/);
const LLViewerWearable* getViewerWearable(const LLWearableType::EType type, U32 index /*= 0*/) const;
LLInventoryItem* getWearableInventoryItem(LLWearableType::EType type, U32 index /*= 0*/);
- static BOOL selfHasWearable(LLWearableType::EType type);
+ static bool selfHasWearable(LLWearableType::EType type);
//--------------------------------------------------------------------
// Setters
//--------------------------------------------------------------------
private:
- /*virtual*/void wearableUpdated(LLWearable *wearable, BOOL removed);
+ /*virtual*/void wearableUpdated(LLWearable *wearable, bool removed);
public:
void setWearableItem(LLInventoryItem* new_item, LLViewerWearable* wearable, bool do_append = false);
void setWearableOutfit(const LLInventoryItem::item_array_t& items, const std::vector< LLViewerWearable* >& wearables);
@@ -116,20 +114,18 @@ protected:
void addWearableToAgentInventory(LLPointer<LLInventoryCallback> cb,
LLViewerWearable* wearable,
const LLUUID& category_id = LLUUID::null,
- BOOL notify = TRUE);
+ bool notify = true);
void addWearabletoAgentInventoryDone(const LLWearableType::EType type,
const U32 index,
const LLUUID& item_id,
LLViewerWearable* wearable);
- void recoverMissingWearable(const LLWearableType::EType type, U32 index /*= 0*/);
- void recoverMissingWearableDone();
//--------------------------------------------------------------------
// Editing/moving wearables
//--------------------------------------------------------------------
public:
- static void createWearable(LLWearableType::EType type, bool wear = false, const LLUUID& parent_id = LLUUID::null, std::function<void(const LLUUID&)> created_cb = NULL);
+ static void createWearable(LLWearableType::EType type, bool wear = false, const LLUUID& parent_id = LLUUID::null, std::function<void(const LLUUID&)> created_cb = nullptr);
static void editWearable(const LLUUID& item_id);
bool moveWearable(const LLViewerInventoryItem* item, bool closer_to_body);
@@ -159,7 +155,7 @@ private:
// Save Wearables
//--------------------------------------------------------------------
public:
- void saveWearableAs(const LLWearableType::EType type, const U32 index, const std::string& new_name, const std::string& description, BOOL save_in_lost_and_found);
+ void saveWearableAs(const LLWearableType::EType type, const U32 index, const std::string& new_name, const std::string& description, bool save_in_lost_and_found);
void saveWearable(const LLWearableType::EType type, const U32 index,
const std::string new_name = "");
void saveAllWearables();
@@ -212,13 +208,13 @@ private:
// Member variables
//--------------------------------------------------------------------
private:
- static BOOL mInitialWearablesUpdateReceived;
- BOOL mWearablesLoaded;
+ static bool mInitialWearablesUpdateReceived;
+ bool mWearablesLoaded;
/**
* True if agent's outfit is being changed now.
*/
- BOOL mCOFChangeInProgress;
+ bool mCOFChangeInProgress;
LLTimer mCOFChangeTimer;
//--------------------------------------------------------------------------------
diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp
index f23ce13608..a78b2ffc6f 100644
--- a/indra/newview/llaisapi.cpp
+++ b/indra/newview/llaisapi.cpp
@@ -1198,7 +1198,7 @@ void AISUpdate::parseItem(const LLSD& item_map)
// Default to current values where not provided.
new_item->copyViewerItem(curr_item);
}
- BOOL rv = new_item->unpackMessage(item_map);
+ bool rv = new_item->unpackMessage(item_map);
if (rv)
{
if (mFetch)
@@ -1243,7 +1243,7 @@ void AISUpdate::parseLink(const LLSD& link_map, S32 depth)
// Default to current values where not provided.
new_link->copyViewerItem(curr_link);
}
- BOOL rv = new_link->unpackMessage(link_map);
+ bool rv = new_link->unpackMessage(link_map);
if (rv)
{
const LLUUID& parent_id = new_link->getParentUUID();
@@ -1340,7 +1340,7 @@ void AISUpdate::parseCategory(const LLSD& category_map, S32 depth)
new_cat = new LLViewerInventoryCategory(LLUUID::null);
}
}
- BOOL rv = new_cat->unpackMessage(category_map);
+ bool rv = new_cat->unpackMessage(category_map);
// *NOTE: unpackMessage does not unpack version or descendent count.
if (rv)
{
@@ -1678,7 +1678,7 @@ void AISUpdate::doUpdate()
LLPointer<LLViewerInventoryItem> new_item = lost_it->second;
new_item->setParent(lost_uuid);
- new_item->updateParentOnServer(FALSE);
+ new_item->updateParentOnServer(false);
}
}
}
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index c84657cf7a..488709cfa1 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -124,18 +124,18 @@ public:
}
/*virtual*/
- BOOL tick()
+ bool tick()
{
if(mEventTimer.hasExpired())
{
LLAppearanceMgr::instance().setOutfitLocked(false);
}
- return FALSE;
+ return false;
}
void stop() { mEventTimer.stop(); }
void start() { mEventTimer.start(); }
void reset() { mEventTimer.reset(); }
- BOOL getStarted() { return mEventTimer.getStarted(); }
+ bool getStarted() { return mEventTimer.getStarted(); }
LLTimer& getEventTimer() { return mEventTimer;}
};
@@ -332,7 +332,7 @@ public:
// virtual
// Will be deleted after returning true - only safe to do this if all callbacks have fired.
- BOOL tick()
+ bool tick()
{
// mPendingRequests will be zero if all requests have been
// responded to. mWaitTimes.empty() will be true if we have
@@ -1335,7 +1335,7 @@ void LLWearableHoldingPattern::onWearableAssetFetch(LLViewerWearable *wearable)
wearable_item->setAssetUUID(new_wearable->getAssetID());
wearable_item->setTransactionID(new_wearable->getTransactionID());
gInventory.updateItem(wearable_item, LLInventoryObserver::INTERNAL);
- wearable_item->updateServer(FALSE);
+ wearable_item->updateServer(false);
use_count++;
}
@@ -1730,7 +1730,7 @@ void LLAppearanceMgr::takeOffOutfit(const LLUUID& cat_id)
LLInventoryModel::item_array_t items;
LLFindWearablesEx collector(/*is_worn=*/ true, /*include_body_parts=*/ false);
- gInventory.collectDescendentsIf(cat_id, cats, items, FALSE, collector);
+ gInventory.collectDescendentsIf(cat_id, cats, items, false, collector);
LLInventoryModel::item_array_t::const_iterator it = items.begin();
const LLInventoryModel::item_array_t::const_iterator it_end = items.end();
@@ -1913,7 +1913,7 @@ void LLAppearanceMgr::shallowCopyCategoryContents(const LLUUID& src_id, const LL
}
}
-BOOL LLAppearanceMgr::getCanMakeFolderIntoOutfit(const LLUUID& folder_id)
+bool LLAppearanceMgr::getCanMakeFolderIntoOutfit(const LLUUID& folder_id)
{
// These are the wearable items that are required for considering this
// folder as containing a complete outfit.
@@ -1940,7 +1940,7 @@ BOOL LLAppearanceMgr::getCanMakeFolderIntoOutfit(const LLUUID& folder_id)
}
}
- // If the folder contains the required wearables, return TRUE.
+ // If the folder contains the required wearables, return true.
return ((required_wearables & folder_wearables) == required_wearables);
}
@@ -2903,7 +2903,7 @@ void LLAppearanceMgr::wearInventoryCategoryOnAvatar( LLInventoryCategory* catego
LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_outfit"));
}
- LLAppearanceMgr::changeOutfit(TRUE, category->getUUID(), append);
+ LLAppearanceMgr::changeOutfit(true, category->getUUID(), append);
}
// FIXME do we really want to search entire inventory for matching name?
@@ -4230,12 +4230,12 @@ bool LLAppearanceMgr::moveWearable(LLViewerInventoryItem* item, bool closer_to_b
// FIXME switch to use AISv3 where supported.
//items need to be updated on a dataserver
- item->setComplete(TRUE);
- item->updateServer(FALSE);
+ item->setComplete(true);
+ item->updateServer(false);
gInventory.updateItem(item);
- swap_item->setComplete(TRUE);
- swap_item->updateServer(FALSE);
+ swap_item->setComplete(true);
+ swap_item->updateServer(false);
gInventory.updateItem(swap_item);
//to cause appearance of the agent to be updated
@@ -4389,31 +4389,31 @@ void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id)
mAttachmentsChangeSignal();
}
-BOOL LLAppearanceMgr::getIsInCOF(const LLUUID& obj_id) const
+bool LLAppearanceMgr::getIsInCOF(const LLUUID& obj_id) const
{
const LLUUID& cof = getCOF();
if (obj_id == cof)
- return TRUE;
+ return true;
const LLInventoryObject* obj = gInventory.getObject(obj_id);
if (obj && obj->getParentUUID() == cof)
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
-BOOL LLAppearanceMgr::getIsProtectedCOFItem(const LLUUID& obj_id) const
+bool LLAppearanceMgr::getIsProtectedCOFItem(const LLUUID& obj_id) const
{
- if (!getIsInCOF(obj_id)) return FALSE;
+ if (!getIsInCOF(obj_id)) return false;
// If a non-link somehow ended up in COF, allow deletion.
const LLInventoryObject *obj = gInventory.getObject(obj_id);
if (obj && !obj->getIsLinkType())
{
- return FALSE;
+ return false;
}
// For now, don't allow direct deletion from the COF. Instead, force users
// to choose "Detach" or "Take Off".
- return TRUE;
+ return true;
}
class CallAfterCategoryFetchStage2: public LLInventoryFetchItemsObserver
@@ -4724,7 +4724,7 @@ public:
LLAppearanceMgr::getInstance()->wearInventoryCategory(category, true, false);
// *TODOw: This may not be necessary if initial outfit is chosen already -- josh
- gAgent.setOutfitChosen(TRUE);
+ gAgent.setOutfitChosen(true);
}
}
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index da29ceee3a..e19a805fd4 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -87,7 +87,7 @@ public:
LLPointer<LLInventoryCallback> cb);
// Return whether this folder contains minimal contents suitable for making a full outfit.
- BOOL getCanMakeFolderIntoOutfit(const LLUUID& folder_id);
+ bool getCanMakeFolderIntoOutfit(const LLUUID& folder_id);
// Determine whether a given outfit can be removed.
bool getCanRemoveOutfit(const LLUUID& outfit_cat_id);
@@ -289,9 +289,9 @@ private:
// Item-specific convenience functions
public:
// Is this in the COF?
- BOOL getIsInCOF(const LLUUID& obj_id) const;
+ bool getIsInCOF(const LLUUID& obj_id) const;
// Is this in the COF and can the user delete it from the COF?
- BOOL getIsProtectedCOFItem(const LLUUID& obj_id) const;
+ bool getIsProtectedCOFItem(const LLUUID& obj_id) const;
// Outfits will prioritize textures with such name to use for preview in gallery
static const std::string sExpectedTextureName;
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index d6a4c41497..af5b25261d 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -193,7 +193,6 @@
#include "llworld.h"
#include "llhudeffecttrail.h"
-#include "llvectorperfoptions.h"
#include "llslurl.h"
#include "llurlregistry.h"
#include "llwatchdog.h"
@@ -228,6 +227,7 @@
#include "pipeline.h"
#include "llgesturemgr.h"
#include "llsky.h"
+#include "llvlcomposition.h"
#include "llvlmanager.h"
#include "llviewercamera.h"
#include "lldrawpoolbump.h"
@@ -238,6 +238,8 @@
#include "llavatariconctrl.h"
#include "llgroupiconctrl.h"
#include "llviewerassetstats.h"
+#include "gltfscenemanager.h"
+
#include "workqueue.h"
using namespace LL;
@@ -283,12 +285,12 @@ static LLAppViewerListener sAppViewerListener(LLAppViewer::instance);
extern void init_apple_menu(const char* product);
#endif // LL_DARWIN
-extern BOOL gRandomizeFramerate;
-extern BOOL gPeriodicSlowFrame;
-extern BOOL gDebugGL;
+extern bool gRandomizeFramerate;
+extern bool gPeriodicSlowFrame;
+extern bool gDebugGL;
#if LL_DARWIN
-extern BOOL gHiDPISupport;
+extern bool gHiDPISupport;
#endif
////////////////////////////////////////////////////////////
@@ -297,8 +299,8 @@ extern BOOL gHiDPISupport;
F32 gSimLastTime; // Used in LLAppViewer::init and send_viewer_stats()
F32 gSimFrames;
-BOOL gShowObjectUpdates = FALSE;
-BOOL gUseQuickTime = TRUE;
+bool gShowObjectUpdates = false;
+bool gUseQuickTime = true;
eLastExecEvent gLastExecEvent = LAST_EXEC_NORMAL;
S32 gLastExecDuration = -1; // (<0 indicates unknown)
@@ -338,12 +340,12 @@ F32 gLogoutMaxTime = LOGOUT_REQUEST_TIME;
S32 gPendingMetricsUploads = 0;
-BOOL gDisconnected = FALSE;
+bool gDisconnected = false;
// used to restore texture state after a mode switch
LLFrameTimer gRestoreGLTimer;
-BOOL gRestoreGL = FALSE;
-bool gUseWireframe = FALSE;
+bool gRestoreGL = false;
+bool gUseWireframe = false;
LLMemoryInfo gSysMemory;
U64Bytes gMemoryAllocated(0); // updated in display_stats() in llviewerdisplay.cpp
@@ -355,15 +357,16 @@ LLVector3 gRelativeWindVec(0.0, 0.0, 0.0);
U32 gPacketsIn = 0;
-BOOL gPrintMessagesThisFrame = FALSE;
+bool gPrintMessagesThisFrame = false;
-BOOL gRandomizeFramerate = FALSE;
-BOOL gPeriodicSlowFrame = FALSE;
+bool gRandomizeFramerate = false;
+bool gPeriodicSlowFrame = false;
-BOOL gCrashOnStartup = FALSE;
-BOOL gLogoutInProgress = FALSE;
+bool gCrashOnStartup = false;
+bool gLLErrorActivated = false;
+bool gLogoutInProgress = false;
-BOOL gSimulateMemLeak = FALSE;
+bool gSimulateMemLeak = false;
// We don't want anyone, especially threads working on the graphics pipeline,
// to have to block due to this WorkQueue being full.
@@ -378,7 +381,7 @@ const std::string START_MARKER_FILE_NAME("SecondLife.start_marker");
const std::string ERROR_MARKER_FILE_NAME("SecondLife.error_marker");
const std::string LLERROR_MARKER_FILE_NAME("SecondLife.llerror_marker");
const std::string LOGOUT_MARKER_FILE_NAME("SecondLife.logout_marker");
-static BOOL gDoDisconnect = FALSE;
+static bool gDoDisconnect = false;
static std::string gLaunchFileOnQuit;
// Used on Win32 for other apps to identify our window (eg, win_setup)
@@ -491,7 +494,7 @@ bool create_text_segment_icon_from_url_match(LLUrlMatch* match,LLTextBase* base)
LLIconCtrl* icon;
if( match->getMenuName() == "menu_url_group.xml" // See LLUrlEntryGroup constructor
- || gAgent.isInGroup(match_id, TRUE)) //This check seems unfiting, urls are either /agent or /group
+ || gAgent.isInGroup(match_id, true)) //This check seems unfiting, urls are either /agent or /group
{
LLGroupIconCtrl::Params icon_params;
icon_params.group_id = match_id;
@@ -573,7 +576,7 @@ static void settings_to_globals()
static void settings_modify()
{
LLPipeline::sRenderTransparentWater = gSavedSettings.getBOOL("RenderTransparentWater");
- LLPipeline::sRenderDeferred = TRUE; // FALSE is deprecated
+ LLPipeline::sRenderDeferred = true; // false is deprecated
LLRenderTarget::sUseFBO = LLPipeline::sRenderDeferred;
LLVOSurfacePatch::sLODFactor = gSavedSettings.getF32("RenderTerrainLODFactor");
LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; //square lod factor to get exponential range of [1,4]
@@ -656,8 +659,8 @@ LLAppViewer::LLAppViewer()
mLastAgentForceUpdate(0),
mMainloopTimeout(NULL),
mAgentRegionLastAlive(false),
- mRandomizeFramerate(LLCachedControl<bool>(gSavedSettings,"Randomize Framerate", FALSE)),
- mPeriodicSlowFrame(LLCachedControl<bool>(gSavedSettings,"Periodic Slow Frame", FALSE)),
+ mRandomizeFramerate(LLCachedControl<bool>(gSavedSettings,"Randomize Framerate", false)),
+ mPeriodicSlowFrame(LLCachedControl<bool>(gSavedSettings,"Periodic Slow Frame", false)),
mFastTimerLogThread(NULL),
mSettingsLocationList(NULL),
mIsFirstRun(false)
@@ -941,7 +944,7 @@ bool LLAppViewer::init()
//
// Initialize the window
//
- gGLActive = TRUE;
+ gGLActive = true;
initWindow();
LL_INFOS("InitInfo") << "Window is initialized." << LL_ENDL ;
@@ -1127,7 +1130,7 @@ bool LLAppViewer::init()
LLNotificationsUtil::add("CorruptedProtectedDataStore");
}
- gGLActive = FALSE;
+ gGLActive = false;
#if LL_RELEASE_FOR_DOWNLOAD
// Skip updater if this is a non-interactive instance
@@ -1278,6 +1281,8 @@ bool LLAppViewer::init()
LLWorld::createInstance();
LLSelectMgr::createInstance();
LLViewerCamera::createInstance();
+ LL::GLTFSceneManager::createInstance();
+
#if LL_WINDOWS
if (!mSecondInstance)
@@ -1333,7 +1338,7 @@ bool LLAppViewer::frame()
}
catch (std::bad_alloc&)
{
- LLMemory::logMemoryInfo(TRUE);
+ LLMemory::logMemoryInfo(true);
LLFloaterMemLeak* mem_leak_instance = LLFloaterReg::findTypedInstance<LLFloaterMemLeak>("mem_leaking");
if (mem_leak_instance)
{
@@ -1508,7 +1513,7 @@ bool LLAppViewer::doFrame()
{
LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df Display");
pingMainloopTimeout("Main:Display");
- gGLActive = TRUE;
+ gGLActive = true;
display();
@@ -1519,7 +1524,7 @@ bool LLAppViewer::doFrame()
gPipeline.mReflectionMapManager.update();
LLFloaterSnapshot::update(); // take snapshots
LLFloaterSimpleSnapshot::update();
- gGLActive = FALSE;
+ gGLActive = false;
}
if (LLViewerStatsRecorder::instanceExists())
@@ -1745,7 +1750,7 @@ bool LLAppViewer::cleanup()
//flag all elements as needing to be destroyed immediately
// to ensure shutdown order
- LLMortician::setZealous(TRUE);
+ LLMortician::setZealous(true);
// Give any remaining SLPlugin instances a chance to exit cleanly.
LLPluginProcessParent::shutdown();
@@ -1954,7 +1959,7 @@ bool LLAppViewer::cleanup()
// Must do this after all panels have been deleted because panels that have persistent rects
// save their rects on delete.
- gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE);
+ gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), true);
LLUIColorTable::instance().saveUserSettings();
@@ -1973,7 +1978,7 @@ bool LLAppViewer::cleanup()
}
else
{
- gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE);
+ gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), true);
LL_INFOS() << "Saved settings" << LL_ENDL;
if (LLViewerParcelAskPlay::instanceExists())
@@ -1983,7 +1988,7 @@ bool LLAppViewer::cleanup()
}
std::string warnings_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Warnings"));
- gWarningSettings.saveToFile(warnings_settings_filename, TRUE);
+ gWarningSettings.saveToFile(warnings_settings_filename, true);
// Save URL history file
LLURLHistory::saveFile("url_history.xml");
@@ -2153,7 +2158,7 @@ bool LLAppViewer::cleanup()
ll_close_fail_log();
LLError::LLCallStacks::cleanup();
-
+ LL::GLTFSceneManager::deleteSingleton();
LLEnvironment::deleteSingleton();
LLSelectMgr::deleteSingleton();
LLViewerEventRecorder::deleteSingleton();
@@ -2352,6 +2357,7 @@ void LLAppViewer::initLoggingAndGetLastDuration()
// Set the log file to SecondLife.log
LLError::logToFile(log_file);
+ LL_INFOS() << "Started logging to " << log_file << LL_ENDL;
if (!duration_log_msg.empty())
{
LL_WARNS("MarkerFile") << duration_log_msg << LL_ENDL;
@@ -2397,7 +2403,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
&& gSavedSettings.controlExists(file.file_name_setting))
{
// try to find filename stored in file_name_setting control
- full_settings_path = gSavedSettings.getString(file.file_name_setting);
+ full_settings_path = gSavedSettings.getString(file.file_name_setting());
if (full_settings_path.empty())
{
continue;
@@ -2517,7 +2523,7 @@ bool LLAppViewer::initConfiguration()
//Load settings files list
std::string settings_file_list = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "settings_files.xml");
LLXMLNodePtr root;
- BOOL success = LLXMLNode::parseFile(settings_file_list, root, NULL);
+ bool success = LLXMLNode::parseFile(settings_file_list, root, NULL);
if (!success)
{
LL_WARNS() << "Cannot load default configuration file " << settings_file_list << LL_ENDL;
@@ -2584,7 +2590,7 @@ bool LLAppViewer::initConfiguration()
c->setValue(true, false);
}
- gSavedSettings.setBOOL("QAMode", TRUE );
+ gSavedSettings.setBOOL("QAMode", true );
gSavedSettings.setS32("WatchdogEnabled", 0);
#endif
@@ -2646,7 +2652,7 @@ bool LLAppViewer::initConfiguration()
// like determining screen DPI value and so on
mIsFirstRun = true;
- gSavedSettings.setBOOL("FirstRunThisInstall", FALSE);
+ gSavedSettings.setBOOL("FirstRunThisInstall", false);
}
if (clp.hasOption("sessionsettings"))
@@ -2750,7 +2756,7 @@ bool LLAppViewer::initConfiguration()
std::string test_name(gSavedSettings.getString("LogMetrics"));
if (! test_name.empty())
{
- LLTrace::BlockTimer::sMetricLog = TRUE;
+ LLTrace::BlockTimer::sMetricLog = true;
// '--logmetrics' is specified with a named test metric argument so the data gathering is done only on that test
// In the absence of argument, every metric would be gathered (makes for a rather slow run and hard to decipher report...)
LL_INFOS() << "'--logmetrics' argument : " << test_name << LL_ENDL;
@@ -2774,19 +2780,19 @@ bool LLAppViewer::initConfiguration()
if (gSavedSettings.getBOOL("DebugSession"))
{
- gDebugSession = TRUE;
- gDebugGL = TRUE;
+ gDebugSession = true;
+ gDebugGL = true;
ll_init_fail_log(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "test_failures.log"));
}
if (gSavedSettings.getBOOL("RenderDebugGLSession"))
{
- gDebugGLSession = TRUE;
- gDebugGL = TRUE;
+ gDebugGLSession = true;
+ gDebugGL = true;
// gDebugGL can cause excessive logging
// so it's limited to a single session
- gSavedSettings.setBOOL("RenderDebugGLSession", FALSE);
+ gSavedSettings.setBOOL("RenderDebugGLSession", false);
}
const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent");
@@ -2814,10 +2820,10 @@ bool LLAppViewer::initConfiguration()
if (gNonInteractive)
{
- tempSetControl("AllowMultipleViewers", "TRUE");
- tempSetControl("SLURLPassToOtherInstance", "FALSE");
- tempSetControl("RenderWater", "FALSE");
- tempSetControl("FlyingAtExit", "FALSE");
+ tempSetControl("AllowMultipleViewers", "true");
+ tempSetControl("SLURLPassToOtherInstance", "false");
+ tempSetControl("RenderWater", "false");
+ tempSetControl("FlyingAtExit", "false");
tempSetControl("WindowWidth", "1024");
tempSetControl("WindowHeight", "200");
LLError::setEnabledLogTypesMask(0);
@@ -2963,8 +2969,8 @@ bool LLAppViewer::initConfiguration()
LLControlVariable* enable_voice = gSavedSettings.getControl("EnableVoiceChat");
if(enable_voice)
{
- const BOOL DO_NOT_PERSIST = FALSE;
- enable_voice->setValue(LLSD(FALSE), DO_NOT_PERSIST);
+ const bool DO_NOT_PERSIST = false;
+ enable_voice->setValue(LLSD(false), DO_NOT_PERSIST);
}
}
@@ -2994,7 +3000,7 @@ void LLAppViewer::initStrings()
{
std::string strings_file = "strings.xml";
std::string strings_path_full = gDirUtilp->findSkinnedFilenameBaseLang(LLDir::XUI, strings_file);
- if (strings_path_full.empty() || !LLFile::isfile(strings_path_full))
+ if (strings_path_full.empty() || !gDirUtilp->fileExists(strings_path_full))
{
if (strings_path_full.empty())
{
@@ -3080,7 +3086,7 @@ bool LLAppViewer::initWindow()
gHeadlessClient = gSavedSettings.getBOOL("HeadlessClient");
// always start windowed
- BOOL ignorePixelDepth = gSavedSettings.getBOOL("IgnorePixelDepth");
+ bool ignorePixelDepth = gSavedSettings.getBOOL("IgnorePixelDepth");
LLViewerWindow::Params window_params;
window_params
@@ -3153,8 +3159,8 @@ bool LLAppViewer::initWindow()
}
// Set this flag in case we crash while initializing GL
- gSavedSettings.setBOOL("RenderInitError", TRUE);
- gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE );
+ gSavedSettings.setBOOL("RenderInitError", true);
+ gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), true );
gPipeline.init();
LL_INFOS("AppInit") << "gPipeline Initialized" << LL_ENDL;
@@ -3162,8 +3168,8 @@ bool LLAppViewer::initWindow()
stop_glerror();
gViewerWindow->initGLDefaults();
- gSavedSettings.setBOOL("RenderInitError", FALSE);
- gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE );
+ gSavedSettings.setBOOL("RenderInitError", false);
+ gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), true );
//If we have a startup crash, it's usually near GL initialization, so simulate that.
if(gCrashOnStartup)
@@ -3178,7 +3184,7 @@ bool LLAppViewer::initWindow()
if (gSavedSettings.getBOOL("FirstLoginThisInstall") && meetsRequirementsForMaximizedStart())
{
LL_INFOS("AppInit") << "This client met the requirements for a maximized initial screen." << LL_ENDL;
- gSavedSettings.setBOOL("WindowMaximized", TRUE);
+ gSavedSettings.setBOOL("WindowMaximized", true);
}
if (gSavedSettings.getBOOL("WindowMaximized"))
@@ -3532,9 +3538,9 @@ std::string LLAppViewer::getViewerInfoString(bool default_string) const
void LLAppViewer::cleanupSavedSettings()
{
- gSavedSettings.setBOOL("MouseSun", FALSE);
+ gSavedSettings.setBOOL("MouseSun", false);
- gSavedSettings.setBOOL("UseEnergy", TRUE); // force toggle to turn off, since sends message to simulator
+ gSavedSettings.setBOOL("UseEnergy", true); // force toggle to turn off, since sends message to simulator
gSavedSettings.setBOOL("DebugWindowProc", gDebugWindowProc);
@@ -3549,7 +3555,7 @@ void LLAppViewer::cleanupSavedSettings()
// as we don't track it in callbacks
if(NULL != gViewerWindow)
{
- BOOL maximized = gViewerWindow->getWindow()->getMaximized();
+ bool maximized = gViewerWindow->getWindow()->getMaximized();
if (!maximized)
{
LLCoordScreen window_pos;
@@ -3826,7 +3832,7 @@ void LLAppViewer::processMarkerFiles()
initLoggingAndGetLastDuration();
// Create the marker file for this execution & lock it; it will be deleted on a clean exit
apr_status_t s;
- s = mMarkerFile.open(mMarkerFileName, LL_APR_WB, TRUE);
+ s = mMarkerFile.open(mMarkerFileName, LL_APR_WB, true);
if (s == APR_SUCCESS && mMarkerFile.getFileHandle())
{
@@ -4014,7 +4020,7 @@ void LLAppViewer::requestQuit()
gAgentAvatarp->updateAvatarRezMetrics(true); // force a last packet to be sent.
}
- LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral*)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, TRUE);
+ LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral*)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, true);
effectp->setPositionGlobal(gAgent.getPositionGlobal());
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
LLHUDManager::getInstance()->sendEffects();
@@ -4073,7 +4079,7 @@ static bool finish_early_exit(const LLSD& notification, const LLSD& response)
void LLAppViewer::earlyExit(const std::string& name, const LLSD& substitutions)
{
LL_WARNS() << "app_early_exit: " << name << LL_ENDL;
- gDoDisconnect = TRUE;
+ gDoDisconnect = true;
LLNotificationsUtil::add(name, substitutions, LLSD(), finish_early_exit);
}
@@ -4081,7 +4087,7 @@ void LLAppViewer::earlyExit(const std::string& name, const LLSD& substitutions)
void LLAppViewer::earlyExitNoNotify()
{
LL_WARNS() << "app_early_exit with no notification: " << LL_ENDL;
- gDoDisconnect = TRUE;
+ gDoDisconnect = true;
finish_early_exit( LLSD(), LLSD() );
}
@@ -4112,7 +4118,7 @@ void LLAppViewer::migrateCacheDirectory()
// Only do this once per fresh install of this version.
if (gSavedSettings.getBOOL("MigrateCacheDirectory"))
{
- gSavedSettings.setBOOL("MigrateCacheDirectory", FALSE);
+ gSavedSettings.setBOOL("MigrateCacheDirectory", false);
std::string old_cache_dir = gDirUtilp->add(gDirUtilp->getOSUserAppDir(), "cache");
std::string new_cache_dir = gDirUtilp->getCacheDir(true);
@@ -4195,7 +4201,7 @@ U32 LLAppViewer::getObjectCacheVersion()
bool LLAppViewer::initCache()
{
mPurgeCache = false;
- BOOL read_only = mSecondInstance ? TRUE : FALSE;
+ bool read_only = mSecondInstance ? true : false;
LLAppViewer::getTextureCache()->setReadOnly(read_only) ;
LLVOCache::initParamSingleton(read_only);
@@ -4403,7 +4409,7 @@ void LLAppViewer::forceDisconnect(const std::string& mesg)
}
LLSD args;
- gDoDisconnect = TRUE;
+ gDoDisconnect = true;
if (LLStartUp::getStartupState() < STATE_STARTED)
{
@@ -4426,7 +4432,7 @@ void LLAppViewer::badNetworkHandler()
// Flush all of our caches on exit in the case of disconnect due to
// invalid packets.
- mPurgeCacheOnExit = TRUE;
+ mPurgeCacheOnExit = true;
std::ostringstream message;
message <<
@@ -4454,8 +4460,8 @@ void LLAppViewer::saveFinalSnapshot()
gSavedSettings.setVector3d("FocusPosOnLogout", gAgentCamera.calcFocusPositionTargetGlobal());
gSavedSettings.setVector3d("CameraPosOnLogout", gAgentCamera.calcCameraPositionTargetGlobal());
gViewerWindow->setCursor(UI_CURSOR_WAIT);
- gAgentCamera.changeCameraToThirdPerson( FALSE ); // don't animate, need immediate switch
- gSavedSettings.setBOOL("ShowParcelOwners", FALSE);
+ gAgentCamera.changeCameraToThirdPerson( false ); // don't animate, need immediate switch
+ gSavedSettings.setBOOL("ShowParcelOwners", false);
idle();
std::string snap_filename = gDirUtilp->getLindenUserDir();
@@ -4465,12 +4471,12 @@ void LLAppViewer::saveFinalSnapshot()
gViewerWindow->saveSnapshot(snap_filename,
gViewerWindow->getWindowWidthRaw(),
gViewerWindow->getWindowHeightRaw(),
- FALSE,
+ false,
gSavedSettings.getBOOL("RenderHUDInSnapshot"),
- TRUE,
+ true,
LLSnapshotModel::SNAPSHOT_TYPE_COLOR,
LLSnapshotModel::SNAPSHOT_FORMAT_PNG);
- mSavedFinalSnapshot = TRUE;
+ mSavedFinalSnapshot = true;
if (gAgent.isInHomeRegion())
{
@@ -4658,13 +4664,13 @@ void LLAppViewer::idle()
if (LLStartUp::getStartupState() < STATE_STARTED)
{
// Skip rest if idle startup returns false (essentially, no world yet)
- gGLActive = TRUE;
+ gGLActive = true;
if (!idle_startup())
{
- gGLActive = FALSE;
+ gGLActive = false;
return;
}
- gGLActive = FALSE;
+ gGLActive = false;
}
@@ -4700,7 +4706,7 @@ void LLAppViewer::idle()
F32 agent_update_time = agent_update_timer.getElapsedTimeF32();
F32 agent_force_update_time = mLastAgentForceUpdate + agent_update_time;
bool timed_out = agent_update_time > (1.0f / (F32)AGENT_UPDATES_PER_SECOND);
- BOOL force_send =
+ bool force_send =
// if there is something to send
(gAgent.controlFlagsDirty() && timed_out)
// if something changed
@@ -4858,6 +4864,7 @@ void LLAppViewer::idle()
if (!(logoutRequestSent() && hasSavedFinalSnapshot()))
{
gObjectList.update(gAgent);
+ LL::GLTFSceneManager::instance().update();
}
}
@@ -5012,7 +5019,7 @@ void LLAppViewer::idle()
// forcibly quit if it has taken too long
if (mQuitRequested)
{
- gGLActive = TRUE;
+ gGLActive = true;
idleShutdown();
}
}
@@ -5070,7 +5077,7 @@ void LLAppViewer::idleShutdown()
static S32 total_uploads = 0;
// Sometimes total upload count can change during logout.
total_uploads = llmax(total_uploads, pending_uploads);
- gViewerWindow->setShowProgress(TRUE);
+ gViewerWindow->setShowProgress(true);
S32 finished_uploads = total_uploads - pending_uploads;
F32 percent = 100.f * finished_uploads / total_uploads;
gViewerWindow->setProgressPercent(percent);
@@ -5082,7 +5089,7 @@ void LLAppViewer::idleShutdown()
&& gLogoutTimer.getElapsedTimeF32() < SHUTDOWN_UPLOAD_SAVE_TIME
&& !logoutRequestSent())
{
- gViewerWindow->setShowProgress(TRUE);
+ gViewerWindow->setShowProgress(true);
gViewerWindow->setProgressPercent(100.f);
gViewerWindow->setProgressString(LLTrans::getString("LoggingOut"));
return;
@@ -5094,7 +5101,7 @@ void LLAppViewer::idleShutdown()
sendLogoutRequest();
// Wait for a LogoutReply message
- gViewerWindow->setShowProgress(TRUE);
+ gViewerWindow->setShowProgress(true);
gViewerWindow->setProgressPercent(100.f);
gViewerWindow->setProgressString(LLTrans::getString("LoggingOut"));
return;
@@ -5114,7 +5121,7 @@ void LLAppViewer::sendLogoutRequest()
if(!mLogoutRequestSent && gMessageSystem)
{
//Set internal status variables and marker files before actually starting the logout process
- gLogoutInProgress = TRUE;
+ gLogoutInProgress = true;
if (!mSecondInstance)
{
mLogoutMarkerFileName = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,LOGOUT_MARKER_FILE_NAME);
@@ -5144,7 +5151,7 @@ void LLAppViewer::sendLogoutRequest()
gLogoutTimer.reset();
gLogoutMaxTime = LOGOUT_REQUEST_TIME;
- mLogoutRequestSent = TRUE;
+ mLogoutRequestSent = true;
if(LLVoiceClient::instanceExists())
{
@@ -5194,6 +5201,11 @@ void LLAppViewer::updateNameLookupUrl(const LLViewerRegion * regionp)
}
}
+void LLAppViewer::postToMainCoro(const LL::WorkQueue::Work& work)
+{
+ gMainloopWork.post(work);
+}
+
void LLAppViewer::idleNameCache()
{
// Neither old nor new name cache can function before agent has a region
@@ -5316,7 +5328,7 @@ void LLAppViewer::idleNetwork()
if (gPrintMessagesThisFrame)
{
LL_INFOS() << "Decoded " << total_decoded << " msgs this frame!" << LL_ENDL;
- gPrintMessagesThisFrame = FALSE;
+ gPrintMessagesThisFrame = false;
}
}
add(LLStatViewer::NUM_NEW_OBJECTS, gObjectList.mNumNewObjects);
@@ -5415,7 +5427,7 @@ void LLAppViewer::disconnectViewer()
LLDestroyClassList::instance().fireCallbacks();
cleanup_xfer_manager();
- gDisconnected = TRUE;
+ gDisconnected = true;
// Pass the connection state to LLUrlEntryParcel not to attempt
// parcel info requests while disconnected.
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 9352dba06d..168d459c02 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -226,6 +226,9 @@ public:
void updateNameLookupUrl(const LLViewerRegion* regionp);
+ // post given work to the "mainloop" work queue for handling on the main thread
+ void postToMainCoro(const LL::WorkQueue::Work& work);
+
protected:
virtual bool initWindow(); // Initialize the viewer's window.
virtual void initLoggingAndGetLastDuration(); // Initialize log files, logging system
@@ -343,7 +346,7 @@ const S32 AGENT_FORCE_UPDATES_PER_SECOND = 1;
// "// llstartup" indicates that llstartup is the only client for this global.
extern LLSD gDebugInfo;
-extern BOOL gShowObjectUpdates;
+extern bool gShowObjectUpdates;
typedef enum
{
@@ -384,10 +387,10 @@ extern S32 gPendingMetricsUploads;
extern F32 gSimLastTime;
extern F32 gSimFrames;
-extern BOOL gDisconnected;
+extern bool gDisconnected;
extern LLFrameTimer gRestoreGLTimer;
-extern BOOL gRestoreGL;
+extern bool gRestoreGL;
extern bool gUseWireframe;
extern LLMemoryInfo gSysMemory;
@@ -398,13 +401,13 @@ extern std::string gLastVersionChannel;
extern LLVector3 gWindVec;
extern LLVector3 gRelativeWindVec;
extern U32 gPacketsIn;
-extern BOOL gPrintMessagesThisFrame;
+extern bool gPrintMessagesThisFrame;
extern LLUUID gBlackSquareID;
-extern BOOL gRandomizeFramerate;
-extern BOOL gPeriodicSlowFrame;
+extern bool gRandomizeFramerate;
+extern bool gPeriodicSlowFrame;
-extern BOOL gSimulateMemLeak;
+extern bool gSimulateMemLeak;
#endif // LL_LLAPPVIEWER_H
diff --git a/indra/newview/llappviewerlinux_api_dbus.cpp b/indra/newview/llappviewerlinux_api_dbus.cpp
index 6ac30bd9b8..63466dd81c 100644
--- a/indra/newview/llappviewerlinux_api_dbus.cpp
+++ b/indra/newview/llappviewerlinux_api_dbus.cpp
@@ -52,7 +52,7 @@ bool grab_dbus_syms(std::string dbus_dso_name)
if (sSymsGrabbed)
{
// already have grabbed good syms
- return TRUE;
+ return true;
}
bool sym_error = false;
diff --git a/indra/newview/llappviewermacosx-objc.mm b/indra/newview/llappviewermacosx-objc.mm
index 5d9ca24db2..9b6bfe621b 100644
--- a/indra/newview/llappviewermacosx-objc.mm
+++ b/indra/newview/llappviewermacosx-objc.mm
@@ -25,7 +25,7 @@
*/
#if !defined LL_DARWIN
- #error "Use only with Mac OS X"
+ #error "Use only with macOS"
#endif
#import <Cocoa/Cocoa.h>
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index c42c3b3daf..f36ccedd45 100644
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -27,7 +27,7 @@
#include "llviewerprecompiledheaders.h"
#if !defined LL_DARWIN
- #error "Use only with Mac OS X"
+ #error "Use only with macOS"
#endif
#define LL_CARBON_CRASH_HANDLER 1
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 41101e79a6..dcd48ebd33 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -75,7 +75,7 @@
// Bugsplat (http://bugsplat.com) crash reporting tool
#ifdef LL_BUGSPLAT
#include "BugSplat.h"
-#include "json/reader.h" // JsonCpp
+#include "boost/json.hpp" // Boost.Json
#include "llagent.h" // for agent location
#include "llviewerregion.h"
#include "llvoavatarself.h" // for agent name
@@ -529,7 +529,7 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
}
#endif
- gGLActive = TRUE;
+ gGLActive = true;
viewer_app_ptr->cleanup();
@@ -722,24 +722,25 @@ bool LLAppViewerWin32::init()
}
else
{
- Json::Reader reader;
- Json::Value build_data;
- if (!reader.parse(inf, build_data, false)) // don't collect comments
+ boost::json::error_code ec;
+ boost::json::value build_data = boost::json::parse(inf, ec);
+ if(ec.failed())
{
// gah, the typo is baked into Json::Reader API
LL_WARNS("BUGSPLAT") << "Can't initialize BugSplat, can't parse '" << build_data_fname
- << "': " << reader.getFormatedErrorMessages() << LL_ENDL;
+ << "': " << ec.what() << LL_ENDL;
}
else
{
- Json::Value BugSplat_DB = build_data["BugSplat DB"];
- if (!BugSplat_DB)
+ if (!build_data.is_object() || !build_data.as_object().contains("BugSplat DB"))
{
LL_WARNS("BUGSPLAT") << "Can't initialize BugSplat, no 'BugSplat DB' entry in '"
<< build_data_fname << "'" << LL_ENDL;
}
else
{
+ boost::json::value BugSplat_DB = build_data.at("BugSplat DB");
+
// Got BugSplat_DB, onward!
std::wstring version_string(WSTRINGIZE(LL_VIEWER_VERSION_MAJOR << '.' <<
LL_VIEWER_VERSION_MINOR << '.' <<
@@ -761,7 +762,7 @@ bool LLAppViewerWin32::init()
// have to convert normal wide strings to strings of __wchar_t
sBugSplatSender = new MiniDmpSender(
- WCSTR(BugSplat_DB.asString()),
+ WCSTR(boost::json::value_to<std::string>(BugSplat_DB)),
WCSTR(LL_TO_WSTRING(LL_VIEWER_CHANNEL)),
WCSTR(version_string),
nullptr, // szAppIdentifier -- set later
@@ -847,17 +848,17 @@ bool LLAppViewerWin32::initHardwareTest()
// Do driver verification and initialization based on DirectX
// hardware polling and driver versions
//
- if (TRUE == gSavedSettings.getBOOL("ProbeHardwareOnStartup") && FALSE == gSavedSettings.getBOOL("NoHardwareProbe"))
+ if (true == gSavedSettings.getBOOL("ProbeHardwareOnStartup") && false == gSavedSettings.getBOOL("NoHardwareProbe"))
{
// per DEV-11631 - disable hardware probing for everything
// but vram.
- BOOL vram_only = TRUE;
+ bool vram_only = true;
LLSplashScreen::update(LLTrans::getString("StartupDetectingHardware"));
LL_DEBUGS("AppInit") << "Attempting to poll DirectX for hardware info" << LL_ENDL;
gDXHardware.setWriteDebugFunc(write_debug_dx);
- BOOL probe_ok = gDXHardware.getInfo(vram_only);
+ bool probe_ok = gDXHardware.getInfo(vram_only);
if (!probe_ok
&& gWarningSettings.getBOOL("AboutDirectX9"))
@@ -878,12 +879,12 @@ bool LLAppViewerWin32::initHardwareTest()
LLWeb::loadURLExternal("http://secondlife.com/support/", false);
return false;
}
- gWarningSettings.setBOOL("AboutDirectX9", FALSE);
+ gWarningSettings.setBOOL("AboutDirectX9", false);
}
LL_DEBUGS("AppInit") << "Done polling DirectX for hardware info" << LL_ENDL;
// Only probe once after installation
- gSavedSettings.setBOOL("ProbeHardwareOnStartup", FALSE);
+ gSavedSettings.setBOOL("ProbeHardwareOnStartup", false);
// Disable so debugger can work
std::string splash_msg;
diff --git a/indra/newview/llattachmentsmgr.cpp b/indra/newview/llattachmentsmgr.cpp
index d3fce306bc..4cfae2f1b7 100644
--- a/indra/newview/llattachmentsmgr.cpp
+++ b/indra/newview/llattachmentsmgr.cpp
@@ -55,7 +55,7 @@ LLAttachmentsMgr::~LLAttachmentsMgr()
void LLAttachmentsMgr::addAttachmentRequest(const LLUUID& item_id,
const U8 attachment_pt,
- const BOOL add)
+ const bool add)
{
LLViewerInventoryItem *item = gInventory.getItem(item_id);
@@ -304,18 +304,18 @@ void LLAttachmentsMgr::LLItemRequestTimes::removeTime(const LLUUID& inv_item_id)
}
}
-BOOL LLAttachmentsMgr::LLItemRequestTimes::getTime(const LLUUID& inv_item_id, LLTimer& timer) const
+bool LLAttachmentsMgr::LLItemRequestTimes::getTime(const LLUUID& inv_item_id, LLTimer& timer) const
{
std::map<LLUUID,LLTimer>::const_iterator it = (*this).find(inv_item_id);
if (it != (*this).end())
{
timer = it->second;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-BOOL LLAttachmentsMgr::LLItemRequestTimes::wasRequestedRecently(const LLUUID& inv_item_id) const
+bool LLAttachmentsMgr::LLItemRequestTimes::wasRequestedRecently(const LLUUID& inv_item_id) const
{
LLTimer request_time;
if (getTime(inv_item_id, request_time))
@@ -325,7 +325,7 @@ BOOL LLAttachmentsMgr::LLItemRequestTimes::wasRequestedRecently(const LLUUID& in
}
else
{
- return FALSE;
+ return false;
}
}
diff --git a/indra/newview/llattachmentsmgr.h b/indra/newview/llattachmentsmgr.h
index 90aeff3032..c6b9f4e215 100644
--- a/indra/newview/llattachmentsmgr.h
+++ b/indra/newview/llattachmentsmgr.h
@@ -69,13 +69,13 @@ public:
{
LLUUID mItemID;
U8 mAttachmentPt;
- BOOL mAdd;
+ bool mAdd;
};
typedef std::deque<AttachmentsInfo> attachments_vec_t;
void addAttachmentRequest(const LLUUID& item_id,
const U8 attachment_pt,
- const BOOL add);
+ const bool add);
void onAttachmentRequested(const LLUUID& item_id);
void requestAttachments(attachments_vec_t& attachment_requests);
static void onIdle(void *);
@@ -95,8 +95,8 @@ private:
LLItemRequestTimes(const std::string& op_name, F32 timeout);
void addTime(const LLUUID& inv_item_id);
void removeTime(const LLUUID& inv_item_id);
- BOOL wasRequestedRecently(const LLUUID& item_id) const;
- BOOL getTime(const LLUUID& inv_item_id, LLTimer& timer) const;
+ bool wasRequestedRecently(const LLUUID& item_id) const;
+ bool getTime(const LLUUID& inv_item_id, LLTimer& timer) const;
private:
F32 mTimeout;
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 313339f131..1c2652c6ea 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -528,7 +528,7 @@ void LLAvatarActions::teleport_request_callback(const LLSD& notification, const
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_MessageBlock);
- msg->addBOOLFast(_PREHASH_FromGroup, FALSE);
+ msg->addBOOLFast(_PREHASH_FromGroup, false);
msg->addUUIDFast(_PREHASH_ToAgentID, notification["substitutions"]["uuid"] );
msg->addU8Fast(_PREHASH_Offline, IM_ONLINE);
msg->addU8Fast(_PREHASH_Dialog, IM_TELEPORT_REQUEST);
@@ -717,7 +717,7 @@ namespace action_give_inventory
*/
static LLInventoryPanel* get_active_inventory_panel()
{
- LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
+ LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(false);
LLFloater* floater_appearance = LLFloaterReg::findInstance("appearance");
if (!active_panel || (floater_appearance && floater_appearance->hasFocus()))
{
@@ -1056,7 +1056,7 @@ void LLAvatarActions::shareWithAvatars(LLView * panel)
LLFloater* root_floater = gFloaterView->getParentFloater(panel);
LLInventoryPanel* inv_panel = dynamic_cast<LLInventoryPanel*>(panel);
LLFloaterAvatarPicker* picker =
- LLFloaterAvatarPicker::show(boost::bind(give_inventory, _1, _2, inv_panel), TRUE, FALSE, FALSE, root_floater->getName());
+ LLFloaterAvatarPicker::show(boost::bind(give_inventory, _1, _2, inv_panel), true, false, false, root_floater->getName());
if (!picker)
{
return;
@@ -1078,7 +1078,7 @@ void LLAvatarActions::shareWithAvatars(const uuid_set_t inventory_selected_uuids
using namespace action_give_inventory;
LLFloaterAvatarPicker* picker =
- LLFloaterAvatarPicker::show(boost::bind(give_inventory_ids, _1, _2, inventory_selected_uuids), TRUE, FALSE, FALSE, root_floater->getName());
+ LLFloaterAvatarPicker::show(boost::bind(give_inventory_ids, _1, _2, inventory_selected_uuids), true, false, false, root_floater->getName());
if (!picker)
{
return;
@@ -1289,7 +1289,7 @@ bool LLAvatarActions::handleRemove(const LLSD& notification, const LLSD& respons
case 0: // YES
if( ip->isRightGrantedTo(LLRelationship::GRANT_MODIFY_OBJECTS))
{
- LLAvatarTracker::instance().empower(id, FALSE);
+ LLAvatarTracker::instance().empower(id, false);
LLAvatarTracker::instance().notifyObservers();
}
LLAvatarTracker::instance().terminateBuddy(id);
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index c0990d9d11..1550872d81 100644
--- a/indra/newview/llavatarlist.cpp
+++ b/indra/newview/llavatarlist.cpp
@@ -246,7 +246,7 @@ void LLAvatarList::setDirty(bool val /*= true*/, bool force_refresh /*= false*/)
//////////////////////////////////////////////////////////////////////////
void LLAvatarList::refresh()
{
- bool have_names = TRUE;
+ bool have_names = true;
bool add_limit_exceeded = false;
bool modified = false;
bool have_filter = !mNameFilter.empty();
@@ -415,7 +415,7 @@ S32 LLAvatarList::notifyParent(const LLSD& info)
return LLFlatListViewEx::notifyParent(info);
}
-void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos)
+void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, bool is_online, EAddPosition pos)
{
LLAvatarListItem* item = new LLAvatarListItem();
item->setShowCompleteName(mShowCompleteName);
@@ -437,9 +437,9 @@ void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is
}
// virtual
-BOOL LLAvatarList::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLAvatarList::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
- BOOL handled = LLUICtrl::handleRightMouseDown(x, y, mask);
+ bool handled = LLUICtrl::handleRightMouseDown(x, y, mask);
if ( mContextMenu)
{
uuid_vec_t selected_uuids;
@@ -449,7 +449,7 @@ BOOL LLAvatarList::handleRightMouseDown(S32 x, S32 y, MASK mask)
return handled;
}
-BOOL LLAvatarList::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLAvatarList::handleMouseDown(S32 x, S32 y, MASK mask)
{
gFocusMgr.setMouseCapture(this);
@@ -461,7 +461,7 @@ BOOL LLAvatarList::handleMouseDown(S32 x, S32 y, MASK mask)
return LLFlatListViewEx::handleMouseDown(x, y, mask);
}
-BOOL LLAvatarList::handleMouseUp( S32 x, S32 y, MASK mask )
+bool LLAvatarList::handleMouseUp( S32 x, S32 y, MASK mask )
{
if(hasMouseCapture())
{
@@ -471,7 +471,7 @@ BOOL LLAvatarList::handleMouseUp( S32 x, S32 y, MASK mask )
return LLFlatListViewEx::handleMouseUp(x, y, mask);
}
-BOOL LLAvatarList::handleHover(S32 x, S32 y, MASK mask)
+bool LLAvatarList::handleHover(S32 x, S32 y, MASK mask)
{
bool handled = hasMouseCapture();
if(handled)
@@ -500,9 +500,9 @@ BOOL LLAvatarList::handleHover(S32 x, S32 y, MASK mask)
return handled;
}
-void LLAvatarList::setVisible(BOOL visible)
+void LLAvatarList::setVisible(bool visible)
{
- if ( visible == FALSE && mContextMenu )
+ if ( visible == false && mContextMenu )
{
mContextMenu->hide();
}
diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h
index 48b0e70454..da622e9ed7 100644
--- a/indra/newview/llavatarlist.h
+++ b/indra/newview/llavatarlist.h
@@ -65,7 +65,7 @@ public:
virtual void clear();
- virtual void setVisible(BOOL visible);
+ virtual void setVisible(bool visible);
void setNameFilter(const std::string& filter);
void setDirty(bool val = true, bool force_refresh = false);
@@ -84,10 +84,10 @@ public:
bool getIconsVisible() const { return mShowIcons; }
const std::string getIconParamName() const{return mIconParamName;}
std::string getAvatarName(LLAvatarName av_name);
- virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask );
- /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
+ virtual bool handleRightMouseDown(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleMouseDown( S32 x, S32 y, MASK mask );
+ /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask);
// Return true if filter has at least one match.
bool filterHasMatches();
@@ -105,7 +105,7 @@ public:
protected:
void refresh();
- void addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos = ADD_BOTTOM);
+ void addNewItem(const LLUUID& id, const std::string& name, bool is_online, EAddPosition pos = ADD_BOTTOM);
void computeDifference(
const uuid_vec_t& vnew,
uuid_vec_t& vadded,
diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp
index 396b69ae3a..908df70632 100644
--- a/indra/newview/llavatarlistitem.cpp
+++ b/indra/newview/llavatarlistitem.cpp
@@ -103,7 +103,7 @@ LLAvatarListItem::~LLAvatarListItem()
}
}
-BOOL LLAvatarListItem::postBuild()
+bool LLAvatarListItem::postBuild()
{
mAvatarIcon = getChild<LLAvatarIconCtrl>("avatar_icon");
mAvatarName = getChild<LLTextBox>("avatar_name");
@@ -141,10 +141,10 @@ BOOL LLAvatarListItem::postBuild()
sStaticInitialized = true;
}
- return TRUE;
+ return true;
}
-void LLAvatarListItem::handleVisibilityChange ( BOOL new_visibility )
+void LLAvatarListItem::handleVisibilityChange ( bool new_visibility )
{
//Adjust positions of icons (info button etc) when
//speaking indicator visibility was changed/toggled while panel was closed (not visible)
@@ -325,7 +325,7 @@ void LLAvatarListItem::setShowProfileBtn(bool show)
void LLAvatarListItem::showSpeakingIndicator(bool visible)
{
// Already done? Then do nothing.
- if (mSpeakingIndicator->getVisible() == (BOOL)visible)
+ if (mSpeakingIndicator->getVisible() == (bool)visible)
return;
// Disabled to not contradict with SpeakingIndicatorManager functionality. EXT-3976
// probably this method should be totally removed.
@@ -336,7 +336,7 @@ void LLAvatarListItem::showSpeakingIndicator(bool visible)
void LLAvatarListItem::setAvatarIconVisible(bool visible)
{
// Already done? Then do nothing.
- if (mAvatarIcon->getVisible() == (BOOL)visible)
+ if (mAvatarIcon->getVisible() == (bool)visible)
{
return;
}
@@ -356,17 +356,17 @@ void LLAvatarListItem::onProfileBtnClick()
LLAvatarActions::showProfile(mAvatarId);
}
-BOOL LLAvatarListItem::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLAvatarListItem::handleDoubleClick(S32 x, S32 y, MASK mask)
{
if(mInfoBtn->getRect().pointInRect(x, y))
{
onInfoBtnClick();
- return TRUE;
+ return true;
}
if(mProfileBtn->getRect().pointInRect(x, y))
{
onProfileBtnClick();
- return TRUE;
+ return true;
}
return LLPanel::handleDoubleClick(x, y, mask);
}
diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h
index b95cd68526..222b4089c3 100644
--- a/indra/newview/llavatarlistitem.h
+++ b/indra/newview/llavatarlistitem.h
@@ -79,12 +79,12 @@ public:
LLAvatarListItem(bool not_from_ui_factory = true);
virtual ~LLAvatarListItem();
- virtual BOOL postBuild();
+ virtual bool postBuild();
/**
* Processes notification from speaker indicator to update children when indicator's visibility is changed.
*/
- virtual void handleVisibilityChange ( BOOL new_visibility );
+ virtual void handleVisibilityChange ( bool new_visibility );
virtual S32 notifyParent(const LLSD& info);
virtual void onMouseLeave(S32 x, S32 y, MASK mask);
virtual void onMouseEnter(S32 x, S32 y, MASK mask);
@@ -115,7 +115,7 @@ public:
void onInfoBtnClick();
void onProfileBtnClick();
- /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleDoubleClick(S32 x, S32 y, MASK mask);
protected:
/**
diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp
index dd0d06a8c8..f6a4ff784a 100644
--- a/indra/newview/llavatarpropertiesprocessor.cpp
+++ b/indra/newview/llavatarpropertiesprocessor.cpp
@@ -223,7 +223,7 @@ void LLAvatarPropertiesProcessor::sendAvatarPropertiesUpdate(const LLAvatarData*
// This value is required by sendAvatarPropertiesUpdate method.
//A profile should never be mature. (From the original code)
- BOOL mature = FALSE;
+ bool mature = false;
LLMessageSystem *msg = gMessageSystem;
@@ -277,10 +277,10 @@ std::string LLAvatarPropertiesProcessor::paymentInfo(const LLAvatarData* avatar_
const S32 LINDEN_EMPLOYEE_INDEX = 3;
if (avatar_data->caption_index == LINDEN_EMPLOYEE_INDEX) return "";
- BOOL transacted = (avatar_data->flags & AVATAR_TRANSACTED);
- BOOL identified = (avatar_data->flags & AVATAR_IDENTIFIED);
+ bool transacted = (avatar_data->flags & AVATAR_TRANSACTED);
+ bool identified = (avatar_data->flags & AVATAR_IDENTIFIED);
// Not currently getting set in dataserver/lldataavatar.cpp for privacy considerations
- //BOOL age_verified = (avatar_data->flags & AVATAR_AGEVERIFIED);
+ //bool age_verified = (avatar_data->flags & AVATAR_AGEVERIFIED);
const char* payment_text;
if(transacted)
@@ -757,7 +757,7 @@ void LLAvatarPropertiesProcessor::sendPickInfoUpdate(const LLPickData* new_pick)
msg->addUUID(_PREHASH_CreatorID, new_pick->creator_id);
//legacy var need to be deleted
- msg->addBOOL(_PREHASH_TopPick, FALSE);
+ msg->addBOOL(_PREHASH_TopPick, false);
// fills in on simulator if null
msg->addUUID(_PREHASH_ParcelID, new_pick->parcel_id);
diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h
index 10cde35f9c..b9eeb6e77e 100644
--- a/indra/newview/llavatarpropertiesprocessor.h
+++ b/indra/newview/llavatarpropertiesprocessor.h
@@ -87,7 +87,7 @@ struct LLAvatarData
std::string caption_text;
std::string customer_type;
U32 flags;
- BOOL allow_publish;
+ bool allow_publish;
};
struct LLAvatarPicks
@@ -105,14 +105,14 @@ struct LLPickData
LLUUID agent_id;
LLUUID pick_id;
LLUUID creator_id;
- BOOL top_pick;
+ bool top_pick;
LLUUID parcel_id;
std::string name;
std::string desc;
LLUUID snapshot_id;
LLVector3d pos_global;
S32 sort_order;
- BOOL enabled;
+ bool enabled;
//used only in read requests
std::string user_name;
@@ -135,7 +135,7 @@ struct LLAvatarGroups
{
LLUUID agent_id;
LLUUID avatar_id; //target id
- BOOL list_in_profile;
+ bool list_in_profile;
struct LLGroupData;
typedef std::list<LLGroupData> group_list_t;
@@ -145,7 +145,7 @@ struct LLAvatarGroups
struct LLGroupData
{
U64 group_powers;
- BOOL accept_notices;
+ bool accept_notices;
std::string group_title;
LLUUID group_id;
std::string group_name;
diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp
index b95b971890..ba9ba4dc64 100644
--- a/indra/newview/llavatarrenderinfoaccountant.cpp
+++ b/indra/newview/llavatarrenderinfoaccountant.cpp
@@ -236,8 +236,6 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro(std::string url, U
!avatar->isControlAvatar() && // Not part of an animated object
avatar->getObjectHost() == regionp->getHost()) // Ensure it's on the same region
{
- avatar->calculateUpdateRenderComplexity(); // Make sure the numbers are up-to-date
-
LLSD info = LLSD::emptyMap();
U32 avatar_complexity = avatar->getVisualComplexity();
if (avatar_complexity > 0)
diff --git a/indra/newview/llblockedlistitem.cpp b/indra/newview/llblockedlistitem.cpp
index d9afd2b629..5346b39120 100644
--- a/indra/newview/llblockedlistitem.cpp
+++ b/indra/newview/llblockedlistitem.cpp
@@ -51,7 +51,7 @@ LLBlockedListItem::LLBlockedListItem(const LLMute* item)
buildFromFile("panel_blocked_list_item.xml");
}
-BOOL LLBlockedListItem::postBuild()
+bool LLBlockedListItem::postBuild()
{
mTitleCtrl = getChild<LLTextBox>("item_name");
mTitleCtrl->setValue(mItemName);
@@ -62,27 +62,27 @@ BOOL LLBlockedListItem::postBuild()
case LLMute::EXTERNAL:
{
LLAvatarIconCtrl* avatar_icon = getChild<LLAvatarIconCtrl>("avatar_icon");
- avatar_icon->setVisible(TRUE);
+ avatar_icon->setVisible(true);
avatar_icon->setValue(mItemID);
}
break;
case LLMute::GROUP:
{
LLGroupIconCtrl* group_icon = getChild<LLGroupIconCtrl>("group_icon");
- group_icon->setVisible(TRUE);
+ group_icon->setVisible(true);
group_icon->setValue(mItemID);
}
break;
case LLMute::OBJECT:
case LLMute::BY_NAME:
- getChild<LLUICtrl>("object_icon")->setVisible(TRUE);
+ getChild<LLUICtrl>("object_icon")->setVisible(true);
break;
default:
break;
}
- return TRUE;
+ return true;
}
void LLBlockedListItem::onMouseEnter(S32 x, S32 y, MASK mask)
diff --git a/indra/newview/llblockedlistitem.h b/indra/newview/llblockedlistitem.h
index 05409e8a3b..508614366a 100644
--- a/indra/newview/llblockedlistitem.h
+++ b/indra/newview/llblockedlistitem.h
@@ -49,7 +49,7 @@ class LLBlockedListItem : public LLPanel
public:
LLBlockedListItem(const LLMute* item);
- virtual BOOL postBuild();
+ virtual bool postBuild();
void onMouseEnter(S32 x, S32 y, MASK mask);
void onMouseLeave(S32 x, S32 y, MASK mask);
diff --git a/indra/newview/llblocklist.cpp b/indra/newview/llblocklist.cpp
index 1eab2d8e23..16db32862d 100644
--- a/indra/newview/llblocklist.cpp
+++ b/indra/newview/llblocklist.cpp
@@ -61,8 +61,9 @@ LLBlockList::LLBlockList(const Params& p)
LLToggleableMenu* context_menu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>(
"menu_people_blocked_gear.xml",
gMenuHolder,
- LLViewerMenuHolderGL::child_registry_t::instance());
- if(context_menu)
+ LLViewerMenuHolderGL::child_registry_t::instance(),
+ true);
+ if (context_menu)
{
mContextMenu = context_menu->getHandle();
}
@@ -113,9 +114,9 @@ void LLBlockList::onChangeDetailed(const LLMute &mute)
refresh();
}
-BOOL LLBlockList::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLBlockList::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
- BOOL handled = LLUICtrl::handleRightMouseDown(x, y, mask);
+ bool handled = LLUICtrl::handleRightMouseDown(x, y, mask);
LLToggleableMenu* context_menu = mContextMenu.get();
if (context_menu && size())
diff --git a/indra/newview/llblocklist.h b/indra/newview/llblocklist.h
index ac0729c610..a19f33aa2d 100644
--- a/indra/newview/llblocklist.h
+++ b/indra/newview/llblocklist.h
@@ -54,7 +54,7 @@ public:
LLBlockList(const Params& p);
virtual ~LLBlockList();
- virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleRightMouseDown(S32 x, S32 y, MASK mask);
LLToggleableMenu* getContextMenu() const { return mContextMenu.get(); }
LLBlockedListItem* getBlockedItem() const;
diff --git a/indra/newview/llbreadcrumbview.cpp b/indra/newview/llbreadcrumbview.cpp
deleted file mode 100644
index 92310452dd..0000000000
--- a/indra/newview/llbreadcrumbview.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * @file llbreadcrumbview.cpp
- * @brief UI widget for displaying position in a folder hierarchy and allowing
- * the user to click on a location in the hierarchy.
- *
- * $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 "llbreadcrumbview.h"
-
-// TODO
diff --git a/indra/newview/llbreadcrumbview.h b/indra/newview/llbreadcrumbview.h
deleted file mode 100644
index f1b53ab526..0000000000
--- a/indra/newview/llbreadcrumbview.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * @file llbreadcrumbview.h
- * @brief UI widget for displaying position in a folder hierarchy and allowing
- * the user to click on a location in the hierarchy.
- *
- * $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 LLBREADCRUMBVIEW_H
-#define LLBREADCRUMBVIEW_H
-
-#endif // LLBREADCRUMBVIEW_H
diff --git a/indra/newview/llbreastmotion.cpp b/indra/newview/llbreastmotion.cpp
deleted file mode 100644
index 3a88bab3b3..0000000000
--- a/indra/newview/llbreastmotion.cpp
+++ /dev/null
@@ -1,395 +0,0 @@
-/**
- * @file llbreastmotion.cpp
- * @brief Implementation of LLBreastMotion 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$
- */
-
-//-----------------------------------------------------------------------------
-// Header Files
-//-----------------------------------------------------------------------------
-#include "llviewerprecompiledheaders.h"
-#include "linden_common.h"
-
-#include "m3math.h"
-#include "v3dmath.h"
-
-#include "llbreastmotion.h"
-#include "llcharacter.h"
-#include "llviewercontrol.h"
-#include "llviewervisualparam.h"
-#include "llvoavatarself.h"
-
-#define MIN_REQUIRED_PIXEL_AREA_BREAST_MOTION 0.f;
-
-#define N_PARAMS 2
-
-// User-set params
-static const std::string breast_param_names_user[N_PARAMS] =
-{
- "Breast_Female_Cleavage_Driver",
- "Breast_Gravity_Driver"
-};
-
-// Params driven by this algorithm
-static const std::string breast_param_names_driven[N_PARAMS] =
-{
- "Breast_Female_Cleavage",
- "Breast_Gravity"
-};
-
-
-
-LLBreastMotion::LLBreastMotion(const LLUUID &id) :
- LLMotion(id),
- mCharacter(NULL)
-{
- mName = "breast_motion";
- mChestState = new LLJointState;
-
- mBreastMassParam = (F32)1.0;
- mBreastDragParam = LLVector3((F32)0.1, (F32)0.1, (F32)0.1);
- mBreastSmoothingParam = (U32)2;
- mBreastGravityParam = (F32)0.0;
-
- mBreastSpringParam = LLVector3((F32)3.0, (F32)0.0, (F32)3.0);
- mBreastGainParam = LLVector3((F32)50.0, (F32)0.0, (F32)50.0);
- mBreastDampingParam = LLVector3((F32)0.3, (F32)0.0, (F32)0.3);
- mBreastMaxVelocityParam = LLVector3((F32)10.0, (F32)0.0, (F32)10.0);
-
- mBreastParamsUser[0] = mBreastParamsUser[1] = mBreastParamsUser[2] = NULL;
- mBreastParamsDriven[0] = mBreastParamsDriven[1] = mBreastParamsDriven[2] = NULL;
-
- mCharLastPosition_world_pt = LLVector3(0,0,0);
- mCharLastVelocity_local_vec = LLVector3(0,0,0);
- mCharLastAcceleration_local_vec = LLVector3(0,0,0);
- mBreastLastPosition_local_pt = LLVector3(0,0,0);
- mBreastLastUpdatePosition_local_pt = LLVector3(0,0,0);
- mBreastVelocity_local_vec = LLVector3(0,0,0);
-}
-
-LLBreastMotion::~LLBreastMotion()
-{
-}
-
-BOOL LLBreastMotion::onActivate()
-{
- return TRUE;
-}
-
-void LLBreastMotion::onDeactivate()
-{
-}
-
-LLMotion::LLMotionInitStatus LLBreastMotion::onInitialize(LLCharacter *character)
-{
- mCharacter = character;
-
- if (!mChestState->setJoint(character->getJoint("mChest")))
- {
- return STATUS_FAILURE;
- }
-
- mChestState->setUsage(LLJointState::ROT);
- addJointState( mChestState );
-
- for (U32 i=0; i < N_PARAMS; i++)
- {
- mBreastParamsUser[i] = NULL;
- mBreastParamsDriven[i] = NULL;
- mBreastParamsMin[i] = 0;
- mBreastParamsMax[i] = 0;
- if (breast_param_names_user[i] != "" && breast_param_names_driven[i] != "")
- {
- mBreastParamsUser[i] = (LLViewerVisualParam*)mCharacter->getVisualParam(breast_param_names_user[i].c_str());
- mBreastParamsDriven[i] = (LLViewerVisualParam*)mCharacter->getVisualParam(breast_param_names_driven[i].c_str());
- if (mBreastParamsDriven[i])
- {
- mBreastParamsMin[i] = mBreastParamsDriven[i]->getMinWeight();
- mBreastParamsMax[i] = mBreastParamsDriven[i]->getMaxWeight();
- }
- }
- }
-
- mTimer.reset();
- return STATUS_SUCCESS;
-}
-
-F32 LLBreastMotion::getMinPixelArea()
-{
- return MIN_REQUIRED_PIXEL_AREA_BREAST_MOTION;
-}
-
-
-F32 LLBreastMotion::calculateTimeDelta()
-{
- const F32 time = mTimer.getElapsedTimeF32();
- const F32 time_delta = time - mLastTime;
- mLastTime = time;
- return time_delta;
-}
-
-// Local space means "parameter space".
-LLVector3 LLBreastMotion::toLocal(const LLVector3 &world_vector)
-{
- LLVector3 local_vec(0,0,0);
-
- LLJoint *chest_joint = mChestState->getJoint();
- const LLQuaternion world_rot = chest_joint->getWorldRotation();
-
- // Cleavage
- LLVector3 breast_dir_world_vec = LLVector3(-1,0,0) * world_rot; // -1 b/c cleavage param changes opposite to direction
- breast_dir_world_vec.normalize();
- local_vec[0] = world_vector * breast_dir_world_vec;
-
- // Up-Down Bounce
- LLVector3 breast_up_dir_world_vec = LLVector3(0,0,1) * world_rot;
- breast_up_dir_world_vec.normalize();
- local_vec[1] = world_vector * breast_up_dir_world_vec;
-
- return local_vec;
-}
-
-LLVector3 LLBreastMotion::calculateVelocity_local(const F32 time_delta)
-{
- LLJoint *chest_joint = mChestState->getJoint();
- const LLVector3 world_pos_pt = chest_joint->getWorldPosition();
- const LLQuaternion world_rot = chest_joint->getWorldRotation();
- const LLVector3 last_world_pos_pt = mCharLastPosition_world_pt;
- const LLVector3 char_velocity_world_vec = (world_pos_pt-last_world_pos_pt) / time_delta;
- const LLVector3 char_velocity_local_vec = toLocal(char_velocity_world_vec);
-
- return char_velocity_local_vec;
-}
-
-LLVector3 LLBreastMotion::calculateAcceleration_local(const LLVector3 &new_char_velocity_local_vec,
- const F32 time_delta)
-{
- LLVector3 char_acceleration_local_vec = new_char_velocity_local_vec - mCharLastVelocity_local_vec;
-
- char_acceleration_local_vec =
- char_acceleration_local_vec * 1.0/mBreastSmoothingParam +
- mCharLastAcceleration_local_vec * (mBreastSmoothingParam-1.0)/mBreastSmoothingParam;
-
- mCharLastAcceleration_local_vec = char_acceleration_local_vec;
-
- return char_acceleration_local_vec;
-}
-
-BOOL LLBreastMotion::onUpdate(F32 time, U8* joint_mask)
-{
- // Skip if disabled globally.
- if (!gSavedSettings.getBOOL("AvatarPhysics"))
- {
- return TRUE;
- }
-
- // Higher LOD is better. This controls the granularity
- // and frequency of updates for the motions.
- const F32 lod_factor = LLVOAvatar::sPhysicsLODFactor;
- if (lod_factor == 0)
- {
- return TRUE;
- }
-
- if (mCharacter->getSex() != SEX_FEMALE) return TRUE;
- const F32 time_delta = calculateTimeDelta();
- if (time_delta < .01 || time_delta > 10.0) return TRUE;
-
-
- ////////////////////////////////////////////////////////////////////////////////
- // Get all parameters and settings
- //
-
- mBreastMassParam = mCharacter->getVisualParamWeight("Breast_Physics_Mass");
- mBreastSmoothingParam = (U32)(mCharacter->getVisualParamWeight("Breast_Physics_Smoothing"));
- mBreastGravityParam = mCharacter->getVisualParamWeight("Breast_Physics_Gravity");
-
- mBreastSpringParam[0] = mCharacter->getVisualParamWeight("Breast_Physics_Side_Spring");
- mBreastGainParam[0] = mCharacter->getVisualParamWeight("Breast_Physics_Side_Gain");
- mBreastDampingParam[0] = mCharacter->getVisualParamWeight("Breast_Physics_Side_Damping");
- mBreastMaxVelocityParam[0] = mCharacter->getVisualParamWeight("Breast_Physics_Side_Max_Velocity");
- mBreastDragParam[0] = mCharacter->getVisualParamWeight("Breast_Physics_Side_Drag");
-
- mBreastSpringParam[1] = mCharacter->getVisualParamWeight("Breast_Physics_UpDown_Spring");
- mBreastGainParam[1] = mCharacter->getVisualParamWeight("Breast_Physics_UpDown_Gain");
- mBreastDampingParam[1] = mCharacter->getVisualParamWeight("Breast_Physics_UpDown_Damping");
- mBreastMaxVelocityParam[1] = mCharacter->getVisualParamWeight("Breast_Physics_UpDown_Max_Velocity");
- mBreastDragParam[1] = mCharacter->getVisualParamWeight("Breast_Physics_UpDown_Drag");
-
-
- // Get the current morph parameters.
- LLVector3 breast_user_local_pt(0,0,0);
- for (U32 i=0; i < N_PARAMS; i++)
- {
- if (mBreastParamsUser[i] != NULL)
- {
- breast_user_local_pt[i] = mBreastParamsUser[i]->getWeight();
- }
- }
-
- LLVector3 breast_current_local_pt = mBreastLastPosition_local_pt;
-
- //
- // End parameters and settings
- ////////////////////////////////////////////////////////////////////////////////
-
-
- ////////////////////////////////////////////////////////////////////////////////
- // Calculate velocity and acceleration in parameter space.
- //
-
- const LLVector3 char_velocity_local_vec = calculateVelocity_local(time_delta);
- const LLVector3 char_acceleration_local_vec = calculateAcceleration_local(char_velocity_local_vec, time_delta);
- mCharLastVelocity_local_vec = char_velocity_local_vec;
-
- LLJoint *chest_joint = mChestState->getJoint();
- mCharLastPosition_world_pt = chest_joint->getWorldPosition();
-
- //
- // End velocity and acceleration
- ////////////////////////////////////////////////////////////////////////////////
-
-
- ////////////////////////////////////////////////////////////////////////////////
- // Calculate the total force
- //
-
- // Spring force is a restoring force towards the original user-set breast position.
- // F = kx
- const LLVector3 spring_length_local = breast_current_local_pt-breast_user_local_pt;
- LLVector3 force_spring_local_vec = -spring_length_local; force_spring_local_vec *= mBreastSpringParam;
-
- // Acceleration is the force that comes from the change in velocity of the torso.
- // F = ma + mg
- LLVector3 force_accel_local_vec = char_acceleration_local_vec * mBreastMassParam;
- const LLVector3 force_gravity_local_vec = toLocal(LLVector3(0,0,1))* mBreastGravityParam * mBreastMassParam;
- force_accel_local_vec += force_gravity_local_vec;
- force_accel_local_vec *= mBreastGainParam;
-
- // Damping is a restoring force that opposes the current velocity.
- // F = -kv
- LLVector3 force_damping_local_vec = -mBreastDampingParam;
- force_damping_local_vec *= mBreastVelocity_local_vec;
-
- // Drag is a force imparted by velocity, intuitively it is similar to wind resistance.
- // F = .5v*v
- LLVector3 force_drag_local_vec = .5*char_velocity_local_vec;
- force_drag_local_vec *= char_velocity_local_vec;
- force_drag_local_vec *= mBreastDragParam[0];
-
- LLVector3 force_net_local_vec =
- force_accel_local_vec +
- force_gravity_local_vec +
- force_spring_local_vec +
- force_damping_local_vec +
- force_drag_local_vec;
-
- //
- // End total force
- ////////////////////////////////////////////////////////////////////////////////
-
-
- ////////////////////////////////////////////////////////////////////////////////
- // Calculate new params
- //
-
- // Calculate the new acceleration based on the net force.
- // a = F/m
- LLVector3 acceleration_local_vec = force_net_local_vec / mBreastMassParam;
- mBreastVelocity_local_vec += acceleration_local_vec;
- mBreastVelocity_local_vec.clamp(-mBreastMaxVelocityParam*100.0, mBreastMaxVelocityParam*100.0);
-
- // Temporary debugging setting to cause all avatars to move, for profiling purposes.
- if (gSavedSettings.getBOOL("AvatarPhysicsTest"))
- {
- mBreastVelocity_local_vec[0] = sin(mTimer.getElapsedTimeF32()*4.0)*5.0;
- mBreastVelocity_local_vec[1] = sin(mTimer.getElapsedTimeF32()*3.0)*5.0;
- }
- // Calculate the new parameters and clamp them to the min/max ranges.
- LLVector3 new_local_pt = breast_current_local_pt + mBreastVelocity_local_vec*time_delta;
- new_local_pt.clamp(mBreastParamsMin,mBreastParamsMax);
-
- // Set the new parameters.
- for (U32 i=0; i < 3; i++)
- {
- // If the param is disabled, just set the param to the user value.
- if (mBreastMaxVelocityParam[i] == 0)
- {
- new_local_pt[i] = breast_user_local_pt[i];
- }
- if (mBreastParamsDriven[i])
- {
- mCharacter->setVisualParamWeight(mBreastParamsDriven[i],
- new_local_pt[i]);
- }
- }
-
- mBreastLastPosition_local_pt = new_local_pt;
-
- //
- // End calculate new params
- ////////////////////////////////////////////////////////////////////////////////
-
-
- ////////////////////////////////////////////////////////////////////////////////
- // Conditionally update the visual params
- //
-
- // Updating the visual params (i.e. what the user sees) is fairly expensive.
- // So only update if the params have changed enough, and also take into account
- // the graphics LOD settings.
-
- // For non-self, if the avatar is small enough visually, then don't update.
- const BOOL is_self = (dynamic_cast<LLVOAvatarSelf *>(this) != NULL);
- if (!is_self)
- {
- const F32 area_for_max_settings = 0.0;
- const F32 area_for_min_settings = 1400.0;
-
- const F32 area_for_this_setting = area_for_max_settings + (area_for_min_settings-area_for_max_settings)*(1.0-lod_factor);
- const F32 pixel_area = fsqrtf(mCharacter->getPixelArea());
- if (pixel_area < area_for_this_setting)
- {
- return TRUE;
- }
- }
-
- // If the parameter hasn't changed enough, then don't update.
- LLVector3 position_diff = mBreastLastUpdatePosition_local_pt-new_local_pt;
- for (U32 i=0; i < 3; i++)
- {
- const F32 min_delta = (1.0-lod_factor)*(mBreastParamsMax[i]-mBreastParamsMin[i])/2.0;
- if (llabs(position_diff[i]) > min_delta)
- {
- mCharacter->updateVisualParams();
- mBreastLastUpdatePosition_local_pt = new_local_pt;
- return TRUE;
- }
- }
-
- //
- // End update visual params
- ////////////////////////////////////////////////////////////////////////////////
-
- return TRUE;
-}
diff --git a/indra/newview/llbreastmotion.h b/indra/newview/llbreastmotion.h
deleted file mode 100644
index aa0fdf9f8b..0000000000
--- a/indra/newview/llbreastmotion.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- * @file llbreastmotion.h
- * @brief Implementation of LLBreastMotion 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_LLBREASTMOTION_H
-#define LL_LLBREASTMOTION_H
-
-//-----------------------------------------------------------------------------
-// Header files
-//-----------------------------------------------------------------------------
-#include "llmotion.h"
-#include "llframetimer.h"
-
-#define BREAST_MOTION_FADEIN_TIME 1.0f
-#define BREAST_MOTION_FADEOUT_TIME 1.0f
-
-class LLViewerVisualParam;
-
-//-----------------------------------------------------------------------------
-// class LLBreastMotion
-//-----------------------------------------------------------------------------
-class LLBreastMotion :
- public LLMotion
-{
-public:
- // Constructor
- LLBreastMotion(const LLUUID &id);
-
- // Destructor
- virtual ~LLBreastMotion();
-
-public:
- //-------------------------------------------------------------------------
- // functions to support MotionController and MotionRegistry
- //-------------------------------------------------------------------------
-
- // static constructor
- // all subclasses must implement such a function and register it
- static LLMotion *create(const LLUUID &id) { return new LLBreastMotion(id); }
-
-public:
- //-------------------------------------------------------------------------
- // animation callbacks to be implemented by subclasses
- //-------------------------------------------------------------------------
-
- // motions must specify whether or not they loop
- virtual BOOL getLoop() { return TRUE; }
-
- // motions must report their total duration
- virtual F32 getDuration() { return 0.0; }
-
- // motions must report their "ease in" duration
- virtual F32 getEaseInDuration() { return BREAST_MOTION_FADEIN_TIME; }
-
- // motions must report their "ease out" duration.
- virtual F32 getEaseOutDuration() { return BREAST_MOTION_FADEOUT_TIME; }
-
- // called to determine when a motion should be activated/deactivated based on avatar pixel coverage
- virtual F32 getMinPixelArea();
-
- // motions must report their priority
- virtual LLJoint::JointPriority getPriority() { return LLJoint::MEDIUM_PRIORITY; }
-
- virtual LLMotionBlendType getBlendType() { return ADDITIVE_BLEND; }
-
- // run-time (post constructor) initialization,
- // called after parameters have been set
- // must return true to indicate success and be available for activation
- virtual LLMotionInitStatus onInitialize(LLCharacter *character);
-
- // called when a motion is activated
- // must return TRUE to indicate success, or else
- // it will be deactivated
- virtual BOOL onActivate();
-
- // called per time step
- // must return TRUE while it is active, and
- // must return FALSE when the motion is completed.
- virtual BOOL onUpdate(F32 time, U8* joint_mask);
-
- // called when a motion is deactivated
- virtual void onDeactivate();
-
-protected:
- LLVector3 toLocal(const LLVector3 &world_vector);
- LLVector3 calculateVelocity_local(const F32 time_delta);
- LLVector3 calculateAcceleration_local(const LLVector3 &new_char_velocity_local_vec,
- const F32 time_delta);
- F32 calculateTimeDelta();
-private:
- //-------------------------------------------------------------------------
- // joint states to be animated
- //-------------------------------------------------------------------------
- LLPointer<LLJointState> mChestState;
- LLCharacter* mCharacter;
-
-
- //-------------------------------------------------------------------------
- // miscellaneous parameters
- //-------------------------------------------------------------------------
- LLViewerVisualParam *mBreastParamsUser[3];
- LLViewerVisualParam *mBreastParamsDriven[3];
- LLVector3 mBreastParamsMin;
- LLVector3 mBreastParamsMax;
-
- LLVector3 mCharLastPosition_world_pt; // Last position of the avatar
- LLVector3 mCharLastVelocity_local_vec; // How fast the character is moving
- LLVector3 mCharLastAcceleration_local_vec; // Change in character velocity
-
- LLVector3 mBreastLastPosition_local_pt; // Last parameters for breast
- LLVector3 mBreastVelocity_local_vec; // How fast the breast params are moving
- LLVector3 mBreastLastUpdatePosition_local_pt; // Last parameters when visual update was sent
-
-
- F32 mBreastMassParam;
- F32 mBreastGravityParam;
- U32 mBreastSmoothingParam;
-
- LLVector3 mBreastSpringParam;
- LLVector3 mBreastDampingParam;
- LLVector3 mBreastGainParam;
- LLVector3 mBreastMaxVelocityParam;
- LLVector3 mBreastDragParam;
-
- LLFrameTimer mTimer;
- F32 mLastTime;
-
- U32 mFileTicks;
-};
-
-#endif // LL_LLBREASTMOTION_H
-
diff --git a/indra/newview/llbuycurrencyhtml.cpp b/indra/newview/llbuycurrencyhtml.cpp
index 37de89a48b..590e2e8eb5 100644
--- a/indra/newview/llbuycurrencyhtml.cpp
+++ b/indra/newview/llbuycurrencyhtml.cpp
@@ -138,9 +138,9 @@ void LLBuyCurrencyHTML::showDialog( bool specific_sum_requested, const std::stri
buy_currency_floater->navigateToFinalURL();
// make it visible and raise to front
- BOOL visible = TRUE;
+ bool visible = true;
buy_currency_floater->setVisible( visible );
- BOOL take_focus = TRUE;
+ bool take_focus = true;
buy_currency_floater->setFrontmost( take_focus );
// spec calls for floater to be centered on client window
diff --git a/indra/newview/llcallbacklist.cpp b/indra/newview/llcallbacklist.cpp
index 59ecbdd0ea..0096e2532c 100644
--- a/indra/newview/llcallbacklist.cpp
+++ b/indra/newview/llcallbacklist.cpp
@@ -191,10 +191,10 @@ public:
}
private:
- BOOL tick()
+ bool tick()
{
mCallable();
- return TRUE;
+ return true;
}
nullary_func_t mCallable;
@@ -215,7 +215,7 @@ public:
{
}
private:
- BOOL tick()
+ bool tick()
{
return mCallable();
}
diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp
index df79043b00..9396be0a4e 100644
--- a/indra/newview/llcallingcard.cpp
+++ b/indra/newview/llcallingcard.cpp
@@ -99,7 +99,7 @@ LLAvatarTracker::LLAvatarTracker() :
mTrackingData(NULL),
mTrackedAgentValid(false),
mModifyMask(0x0),
- mIsNotifyObservers(FALSE)
+ mIsNotifyObservers(false)
{
}
@@ -497,7 +497,7 @@ void LLAvatarTracker::notifyObservers()
return;
}
LL_PROFILE_ZONE_SCOPED
- mIsNotifyObservers = TRUE;
+ mIsNotifyObservers = true;
observer_list_t observers(mObservers);
observer_list_t::iterator it = observers.begin();
@@ -514,7 +514,7 @@ void LLAvatarTracker::notifyObservers()
mModifyMask = LLFriendObserver::NONE;
mChangedBuddyIDs.clear();
- mIsNotifyObservers = FALSE;
+ mIsNotifyObservers = false;
}
void LLAvatarTracker::addParticularFriendObserver(const LLUUID& buddy_id, LLFriendObserver* observer)
@@ -685,7 +685,7 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
{
LL_PROFILE_ZONE_SCOPED
S32 count = msg->getNumberOfBlocksFast(_PREHASH_AgentBlock);
- BOOL chat_notify = gSavedSettings.getBOOL("ChatOnlineNotification");
+ bool chat_notify = gSavedSettings.getBOOL("ChatOnlineNotification");
LL_DEBUGS() << "Received " << count << " online notifications **** " << LL_ENDL;
if(count > 0)
@@ -749,7 +749,7 @@ static void on_avatar_name_cache_notify(const LLUUID& agent_id,
notification =
LLNotifications::instance().add("FriendOnlineOffline",
args,
- payload.with("respond_on_mousedown", TRUE),
+ payload.with("respond_on_mousedown", true),
boost::bind(&LLAvatarActions::startIM, agent_id));
}
else
diff --git a/indra/newview/llcallingcard.h b/indra/newview/llcallingcard.h
index 1f819a42fd..1dc1fefc9e 100644
--- a/indra/newview/llcallingcard.h
+++ b/indra/newview/llcallingcard.h
@@ -210,7 +210,7 @@ private:
LLAvatarTracker(const LLAvatarTracker&);
bool operator==(const LLAvatarTracker&);
- BOOL mIsNotifyObservers;
+ bool mIsNotifyObservers;
public:
// don't you dare create or delete this object
diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp
index 9e7a8ba95c..a67c0614c6 100644
--- a/indra/newview/llchannelmanager.cpp
+++ b/indra/newview/llchannelmanager.cpp
@@ -162,7 +162,7 @@ void LLChannelManager::onStartUpToastClose()
{
if(mStartUpChannel)
{
- mStartUpChannel->setVisible(FALSE);
+ mStartUpChannel->setVisible(false);
mStartUpChannel->closeStartUpToast();
removeChannelByID(LLUUID(gSavedSettings.getString("StartUpChannelUUID")));
mStartUpChannel = NULL;
diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp
index 72f667a0b8..ceff78b6d6 100644
--- a/indra/newview/llchatbar.cpp
+++ b/indra/newview/llchatbar.cpp
@@ -63,7 +63,7 @@
//
// Globals
//
-const F32 AGENT_TYPING_TIMEOUT = 5.f; // seconds
+constexpr F32 AGENT_TYPING_TIMEOUT = 5.f; // seconds
LLChatBar *gChatBar = NULL;
@@ -89,11 +89,11 @@ LLChatBar::LLChatBar()
mInputEditor(NULL),
mGestureLabelTimer(),
mLastSpecialChatChannel(0),
- mIsBuilt(FALSE),
+ mIsBuilt(false),
mGestureCombo(NULL),
mObserver(NULL)
{
- //setIsChrome(TRUE);
+ //setIsChrome(true);
}
@@ -105,7 +105,7 @@ LLChatBar::~LLChatBar()
// LLView destructor cleans up children
}
-BOOL LLChatBar::postBuild()
+bool LLChatBar::postBuild()
{
getChild<LLUICtrl>("Say")->setCommitCallback(boost::bind(&LLChatBar::onClickSay, this, _1));
@@ -118,18 +118,18 @@ BOOL LLChatBar::postBuild()
mInputEditor->setKeystrokeCallback(&onInputEditorKeystroke, this);
mInputEditor->setFocusLostCallback(boost::bind(&LLChatBar::onInputEditorFocusLost));
mInputEditor->setFocusReceivedCallback(boost::bind(&LLChatBar::onInputEditorGainFocus));
- mInputEditor->setCommitOnFocusLost( FALSE );
- mInputEditor->setRevertOnEsc( FALSE );
- mInputEditor->setIgnoreTab(TRUE);
- mInputEditor->setPassDelete(TRUE);
- mInputEditor->setReplaceNewlinesWithSpaces(FALSE);
+ mInputEditor->setCommitOnFocusLost( false );
+ mInputEditor->setRevertOnEsc( false );
+ mInputEditor->setIgnoreTab(true);
+ mInputEditor->setPassDelete(true);
+ mInputEditor->setReplaceNewlinesWithSpaces(false);
mInputEditor->setMaxTextLength(DB_CHAT_MSG_STR_LEN);
- mInputEditor->setEnableLineHistory(TRUE);
+ mInputEditor->setEnableLineHistory(true);
- mIsBuilt = TRUE;
+ mIsBuilt = true;
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------
@@ -137,9 +137,9 @@ BOOL LLChatBar::postBuild()
//-----------------------------------------------------------------------
// virtual
-BOOL LLChatBar::handleKeyHere( KEY key, MASK mask )
+bool LLChatBar::handleKeyHere( KEY key, MASK mask )
{
- BOOL handled = FALSE;
+ bool handled = false;
if( KEY_RETURN == key )
{
@@ -147,13 +147,13 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask )
{
// shout
sendChat(CHAT_TYPE_SHOUT);
- handled = TRUE;
+ handled = true;
}
else if (mask == MASK_NONE)
{
// say
sendChat( CHAT_TYPE_NORMAL );
- handled = TRUE;
+ handled = true;
}
}
// only do this in main chatbar
@@ -161,7 +161,7 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask )
{
stopChat();
- handled = TRUE;
+ handled = true;
}
return handled;
@@ -199,7 +199,7 @@ void LLChatBar::refreshGestures()
mGestureCombo->clearRows();
// collect list of unique gestures
- std::map <std::string, BOOL> unique;
+ std::map <std::string, bool> unique;
LLGestureMgr::item_map_t::const_iterator it;
const LLGestureMgr::item_map_t& active_gestures = LLGestureMgr::instance().getActiveGestures();
for (it = active_gestures.begin(); it != active_gestures.end(); ++it)
@@ -209,13 +209,13 @@ void LLChatBar::refreshGestures()
{
if (!gesture->mTrigger.empty())
{
- unique[gesture->mTrigger] = TRUE;
+ unique[gesture->mTrigger] = true;
}
}
}
// add unique gestures
- std::map <std::string, BOOL>::iterator it2;
+ std::map <std::string, bool>::iterator it2;
for (it2 = unique.begin(); it2 != unique.end(); ++it2)
{
mGestureCombo->addSimpleElement((*it2).first);
@@ -238,13 +238,13 @@ void LLChatBar::refreshGestures()
}
// Move the cursor to the correct input field.
-void LLChatBar::setKeyboardFocus(BOOL focus)
+void LLChatBar::setKeyboardFocus(bool focus)
{
if (focus)
{
if (mInputEditor)
{
- mInputEditor->setFocus(TRUE);
+ mInputEditor->setFocus(true);
mInputEditor->selectAll();
}
}
@@ -254,13 +254,13 @@ void LLChatBar::setKeyboardFocus(BOOL focus)
{
mInputEditor->deselect();
}
- setFocus(FALSE);
+ setFocus(false);
}
}
// Ignore arrow keys in chat bar
-void LLChatBar::setIgnoreArrowKeys(BOOL b)
+void LLChatBar::setIgnoreArrowKeys(bool b)
{
if (mInputEditor)
{
@@ -268,7 +268,7 @@ void LLChatBar::setIgnoreArrowKeys(BOOL b)
}
}
-BOOL LLChatBar::inputEditorHasFocus()
+bool LLChatBar::inputEditorHasFocus()
{
return mInputEditor && mInputEditor->hasFocus();
}
@@ -409,15 +409,15 @@ void LLChatBar::startChat(const char* line)
//TODO* remove DUMMY chat
//if(gBottomTray && gBottomTray->getChatBox())
//{
- // gBottomTray->setVisible(TRUE);
- // gBottomTray->getChatBox()->setFocus(TRUE);
+ // gBottomTray->setVisible(true);
+ // gBottomTray->getChatBox()->setFocus(true);
//}
// *TODO Vadim: Why was this code commented out?
-// gChatBar->setVisible(TRUE);
-// gChatBar->setKeyboardFocus(TRUE);
-// gSavedSettings.setBOOL("ChatVisible", TRUE);
+// gChatBar->setVisible(true);
+// gChatBar->setKeyboardFocus(true);
+// gSavedSettings.setBOOL("ChatVisible", true);
//
// if (line && gChatBar->mInputEditor)
// {
@@ -436,13 +436,13 @@ void LLChatBar::stopChat()
//TODO* remove DUMMY chat
//if(gBottomTray && gBottomTray->getChatBox())
///{
- // gBottomTray->getChatBox()->setFocus(FALSE);
+ // gBottomTray->getChatBox()->setFocus(false);
//}
// *TODO Vadim: Why was this code commented out?
// // In simple UI mode, we never release focus from the chat bar
-// gChatBar->setKeyboardFocus(FALSE);
+// gChatBar->setKeyboardFocus(false);
//
// // If we typed a movement key and pressed return during the
// // same frame, the keyboard handlers will see the key as having
@@ -454,8 +454,8 @@ void LLChatBar::stopChat()
// gAgent.stopTyping();
//
// // hide chat bar so it doesn't grab focus back
-// gChatBar->setVisible(FALSE);
-// gSavedSettings.setBOOL("ChatVisible", FALSE);
+// gChatBar->setVisible(false);
+// gSavedSettings.setBOOL("ChatVisible", false);
}
// static
@@ -557,16 +557,16 @@ void LLChatBar::onClickSay( LLUICtrl* ctrl )
sendChat(chat_type);
}
-void LLChatBar::sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate)
+void LLChatBar::sendChatFromViewer(const std::string &utf8text, EChatType type, bool animate)
{
sendChatFromViewer(utf8str_to_wstring(utf8text), type, animate);
}
-void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate)
+void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, bool animate)
{
// as soon as we say something, we no longer care about teaching the user
// how to chat
- gWarningSettings.setBOOL("FirstOtherChatBeforeUser", FALSE);
+ gWarningSettings.setBOOL("FirstOtherChatBeforeUser", false);
// Look for "/20 foo" channel chats.
S32 channel = 0;
@@ -641,13 +641,13 @@ void LLChatBar::onCommitGesture(LLUICtrl* ctrl)
if (!revised_text.empty())
{
// Don't play nodding animation
- sendChatFromViewer(revised_text, CHAT_TYPE_NORMAL, FALSE);
+ sendChatFromViewer(revised_text, CHAT_TYPE_NORMAL, false);
}
}
mGestureLabelTimer.start();
if (mGestureCombo != NULL)
{
// free focus back to chat bar
- mGestureCombo->setFocus(FALSE);
+ mGestureCombo->setFocus(false);
}
}
diff --git a/indra/newview/llchatbar.h b/indra/newview/llchatbar.h
index 26ef5f1535..ef1f65304c 100644
--- a/indra/newview/llchatbar.h
+++ b/indra/newview/llchatbar.h
@@ -47,20 +47,20 @@ public:
// constructor for inline chat-bars (e.g. hosted in chat history window)
LLChatBar();
~LLChatBar();
- virtual BOOL postBuild();
+ virtual bool postBuild();
- virtual BOOL handleKeyHere(KEY key, MASK mask);
+ virtual bool handleKeyHere(KEY key, MASK mask);
void refresh();
void refreshGestures();
// Move cursor into chat input field.
- void setKeyboardFocus(BOOL b);
+ void setKeyboardFocus(bool b);
// Ignore arrow keys for chat bar
- void setIgnoreArrowKeys(BOOL b);
+ void setIgnoreArrowKeys(bool b);
- BOOL inputEditorHasFocus();
+ bool inputEditorHasFocus();
std::string getCurrentChat();
// since chat bar logic is reused for chat history
@@ -69,8 +69,8 @@ public:
// Send a chat (after stripping /20foo channel chats).
// "Animate" means the nodding animation for regular text.
- void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate);
- void sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate);
+ void sendChatFromViewer(const LLWString &wtext, EChatType type, bool animate);
+ void sendChatFromViewer(const std::string &utf8text, EChatType type, bool animate);
// If input of the form "/20foo" or "/20 foo", returns "foo" and channel 20.
// Otherwise returns input and channel 0.
@@ -101,7 +101,7 @@ protected:
// Which non-zero channel did we last chat on?
S32 mLastSpecialChatChannel;
- BOOL mIsBuilt;
+ bool mIsBuilt;
LLComboBox* mGestureCombo;
LLChatBarGestureObserver* mObserver;
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index b9bf432581..0c365d33c4 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -90,7 +90,7 @@ public:
}
LLUUID object_id;
- if (!object_id.set(params[0], FALSE))
+ if (!object_id.set(params[0], false))
{
return false;
}
@@ -131,7 +131,7 @@ public:
static LLChatHistoryHeader* createInstance(const std::string& file_name)
{
LLChatHistoryHeader* pInstance = new LLChatHistoryHeader;
- pInstance->buildFromFile(file_name);
+ pInstance->buildFromFile(file_name, true);
return pInstance;
}
@@ -155,7 +155,7 @@ public:
}
}
- BOOL handleMouseUp(S32 x, S32 y, MASK mask)
+ bool handleMouseUp(S32 x, S32 y, MASK mask)
{
return LLPanel::handleMouseUp(x,y,mask);
}
@@ -577,7 +577,7 @@ public:
return false;
}
- BOOL postBuild()
+ bool postBuild()
{
setDoubleClickCallback(boost::bind(&LLChatHistoryHeader::showInspector, this));
@@ -587,11 +587,11 @@ public:
mUserNameTextBox = getChild<LLTextBox>("user_name");
mTimeBoxTextBox = getChild<LLTextBox>("time_box");
- mInfoCtrl = LLUICtrlFactory::getInstance()->createFromFile<LLUICtrl>("inspector_info_ctrl.xml", this, LLPanel::child_registry_t::instance());
+ mInfoCtrl = LLUICtrlFactory::getInstance()->createFromFile<LLUICtrl>("inspector_info_ctrl.xml", this, LLPanel::child_registry_t::instance(), true);
if (mInfoCtrl)
{
mInfoCtrl->setCommitCallback(boost::bind(&LLChatHistoryHeader::onClickInfoCtrl, mInfoCtrl));
- mInfoCtrl->setVisible(FALSE);
+ mInfoCtrl->setVisible(false);
}
else
{
@@ -619,12 +619,12 @@ public:
return child->pointInView(local_x, local_y);
}
- BOOL handleRightMouseDown(S32 x, S32 y, MASK mask)
+ bool handleRightMouseDown(S32 x, S32 y, MASK mask)
{
if(pointInChild("avatar_icon",x,y) || pointInChild("user_name",x,y))
{
showContextMenu(x,y);
- return TRUE;
+ return true;
}
return LLPanel::handleRightMouseDown(x,y,mask);
@@ -695,7 +695,7 @@ public:
updateMinUserNameWidth();
LLColor4 sep_color = LLUIColorTable::instance().getColor("ChatTeleportSeparatorColor");
setTransparentColor(sep_color);
- mTimeBoxTextBox->setVisible(FALSE);
+ mTimeBoxTextBox->setVisible(false);
}
else if (chat.mFromName.empty()
|| mSourceType == CHAT_SOURCE_SYSTEM)
@@ -744,7 +744,7 @@ public:
style_params_name.font.name("SansSerifSmall");
style_params_name.font.style("NORMAL");
style_params_name.readonly_color(userNameColor);
- user_name->appendText(" - " + username, FALSE, style_params_name);
+ user_name->appendText(" - " + username, false, style_params_name);
}
}
else
@@ -830,7 +830,7 @@ public:
user_name->reshape(user_name_rect.getWidth(), user_name_rect.getHeight());
user_name->setRect(user_name_rect);
- time_box->setVisible(TRUE);
+ time_box->setVisible(true);
}
LLPanel::draw();
@@ -982,7 +982,7 @@ protected:
void hideInfoCtrl()
{
- mInfoCtrl->setVisible(FALSE);
+ mInfoCtrl->setVisible(false);
}
private:
@@ -1042,7 +1042,7 @@ private:
style_params_name.font.name("SansSerifSmall");
style_params_name.font.style("NORMAL");
style_params_name.readonly_color(userNameColor);
- user_name->appendText(" - " + av_name.getUserName(), FALSE, style_params_name);
+ user_name->appendText(" - " + av_name.getUserName(), false, style_params_name);
}
setToolTip( av_name.getUserName() );
// name might have changed, update width
@@ -1181,7 +1181,7 @@ void LLChatHistory::initFromParams(const LLChatHistory::Params& p)
LLView* LLChatHistory::getSeparator()
{
- LLPanel* separator = LLUICtrlFactory::getInstance()->createFromFile<LLPanel>(mMessageSeparatorFilename, NULL, LLPanel::child_registry_t::instance());
+ LLPanel* separator = LLUICtrlFactory::getInstance()->createFromFile<LLPanel>(mMessageSeparatorFilename, NULL, LLPanel::child_registry_t::instance(), true);
return separator;
}
@@ -1223,7 +1223,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
if (mNotifyAboutUnreadMsg && !mEditor->scrolledToEnd() && !from_me && !chat.mFromName.empty())
{
mUnreadChatSources.insert(chat.mFromName);
- mMoreChatPanel->setVisible(TRUE);
+ mMoreChatPanel->setVisible(true);
std::string chatters;
for (const std::string& source : mUnreadChatSources)
{
@@ -1541,7 +1541,7 @@ void LLChatHistory::draw()
if (mEditor->scrolledToEnd())
{
mUnreadChatSources.clear();
- mMoreChatPanel->setVisible(FALSE);
+ mMoreChatPanel->setVisible(false);
}
LLUICtrl::draw();
diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index dc2cc57f0f..57446bb7a0 100644
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -43,9 +43,9 @@
#include "llslurl.h"
-static const S32 msg_left_offset = 10;
-static const S32 msg_right_offset = 10;
-static const S32 msg_height_pad = 5;
+static constexpr S32 msg_left_offset = 10;
+static constexpr S32 msg_right_offset = 10;
+static constexpr S32 msg_height_pad = 5;
//*******************************************************************************************************************
// LLObjectHandler
@@ -62,7 +62,7 @@ public:
if (params.size() < 2) return false;
LLUUID object_id;
- if (!object_id.set(params[0], FALSE))
+ if (!object_id.set(params[0], false))
{
return false;
}
@@ -93,7 +93,7 @@ LLFloaterIMNearbyChatToastPanel* LLFloaterIMNearbyChatToastPanel::createInstance
return item;
}
-void LLFloaterIMNearbyChatToastPanel::reshape (S32 width, S32 height, BOOL called_from_parent )
+void LLFloaterIMNearbyChatToastPanel::reshape (S32 width, S32 height, bool called_from_parent )
{
LLPanel::reshape(width, height,called_from_parent);
@@ -122,7 +122,7 @@ void LLFloaterIMNearbyChatToastPanel::reshape (S32 width, S32 height, BOOL call
msg_text->setRect(msg_text_rect);
}
-BOOL LLFloaterIMNearbyChatToastPanel::postBuild()
+bool LLFloaterIMNearbyChatToastPanel::postBuild()
{
return LLPanel::postBuild();
}
@@ -171,7 +171,7 @@ void LLFloaterIMNearbyChatToastPanel::addMessage(LLSD& notification)
{
style_params.font.style = "ITALIC";
}
- mMsgText->appendText(messageText, TRUE, style_params);
+ mMsgText->appendText(messageText, true, style_params);
}
snapToMessageHeight();
@@ -234,7 +234,7 @@ void LLFloaterIMNearbyChatToastPanel::init(LLSD& notification)
style_params_name.link_href = notification["sender_slurl"].asString();
style_params_name.is_link = true;
- mMsgText->appendText(str_sender, FALSE, style_params_name);
+ mMsgText->appendText(str_sender, false, style_params_name);
}
else
@@ -293,7 +293,7 @@ void LLFloaterIMNearbyChatToastPanel::init(LLSD& notification)
{
style_params.font.style = "ITALIC";
}
- mMsgText->appendText(messageText, FALSE, style_params);
+ mMsgText->appendText(messageText, false, style_params);
}
@@ -326,12 +326,12 @@ void LLFloaterIMNearbyChatToastPanel::onMouseEnter (S32 x, S32 y, MASK mask)
return;
}
-BOOL LLFloaterIMNearbyChatToastPanel::handleMouseDown (S32 x, S32 y, MASK mask)
+bool LLFloaterIMNearbyChatToastPanel::handleMouseDown (S32 x, S32 y, MASK mask)
{
return LLPanel::handleMouseDown(x,y,mask);
}
-BOOL LLFloaterIMNearbyChatToastPanel::handleMouseUp (S32 x, S32 y, MASK mask)
+bool LLFloaterIMNearbyChatToastPanel::handleMouseUp (S32 x, S32 y, MASK mask)
{
/*
fix for request EXT-4780
@@ -346,12 +346,12 @@ BOOL LLFloaterIMNearbyChatToastPanel::handleMouseUp (S32 x, S32 y, MASK mask)
//if text_box process mouse up (ussually this is click on url) - we didn't show nearby_chat.
if (mMsgText->pointInView(local_x, local_y) )
{
- if (mMsgText->handleMouseUp(local_x,local_y,mask) == TRUE)
- return TRUE;
+ if (mMsgText->handleMouseUp(local_x,local_y,mask) == true)
+ return true;
else
{
LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat")->showHistory();
- return FALSE;
+ return false;
}
}
LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat")->showHistory();
@@ -374,7 +374,7 @@ bool LLFloaterIMNearbyChatToastPanel::canAddText ()
return msg_text->getLineCount()<10;
}
-BOOL LLFloaterIMNearbyChatToastPanel::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLFloaterIMNearbyChatToastPanel::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
LLUICtrl* avatar_icon = getChild<LLUICtrl>("avatar_icon", false);
@@ -383,7 +383,7 @@ BOOL LLFloaterIMNearbyChatToastPanel::handleRightMouseDown(S32 x, S32 y, MASK ma
//eat message for avatar icon if msg was from object
if(avatar_icon->pointInView(local_x, local_y) && mSourceType != CHAT_SOURCE_AGENT)
- return TRUE;
+ return true;
return LLPanel::handleRightMouseDown(x,y,mask);
}
void LLFloaterIMNearbyChatToastPanel::draw()
diff --git a/indra/newview/llchatitemscontainerctrl.h b/indra/newview/llchatitemscontainerctrl.h
index ebff9ca298..1a6ad57641 100644
--- a/indra/newview/llchatitemscontainerctrl.h
+++ b/indra/newview/llchatitemscontainerctrl.h
@@ -66,15 +66,15 @@ public:
void onMouseLeave (S32 x, S32 y, MASK mask);
void onMouseEnter (S32 x, S32 y, MASK mask);
- BOOL handleMouseDown (S32 x, S32 y, MASK mask);
- BOOL handleMouseUp (S32 x, S32 y, MASK mask);
+ bool handleMouseDown (S32 x, S32 y, MASK mask);
+ bool handleMouseUp (S32 x, S32 y, MASK mask);
- virtual BOOL postBuild();
+ virtual bool postBuild();
- void reshape (S32 width, S32 height, BOOL called_from_parent = TRUE);
+ void reshape (S32 width, S32 height, bool called_from_parent = true);
void setHeaderVisibility(EShowItemHeader e);
- BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+ bool handleRightMouseDown(S32 x, S32 y, MASK mask);
virtual void init(LLSD& data);
virtual void addMessage(LLSD& data);
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 3444f50e52..ad542e84cc 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -56,7 +56,7 @@ LLSysWellChiclet::Params::Params()
, max_displayed_count("max_displayed_count", 99)
{
button.name = "button";
- button.tab_stop = FALSE;
+ button.tab_stop = false;
button.label = LLStringUtil::null;
}
@@ -114,7 +114,7 @@ boost::signals2::connection LLSysWellChiclet::setClickCallback(
return mButton->setClickedCallback(cb);
}
-void LLSysWellChiclet::setToggleState(BOOL toggled) {
+void LLSysWellChiclet::setToggleState(bool toggled) {
mButton->setToggleState(toggled);
}
@@ -148,7 +148,7 @@ void LLSysWellChiclet::updateWidget(bool is_window_empty)
}
}
// virtual
-BOOL LLSysWellChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLSysWellChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
LLContextMenu* menu_avatar = mContextMenuHandle.get();
if(!menu_avatar)
@@ -161,7 +161,7 @@ BOOL LLSysWellChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask)
menu_avatar->show(x, y);
LLMenuGL::showPopup(this, menu_avatar, x, y);
}
- return TRUE;
+ return true;
}
/************************************************************************/
@@ -284,11 +284,11 @@ boost::signals2::connection LLChiclet::setLeftButtonClickCallback(
return setCommitCallback(cb);
}
-BOOL LLChiclet::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLChiclet::handleMouseDown(S32 x, S32 y, MASK mask)
{
onCommit();
childrenHandleMouseDown(x,y,mask);
- return TRUE;
+ return true;
}
boost::signals2::connection LLChiclet::setChicletSizeChangedCallback(
@@ -339,12 +339,12 @@ LLIMChiclet::~LLIMChiclet()
}
/* virtual*/
-BOOL LLIMChiclet::postBuild()
+bool LLIMChiclet::postBuild()
{
mChicletButton = getChild<LLButton>("chiclet_button");
mChicletButton->setCommitCallback(boost::bind(&LLIMChiclet::onMouseDown, this));
mChicletButton->setDoubleClickCallback(boost::bind(&LLIMChiclet::onMouseDown, this));
- return TRUE;
+ return true;
}
void LLIMChiclet::enableCounterControl(bool enable)
@@ -387,7 +387,7 @@ void LLIMChiclet::setToggleState(bool toggle)
mChicletButton->setToggleState(toggle);
}
-BOOL LLIMChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLIMChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
auto menu = static_cast<LLMenuGL*>(mPopupMenuHandle.get());
if(!menu)
@@ -403,7 +403,7 @@ BOOL LLIMChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask)
LLMenuGL::showPopup(this, menu, x, y);
}
- return TRUE;
+ return true;
}
void LLIMChiclet::hidePopupMenu()
@@ -411,7 +411,7 @@ void LLIMChiclet::hidePopupMenu()
auto menu = mPopupMenuHandle.get();
if (menu)
{
- menu->setVisible(FALSE);
+ menu->setVisible(false);
}
}
@@ -503,7 +503,7 @@ void LLChicletPanel::objectChicletCallback(const LLSD& data)
}
}
-BOOL LLChicletPanel::postBuild()
+bool LLChicletPanel::postBuild()
{
LLPanel::postBuild();
LLIMModel::instance().addNewMsgCallback(boost::bind(&LLChicletPanel::onMessageCountChanged, this, _1));
@@ -525,7 +525,7 @@ BOOL LLChicletPanel::postBuild()
mRightScrollButton->setHeldDownCallback(boost::bind(&LLChicletPanel::onRightScrollHeldDown,this));
mRightScrollButton->setEnabled(false);
- return TRUE;
+ return true;
}
void LLChicletPanel::onCurrentVoiceChannelChanged(const LLUUID& session_id)
@@ -711,7 +711,7 @@ void LLChicletPanel::scrollToChiclet(const LLChiclet* chiclet)
}
}
-void LLChicletPanel::reshape(S32 width, S32 height, BOOL called_from_parent )
+void LLChicletPanel::reshape(S32 width, S32 height, bool called_from_parent )
{
LLPanel::reshape(width,height,called_from_parent);
@@ -999,7 +999,7 @@ boost::signals2::connection LLChicletPanel::setChicletClickedCallback(
return setCommitCallback(cb);
}
-BOOL LLChicletPanel::handleScrollWheel(S32 x, S32 y, S32 clicks)
+bool LLChicletPanel::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
if(clicks > 0)
{
@@ -1009,7 +1009,7 @@ BOOL LLChicletPanel::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
scrollLeft();
}
- return TRUE;
+ return true;
}
bool LLChicletPanel::isAnyIMFloaterDoked()
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index 1698fa269a..75831adf62 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -104,8 +104,8 @@ public:
{
Params()
{
- changeDefault(draw_tooltip, FALSE);
- changeDefault(mouse_opaque, FALSE);
+ changeDefault(draw_tooltip, false);
+ changeDefault(mouse_opaque, false);
changeDefault(default_icon_name, "Generic_Person");
};
};
@@ -214,7 +214,7 @@ protected:
/**
* Notifies subscribers about click on chiclet.
*/
- /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask);
/**
* Notifies subscribers about chiclet size changed event.
@@ -257,7 +257,7 @@ public:
/**
* It is used for default setting up of chicklet:click handler, etc.
*/
- BOOL postBuild();
+ bool postBuild();
/**
* Sets IM session name. This name will be displayed in chiclet tooltip.
@@ -303,7 +303,7 @@ public:
/**
* Displays popup menu.
*/
- virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleRightMouseDown(S32 x, S32 y, MASK mask);
void hidePopupMenu();
@@ -485,7 +485,7 @@ public:
/*virtual*/ ~LLSysWellChiclet();
- void setToggleState(BOOL toggled);
+ void setToggleState(bool toggled);
void setNewMessagesState(bool new_messages);
//this method should change a widget according to state of the SysWellWindow
@@ -507,7 +507,7 @@ protected:
/**
* Displays menu.
*/
- virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleRightMouseDown(S32 x, S32 y, MASK mask);
virtual void createMenu() = 0;
@@ -663,7 +663,7 @@ public:
boost::signals2::connection setChicletClickedCallback(
const commit_callback_t& cb);
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/**
* Handler for the Voice Client's signal. Finds a corresponding chiclet and toggles its SpeakerControl
@@ -673,7 +673,7 @@ public:
/**
* Reshapes controls and rearranges chiclets if needed.
*/
- /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE );
+ /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true );
/*virtual*/ void draw();
@@ -778,7 +778,7 @@ protected:
/**
* Callback for mouse wheel scrolled, calls scrollRight() or scrollLeft()
*/
- BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
+ bool handleScrollWheel(S32 x, S32 y, S32 clicks);
/**
* Notifies subscribers about click on chiclet.
diff --git a/indra/newview/llchicletbar.cpp b/indra/newview/llchicletbar.cpp
index 91b9d68fd2..f9490dcba4 100644
--- a/indra/newview/llchicletbar.cpp
+++ b/indra/newview/llchicletbar.cpp
@@ -45,7 +45,7 @@ LLChicletBar::LLChicletBar()
buildFromFile("panel_chiclet_bar.xml");
}
-BOOL LLChicletBar::postBuild()
+bool LLChicletBar::postBuild()
{
mToolbarStack = getChild<LLLayoutStack>("toolbar_stack");
mChicletPanel = getChild<LLChicletPanel>("chiclet_list");
@@ -55,7 +55,7 @@ BOOL LLChicletBar::postBuild()
LLPanelTopInfoBar::instance().setResizeCallback(boost::bind(&LLChicletBar::fitWithTopInfoBar, this));
LLPanelTopInfoBar::instance().setVisibleCallback(boost::bind(&LLChicletBar::fitWithTopInfoBar, this));
- return TRUE;
+ return true;
}
void LLChicletBar::showWellButton(const std::string& well_name, bool visible)
@@ -78,7 +78,7 @@ void LLChicletBar::log(LLView* panel, const std::string& descr)
<< LL_ENDL;
}
-void LLChicletBar::reshape(S32 width, S32 height, BOOL called_from_parent)
+void LLChicletBar::reshape(S32 width, S32 height, bool called_from_parent)
{
static S32 debug_calling_number = 0;
LL_DEBUGS() << "**************************************** " << ++debug_calling_number << LL_ENDL;
diff --git a/indra/newview/llchicletbar.h b/indra/newview/llchicletbar.h
index c295b99962..fb8c6d400a 100644
--- a/indra/newview/llchicletbar.h
+++ b/indra/newview/llchicletbar.h
@@ -43,11 +43,11 @@ class LLChicletBar
public:
- BOOL postBuild() override;
+ bool postBuild() override;
LLChicletPanel* getChicletPanel() { return mChicletPanel; }
- /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent) override;
+ void reshape(S32 width, S32 height, bool called_from_parent) override;
/**
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
index aa2ba752b7..a9231337fd 100644
--- a/indra/newview/llcofwearables.cpp
+++ b/indra/newview/llcofwearables.cpp
@@ -69,7 +69,7 @@ protected:
// Hide the "Create new <WEARABLE_TYPE>" if it's irrelevant.
if (w_type == LLWearableType::WT_NONE)
{
- menu_item->setVisible(FALSE);
+ menu_item->setVisible(false);
return;
}
@@ -307,7 +307,7 @@ LLCOFWearables::~LLCOFWearables()
}
// virtual
-BOOL LLCOFWearables::postBuild()
+bool LLCOFWearables::postBuild()
{
mAttachments = getChild<LLFlatListView>("list_attachments");
mClothing = getChild<LLFlatListView>("list_clothing");
diff --git a/indra/newview/llcofwearables.h b/indra/newview/llcofwearables.h
index 9957d6a64e..53d39671f6 100644
--- a/indra/newview/llcofwearables.h
+++ b/indra/newview/llcofwearables.h
@@ -68,7 +68,7 @@ public:
LLCOFWearables();
virtual ~LLCOFWearables();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
LLUUID getSelectedUUID();
bool getSelectedUUIDs(uuid_vec_t& selected_ids);
diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp
index 036ff17074..2a13804b69 100644
--- a/indra/newview/llcolorswatch.cpp
+++ b/indra/newview/llcolorswatch.cpp
@@ -59,7 +59,7 @@ LLColorSwatchCtrl::Params::Params()
LLColorSwatchCtrl::LLColorSwatchCtrl(const Params& p)
: LLUICtrl(p),
- mValid( TRUE ),
+ mValid( true ),
mColor(p.color()),
mCanApplyImmediately(p.can_apply_immediately),
mAlphaGradientImage(p.alpha_background_image),
@@ -108,22 +108,22 @@ LLColorSwatchCtrl::~LLColorSwatchCtrl ()
}
}
-BOOL LLColorSwatchCtrl::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLColorSwatchCtrl::handleDoubleClick(S32 x, S32 y, MASK mask)
{
return handleMouseDown(x, y, mask);
}
-BOOL LLColorSwatchCtrl::handleHover(S32 x, S32 y, MASK mask)
+bool LLColorSwatchCtrl::handleHover(S32 x, S32 y, MASK mask)
{
getWindow()->setCursor(UI_CURSOR_HAND);
- return TRUE;
+ return true;
}
-BOOL LLColorSwatchCtrl::handleUnicodeCharHere(llwchar uni_char)
+bool LLColorSwatchCtrl::handleUnicodeCharHere(llwchar uni_char)
{
if( ' ' == uni_char )
{
- showPicker(TRUE);
+ showPicker(true);
}
return LLUICtrl::handleUnicodeCharHere(uni_char);
}
@@ -139,7 +139,7 @@ void LLColorSwatchCtrl::setOriginal(const LLColor4& color)
}
}
-void LLColorSwatchCtrl::set(const LLColor4& color, BOOL update_picker, BOOL from_event)
+void LLColorSwatchCtrl::set(const LLColor4& color, bool update_picker, bool from_event)
{
mColor = color;
LLFloaterColorPicker* pickerp = (LLFloaterColorPicker*)mPickerHandle.get();
@@ -158,17 +158,17 @@ void LLColorSwatchCtrl::setLabel(const std::string& label)
mCaption->setText(label);
}
-BOOL LLColorSwatchCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLColorSwatchCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
{
// Route future Mouse messages here preemptively. (Release on mouse up.)
// No handler is needed for capture lost since this object has no state that depends on it.
gFocusMgr.setMouseCapture( this );
- return TRUE;
+ return true;
}
-BOOL LLColorSwatchCtrl::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLColorSwatchCtrl::handleMouseUp(S32 x, S32 y, MASK mask)
{
// We only handle the click if the click both started and ended within us
if( hasMouseCapture() )
@@ -184,13 +184,13 @@ BOOL LLColorSwatchCtrl::handleMouseUp(S32 x, S32 y, MASK mask)
// Focus the widget now in order to return the focus
// after the color picker is closed.
- setFocus(TRUE);
+ setFocus(true);
- showPicker(FALSE);
+ showPicker(false);
}
}
- return TRUE;
+ return true;
}
// assumes GL state is set for 2D
@@ -202,7 +202,7 @@ void LLColorSwatchCtrl::draw()
mBorder->setKeyboardFocusHighlight(hasFocus());
// Draw border
LLRect border( 0, getRect().getHeight(), getRect().getWidth(), mLabelHeight );
- gl_rect_2d( border, mBorderColor.get(), FALSE );
+ gl_rect_2d( border, mBorderColor.get(), false );
LLRect interior = border;
interior.stretch( -1 );
@@ -217,7 +217,7 @@ void LLColorSwatchCtrl::draw()
}
// Draw the color swatch
- gl_rect_2d(interior, mColor % alpha, TRUE);
+ gl_rect_2d(interior, mColor % alpha, true);
if (!mColor.isOpaque())
{
@@ -244,7 +244,7 @@ void LLColorSwatchCtrl::draw()
else
{
// Draw grey and an X
- gl_rect_2d(interior, LLColor4::grey % alpha, TRUE);
+ gl_rect_2d(interior, LLColor4::grey % alpha, true);
gl_draw_x(interior, LLColor4::black % alpha);
}
@@ -253,7 +253,7 @@ void LLColorSwatchCtrl::draw()
LLUICtrl::draw();
}
-void LLColorSwatchCtrl::setEnabled( BOOL enabled )
+void LLColorSwatchCtrl::setEnabled( bool enabled )
{
mCaption->setEnabled( enabled );
LLView::setEnabled( enabled );
@@ -272,7 +272,7 @@ void LLColorSwatchCtrl::setEnabled( BOOL enabled )
void LLColorSwatchCtrl::setValue(const LLSD& value)
{
- set(LLColor4(value), TRUE, TRUE);
+ set(LLColor4(value), true, true);
}
//////////////////////////////////////////////////////////////////////////////
@@ -316,7 +316,7 @@ void LLColorSwatchCtrl::onColorChanged ( void* data, EColorPickOp pick_op )
{
// both select and cancel close LLFloaterColorPicker
// but COLOR_CHANGE does not
- subject->setFocus(TRUE);
+ subject->setFocus(true);
}
}
}
@@ -337,7 +337,7 @@ void LLColorSwatchCtrl::closeFloaterColorPicker()
mPickerHandle.markDead();
}
-void LLColorSwatchCtrl::setValid(BOOL valid )
+void LLColorSwatchCtrl::setValid(bool valid )
{
mValid = valid;
@@ -348,7 +348,7 @@ void LLColorSwatchCtrl::setValid(BOOL valid )
}
}
-void LLColorSwatchCtrl::showPicker(BOOL take_focus)
+void LLColorSwatchCtrl::showPicker(bool take_focus)
{
LLFloaterColorPicker* pickerp = (LLFloaterColorPicker*)mPickerHandle.get();
if (!pickerp)
@@ -370,7 +370,7 @@ void LLColorSwatchCtrl::showPicker(BOOL take_focus)
if (take_focus)
{
- pickerp->setFocus(TRUE);
+ pickerp->setFocus(true);
}
}
diff --git a/indra/newview/llcolorswatch.h b/indra/newview/llcolorswatch.h
index a17cab486a..aa273daa78 100644
--- a/indra/newview/llcolorswatch.h
+++ b/indra/newview/llcolorswatch.h
@@ -76,26 +76,26 @@ public:
/*virtual*/ LLSD getValue() const { return mColor.getValue(); }
const LLColor4& get() { return mColor; }
- void set(const LLColor4& color, BOOL update_picker = FALSE, BOOL from_event = FALSE);
+ void set(const LLColor4& color, bool update_picker = false, bool from_event = false);
void setOriginal(const LLColor4& color);
- void setValid(BOOL valid);
+ void setValid(bool valid);
void setLabel(const std::string& label);
void setLabelWidth(S32 label_width) {mLabelWidth =label_width;}
- void setCanApplyImmediately(BOOL apply) { mCanApplyImmediately = apply; }
+ void setCanApplyImmediately(bool apply) { mCanApplyImmediately = apply; }
void setOnCancelCallback(commit_callback_t cb) { mOnCancelCallback = cb; }
void setOnSelectCallback(commit_callback_t cb) { mOnSelectCallback = cb; }
void setPreviewCallback(commit_callback_t cb) { mPreviewCallback = cb; }
void setFallbackImage(LLPointer<LLUIImage> image) { mFallbackImage = image; }
- void showPicker(BOOL take_focus);
+ void showPicker(bool take_focus);
- /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleDoubleClick(S32 x,S32 y,MASK mask);
- /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleUnicodeCharHere(llwchar uni_char);
+ /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleDoubleClick(S32 x,S32 y,MASK mask);
+ /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleUnicodeCharHere(llwchar uni_char);
/*virtual*/ void draw();
- /*virtual*/ void setEnabled( BOOL enabled );
+ /*virtual*/ void setEnabled( bool enabled );
static void onColorChanged ( void* data, EColorPickOp pick_op = COLOR_CHANGE );
void closeFloaterColorPicker();
diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp
index 06d959ba3c..030d24bed8 100644
--- a/indra/newview/llcommandlineparser.cpp
+++ b/indra/newview/llcommandlineparser.cpp
@@ -571,8 +571,8 @@ void setControlValueCB(const LLCommandLineParser::token_vector_t& value,
std::string token(onevalue(option, value));
// There's a token. check the string for true/false/1/0 etc.
- BOOL result = false;
- BOOL gotSet = LLStringUtil::convertToBOOL(token, result);
+ bool result = false;
+ bool gotSet = LLStringUtil::convertToBOOL(token, result);
if (gotSet)
{
ctrl->setValue(LLSD(result), false);
@@ -657,12 +657,11 @@ void LLControlGroupCLP::configure(const std::string& config_filename, LLControlG
// This method reads the llsd based config file, and uses it to set
// members of a control group.
LLSD clpConfigLLSD;
-
- llifstream input_stream;
- input_stream.open(config_filename.c_str(), std::ios::in | std::ios::binary);
- if(input_stream.is_open())
+ std::string xml = gDirUtilp->getFileContents(config_filename);
+ if (!xml.empty())
{
+ std::stringstream input_stream(xml);
LLSDSerialize::fromXML(clpConfigLLSD, input_stream);
for(LLSD::map_iterator option_itr = clpConfigLLSD.beginMap();
option_itr != clpConfigLLSD.endMap();
diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp
index b11786a451..19b2ce77c5 100644
--- a/indra/newview/llcompilequeue.cpp
+++ b/indra/newview/llcompilequeue.cpp
@@ -194,12 +194,12 @@ LLFloaterScriptQueue::~LLFloaterScriptQueue()
{
}
-BOOL LLFloaterScriptQueue::postBuild()
+bool LLFloaterScriptQueue::postBuild()
{
childSetAction("close",onCloseBtn,this);
- getChildView("close")->setEnabled(FALSE);
+ getChildView("close")->setEnabled(false);
setVisible(true);
- return TRUE;
+ return true;
}
// static
@@ -215,7 +215,7 @@ void LLFloaterScriptQueue::addObject(const LLUUID& id, std::string name)
mObjectList.push_back(obj);
}
-BOOL LLFloaterScriptQueue::start()
+bool LLFloaterScriptQueue::start()
{
std::string buffer;
@@ -242,7 +242,7 @@ void LLFloaterScriptQueue::addStringMessage(const std::string &message)
}
-BOOL LLFloaterScriptQueue::isDone() const
+bool LLFloaterScriptQueue::isDone() const
{
return (mCurrentObjectID.isNull() && (mObjectList.size() == 0));
}
@@ -270,7 +270,7 @@ void LLFloaterCompileQueue::experienceIdsReceived( const LLSD& content )
}
}
-BOOL LLFloaterCompileQueue::hasExperience( const LLUUID& id ) const
+bool LLFloaterCompileQueue::hasExperience( const LLUUID& id ) const
{
return mExperienceIds.find(id) != mExperienceIds.end();
}
@@ -537,7 +537,7 @@ bool LLFloaterCompileQueue::startQueue()
LLCoreHttpUtil::HttpCoroutineAdapter::callbackHttpGet(lookup_url,
success, failure);
- return TRUE;
+ return true;
}
}
@@ -638,7 +638,7 @@ bool LLFloaterRunQueue::runObjectScripts(LLHandle<LLFloaterScriptQueue> hfloater
msg->nextBlockFast(_PREHASH_Script);
msg->addUUIDFast(_PREHASH_ObjectID, object->getID());
msg->addUUIDFast(_PREHASH_ItemID, inventory->getUUID());
- msg->addBOOLFast(_PREHASH_Running, TRUE);
+ msg->addBOOLFast(_PREHASH_Running, true);
msg->sendReliable(object->getRegion()->getHost());
return true;
@@ -695,7 +695,7 @@ bool LLFloaterNotRunQueue::stopObjectScripts(LLHandle<LLFloaterScriptQueue> hflo
msg->nextBlockFast(_PREHASH_Script);
msg->addUUIDFast(_PREHASH_ObjectID, object->getID());
msg->addUUIDFast(_PREHASH_ItemID, inventory->getUUID());
- msg->addBOOLFast(_PREHASH_Running, FALSE);
+ msg->addBOOLFast(_PREHASH_Running, false);
msg->sendReliable(object->getRegion()->getHost());
return true;
@@ -818,7 +818,7 @@ void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, L
}
floater->addStringMessage("Done");
- floater->getChildView("close")->setEnabled(TRUE);
+ floater->getChildView("close")->setEnabled(true);
}
catch (LLCheckedHandleBase::Stale &)
{
diff --git a/indra/newview/llcompilequeue.h b/indra/newview/llcompilequeue.h
index a9bac345b5..a6c8f4b9f5 100644
--- a/indra/newview/llcompilequeue.h
+++ b/indra/newview/llcompilequeue.h
@@ -53,15 +53,15 @@ public:
LLFloaterScriptQueue(const LLSD& key);
virtual ~LLFloaterScriptQueue();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
void setMono(bool mono) { mMono = mono; }
// addObject() accepts an object id.
void addObject(const LLUUID& id, std::string name);
- // start() returns TRUE if the queue has started, otherwise FALSE.
- BOOL start();
+ // start() returns true if the queue has started, otherwise false.
+ bool start();
void addProcessingMessage(const std::string &message, const LLSD &args);
void addStringMessage(const std::string &message);
@@ -72,7 +72,7 @@ protected:
static void onCloseBtn(void* user_data);
// returns true if this is done
- BOOL isDone() const;
+ bool isDone() const;
virtual bool startQueue() = 0;
@@ -123,7 +123,7 @@ class LLFloaterCompileQueue : public LLFloaterScriptQueue
public:
void experienceIdsReceived( const LLSD& content );
- BOOL hasExperience(const LLUUID& id)const;
+ bool hasExperience(const LLUUID& id)const;
protected:
LLFloaterCompileQueue(const LLSD& key);
diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp
index d764f64c79..f63f9d7ce7 100644
--- a/indra/newview/llcontrolavatar.cpp
+++ b/indra/newview/llcontrolavatar.cpp
@@ -51,7 +51,7 @@ LLControlAvatar::LLControlAvatar(const LLUUID& id, const LLPCode pcode, LLViewer
mScaleConstraintFixup(1.0),
mRegionChanged(false)
{
- mIsDummy = TRUE;
+ mIsDummy = true;
mIsControlAvatar = true;
mEnableDefaultMotions = false;
}
@@ -294,7 +294,7 @@ void LLControlAvatar::updateVolumeGeom()
return;
if (mRootVolp->mDrawable->isActive())
{
- mRootVolp->mDrawable->makeStatic(FALSE);
+ mRootVolp->mDrawable->makeStatic(false);
}
mRootVolp->mDrawable->makeActive();
gPipeline.markMoved(mRootVolp->mDrawable);
@@ -618,9 +618,9 @@ void LLControlAvatar::updateAnimations()
// virtual
LLViewerObject* LLControlAvatar::lineSegmentIntersectRiggedAttachments(const LLVector4a& start, const LLVector4a& end,
S32 face,
- BOOL pick_transparent,
- BOOL pick_rigged,
- BOOL pick_unselectable,
+ bool pick_transparent,
+ bool pick_rigged,
+ bool pick_unselectable,
S32* face_hit,
LLVector4a* intersection,
LLVector2* tex_coord,
@@ -697,7 +697,7 @@ bool LLControlAvatar::shouldRenderRigged() const
}
// virtual
-BOOL LLControlAvatar::isImpostor()
+bool LLControlAvatar::isImpostor()
{
// Attached animated objects should match state of their attached av.
LLVOAvatar *attached_av = getAttachedAvatar();
diff --git a/indra/newview/llcontrolavatar.h b/indra/newview/llcontrolavatar.h
index 34db285514..7beefad191 100644
--- a/indra/newview/llcontrolavatar.h
+++ b/indra/newview/llcontrolavatar.h
@@ -69,9 +69,9 @@ public:
virtual LLViewerObject* lineSegmentIntersectRiggedAttachments(
const LLVector4a& start, const LLVector4a& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
- BOOL pick_transparent = FALSE,
- BOOL pick_rigged = FALSE,
- BOOL pick_unselectable = TRUE,
+ bool pick_transparent = false,
+ bool pick_rigged = false,
+ bool pick_unselectable = true,
S32* face_hit = NULL, // which face was hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
@@ -84,7 +84,7 @@ public:
virtual bool shouldRenderRigged() const;
- virtual BOOL isImpostor();
+ virtual bool isImpostor();
bool mPlaying;
diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp
index 3c59ca046d..e4d2c8f39a 100644
--- a/indra/newview/llconversationlog.cpp
+++ b/indra/newview/llconversationlog.cpp
@@ -215,7 +215,7 @@ void LLConversationLog::enableLogging(S32 log_mode)
notifyObservers();
}
-void LLConversationLog::logConversation(const LLUUID& session_id, BOOL has_offline_msg)
+void LLConversationLog::logConversation(const LLUUID& session_id, bool has_offline_msg)
{
const LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(session_id);
LLConversation* conversation = findConversation(session);
@@ -272,7 +272,7 @@ void LLConversationLog::updateConversationName(const LLIMModel::LLIMSession* ses
}
}
-void LLConversationLog::updateOfflineIMs(const LLIMModel::LLIMSession* session, BOOL new_messages)
+void LLConversationLog::updateOfflineIMs(const LLIMModel::LLIMSession* session, bool new_messages)
{
if (!session)
{
@@ -354,7 +354,7 @@ void LLConversationLog::removeObserver(LLConversationLogObserver* observer)
mObservers.erase(observer);
}
-void LLConversationLog::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg)
+void LLConversationLog::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, bool has_offline_msg)
{
logConversation(session_id, has_offline_msg);
}
diff --git a/indra/newview/llconversationlog.h b/indra/newview/llconversationlog.h
index 54aeedcf9a..033ad2b6e9 100644
--- a/indra/newview/llconversationlog.h
+++ b/indra/newview/llconversationlog.h
@@ -125,7 +125,7 @@ public:
void removeObserver(LLConversationLogObserver* observer);
// LLIMSessionObserver triggers
- virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg) override;
+ virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, bool has_offline_msg) override;
virtual void sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) override {}; // Stub
virtual void sessionRemoved(const LLUUID& session_id) override{} // Stub
virtual void sessionVoiceOrIMStarted(const LLUUID& session_id) override{}; // Stub
@@ -179,7 +179,7 @@ private:
/**
* adds conversation to the conversation list and notifies observers
*/
- void logConversation(const LLUUID& session_id, BOOL has_offline_msg);
+ void logConversation(const LLUUID& session_id, bool has_offline_msg);
void notifyParticularConversationObservers(const LLUUID& session_id, U32 mask);
@@ -191,7 +191,7 @@ private:
void createConversation(const LLIMModel::LLIMSession* session);
void updateConversationTimestamp(LLConversation* conversation);
void updateConversationName(const LLIMModel::LLIMSession* session, const std::string& name);
- void updateOfflineIMs(const LLIMModel::LLIMSession* session, BOOL new_messages);
+ void updateOfflineIMs(const LLIMModel::LLIMSession* session, bool new_messages);
diff --git a/indra/newview/llconversationloglist.cpp b/indra/newview/llconversationloglist.cpp
index 97b16a5e93..0909fc4045 100644
--- a/indra/newview/llconversationloglist.cpp
+++ b/indra/newview/llconversationloglist.cpp
@@ -86,17 +86,17 @@ void LLConversationLogList::draw()
LLFlatListViewEx::draw();
}
-BOOL LLConversationLogList::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLConversationLogList::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
- BOOL handled = LLUICtrl::handleRightMouseDown(x, y, mask);
+ bool handled = LLUICtrl::handleRightMouseDown(x, y, mask);
LLToggleableMenu* context_menu = mContextMenu.get();
- {
- context_menu->buildDrawLabels();
- if (context_menu && size())
- context_menu->updateParent(LLMenuGL::sMenuContainer);
- LLMenuGL::showPopup(this, context_menu, x, y);
- }
+ if (context_menu && size())
+ {
+ context_menu->buildDrawLabels();
+ context_menu->updateParent(LLMenuGL::sMenuContainer);
+ LLMenuGL::showPopup(this, context_menu, x, y);
+ }
return handled;
}
@@ -369,7 +369,7 @@ bool LLConversationLogList::isActionEnabled(const LLSD& userdata)
bool is_p2p = LLIMModel::LLIMSession::P2P_SESSION == stype;
bool is_group = LLIMModel::LLIMSession::GROUP_SESSION == stype;
- bool is_group_member = is_group && gAgent.isInGroup(selected_id, TRUE);
+ bool is_group_member = is_group && gAgent.isInGroup(selected_id, true);
if ("can_im" == command_name)
{
diff --git a/indra/newview/llconversationloglist.h b/indra/newview/llconversationloglist.h
index 62ec57e09e..3849319ed7 100644
--- a/indra/newview/llconversationloglist.h
+++ b/indra/newview/llconversationloglist.h
@@ -59,7 +59,7 @@ public:
virtual void draw();
- virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleRightMouseDown(S32 x, S32 y, MASK mask);
LLToggleableMenu* getContextMenu() const { return mContextMenu.get(); }
diff --git a/indra/newview/llconversationloglistitem.cpp b/indra/newview/llconversationloglistitem.cpp
index 4e984d603b..4b62928fe4 100644
--- a/indra/newview/llconversationloglistitem.cpp
+++ b/indra/newview/llconversationloglistitem.cpp
@@ -62,7 +62,7 @@ LLConversationLogListItem::~LLConversationLogListItem()
mIMFloaterShowedConnection.disconnect();
}
-BOOL LLConversationLogListItem::postBuild()
+bool LLConversationLogListItem::postBuild()
{
initIcons();
@@ -77,7 +77,7 @@ BOOL LLConversationLogListItem::postBuild()
getChild<LLButton>("delete_btn")->setClickedCallback(boost::bind(&LLConversationLogListItem::onRemoveBtnClicked, this));
setDoubleClickCallback(boost::bind(&LLConversationLogListItem::onDoubleClick, this));
- return TRUE;
+ return true;
}
void LLConversationLogListItem::initIcons()
@@ -88,14 +88,14 @@ void LLConversationLogListItem::initIcons()
case LLIMModel::LLIMSession::ADHOC_SESSION:
{
LLAvatarIconCtrl* avatar_icon = getChild<LLAvatarIconCtrl>("avatar_icon");
- avatar_icon->setVisible(TRUE);
+ avatar_icon->setVisible(true);
avatar_icon->setValue(mConversation->getParticipantID());
break;
}
case LLIMModel::LLIMSession::GROUP_SESSION:
{
LLGroupIconCtrl* group_icon = getChild<LLGroupIconCtrl>("group_icon");
- group_icon->setVisible(TRUE);
+ group_icon->setVisible(true);
group_icon->setValue(mConversation->getSessionID());
break;
}
@@ -105,7 +105,7 @@ void LLConversationLogListItem::initIcons()
if (mConversation->hasOfflineMessages())
{
- getChild<LLIconCtrl>("unread_ims_icon")->setVisible(TRUE);
+ getChild<LLIconCtrl>("unread_ims_icon")->setVisible(true);
}
}
@@ -150,7 +150,7 @@ void LLConversationLogListItem::onIMFloaterShown(const LLUUID& session_id)
{
if (mConversation->getSessionID() == session_id)
{
- getChild<LLIconCtrl>("unread_ims_icon")->setVisible(FALSE);
+ getChild<LLIconCtrl>("unread_ims_icon")->setVisible(false);
}
}
diff --git a/indra/newview/llconversationloglistitem.h b/indra/newview/llconversationloglistitem.h
index ee28456bbb..55c3377302 100644
--- a/indra/newview/llconversationloglistitem.h
+++ b/indra/newview/llconversationloglistitem.h
@@ -53,7 +53,7 @@ public:
virtual void setValue(const LLSD& value);
- virtual BOOL postBuild();
+ virtual bool postBuild();
void onIMFloaterShown(const LLUUID& session_id);
void onRemoveBtnClicked();
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index f152e36cf5..44d4c863c7 100644
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -357,22 +357,20 @@ void LLConversationItemSession::clearParticipants()
void LLConversationItemSession::clearAndDeparentModels()
{
- std::for_each(mChildren.begin(), mChildren.end(),
- [](LLFolderViewModelItem* c)
+ for (LLFolderViewModelItem* child : mChildren)
+ {
+ if (child->getNumRefs() == 0)
+ {
+ // LLConversationItemParticipant can be created but not assigned to any view,
+ // it was waiting for an "add_participant" event to be processed
+ delete child;
+ }
+ else
{
- if (c->getNumRefs() == 0)
- {
- // LLConversationItemParticipant can be created but not assigned to any view,
- // it was waiting for an "add_participant" event to be processed
- delete c;
- }
- else
- {
- // Model is still assigned to some view/widget
- c->setParent(NULL);
- }
+ // Model is still assigned to some view/widget
+ child->setParent(NULL);
}
- );
+ }
mChildren.clear();
}
diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h
index 436c9c00ab..72db226177 100644
--- a/indra/newview/llconversationmodel.h
+++ b/indra/newview/llconversationmodel.h
@@ -75,27 +75,27 @@ public:
virtual std::string getSearchableUUIDString() const {return LLStringUtil::null;}
virtual const LLUUID& getUUID() const { return mUUID; }
virtual time_t getCreationDate() const { return 0; }
- virtual LLPointer<LLUIImage> getIcon() const { return NULL; }
+ virtual LLPointer<LLUIImage> getIcon() const { return nullptr; }
virtual LLPointer<LLUIImage> getOpenIcon() const { return getIcon(); }
virtual LLFontGL::StyleFlags getLabelStyle() const { return LLFontGL::NORMAL; }
virtual std::string getLabelSuffix() const { return LLStringUtil::null; }
- virtual BOOL isItemRenameable() const { return TRUE; }
- virtual BOOL renameItem(const std::string& new_name) { mName = new_name; mNeedsRefresh = true; return TRUE; }
- virtual BOOL isItemMovable( void ) const { return FALSE; }
- virtual BOOL isItemRemovable( void ) const { return FALSE; }
- virtual BOOL isItemInTrash( void) const { return FALSE; }
- virtual BOOL removeItem() { return FALSE; }
+ virtual bool isItemRenameable() const { return true; }
+ virtual bool renameItem(const std::string& new_name) { mName = new_name; mNeedsRefresh = true; return true; }
+ virtual bool isItemMovable( void ) const { return false; }
+ virtual bool isItemRemovable( void ) const { return false; }
+ virtual bool isItemInTrash( void) const { return false; }
+ virtual bool removeItem() { return false; }
virtual void removeBatch(std::vector<LLFolderViewModelItem*>& batch) { }
virtual void move( LLFolderViewModelItem* parent_listener ) { }
virtual bool isItemCopyable(bool can_copy_as_link = true) const { return false; }
- virtual BOOL copyToClipboard() const { return FALSE; }
- virtual BOOL cutToClipboard() { return FALSE; }
- virtual BOOL isClipboardPasteable() const { return FALSE; }
+ virtual bool copyToClipboard() const { return false; }
+ virtual bool cutToClipboard() { return false; }
+ virtual bool isClipboardPasteable() const { return false; }
virtual void pasteFromClipboard() { }
virtual void pasteLinkFromClipboard() { }
virtual void buildContextMenu(LLMenuGL& menu, U32 flags) { }
- virtual BOOL isUpToDate() const { return TRUE; }
- virtual bool hasChildren() const { return FALSE; }
+ virtual bool isUpToDate() const { return true; }
+ virtual bool hasChildren() const { return false; }
virtual void addChild(LLFolderViewModelItem* child);
virtual bool potentiallyVisible() { return true; }
@@ -119,13 +119,13 @@ public:
virtual const bool getDistanceToAgent(F64& distance) const { return false; }
// This method will be called to determine if a drop can be
- // performed, and will set drop to TRUE if a drop is
+ // performed, and will set drop to true if a drop is
// requested.
- // Returns TRUE if a drop is possible/happened, FALSE otherwise.
- virtual BOOL dragOrDrop(MASK mask, BOOL drop,
+ // Returns true if a drop is possible/happened, false otherwise.
+ virtual bool dragOrDrop(MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
- std::string& tooltip_msg) { return FALSE; }
+ std::string& tooltip_msg) { return false; }
// bool hasSameValues(std::string name, const LLUUID& uuid) { return ((name == mName) && (uuid == mUUID)); }
bool hasSameValue(const LLUUID& uuid) { return (uuid == mUUID); }
@@ -160,7 +160,7 @@ public:
~LLConversationItemSession();
/*virtual*/ bool hasChildren() const;
- LLPointer<LLUIImage> getIcon() const { return NULL; }
+ LLPointer<LLUIImage> getIcon() const { return nullptr; }
void setSessionID(const LLUUID& session_id) { mUUID = session_id; mNeedsRefresh = true; }
void addParticipant(LLConversationItemParticipant* participant);
void updateName(LLConversationItemParticipant* participant);
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 48c7df40df..7e592ab468 100644
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -204,7 +204,7 @@ bool LLConversationViewSession::isHighlightActive()
return (mFlashStateOn ? (mFlashTimer->isFlashingInProgress() ? mFlashTimer->isCurrentlyHighlighted() : true) : mIsCurSelection);
}
-BOOL LLConversationViewSession::postBuild()
+bool LLConversationViewSession::postBuild()
{
LLFolderViewItem::postBuild();
@@ -276,7 +276,7 @@ BOOL LLConversationViewSession::postBuild()
refresh(); // requires vmi
}
- return TRUE;
+ return true;
}
void LLConversationViewSession::draw()
@@ -284,7 +284,7 @@ void LLConversationViewSession::draw()
getViewModelItem()->update();
const LLFolderViewItem::Params& default_params = LLUICtrlFactory::getDefaultParams<LLFolderViewItem>();
- const BOOL show_context = (getRoot() ? getRoot()->getShowSelectionContext() : FALSE);
+ const bool show_context = (getRoot() ? getRoot()->getShowSelectionContext() : false);
// Indicate that flash can start (moot operation if already started, done or not flashing)
startFlashing();
@@ -320,10 +320,10 @@ void LLConversationViewSession::draw()
LLView::draw();
}
-BOOL LLConversationViewSession::handleMouseDown( S32 x, S32 y, MASK mask )
+bool LLConversationViewSession::handleMouseDown( S32 x, S32 y, MASK mask )
{
//Will try to select a child node and then itself (if a child was not selected)
- BOOL result = LLFolderViewFolder::handleMouseDown(x, y, mask);
+ bool result = LLFolderViewFolder::handleMouseDown(x, y, mask);
//This node (conversation) was selected and a child (participant) was not
if(result && getRoot())
@@ -349,9 +349,9 @@ BOOL LLConversationViewSession::handleMouseDown( S32 x, S32 y, MASK mask )
return result;
}
-BOOL LLConversationViewSession::handleMouseUp( S32 x, S32 y, MASK mask )
+bool LLConversationViewSession::handleMouseUp( S32 x, S32 y, MASK mask )
{
- BOOL result = LLFolderViewFolder::handleMouseUp(x, y, mask);
+ bool result = LLFolderViewFolder::handleMouseUp(x, y, mask);
LLFloater* volume_floater = LLFloaterReg::findInstance("floater_voice_volume");
LLFloater* chat_volume_floater = LLFloaterReg::findInstance("chat_voice");
@@ -372,9 +372,9 @@ BOOL LLConversationViewSession::handleMouseUp( S32 x, S32 y, MASK mask )
return result;
}
-BOOL LLConversationViewSession::handleRightMouseDown( S32 x, S32 y, MASK mask )
+bool LLConversationViewSession::handleRightMouseDown( S32 x, S32 y, MASK mask )
{
- BOOL result = LLFolderViewFolder::handleRightMouseDown(x, y, mask);
+ bool result = LLFolderViewFolder::handleRightMouseDown(x, y, mask);
if(result)
{
@@ -444,7 +444,7 @@ void LLConversationViewSession::toggleCollapsedMode(bool is_collapsed)
mItemPanel->translate(mCollapsedMode ? -h_pad : h_pad, 0);
}
-void LLConversationViewSession::setVisibleIfDetached(BOOL visible)
+void LLConversationViewSession::setVisibleIfDetached(bool visible)
{
// Do this only if the conversation floater has been torn off (i.e. no multi floater host) and is not minimized
// Note: minimized dockable floaters are brought to front hence unminimized when made visible and we don't want that here
@@ -614,7 +614,7 @@ void LLConversationViewParticipant::initFromParams(const LLConversationViewParti
addChild(outputMonitor);
}
-BOOL LLConversationViewParticipant::postBuild()
+bool LLConversationViewParticipant::postBuild()
{
mAvatarIcon = getChild<LLAvatarIconCtrl>("avatar_icon");
@@ -638,7 +638,7 @@ BOOL LLConversationViewParticipant::postBuild()
LLFolderViewItem::postBuild();
refresh();
}
- return TRUE;
+ return true;
}
void LLConversationViewParticipant::draw()
@@ -651,7 +651,7 @@ void LLConversationViewParticipant::draw()
static LLUIColor sFocusOutlineColor = LLUIColorTable::instance().getColor("InventoryFocusOutlineColor", DEFAULT_WHITE);
static LLUIColor sMouseOverColor = LLUIColorTable::instance().getColor("InventoryMouseOverColor", DEFAULT_WHITE);
- const BOOL show_context = (getRoot() ? getRoot()->getShowSelectionContext() : FALSE);
+ const bool show_context = (getRoot() ? getRoot()->getShowSelectionContext() : false);
const LLFontGL* font = getLabelFontForStyle(mLabelStyle);
F32 right_x = 0;
@@ -763,9 +763,9 @@ void LLConversationViewParticipant::onInfoBtnClick()
LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", mUUID));
}
-BOOL LLConversationViewParticipant::handleMouseDown( S32 x, S32 y, MASK mask )
+bool LLConversationViewParticipant::handleMouseDown( S32 x, S32 y, MASK mask )
{
- BOOL result = LLFolderViewItem::handleMouseDown(x, y, mask);
+ bool result = LLFolderViewItem::handleMouseDown(x, y, mask);
if(result && getRoot())
{
diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h
index 0932d24dfe..75d7f278a4 100644
--- a/indra/newview/llconversationview.h
+++ b/indra/newview/llconversationview.h
@@ -69,11 +69,11 @@ public:
/*virtual*/ void destroyView();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void draw();
- /*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask );
- /*virtual*/ BOOL handleRightMouseDown( S32 x, S32 y, MASK mask );
- /*virtual*/ BOOL handleMouseUp( S32 x, S32 y, MASK mask );
+ /*virtual*/ bool handleMouseDown( S32 x, S32 y, MASK mask );
+ /*virtual*/ bool handleRightMouseDown( S32 x, S32 y, MASK mask );
+ /*virtual*/ bool handleMouseUp( S32 x, S32 y, MASK mask );
/*virtual*/ S32 arrange(S32* width, S32* height);
@@ -83,7 +83,7 @@ public:
void toggleCollapsedMode(bool is_collapsed);
- void setVisibleIfDetached(BOOL visible);
+ void setVisibleIfDetached(bool visible);
LLConversationViewParticipant* findParticipant(const LLUUID& participant_id);
void showVoiceIndicator(bool visible);
@@ -151,14 +151,14 @@ public:
void onMouseLeave(S32 x, S32 y, MASK mask);
/*virtual*/ S32 getLabelXPos();
- /*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask );
+ /*virtual*/ bool handleMouseDown( S32 x, S32 y, MASK mask );
void allowSpeakingIndicator(bool val);
protected:
friend class LLUICtrlFactory;
LLConversationViewParticipant( const Params& p );
void initFromParams(const Params& params);
- BOOL postBuild();
+ bool postBuild();
/*virtual*/ void draw();
/*virtual*/ S32 arrange(S32* width, S32* height);
diff --git a/indra/newview/llcurrencyuimanager.cpp b/indra/newview/llcurrencyuimanager.cpp
index 4c0a5cf183..a0d0d4bc6b 100644
--- a/indra/newview/llcurrencyuimanager.cpp
+++ b/indra/newview/llcurrencyuimanager.cpp
@@ -413,8 +413,8 @@ void LLCurrencyUIManager::Impl::currencyKey(S32 value)
//cannot just simply refresh the whole UI, as the edit field will
// get reset and the cursor will change...
- mPanel.getChildView("currency_est")->setVisible(FALSE);
- mPanel.getChildView("getting_data")->setVisible(TRUE);
+ mPanel.getChildView("currency_est")->setVisible(false);
+ mPanel.getChildView("getting_data")->setVisible(true);
}
mCurrencyChanged = true;
@@ -443,13 +443,13 @@ void LLCurrencyUIManager::Impl::updateUI()
{
if (mHidden)
{
- mPanel.getChildView("currency_action")->setVisible(FALSE);
- mPanel.getChildView("currency_amt")->setVisible(FALSE);
- mPanel.getChildView("currency_est")->setVisible(FALSE);
+ mPanel.getChildView("currency_action")->setVisible(false);
+ mPanel.getChildView("currency_amt")->setVisible(false);
+ mPanel.getChildView("currency_est")->setVisible(false);
return;
}
- mPanel.getChildView("currency_action")->setVisible(TRUE);
+ mPanel.getChildView("currency_action")->setVisible(true);
LLLineEditor* lindenAmount = mPanel.getChild<LLLineEditor>("currency_amt");
if (lindenAmount)
@@ -483,7 +483,7 @@ void LLCurrencyUIManager::Impl::updateUI()
||mPanel.getChildView("currency_est")->getVisible()
|| mPanel.getChildView("error_web")->getVisible())
{
- mPanel.getChildView("getting_data")->setVisible(FALSE);
+ mPanel.getChildView("getting_data")->setVisible(false);
}
}
diff --git a/indra/newview/lldebugmessagebox.cpp b/indra/newview/lldebugmessagebox.cpp
index c8b9b1ac63..da56934533 100644
--- a/indra/newview/lldebugmessagebox.cpp
+++ b/indra/newview/lldebugmessagebox.cpp
@@ -45,7 +45,7 @@ std::map<std::string, LLDebugVarMessageBox*> LLDebugVarMessageBox::sInstances;
LLDebugVarMessageBox::LLDebugVarMessageBox(const std::string& title, EDebugVarType var_type, void *var) :
LLFloater(LLSD()),
- mVarType(var_type), mVarData(var), mAnimate(FALSE)
+ mVarType(var_type), mVarData(var), mAnimate(false)
{
setRect(LLRect(10,160,400,10));
diff --git a/indra/newview/lldebugmessagebox.h b/indra/newview/lldebugmessagebox.h
index 87a0910662..0cd01f1e84 100644
--- a/indra/newview/lldebugmessagebox.h
+++ b/indra/newview/lldebugmessagebox.h
@@ -80,7 +80,7 @@ protected:
LLButton* mAnimateButton;
LLTextBox* mText;
std::string mTitle;
- BOOL mAnimate;
+ bool mAnimate;
static std::map<std::string, LLDebugVarMessageBox*> sInstances;
};
diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp
index dc1c085c88..7f5458103e 100644
--- a/indra/newview/lldebugview.cpp
+++ b/indra/newview/lldebugview.cpp
@@ -94,14 +94,14 @@ void LLDebugView::init()
gSceneView = new LLSceneView(r);
gSceneView->setFollowsTop();
gSceneView->setFollowsLeft();
- gSceneView->setVisible(FALSE);
+ gSceneView->setVisible(false);
addChild(gSceneView);
gSceneView->setRect(rect);
gSceneMonitorView = new LLSceneMonitorView(r);
gSceneMonitorView->setFollowsTop();
gSceneMonitorView->setFollowsLeft();
- gSceneMonitorView->setVisible(FALSE);
+ gSceneMonitorView->setVisible(false);
addChild(gSceneMonitorView);
gSceneMonitorView->setRect(rect);
@@ -116,7 +116,7 @@ void LLDebugView::init()
tvp.visible(false);
gTextureView = LLUICtrlFactory::create<LLTextureView>(tvp);
addChild(gTextureView);
- //gTextureView->reshape(r.getWidth(), r.getHeight(), TRUE);
+ //gTextureView->reshape(r.getWidth(), r.getHeight(), true);
}
void LLDebugView::draw()
diff --git a/indra/newview/lldebugview.h b/indra/newview/lldebugview.h
index a6490c876c..ee7150f7c9 100644
--- a/indra/newview/lldebugview.h
+++ b/indra/newview/lldebugview.h
@@ -57,7 +57,7 @@ public:
void init();
void draw();
- void setStatsVisible(BOOL visible);
+ void setStatsVisible(bool visible);
LLFastTimerView* mFastTimerView;
LLConsole* mDebugConsolep;
diff --git a/indra/newview/lldensityctrl.cpp b/indra/newview/lldensityctrl.cpp
deleted file mode 100644
index 298a309e7c..0000000000
--- a/indra/newview/lldensityctrl.cpp
+++ /dev/null
@@ -1,225 +0,0 @@
-/**
-* @file lldensityctrl.cpp
-* @brief Control for specifying density over a height range for sky settings.
-*
-* $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 "lldensityctrl.h"
-
-#include "llslider.h"
-#include "llsliderctrl.h"
-#include "llsettingssky.h"
-
-static LLDefaultChildRegistry::Register<LLDensityCtrl> register_density_control("densityctrl");
-
-const std::string LLDensityCtrl::DENSITY_RAYLEIGH("density_rayleigh");
-const std::string LLDensityCtrl::DENSITY_MIE("density_mie");
-const std::string LLDensityCtrl::DENSITY_ABSORPTION("density_absorption");
-
-namespace
-{
- const std::string FIELD_SKY_DENSITY_PROFILE_EXPONENTIAL("level_exponential");
- const std::string FIELD_SKY_DENSITY_PROFILE_EXPONENTIAL_SCALE("exponential_scale");
- const std::string FIELD_SKY_DENSITY_PROFILE_LINEAR("level_linear");
- const std::string FIELD_SKY_DENSITY_PROFILE_CONSTANT("level_constant");
- const std::string FIELD_SKY_DENSITY_MAX_ALTITUDE("max_altitude");
- const std::string FIELD_SKY_DENSITY_ANISO_FACTOR("aniso_factor");
- const std::string FIELD_SKY_DENSITY_ANISO_FACTOR_LABEL("aniso_factor_label");
-}
-
-const std::string& LLDensityCtrl::NameForDensityProfileType(DensityProfileType t)
-{
- switch (t)
- {
- case Rayleigh: return DENSITY_RAYLEIGH;
- case Mie: return DENSITY_MIE;
- case Absorption: return DENSITY_ABSORPTION;
- default:
- break;
- }
-
- llassert(false);
- return DENSITY_RAYLEIGH;
-}
-
-LLDensityCtrl::Params::Params()
-: image_density_feedback("image_density_feedback")
-, lbl_exponential("label_exponential")
-, lbl_exponential_scale("label_exponential_scale")
-, lbl_linear("label_linear")
-, lbl_constant("label_constant")
-, lbl_max_altitude("label_max_altitude")
-, lbl_aniso_factor("label_aniso_factor")
-, profile_type(LLDensityCtrl::Rayleigh)
-{
-}
-
-LLDensityCtrl::LLDensityCtrl(const Params& params)
-: mProfileType(params.profile_type)
-, mImgDensityFeedback(params.image_density_feedback)
-{
-
-}
-
-LLSD LLDensityCtrl::getProfileConfig()
-{
- LLSD config;
- switch (mProfileType)
- {
- case Rayleigh: return mSkySettings->getRayleighConfigs();
- case Mie: return mSkySettings->getMieConfigs();
- case Absorption: return mSkySettings->getAbsorptionConfigs();
- default:
- break;
- }
- llassert(false);
- return config;
-}
-
-BOOL LLDensityCtrl::postBuild()
-{
- getChild<LLUICtrl>(FIELD_SKY_DENSITY_PROFILE_EXPONENTIAL)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onExponentialChanged(); });
- getChild<LLUICtrl>(FIELD_SKY_DENSITY_PROFILE_EXPONENTIAL_SCALE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onExponentialScaleFactorChanged(); });
- getChild<LLUICtrl>(FIELD_SKY_DENSITY_PROFILE_LINEAR)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onLinearChanged(); });
- getChild<LLUICtrl>(FIELD_SKY_DENSITY_PROFILE_CONSTANT)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onConstantChanged(); });
- getChild<LLUICtrl>(FIELD_SKY_DENSITY_MAX_ALTITUDE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMaxAltitudeChanged(); });
- getChild<LLUICtrl>(FIELD_SKY_DENSITY_ANISO_FACTOR)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onAnisoFactorChanged(); });
-
- if (mProfileType != Mie)
- {
- getChild<LLUICtrl>(FIELD_SKY_DENSITY_ANISO_FACTOR_LABEL)->setValue(false);
- getChild<LLUICtrl>(FIELD_SKY_DENSITY_ANISO_FACTOR)->setVisible(false);
- }
-
- return TRUE;
-}
-
-void LLDensityCtrl::setEnabled(BOOL enabled)
-{
- getChild<LLUICtrl>(FIELD_SKY_DENSITY_PROFILE_EXPONENTIAL)->setEnabled(enabled);
- getChild<LLUICtrl>(FIELD_SKY_DENSITY_PROFILE_EXPONENTIAL_SCALE)->setEnabled(enabled);
- getChild<LLUICtrl>(FIELD_SKY_DENSITY_PROFILE_LINEAR)->setEnabled(enabled);
- getChild<LLUICtrl>(FIELD_SKY_DENSITY_PROFILE_CONSTANT)->setEnabled(enabled);
- getChild<LLUICtrl>(FIELD_SKY_DENSITY_MAX_ALTITUDE)->setEnabled(enabled);
-
- if (mProfileType == Mie)
- {
- getChild<LLUICtrl>(FIELD_SKY_DENSITY_ANISO_FACTOR)->setEnabled(enabled);
- }
-}
-
-void LLDensityCtrl::refresh()
-{
- if (!mSkySettings)
- {
- setAllChildrenEnabled(FALSE);
- setEnabled(FALSE);
- return;
- }
-
- setEnabled(TRUE);
- setAllChildrenEnabled(TRUE);
-
- LLSD config = getProfileConfig();
-
- getChild<LLSliderCtrl>(FIELD_SKY_DENSITY_PROFILE_EXPONENTIAL)->setValue(config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM]);
- getChild<LLSliderCtrl>(FIELD_SKY_DENSITY_PROFILE_EXPONENTIAL_SCALE)->setValue(config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR]);
- getChild<LLSliderCtrl>(FIELD_SKY_DENSITY_PROFILE_LINEAR)->setValue(config[LLSettingsSky::SETTING_DENSITY_PROFILE_LINEAR_TERM]);
- getChild<LLSliderCtrl>(FIELD_SKY_DENSITY_PROFILE_CONSTANT)->setValue(config[LLSettingsSky::SETTING_DENSITY_PROFILE_CONSTANT_TERM]);
- getChild<LLSliderCtrl>(FIELD_SKY_DENSITY_MAX_ALTITUDE)->setValue(config[LLSettingsSky::SETTING_DENSITY_PROFILE_WIDTH]);
-
- if (mProfileType == Mie)
- {
- getChild<LLSliderCtrl>(FIELD_SKY_DENSITY_ANISO_FACTOR)->setValue(config[LLSettingsSky::SETTING_MIE_ANISOTROPY_FACTOR]);
- }
-}
-
-void LLDensityCtrl::updateProfile()
-{
- F32 exponential_term = getChild<LLSliderCtrl>(FIELD_SKY_DENSITY_PROFILE_EXPONENTIAL)->getValueF32();
- F32 exponential_scale = getChild<LLSliderCtrl>(FIELD_SKY_DENSITY_PROFILE_EXPONENTIAL_SCALE)->getValueF32();
- F32 linear_term = getChild<LLSliderCtrl>(FIELD_SKY_DENSITY_PROFILE_LINEAR)->getValueF32();
- F32 constant_term = getChild<LLSliderCtrl>(FIELD_SKY_DENSITY_PROFILE_CONSTANT)->getValueF32();
- F32 max_alt = getChild<LLSliderCtrl>(FIELD_SKY_DENSITY_MAX_ALTITUDE)->getValueF32();
- F32 aniso_factor = 0.0f;
-
- if (mProfileType == Mie)
- {
- aniso_factor = getChild<LLSliderCtrl>(FIELD_SKY_DENSITY_ANISO_FACTOR)->getValueF32();
- }
-
- LLSD profile = LLSettingsSky::createSingleLayerDensityProfile(max_alt, exponential_term, exponential_scale, linear_term, constant_term, aniso_factor);
-
- switch (mProfileType)
- {
- case Rayleigh: mSkySettings->setRayleighConfigs(profile); break;
- case Mie: mSkySettings->setMieConfigs(profile); break;
- case Absorption: mSkySettings->setAbsorptionConfigs(profile); break;
- default:
- break;
- }
-}
-
-void LLDensityCtrl::onExponentialChanged()
-{
- updateProfile();
- updatePreview();
-}
-
-void LLDensityCtrl::onExponentialScaleFactorChanged()
-{
- updateProfile();
- updatePreview();
-}
-
-void LLDensityCtrl::onLinearChanged()
-{
- updateProfile();
- updatePreview();
-}
-
-void LLDensityCtrl::onConstantChanged()
-{
- updateProfile();
- updatePreview();
-}
-
-void LLDensityCtrl::onMaxAltitudeChanged()
-{
- updateProfile();
- updatePreview();
-}
-
-void LLDensityCtrl::onAnisoFactorChanged()
-{
- updateProfile();
-}
-
-void LLDensityCtrl::updatePreview()
-{
- // AdvancedAtmospherics TODO
- // Generate image according to current density profile
-}
-
diff --git a/indra/newview/lldensityctrl.h b/indra/newview/lldensityctrl.h
deleted file mode 100644
index 789022803c..0000000000
--- a/indra/newview/lldensityctrl.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
-* @file lldensityctrl.h
-* @brief Control for specifying density over a height range for sky settings.
-*
-* $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 LLDENSITY_CTRL_H
-#define LLDENSITY_CTRL_H
-
-#include "lluictrl.h"
-#include "llsettingssky.h"
-#include "lltextbox.h"
-#include "llsliderctrl.h"
-
-class LLDensityCtrl : public LLUICtrl
-{
-public:
- static const std::string DENSITY_RAYLEIGH;
- static const std::string DENSITY_MIE;
- static const std::string DENSITY_ABSORPTION;
-
- // Type of density profile this tab is updating
- enum DensityProfileType
- {
- Rayleigh,
- Mie,
- Absorption
- };
-
- static const std::string& NameForDensityProfileType(DensityProfileType t);
-
- struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
- {
- Optional<LLTextBox::Params> lbl_exponential,
- lbl_exponential_scale,
- lbl_linear,
- lbl_constant,
- lbl_max_altitude,
- lbl_aniso_factor;
-
- Optional<LLSliderCtrl::Params> exponential_slider,
- exponential_scale_slider,
- linear_slider,
- constant_slider,
- aniso_factor_slider;
-
- Optional<LLUIImage*> image_density_feedback;
-
- DensityProfileType profile_type;
- Params();
- };
-
- virtual BOOL postBuild() override;
- virtual void setEnabled(BOOL enabled) override;
-
- void setProfileType(DensityProfileType t) { mProfileType = t; }
-
- void refresh();
- void updateProfile();
-
- LLSettingsSky::ptr_t getSky() const { return mSkySettings; }
- void setSky(const LLSettingsSky::ptr_t &sky) { mSkySettings = sky; refresh(); }
-
-protected:
- friend class LLUICtrlFactory;
- LLDensityCtrl(const Params&);
-
- LLSD getProfileConfig();
- void updatePreview();
-
-private:
- void onExponentialChanged();
- void onExponentialScaleFactorChanged();
- void onLinearChanged();
- void onConstantChanged();
- void onMaxAltitudeChanged();
- void onAnisoFactorChanged();
-
- DensityProfileType mProfileType = Rayleigh;
- LLUIImage* mImgDensityFeedback = nullptr;
- LLSettingsSky::ptr_t mSkySettings;
-};
-
-#endif LLDENSITY_CTRL_H
diff --git a/indra/newview/lldirpicker.cpp b/indra/newview/lldirpicker.cpp
index 01790ad19e..ce7f7eb938 100644
--- a/indra/newview/lldirpicker.cpp
+++ b/indra/newview/lldirpicker.cpp
@@ -41,12 +41,6 @@
# include "llfilepicker.h"
#endif
-//
-// Globals
-//
-
-LLDirPicker LLDirPicker::sInstance;
-
#if LL_WINDOWS
#include <shlobj.h>
#endif
@@ -75,37 +69,40 @@ bool LLDirPicker::check_local_file_access_enabled()
LLDirPicker::LLDirPicker() :
mFileName(NULL),
- mLocked(false)
+ mLocked(false),
+ pDialog(NULL)
{
- bi.hwndOwner = NULL;
- bi.pidlRoot = NULL;
- bi.pszDisplayName = NULL;
- bi.lpszTitle = NULL;
- bi.ulFlags = BIF_USENEWUI;
- bi.lpfn = NULL;
- bi.lParam = NULL;
- bi.iImage = 0;
}
LLDirPicker::~LLDirPicker()
{
- // nothing
+ mEventListener.disconnect();
}
-BOOL LLDirPicker::getDir(std::string* filename, bool blocking)
+void LLDirPicker::reset()
+{
+ if (pDialog)
+ {
+ IFileDialog* p_file_dialog = (IFileDialog*)pDialog;
+ p_file_dialog->Close(S_FALSE);
+ pDialog = NULL;
+ }
+}
+
+bool LLDirPicker::getDir(std::string* filename, bool blocking)
{
if( mLocked )
{
- return FALSE;
+ return false;
}
// if local file browsing is turned off, return without opening dialog
if ( check_local_file_access_enabled() == false )
{
- return FALSE;
+ return false;
}
- BOOL success = FALSE;
+ bool success = false;
if (blocking)
@@ -113,26 +110,51 @@ BOOL LLDirPicker::getDir(std::string* filename, bool blocking)
// Modal, so pause agent
send_agent_pause();
}
-
- bi.hwndOwner = (HWND)gViewerWindow->getPlatformWindow();
+ else if (!mEventListener.connected())
+ {
+ mEventListener = LLEventPumps::instance().obtain("LLApp").listen(
+ "DirPicker",
+ [this](const LLSD& stat)
+ {
+ std::string status(stat["status"]);
+ if (status != "running")
+ {
+ reset();
+ }
+ return false;
+ });
+ }
::OleInitialize(NULL);
- LPITEMIDLIST pIDL = ::SHBrowseForFolder(&bi);
- if(pIDL != NULL)
- {
- WCHAR buffer[_MAX_PATH] = {'\0'};
-
- if(::SHGetPathFromIDList(pIDL, buffer) != 0)
- {
- // Set the string value.
-
- mDir = utf16str_to_utf8str(llutf16string(buffer));
- success = TRUE;
- }
- // free the item id list
- CoTaskMemFree(pIDL);
- }
+ IFileDialog* p_file_dialog;
+ if (SUCCEEDED(CoCreateInstance(CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&p_file_dialog))))
+ {
+ DWORD dwOptions;
+ if (SUCCEEDED(p_file_dialog->GetOptions(&dwOptions)))
+ {
+ p_file_dialog->SetOptions(dwOptions | FOS_PICKFOLDERS);
+ }
+ HWND owner = (HWND)gViewerWindow->getPlatformWindow();
+ pDialog = p_file_dialog;
+ if (SUCCEEDED(p_file_dialog->Show(owner)))
+ {
+ IShellItem* psi;
+ if (SUCCEEDED(p_file_dialog->GetResult(&psi)))
+ {
+ wchar_t* pwstr = NULL;
+ if (SUCCEEDED(psi->GetDisplayName(SIGDN_FILESYSPATH, &pwstr)))
+ {
+ mDir = ll_convert_wide_to_string(pwstr);
+ CoTaskMemFree(pwstr);
+ success = true;
+ }
+ psi->Release();
+ }
+ }
+ pDialog = NULL;
+ p_file_dialog->Release();
+ }
::OleUninitialize();
@@ -175,7 +197,7 @@ void LLDirPicker::reset()
//static
-BOOL LLDirPicker::getDir(std::string* filename, bool blocking)
+bool LLDirPicker::getDir(std::string* filename, bool blocking)
{
LLFilePicker::ELoadFilter filter=LLFilePicker::FFLOAD_DIRECTORY;
@@ -209,14 +231,14 @@ void LLDirPicker::reset()
mFilePicker->reset();
}
-BOOL LLDirPicker::getDir(std::string* filename, bool blocking)
+bool LLDirPicker::getDir(std::string* filename, bool blocking)
{
reset();
// if local file browsing is turned off, return without opening dialog
if ( check_local_file_access_enabled() == false )
{
- return FALSE;
+ return false;
}
#if !LL_MESA_HEADLESS
@@ -236,7 +258,7 @@ BOOL LLDirPicker::getDir(std::string* filename, bool blocking)
}
#endif // !LL_MESA_HEADLESS
- return FALSE;
+ return false;
}
std::string LLDirPicker::getDirName()
@@ -264,9 +286,9 @@ void LLDirPicker::reset()
{
}
-BOOL LLDirPicker::getDir(std::string* filename, bool blocking)
+bool LLDirPicker::getDir(std::string* filename, bool blocking)
{
- return FALSE;
+ return false;
}
std::string LLDirPicker::getDirName()
diff --git a/indra/newview/lldirpicker.h b/indra/newview/lldirpicker.h
index 52febe4523..12655229b3 100644
--- a/indra/newview/lldirpicker.h
+++ b/indra/newview/lldirpicker.h
@@ -57,10 +57,7 @@ class LLFilePicker;
class LLDirPicker
{
public:
- // calling this before main() is undefined
- static LLDirPicker& instance( void ) { return sInstance; }
-
- BOOL getDir(std::string* filename, bool blocking = true);
+ bool getDir(std::string* filename, bool blocking = true);
std::string getDirName();
// clear any lists of buffers or whatever, and make sure the dir
@@ -87,12 +84,9 @@ private:
std::string* mFileName;
std::string mDir;
bool mLocked;
+ void *pDialog;
+ boost::signals2::connection mEventListener;
- static LLDirPicker sInstance;
-#if LL_WINDOWS
- BROWSEINFO bi;
-#endif
-
public:
// don't call these directly please.
LLDirPicker();
diff --git a/indra/newview/lldndbutton.cpp b/indra/newview/lldndbutton.cpp
index 7c9dda6b1d..b8d5336ae4 100644
--- a/indra/newview/lldndbutton.cpp
+++ b/indra/newview/lldndbutton.cpp
@@ -35,7 +35,7 @@ LLDragAndDropButton::LLDragAndDropButton(const Params& params)
: LLButton(params)
{}
-BOOL LLDragAndDropButton::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg)
+bool LLDragAndDropButton::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg)
{
if (mDragDropHandler)
{
diff --git a/indra/newview/lldndbutton.h b/indra/newview/lldndbutton.h
index 53ea2f5ea7..7cded48dc3 100644
--- a/indra/newview/lldndbutton.h
+++ b/indra/newview/lldndbutton.h
@@ -48,7 +48,7 @@ public:
LLDragAndDropButton(const Params& params);
typedef boost::function<bool (
- S32 /*x*/, S32 /*y*/, MASK /*mask*/, BOOL /*drop*/,
+ S32 /*x*/, S32 /*y*/, MASK /*mask*/, bool /*drop*/,
EDragAndDropType /*cargo_type*/,
void* /*cargo_data*/,
EAcceptance* /*accept*/,
@@ -64,9 +64,9 @@ public:
/**
* Process Drag-And-Drop by delegating the event to drag_drop_handler_t.
*
- * @return BOOL - value returned by drag_drop_handler_t if it is set, FALSE otherwise.
+ * @return bool - value returned by drag_drop_handler_t if it is set, false otherwise.
*/
- /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
diff --git a/indra/newview/lldonotdisturbnotificationstorage.cpp b/indra/newview/lldonotdisturbnotificationstorage.cpp
index 4d9ef99319..93a0ef0e82 100644
--- a/indra/newview/lldonotdisturbnotificationstorage.cpp
+++ b/indra/newview/lldonotdisturbnotificationstorage.cpp
@@ -55,7 +55,7 @@ LLDoNotDisturbNotificationStorageTimer::~LLDoNotDisturbNotificationStorageTimer(
}
-BOOL LLDoNotDisturbNotificationStorageTimer::tick()
+bool LLDoNotDisturbNotificationStorageTimer::tick()
{
LLDoNotDisturbNotificationStorage * doNotDisturbNotificationStorage = LLDoNotDisturbNotificationStorage::getInstance();
@@ -64,7 +64,7 @@ BOOL LLDoNotDisturbNotificationStorageTimer::tick()
{
doNotDisturbNotificationStorage->saveNotifications();
}
- return FALSE;
+ return false;
}
LLDoNotDisturbNotificationStorage::LLDoNotDisturbNotificationStorage()
diff --git a/indra/newview/lldonotdisturbnotificationstorage.h b/indra/newview/lldonotdisturbnotificationstorage.h
index 237d58b4de..6e1bf6076c 100644
--- a/indra/newview/lldonotdisturbnotificationstorage.h
+++ b/indra/newview/lldonotdisturbnotificationstorage.h
@@ -42,7 +42,7 @@ public:
~LLDoNotDisturbNotificationStorageTimer();
public:
- BOOL tick();
+ bool tick();
};
class LLDoNotDisturbNotificationStorage : public LLParamSingleton<LLDoNotDisturbNotificationStorage>, public LLNotificationStorage
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 710bbf8f52..8189948f55 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -232,7 +232,7 @@ const LLMatrix4& LLDrawable::getRenderMatrix() const
return isRoot() ? getWorldMatrix() : getParent()->getWorldMatrix();
}
-BOOL LLDrawable::isLight() const
+bool LLDrawable::isLight() const
{
LLViewerObject* objectp = mVObjp;
if ( objectp && (objectp->getPCode() == LL_PCODE_VOLUME) && !isDead())
@@ -241,7 +241,7 @@ BOOL LLDrawable::isLight() const
}
else
{
- return FALSE;
+ return false;
}
}
@@ -550,7 +550,7 @@ void LLDrawable::makeActive()
}
-void LLDrawable::makeStatic(BOOL warning_enabled)
+void LLDrawable::makeStatic(bool warning_enabled)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
@@ -598,11 +598,11 @@ void LLDrawable::makeStatic(BOOL warning_enabled)
}
// Returns "distance" between target destination and resulting xfrom
-F32 LLDrawable::updateXform(BOOL undamped)
+F32 LLDrawable::updateXform(bool undamped)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
- BOOL damped = !undamped;
+ bool damped = !undamped;
// Position
const LLVector3 old_pos(mXform.getPosition());
@@ -721,7 +721,7 @@ F32 LLDrawable::updateXform(BOOL undamped)
if (mSpatialBridge)
{
- gPipeline.markMoved(mSpatialBridge, FALSE);
+ gPipeline.markMoved(mSpatialBridge, false);
}
return dist_squared;
}
@@ -734,7 +734,7 @@ void LLDrawable::setRadius(F32 radius)
}
}
-void LLDrawable::moveUpdatePipeline(BOOL moved)
+void LLDrawable::moveUpdatePipeline(bool moved)
{
if (moved)
{
@@ -763,17 +763,17 @@ void LLDrawable::movePartition()
}
}
-BOOL LLDrawable::updateMove()
+bool LLDrawable::updateMove()
{
if (isDead())
{
LL_WARNS() << "Update move on dead drawable!" << LL_ENDL;
- return TRUE;
+ return true;
}
if (mVObjp.isNull())
{
- return FALSE;
+ return false;
}
makeActive();
@@ -781,21 +781,21 @@ BOOL LLDrawable::updateMove()
return isState(MOVE_UNDAMPED) ? updateMoveUndamped() : updateMoveDamped();
}
-BOOL LLDrawable::updateMoveUndamped()
+bool LLDrawable::updateMoveUndamped()
{
- F32 dist_squared = updateXform(TRUE);
+ F32 dist_squared = updateXform(true);
mGeneration++;
if (!isState(LLDrawable::INVISIBLE))
{
- BOOL moved = (dist_squared > 0.001f && dist_squared < 255.99f);
+ bool moved = (dist_squared > 0.001f && dist_squared < 255.99f);
moveUpdatePipeline(moved);
mVObjp->updateText();
}
mVObjp->clearChanged(LLXform::MOVED);
- return TRUE;
+ return true;
}
void LLDrawable::updatePartition()
@@ -808,7 +808,7 @@ void LLDrawable::updatePartition()
}
else if (mSpatialBridge)
{
- gPipeline.markMoved(mSpatialBridge, FALSE);
+ gPipeline.markMoved(mSpatialBridge, false);
}
else
{
@@ -817,22 +817,22 @@ void LLDrawable::updatePartition()
}
}
-BOOL LLDrawable::updateMoveDamped()
+bool LLDrawable::updateMoveDamped()
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
- F32 dist_squared = updateXform(FALSE);
+ F32 dist_squared = updateXform(false);
mGeneration++;
if (!isState(LLDrawable::INVISIBLE))
{
- BOOL moved = (dist_squared > 0.001f && dist_squared < 128.0f);
+ bool moved = (dist_squared > 0.001f && dist_squared < 128.0f);
moveUpdatePipeline(moved);
mVObjp->updateText();
}
- BOOL done_moving = (dist_squared == 0.0f) ? TRUE : FALSE;
+ bool done_moving = (dist_squared == 0.0f) ? true : false;
if (done_moving)
{
@@ -942,12 +942,12 @@ void LLDrawable::updateTexture()
}
}
-BOOL LLDrawable::updateGeometry()
+bool LLDrawable::updateGeometry()
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
llassert(mVObjp.notNull());
- BOOL res = mVObjp && mVObjp->updateGeometry(this);
+ bool res = mVObjp && mVObjp->updateGeometry(this);
return res;
}
@@ -1054,7 +1054,7 @@ void LLDrawable::updateBinRadius()
}
}
-void LLDrawable::updateSpecialHoverCursor(BOOL enabled)
+void LLDrawable::updateSpecialHoverCursor(bool enabled)
{
// TODO: maintain a list of objects that have special
// hover cursors, then use that list for per-frame
@@ -1244,7 +1244,7 @@ LLSpatialPartition* LLDrawable::getSpatialPartition()
// Spatial Partition Bridging Drawable
//=======================================
-LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 data_mask, LLViewerRegion* regionp) :
+LLSpatialBridge::LLSpatialBridge(LLDrawable* root, bool render_by_group, U32 data_mask, LLViewerRegion* regionp) :
LLDrawable(root->getVObj(), true),
LLSpatialPartition(data_mask, render_by_group, regionp)
{
@@ -1409,7 +1409,7 @@ void LLSpatialBridge::transformExtents(const LLVector4a* src, LLVector4a* dst)
}
-void LLDrawable::setVisible(LLCamera& camera, std::vector<LLDrawable*>* results, BOOL for_select)
+void LLDrawable::setVisible(LLCamera& camera, std::vector<LLDrawable*>* results, bool for_select)
{
LLViewerOctreeEntryData::setVisible();
@@ -1466,7 +1466,7 @@ public:
}
};
-void LLSpatialBridge::setVisible(LLCamera& camera_in, std::vector<LLDrawable*>* results, BOOL for_select)
+void LLSpatialBridge::setVisible(LLCamera& camera_in, std::vector<LLDrawable*>* results, bool for_select)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
@@ -1489,8 +1489,8 @@ void LLSpatialBridge::setVisible(LLCamera& camera_in, std::vector<LLDrawable*>*
av = objparent->mDrawable;
LLSpatialGroup* group = av->getSpatialGroup();
- BOOL impostor = FALSE;
- BOOL loaded = FALSE;
+ bool impostor = false;
+ bool loaded = false;
if (objparent->isAvatar())
{
LLVOAvatar* avatarp = (LLVOAvatar*) objparent;
@@ -1624,13 +1624,13 @@ void LLSpatialBridge::makeActive()
LL_ERRS() << "makeActive called on spatial bridge" << LL_ENDL;
}
-void LLSpatialBridge::move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL immediate)
+void LLSpatialBridge::move(LLDrawable *drawablep, LLSpatialGroup *curp, bool immediate)
{
LLSpatialPartition::move(drawablep, curp, immediate);
- gPipeline.markMoved(this, FALSE);
+ gPipeline.markMoved(this, false);
}
-BOOL LLSpatialBridge::updateMove()
+bool LLSpatialBridge::updateMove()
{
llassert_always(mDrawable);
llassert_always(mDrawable->mVObjp);
@@ -1641,9 +1641,9 @@ BOOL LLSpatialBridge::updateMove()
mOctree->balance();
if (part)
{
- part->move(this, getSpatialGroup(), TRUE);
+ part->move(this, getSpatialGroup(), true);
}
- return TRUE;
+ return true;
}
void LLSpatialBridge::shiftPos(const LLVector4a& vec)
@@ -1703,33 +1703,33 @@ const LLVector3 LLDrawable::getPositionAgent() const
}
}
-BOOL LLDrawable::isAnimating() const
+bool LLDrawable::isAnimating() const
{
if (!getVObj())
{
- return TRUE;
+ return true;
}
if (getScale() != mVObjp->getScale())
{
- return TRUE;
+ return true;
}
if (mVObjp->getPCode() == LLViewerObject::LL_VO_PART_GROUP)
{
- return TRUE;
+ return true;
}
if (mVObjp->getPCode() == LLViewerObject::LL_VO_HUD_PART_GROUP)
{
- return TRUE;
+ return true;
}
/*if (!isRoot() && !mVObjp->getAngularVelocity().isExactlyZero())
{ //target omega
- return TRUE;
+ return true;
}*/
- return FALSE;
+ return false;
}
void LLDrawable::updateFaceSize(S32 idx)
diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h
index 970e8c8b2a..a341e934a5 100644
--- a/indra/newview/lldrawable.h
+++ b/indra/newview/lldrawable.h
@@ -84,13 +84,13 @@ public:
LLDrawable(LLViewerObject *vobj, bool new_entry = false);
void markDead(); // Mark this drawable as dead
- BOOL isDead() const { return isState(DEAD); }
- BOOL isNew() const { return !isState(BUILT); }
- BOOL isUnload() const { return isState(FOR_UNLOAD); }
+ bool isDead() const { return isState(DEAD); }
+ bool isNew() const { return !isState(BUILT); }
+ bool isUnload() const { return isState(FOR_UNLOAD); }
- BOOL isLight() const;
+ bool isLight() const;
- virtual void setVisible(LLCamera& camera_in, std::vector<LLDrawable*>* results = NULL, BOOL for_select = FALSE);
+ virtual void setVisible(LLCamera& camera_in, std::vector<LLDrawable*>* results = NULL, bool for_select = false);
LLSpatialGroup* getSpatialGroup()const {return (LLSpatialGroup*)getGroup();}
LLViewerRegion* getRegion() const { return mVObjp->getRegion(); }
@@ -116,20 +116,20 @@ public:
LLXformMatrix* getXform() { return &mXform; }
U32 getState() const { return mState; }
- BOOL isState (U32 bits) const { return ((mState & bits) != 0); }
+ bool isState (U32 bits) const { return ((mState & bits) != 0); }
void setState (U32 bits) { mState |= bits; }
void clearState(U32 bits) { mState &= ~bits; }
- BOOL isAvatar() const { return mVObjp.notNull() && mVObjp->isAvatar(); }
- BOOL isRoot() const { return !mParent || mParent->isAvatar(); }
+ bool isAvatar() const { return mVObjp.notNull() && mVObjp->isAvatar(); }
+ bool isRoot() const { return !mParent || mParent->isAvatar(); }
LLDrawable* getRoot();
- BOOL isSpatialRoot() const { return !mParent || mParent->isAvatar(); }
- virtual BOOL isSpatialBridge() const { return FALSE; }
+ bool isSpatialRoot() const { return !mParent || mParent->isAvatar(); }
+ virtual bool isSpatialBridge() const { return false; }
virtual LLSpatialPartition* asPartition() { return NULL; }
LLDrawable* getParent() const { return mParent; }
// must set parent through LLViewerObject:: ()
- //BOOL setParent(LLDrawable *parent);
+ //bool setParent(LLDrawable *parent);
inline LLFace* getFace(const S32 i) const;
inline S32 getNumFaces() const;
@@ -151,32 +151,32 @@ public:
void destroy();
void update();
- F32 updateXform(BOOL undamped);
+ F32 updateXform(bool undamped);
virtual void makeActive();
- /*virtual*/ void makeStatic(BOOL warning_enabled = TRUE);
+ /*virtual*/ void makeStatic(bool warning_enabled = true);
- BOOL isActive() const { return isState(ACTIVE); }
- BOOL isStatic() const { return !isActive(); }
- BOOL isAnimating() const;
+ bool isActive() const { return isState(ACTIVE); }
+ bool isStatic() const { return !isActive(); }
+ bool isAnimating() const;
- virtual BOOL updateMove();
+ virtual bool updateMove();
virtual void movePartition();
void updateTexture();
void updateMaterial();
virtual void updateDistance(LLCamera& camera, bool force_update);
- BOOL updateGeometry();
+ bool updateGeometry();
void updateFaceSize(S32 idx);
- void updateSpecialHoverCursor(BOOL enabled);
+ void updateSpecialHoverCursor(bool enabled);
virtual void shiftPos(const LLVector4a &shift_vector);
S32 getGeneration() const { return mGeneration; }
- BOOL getLit() const { return isState(UNLIT) ? FALSE : TRUE; }
- void setLit(BOOL lit) { lit ? clearState(UNLIT) : setState(UNLIT); }
+ bool getLit() const { return isState(UNLIT) ? false : true; }
+ void setLit(bool lit) { lit ? clearState(UNLIT) : setState(UNLIT); }
bool isVisible() const;
bool isRecentlyVisible() const;
@@ -195,7 +195,7 @@ public:
virtual void updateBinRadius();
void setRenderType(S32 type) { mRenderType = type; }
- BOOL isRenderType(S32 type) { return mRenderType == type; }
+ bool isRenderType(S32 type) { return mRenderType == type; }
S32 getRenderType() { return mRenderType; }
// Debugging methods
@@ -214,10 +214,10 @@ public:
protected:
~LLDrawable() { destroy(); }
- void moveUpdatePipeline(BOOL moved);
+ void moveUpdatePipeline(bool moved);
void updatePartition();
- BOOL updateMoveDamped();
- BOOL updateMoveUndamped();
+ bool updateMoveDamped();
+ bool updateMoveUndamped();
public:
friend class LLPipeline;
@@ -244,11 +244,11 @@ public:
{
if (lhs->isVisible() && !rhs->isVisible())
{
- return TRUE; //visible things come first
+ return true; //visible things come first
}
else if (!lhs->isVisible() && rhs->isVisible())
{
- return FALSE; //rhs is visible, comes first
+ return false; //rhs is visible, comes first
}
return lhs->mDistanceWRTCamera < rhs->mDistanceWRTCamera; // farthest = last
@@ -286,6 +286,7 @@ public:
ANIMATED_CHILD = 0x01000000,
ACTIVE_CHILD = 0x02000000,
FOR_UNLOAD = 0x04000000, //should be unload from memory
+ MIRROR = 0x08000000, // Used as a mirror, needs a hero probe position to be calculated.
} EDrawableFlags;
public:
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index 50210b06c4..4182819d6c 100644
--- a/indra/newview/lldrawpool.cpp
+++ b/indra/newview/lldrawpool.cpp
@@ -269,20 +269,20 @@ void LLFacePool::enqueue(LLFace* facep)
}
// virtual
-BOOL LLFacePool::addFace(LLFace *facep)
+bool LLFacePool::addFace(LLFace *facep)
{
addFaceReference(facep);
- return TRUE;
+ return true;
}
// virtual
-BOOL LLFacePool::removeFace(LLFace *facep)
+bool LLFacePool::removeFace(LLFace *facep)
{
removeFaceReference(facep);
vector_replace_with_last(mDrawFace, facep);
- return TRUE;
+ return true;
}
// Not absolutely sure if we should be resetting all of the chained pools as well - djs
@@ -328,9 +328,9 @@ void LLFacePool::pushFaceGeometry()
}
}
-BOOL LLFacePool::verify() const
+bool LLFacePool::verify() const
{
- BOOL ok = TRUE;
+ bool ok = true;
for (std::vector<LLFace*>::const_iterator iter = mDrawFace.begin();
iter != mDrawFace.end(); iter++)
@@ -340,11 +340,11 @@ BOOL LLFacePool::verify() const
{
LL_INFOS() << "Face in wrong pool!" << LL_ENDL;
facep->printDebugInfo();
- ok = FALSE;
+ ok = false;
}
else if (!facep->verify())
{
- ok = FALSE;
+ ok = false;
}
}
@@ -356,7 +356,7 @@ void LLFacePool::printDebugInfo() const
LL_INFOS() << "Pool " << this << " Type: " << getType() << LL_ENDL;
}
-BOOL LLFacePool::LLOverrideFaceColor::sOverrideFaceColor = FALSE;
+bool LLFacePool::LLOverrideFaceColor::sOverrideFaceColor = false;
void LLFacePool::LLOverrideFaceColor::setColor(const LLColor4& color)
{
@@ -567,14 +567,19 @@ void LLRenderPass::pushRiggedMaskBatches(U32 type, bool texture, bool batch_text
void LLRenderPass::applyModelMatrix(const LLDrawInfo& params)
{
- if (params.mModelMatrix != gGLLastMatrix)
+ applyModelMatrix(params.mModelMatrix);
+}
+
+void LLRenderPass::applyModelMatrix(const LLMatrix4* model_matrix)
+{
+ if (model_matrix != gGLLastMatrix)
{
- gGLLastMatrix = params.mModelMatrix;
+ gGLLastMatrix = model_matrix;
gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.loadMatrix(gGLModelView);
- if (params.mModelMatrix)
+ if (model_matrix)
{
- gGL.multMatrix((GLfloat*) params.mModelMatrix->mMatrix);
+ gGL.multMatrix((GLfloat*) model_matrix->mMatrix);
}
gPipeline.mMatrixOpCount++;
}
@@ -677,7 +682,7 @@ bool LLRenderPass::uploadMatrixPalette(LLVOAvatar* avatar, LLMeshSkinInfo* skinI
LLGLSLShader::sCurBoundShaderPtr->uniformMatrix3x4fv(LLViewerShaderMgr::AVATAR_MATRIX,
count,
- FALSE,
+ false,
(GLfloat*)&(mpc.mGLMp[0]));
return true;
@@ -746,6 +751,7 @@ void LLRenderPass::pushUntexturedGLTFBatches(U32 type)
}
}
+// static
void LLRenderPass::pushGLTFBatch(LLDrawInfo& params)
{
auto& mat = params.mGLTFMaterial;
@@ -764,6 +770,7 @@ void LLRenderPass::pushGLTFBatch(LLDrawInfo& params)
teardown_texture_matrix(params);
}
+// static
void LLRenderPass::pushUntexturedGLTFBatch(LLDrawInfo& params)
{
auto& mat = params.mGLTFMaterial;
@@ -825,6 +832,7 @@ void LLRenderPass::pushUntexturedRiggedGLTFBatches(U32 type)
}
+// static
void LLRenderPass::pushRiggedGLTFBatch(LLDrawInfo& params, LLVOAvatar*& lastAvatar, U64& lastMeshId)
{
if (params.mAvatar.notNull() && (lastAvatar != params.mAvatar || lastMeshId != params.mSkinInfo->mHash))
@@ -837,6 +845,7 @@ void LLRenderPass::pushRiggedGLTFBatch(LLDrawInfo& params, LLVOAvatar*& lastAvat
pushGLTFBatch(params);
}
+// static
void LLRenderPass::pushUntexturedRiggedGLTFBatch(LLDrawInfo& params, LLVOAvatar*& lastAvatar, U64& lastMeshId)
{
if (params.mAvatar.notNull() && (lastAvatar != params.mAvatar || lastMeshId != params.mSkinInfo->mHash))
diff --git a/indra/newview/lldrawpool.h b/indra/newview/lldrawpool.h
index 0925a01439..6a8020f2a9 100644
--- a/indra/newview/lldrawpool.h
+++ b/indra/newview/lldrawpool.h
@@ -58,9 +58,9 @@ public:
POOL_SIMPLE,
POOL_FULLBRIGHT,
POOL_BUMP,
- POOL_TERRAIN,
POOL_MATERIALS,
POOL_GLTF_PBR,
+ POOL_TERRAIN,
POOL_GRASS,
POOL_GLTF_PBR_ALPHA_MASK,
POOL_TREE,
@@ -80,13 +80,13 @@ public:
LLDrawPool(const U32 type);
virtual ~LLDrawPool();
- virtual BOOL isDead() = 0;
+ virtual bool isDead() = 0;
S32 getId() const { return mId; }
U32 getType() const { return mType; }
- BOOL getSkipRenderFlag() const { return mSkipRender;}
- void setSkipRenderFlag( BOOL flag ) { mSkipRender = flag; }
+ bool getSkipRenderFlag() const { return mSkipRender;}
+ void setSkipRenderFlag( bool flag ) { mSkipRender = flag; }
virtual LLViewerTexture *getDebugTexture();
virtual void beginRenderPass( S32 pass );
@@ -111,19 +111,19 @@ public:
virtual void render(S32 pass = 0) {};
virtual void prerender() {};
virtual U32 getVertexDataMask() { return 0; } // DEPRECATED -- draw pool doesn't actually determine vertex data mask any more
- virtual BOOL verify() const { return TRUE; } // Verify that all data in the draw pool is correct!
+ virtual bool verify() const { return true; } // Verify that all data in the draw pool is correct!
virtual S32 getShaderLevel() const { return mShaderLevel; }
static LLDrawPool* createPool(const U32 type, LLViewerTexture *tex0 = NULL);
virtual LLViewerTexture* getTexture() = 0;
- virtual BOOL isFacePool() { return FALSE; }
+ virtual bool isFacePool() { return false; }
virtual void resetDrawOrders() = 0;
virtual void pushFaceGeometry() {}
S32 mShaderLevel;
S32 mId;
U32 mType; // Type of draw pool
- BOOL mSkipRender;
+ bool mSkipRender;
};
class LLRenderPass : public LLDrawPool
@@ -345,12 +345,12 @@ public:
virtual ~LLRenderPass();
/*virtual*/ LLViewerTexture* getDebugTexture() { return NULL; }
LLViewerTexture* getTexture() { return NULL; }
- BOOL isDead() { return FALSE; }
+ bool isDead() { return false; }
void resetDrawOrders() { }
static void applyModelMatrix(const LLDrawInfo& params);
- // Use before a non-GLTF batch if it is interleaved with GLTF batches that share the same shader
- static void resetGLTFTextureTransform();
+ // For rendering that doesn't use LLDrawInfo for some reason
+ static void applyModelMatrix(const LLMatrix4* model_matrix);
void pushBatches(U32 type, bool texture = true, bool batch_textures = false);
void pushUntexturedBatches(U32 type);
@@ -374,10 +374,10 @@ public:
void pushUntexturedRiggedGLTFBatches(U32 type);
// push a single GLTF draw call
- void pushGLTFBatch(LLDrawInfo& params);
- void pushRiggedGLTFBatch(LLDrawInfo& params, LLVOAvatar*& lastAvatar, U64& lastMeshId);
- void pushUntexturedGLTFBatch(LLDrawInfo& params);
- void pushUntexturedRiggedGLTFBatch(LLDrawInfo& params, LLVOAvatar*& lastAvatar, U64& lastMeshId);
+ static void pushGLTFBatch(LLDrawInfo& params);
+ static void pushRiggedGLTFBatch(LLDrawInfo& params, LLVOAvatar*& lastAvatar, U64& lastMeshId);
+ static void pushUntexturedGLTFBatch(LLDrawInfo& params);
+ static void pushUntexturedRiggedGLTFBatch(LLDrawInfo& params, LLVOAvatar*& lastAvatar, U64& lastMeshId);
void pushMaskBatches(U32 type, bool texture = true, bool batch_textures = false);
void pushRiggedMaskBatches(U32 type, bool texture = true, bool batch_textures = false);
@@ -404,16 +404,16 @@ public:
LLFacePool(const U32 type);
virtual ~LLFacePool();
- BOOL isDead() { return mReferences.empty(); }
+ bool isDead() { return mReferences.empty(); }
virtual LLViewerTexture *getTexture();
virtual void dirtyTextures(const std::set<LLViewerFetchedTexture*>& textures);
virtual void enqueue(LLFace *face);
- virtual BOOL addFace(LLFace *face);
- virtual BOOL removeFace(LLFace *face);
+ virtual bool addFace(LLFace *face);
+ virtual bool removeFace(LLFace *face);
- virtual BOOL verify() const; // Verify that all data in the draw pool is correct!
+ virtual bool verify() const; // Verify that all data in the draw pool is correct!
virtual void resetDrawOrders();
void resetAll();
@@ -427,7 +427,7 @@ public:
void printDebugInfo() const;
- BOOL isFacePool() { return TRUE; }
+ bool isFacePool() { return true; }
// call drawIndexed on every draw face
void pushFaceGeometry();
@@ -446,24 +446,24 @@ public:
LLOverrideFaceColor(LLDrawPool* pool)
: mOverride(sOverrideFaceColor), mPool(pool)
{
- sOverrideFaceColor = TRUE;
+ sOverrideFaceColor = true;
}
LLOverrideFaceColor(LLDrawPool* pool, const LLColor4& color)
: mOverride(sOverrideFaceColor), mPool(pool)
{
- sOverrideFaceColor = TRUE;
+ sOverrideFaceColor = true;
setColor(color);
}
LLOverrideFaceColor(LLDrawPool* pool, const LLColor4U& color)
: mOverride(sOverrideFaceColor), mPool(pool)
{
- sOverrideFaceColor = TRUE;
+ sOverrideFaceColor = true;
setColor(color);
}
LLOverrideFaceColor(LLDrawPool* pool, F32 r, F32 g, F32 b, F32 a)
: mOverride(sOverrideFaceColor), mPool(pool)
{
- sOverrideFaceColor = TRUE;
+ sOverrideFaceColor = true;
setColor(r, g, b, a);
}
~LLOverrideFaceColor()
@@ -473,9 +473,9 @@ public:
void setColor(const LLColor4& color);
void setColor(const LLColor4U& color);
void setColor(F32 r, F32 g, F32 b, F32 a);
- BOOL mOverride;
+ bool mOverride;
LLDrawPool* mPool;
- static BOOL sOverrideFaceColor;
+ static bool sOverrideFaceColor;
};
};
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 41dc95a8cb..489a8315e4 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -49,10 +49,11 @@
#include "llspatialpartition.h"
#include "llglcommonfunc.h"
#include "llvoavatar.h"
+#include "gltfscenemanager.h"
#include "llenvironment.h"
-BOOL LLDrawPoolAlpha::sShowDebugAlpha = FALSE;
+bool LLDrawPoolAlpha::sShowDebugAlpha = false;
#define current_shader (LLGLSLShader::sCurBoundShaderPtr)
@@ -143,7 +144,7 @@ static void prepare_alpha_shader(LLGLSLShader* shader, bool textureGamma, bool d
}
}
-extern BOOL gCubeSnapshot;
+extern bool gCubeSnapshot;
void LLDrawPoolAlpha::renderPostDeferred(S32 pass)
{
@@ -260,6 +261,15 @@ void LLDrawPoolAlpha::forwardRender(bool rigged)
mAlphaDFactor = LLRender::BF_ONE_MINUS_SOURCE_ALPHA; // }
gGL.blendFunc(mColorSFactor, mColorDFactor, mAlphaSFactor, mAlphaDFactor);
+ if (rigged)
+ { // draw GLTF scene to depth buffer before rigged alpha
+ gPipeline.bindDeferredShader(gDeferredPBRAlphaProgram);
+ LL::GLTFSceneManager::instance().render(false, false);
+
+ gPipeline.bindDeferredShader(*gDeferredPBRAlphaProgram.mRiggedVariant);
+ LL::GLTFSceneManager::instance().render(false, true);
+ }
+
// If the face is more than 90% transparent, then don't update the Depth buffer for Dof
// We don't want the nearly invisible objects to cause of DoF effects
renderAlpha(getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX | LLVertexBuffer::MAP_TANGENT | LLVertexBuffer::MAP_TEXCOORD1 | LLVertexBuffer::MAP_TEXCOORD2, false, rigged);
@@ -468,7 +478,7 @@ bool LLDrawPoolAlpha::TexSetup(LLDrawInfo* draw, bool use_material)
}
}
}
-
+
return tex_setup;
}
@@ -577,8 +587,8 @@ void LLDrawPoolAlpha::renderRiggedPbrEmissives(std::vector<LLDrawInfo*>& emissiv
void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
- BOOL initialized_lighting = FALSE;
- BOOL light_enabled = TRUE;
+ bool initialized_lighting = false;
+ bool light_enabled = true;
LLVOAvatar* lastAvatar = nullptr;
U64 lastMeshId = 0;
@@ -658,7 +668,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged)
LLSpatialGroup::drawmap_elem_t& draw_info = rigged ? group->mDrawMap[LLRenderPass::PASS_ALPHA_RIGGED] : group->mDrawMap[LLRenderPass::PASS_ALPHA];
- for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
+ for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
{
LLDrawInfo& params = **k;
if ((bool)params.mAvatar != rigged)
@@ -700,18 +710,18 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged)
// Turn off lighting if it hasn't already been so.
if (light_enabled || !initialized_lighting)
{
- initialized_lighting = TRUE;
+ initialized_lighting = true;
target_shader = fullbright_shader;
- light_enabled = FALSE;
+ light_enabled = false;
}
}
// Turn on lighting if it isn't already.
else if (!light_enabled || !initialized_lighting)
{
- initialized_lighting = TRUE;
+ initialized_lighting = true;
target_shader = simple_shader;
- light_enabled = TRUE;
+ light_enabled = true;
}
if (LLPipeline::sRenderingHUDs)
@@ -804,9 +814,10 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged)
current_shader->setMinimumAlpha(0.f);
reset_minimum_alpha = true;
}
-
+
params.mVertexBuffer->setBuffer();
params.mVertexBuffer->drawRange(LLRender::TRIANGLES, params.mStart, params.mEnd, params.mCount, params.mOffset);
+ stop_glerror();
if (reset_minimum_alpha)
{
@@ -928,7 +939,7 @@ bool LLDrawPoolAlpha::uploadMatrixPalette(const LLDrawInfo& params)
LLGLSLShader::sCurBoundShaderPtr->uniformMatrix3x4fv(LLViewerShaderMgr::AVATAR_MATRIX,
count,
- FALSE,
+ false,
(GLfloat*)&(mpc.mGLMp[0]));
return true;
diff --git a/indra/newview/lldrawpoolalpha.h b/indra/newview/lldrawpoolalpha.h
index 820c4f4e68..d614c16819 100644
--- a/indra/newview/lldrawpoolalpha.h
+++ b/indra/newview/lldrawpoolalpha.h
@@ -63,12 +63,12 @@ public:
void renderDebugAlpha();
- void renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask, BOOL texture = TRUE);
+ void renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask, bool texture = true);
void renderAlpha(U32 mask, bool depth_only = false, bool rigged = false);
void renderAlphaHighlight();
bool uploadMatrixPalette(const LLDrawInfo& params);
- static BOOL sShowDebugAlpha;
+ static bool sShowDebugAlpha;
private:
LLGLSLShader* target_shader;
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 7f6409dbde..32f0e185ce 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -56,8 +56,8 @@
static U32 sShaderLevel = 0;
LLGLSLShader* LLDrawPoolAvatar::sVertexProgram = NULL;
-BOOL LLDrawPoolAvatar::sSkipOpaque = FALSE;
-BOOL LLDrawPoolAvatar::sSkipTransparent = FALSE;
+bool LLDrawPoolAvatar::sSkipOpaque = false;
+bool LLDrawPoolAvatar::sSkipTransparent = false;
S32 LLDrawPoolAvatar::sShadowPass = -1;
S32 LLDrawPoolAvatar::sDiffuseChannel = 0;
F32 LLDrawPoolAvatar::sMinimumAlpha = 0.2f;
@@ -67,7 +67,7 @@ LLUUID gBlackSquareID;
static bool is_deferred_render = false;
static bool is_post_deferred_render = false;
-extern BOOL gUseGLPick;
+extern bool gUseGLPick;
F32 CLOTHING_GRAVITY_EFFECT = 0.7f;
F32 CLOTHING_ACCEL_FORCE_FACTOR = 0.2f;
@@ -95,8 +95,8 @@ S32 AVATAR_OFFSET_TEX0 = 32;
S32 AVATAR_OFFSET_TEX1 = 40;
S32 AVATAR_VERTEX_BYTES = 48;
-BOOL gAvatarEmbossBumpMap = FALSE;
-static BOOL sRenderingSkinned = FALSE;
+bool gAvatarEmbossBumpMap = false;
+static bool sRenderingSkinned = false;
S32 normal_channel = -1;
S32 specular_channel = -1;
S32 cube_channel = -1;
@@ -115,16 +115,16 @@ LLDrawPoolAvatar::~LLDrawPoolAvatar()
}
// virtual
-BOOL LLDrawPoolAvatar::isDead()
+bool LLDrawPoolAvatar::isDead()
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
if (!LLFacePool::isDead())
{
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
S32 LLDrawPoolAvatar::getShaderLevel() const
@@ -167,7 +167,7 @@ void LLDrawPoolAvatar::beginDeferredPass(S32 pass)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
- sSkipTransparent = TRUE;
+ sSkipTransparent = true;
is_deferred_render = true;
if (LLPipeline::sImpostorRender)
@@ -193,7 +193,7 @@ void LLDrawPoolAvatar::endDeferredPass(S32 pass)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
- sSkipTransparent = FALSE;
+ sSkipTransparent = false;
is_deferred_render = false;
if (LLPipeline::sImpostorRender)
@@ -231,10 +231,10 @@ void LLDrawPoolAvatar::beginPostDeferredPass(S32 pass)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
- sSkipOpaque = TRUE;
+ sSkipOpaque = true;
sShaderLevel = mShaderLevel;
sVertexProgram = &gDeferredAvatarAlphaProgram;
- sRenderingSkinned = TRUE;
+ sRenderingSkinned = true;
gPipeline.bindDeferredShader(*sVertexProgram);
@@ -247,8 +247,8 @@ void LLDrawPoolAvatar::endPostDeferredPass(S32 pass)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
// if we're in software-blending, remember to set the fence _after_ we draw so we wait till this rendering is done
- sRenderingSkinned = FALSE;
- sSkipOpaque = FALSE;
+ sRenderingSkinned = false;
+ sSkipOpaque = false;
gPipeline.unbindDeferredShader(*sVertexProgram);
sDiffuseChannel = 0;
@@ -288,7 +288,7 @@ void LLDrawPoolAvatar::beginShadowPass(S32 pass)
if ((sShaderLevel > 0)) // for hardware blending
{
- sRenderingSkinned = TRUE;
+ sRenderingSkinned = true;
sVertexProgram->bind();
}
@@ -308,7 +308,7 @@ void LLDrawPoolAvatar::beginShadowPass(S32 pass)
if ((sShaderLevel > 0)) // for hardware blending
{
- sRenderingSkinned = TRUE;
+ sRenderingSkinned = true;
sVertexProgram->bind();
}
@@ -328,7 +328,7 @@ void LLDrawPoolAvatar::beginShadowPass(S32 pass)
if ((sShaderLevel > 0)) // for hardware blending
{
- sRenderingSkinned = TRUE;
+ sRenderingSkinned = true;
sVertexProgram->bind();
}
@@ -345,7 +345,7 @@ void LLDrawPoolAvatar::endShadowPass(S32 pass)
sVertexProgram->unbind();
}
sVertexProgram = NULL;
- sRenderingSkinned = FALSE;
+ sRenderingSkinned = false;
LLDrawPoolAvatar::sShadowPass = -1;
}
@@ -371,7 +371,7 @@ void LLDrawPoolAvatar::renderShadow(S32 pass)
}
LLVOAvatar::AvatarOverallAppearance oa = avatarp->getOverallAppearance();
- BOOL impostor = !LLPipeline::sImpostorRender && avatarp->isImpostor();
+ bool impostor = !LLPipeline::sImpostorRender && avatarp->isImpostor();
// no shadows if the shadows are causing this avatar to breach the limit.
if (avatarp->isTooSlow() || impostor || (oa == LLVOAvatar::AOA_INVISIBLE))
{
@@ -594,7 +594,7 @@ void LLDrawPoolAvatar::beginSkinned()
sVertexProgram = &gAvatarProgram;
- sRenderingSkinned = TRUE;
+ sRenderingSkinned = true;
sVertexProgram->bind();
sVertexProgram->setMinimumAlpha(LLDrawPoolAvatar::sMinimumAlpha);
@@ -607,7 +607,7 @@ void LLDrawPoolAvatar::endSkinned()
// if we're in software-blending, remember to set the fence _after_ we draw so we wait till this rendering is done
if (sShaderLevel > 0)
{
- sRenderingSkinned = FALSE;
+ sRenderingSkinned = false;
sVertexProgram->disableTexture(LLViewerShaderMgr::BUMP_MAP);
gGL.getTexUnit(0)->activate();
sVertexProgram->unbind();
@@ -632,7 +632,7 @@ void LLDrawPoolAvatar::beginDeferredSkinned()
sShaderLevel = mShaderLevel;
sVertexProgram = &gDeferredAvatarProgram;
- sRenderingSkinned = TRUE;
+ sRenderingSkinned = true;
sVertexProgram->bind();
sVertexProgram->setMinimumAlpha(LLDrawPoolAvatar::sMinimumAlpha);
@@ -645,7 +645,7 @@ void LLDrawPoolAvatar::endDeferredSkinned()
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
// if we're in software-blending, remember to set the fence _after_ we draw so we wait till this rendering is done
- sRenderingSkinned = FALSE;
+ sRenderingSkinned = false;
sVertexProgram->unbind();
sVertexProgram->disableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
@@ -723,7 +723,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
return;
}
- BOOL impostor = !LLPipeline::sImpostorRender && avatarp->isImpostor() && !single_avatar;
+ bool impostor = !LLPipeline::sImpostorRender && avatarp->isImpostor() && !single_avatar;
if (( avatarp->isInMuteList()
|| impostor
diff --git a/indra/newview/lldrawpoolavatar.h b/indra/newview/lldrawpoolavatar.h
index ff78c6c60a..194e55ceef 100644
--- a/indra/newview/lldrawpoolavatar.h
+++ b/indra/newview/lldrawpoolavatar.h
@@ -60,7 +60,7 @@ public:
};
~LLDrawPoolAvatar();
- /*virtual*/ BOOL isDead();
+ /*virtual*/ bool isDead();
typedef enum
{
@@ -120,8 +120,8 @@ typedef enum
void renderAvatars(LLVOAvatar *single_avatar, S32 pass = -1); // renders only one avatar if single_avatar is not null.
- static BOOL sSkipOpaque;
- static BOOL sSkipTransparent;
+ static bool sSkipOpaque;
+ static bool sSkipTransparent;
static S32 sShadowPass;
static S32 sDiffuseChannel;
static F32 sMinimumAlpha;
@@ -136,5 +136,5 @@ extern S32 AVATAR_OFFSET_TEX1;
extern S32 AVATAR_VERTEX_BYTES;
const S32 AVATAR_BUFFER_ELEMENTS = 8192; // Needs to be enough to store all avatar vertices.
-extern BOOL gAvatarEmbossBumpMap;
+extern bool gAvatarEmbossBumpMap;
#endif // LL_LLDRAWPOOLAVATAR_H
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index a0ce0ef6cf..44531e21bd 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -77,7 +77,7 @@ static LLGLSLShader* shader = NULL;
static S32 cube_channel = -1;
static S32 diffuse_channel = -1;
static S32 bump_channel = -1;
-static BOOL shiny = FALSE;
+static bool shiny = false;
// Enabled after changing LLViewerTexture::mNeedsCreateTexture to an
// LLAtomicBool; this should work just fine, now. HB
@@ -165,7 +165,7 @@ void LLStandardBumpmap::addstandard()
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage =
LLViewerTextureManager::getFetchedTexture(LLUUID(bump_image_id));
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setBoostLevel(LLGLTexture::LOCAL) ;
- gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setLoadedCallback(LLBumpImageList::onSourceStandardLoaded, 0, TRUE, FALSE, NULL, NULL );
+ gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setLoadedCallback(LLBumpImageList::onSourceStandardLoaded, 0, true, false, NULL, NULL );
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->forceToSaveRawImage(0, 30.f) ;
LLStandardBumpmap::sStandardBumpmapCount++;
}
@@ -198,7 +198,7 @@ void LLStandardBumpmap::destroyGL()
LLDrawPoolBump::LLDrawPoolBump()
: LLRenderPass(LLDrawPool::POOL_BUMP)
{
- shiny = FALSE;
+ shiny = false;
}
@@ -354,7 +354,7 @@ void LLDrawPoolBump::beginFullbrightShiny()
diffuse_channel = 0;
}
- shiny = TRUE;
+ shiny = true;
}
void LLDrawPoolBump::renderFullbrightShiny()
@@ -406,7 +406,7 @@ void LLDrawPoolBump::endFullbrightShiny()
diffuse_channel = -1;
cube_channel = 0;
- shiny = FALSE;
+ shiny = false;
}
void LLDrawPoolBump::renderGroup(LLSpatialGroup* group, U32 type, bool texture = true)
@@ -426,7 +426,7 @@ void LLDrawPoolBump::renderGroup(LLSpatialGroup* group, U32 type, bool texture =
// static
-BOOL LLDrawPoolBump::bindBumpMap(LLDrawInfo& params, S32 channel)
+bool LLDrawPoolBump::bindBumpMap(LLDrawInfo& params, S32 channel)
{
U8 bump_code = params.mBump;
@@ -434,7 +434,7 @@ BOOL LLDrawPoolBump::bindBumpMap(LLDrawInfo& params, S32 channel)
}
//static
-BOOL LLDrawPoolBump::bindBumpMap(LLFace* face, S32 channel)
+bool LLDrawPoolBump::bindBumpMap(LLFace* face, S32 channel)
{
const LLTextureEntry* te = face->getTextureEntry();
if (te)
@@ -443,11 +443,11 @@ BOOL LLDrawPoolBump::bindBumpMap(LLFace* face, S32 channel)
return bindBumpMap(bump_code, face->getTexture(), channel);
}
- return FALSE;
+ return false;
}
//static
-BOOL LLDrawPoolBump::bindBumpMap(U8 bump_code, LLViewerTexture* texture, S32 channel)
+bool LLDrawPoolBump::bindBumpMap(U8 bump_code, LLViewerTexture* texture, S32 channel)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
//Note: texture atlas does not support bump texture now.
@@ -455,7 +455,7 @@ BOOL LLDrawPoolBump::bindBumpMap(U8 bump_code, LLViewerTexture* texture, S32 cha
if(!tex)
{
//if the texture is not a fetched texture
- return FALSE;
+ return false;
}
LLViewerTexture* bump = NULL;
@@ -491,10 +491,10 @@ BOOL LLDrawPoolBump::bindBumpMap(U8 bump_code, LLViewerTexture* texture, S32 cha
gGL.getTexUnit(channel)->bind(bump);
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
//static
@@ -549,7 +549,7 @@ void LLDrawPoolBump::renderDeferred(S32 pass)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP);
- shiny = TRUE;
+ shiny = true;
for (int i = 0; i < 2; ++i)
{
bool rigged = i == 1;
@@ -597,7 +597,7 @@ void LLDrawPoolBump::renderDeferred(S32 pass)
gGL.getTexUnit(0)->activate();
}
- shiny = FALSE;
+ shiny = false;
}
@@ -699,18 +699,19 @@ void LLBumpImageList::addTextureStats(U8 bump, const LLUUID& base_image_id, F32
void LLBumpImageList::updateImages()
{
+ llassert(LLCoros::on_main_thread_main_coro()); // This code is not thread safe
+
for (bump_image_map_t::iterator iter = mBrightnessEntries.begin(); iter != mBrightnessEntries.end(); )
{
- bump_image_map_t::iterator curiter = iter++;
- LLViewerTexture* image = curiter->second;
+ LLViewerTexture* image = iter->second;
if( image )
{
- BOOL destroy = TRUE;
+ bool destroy = true;
if( image->hasGLTexture())
{
if( image->getBoundRecently() )
{
- destroy = FALSE;
+ destroy = false;
}
else
{
@@ -721,9 +722,11 @@ void LLBumpImageList::updateImages()
if( destroy )
{
//LL_INFOS() << "*** Destroying bright " << (void*)image << LL_ENDL;
- mBrightnessEntries.erase(curiter); // deletes the image thanks to reference counting
+ iter = mBrightnessEntries.erase(iter); // deletes the image thanks to reference counting
+ continue;
}
}
+ ++iter;
}
for (bump_image_map_t::iterator iter = mDarknessEntries.begin(); iter != mDarknessEntries.end(); )
@@ -732,12 +735,12 @@ void LLBumpImageList::updateImages()
LLViewerTexture* image = curiter->second;
if( image )
{
- BOOL destroy = TRUE;
+ bool destroy = true;
if( image->hasGLTexture())
{
if( image->getBoundRecently() )
{
- destroy = FALSE;
+ destroy = false;
}
else
{
@@ -764,7 +767,7 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText
LLViewerTexture* bump = NULL;
bump_image_map_t* entries_list = NULL;
- void (*callback_func)( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata ) = NULL;
+ void (*callback_func)( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata ) = NULL;
switch( bump_code )
{
@@ -788,7 +791,7 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText
}
else
{
- (*entries_list)[src_image->getID()] = LLViewerTextureManager::getLocalTexture( TRUE );
+ (*entries_list)[src_image->getID()] = LLViewerTextureManager::getLocalTexture( true );
bump = (*entries_list)[src_image->getID()]; // In case callback was called immediately and replaced the image
}
@@ -799,7 +802,7 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText
//(LLPipeline::sRenderDeferred && bump->getComponents() != 4))
{
src_image->setBoostLevel(LLGLTexture::BOOST_BUMP) ;
- src_image->setLoadedCallback( callback_func, 0, TRUE, FALSE, new LLUUID(src_image->getID()), NULL );
+ src_image->setLoadedCallback( callback_func, 0, true, false, new LLUUID(src_image->getID()), NULL );
src_image->forceToSaveRawImage(0) ;
}
}
@@ -809,7 +812,7 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText
// static
-void LLBumpImageList::onSourceBrightnessLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata )
+void LLBumpImageList::onSourceBrightnessLoaded( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata )
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
LLUUID* source_asset_id = (LLUUID*)userdata;
@@ -821,7 +824,7 @@ void LLBumpImageList::onSourceBrightnessLoaded( BOOL success, LLViewerFetchedTex
}
// static
-void LLBumpImageList::onSourceDarknessLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata )
+void LLBumpImageList::onSourceDarknessLoaded( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata )
{
LLUUID* source_asset_id = (LLUUID*)userdata;
LLBumpImageList::onSourceLoaded( success, src_vi, src, *source_asset_id, BE_DARKNESS );
@@ -831,7 +834,7 @@ void LLBumpImageList::onSourceDarknessLoaded( BOOL success, LLViewerFetchedTextu
}
}
-void LLBumpImageList::onSourceStandardLoaded( BOOL success, LLViewerFetchedTexture* src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata)
+void LLBumpImageList::onSourceStandardLoaded( bool success, LLViewerFetchedTexture* src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata)
{
if (success && LLPipeline::sRenderDeferred)
{
@@ -849,11 +852,14 @@ void LLBumpImageList::onSourceStandardLoaded( BOOL success, LLViewerFetchedTextu
void LLBumpImageList::generateNormalMapFromAlpha(LLImageRaw* src, LLImageRaw* nrm_image)
{
+ LLImageDataSharedLock lockIn(src);
+ LLImageDataLock lockOut(nrm_image);
+
U8* nrm_data = nrm_image->getData();
S32 resX = src->getWidth();
S32 resY = src->getHeight();
- U8* src_data = src->getData();
+ const U8* src_data = src->getData();
S32 src_cmp = src->getComponents();
@@ -903,7 +909,7 @@ void LLBumpImageList::generateNormalMapFromAlpha(LLImageRaw* src, LLImageRaw* nr
}
// static
-void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLImageRaw* src, LLUUID& source_asset_id, EBumpEffect bump_code )
+void LLBumpImageList::onSourceLoaded( bool success, LLViewerTexture *src_vi, LLImageRaw* src, LLUUID& source_asset_id, EBumpEffect bump_code )
{
LL_PROFILE_ZONE_SCOPED;
@@ -911,6 +917,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
+ LLImageDataSharedLock lock(src);
bump_image_map_t& entries_list(bump_code == BE_BRIGHTNESS ? gBumpImageList.mBrightnessEntries : gBumpImageList.mDarknessEntries );
bump_image_map_t::iterator iter = entries_list.find(source_asset_id);
@@ -921,7 +928,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
iter->second->getWidth() != src->getWidth() ||
iter->second->getHeight() != src->getHeight()) // bump not cached yet or has changed resolution
{ //make sure an entry exists for this image
- entries_list[src_vi->getID()] = LLViewerTextureManager::getLocalTexture(TRUE);
+ entries_list[src_vi->getID()] = LLViewerTextureManager::getLocalTexture(true);
iter = entries_list.find(src_vi->getID());
}
}
@@ -933,7 +940,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
U8* dst_data = dst_image->getData();
S32 dst_data_size = dst_image->getDataSize();
- U8* src_data = src->getData();
+ const U8* src_data = src->getData();
S32 src_data_size = src->getDataSize();
S32 src_components = src->getComponents();
@@ -1086,7 +1093,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
bump_ptr->ref();
auto create_func = [=]()
{
- img->setUseMipMaps(TRUE);
+ img->setUseMipMaps(true);
// upload dst_image to GPU (greyscale in red channel)
img->setExplicitFormat(GL_RED, GL_RED);
@@ -1100,7 +1107,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
// Note: bump will still point at GPU copy of dst_image
bump_ptr->setExplicitFormat(GL_RGBA, GL_RGBA);
LLGLuint tex_name;
- img->createGLTexture(0, nullptr, 0, 0, true, &tex_name);
+ img->createGLTexture(0, nullptr, false, 0, true, &tex_name);
// point render target at empty buffer
sRenderTarget.setColorAttachment(img, tex_name);
@@ -1112,7 +1119,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
LLGLDepthTest depth(GL_FALSE);
LLGLDisable cull(GL_CULL_FACE);
LLGLDisable blend(GL_BLEND);
- gGL.setColorMask(TRUE, TRUE);
+ gGL.setColorMask(true, true);
gNormalMapGenProgram.bind();
diff --git a/indra/newview/lldrawpoolbump.h b/indra/newview/lldrawpoolbump.h
index b1fe454c72..7e44834b2e 100644
--- a/indra/newview/lldrawpoolbump.h
+++ b/indra/newview/lldrawpoolbump.h
@@ -43,10 +43,10 @@ class LLViewerFetchedTexture;
class LLDrawPoolBump : public LLRenderPass
{
protected :
- LLDrawPoolBump(const U32 type):LLRenderPass(type) { mShiny = FALSE; }
+ LLDrawPoolBump(const U32 type):LLRenderPass(type) { mShiny = false; }
public:
static U32 sVertexMask;
- BOOL mShiny;
+ bool mShiny;
virtual U32 getVertexDataMask() override { return sVertexMask; }
@@ -76,11 +76,11 @@ public:
virtual S32 getNumPostDeferredPasses() override { return 1; }
/*virtual*/ void renderPostDeferred(S32 pass) override;
- static BOOL bindBumpMap(LLDrawInfo& params, S32 channel = -2);
- static BOOL bindBumpMap(LLFace* face, S32 channel = -2);
+ static bool bindBumpMap(LLDrawInfo& params, S32 channel = -2);
+ static bool bindBumpMap(LLFace* face, S32 channel = -2);
private:
- static BOOL bindBumpMap(U8 bump_code, LLViewerTexture* tex, S32 channel);
+ static bool bindBumpMap(U8 bump_code, LLViewerTexture* tex, S32 channel);
bool mRigged = false; // if true, doing a rigged pass
};
@@ -140,14 +140,14 @@ public:
LLViewerTexture* getBrightnessDarknessImage(LLViewerFetchedTexture* src_image, U8 bump_code);
void addTextureStats(U8 bump, const LLUUID& base_image_id, F32 virtual_size);
- static void onSourceBrightnessLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata );
- static void onSourceDarknessLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata );
- static void onSourceStandardLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata );
+ static void onSourceBrightnessLoaded( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata );
+ static void onSourceDarknessLoaded( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata );
+ static void onSourceStandardLoaded( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata );
static void generateNormalMapFromAlpha(LLImageRaw* src, LLImageRaw* nrm_image);
private:
- static void onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLImageRaw* src, LLUUID& source_asset_id, EBumpEffect bump );
+ static void onSourceLoaded( bool success, LLViewerTexture *src_vi, LLImageRaw* src, LLUUID& source_asset_id, EBumpEffect bump );
private:
typedef std::unordered_map<LLUUID, LLPointer<LLViewerTexture> > bump_image_map_t;
diff --git a/indra/newview/lldrawpoolmaterials.cpp b/indra/newview/lldrawpoolmaterials.cpp
index c0e4ed38c1..66137ed7cd 100644
--- a/indra/newview/lldrawpoolmaterials.cpp
+++ b/indra/newview/lldrawpoolmaterials.cpp
@@ -260,7 +260,7 @@ void LLDrawPoolMaterials::renderDeferred(S32 pass)
mShader->uniformMatrix3x4fv(LLViewerShaderMgr::AVATAR_MATRIX,
count,
- FALSE,
+ false,
(GLfloat*)&(mpc.mGLMp[0]));
}
}
diff --git a/indra/newview/lldrawpoolpbropaque.cpp b/indra/newview/lldrawpoolpbropaque.cpp
index 86b790e2c5..a32b6b1687 100644
--- a/indra/newview/lldrawpoolpbropaque.cpp
+++ b/indra/newview/lldrawpoolpbropaque.cpp
@@ -30,6 +30,7 @@
#include "lldrawpoolpbropaque.h"
#include "llviewershadermgr.h"
#include "pipeline.h"
+#include "gltfscenemanager.h"
LLDrawPoolGLTFPBR::LLDrawPoolGLTFPBR(U32 type) :
LLRenderPass(type)
@@ -54,9 +55,13 @@ void LLDrawPoolGLTFPBR::renderDeferred(S32 pass)
llassert(!LLPipeline::sRenderingHUDs);
gDeferredPBROpaqueProgram.bind();
+
+ LL::GLTFSceneManager::instance().renderOpaque();
pushGLTFBatches(mRenderType);
+
gDeferredPBROpaqueProgram.bind(true);
+ LL::GLTFSceneManager::instance().render(true, true);
pushRiggedGLTFBatches(mRenderType + 1);
}
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index 77189dceae..c5932a6ad9 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -54,8 +54,9 @@
const F32 DETAIL_SCALE = 1.f/16.f;
int DebugDetailMap = 0;
-S32 LLDrawPoolTerrain::sDetailMode = 1;
+S32 LLDrawPoolTerrain::sPBRDetailMode = 0;
F32 LLDrawPoolTerrain::sDetailScale = DETAIL_SCALE;
+F32 LLDrawPoolTerrain::sPBRDetailScale = DETAIL_SCALE;
static LLGLSLShader* sShader = NULL;
static LLTrace::BlockTimerStatHandle FTM_SHADOW_TERRAIN("Terrain Shadow");
@@ -66,7 +67,8 @@ LLDrawPoolTerrain::LLDrawPoolTerrain(LLViewerTexture *texturep) :
{
// Hack!
sDetailScale = 1.f/gSavedSettings.getF32("RenderTerrainScale");
- sDetailMode = gSavedSettings.getS32("RenderTerrainDetail");
+ sPBRDetailScale = 1.f/gSavedSettings.getF32("RenderTerrainPBRScale");
+ sPBRDetailMode = gSavedSettings.getS32("RenderTerrainPBRDetail");
mAlphaRampImagep = LLViewerTextureManager::getFetchedTexture(IMG_ALPHA_GRAD);
//gGL.getTexUnit(0)->bind(mAlphaRampImagep.get());
@@ -105,13 +107,7 @@ U32 LLDrawPoolTerrain::getVertexDataMask()
void LLDrawPoolTerrain::prerender()
{
- sDetailMode = gSavedSettings.getS32("RenderTerrainDetail");
-}
-
-//static
-S32 LLDrawPoolTerrain::getDetailMode()
-{
- return sDetailMode;
+ sPBRDetailMode = gSavedSettings.getS32("RenderTerrainPBRDetail");
}
void LLDrawPoolTerrain::boostTerrainDetailTextures()
@@ -119,21 +115,13 @@ void LLDrawPoolTerrain::boostTerrainDetailTextures()
// Hack! Get the region that this draw pool is rendering from!
LLViewerRegion *regionp = mDrawFace[0]->getDrawable()->getVObj()->getRegion();
LLVLComposition *compp = regionp->getComposition();
- for (S32 i = 0; i < 4; i++)
- {
- compp->mDetailTextures[i]->setBoostLevel(LLGLTexture::BOOST_TERRAIN);
- compp->mDetailTextures[i]->addTextureStats(1024.f * 1024.f);
- }
+ compp->boost();
}
void LLDrawPoolTerrain::beginDeferredPass(S32 pass)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN);
LLFacePool::beginRenderPass(pass);
-
- sShader = &gDeferredTerrainProgram;
-
- sShader->bind();
}
void LLDrawPoolTerrain::endDeferredPass(S32 pass)
@@ -204,19 +192,8 @@ void LLDrawPoolTerrain::drawLoop()
{
LLFace *facep = *iter;
- LLMatrix4* model_matrix = &(facep->getDrawable()->getRegion()->mRenderMatrix);
-
- if (model_matrix != gGLLastMatrix)
- {
- llassert(gGL.getMatrixMode() == LLRender::MM_MODELVIEW);
- gGLLastMatrix = model_matrix;
- gGL.loadMatrix(gGLModelView);
- if (model_matrix)
- {
- gGL.multMatrix((GLfloat*) model_matrix->mMatrix);
- }
- gPipeline.mMatrixOpCount++;
- }
+ llassert(gGL.getMatrixMode() == LLRender::MM_MODELVIEW);
+ LLRenderPass::applyModelMatrix(&facep->getDrawable()->getRegion()->mRenderMatrix);
facep->renderIndexed();
}
@@ -225,9 +202,34 @@ void LLDrawPoolTerrain::drawLoop()
void LLDrawPoolTerrain::renderFullShader()
{
+ const BOOL use_local_materials = gLocalTerrainMaterials.materialsReady(true, false);
// Hack! Get the region that this draw pool is rendering from!
LLViewerRegion *regionp = mDrawFace[0]->getDrawable()->getVObj()->getRegion();
LLVLComposition *compp = regionp->getComposition();
+ const BOOL use_textures = !use_local_materials && (compp->getMaterialType() == LLTerrainMaterials::Type::TEXTURE);
+
+ if (use_textures)
+ {
+ // Use textures
+ sShader = &gDeferredTerrainProgram;
+ sShader->bind();
+ renderFullShaderTextures();
+ }
+ else
+ {
+ // Use materials
+ sShader = &gDeferredPBRTerrainProgram;
+ sShader->bind();
+ renderFullShaderPBR(use_local_materials);
+ }
+}
+
+void LLDrawPoolTerrain::renderFullShaderTextures()
+{
+ // Hack! Get the region that this draw pool is rendering from!
+ LLViewerRegion *regionp = mDrawFace[0]->getDrawable()->getVObj()->getRegion();
+ LLVLComposition *compp = regionp->getComposition();
+
LLViewerTexture *detail_texture0p = compp->mDetailTextures[0];
LLViewerTexture *detail_texture1p = compp->mDetailTextures[1];
LLViewerTexture *detail_texture2p = compp->mDetailTextures[2];
@@ -322,6 +324,236 @@ void LLDrawPoolTerrain::renderFullShader()
gGL.getTexUnit(detail0)->activate();
}
+// *TODO: Investigate use of bindFast for PBR terrain textures
+void LLDrawPoolTerrain::renderFullShaderPBR(BOOL local_materials)
+{
+ // Hack! Get the region that this draw pool is rendering from!
+ LLViewerRegion *regionp = mDrawFace[0]->getDrawable()->getVObj()->getRegion();
+ LLVLComposition *compp = regionp->getComposition();
+ LLPointer<LLFetchedGLTFMaterial> (*fetched_materials)[LLVLComposition::ASSET_COUNT] = &compp->mDetailMaterials;
+
+ constexpr U32 terrain_material_count = LLVLComposition::ASSET_COUNT;
+#ifdef SHOW_ASSERT
+ constexpr U32 shader_material_count = 1 + LLViewerShaderMgr::TERRAIN_DETAIL3_BASE_COLOR - LLViewerShaderMgr::TERRAIN_DETAIL0_BASE_COLOR;
+ llassert(shader_material_count == terrain_material_count);
+#endif
+
+ if (local_materials)
+ {
+ // Override region terrain with the global local override terrain
+ fetched_materials = &gLocalTerrainMaterials.mDetailMaterials;
+ }
+ const LLGLTFMaterial* materials[terrain_material_count];
+ for (U32 i = 0; i < terrain_material_count; ++i)
+ {
+ materials[i] = (*fetched_materials)[i].get();
+ if (!materials[i]) { materials[i] = &LLGLTFMaterial::sDefault; }
+ }
+
+ S32 detail_basecolor[terrain_material_count];
+ S32 detail_normal[terrain_material_count];
+ S32 detail_metalrough[terrain_material_count];
+ S32 detail_emissive[terrain_material_count];
+
+ for (U32 i = 0; i < terrain_material_count; ++i)
+ {
+ LLViewerTexture* detail_basecolor_texturep = nullptr;
+ LLViewerTexture* detail_normal_texturep = nullptr;
+ LLViewerTexture* detail_metalrough_texturep = nullptr;
+ LLViewerTexture* detail_emissive_texturep = nullptr;
+
+ const LLFetchedGLTFMaterial* fetched_material = (*fetched_materials)[i].get();
+ if (fetched_material)
+ {
+ detail_basecolor_texturep = fetched_material->mBaseColorTexture;
+ detail_normal_texturep = fetched_material->mNormalTexture;
+ detail_metalrough_texturep = fetched_material->mMetallicRoughnessTexture;
+ detail_emissive_texturep = fetched_material->mEmissiveTexture;
+ }
+
+ detail_basecolor[i] = sShader->enableTexture(LLViewerShaderMgr::TERRAIN_DETAIL0_BASE_COLOR + i);
+ if (detail_basecolor_texturep)
+ {
+ gGL.getTexUnit(detail_basecolor[i])->bind(detail_basecolor_texturep);
+ }
+ else
+ {
+ gGL.getTexUnit(detail_basecolor[i])->bind(LLViewerFetchedTexture::sWhiteImagep);
+ }
+ gGL.getTexUnit(detail_basecolor[i])->setTextureAddressMode(LLTexUnit::TAM_WRAP);
+ gGL.getTexUnit(detail_basecolor[i])->activate();
+
+ if (sPBRDetailMode >= TERRAIN_PBR_DETAIL_NORMAL)
+ {
+ detail_normal[i] = sShader->enableTexture(LLViewerShaderMgr::TERRAIN_DETAIL0_NORMAL + i);
+ if (detail_normal_texturep)
+ {
+ gGL.getTexUnit(detail_normal[i])->bind(detail_normal_texturep);
+ }
+ else
+ {
+ gGL.getTexUnit(detail_normal[i])->bind(LLViewerFetchedTexture::sFlatNormalImagep);
+ }
+ gGL.getTexUnit(detail_normal[i])->setTextureAddressMode(LLTexUnit::TAM_WRAP);
+ gGL.getTexUnit(detail_normal[i])->activate();
+ }
+
+ if (sPBRDetailMode >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ {
+ detail_metalrough[i] = sShader->enableTexture(LLViewerShaderMgr::TERRAIN_DETAIL0_METALLIC_ROUGHNESS + i);
+ if (detail_metalrough_texturep)
+ {
+ gGL.getTexUnit(detail_metalrough[i])->bind(detail_metalrough_texturep);
+ }
+ else
+ {
+ gGL.getTexUnit(detail_metalrough[i])->bind(LLViewerFetchedTexture::sWhiteImagep);
+ }
+ gGL.getTexUnit(detail_metalrough[i])->setTextureAddressMode(LLTexUnit::TAM_WRAP);
+ gGL.getTexUnit(detail_metalrough[i])->activate();
+ }
+
+ if (sPBRDetailMode >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ {
+ detail_emissive[i] = sShader->enableTexture(LLViewerShaderMgr::TERRAIN_DETAIL0_EMISSIVE + i);
+ if (detail_emissive_texturep)
+ {
+ gGL.getTexUnit(detail_emissive[i])->bind(detail_emissive_texturep);
+ }
+ else
+ {
+ gGL.getTexUnit(detail_emissive[i])->bind(LLViewerFetchedTexture::sWhiteImagep);
+ }
+ gGL.getTexUnit(detail_emissive[i])->setTextureAddressMode(LLTexUnit::TAM_WRAP);
+ gGL.getTexUnit(detail_emissive[i])->activate();
+ }
+ }
+
+ LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
+ llassert(shader);
+
+
+ // *TODO: Figure out why this offset is *sometimes* producing seams at the
+ // region edge, and repeat jumps when crossing regions, when
+ // RenderTerrainPBRScale is not a factor of the region scale.
+ LLVector3d region_origin_global = gAgent.getRegion()->getOriginGlobal();
+ F32 offset_x = (F32)fmod(region_origin_global.mdV[VX], 1.0/(F64)sPBRDetailScale)*sPBRDetailScale;
+ F32 offset_y = (F32)fmod(region_origin_global.mdV[VY], 1.0/(F64)sPBRDetailScale)*sPBRDetailScale;
+
+ LLGLTFMaterial::TextureTransform base_color_transform;
+ base_color_transform.mScale = LLVector2(sPBRDetailScale, sPBRDetailScale);
+ base_color_transform.mOffset = LLVector2(offset_x, offset_y);
+ F32 base_color_packed[8];
+ base_color_transform.getPacked(base_color_packed);
+ // *HACK: Use the same texture repeats for all PBR terrain textures for now
+ // (not compliant with KHR texture transform spec)
+ shader->uniform4fv(LLShaderMgr::TEXTURE_BASE_COLOR_TRANSFORM, 2, (F32*)base_color_packed);
+
+ LLSettingsWater::ptr_t pwater = LLEnvironment::instance().getCurrentWater();
+
+ //
+ // Alpha Ramp
+ //
+ S32 alpha_ramp = sShader->enableTexture(LLViewerShaderMgr::TERRAIN_ALPHARAMP);
+ gGL.getTexUnit(alpha_ramp)->bind(m2DAlphaRampImagep);
+ gGL.getTexUnit(alpha_ramp)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
+
+ //
+ // GLTF uniforms
+ //
+
+ LLColor4 base_color_factors[terrain_material_count];
+ F32 metallic_factors[terrain_material_count];
+ F32 roughness_factors[terrain_material_count];
+ LLColor3 emissive_colors[terrain_material_count];
+ F32 minimum_alphas[terrain_material_count];
+ for (U32 i = 0; i < terrain_material_count; ++i)
+ {
+ const LLGLTFMaterial* material = materials[i];
+
+ base_color_factors[i] = material->mBaseColor;
+ metallic_factors[i] = material->mMetallicFactor;
+ roughness_factors[i] = material->mRoughnessFactor;
+ emissive_colors[i] = material->mEmissiveColor;
+ // glTF 2.0 Specification 3.9.4. Alpha Coverage
+ // mAlphaCutoff is only valid for LLGLTFMaterial::ALPHA_MODE_MASK
+ // Use 0 here due to GLTF terrain blending (LLGLTFMaterial::bind uses
+ // -1 for easier debugging)
+ F32 min_alpha = -0.0f;
+ if (material->mAlphaMode == LLGLTFMaterial::ALPHA_MODE_MASK)
+ {
+ // dividing the alpha cutoff by transparency here allows the shader to compare against
+ // the alpha value of the texture without needing the transparency value
+ min_alpha = material->mAlphaCutoff/material->mBaseColor.mV[3];
+ }
+ minimum_alphas[i] = min_alpha;
+ }
+ shader->uniform4fv(LLShaderMgr::TERRAIN_BASE_COLOR_FACTORS, terrain_material_count, (F32*)base_color_factors);
+ if (sPBRDetailMode >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ {
+ shader->uniform4f(LLShaderMgr::TERRAIN_METALLIC_FACTORS, metallic_factors[0], metallic_factors[1], metallic_factors[2], metallic_factors[3]);
+ shader->uniform4f(LLShaderMgr::TERRAIN_ROUGHNESS_FACTORS, roughness_factors[0], roughness_factors[1], roughness_factors[2], roughness_factors[3]);
+ }
+ if (sPBRDetailMode >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ {
+ shader->uniform3fv(LLShaderMgr::TERRAIN_EMISSIVE_COLORS, terrain_material_count, (F32*)emissive_colors);
+ }
+ shader->uniform4f(LLShaderMgr::TERRAIN_MINIMUM_ALPHAS, minimum_alphas[0], minimum_alphas[1], minimum_alphas[2], minimum_alphas[3]);
+
+ // GL_BLEND disabled by default
+ drawLoop();
+
+ // Disable multitexture
+
+ sShader->disableTexture(LLViewerShaderMgr::TERRAIN_ALPHARAMP);
+
+ gGL.getTexUnit(alpha_ramp)->unbind(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(alpha_ramp)->disable();
+ gGL.getTexUnit(alpha_ramp)->activate();
+
+ for (U32 i = 0; i < terrain_material_count; ++i)
+ {
+ sShader->disableTexture(LLViewerShaderMgr::TERRAIN_DETAIL0_BASE_COLOR + i);
+ if (sPBRDetailMode >= TERRAIN_PBR_DETAIL_NORMAL)
+ {
+ sShader->disableTexture(LLViewerShaderMgr::TERRAIN_DETAIL0_NORMAL + i);
+ }
+ if (sPBRDetailMode >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ {
+ sShader->disableTexture(LLViewerShaderMgr::TERRAIN_DETAIL0_METALLIC_ROUGHNESS + i);
+ }
+ if (sPBRDetailMode >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ {
+ sShader->disableTexture(LLViewerShaderMgr::TERRAIN_DETAIL0_EMISSIVE + i);
+ }
+
+ gGL.getTexUnit(detail_basecolor[i])->unbind(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(detail_basecolor[i])->disable();
+ gGL.getTexUnit(detail_basecolor[i])->activate();
+
+ if (sPBRDetailMode >= TERRAIN_PBR_DETAIL_NORMAL)
+ {
+ gGL.getTexUnit(detail_normal[i])->unbind(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(detail_normal[i])->disable();
+ gGL.getTexUnit(detail_normal[i])->activate();
+ }
+
+ if (sPBRDetailMode >= TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS)
+ {
+ gGL.getTexUnit(detail_metalrough[i])->unbind(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(detail_metalrough[i])->disable();
+ gGL.getTexUnit(detail_metalrough[i])->activate();
+ }
+
+ if (sPBRDetailMode >= TERRAIN_PBR_DETAIL_EMISSIVE)
+ {
+ gGL.getTexUnit(detail_emissive[i])->unbind(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(detail_emissive[i])->disable();
+ gGL.getTexUnit(detail_emissive[i])->activate();
+ }
+ }
+}
+
void LLDrawPoolTerrain::hilightParcelOwners()
{
{ //use fullbright shader for highlighting
diff --git a/indra/newview/lldrawpoolterrain.h b/indra/newview/lldrawpoolterrain.h
index 03bef31541..13f031c8e7 100644
--- a/indra/newview/lldrawpoolterrain.h
+++ b/indra/newview/lldrawpoolterrain.h
@@ -37,13 +37,12 @@ public:
{
VERTEX_DATA_MASK = LLVertexBuffer::MAP_VERTEX |
LLVertexBuffer::MAP_NORMAL |
+ LLVertexBuffer::MAP_TANGENT | // Only PBR terrain uses this currently
LLVertexBuffer::MAP_TEXCOORD0 |
LLVertexBuffer::MAP_TEXCOORD1
};
virtual U32 getVertexDataMask();
- static S32 getDetailMode();
-
LLDrawPoolTerrain(LLViewerTexture *texturep);
virtual ~LLDrawPoolTerrain();
@@ -67,8 +66,9 @@ public:
LLPointer<LLViewerTexture> m2DAlphaRampImagep;
LLPointer<LLViewerTexture> mAlphaNoiseImagep;
- static S32 sDetailMode;
- static F32 sDetailScale; // meters per texture
+ static S32 sPBRDetailMode;
+ static F32 sDetailScale; // textures per meter
+ static F32 sPBRDetailScale; // textures per meter
protected:
void boostTerrainDetailTextures();
@@ -79,6 +79,8 @@ protected:
void renderFull2TU();
void renderFull4TU();
void renderFullShader();
+ void renderFullShaderTextures();
+ void renderFullShaderPBR(BOOL local_materials = false);
void drawLoop();
private:
diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp
index 9dcbc48697..0a20f83ad1 100644
--- a/indra/newview/lldrawpooltree.cpp
+++ b/indra/newview/lldrawpooltree.cpp
@@ -85,17 +85,8 @@ void LLDrawPoolTree::renderDeferred(S32 pass)
{
LLMatrix4* model_matrix = &(face->getDrawable()->getRegion()->mRenderMatrix);
- if (model_matrix != gGLLastMatrix)
- {
- gGLLastMatrix = model_matrix;
- gGL.loadMatrix(gGLModelView);
- if (model_matrix)
- {
- llassert(gGL.getMatrixMode() == LLRender::MM_MODELVIEW);
- gGL.multMatrix((GLfloat*)model_matrix->mMatrix);
- }
- gPipeline.mMatrixOpCount++;
- }
+ llassert(gGL.getMatrixMode() == LLRender::MM_MODELVIEW);
+ LLRenderPass::applyModelMatrix(model_matrix);
buff->setBuffer();
buff->drawRange(LLRender::TRIANGLES, 0, buff->getNumVerts() - 1, buff->getNumIndices(), 0);
@@ -141,9 +132,9 @@ void LLDrawPoolTree::endShadowPass(S32 pass)
gDeferredTreeShadowProgram.unbind();
}
-BOOL LLDrawPoolTree::verify() const
+bool LLDrawPoolTree::verify() const
{
- return TRUE;
+ return true;
}
LLViewerTexture *LLDrawPoolTree::getTexture()
diff --git a/indra/newview/lldrawpooltree.h b/indra/newview/lldrawpooltree.h
index 496445692c..13d59f36c5 100644
--- a/indra/newview/lldrawpooltree.h
+++ b/indra/newview/lldrawpooltree.h
@@ -55,7 +55,7 @@ public:
/*virtual*/ void endShadowPass(S32 pass);
/*virtual*/ void renderShadow(S32 pass);
- /*virtual*/ BOOL verify() const;
+ /*virtual*/ bool verify() const;
/*virtual*/ LLViewerTexture *getTexture();
/*virtual*/ LLViewerTexture *getDebugTexture();
/*virtual*/ LLColor3 getDebugColor() const; // For AGP debug display
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index ca93815de7..05b5bf6d48 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -49,12 +49,12 @@
#include "llsettingssky.h"
#include "llsettingswater.h"
-BOOL LLDrawPoolWater::sSkipScreenCopy = FALSE;
-BOOL LLDrawPoolWater::sNeedsReflectionUpdate = TRUE;
-BOOL LLDrawPoolWater::sNeedsDistortionUpdate = TRUE;
+bool LLDrawPoolWater::sSkipScreenCopy = false;
+bool LLDrawPoolWater::sNeedsReflectionUpdate = true;
+bool LLDrawPoolWater::sNeedsDistortionUpdate = true;
F32 LLDrawPoolWater::sWaterFogEnd = 0.f;
-extern BOOL gCubeSnapshot;
+extern bool gCubeSnapshot;
LLDrawPoolWater::LLDrawPoolWater() : LLFacePool(POOL_WATER)
{
@@ -325,8 +325,8 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass)
// Note non-void water being drawn, updates required
if (!edge) // SL-16461 remove !LLPipeline::sUseOcclusion check
{
- sNeedsReflectionUpdate = TRUE;
- sNeedsDistortionUpdate = TRUE;
+ sNeedsReflectionUpdate = true;
+ sNeedsDistortionUpdate = true;
}
}
}
diff --git a/indra/newview/lldrawpoolwater.h b/indra/newview/lldrawpoolwater.h
index 3158b0a59b..c81b27cb34 100644
--- a/indra/newview/lldrawpoolwater.h
+++ b/indra/newview/lldrawpoolwater.h
@@ -44,9 +44,9 @@ protected:
LLPointer<LLViewerTexture> mOpaqueWaterImagep;
public:
- static BOOL sSkipScreenCopy;
- static BOOL sNeedsReflectionUpdate;
- static BOOL sNeedsDistortionUpdate;
+ static bool sSkipScreenCopy;
+ static bool sNeedsReflectionUpdate;
+ static bool sNeedsDistortionUpdate;
static F32 sWaterFogEnd;
enum
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index b14235f25c..12c76e301d 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -44,8 +44,9 @@
#include "llsky.h"
#include "llvowlsky.h"
#include "llsettingsvo.h"
+#include "llviewercontrol.h"
-extern BOOL gCubeSnapshot;
+extern bool gCubeSnapshot;
static LLStaticHashedString sCamPosLocal("camPosLocal");
static LLStaticHashedString sCustomAlpha("custom_alpha");
@@ -127,6 +128,19 @@ void LLDrawPoolWLSky::renderDome(const LLVector3& camPosLocal, F32 camHeightLoca
gGL.popMatrix();
}
+extern LLPointer<LLImageGL> gEXRImage;
+
+static bool use_hdri_sky()
+{
+ static LLCachedControl<F32> hdri_split(gSavedSettings, "RenderHDRISplitScreen", 1.f);
+ static LLCachedControl<bool> irradiance_only(gSavedSettings, "RenderHDRIIrradianceOnly", false);
+
+ return gCubeSnapshot && (!irradiance_only || !gPipeline.mReflectionMapManager.isRadiancePass()) ? gEXRImage.notNull() : // always use HDRI for reflection probes when available
+ gEXRImage.notNull() ? hdri_split > 0.f : // fallback to EEP sky when split screen is zero
+ false; // no HDRI available, always use EEP sky
+
+}
+
void LLDrawPoolWLSky::renderSkyHazeDeferred(const LLVector3& camPosLocal, F32 camHeightLocal) const
{
if (!gSky.mVOSkyp)
@@ -138,9 +152,34 @@ void LLDrawPoolWLSky::renderSkyHazeDeferred(const LLVector3& camPosLocal, F32 ca
if (gPipeline.canUseWindLightShaders() && gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SKY))
{
- LLGLSPipelineDepthTestSkyBox sky(true, true);
+ if (use_hdri_sky())
+ {
+ sky_shader = &gEnvironmentMapProgram;
+ sky_shader->bind();
+ S32 idx = sky_shader->enableTexture(LLShaderMgr::ENVIRONMENT_MAP);
+ if (idx > -1)
+ {
+ gGL.getTexUnit(idx)->bind(gEXRImage);
+ }
+
+ static LLCachedControl<F32> hdri_exposure(gSavedSettings, "RenderHDRIExposure", 0.0f);
+ static LLCachedControl<F32> hdri_rotation(gSavedSettings, "RenderHDRIRotation", 0.f);
+ static LLCachedControl<F32> hdri_split(gSavedSettings, "RenderHDRISplitScreen", 1.f);
+ static LLStaticHashedString hdri_split_screen("hdri_split_screen");
- sky_shader->bind();
+ LLMatrix3 rot;
+ rot.setRot(0.f, hdri_rotation*DEG_TO_RAD, 0.f);
+
+ sky_shader->uniform1f(LLShaderMgr::SKY_HDR_SCALE, powf(2.f, hdri_exposure));
+ sky_shader->uniformMatrix3fv(LLShaderMgr::DEFERRED_ENV_MAT, 1, GL_FALSE, (F32*) rot.mMatrix);
+ sky_shader->uniform1f(hdri_split_screen, gCubeSnapshot ? 1.f : hdri_split);
+ }
+ else
+ {
+ sky_shader->bind();
+ }
+
+ LLGLSPipelineDepthTestSkyBox sky(true, true);
sky_shader->uniform1i(LLShaderMgr::CUBE_SNAPSHOT, gCubeSnapshot ? 1 : 0);
@@ -180,7 +219,7 @@ void LLDrawPoolWLSky::renderSkyHazeDeferred(const LLVector3& camPosLocal, F32 ca
void LLDrawPoolWLSky::renderStarsDeferred(const LLVector3& camPosLocal) const
{
- if (!gSky.mVOSkyp)
+ if (!gSky.mVOSkyp || use_hdri_sky())
{
return;
}
@@ -251,6 +290,11 @@ void LLDrawPoolWLSky::renderStarsDeferred(const LLVector3& camPosLocal) const
void LLDrawPoolWLSky::renderSkyCloudsDeferred(const LLVector3& camPosLocal, F32 camHeightLocal, LLGLSLShader* cloudshader) const
{
+ if (use_hdri_sky())
+ {
+ return;
+ }
+
if (gPipeline.canUseWindLightShaders() && gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS) && gSky.mVOSkyp && gSky.mVOSkyp->getCloudNoiseTex())
{
LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky();
@@ -310,7 +354,7 @@ void LLDrawPoolWLSky::renderSkyCloudsDeferred(const LLVector3& camPosLocal, F32
void LLDrawPoolWLSky::renderHeavenlyBodies()
{
- if (!gSky.mVOSkyp) return;
+ if (!gSky.mVOSkyp || use_hdri_sky()) return;
LLGLSPipelineBlendSkyBox gls_skybox(true, true); // SL-14113 we need moon to write to depth to clip stars behind
@@ -438,8 +482,6 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass)
const F32 camHeightLocal = LLEnvironment::instance().getCamHeight();
- gGL.setColorMask(true, false);
-
LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin();
if (gPipeline.canUseWindLightShaders())
@@ -456,7 +498,6 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass)
renderSkyCloudsDeferred(origin, camHeightLocal, cloud_shader);
}
}
- gGL.setColorMask(true, true);
}
diff --git a/indra/newview/lldrawpoolwlsky.h b/indra/newview/lldrawpoolwlsky.h
index c26d0a1e23..85d0e57838 100644
--- a/indra/newview/lldrawpoolwlsky.h
+++ b/indra/newview/lldrawpoolwlsky.h
@@ -43,7 +43,7 @@ public:
LLDrawPoolWLSky(void);
/*virtual*/ ~LLDrawPoolWLSky();
- /*virtual*/ BOOL isDead() { return FALSE; }
+ /*virtual*/ bool isDead() { return false; }
/*virtual*/ S32 getNumDeferredPasses() { return 1; }
/*virtual*/ void beginDeferredPass(S32 pass);
@@ -52,13 +52,13 @@ public:
/*virtual*/ LLViewerTexture *getDebugTexture();
/*virtual*/ U32 getVertexDataMask() { return SKY_VERTEX_DATA_MASK; }
- /*virtual*/ BOOL verify() const { return TRUE; } // Verify that all data in the draw pool is correct!
+ /*virtual*/ bool verify() const { return true; } // Verify that all data in the draw pool is correct!
/*virtual*/ S32 getShaderLevel() const { return mShaderLevel; }
//static LLDrawPool* createPool(const U32 type, LLViewerTexture *tex0 = NULL);
/*virtual*/ LLViewerTexture* getTexture();
- /*virtual*/ BOOL isFacePool() { return FALSE; }
+ /*virtual*/ bool isFacePool() { return false; }
/*virtual*/ void resetDrawOrders();
static void cleanupGL();
diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp
index 425acd3392..744c55d64a 100644
--- a/indra/newview/lldynamictexture.cpp
+++ b/indra/newview/lldynamictexture.cpp
@@ -50,8 +50,8 @@ S32 LLViewerDynamicTexture::sNumRenders = 0;
//-----------------------------------------------------------------------------
// LLViewerDynamicTexture()
//-----------------------------------------------------------------------------
-LLViewerDynamicTexture::LLViewerDynamicTexture(S32 width, S32 height, S32 components, EOrder order, BOOL clamp) :
- LLViewerTexture(width, height, components, FALSE),
+LLViewerDynamicTexture::LLViewerDynamicTexture(S32 width, S32 height, S32 components, EOrder order, bool clamp) :
+ LLViewerTexture(width, height, components, false),
mClamp(clamp)
{
llassert((1 <= components) && (components <= 4));
@@ -85,10 +85,10 @@ S8 LLViewerDynamicTexture::getType() const
void LLViewerDynamicTexture::generateGLTexture()
{
LLViewerTexture::generateGLTexture() ;
- generateGLTexture(-1, 0, 0, FALSE);
+ generateGLTexture(-1, 0, 0, false);
}
-void LLViewerDynamicTexture::generateGLTexture(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format, BOOL swap_bytes)
+void LLViewerDynamicTexture::generateGLTexture(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format, bool swap_bytes)
{
if (mComponents < 1 || mComponents > 4)
{
@@ -100,7 +100,7 @@ void LLViewerDynamicTexture::generateGLTexture(LLGLint internal_format, LLGLenum
{
setExplicitFormat(internal_format, primary_format, type_format, swap_bytes);
}
- createGLTexture(0, raw_image, 0, TRUE, LLGLTexture::DYNAMIC_TEX);
+ createGLTexture(0, raw_image, 0, true, LLGLTexture::DYNAMIC_TEX);
setAddressMode((mClamp) ? LLTexUnit::TAM_CLAMP : LLTexUnit::TAM_WRAP);
mGLTexturep->setGLTextureCreated(false);
}
@@ -108,16 +108,18 @@ void LLViewerDynamicTexture::generateGLTexture(LLGLint internal_format, LLGLenum
//-----------------------------------------------------------------------------
// render()
//-----------------------------------------------------------------------------
-BOOL LLViewerDynamicTexture::render()
+bool LLViewerDynamicTexture::render()
{
- return FALSE;
+ return false;
}
//-----------------------------------------------------------------------------
// preRender()
//-----------------------------------------------------------------------------
-void LLViewerDynamicTexture::preRender(BOOL clear_depth)
+void LLViewerDynamicTexture::preRender(bool clear_depth)
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
+
//use the bottom left corner
mOrigin.set(0, 0);
@@ -140,7 +142,7 @@ void LLViewerDynamicTexture::preRender(BOOL clear_depth)
//-----------------------------------------------------------------------------
// postRender()
//-----------------------------------------------------------------------------
-void LLViewerDynamicTexture::postRender(BOOL success)
+void LLViewerDynamicTexture::postRender(bool success)
{
{
if (success)
@@ -179,27 +181,34 @@ void LLViewerDynamicTexture::postRender(BOOL success)
// updateDynamicTextures()
// Calls update on each dynamic texture. Calls each group in order: "first," then "middle," then "last."
//-----------------------------------------------------------------------------
-BOOL LLViewerDynamicTexture::updateAllInstances()
+bool LLViewerDynamicTexture::updateAllInstances()
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
+
sNumRenders = 0;
if (gGLManager.mIsDisabled)
{
- return TRUE;
+ return true;
}
- bool use_fbo = gPipeline.mBake.isComplete() && !gGLManager.mIsAMD;
+ LLRenderTarget& bake_target = gPipeline.mAuxillaryRT.deferredScreen;
- if (use_fbo)
- {
- gPipeline.mBake.bindTarget();
- gPipeline.mBake.clear();
- }
+ if (!bake_target.isComplete())
+ {
+ llassert(false);
+ return FALSE;
+ }
+ llassert(bake_target.getWidth() >= LLPipeline::MAX_BAKE_WIDTH);
+ llassert(bake_target.getHeight() >= LLPipeline::MAX_BAKE_WIDTH);
+
+ bake_target.bindTarget();
+ bake_target.clear();
LLGLSLShader::unbind();
LLVertexBuffer::unbind();
- BOOL result = FALSE;
- BOOL ret = FALSE ;
+ bool result = false;
+ bool ret = false ;
for( S32 order = 0; order < ORDER_COUNT; order++ )
{
for (instance_list_t::iterator iter = LLViewerDynamicTexture::sInstances[order].begin();
@@ -208,17 +217,19 @@ BOOL LLViewerDynamicTexture::updateAllInstances()
LLViewerDynamicTexture *dynamicTexture = *iter;
if (dynamicTexture->needsRender())
{
+ llassert(dynamicTexture->getFullWidth() <= LLPipeline::MAX_BAKE_WIDTH);
+ llassert(dynamicTexture->getFullHeight() <= LLPipeline::MAX_BAKE_WIDTH);
+
glClear(GL_DEPTH_BUFFER_BIT);
- gDepthDirty = TRUE;
gGL.color4f(1,1,1,1);
- dynamicTexture->setBoundTarget(use_fbo ? &gPipeline.mBake : nullptr);
+ dynamicTexture->setBoundTarget(&bake_target);
dynamicTexture->preRender(); // Must be called outside of startRender()
- result = FALSE;
+ result = false;
if (dynamicTexture->render())
{
- ret = TRUE ;
- result = TRUE;
+ ret = true ;
+ result = true;
sNumRenders++;
}
gGL.flush();
@@ -229,10 +240,7 @@ BOOL LLViewerDynamicTexture::updateAllInstances()
}
}
- if (use_fbo)
- {
- gPipeline.mBake.flush();
- }
+ bake_target.flush();
gGL.flush();
diff --git a/indra/newview/lldynamictexture.h b/indra/newview/lldynamictexture.h
index caedf928c3..e2ae1090bc 100644
--- a/indra/newview/lldynamictexture.h
+++ b/indra/newview/lldynamictexture.h
@@ -60,7 +60,7 @@ public:
S32 height,
S32 components, // = 4,
EOrder order, // = ORDER_MIDDLE,
- BOOL clamp);
+ bool clamp);
/*virtual*/ S8 getType() const ;
@@ -69,15 +69,15 @@ public:
S32 getSize() { return mFullWidth * mFullHeight * mComponents; }
- virtual BOOL needsRender() { return TRUE; }
- virtual void preRender(BOOL clear_depth = TRUE);
- virtual BOOL render();
- virtual void postRender(BOOL success);
+ virtual bool needsRender() { return true; }
+ virtual void preRender(bool clear_depth = true);
+ virtual bool render();
+ virtual void postRender(bool success);
virtual void restoreGLTexture() {}
virtual void destroyGLTexture() {}
- static BOOL updateAllInstances();
+ static bool updateAllInstances();
static void destroyGL() ;
static void restoreGL() ;
@@ -85,10 +85,10 @@ public:
protected:
void generateGLTexture();
- void generateGLTexture(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format, BOOL swap_bytes = FALSE);
+ void generateGLTexture(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format, bool swap_bytes = false);
protected:
- BOOL mClamp;
+ bool mClamp;
LLCoordGL mOrigin;
LL_ALIGN_16(LLCamera mCamera);
diff --git a/indra/newview/llemote.cpp b/indra/newview/llemote.cpp
index b9ef297c00..a051825dae 100644
--- a/indra/newview/llemote.cpp
+++ b/indra/newview/llemote.cpp
@@ -74,7 +74,7 @@ LLMotion::LLMotionInitStatus LLEmote::onInitialize(LLCharacter *character)
//-----------------------------------------------------------------------------
// LLEmote::onActivate()
//-----------------------------------------------------------------------------
-BOOL LLEmote::onActivate()
+bool LLEmote::onActivate()
{
LLVisualParam* default_param = mCharacter->getVisualParam( "Express_Closed_Mouth" );
if( default_param )
@@ -89,14 +89,14 @@ BOOL LLEmote::onActivate()
mCharacter->updateVisualParams();
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// LLEmote::onUpdate()
//-----------------------------------------------------------------------------
-BOOL LLEmote::onUpdate(F32 time, U8* joint_mask)
+bool LLEmote::onUpdate(F32 time, U8* joint_mask)
{
if( mParam )
{
@@ -116,7 +116,7 @@ BOOL LLEmote::onUpdate(F32 time, U8* joint_mask)
mCharacter->updateVisualParams();
}
- return TRUE;
+ return true;
}
diff --git a/indra/newview/llemote.h b/indra/newview/llemote.h
index 4c516998dc..c4b35c3265 100644
--- a/indra/newview/llemote.h
+++ b/indra/newview/llemote.h
@@ -69,7 +69,7 @@ public:
//-------------------------------------------------------------------------
// motions must specify whether or not they loop
- virtual BOOL getLoop() { return FALSE; }
+ virtual bool getLoop() { return false; }
// motions must report their total duration
virtual F32 getDuration() { return EMOTE_MORPH_FADEIN_TIME + EMOTE_MORPH_IN_TIME + EMOTE_MORPH_FADEOUT_TIME; }
@@ -94,19 +94,19 @@ public:
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
// called when a motion is activated
- // must return TRUE to indicate success, or else
+ // must return true to indicate success, or else
// it will be deactivated
- virtual BOOL onActivate();
+ virtual bool onActivate();
// called per time step
- // must return TRUE while it is active, and
- // must return FALSE when the motion is completed.
- virtual BOOL onUpdate(F32 time, U8* joint_mask);
+ // must return true while it is active, and
+ // must return false when the motion is completed.
+ virtual bool onUpdate(F32 time, U8* joint_mask);
// called when a motion is deactivated
virtual void onDeactivate();
- virtual BOOL canDeprecate() { return FALSE; }
+ virtual bool canDeprecate() { return false; }
protected:
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index 60c2682078..cd766aba59 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -1647,7 +1647,7 @@ LLVector4 LLEnvironment::getRotatedLightNorm() const
return toLightNorm(light_direction);
}
-extern BOOL gCubeSnapshot;
+extern bool gCubeSnapshot;
//-------------------------------------------------------------------------
void LLEnvironment::update(const LLViewerCamera * cam)
@@ -1675,8 +1675,6 @@ void LLEnvironment::update(const LLViewerCamera * cam)
updateSettingsUniforms();
- // *TODO: potential optimization - this block may only need to be
- // executed some of the time. For example for water shaders only.
{
LLViewerShaderMgr::shader_iter shaders_iter, end_shaders;
end_shaders = LLViewerShaderMgr::instance()->endShaders();
@@ -1687,6 +1685,10 @@ void LLEnvironment::update(const LLViewerCamera * cam)
|| shaders_iter->mShaderGroup == LLGLSLShader::SG_WATER))
{
shaders_iter->mUniformsDirty = TRUE;
+ if (shaders_iter->mRiggedVariant)
+ {
+ shaders_iter->mRiggedVariant->mUniformsDirty = TRUE;
+ }
}
}
}
@@ -1768,8 +1770,10 @@ void LLEnvironment::updateGLVariablesForSettings(LLShaderUniforms* uniforms, con
case LLSD::TypeArray:
{
LLVector4 vect4(value);
+ // always identify as a radiance pass if desaturating irradiance is disabled
+ static LLCachedControl<bool> desaturate_irradiance(gSavedSettings, "RenderDesaturateIrradiance", true);
- if (gCubeSnapshot && !gPipeline.mReflectionMapManager.isRadiancePass())
+ if (desaturate_irradiance && gCubeSnapshot && !gPipeline.mReflectionMapManager.isRadiancePass())
{ // maximize and remove tinting if this is an irradiance map render pass and the parameter feeds into the sky background color
auto max_vec = [](LLVector4 col)
{
@@ -2964,7 +2968,7 @@ void LLEnvironment::DayTransition::animate()
// pause probe updates and reset reflection maps on sky change
- gPipeline.mReflectionMapManager.pause();
+ gPipeline.mReflectionMapManager.pause(mTransitionTime);
gPipeline.mReflectionMapManager.reset();
mSky = mStartSky->buildClone();
@@ -3567,7 +3571,7 @@ namespace
mInjectedSky->setSource(target_sky);
// clear reflection probes and pause updates during sky change
- gPipeline.mReflectionMapManager.pause();
+ gPipeline.mReflectionMapManager.pause(transition);
gPipeline.mReflectionMapManager.reset();
mBlenderSky = std::make_shared<LLSettingsBlenderTimeDelta>(target_sky, start_sky, psky, transition);
diff --git a/indra/newview/lleventnotifier.cpp b/indra/newview/lleventnotifier.cpp
index 788b61b381..1d0ca05e70 100644
--- a/indra/newview/lleventnotifier.cpp
+++ b/indra/newview/lleventnotifier.cpp
@@ -259,13 +259,13 @@ void LLEventNotifier::load(const LLSD& event_options)
}
-BOOL LLEventNotifier::hasNotification(const U32 event_id)
+bool LLEventNotifier::hasNotification(const U32 event_id)
{
if (mEventNotifications.find(event_id) != mEventNotifications.end())
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void LLEventNotifier::remove(const U32 event_id)
diff --git a/indra/newview/lleventnotifier.h b/indra/newview/lleventnotifier.h
index 3fee46c2f6..c7c51817ac 100644
--- a/indra/newview/lleventnotifier.h
+++ b/indra/newview/lleventnotifier.h
@@ -48,7 +48,7 @@ public:
void load(const LLSD& event_options); // In the format that it comes in from login
void remove(U32 event_id);
- BOOL hasNotification(const U32 event_id);
+ bool hasNotification(const U32 event_id);
void serverPushRequest(U32 event_id, bool add);
typedef std::map<U32, LLEventNotification *> en_map;
diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp
index 2d332f75f5..5af9247285 100644
--- a/indra/newview/llexpandabletextbox.cpp
+++ b/indra/newview/llexpandabletextbox.cpp
@@ -93,12 +93,12 @@ public:
}
/*virtual*/ bool canEdit() const { return false; }
// eat handleMouseDown event so we get the mouseup event
- /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask) { return TRUE; }
- /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask) { mEditor.onCommit(); return TRUE; }
- /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask)
+ /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask) { return true; }
+ /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask) { mEditor.onCommit(); return true; }
+ /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask)
{
LLUI::getInstance()->getWindow()->setCursor(UI_CURSOR_HAND);
- return TRUE;
+ return true;
}
private:
LLTextBase& mEditor;
@@ -115,11 +115,11 @@ LLExpandableTextBox::LLTextBoxEx::LLTextBoxEx(const Params& p)
mExpanderLabel(p.label.isProvided() ? p.label : LLTrans::getString("More")),
mExpanderVisible(false)
{
- setIsChrome(TRUE);
+ setIsChrome(true);
setMaxTextLength(p.max_text_length);
}
-void LLExpandableTextBox::LLTextBoxEx::reshape(S32 width, S32 height, BOOL called_from_parent)
+void LLExpandableTextBox::LLTextBoxEx::reshape(S32 width, S32 height, bool called_from_parent)
{
LLTextEditor::reshape(width, height, called_from_parent);
}
@@ -247,11 +247,11 @@ void LLExpandableTextBox::draw()
{
if(mBGVisible && !mExpanded)
{
- gl_rect_2d(getLocalRect(), mBGColor.get(), TRUE);
+ gl_rect_2d(getLocalRect(), mBGColor.get(), true);
}
if(mExpandedBGVisible && mExpanded)
{
- gl_rect_2d(getLocalRect(), mExpandedBGColor.get(), TRUE);
+ gl_rect_2d(getLocalRect(), mExpandedBGColor.get(), true);
}
collapseIfPosChanged();
@@ -383,10 +383,10 @@ void LLExpandableTextBox::expandTextBox()
// expand text box
localRectToOtherView(expanded_rect, &expanded_screen_rect, getParent());
- reshape(expanded_screen_rect.getWidth(), expanded_screen_rect.getHeight(), FALSE);
+ reshape(expanded_screen_rect.getWidth(), expanded_screen_rect.getHeight(), false);
setRect(expanded_screen_rect);
- setFocus(TRUE);
+ setFocus(true);
// this lets us receive top_lost event(needed to collapse text box)
// it also draws text box above all other ui elements
gViewerWindow->addPopup(this);
@@ -403,7 +403,7 @@ void LLExpandableTextBox::collapseTextBox()
mExpanded = false;
- reshape(mCollapsedRect.getWidth(), mCollapsedRect.getHeight(), FALSE);
+ reshape(mCollapsedRect.getWidth(), mCollapsedRect.getHeight(), false);
setRect(mCollapsedRect);
updateTextBoxRect();
@@ -430,7 +430,7 @@ void LLExpandableTextBox::updateTextShape()
updateTextBoxRect();
}
-void LLExpandableTextBox::reshape(S32 width, S32 height, BOOL called_from_parent)
+void LLExpandableTextBox::reshape(S32 width, S32 height, bool called_from_parent)
{
mExpanded = false;
LLUICtrl::reshape(width, height, called_from_parent);
diff --git a/indra/newview/llexpandabletextbox.h b/indra/newview/llexpandabletextbox.h
index aaf393277f..440262a522 100644
--- a/indra/newview/llexpandabletextbox.h
+++ b/indra/newview/llexpandabletextbox.h
@@ -52,7 +52,7 @@ protected:
};
// adds or removes "More" link as needed
- /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+ /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true);
/*virtual*/ void setText(const LLStringExplicit& text, const LLStyle::Params& input_params = LLStyle::Params());
void setTextBase(const std::string& text) { LLTextBase::setText(text); }
@@ -147,7 +147,7 @@ public:
* *HACK: Update the inner textbox shape.
*/
void updateTextShape();
- virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+ virtual void reshape(S32 width, S32 height, bool called_from_parent = true);
/**
* Draws text box, collapses text box if its expanded and its parent's position changed
diff --git a/indra/newview/llexternaleditor.cpp b/indra/newview/llexternaleditor.cpp
index b0d88159c1..717d36d5e5 100644
--- a/indra/newview/llexternaleditor.cpp
+++ b/indra/newview/llexternaleditor.cpp
@@ -136,8 +136,8 @@ size_t LLExternalEditor::tokenize(string_vec_t& tokens, const std::string& str)
tokenizer tokens_list(str, sep);
tokenizer::iterator token_iter;
- BOOL inside_quotes = FALSE;
- BOOL last_was_space = FALSE;
+ bool inside_quotes = false;
+ bool last_was_space = false;
for (token_iter = tokens_list.begin(); token_iter != tokens_list.end(); ++token_iter)
{
if (!strncmp("\"",(*token_iter).c_str(),2))
@@ -149,7 +149,7 @@ size_t LLExternalEditor::tokenize(string_vec_t& tokens, const std::string& str)
if(inside_quotes)
{
tokens.back().append(std::string(" "));
- last_was_space = TRUE;
+ last_was_space = true;
}
}
else
@@ -158,7 +158,7 @@ size_t LLExternalEditor::tokenize(string_vec_t& tokens, const std::string& str)
if (last_was_space)
{
tokens.back().append(to_push);
- last_was_space = FALSE;
+ last_was_space = false;
}
else
{
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index c1776705f9..6ef0894ae4 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -68,7 +68,7 @@
static LLStaticHashedString sTextureIndexIn("texture_index_in");
static LLStaticHashedString sColorIn("color_in");
-BOOL LLFace::sSafeRenderSelect = TRUE; // FALSE
+bool LLFace::sSafeRenderSelect = true; // false
#define DOTVEC(a,b) (a.mV[0]*b.mV[0] + a.mV[1]*b.mV[1] + a.mV[2]*b.mV[2])
@@ -328,7 +328,7 @@ void LLFace::dirtyTexture()
LLVOVolume* vobj = drawablep->getVOVolume();
if (vobj)
{
- vobj->mLODChanged = TRUE;
+ vobj->mLODChanged = true;
vobj->updateVisualComplexity();
}
@@ -807,8 +807,8 @@ bool less_than_max_mag(const LLVector4a& vec)
return lt == 0x7;
}
-BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
- const LLMatrix4& mat_vert_in, BOOL global_volume)
+bool LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
+ const LLMatrix4& mat_vert_in, bool global_volume)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE
@@ -833,7 +833,7 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
{
LL_DEBUGS("RiggedBox") << "skipping face " << f << ", bad num vertices "
<< face.mNumVertices << " " << face.mNumIndices << " " << face.mWeights << LL_ENDL;
- return FALSE;
+ return false;
}
//VECTORIZE THIS
@@ -873,7 +873,7 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
updateCenterAgent();
}
- return TRUE;
+ return true;
}
@@ -1143,7 +1143,7 @@ void push_for_transform(LLVertexBuffer* buff, U32 source_count, U32 dest_count)
}
}
-BOOL LLFace::getGeometryVolume(const LLVolume& volume,
+bool LLFace::getGeometryVolume(const LLVolume& volume,
S32 face_index,
const LLMatrix4& mat_vert_in,
const LLMatrix3& mat_norm_in,
@@ -1164,7 +1164,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
" Attempt get access to: " << face_index << LL_ENDL;
llassert(no_debug_assert);
}
- return FALSE;
+ return false;
}
bool rigged = isState(RIGGED);
@@ -1193,7 +1193,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
<< " Pool Type: " << mPoolType << LL_ENDL;
llassert(no_debug_assert);
}
- return FALSE;
+ return false;
}
if (num_vertices + mGeomIndex > mVertexBuffer->getNumVerts())
@@ -1203,7 +1203,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
LL_WARNS() << "Vertex buffer overflow!" << LL_ENDL;
llassert(no_debug_assert);
}
- return FALSE;
+ return false;
}
}
@@ -1217,9 +1217,9 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
LLStrider<U16> indicesp;
LLStrider<LLVector4> wght;
- BOOL full_rebuild = force_rebuild || mDrawablep->isState(LLDrawable::REBUILD_VOLUME);
+ bool full_rebuild = force_rebuild || mDrawablep->isState(LLDrawable::REBUILD_VOLUME);
- BOOL global_volume = mDrawablep->getVOVolume()->isVolumeGlobal();
+ bool global_volume = mDrawablep->getVOVolume()->isVolumeGlobal();
LLVector3 scale;
if (global_volume)
{
@@ -1241,8 +1241,8 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
const LLTextureEntry *tep = mVObjp->getTE(face_index);
const U8 bump_code = tep ? tep->getBumpmap() : 0;
- BOOL is_static = mDrawablep->isStatic();
- BOOL is_global = is_static;
+ bool is_static = mDrawablep->isStatic();
+ bool is_global = is_static;
LLVector3 center_sum(0.f, 0.f, 0.f);
@@ -1855,7 +1855,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
S32* vp = (S32*) &val;
*vp = index;
- llassert(index <= LLGLSLShader::sIndexedTextureChannels-1);
+ llassert(index < LLGLSLShader::sIndexedTextureChannels);
LLVector4Logical mask;
mask.clear();
@@ -1889,7 +1889,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
F32* normals = (F32*) norm.get();
LLVector4a* src = vf.mNormals;
LLVector4a* end = src+num_vertices;
-
+
while (src < end)
{
LLVector4a normal;
@@ -2011,7 +2011,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
- return TRUE;
+ return true;
}
void LLFace::renderIndexed()
@@ -2024,18 +2024,18 @@ void LLFace::renderIndexed()
}
//check if the face has a media
-BOOL LLFace::hasMedia() const
+bool LLFace::hasMedia() const
{
if(mHasMedia)
{
- return TRUE ;
+ return true ;
}
if(mTexture[LLRender::DIFFUSE_MAP].notNull())
{
return mTexture[LLRender::DIFFUSE_MAP]->hasParcelMedia() ; //if has a parcel media
}
- return FALSE ; //no media.
+ return false ; //no media.
}
const F32 LEAST_IMPORTANCE = 0.05f ;
@@ -2052,7 +2052,7 @@ F32 LLFace::getTextureVirtualSize()
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
F32 radius;
F32 cos_angle_to_view_dir;
- BOOL in_frustum = calcPixelArea(cos_angle_to_view_dir, radius);
+ bool in_frustum = calcPixelArea(cos_angle_to_view_dir, radius);
if (mPixelArea < F_ALMOST_ZERO || !in_frustum)
{
@@ -2096,7 +2096,7 @@ F32 LLFace::getTextureVirtualSize()
return face_area;
}
-BOOL LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius)
+bool LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE;
@@ -2282,19 +2282,19 @@ F32 LLFace::adjustPixelArea(F32 importance, F32 pixel_area)
return pixel_area ;
}
-BOOL LLFace::verify(const U32* indices_array) const
+bool LLFace::verify(const U32* indices_array) const
{
- BOOL ok = TRUE;
+ bool ok = true;
if( mVertexBuffer.isNull() )
{ //no vertex buffer, face is implicitly valid
- return TRUE;
+ return true;
}
// First, check whether the face data fits within the pool's range.
if ((mGeomIndex + mGeomCount) > mVertexBuffer->getNumVerts())
{
- ok = FALSE;
+ ok = false;
LL_INFOS() << "Face references invalid vertices!" << LL_ENDL;
}
@@ -2302,18 +2302,18 @@ BOOL LLFace::verify(const U32* indices_array) const
if (!indices_count)
{
- return TRUE;
+ return true;
}
if (indices_count > LL_MAX_INDICES_COUNT)
{
- ok = FALSE;
+ ok = false;
LL_INFOS() << "Face has bogus indices count" << LL_ENDL;
}
if (mIndicesIndex + mIndicesCount > mVertexBuffer->getNumIndices())
{
- ok = FALSE;
+ ok = false;
LL_INFOS() << "Face references invalid indices!" << LL_ENDL;
}
@@ -2330,13 +2330,13 @@ BOOL LLFace::verify(const U32* indices_array) const
{
LL_WARNS() << "Face index too low!" << LL_ENDL;
LL_INFOS() << "i:" << i << " Index:" << indicesp[i] << " GStart: " << geom_start << LL_ENDL;
- ok = FALSE;
+ ok = false;
}
else if (delta >= geom_count)
{
LL_WARNS() << "Face index too high!" << LL_ENDL;
LL_INFOS() << "i:" << i << " Index:" << indicesp[i] << " GEnd: " << geom_start + geom_count << LL_ENDL;
- ok = FALSE;
+ ok = false;
}
}
#endif
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index eb3b47d6d6..d8476d39c5 100644
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -107,7 +107,7 @@ public:
void switchTexture(U32 ch, LLViewerTexture* new_texture);
void dirtyTexture();
LLXformMatrix* getXform() const { return mXform; }
- BOOL hasGeometry() const { return mGeomCount > 0; }
+ bool hasGeometry() const { return mGeomCount > 0; }
LLVector3 getPositionAgent() const;
LLVector2 surfaceToTexture(LLVector2 surface_coord, const LLVector4a& position, const LLVector4a& normal);
void getPlanarProjectedParams(LLQuaternion* face_rot, LLVector3* face_pos, F32* scale) const;
@@ -117,7 +117,7 @@ public:
U32 getState() const { return mState; }
void setState(U32 state) { mState |= state; }
void clearState(U32 state) { mState &= ~state; }
- BOOL isState(U32 state) const { return ((mState & state) != 0) ? TRUE : FALSE; }
+ bool isState(U32 state) const { return ((mState & state) != 0) ? true : false; }
void setVirtualSize(F32 size) { mVSize = size; }
void setPixelArea(F32 area) { mPixelArea = area; }
F32 getVirtualSize() const { return mVSize; }
@@ -155,7 +155,7 @@ public:
//for volumes
void updateRebuildFlags();
bool canRenderAsMask(); // logic helper
- BOOL getGeometryVolume(const LLVolume& volume,
+ bool getGeometryVolume(const LLVolume& volume,
S32 face_index,
const LLMatrix4& mat_vert,
const LLMatrix3& mat_normal,
@@ -182,8 +182,8 @@ public:
void setSize(S32 numVertices, S32 num_indices = 0, bool align = false);
- BOOL genVolumeBBoxes(const LLVolume &volume, S32 f,
- const LLMatrix4& mat_vert_in, BOOL global_volume = FALSE);
+ bool genVolumeBBoxes(const LLVolume &volume, S32 f,
+ const LLMatrix4& mat_vert_in, bool global_volume = false);
void init(LLDrawable* drawablep, LLViewerObject* objp);
void destroy();
@@ -200,7 +200,7 @@ public:
S32 getReferenceIndex() const { return mReferenceIndex; }
void setReferenceIndex(const S32 index) { mReferenceIndex = index; }
- BOOL verify(const U32* indices_array = NULL) const;
+ bool verify(const U32* indices_array = NULL) const;
void printDebugInfo() const;
void setGeomIndex(U16 idx);
@@ -212,12 +212,12 @@ public:
void resetVirtualSize();
void setHasMedia(bool has_media) { mHasMedia = has_media ;}
- BOOL hasMedia() const ;
+ bool hasMedia() const ;
void setMediaAllowed(bool is_media_allowed) { mIsMediaAllowed = is_media_allowed; }
- BOOL isMediaAllowed() const { return mIsMediaAllowed; }
+ bool isMediaAllowed() const { return mIsMediaAllowed; }
- BOOL switchTexture() ;
+ bool switchTexture() ;
//vertex buffer tracking
void setVertexBuffer(LLVertexBuffer* buffer);
@@ -239,7 +239,7 @@ public: //aligned members
private:
friend class LLViewerTextureList;
F32 adjustPartialOverlapPixelArea(F32 cos_angle_to_view_dir, F32 radius );
- BOOL calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) ;
+ bool calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) ;
public:
static F32 calcImportanceToCamera(F32 to_view_dir, F32 dist);
static F32 adjustPixelArea(F32 importance, F32 pixel_area) ;
@@ -309,7 +309,7 @@ private:
U32 mDrawOrderIndex = 0; // see setDrawOrderIndex
protected:
- static BOOL sSafeRenderSelect;
+ static bool sSafeRenderSelect;
public:
struct CompareDistanceGreater
diff --git a/indra/newview/llface.inl b/indra/newview/llface.inl
deleted file mode 100644
index c37b77d2cd..0000000000
--- a/indra/newview/llface.inl
+++ /dev/null
@@ -1,160 +0,0 @@
-/**
- * @file llface.inl
- * @brief Inline functions for LLFace
- *
- * $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_LLFACE_INL
-#define LL_LLFACE_INL
-
-#include "llglheaders.h"
-#include "llrender.h"
-
-inline BOOL LLFace::getDirty() const
-{
- return (mGeneration != mDrawPoolp->mGeneration);
-}
-
-inline void LLFace::clearDirty()
-{
- mGeneration = mDrawPoolp->mGeneration;
-}
-
-inline const LLTextureEntry* LLFace::getTextureEntry() const
-{
- return mVObjp->getTE(mTEOffset);
-}
-
-inline LLDrawPool* LLFace::getPool() const
-{
- return mDrawPoolp;
-}
-
-inline S32 LLFace::getStride() const
-{
- return mDrawPoolp->getStride();
-}
-
-inline LLDrawable* LLFace::getDrawable() const
-{
- return mDrawablep;
-}
-
-inline LLViewerObject* LLFace::getViewerObject() const
-{
- return mVObjp;
-}
-
-inline S32 LLFace::getColors (LLStrider<LLColor4U> &colors)
-{
- if (!mGeomCount)
- {
- return -1;
- }
- LLColor4U *colorp = NULL;
- if (isState(BACKLIST))
- {
- if (!mBackupMem)
- {
- printDebugInfo();
- LL_ERRS() << "No backup memory for face" << LL_ENDL;
- }
- colorp = (LLColor4U*)(mBackupMem + (4 * mIndicesCount) + (mGeomCount * mDrawPoolp->getStride()));
- colors = colorp;
- return 0;
- }
- else
- {
- llassert(mGeomIndex >= 0);
- if (!mDrawPoolp->getColorStrider(colors, mGeomIndex))
- {
- printDebugInfo();
- LL_ERRS() << "No color pointer for a color strider!" << LL_ENDL;
- }
- mDrawPoolp->setDirtyColors();
- return mGeomIndex;
- }
-}
-
-inline S32 LLFace::getTexCoords (LLStrider<LLVector2> &texCoords, S32 pass )
-{
- if (!mGeomCount)
- {
- return -1;
- }
- if (isState(BACKLIST))
- {
- if (!mBackupMem)
- {
- printDebugInfo();
- LL_ERRS() << "No backup memory for face" << LL_ENDL;
- }
- texCoords = (LLVector2*)(mBackupMem + (4 * mIndicesCount) + mDrawPoolp->mDataOffsets[LLDrawPool::DATA_TEX_COORDS0 + pass]);
- texCoords.setStride( mDrawPoolp->getStride());
- return 0;
- }
- else
- {
- llassert(mGeomIndex >= 0);
- mDrawPoolp->getTexCoordStrider(texCoords, mGeomIndex, pass );
- mDrawPoolp->setDirty();
- return mGeomIndex;
- }
-}
-
-inline S32 LLFace::getIndices (U32* &indicesp)
-{
- if (isState(BACKLIST))
- {
- indicesp = (U32*)mBackupMem;
- return 0;
- }
- else
- {
- indicesp = mDrawPoolp->getIndices(mIndicesIndex);
- llassert(mGeomIndex >= 0);
- return mGeomIndex;
- }
-}
-
-inline const U32* LLFace::getRawIndices() const
-{
- llassert(!isState(BACKLIST));
-
- return &mDrawPoolp->mIndices[mIndicesIndex];
-}
-
-
-inline void LLFace::bindTexture(S32 stage) const
-{
- if (mTexture)
- {
- mTexture->bindTexture(stage);
- }
- else
- {
- LLImageGL::unbindTexture(stage, GL_TEXTURE_2D);
- }
-}
-
-#endif
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index a7998f6e9e..77021df6c1 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -59,15 +59,15 @@
using namespace LLTrace;
-static const S32 MAX_VISIBLE_HISTORY = 12;
-static const S32 LINE_GRAPH_HEIGHT = 240;
-static const S32 MIN_BAR_HEIGHT = 3;
-static const S32 RUNNING_AVERAGE_WIDTH = 100;
-static const S32 NUM_FRAMES_HISTORY = 200;
+static constexpr S32 MAX_VISIBLE_HISTORY = 12;
+static constexpr S32 LINE_GRAPH_HEIGHT = 240;
+static constexpr S32 MIN_BAR_HEIGHT = 3;
+static constexpr S32 RUNNING_AVERAGE_WIDTH = 100;
+static constexpr S32 NUM_FRAMES_HISTORY = 200;
std::vector<BlockTimerStatHandle*> ft_display_idx; // line of table entry for display purposes (for collapse)
-BOOL LLFastTimerView::sAnalyzePerformance = FALSE;
+bool LLFastTimerView::sAnalyzePerformance = false;
S32 get_depth(const BlockTimerStatHandle* blockp)
{
@@ -126,16 +126,16 @@ void LLFastTimerView::setPauseState(bool pause_state)
mPauseHistory = pause_state;
}
-BOOL LLFastTimerView::postBuild()
+bool LLFastTimerView::postBuild()
{
LLButton& pause_btn = getChildRef<LLButton>("pause_btn");
mScrollBar = getChild<LLScrollbar>("scroll_vert");
pause_btn.setCommitCallback(boost::bind(&LLFastTimerView::onPause, this));
- return TRUE;
+ return true;
}
-BOOL LLFastTimerView::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLFastTimerView::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
if (mHoverTimer )
{
@@ -148,14 +148,14 @@ BOOL LLFastTimerView::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
mHoverTimer->getParent()->getTreeNode().mCollapsed = true;
}
- return TRUE;
+ return true;
}
else if (mBarRect.pointInRect(x, y))
{
S32 bar_idx = MAX_VISIBLE_HISTORY - ((y - mBarRect.mBottom) * (MAX_VISIBLE_HISTORY + 2) / mBarRect.getHeight());
bar_idx = llclamp(bar_idx, 0, MAX_VISIBLE_HISTORY);
mStatsIndex = mScrollIndex + bar_idx;
- return TRUE;
+ return true;
}
return LLFloater::handleRightMouseDown(x, y, mask);
}
@@ -172,7 +172,7 @@ BlockTimerStatHandle* LLFastTimerView::getLegendID(S32 y)
return NULL;
}
-BOOL LLFastTimerView::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLFastTimerView::handleDoubleClick(S32 x, S32 y, MASK mask)
{
for(LLTrace::block_timer_tree_df_iterator_t it = LLTrace::begin_block_timer_tree_df(FTM_FRAME);
it != LLTrace::end_block_timer_tree_df();
@@ -180,10 +180,10 @@ BOOL LLFastTimerView::handleDoubleClick(S32 x, S32 y, MASK mask)
{
(*it)->getTreeNode().mCollapsed = false;
}
- return TRUE;
+ return true;
}
-BOOL LLFastTimerView::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLFastTimerView::handleMouseDown(S32 x, S32 y, MASK mask)
{
if (x < mScrollBar->getRect().mLeft)
{
@@ -201,13 +201,13 @@ BOOL LLFastTimerView::handleMouseDown(S32 x, S32 y, MASK mask)
else if (mGraphRect.pointInRect(x, y))
{
gFocusMgr.setMouseCapture(this);
- return TRUE;
+ return true;
}
return LLFloater::handleMouseDown(x, y, mask);
}
-BOOL LLFastTimerView::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLFastTimerView::handleMouseUp(S32 x, S32 y, MASK mask)
{
if (hasMouseCapture())
{
@@ -216,14 +216,14 @@ BOOL LLFastTimerView::handleMouseUp(S32 x, S32 y, MASK mask)
return LLFloater::handleMouseUp(x, y, mask);;
}
-BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask)
+bool LLFastTimerView::handleHover(S32 x, S32 y, MASK mask)
{
if (hasMouseCapture())
{
F32 lerp = llclamp(1.f - (F32) (x - mGraphRect.mLeft) / (F32) mGraphRect.getWidth(), 0.f, 1.f);
mScrollIndex = ll_round( lerp * (F32)(mRecording.getNumRecordedPeriods() - MAX_VISIBLE_HISTORY));
mScrollIndex = llclamp( mScrollIndex, 0, (S32)mRecording.getNumRecordedPeriods());
- return TRUE;
+ return true;
}
mHoverTimer = NULL;
mHoverID = NULL;
@@ -238,7 +238,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask)
MAX_VISIBLE_HISTORY);
if (mHoverBarIndex == 0)
{
- return TRUE;
+ return true;
}
else if (mHoverBarIndex < 0)
{
@@ -314,7 +314,7 @@ static std::string get_tooltip(BlockTimerStatHandle& timer, S32 history_index, P
return tooltip;
}
-BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask)
+bool LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask)
{
if(mPauseHistory && mBarRect.pointInRect(x, y))
{
@@ -331,7 +331,7 @@ BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask)
.sticky_rect(screen_rect)
.delay_time(0.f));
- return TRUE;
+ return true;
}
}
else
@@ -344,7 +344,7 @@ BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask)
{
LLToolTipMgr::instance().show(get_tooltip(*idp, 0, mRecording));
- return TRUE;
+ return true;
}
}
}
@@ -352,7 +352,7 @@ BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask)
return LLFloater::handleToolTip(x, y, mask);
}
-BOOL LLFastTimerView::handleScrollWheel(S32 x, S32 y, S32 clicks)
+bool LLFastTimerView::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
if (x < mBarRect.mLeft)
{
@@ -366,7 +366,7 @@ BOOL LLFastTimerView::handleScrollWheel(S32 x, S32 y, S32 clicks)
0,
llmin((S32)mRecording.getNumRecordedPeriods(), (S32)mRecording.getNumRecordedPeriods() - MAX_VISIBLE_HISTORY));
}
- return TRUE;
+ return true;
}
static BlockTimerStatHandle FTM_RENDER_TIMER("Timers");
@@ -440,7 +440,7 @@ void LLFastTimerView::onOpen(const LLSD& key)
void LLFastTimerView::onClose(bool app_quitting)
{
- setVisible(FALSE);
+ setVisible(false);
}
void saveChart(const std::string& label, const char* suffix, LLImageRaw* scratch)
@@ -448,6 +448,8 @@ void saveChart(const std::string& label, const char* suffix, LLImageRaw* scratch
// disable use of glReadPixels which messes up nVidia nSight graphics debugging
if (!LLRender::sNsightDebugSupport)
{
+ LLImageDataSharedLock lock(scratch);
+
//read result back into raw image
glReadPixels(0, 0, 1024, 512, GL_RGB, GL_UNSIGNED_BYTE, scratch->getData());
@@ -1274,7 +1276,7 @@ void LLFastTimerView::drawLegend()
}
x += dx;
- BOOL is_child_of_hover_item = (idp == mHoverID);
+ bool is_child_of_hover_item = (idp == mHoverID);
BlockTimerStatHandle* next_parent = idp->getParent();
while(!is_child_of_hover_item && next_parent)
{
@@ -1383,31 +1385,31 @@ void LLFastTimerView::drawBorders( S32 y, const S32 x_start, S32 bar_height, S32
S32 by = y + 6 + (S32)LLFontGL::getFontMonospace()->getLineHeight();
//heading
- gl_rect_2d(x_start-5, by, getRect().getWidth()-5, y+5, LLColor4::grey, FALSE);
+ gl_rect_2d(x_start-5, by, getRect().getWidth()-5, y+5, LLColor4::grey, false);
//tree view
- gl_rect_2d(5, by, x_start-10, 5, LLColor4::grey, FALSE);
+ gl_rect_2d(5, by, x_start-10, 5, LLColor4::grey, false);
by = y + 5;
//average bar
- gl_rect_2d(x_start-5, by, getRect().getWidth()-5, by-bar_height-dy-5, LLColor4::grey, FALSE);
+ gl_rect_2d(x_start-5, by, getRect().getWidth()-5, by-bar_height-dy-5, LLColor4::grey, false);
by -= bar_height*2+dy;
//current frame bar
- gl_rect_2d(x_start-5, by, getRect().getWidth()-5, by-bar_height-dy-2, LLColor4::grey, FALSE);
+ gl_rect_2d(x_start-5, by, getRect().getWidth()-5, by-bar_height-dy-2, LLColor4::grey, false);
by -= bar_height+dy+1;
//history bars
- gl_rect_2d(x_start-5, by, getRect().getWidth()-5, LINE_GRAPH_HEIGHT-bar_height-dy-2, LLColor4::grey, FALSE);
+ gl_rect_2d(x_start-5, by, getRect().getWidth()-5, LINE_GRAPH_HEIGHT-bar_height-dy-2, LLColor4::grey, false);
by = LINE_GRAPH_HEIGHT-dy;
//line graph
//mGraphRect = LLRect(x_start-5, by, getRect().getWidth()-5, 5);
- gl_rect_2d(mGraphRect, FALSE);
+ gl_rect_2d(mGraphRect, false);
}
}
diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h
index ff65f8da07..1541684567 100644
--- a/indra/newview/llfasttimerview.h
+++ b/indra/newview/llfasttimerview.h
@@ -40,9 +40,9 @@ class LLFastTimerView : public LLFloater
public:
LLFastTimerView(const LLSD&);
~LLFastTimerView();
- BOOL postBuild();
+ bool postBuild();
- static BOOL sAnalyzePerformance;
+ static bool sAnalyzePerformance;
static void outputAllMetrics();
static void doAnalysis(std::string baseline, std::string target, std::string output);
@@ -55,13 +55,13 @@ private:
public:
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
- virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- virtual BOOL handleHover(S32 x, S32 y, MASK mask);
- virtual BOOL handleToolTip(S32 x, S32 y, MASK mask);
- virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleDoubleClick(S32 x, S32 y, MASK mask);
+ virtual bool handleRightMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask);
+ virtual bool handleHover(S32 x, S32 y, MASK mask);
+ virtual bool handleToolTip(S32 x, S32 y, MASK mask);
+ virtual bool handleScrollWheel(S32 x, S32 y, S32 clicks);
virtual void draw();
virtual void onOpen(const LLSD& key);
virtual void onClose(bool app_quitting);
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index c1d8828229..a46cc0ce30 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -79,7 +79,7 @@ public:
}
void setLandmarkID(const LLUUID& id) { mLandmarkID = id; }
- const LLUUID& getLandmarkId() const { return mLandmarkID; }
+ const LLUUID& getLandmarkID() const { return mLandmarkID; }
const std::string& getName()
{
@@ -160,7 +160,7 @@ class LLFavoriteLandmarkButton : public LLButton
{
public:
- BOOL handleToolTip(S32 x, S32 y, MASK mask)
+ bool handleToolTip(S32 x, S32 y, MASK mask)
{
std::string region_name = mLandmarkInfoGetter.getName();
@@ -176,10 +176,10 @@ public:
LLToolTipMgr::instance().show(params);
}
- return TRUE;
+ return true;
}
- /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask)
+ /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask)
{
LLFavoritesBarCtrl* fb = dynamic_cast<LLFavoritesBarCtrl*>(getParent());
@@ -192,7 +192,7 @@ public:
}
void setLandmarkID(const LLUUID& id){ mLandmarkInfoGetter.setLandmarkID(id); }
- const LLUUID& getLandmarkId() const { return mLandmarkInfoGetter.getLandmarkId(); }
+ const LLUUID& getLandmarkID() const { return mLandmarkInfoGetter.getLandmarkID(); }
void onMouseEnter(S32 x, S32 y, MASK mask)
{
@@ -224,7 +224,7 @@ private:
class LLFavoriteLandmarkMenuItem : public LLMenuItemCallGL
{
public:
- BOOL handleToolTip(S32 x, S32 y, MASK mask)
+ bool handleToolTip(S32 x, S32 y, MASK mask)
{
std::string region_name = mLandmarkInfoGetter.getName();
if (!region_name.empty())
@@ -234,33 +234,34 @@ public:
params.sticky_rect = calcScreenRect();
LLToolTipMgr::instance().show(params);
}
- return TRUE;
+ return true;
}
- void setLandmarkID(const LLUUID& id){ mLandmarkInfoGetter.setLandmarkID(id); }
+ const LLUUID& getLandmarkID() const { return mLandmarkInfoGetter.getLandmarkID(); }
+ void setLandmarkID(const LLUUID& id) { mLandmarkInfoGetter.setLandmarkID(id); }
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask)
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask)
{
if (mMouseDownSignal)
(*mMouseDownSignal)(this, x, y, mask);
return LLMenuItemCallGL::handleMouseDown(x, y, mask);
}
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask)
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask)
{
if (mMouseUpSignal)
(*mMouseUpSignal)(this, x, y, mask);
return LLMenuItemCallGL::handleMouseUp(x, y, mask);
}
- virtual BOOL handleHover(S32 x, S32 y, MASK mask)
+ virtual bool handleHover(S32 x, S32 y, MASK mask)
{
if (fb)
{
fb->handleHover(x, y, mask);
}
- return TRUE;
+ return true;
}
void initFavoritesBarPointer(LLFavoritesBarCtrl* fb) { this->fb = fb; }
@@ -278,22 +279,51 @@ private:
/**
* This class was introduced just for fixing the following issue:
* EXT-836 Nav bar: Favorites overflow menu passes left-mouse click through.
- * We must explicitly handle drag and drop event by returning TRUE
+ * We must explicitly handle drag and drop event by returning true
* because otherwise LLToolDragAndDrop will initiate drag and drop operation
* with the world.
*/
class LLFavoriteLandmarkToggleableMenu : public LLToggleableMenu
{
public:
- virtual BOOL 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;
- }
+ // virtual
+ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type,
+ void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) override
+ {
+ mToolbar->handleDragAndDropToMenu(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
+ return true;
+ }
+
+ // virtual
+ bool handleHover(S32 x, S32 y, MASK mask) override
+ {
+ mIsHovering = true;
+ LLToggleableMenu::handleHover(x, y, mask);
+ mIsHovering = false;
+ return true;
+ }
+
+ // virtual
+ void setVisible(bool visible) override
+ {
+ // Avoid of hiding the menu during hovering
+ if (visible || !mIsHovering)
+ {
+ LLToggleableMenu::setVisible(visible);
+ }
+ }
+
+ void setToolbar(LLFavoritesBarCtrl* toolbar)
+ {
+ mToolbar = toolbar;
+ }
+
+ ~LLFavoriteLandmarkToggleableMenu()
+ {
+ // Enable subsequent setVisible(false)
+ mIsHovering = false;
+ setVisible(false);
+ }
protected:
LLFavoriteLandmarkToggleableMenu(const LLToggleableMenu::Params& p):
@@ -301,6 +331,10 @@ protected:
{
}
+private:
+ LLFavoritesBarCtrl* mToolbar { nullptr };
+ bool mIsHovering { false };
+
friend class LLUICtrlFactory;
};
@@ -323,8 +357,8 @@ public:
LLFavoritesBarCtrl::sWaitingForCallabck = 0.f;
LLFavoritesOrderStorage::instance().setSortIndex(item, mSortField);
- item->setComplete(TRUE);
- item->updateServer(FALSE);
+ item->setComplete(true);
+ item->updateServer(false);
gInventory.updateItem(item);
gInventory.notifyObservers();
@@ -382,12 +416,13 @@ LLFavoritesBarCtrl::LLFavoritesBarCtrl(const LLFavoritesBarCtrl::Params& p)
mOverflowMenuHandle(),
mContextMenuHandle(),
mImageDragIndication(p.image_drag_indication),
- mShowDragMarker(FALSE),
+ mShowDragMarker(false),
mLandingTab(NULL),
mLastTab(NULL),
mItemsListDirty(false),
mUpdateDropDownItems(true),
mRestoreOverflowMenu(false),
+ mDragToOverflowMenu(false),
mGetPrevItems(true),
mMouseX(0),
mMouseY(0),
@@ -420,22 +455,21 @@ LLFavoritesBarCtrl::LLFavoritesBarCtrl(const LLFavoritesBarCtrl::Params& p)
LLFavoritesBarCtrl::~LLFavoritesBarCtrl()
{
- gInventory.removeObserver(this);
+ gInventory.removeObserver(this);
- if (mOverflowMenuHandle.get()) mOverflowMenuHandle.get()->die();
- if (mContextMenuHandle.get()) mContextMenuHandle.get()->die();
+ if (mOverflowMenuHandle.get())
+ mOverflowMenuHandle.get()->die();
+ if (mContextMenuHandle.get())
+ mContextMenuHandle.get()->die();
}
-BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
- EDragAndDropType cargo_type,
- void* cargo_data,
- EAcceptance* accept,
- std::string& tooltip_msg)
+bool LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
+ EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg)
{
*accept = ACCEPT_NO;
LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource();
- if (LLToolDragAndDrop::SOURCE_AGENT != source && LLToolDragAndDrop::SOURCE_LIBRARY != source) return FALSE;
+ if (LLToolDragAndDrop::SOURCE_AGENT != source && LLToolDragAndDrop::SOURCE_LIBRARY != source) return false;
switch (cargo_type)
{
@@ -456,26 +490,52 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
// Copy the item into the favorites folder (if it's not already there).
LLInventoryItem *item = (LLInventoryItem *)cargo_data;
- if (LLFavoriteLandmarkButton* dest = dynamic_cast<LLFavoriteLandmarkButton*>(findChildByLocalCoords(x, y)))
+ if (mDragToOverflowMenu)
{
- setLandingTab(dest);
+ LLView* overflow_menu = mOverflowMenuHandle.get();
+ if (overflow_menu && !overflow_menu->isDead() && overflow_menu->getVisible())
+ {
+ overflow_menu->handleHover(x, y, mask);
+ }
}
- else if (mLastTab && (x >= mLastTab->getRect().mRight))
+ else // Drag to the toolbar itself
{
- /*
- * the condition dest == NULL can be satisfied not only in the case
- * of dragging to the right from the last tab of the favbar. there is a
- * small gap between each tab. if the user drags something exactly there
- * then mLandingTab will be set to NULL and the dragged item will be pushed
- * to the end of the favorites bar. this is incorrect behavior. that's why
- * we need an additional check which excludes the case described previously
- * making sure that the mouse pointer is beyond the last tab.
- */
- setLandingTab(NULL);
+ // Drag to a landmark button?
+ if (LLFavoriteLandmarkButton* dest = dynamic_cast<LLFavoriteLandmarkButton*>(findChildByLocalCoords(x, y)))
+ {
+ setLandingTab(dest);
+ }
+ else
+ {
+ // Drag to the "More" button?
+ if (mMoreTextBox && mMoreTextBox->getVisible() && mMoreTextBox->getRect().pointInRect(x, y))
+ {
+ LLView* overflow_menu = mOverflowMenuHandle.get();
+ if (!overflow_menu || overflow_menu->isDead() || !overflow_menu->getVisible())
+ {
+ showDropDownMenu();
+ }
+ }
+
+ // Drag to the right of the last landmark button?
+ if (mLastTab && (x >= mLastTab->getRect().mRight))
+ {
+ /*
+ * the condition dest == NULL can be satisfied not only in the case
+ * of dragging to the right from the last tab of the favbar. there is a
+ * small gap between each tab. if the user drags something exactly there
+ * then mLandingTab will be set to NULL and the dragged item will be pushed
+ * to the end of the favorites bar. this is incorrect behavior. that's why
+ * we need an additional check which excludes the case described previously
+ * making sure that the mouse pointer is beyond the last tab.
+ */
+ setLandingTab(NULL);
+ }
+ }
}
- // check if we are dragging an existing item from the favorites bar
- bool existing_drop = false;
+ // Check whether we are dragging an existing item from the favorites bar
+ bool existing_item = false;
if (item && mDragItemId == item->getUUID())
{
// There is a chance of mDragItemId being obsolete
@@ -483,21 +543,19 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
// results in viewer not geting a 'mouse up' signal
for (LLInventoryModel::item_array_t::iterator i = mItems.begin(); i != mItems.end(); ++i)
{
- LLViewerInventoryItem* currItem = *i;
-
- if (currItem->getUUID() == mDragItemId)
+ if ((*i)->getUUID() == mDragItemId)
{
- existing_drop = true;
+ existing_item = true;
break;
}
}
}
- if (existing_drop)
+ if (existing_item)
{
*accept = ACCEPT_YES_SINGLE;
- showDragMarker(TRUE);
+ showDragMarker(true);
if (drop)
{
@@ -515,14 +573,14 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
*accept = ACCEPT_YES_COPY_MULTI;
- showDragMarker(TRUE);
+ showDragMarker(true);
if (drop)
{
if (mItems.empty())
{
setLandingTab(NULL);
- mLastTab = NULL;
+ mLastTab = NULL;
}
handleNewFavoriteDragAndDrop(item, favorites_id, x, y);
}
@@ -533,85 +591,59 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
break;
}
- return TRUE;
+ return true;
+}
+
+bool LLFavoritesBarCtrl::handleDragAndDropToMenu(S32 x, S32 y, MASK mask, bool drop,
+ EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg)
+{
+ mDragToOverflowMenu = true;
+ bool handled = handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
+ mDragToOverflowMenu = false;
+ return handled;
}
void LLFavoritesBarCtrl::handleExistingFavoriteDragAndDrop(S32 x, S32 y)
{
- if (mItems.empty())
- {
- // Isn't supposed to be empty
+ if (LL_UNLIKELY(mItems.empty()))
return;
- }
- // Identify the button hovered and the side to drop
- LLFavoriteLandmarkButton* dest = dynamic_cast<LLFavoriteLandmarkButton*>(mLandingTab);
- bool insert_before = true;
- if (!dest)
- {
- insert_before = false;
- dest = dynamic_cast<LLFavoriteLandmarkButton*>(mLastTab);
- }
-
- // There is no need to handle if an item was dragged onto itself
- if (dest && dest->getLandmarkId() == mDragItemId)
- {
- return;
- }
-
- // Insert the dragged item in the right place
- if (dest)
- {
- LLInventoryModel::updateItemsOrder(mItems, mDragItemId, dest->getLandmarkId(), insert_before);
- }
- else
- {
- // This can happen when the item list is empty
- mItems.push_back(gInventory.getItem(mDragItemId));
- }
+ LLUUID target_id;
+ bool insert_before = false;
+ if (!findDragAndDropTarget(target_id, insert_before, x, y))
+ return;
- LLFavoritesOrderStorage::instance().saveItemsOrder(mItems);
+ // There is no need to handle if an item was dragged onto itself
+ if (target_id == mDragItemId)
+ return;
- LLToggleableMenu* menu = (LLToggleableMenu*) mOverflowMenuHandle.get();
+ // Move the dragged item to the right place in the array
+ LLInventoryModel::updateItemsOrder(mItems, mDragItemId, target_id, insert_before);
+ LLFavoritesOrderStorage::instance().saveItemsOrder(mItems);
- if (menu && menu->getVisible())
- {
- menu->setVisible(FALSE);
- showDropDownMenu();
- }
+ LLView* menu = mOverflowMenuHandle.get();
+ if (menu && !menu->isDead() && menu->getVisible())
+ {
+ updateOverflowMenuItems();
+ positionAndShowOverflowMenu();
+ }
}
void LLFavoritesBarCtrl::handleNewFavoriteDragAndDrop(LLInventoryItem *item, const LLUUID& favorites_id, S32 x, S32 y)
{
// Identify the button hovered and the side to drop
- LLFavoriteLandmarkButton* dest = NULL;
- bool insert_before = true;
- if (!mItems.empty())
- {
- // [MAINT-2386] When multiple landmarks are selected and dragged onto an empty favorites bar,
- // the viewer would crash when casting mLastTab below, as mLastTab is still null when the
- // second landmark is being added.
- // To ensure mLastTab is valid, we need to call updateButtons() at the end of this function
- dest = dynamic_cast<LLFavoriteLandmarkButton*>(mLandingTab);
- if (!dest)
- {
- insert_before = false;
- dest = dynamic_cast<LLFavoriteLandmarkButton*>(mLastTab);
- }
- }
-
- // There is no need to handle if an item was dragged onto itself
- if (dest && dest->getLandmarkId() == mDragItemId)
- {
- return;
- }
-
+ LLUUID target_id;
+ bool insert_before = false;
+ // There is no need to handle if an item was dragged onto itself
+ if (findDragAndDropTarget(target_id, insert_before, x, y) && (target_id == mDragItemId))
+ return;
+
LLPointer<LLViewerInventoryItem> viewer_item = new LLViewerInventoryItem(item);
- // Insert the dragged item in the right place
- if (dest)
+ // Insert the dragged item to the right place
+ if (target_id.notNull())
{
- insertItem(mItems, dest->getLandmarkId(), viewer_item, insert_before);
+ insertItem(mItems, target_id, viewer_item, insert_before);
}
else
{
@@ -638,8 +670,8 @@ void LLFavoritesBarCtrl::handleNewFavoriteDragAndDrop(LLInventoryItem *item, con
{
LLFavoritesOrderStorage::instance().setSortIndex(currItem, ++sortField);
- currItem->setComplete(TRUE);
- currItem->updateServer(FALSE);
+ currItem->setComplete(true);
+ currItem->updateServer(false);
gInventory.updateItem(currItem);
}
@@ -670,10 +702,75 @@ void LLFavoritesBarCtrl::handleNewFavoriteDragAndDrop(LLInventoryItem *item, con
// This also ensures that mLastTab will be valid when dropping multiple
// landmarks to an empty favorites bar.
updateButtons();
-
+
+ LLView* overflow_menu = mOverflowMenuHandle.get();
+ if (overflow_menu && !overflow_menu->isDead() && overflow_menu->getVisible())
+ {
+ updateOverflowMenuItems();
+ positionAndShowOverflowMenu();
+ }
+
LL_INFOS("FavoritesBar") << "Copied inventory item #" << item->getUUID() << " to favorites." << LL_ENDL;
}
+bool LLFavoritesBarCtrl::findDragAndDropTarget(LLUUID& target_id, bool& insert_before, S32 x, S32 y)
+{
+ if (mItems.empty())
+ return false;
+
+ if (mDragToOverflowMenu)
+ {
+ LLView* overflow_menu = mOverflowMenuHandle.get();
+ if (LL_UNLIKELY(!overflow_menu || overflow_menu->isDead() || !overflow_menu->getVisible()))
+ return false;
+
+ // Identify the menu item hovered and the side to drop
+ LLFavoriteLandmarkMenuItem* target_item = dynamic_cast<LLFavoriteLandmarkMenuItem*>(overflow_menu->childFromPoint(x, y));
+ if (target_item)
+ {
+ insert_before = true;
+ }
+ else
+ {
+ // Choose the bottom landmark menu item
+ auto begin = overflow_menu->getChildList()->begin();
+ auto end = overflow_menu->getChildList()->end();
+ auto check = [](const LLView* child) -> bool
+ {
+ return dynamic_cast<const LLFavoriteLandmarkMenuItem*>(child);
+ };
+ // Menu items are placed in the backward order, so the bottom goes first
+ auto it = std::find_if(begin, end, check);
+ if (LL_UNLIKELY(it == end))
+ return false;
+ target_item = (LLFavoriteLandmarkMenuItem*)*it;
+ insert_before = false;
+ }
+ target_id = target_item->getLandmarkID();
+ }
+ else
+ {
+ // Identify the button hovered and the side to drop
+ LLFavoriteLandmarkButton* hovered_button = dynamic_cast<LLFavoriteLandmarkButton*>(mLandingTab);
+ if (hovered_button)
+ {
+ insert_before = true;
+ }
+ else
+ {
+ // Choose the right landmark button
+ hovered_button = dynamic_cast<LLFavoriteLandmarkButton*>(mLastTab);
+ if (LL_UNLIKELY(!hovered_button))
+ return false;
+
+ insert_before = false;
+ }
+ target_id = hovered_button->getLandmarkID();
+ }
+
+ return true;
+}
+
//virtual
void LLFavoritesBarCtrl::changed(U32 mask)
{
@@ -718,7 +815,7 @@ void LLFavoritesBarCtrl::changed(U32 mask)
}
//virtual
-void LLFavoritesBarCtrl::reshape(S32 width, S32 height, BOOL called_from_parent)
+void LLFavoritesBarCtrl::reshape(S32 width, S32 height, bool called_from_parent)
{
S32 delta_width = width - getRect().getWidth();
S32 delta_height = height - getRect().getHeight();
@@ -750,7 +847,7 @@ void LLFavoritesBarCtrl::draw()
mImageDragIndication->draw(rect.mRight, rect.getHeight(), w, h);
}
// Once drawn, mark this false so we won't draw it again (unless we hit the favorite bar again)
- mShowDragMarker = FALSE;
+ mShowDragMarker = false;
}
if (mItemsChangedTimer.getStarted())
{
@@ -789,10 +886,11 @@ const LLButton::Params& LLFavoritesBarCtrl::getButtonParams()
if (!params_initialized)
{
LLXMLNodePtr button_xml_node;
- if(LLUICtrlFactory::getLayeredXMLNode("favorites_bar_button.xml", button_xml_node))
+ static const std::string filename("favorites_bar_button.xml");
+ if (LLUICtrlFactory::getLayeredXMLNode(filename, button_xml_node, LLDir::CURRENT_SKIN, true))
{
LLXUIParser parser;
- parser.readXUI(button_xml_node, button_params, "favorites_bar_button.xml");
+ parser.readXUI(button_xml_node, button_params, filename);
}
params_initialized = true;
}
@@ -837,12 +935,12 @@ void LLFavoritesBarCtrl::updateButtons(bool force_update)
if(mItems.empty())
{
- mBarLabel->setVisible(TRUE);
+ mBarLabel->setVisible(true);
mLastTab = NULL;
}
else
{
- mBarLabel->setVisible(FALSE);
+ mBarLabel->setVisible(false);
}
const child_list_t* childs = getChildList();
child_list_const_iter_t child_it = childs->begin();
@@ -859,7 +957,7 @@ void LLFavoritesBarCtrl::updateButtons(bool force_update)
if (item)
{
// an child's order and mItems should be same
- if (button->getLandmarkId() != item->getUUID() // sort order has been changed
+ if (button->getLandmarkID() != item->getUUID() // sort order has been changed
|| button->getLabelSelected() != item->getName()) // favorite's name has been changed
{
break;
@@ -933,11 +1031,7 @@ void LLFavoritesBarCtrl::updateButtons(bool force_update)
{
// mMoreTextBox was removed, so LLFavoriteLandmarkButtons
// should be the only ones in the list
- LLFavoriteLandmarkButton* button = dynamic_cast<LLFavoriteLandmarkButton*> (childs->back());
- if (button)
- {
- mLastTab = button;
- }
+ mLastTab = dynamic_cast<LLFavoriteLandmarkButton*>(childs->back());
}
mFirstDropDownItem = j;
@@ -945,25 +1039,23 @@ void LLFavoritesBarCtrl::updateButtons(bool force_update)
if (mFirstDropDownItem < mItems.size())
{
// if updateButton had been called it means:
- //or there are some new favorites, or width had been changed
+ // or there are some new favorites, or width had been changed
// so if we need to display chevron button, we must update dropdown items too.
mUpdateDropDownItems = true;
S32 buttonHGap = button_params.rect.left; // default value
- LLRect rect;
// Chevron button should stay right aligned
- rect.setOriginAndSize(getRect().mRight - mMoreTextBox->getRect().getWidth() - buttonHGap, 0,
- mMoreTextBox->getRect().getWidth(),
- mMoreTextBox->getRect().getHeight());
+ LLRect rect(mMoreTextBox->getRect());
+ rect.translate(getRect().mRight - rect.mRight - buttonHGap, 0);
addChild(mMoreTextBox);
mMoreTextBox->setRect(rect);
- mMoreTextBox->setVisible(TRUE);
+ mMoreTextBox->setVisible(true);
}
// Update overflow menu
LLToggleableMenu* overflow_menu = static_cast <LLToggleableMenu*> (mOverflowMenuHandle.get());
if (overflow_menu && overflow_menu->getVisible() && (overflow_menu->getItemCount() != mDropDownItemsCount))
{
- overflow_menu->setVisible(FALSE);
+ overflow_menu->setVisible(false);
if (mUpdateDropDownItems)
{
showDropDownMenu();
@@ -1027,7 +1119,7 @@ LLButton* LLFavoritesBarCtrl::createButton(const LLPointer<LLViewerInventoryItem
}
-BOOL LLFavoritesBarCtrl::postBuild()
+bool LLFavoritesBarCtrl::postBuild()
{
// make the popup menu available
LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_favorites.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
@@ -1038,14 +1130,14 @@ BOOL LLFavoritesBarCtrl::postBuild()
menu->setBackgroundColor(LLUIColorTable::instance().getColor("MenuPopupBgColor"));
mContextMenuHandle = menu->getHandle();
- return TRUE;
+ return true;
}
-BOOL LLFavoritesBarCtrl::collectFavoriteItems(LLInventoryModel::item_array_t &items)
+bool LLFavoritesBarCtrl::collectFavoriteItems(LLInventoryModel::item_array_t &items)
{
if (mFavoriteFolderId.isNull())
- return FALSE;
+ return false;
LLInventoryModel::cat_array_t cats;
@@ -1065,7 +1157,7 @@ BOOL LLFavoritesBarCtrl::collectFavoriteItems(LLInventoryModel::item_array_t &it
LLFavoritesOrderStorage::instance().mSaveOnExit = true;
}
- return TRUE;
+ return true;
}
void LLFavoritesBarCtrl::onMoreTextBoxClicked()
@@ -1086,14 +1178,16 @@ void LLFavoritesBarCtrl::showDropDownMenu()
{
if (mUpdateDropDownItems)
{
- updateMenuItems(menu);
+ updateOverflowMenuItems();
+ }
+ else
+ {
+ menu->buildDrawLabels();
}
- menu->buildDrawLabels();
menu->updateParent(LLMenuGL::sMenuContainer);
menu->setButtonRect(mMoreTextBox->getRect(), this);
- positionAndShowMenu(menu);
- mDropDownItemsCount = menu->getItemCount();
+ positionAndShowOverflowMenu();
}
}
@@ -1107,12 +1201,14 @@ void LLFavoritesBarCtrl::createOverflowMenu()
menu_p.max_scrollable_items = 10;
menu_p.preferred_width = DROP_DOWN_MENU_WIDTH;
- LLToggleableMenu* menu = LLUICtrlFactory::create<LLFavoriteLandmarkToggleableMenu>(menu_p);
+ LLFavoriteLandmarkToggleableMenu* menu = LLUICtrlFactory::create<LLFavoriteLandmarkToggleableMenu>(menu_p);
+ menu->setToolbar(this);
mOverflowMenuHandle = menu->getHandle();
}
-void LLFavoritesBarCtrl::updateMenuItems(LLToggleableMenu* menu)
+void LLFavoritesBarCtrl::updateOverflowMenuItems()
{
+ LLToggleableMenu* menu = (LLToggleableMenu*)mOverflowMenuHandle.get();
menu->empty();
U32 widest_item = 0;
@@ -1141,6 +1237,8 @@ void LLFavoritesBarCtrl::updateMenuItems(LLToggleableMenu* menu)
menu->addChild(menu_item);
}
+ menu->buildDrawLabels();
+ mDropDownItemsCount = menu->getItemCount();
addOpenLandmarksMenuItem(menu);
mUpdateDropDownItems = false;
}
@@ -1197,8 +1295,9 @@ void LLFavoritesBarCtrl::addOpenLandmarksMenuItem(LLToggleableMenu* menu)
menu->addChild(menu_item);
}
-void LLFavoritesBarCtrl::positionAndShowMenu(LLToggleableMenu* menu)
+void LLFavoritesBarCtrl::positionAndShowOverflowMenu()
{
+ LLToggleableMenu* menu = (LLToggleableMenu*)mOverflowMenuHandle.get();
U32 max_width = llmin(DROP_DOWN_MENU_WIDTH, getRect().getWidth());
S32 menu_x = getRect().getWidth() - max_width;
@@ -1264,9 +1363,9 @@ void LLFavoritesBarCtrl::onButtonRightClick( LLUUID item_id,LLView* fav_button,S
LLMenuGL::showPopup(fav_button, menu, x, y);
}
-BOOL LLFavoritesBarCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLFavoritesBarCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
- BOOL handled = childrenHandleRightMouseDown( x, y, mask) != NULL;
+ bool handled = childrenHandleRightMouseDown( x, y, mask) != NULL;
if(!handled && !gMenuHolder->hasVisibleMenu())
{
show_navbar_context_menu(this,x,y);
@@ -1407,7 +1506,7 @@ bool LLFavoritesBarCtrl::onRenameCommit(const LLSD& notification, const LLSD& re
{
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
new_item->rename(landmark_name);
- new_item->updateServer(FALSE);
+ new_item->updateServer(false);
gInventory.updateItem(new_item);
}
}
@@ -1415,11 +1514,11 @@ bool LLFavoritesBarCtrl::onRenameCommit(const LLSD& notification, const LLSD& re
return false;
}
-BOOL LLFavoritesBarCtrl::isClipboardPasteable() const
+bool LLFavoritesBarCtrl::isClipboardPasteable() const
{
if (!LLClipboard::instance().hasContents())
{
- return FALSE;
+ return false;
}
std::vector<LLUUID> objects;
@@ -1433,16 +1532,16 @@ BOOL LLFavoritesBarCtrl::isClipboardPasteable() const
const LLInventoryCategory *cat = gInventory.getCategory(item_id);
if (cat)
{
- return FALSE;
+ return false;
}
const LLInventoryItem *item = gInventory.getItem(item_id);
if (item && LLAssetType::AT_LANDMARK != item->getType())
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
void LLFavoritesBarCtrl::pasteFromClipboard() const
@@ -1482,11 +1581,11 @@ void LLFavoritesBarCtrl::onButtonMouseDown(LLUUID id, LLUICtrl* ctrl, S32 x, S32
LLMenuGL* menu = (LLMenuGL*)mContextMenuHandle.get();
if(menu && menu->getVisible())
{
- menu->setVisible(FALSE);
+ menu->setVisible(false);
}
mDragItemId = id;
- mStartDrag = TRUE;
+ mStartDrag = true;
S32 screenX, screenY;
localPointToScreen(x, y, &screenX, &screenY);
@@ -1496,7 +1595,7 @@ void LLFavoritesBarCtrl::onButtonMouseDown(LLUUID id, LLUICtrl* ctrl, S32 x, S32
void LLFavoritesBarCtrl::onButtonMouseUp(LLUUID id, LLUICtrl* ctrl, S32 x, S32 y, MASK mask)
{
- mStartDrag = FALSE;
+ mStartDrag = false;
mDragItemId = LLUUID::null;
}
@@ -1504,12 +1603,12 @@ void LLFavoritesBarCtrl::onEndDrag()
{
mEndDragConnection.disconnect();
- showDragMarker(FALSE);
+ showDragMarker(false);
mDragItemId = LLUUID::null;
LLView::getWindow()->setCursor(UI_CURSOR_ARROW);
}
-BOOL LLFavoritesBarCtrl::handleHover(S32 x, S32 y, MASK mask)
+bool LLFavoritesBarCtrl::handleHover(S32 x, S32 y, MASK mask)
{
if (mDragItemId != LLUUID::null && mStartDrag)
{
@@ -1522,13 +1621,13 @@ BOOL LLFavoritesBarCtrl::handleHover(S32 x, S32 y, MASK mask)
DAD_LANDMARK, mDragItemId,
LLToolDragAndDrop::SOURCE_LIBRARY);
- mStartDrag = FALSE;
+ mStartDrag = false;
return LLToolDragAndDrop::getInstance()->handleHover(x, y, mask);
}
}
- return TRUE;
+ return true;
}
LLUICtrl* LLFavoritesBarCtrl::findChildByLocalCoords(S32 x, S32 y)
@@ -1551,19 +1650,20 @@ LLUICtrl* LLFavoritesBarCtrl::findChildByLocalCoords(S32 x, S32 y)
}
}
}
+
return ctrl;
}
-BOOL LLFavoritesBarCtrl::needToSaveItemsOrder(const LLInventoryModel::item_array_t& items)
+bool LLFavoritesBarCtrl::needToSaveItemsOrder(const LLInventoryModel::item_array_t& items)
{
- BOOL result = FALSE;
+ bool result = false;
// if there is an item without sort order field set, we need to save items order
for (LLInventoryModel::item_array_t::const_iterator i = items.begin(); i != items.end(); ++i)
{
if (LLFavoritesOrderStorage::instance().getSortIndex((*i)->getUUID()) < 0)
{
- result = TRUE;
+ result = true;
break;
}
}
@@ -1967,8 +2067,8 @@ void LLFavoritesOrderStorage::saveItemsOrder( const LLInventoryModel::item_array
setSortIndex(item, ++sortField);
- item->setComplete(TRUE);
- item->updateServer(FALSE);
+ item->setComplete(true);
+ item->updateServer(false);
gInventory.updateItem(item);
@@ -1999,7 +2099,7 @@ void LLFavoritesOrderStorage::rearrangeFavoriteLandmarks(const LLUUID& source_it
saveItemsOrder(items);
}
-BOOL LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed)
+bool LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed)
{
pref_changed |= mRecreateFavoriteStorage;
mRecreateFavoriteStorage = false;
@@ -2007,13 +2107,13 @@ BOOL LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed)
// Can get called before inventory is done initializing.
if (!gInventory.isInventoryUsable())
{
- return FALSE;
+ return false;
}
LLUUID favorite_folder= gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE);
if (favorite_folder.isNull())
{
- return FALSE;
+ return false;
}
LLInventoryModel::item_array_t items;
@@ -2125,11 +2225,11 @@ BOOL LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed)
mPrevFavorites = items;
}
- return TRUE;
+ return true;
}
-void LLFavoritesOrderStorage::showFavoritesOnLoginChanged(BOOL show)
+void LLFavoritesOrderStorage::showFavoritesOnLoginChanged(bool show)
{
if (show)
{
@@ -2160,8 +2260,10 @@ bool LLFavoritesOrderStorage::isStorageUpdateNeeded()
void AddFavoriteLandmarkCallback::fire(const LLUUID& inv_item_id)
{
- if (mTargetLandmarkId.isNull()) return;
-
- LLFavoritesOrderStorage::instance().rearrangeFavoriteLandmarks(inv_item_id, mTargetLandmarkId);
+ if (!mTargetLandmarkId.isNull())
+ {
+ LLFavoritesOrderStorage::instance().rearrangeFavoriteLandmarks(inv_item_id, mTargetLandmarkId);
+ }
}
+
// EOF
diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h
index 68a679e27f..8f40ad5a62 100644
--- a/indra/newview/llfavoritesbar.h
+++ b/indra/newview/llfavoritesbar.h
@@ -57,29 +57,28 @@ protected:
public:
virtual ~LLFavoritesBarCtrl();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild() override;
- /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
- EDragAndDropType cargo_type,
- void* cargo_data,
- EAcceptance* accept,
- std::string& tooltip_msg);
+ /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
+ EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) override;
+ bool handleDragAndDropToMenu(S32 x, S32 y, MASK mask, bool drop,
+ EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg);
- /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask) override;
+ /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask) override;
// LLInventoryObserver observer trigger
- virtual void changed(U32 mask);
- virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
- virtual void draw();
+ /*virtual*/ void changed(U32 mask) override;
+ /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true) override;
+ /*virtual*/ void draw() override;
- void showDragMarker(BOOL show) { mShowDragMarker = show; }
+ void showDragMarker(bool show) { mShowDragMarker = show; }
void setLandingTab(LLUICtrl* tab) { mLandingTab = tab; }
protected:
void updateButtons(bool force_update = false);
LLButton* createButton(const LLPointer<LLViewerInventoryItem> item, const LLButton::Params& button_params, S32 x_offset );
const LLButton::Params& getButtonParams();
- BOOL collectFavoriteItems(LLInventoryModel::item_array_t &items);
+ bool collectFavoriteItems(LLInventoryModel::item_array_t &items);
void onButtonClick(LLUUID id);
void onButtonRightClick(LLUUID id,LLView* button,S32 x,S32 y,MASK mask);
@@ -92,7 +91,7 @@ protected:
bool enableSelected(const LLSD& userdata);
void doToSelected(const LLSD& userdata);
static bool onRenameCommit(const LLSD& notification, const LLSD& response);
- BOOL isClipboardPasteable() const;
+ bool isClipboardPasteable() const;
void pasteFromClipboard() const;
void showDropDownMenu();
@@ -108,7 +107,7 @@ protected:
S32 mDropDownItemsCount;
bool mUpdateDropDownItems;
bool mRestoreOverflowMenu;
-
+ bool mDragToOverflowMenu;
bool mGetPrevItems;
LLUUID mSelectedItemID;
@@ -118,21 +117,23 @@ protected:
private:
/*
* Helper function to make code more readable. It handles all drag and drop
- * operations of the existing favorites items on the favorites bar.
+ * operations of the existing favorites items to the favorites bar to on the overflow menu.
*/
void handleExistingFavoriteDragAndDrop(S32 x, S32 y);
/*
* Helper function to make code more readable. It handles all drag and drop
- * operations of the new landmark to the favorites bar.
+ * operations of the new landmark to the favorites bar or to the overflow menu.
*/
void handleNewFavoriteDragAndDrop(LLInventoryItem *item, const LLUUID& favorites_id, S32 x, S32 y);
// finds a control under the specified LOCAL point
LLUICtrl* findChildByLocalCoords(S32 x, S32 y);
+ bool findDragAndDropTarget(LLUUID &target_id, bool &insert_before, S32 x, S32 y);
+
// checks if the current order of the favorites items must be saved
- BOOL needToSaveItemsOrder(const LLInventoryModel::item_array_t& items);
+ bool needToSaveItemsOrder(const LLInventoryModel::item_array_t& items);
/**
* inserts an item identified by insertedItemId BEFORE an item identified by beforeItemId.
@@ -145,23 +146,23 @@ private:
void createOverflowMenu();
- void updateMenuItems(LLToggleableMenu* menu);
+ void updateOverflowMenuItems();
// Fits menu item label width with favorites menu width
void fitLabelWidth(LLMenuItemCallGL* menu_item);
void addOpenLandmarksMenuItem(LLToggleableMenu* menu);
- void positionAndShowMenu(LLToggleableMenu* menu);
+ void positionAndShowOverflowMenu();
- BOOL mShowDragMarker;
+ bool mShowDragMarker;
LLUICtrl* mLandingTab;
LLUICtrl* mLastTab;
LLTextBox* mMoreTextBox;
LLTextBox* mBarLabel;
LLUUID mDragItemId;
- BOOL mStartDrag;
+ bool mStartDrag;
LLInventoryModel::item_array_t mItems;
static F64 sWaitingForCallabck;
@@ -224,8 +225,8 @@ public:
// Remove record of current user's favorites from file on disk.
static void removeFavoritesRecordOfUser();
- BOOL saveFavoritesRecord(bool pref_changed = false);
- void showFavoritesOnLoginChanged(BOOL show);
+ bool saveFavoritesRecord(bool pref_changed = false);
+ void showFavoritesOnLoginChanged(bool show);
bool isStorageUpdateNeeded();
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index f482d5a37d..14089b571a 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -70,8 +70,8 @@ const char FEATURE_TABLE_FILENAME[] = "featuretable.txt";
#if 0 // consuming code in #if 0 below
#endif
-LLFeatureInfo::LLFeatureInfo(const std::string& name, const BOOL available, const F32 level)
- : mValid(TRUE), mName(name), mAvailable(available), mRecommendedLevel(level)
+LLFeatureInfo::LLFeatureInfo(const std::string& name, const bool available, const F32 level)
+ : mValid(true), mName(name), mAvailable(available), mRecommendedLevel(level)
{
}
@@ -84,7 +84,7 @@ LLFeatureList::~LLFeatureList()
{
}
-void LLFeatureList::addFeature(const std::string& name, const BOOL available, const F32 level)
+void LLFeatureList::addFeature(const std::string& name, const bool available, const F32 level)
{
if (mFeatures.count(name))
{
@@ -99,7 +99,7 @@ void LLFeatureList::addFeature(const std::string& name, const BOOL available, co
mFeatures[name] = fi;
}
-BOOL LLFeatureList::isFeatureAvailable(const std::string& name)
+bool LLFeatureList::isFeatureAvailable(const std::string& name)
{
if (mFeatures.count(name))
{
@@ -108,9 +108,9 @@ BOOL LLFeatureList::isFeatureAvailable(const std::string& name)
LL_WARNS_ONCE("RenderInit") << "Feature " << name << " not on feature list!" << LL_ENDL;
- // changing this to TRUE so you have to explicitly disable
+ // changing this to true so you have to explicitly disable
// something for it to be disabled
- return TRUE;
+ return true;
}
F32 LLFeatureList::getRecommendedValue(const std::string& name)
@@ -125,7 +125,7 @@ F32 LLFeatureList::getRecommendedValue(const std::string& name)
return 0;
}
-BOOL LLFeatureList::maskList(LLFeatureList &mask)
+bool LLFeatureList::maskList(LLFeatureList &mask)
{
LL_DEBUGS_ONCE() << "Masking with " << mask.mName << LL_ENDL;
//
@@ -168,7 +168,7 @@ BOOL LLFeatureList::maskList(LLFeatureList &mask)
dump();
LL_CONT << LL_ENDL;
- return TRUE;
+ return true;
}
void LLFeatureList::dump()
@@ -243,13 +243,13 @@ LLFeatureList *LLFeatureManager::findMask(const std::string& name)
return NULL;
}
-BOOL LLFeatureManager::maskFeatures(const std::string& name)
+bool LLFeatureManager::maskFeatures(const std::string& name)
{
LLFeatureList *maskp = findMask(name);
if (!maskp)
{
LL_DEBUGS("RenderInit") << "Unknown feature mask " << name << LL_ENDL;
- return FALSE;
+ return false;
}
LL_INFOS("RenderInit") << "Applying GPU Feature list: " << name << LL_ENDL;
return maskList(*maskp);
@@ -294,7 +294,7 @@ bool LLFeatureManager::parseFeatureTable(std::string filename)
if (!file)
{
LL_WARNS("RenderInit") << "Unable to open feature table " << filename << LL_ENDL;
- return FALSE;
+ return false;
}
// Check file version
@@ -486,7 +486,7 @@ bool LLFeatureManager::loadGPUClass()
// defaults
mGPUString = gGLManager.getRawGLString();
- mGPUSupported = TRUE;
+ mGPUSupported = true;
return true; // indicates that a gpu value was established
}
@@ -568,7 +568,7 @@ void LLFeatureManager::applyFeatures(bool skipFeatures)
// handle all the different types
if(ctrl->isType(TYPE_BOOLEAN))
{
- gSavedSettings.setBOOL(mIt->first, (BOOL)getRecommendedValue(mIt->first));
+ gSavedSettings.setBOOL(mIt->first, (bool)getRecommendedValue(mIt->first));
}
else if (ctrl->isType(TYPE_S32))
{
@@ -664,6 +664,10 @@ void LLFeatureManager::applyBaseMasks()
{
maskFeatures("TexUnit8orLess");
}
+ if (gGLManager.mNumTextureImageUnits <= 16)
+ {
+ maskFeatures("TexUnit16orLess");
+ }
if (gGLManager.mVRAM > 512)
{
maskFeatures("VRAMGT512");
diff --git a/indra/newview/llfeaturemanager.h b/indra/newview/llfeaturemanager.h
index 70c6c09e0d..35d1267a45 100644
--- a/indra/newview/llfeaturemanager.h
+++ b/indra/newview/llfeaturemanager.h
@@ -50,15 +50,15 @@ typedef enum EGPUClass
class LLFeatureInfo
{
public:
- LLFeatureInfo() : mValid(FALSE), mAvailable(FALSE), mRecommendedLevel(-1) {}
- LLFeatureInfo(const std::string& name, const BOOL available, const F32 level);
+ LLFeatureInfo() : mValid(false), mAvailable(false), mRecommendedLevel(-1) {}
+ LLFeatureInfo(const std::string& name, const bool available, const F32 level);
- BOOL isValid() const { return mValid; };
+ bool isValid() const { return mValid; };
public:
- BOOL mValid;
+ bool mValid;
std::string mName;
- BOOL mAvailable;
+ bool mAvailable;
F32 mRecommendedLevel;
};
@@ -71,17 +71,17 @@ public:
LLFeatureList(const std::string& name);
virtual ~LLFeatureList();
- BOOL isFeatureAvailable(const std::string& name);
+ bool isFeatureAvailable(const std::string& name);
F32 getRecommendedValue(const std::string& name);
- void setFeatureAvailable(const std::string& name, const BOOL available);
+ void setFeatureAvailable(const std::string& name, const bool available);
void setRecommendedLevel(const std::string& name, const F32 level);
bool loadFeatureList(LLFILE *fp);
- BOOL maskList(LLFeatureList &mask);
+ bool maskList(LLFeatureList &mask);
- void addFeature(const std::string& name, const BOOL available, const F32 level);
+ void addFeature(const std::string& name, const bool available, const F32 level);
feature_map_t& getFeatures()
{
@@ -115,17 +115,17 @@ public:
// get the measured GPU memory bandwidth in GB/sec
// may return 0 of benchmark has not been run or failed to run
F32 getGPUMemoryBandwidth() { return mGPUMemoryBandwidth; }
- BOOL isGPUSupported() { return mGPUSupported; }
+ bool isGPUSupported() { return mGPUSupported; }
F32 getExpectedGLVersion() { return mExpectedGLVersion; }
void cleanupFeatureTables();
S32 getVersion() const { return mTableVersion; }
- void setSafe(const BOOL safe) { mSafe = safe; }
- BOOL isSafe() const { return mSafe; }
+ void setSafe(const bool safe) { mSafe = safe; }
+ bool isSafe() const { return mSafe; }
LLFeatureList *findMask(const std::string& name);
- BOOL maskFeatures(const std::string& name);
+ bool maskFeatures(const std::string& name);
// set the graphics to low, medium, high, or ultra.
// skipFeatures forces skipping of mostly hardware settings
@@ -156,32 +156,32 @@ protected:
bool loadGPUClass();
bool parseFeatureTable(std::string filename);
- ///< @returns TRUE is file parsed correctly, FALSE if not
+ ///< @returns true is file parsed correctly, false if not
void initBaseMask();
std::map<std::string, LLFeatureList *> mMaskList;
std::set<std::string> mSkippedFeatures;
- BOOL mInited;
+ bool mInited;
S32 mTableVersion;
- BOOL mSafe; // Reinitialize everything to the "safe" mask
+ bool mSafe; // Reinitialize everything to the "safe" mask
EGPUClass mGPUClass;
F32 mGPUMemoryBandwidth = 0.f; // measured memory bandwidth of GPU in GB/second
F32 mExpectedGLVersion; //expected GL version according to gpu table
std::string mGPUString;
- BOOL mGPUSupported;
+ bool mGPUSupported;
};
inline
LLFeatureManager::LLFeatureManager()
: LLFeatureList("default"),
- mInited(FALSE),
+ mInited(false),
mTableVersion(0),
- mSafe(FALSE),
+ mSafe(false),
mGPUClass(GPU_CLASS_UNKNOWN),
mExpectedGLVersion(0.f),
- mGPUSupported(FALSE)
+ mGPUSupported(false)
{
}
diff --git a/indra/newview/llfetchedgltfmaterial.cpp b/indra/newview/llfetchedgltfmaterial.cpp
index 46b9dffae9..e58027e579 100644
--- a/indra/newview/llfetchedgltfmaterial.cpp
+++ b/indra/newview/llfetchedgltfmaterial.cpp
@@ -34,11 +34,12 @@
#include "llshadermgr.h"
#include "pipeline.h"
+//static
+LLFetchedGLTFMaterial LLFetchedGLTFMaterial::sDefault;
+
LLFetchedGLTFMaterial::LLFetchedGLTFMaterial()
: LLGLTFMaterial()
, mExpectedFlusTime(0.f)
- , mActive(true)
- , mFetching(false)
{
}
@@ -78,7 +79,14 @@ void LLFetchedGLTFMaterial::bind(LLViewerTexture* media_tex)
{
// dividing the alpha cutoff by transparency here allows the shader to compare against
// the alpha value of the texture without needing the transparency value
- min_alpha = mAlphaCutoff/mBaseColor.mV[3];
+ if (mBaseColor.mV[3] > 0.f)
+ {
+ min_alpha = mAlphaCutoff / mBaseColor.mV[3];
+ }
+ else
+ {
+ min_alpha = 1024.f;
+ }
}
shader->uniform1f(LLShaderMgr::MINIMUM_ALPHA, min_alpha);
}
@@ -151,8 +159,8 @@ LLViewerFetchedTexture* fetch_texture(const LLUUID& id)
LLViewerFetchedTexture* img = nullptr;
if (id.notNull())
{
- img = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
- img->addTextureStats(64.f * 64.f, TRUE);
+ img = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+ img->addTextureStats(64.f * 64.f, true);
}
return img;
};
@@ -242,10 +250,11 @@ void LLFetchedGLTFMaterial::onMaterialComplete(std::function<void()> material_co
materialCompleteCallbacks.push_back(material_complete);
}
-void LLFetchedGLTFMaterial::materialComplete()
+void LLFetchedGLTFMaterial::materialComplete(bool success)
{
llassert(mFetching);
mFetching = false;
+ mFetchSuccess = success;
for (std::function<void()> material_complete : materialCompleteCallbacks)
{
@@ -255,54 +264,3 @@ void LLFetchedGLTFMaterial::materialComplete()
materialCompleteCallbacks.shrink_to_fit();
}
-LLPointer<LLViewerFetchedTexture> LLFetchedGLTFMaterial::getUITexture()
-{
- if (mFetching)
- {
- return nullptr;
- }
-
- auto fetch_texture_for_ui = [](LLPointer<LLViewerFetchedTexture>& img, const LLUUID& id)
- {
- if (id.notNull())
- {
- if (LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::isBakedImageId(id))
- {
- LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getFirstObject();
- if (obj)
- {
- LLViewerTexture* viewerTexture = obj->getBakedTextureForMagicId(id);
- img = viewerTexture ? dynamic_cast<LLViewerFetchedTexture*>(viewerTexture) : NULL;
- }
-
- }
- else
- {
- img = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
- }
- }
- if (img)
- {
- img->setBoostLevel(LLGLTexture::BOOST_PREVIEW);
- img->forceToSaveRawImage(0);
- }
- };
-
- fetch_texture_for_ui(mBaseColorTexture, mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR]);
- fetch_texture_for_ui(mNormalTexture, mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_NORMAL]);
- fetch_texture_for_ui(mMetallicRoughnessTexture, mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_METALLIC_ROUGHNESS]);
- fetch_texture_for_ui(mEmissiveTexture, mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_EMISSIVE]);
-
- if ((mBaseColorTexture && (mBaseColorTexture->getRawImageLevel() != 0)) ||
- (mNormalTexture && (mNormalTexture->getRawImageLevel() != 0)) ||
- (mMetallicRoughnessTexture && (mMetallicRoughnessTexture->getRawImageLevel() != 0)) ||
- (mEmissiveTexture && (mEmissiveTexture->getRawImageLevel() != 0)))
- {
- return nullptr;
- }
-
- // *HACK: Use one of the PBR texture components as the preview texture for now
- mPreviewTexture = mBaseColorTexture;
-
- return mPreviewTexture;
-}
diff --git a/indra/newview/llfetchedgltfmaterial.h b/indra/newview/llfetchedgltfmaterial.h
index a9e539633d..7550c75b45 100644
--- a/indra/newview/llfetchedgltfmaterial.h
+++ b/indra/newview/llfetchedgltfmaterial.h
@@ -40,6 +40,8 @@ public:
virtual ~LLFetchedGLTFMaterial();
LLFetchedGLTFMaterial& operator=(const LLFetchedGLTFMaterial& rhs);
+ // LLGLTFMaterial::operator== is defined, but LLFetchedGLTFMaterial::operator== is not.
+ bool operator==(const LLGLTFMaterial& rhs) const = delete;
// If this material is loaded, fire the given function
void onMaterialComplete(std::function<void()> material_complete);
@@ -49,8 +51,7 @@ public:
void bind(LLViewerTexture* media_tex = nullptr);
bool isFetching() const { return mFetching; }
-
- LLPointer<LLViewerFetchedTexture> getUITexture();
+ bool isLoaded() const { return !mFetching && mFetchSuccess; }
void addTextureEntry(LLTextureEntry* te) override;
void removeTextureEntry(LLTextureEntry* te) override;
@@ -65,18 +66,18 @@ public:
std::set<LLTextureEntry*> mTextureEntires;
- // Texture used for previewing the material in the UI
- LLPointer<LLViewerFetchedTexture> mPreviewTexture;
-
+ // default material for when assets don't have one
+ static LLFetchedGLTFMaterial sDefault;
protected:
// Lifetime management
void materialBegin();
- void materialComplete();
+ void materialComplete(bool success);
F64 mExpectedFlusTime; // since epoch in seconds
- bool mActive;
- bool mFetching;
+ bool mActive = true;
+ bool mFetching = false;
+ bool mFetchSuccess = false;
std::vector<std::function<void()>> materialCompleteCallbacks;
};
diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp
index 4ad136e13a..2df32f5b6f 100644
--- a/indra/newview/llfilepicker.cpp
+++ b/indra/newview/llfilepicker.cpp
@@ -61,6 +61,7 @@ LLFilePicker LLFilePicker::sInstance;
#define RAW_FILTER L"RAW files (*.raw)\0*.raw\0"
#define MODEL_FILTER L"Model files (*.dae)\0*.dae\0"
#define MATERIAL_FILTER L"GLTF Files (*.gltf; *.glb)\0*.gltf;*.glb\0"
+#define HDRI_FILTER L"HDRI Files (*.exr)\0*.exr\0"
#define MATERIAL_TEXTURES_FILTER L"GLTF Import (*.gltf; *.glb; *.tga; *.bmp; *.jpg; *.jpeg; *.png)\0*.gltf;*.glb;*.tga;*.bmp;*.jpg;*.jpeg;*.png\0"
#define SCRIPT_FILTER L"Script files (*.lsl)\0*.lsl\0"
#define DICTIONARY_FILTER L"Dictionary files (*.dic; *.xcu)\0*.dic;*.xcu\0"
@@ -168,9 +169,9 @@ void LLFilePicker::reset()
#if LL_WINDOWS
-BOOL LLFilePicker::setupFilter(ELoadFilter filter)
+bool LLFilePicker::setupFilter(ELoadFilter filter)
{
- BOOL res = TRUE;
+ bool res = true;
switch (filter)
{
case FFLOAD_ALL:
@@ -228,6 +229,10 @@ BOOL LLFilePicker::setupFilter(ELoadFilter filter)
IMAGE_FILTER \
L"\0";
break;
+ case FFLOAD_HDRI:
+ mOFN.lpstrFilter = HDRI_FILTER \
+ L"\0";
+ break;
case FFLOAD_SCRIPT:
mOFN.lpstrFilter = SCRIPT_FILTER \
L"\0";
@@ -237,24 +242,24 @@ BOOL LLFilePicker::setupFilter(ELoadFilter filter)
L"\0";
break;
default:
- res = FALSE;
+ res = false;
break;
}
return res;
}
-BOOL LLFilePicker::getOpenFile(ELoadFilter filter, bool blocking)
+bool LLFilePicker::getOpenFile(ELoadFilter filter, bool blocking)
{
if( mLocked )
{
- return FALSE;
+ return false;
}
- BOOL success = FALSE;
+ bool success = false;
// if local file browsing is turned off, return without opening dialog
if ( check_local_file_access_enabled() == false )
{
- return FALSE;
+ return false;
}
// don't provide default file selection
@@ -294,27 +299,27 @@ BOOL LLFilePicker::getOpenFile(ELoadFilter filter, bool blocking)
return success;
}
-BOOL LLFilePicker::getOpenFileModeless(ELoadFilter filter,
+bool LLFilePicker::getOpenFileModeless(ELoadFilter filter,
void (*callback)(bool, std::vector<std::string> &, void*),
void *userdata)
{
// not supposed to be used yet, use LLFilePickerThread
LL_ERRS() << "NOT IMPLEMENTED" << LL_ENDL;
- return FALSE;
+ return false;
}
-BOOL LLFilePicker::getMultipleOpenFiles(ELoadFilter filter, bool blocking)
+bool LLFilePicker::getMultipleOpenFiles(ELoadFilter filter, bool blocking)
{
if( mLocked )
{
- return FALSE;
+ return false;
}
- BOOL success = FALSE;
+ bool success = false;
// if local file browsing is turned off, return without opening dialog
if ( check_local_file_access_enabled() == false )
{
- return FALSE;
+ return false;
}
// don't provide default file selection
@@ -380,27 +385,27 @@ BOOL LLFilePicker::getMultipleOpenFiles(ELoadFilter filter, bool blocking)
return success;
}
-BOOL LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter,
+bool LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter,
void (*callback)(bool, std::vector<std::string> &, void*),
void *userdata )
{
// not supposed to be used yet, use LLFilePickerThread
LL_ERRS() << "NOT IMPLEMENTED" << LL_ENDL;
- return FALSE;
+ return false;
}
-BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename, bool blocking)
+bool LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename, bool blocking)
{
if( mLocked )
{
- return FALSE;
+ return false;
}
- BOOL success = FALSE;
+ bool success = false;
// if local file browsing is turned off, return without opening dialog
if ( check_local_file_access_enabled() == false )
{
- return FALSE;
+ return false;
}
mOFN.lpstrFile = mFilesW;
@@ -566,7 +571,7 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename,
mOFN.lpstrFilter = L"LSL Files (*.lsl)\0*.lsl\0" L"\0";
break;
default:
- return FALSE;
+ return false;
}
@@ -609,14 +614,14 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename,
return success;
}
-BOOL LLFilePicker::getSaveFileModeless(ESaveFilter filter,
+bool LLFilePicker::getSaveFileModeless(ESaveFilter filter,
const std::string& filename,
void (*callback)(bool, std::string&, void*),
void *userdata)
{
// not supposed to be used yet, use LLFilePickerThread
LL_ERRS() << "NOT IMPLEMENTED" << LL_ENDL;
- return FALSE;
+ return false;
}
#elif LL_DARWIN
@@ -663,6 +668,8 @@ std::unique_ptr<std::vector<std::string>> LLFilePicker::navOpenFilterProc(ELoadF
allowedv->push_back("gltf");
allowedv->push_back("glb");
break;
+ case FFLOAD_HDRI:
+ allowedv->push_back("exr");
case FFLOAD_COLLADA:
allowedv->push_back("dae");
break;
@@ -783,7 +790,7 @@ void set_nav_save_data(LLFilePicker::ESaveFilter filter, std::string &extension,
case LLFilePicker::FFSAVE_GLTF:
type = "\?\?\?\?";
creator = "\?\?\?\?";
- extension = "glb";
+ extension = "glb,gltf";
break;
case LLFilePicker::FFSAVE_XML:
@@ -873,17 +880,17 @@ bool LLFilePicker::doNavSaveDialogModeless(ESaveFilter filter,
return true;
}
-BOOL LLFilePicker::getOpenFile(ELoadFilter filter, bool blocking)
+bool LLFilePicker::getOpenFile(ELoadFilter filter, bool blocking)
{
if( mLocked )
- return FALSE;
+ return false;
- BOOL success = FALSE;
+ bool success = false;
// if local file browsing is turned off, return without opening dialog
if ( check_local_file_access_enabled() == false )
{
- return FALSE;
+ return false;
}
reset();
@@ -929,17 +936,17 @@ BOOL LLFilePicker::getOpenFile(ELoadFilter filter, bool blocking)
}
-BOOL LLFilePicker::getOpenFileModeless(ELoadFilter filter,
+bool LLFilePicker::getOpenFileModeless(ELoadFilter filter,
void (*callback)(bool, std::vector<std::string> &, void*),
void *userdata)
{
if( mLocked )
- return FALSE;
+ return false;
// if local file browsing is turned off, return without opening dialog
if ( check_local_file_access_enabled() == false )
{
- return FALSE;
+ return false;
}
reset();
@@ -962,18 +969,18 @@ BOOL LLFilePicker::getOpenFileModeless(ELoadFilter filter,
return doNavChooseDialogModeless(filter, callback, userdata);
}
-BOOL LLFilePicker::getMultipleOpenFiles(ELoadFilter filter, bool blocking)
+bool LLFilePicker::getMultipleOpenFiles(ELoadFilter filter, bool blocking)
{
if( mLocked )
- return FALSE;
+ return false;
// if local file browsing is turned off, return without opening dialog
if ( check_local_file_access_enabled() == false )
{
- return FALSE;
+ return false;
}
- BOOL success = FALSE;
+ bool success = false;
reset();
@@ -1008,17 +1015,17 @@ BOOL LLFilePicker::getMultipleOpenFiles(ELoadFilter filter, bool blocking)
}
-BOOL LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter,
+bool LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter,
void (*callback)(bool, std::vector<std::string> &, void*),
void *userdata )
{
if( mLocked )
- return FALSE;
+ return false;
// if local file browsing is turned off, return without opening dialog
if ( check_local_file_access_enabled() == false )
{
- return FALSE;
+ return false;
}
reset();
@@ -1030,12 +1037,12 @@ BOOL LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter,
return doNavChooseDialogModeless(filter, callback, userdata);
}
-BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename, bool blocking)
+bool LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename, bool blocking)
{
if( mLocked )
return false;
- BOOL success = false;
+ bool success = false;
// if local file browsing is turned off, return without opening dialog
if ( check_local_file_access_enabled() == false )
@@ -1071,7 +1078,7 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename,
return success;
}
-BOOL LLFilePicker::getSaveFileModeless(ESaveFilter filter,
+bool LLFilePicker::getSaveFileModeless(ESaveFilter filter,
const std::string& filename,
void (*callback)(bool, std::string&, void*),
void *userdata)
@@ -1360,14 +1367,14 @@ static std::string add_save_texture_filter_to_gtkchooser(GtkWindow *picker)
return caption;
}
-BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename, bool blocking )
+bool LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename, bool blocking )
{
- BOOL rtn = FALSE;
+ bool rtn = false;
// if local file browsing is turned off, return without opening dialog
if ( check_local_file_access_enabled() == false )
{
- return FALSE;
+ return false;
}
gViewerWindow->getWindow()->beforeDialog();
@@ -1477,14 +1484,14 @@ BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename,
return rtn;
}
-BOOL LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking )
+bool LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking )
{
- BOOL rtn = FALSE;
+ bool rtn = false;
// if local file browsing is turned off, return without opening dialog
if ( check_local_file_access_enabled() == false )
{
- return FALSE;
+ return false;
}
gViewerWindow->getWindow()->beforeDialog();
@@ -1542,14 +1549,14 @@ BOOL LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking )
return rtn;
}
-BOOL LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking)
+bool LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking)
{
- BOOL rtn = FALSE;
+ bool rtn = false;
// if local file browsing is turned off, return without opening dialog
if ( check_local_file_access_enabled() == false )
{
- return FALSE;
+ return false;
}
gViewerWindow->getWindow()->beforeDialog();
@@ -1580,13 +1587,13 @@ BOOL LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking)
// Hacky stubs designed to facilitate fake getSaveFile and getOpenFile with
// static results, when we don't have a real filepicker.
-BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename, bool blocking )
+bool LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename, bool blocking )
{
// if local file browsing is turned off, return without opening dialog
// (Even though this is a stub, I think we still should not return anything at all)
if ( check_local_file_access_enabled() == false )
{
- return FALSE;
+ return false;
}
reset();
@@ -1596,27 +1603,27 @@ BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename,
if (!filename.empty())
{
mFiles.push_back(gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter() + filename);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-BOOL LLFilePicker::getSaveFileModeless(ESaveFilter filter,
+bool LLFilePicker::getSaveFileModeless(ESaveFilter filter,
const std::string& filename,
void (*callback)(bool, std::string&, void*),
void *userdata)
{
LL_ERRS() << "NOT IMPLEMENTED" << LL_ENDL;
- return FALSE;
+ return false;
}
-BOOL LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking )
+bool LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking )
{
// if local file browsing is turned off, return without opening dialog
// (Even though this is a stub, I think we still should not return anything at all)
if ( check_local_file_access_enabled() == false )
{
- return FALSE;
+ return false;
}
reset();
@@ -1632,58 +1639,58 @@ BOOL LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking )
}
mFiles.push_back(filename);
LL_INFOS() << "getOpenFile: Will try to open file: " << filename << LL_ENDL;
- return TRUE;
+ return true;
}
-BOOL LLFilePicker::getOpenFileModeless(ELoadFilter filter,
+bool LLFilePicker::getOpenFileModeless(ELoadFilter filter,
void (*callback)(bool, std::vector<std::string> &, void*),
void *userdata)
{
LL_ERRS() << "NOT IMPLEMENTED" << LL_ENDL;
- return FALSE;
+ return false;
}
-BOOL LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking)
+bool LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking)
{
// if local file browsing is turned off, return without opening dialog
// (Even though this is a stub, I think we still should not return anything at all)
if ( check_local_file_access_enabled() == false )
{
- return FALSE;
+ return false;
}
reset();
- return FALSE;
+ return false;
}
-BOOL LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter,
+bool LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter,
void (*callback)(bool, std::vector<std::string> &, void*),
void *userdata )
{
LL_ERRS() << "NOT IMPLEMENTED" << LL_ENDL;
- return FALSE;
+ return false;
}
#endif // LL_GTK
#else // not implemented
-BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename )
+bool LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename )
{
reset();
- return FALSE;
+ return false;
}
-BOOL LLFilePicker::getOpenFile( ELoadFilter filter )
+bool LLFilePicker::getOpenFile( ELoadFilter filter )
{
reset();
- return FALSE;
+ return false;
}
-BOOL LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking)
+bool LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking)
{
reset();
- return FALSE;
+ return false;
}
#endif // LL_LINUX
diff --git a/indra/newview/llfilepicker.h b/indra/newview/llfilepicker.h
index 38daff9937..1d98b405aa 100644
--- a/indra/newview/llfilepicker.h
+++ b/indra/newview/llfilepicker.h
@@ -89,6 +89,7 @@ public:
FFLOAD_EXE = 14, // Note: EXE will be treated as ALL on Windows and Linux but not on Darwin
FFLOAD_MATERIAL = 15,
FFLOAD_MATERIAL_TEXTURE = 16,
+ FFLOAD_HDRI = 17,
};
enum ESaveFilter
@@ -111,17 +112,17 @@ public:
};
// open the dialog. This is a modal operation
- BOOL getSaveFile( ESaveFilter filter = FFSAVE_ALL, const std::string& filename = LLStringUtil::null, bool blocking = true);
- BOOL getSaveFileModeless(ESaveFilter filter,
+ bool getSaveFile( ESaveFilter filter = FFSAVE_ALL, const std::string& filename = LLStringUtil::null, bool blocking = true);
+ bool getSaveFileModeless(ESaveFilter filter,
const std::string& filename,
void (*callback)(bool, std::string&, void*),
void *userdata);
- BOOL getOpenFile( ELoadFilter filter = FFLOAD_ALL, bool blocking = true );
+ bool getOpenFile( ELoadFilter filter = FFLOAD_ALL, bool blocking = true );
// Todo: implement getOpenFileModeless and getMultipleOpenFilesModeless
// for windows and use directly instead of ugly LLFilePickerThread
- BOOL getOpenFileModeless( ELoadFilter filter, void (*callback)(bool, std::vector<std::string> &, void*), void *userdata); // MAC only.
- BOOL getMultipleOpenFiles( ELoadFilter filter = FFLOAD_ALL, bool blocking = true );
- BOOL getMultipleOpenFilesModeless( ELoadFilter filter, void (*callback)(bool, std::vector<std::string> &, void*), void *userdata ); // MAC only
+ bool getOpenFileModeless( ELoadFilter filter, void (*callback)(bool, std::vector<std::string> &, void*), void *userdata); // MAC only.
+ bool getMultipleOpenFiles( ELoadFilter filter = FFLOAD_ALL, bool blocking = true );
+ bool getMultipleOpenFilesModeless( ELoadFilter filter, void (*callback)(bool, std::vector<std::string> &, void*), void *userdata ); // MAC only
// Get the filename(s) found. getFirstFile() sets the pointer to
// the start of the structure and allows the start of iteration.
@@ -164,7 +165,7 @@ private:
OPENFILENAMEW mOFN; // for open and save dialogs
WCHAR mFilesW[FILENAME_BUFFER_SIZE];
- BOOL setupFilter(ELoadFilter filter);
+ bool setupFilter(ELoadFilter filter);
#endif
#if LL_DARWIN
diff --git a/indra/newview/llfilepicker_mac.mm b/indra/newview/llfilepicker_mac.mm
index 4dd8bea4e1..b21bc724fb 100644
--- a/indra/newview/llfilepicker_mac.mm
+++ b/indra/newview/llfilepicker_mac.mm
@@ -121,7 +121,7 @@ void doLoadDialogModeless(const std::vector<std::string>* allowed_types,
[panel beginWithCompletionHandler:^(NSModalResponse result)
{
std::vector<std::string> outfiles;
- if (result == NSOKButton)
+ if (result == NSModalResponseOK)
{
NSArray *filesToOpen = [panel URLs];
int i, count = [filesToOpen count];
diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp
index 1ce9fe3a7a..43440bd6c7 100644
--- a/indra/newview/llfirstuse.cpp
+++ b/indra/newview/llfirstuse.cpp
@@ -144,7 +144,7 @@ void LLFirstUse::firstUseNotification(const std::string& control_var, bool enabl
LL_DEBUGS("LLFirstUse") << "Disabling first use notification " << notification_name << LL_ENDL;
LLNotifications::instance().cancelByName(notification_name);
// redundantly clear settings var here, in case there are no notifications to cancel
- gWarningSettings.setBOOL(control_var, FALSE);
+ gWarningSettings.setBOOL(control_var, false);
}
}
@@ -169,7 +169,7 @@ bool LLFirstUse::processNotification(const LLSD& notify)
if (notification)
{
// disable any future notifications
- gWarningSettings.setBOOL(notification->getPayload()["control_var"], FALSE);
+ gWarningSettings.setBOOL((std::string)notification->getPayload()["control_var"], false);
}
}
return false;
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index e935bc5553..c619c19493 100644
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -60,8 +60,8 @@ LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectD
{
static U32 seed = 0;
mID = seed++;
- mInitialized = FALSE;
- mUpdated = FALSE;
+ mInitialized = false;
+ mUpdated = false;
mInitializedRes = -1;
mSimulateRes = 0;
mCollisionSphereRadius = 0.f;
@@ -119,7 +119,7 @@ LLQuaternion LLVolumeImplFlexible::getFrameRotation() const
return mVO->getRenderRotation();
}
-void LLVolumeImplFlexible::onParameterChanged(U16 param_type, LLNetworkData *data, BOOL in_use, bool local_origin)
+void LLVolumeImplFlexible::onParameterChanged(U16 param_type, LLNetworkData *data, bool in_use, bool local_origin)
{
if (param_type == LLNetworkData::PARAMS_FLEXIBLE)
{
@@ -324,7 +324,7 @@ void LLVolumeImplFlexible::updateRenderRes()
{
mSimulateRes = new_res;
setAttributesOfAllSections();
- mInitialized = TRUE;
+ mInitialized = true;
}
}
//---------------------------------------------------------------------------------
@@ -433,7 +433,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
LLPath *path = &volume->getPath();
if ((mSimulateRes == 0 || !mInitialized) && mVO->mDrawable->isVisible())
{
- BOOL force_update = mSimulateRes == 0 ? TRUE : FALSE;
+ bool force_update = mSimulateRes == 0 ? true : false;
doIdleUpdate();
if (!force_update || !gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE))
@@ -668,7 +668,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
S32 num_render_sections = 1<<mRenderRes;
if (path->getPathLength() != num_render_sections+1)
{
- ((LLVOVolume*) mVO)->mVolumeChanged = TRUE;
+ ((LLVOVolume*) mVO)->mVolumeChanged = true;
volume->resizePath(num_render_sections+1);
}
@@ -708,7 +708,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
if (!mUpdated || (np-pos).magVec()/mVO->mDrawable->mDistanceWRTCamera > 0.001f)
{
new_point->mPos.load3((newSection[i].mPosition * rel_xform).mV);
- mUpdated = FALSE;
+ mUpdated = false;
}
new_point->mRot.loadu(LLMatrix3(rot));
@@ -741,17 +741,17 @@ void LLVolumeImplFlexible::doFlexibleRebuild(bool rebuild_volume)
volume->regen();
}
- mUpdated = TRUE;
+ mUpdated = true;
}
//------------------------------------------------------------------
-void LLVolumeImplFlexible::onSetScale(const LLVector3& scale, BOOL damped)
+void LLVolumeImplFlexible::onSetScale(const LLVector3& scale, bool damped)
{
setAttributesOfAllSections((LLVector3*) &scale);
}
-BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)
+bool LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)
{
LL_PROFILE_ZONE_SCOPED;
LLVOVolume *volume = (LLVOVolume*)mVO;
@@ -770,21 +770,21 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)
LLVOAvatar* avatar = (LLVOAvatar*) parent;
if (avatar->isImpostor() && !avatar->needsImpostorUpdate())
{
- return TRUE;
+ return true;
}
}
}
if (volume->mDrawable.isNull())
{
- return TRUE; // No update to complete
+ return true; // No update to complete
}
if (volume->mLODChanged)
{
LLVolumeParams volume_params = volume->getVolume()->getParams();
volume->setVolume(volume_params, 0);
- mUpdated = FALSE;
+ mUpdated = false;
}
volume->updateRelativeXform();
@@ -792,12 +792,12 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)
doFlexibleUpdate();
// Object may have been rotated, which means it needs a rebuild. See SL-47220
- BOOL rotated = FALSE;
+ bool rotated = false;
LLQuaternion cur_rotation = getFrameRotation();
if ( cur_rotation != mLastFrameRotation )
{
mLastFrameRotation = cur_rotation;
- rotated = TRUE;
+ rotated = true;
}
if (volume->mLODChanged || volume->mFaceMappingChanged ||
@@ -822,14 +822,14 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)
volume->genBBoxes(isVolumeGlobal());
}
- volume->mVolumeChanged = FALSE;
- volume->mLODChanged = FALSE;
- volume->mFaceMappingChanged = FALSE;
+ volume->mVolumeChanged = false;
+ volume->mLODChanged = false;
+ volume->mFaceMappingChanged = false;
// clear UV flag
drawable->clearState(LLDrawable::UV);
- return TRUE;
+ return true;
}
//----------------------------------------------------------------------------------
diff --git a/indra/newview/llflexibleobject.h b/indra/newview/llflexibleobject.h
index 9383ab03ae..b615d33e1a 100644
--- a/indra/newview/llflexibleobject.h
+++ b/indra/newview/llflexibleobject.h
@@ -87,11 +87,11 @@ private:
LLVolumeInterfaceType getInterfaceType() const { return INTERFACE_FLEXIBLE; }
void updateRenderRes();
void doIdleUpdate();
- BOOL doUpdateGeometry(LLDrawable *drawable);
+ bool doUpdateGeometry(LLDrawable *drawable);
LLVector3 getPivotPosition() const;
void onSetVolume(const LLVolumeParams &volume_params, const S32 detail);
- void onSetScale(const LLVector3 &scale, BOOL damped);
- void onParameterChanged(U16 param_type, LLNetworkData *data, BOOL in_use, bool local_origin);
+ void onSetScale(const LLVector3 &scale, bool damped);
+ void onParameterChanged(U16 param_type, LLNetworkData *data, bool in_use, bool local_origin);
void onShift(const LLVector4a &shift_vector);
bool isVolumeUnique() const { return true; }
bool isVolumeGlobal() const { return true; }
@@ -125,8 +125,8 @@ private:
LLQuaternion mParentRotation;
LLQuaternion mLastFrameRotation;
LLQuaternion mLastSegmentRotation;
- BOOL mInitialized;
- BOOL mUpdated;
+ bool mInitialized;
+ bool mUpdated;
LLFlexibleObjectData* mAttributes;
LLFlexibleObjectSection mSection [ (1<<FLEXIBLE_OBJECT_MAX_SECTIONS)+1 ];
S32 mInitializedRes;
diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp
index 2c638fa959..d5efc15e35 100644
--- a/indra/newview/llfloater360capture.cpp
+++ b/indra/newview/llfloater360capture.cpp
@@ -67,7 +67,7 @@ LLFloater360Capture::LLFloater360Capture(const LLSD& key)
mStartILMode = gAgent.getInterestListMode();
// send everything to us for as long as this floater is open
- gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_360);
+ gAgent.changeInterestListMode(IL_MODE_360);
}
LLFloater360Capture::~LLFloater360Capture()
@@ -91,7 +91,7 @@ LLFloater360Capture::~LLFloater360Capture()
}
}
-BOOL LLFloater360Capture::postBuild()
+bool LLFloater360Capture::postBuild()
{
mCaptureBtn = getChild<LLUICtrl>("capture_button");
mCaptureBtn->setCommitCallback(boost::bind(&LLFloater360Capture::onCapture360ImagesBtn, this));
@@ -360,6 +360,8 @@ void LLFloater360Capture::encodeAndSave(LLPointer<LLImageRaw> raw_image, const s
int jpeg_encode_quality = gSavedSettings.getU32("360CaptureJPEGEncodeQuality");
LLPointer<LLImageJPEG> jpeg_image = new LLImageJPEG(jpeg_encode_quality);
+ LLImageDataSharedLock lock(raw_image);
+
// Actually encode the JPEG image. This is where a lot of time
// is spent now that the snapshot capture process has been
// optimized. The encode_time parameter doesn't appear to be
@@ -410,6 +412,8 @@ void LLFloater360Capture::suspendForAFrame()
// Probably not needed anymore but saving here just in case.
void LLFloater360Capture::mockSnapShot(LLImageRaw* raw)
{
+ LLImageDataLock lock(raw);
+
unsigned int width = raw->getWidth();
unsigned int height = raw->getHeight();
unsigned int depth = raw->getComponents();
@@ -449,7 +453,7 @@ void LLFloater360Capture::capture360Images()
if (gSavedSettings.getBOOL("360CaptureHideAvatars"))
{
// Turn off the avatar if UI tells us to hide it.
- // Note: the original call to gAvatar.hide(FALSE) did *not* hide
+ // Note: the original call to gAvatar.hide(false) did *not* hide
// attachments and so for most residents, there would be some debris
// left behind in the snapshot.
// Note: this toggles so if it set to on, this will turn it off and
@@ -458,7 +462,7 @@ void LLFloater360Capture::capture360Images()
// was set to off - I think this is what we need
LLPipeline::toggleRenderTypeControl(LLPipeline::RENDER_TYPE_AVATAR);
LLPipeline::toggleRenderTypeControl(LLPipeline::RENDER_TYPE_PARTICLES);
- LLPipeline::sRenderAttachedLights = FALSE;
+ LLPipeline::sRenderAttachedLights = false;
}
// these are the 6 directions we will point the camera - essentially,
diff --git a/indra/newview/llfloater360capture.h b/indra/newview/llfloater360capture.h
index 3fb2c7f3c7..f0b4057645 100644
--- a/indra/newview/llfloater360capture.h
+++ b/indra/newview/llfloater360capture.h
@@ -46,7 +46,7 @@ class LLFloater360Capture:
LLFloater360Capture(const LLSD& key);
~LLFloater360Capture();
- BOOL postBuild() override;
+ bool postBuild() override;
void onOpen(const LLSD& key) override;
void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) override;
diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index 1fbd198019..47d92bc2da 100644
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -83,7 +83,7 @@ private:
virtual ~LLFloaterAbout();
public:
- /*virtual*/ BOOL postBuild();
+ bool postBuild() override;
/// Obtain the data used to fill out the contents string. This is
/// separated so that we can programmatically access the same info.
@@ -122,7 +122,7 @@ LLFloaterAbout::~LLFloaterAbout()
{
}
-BOOL LLFloaterAbout::postBuild()
+bool LLFloaterAbout::postBuild()
{
center();
LLViewerTextEditor *support_widget =
@@ -157,7 +157,7 @@ BOOL LLFloaterAbout::postBuild()
support_widget->blockUndo();
// Fix views
- support_widget->setEnabled(FALSE);
+ support_widget->setEnabled(false);
support_widget->startOfDoc();
// Get the names of contributors, extracted from .../doc/contributions.txt by viewer_manifest.py at build time
@@ -175,7 +175,7 @@ BOOL LLFloaterAbout::postBuild()
LL_WARNS("AboutInit") << "Could not read contributors file at " << contributors_path << LL_ENDL;
}
contrib_names_widget->setText(contributors);
- contrib_names_widget->setEnabled(FALSE);
+ contrib_names_widget->setEnabled(false);
contrib_names_widget->startOfDoc();
// Get the Versions and Copyrights, created at build time
@@ -188,7 +188,7 @@ BOOL LLFloaterAbout::postBuild()
licenses_widget->clear();
while ( std::getline(licenses_file, license_line) )
{
- licenses_widget->appendText(license_line+"\n", FALSE,
+ licenses_widget->appendText(license_line+"\n", false,
LLStyle::Params() .color(about_color));
}
licenses_file.close();
@@ -198,10 +198,10 @@ BOOL LLFloaterAbout::postBuild()
// this case will use the (out of date) hard coded value from the XUI
LL_INFOS("AboutInit") << "Could not read licenses file at " << licenses_path << LL_ENDL;
}
- licenses_widget->setEnabled(FALSE);
+ licenses_widget->setEnabled(false);
licenses_widget->startOfDoc();
- return TRUE;
+ return true;
}
LLSD LLFloaterAbout::getInfo()
@@ -337,7 +337,7 @@ void LLFloaterAbout::setSupportText(const std::string& server_release_notes_url)
LLUIColor about_color = LLUIColorTable::instance().getColor("TextFgReadOnlyColor");
support_widget->clear();
support_widget->appendText(LLAppViewer::instance()->getViewerInfoString(),
- FALSE, LLStyle::Params() .color(about_color));
+ false, LLStyle::Params() .color(about_color));
}
//This is bound as a callback in postBuild()
@@ -354,11 +354,11 @@ void LLFloaterAbout::setUpdateListener()
// => update ready for install
//version directory, .done file and either .skip or .next file exists
// => update deferred
- BOOL downloads = false;
+ bool downloads = false;
std::string downloadDir = "";
- BOOL done = false;
- BOOL next = false;
- BOOL skip = false;
+ bool done = false;
+ bool next = false;
+ bool skip = false;
LLSD info(LLFloaterAbout::getInfo());
std::string version = info["VIEWER_VERSION_STR"].asString();
diff --git a/indra/newview/llfloateraddpaymentmethod.cpp b/indra/newview/llfloateraddpaymentmethod.cpp
index 3952b48229..cd265707a5 100644
--- a/indra/newview/llfloateraddpaymentmethod.cpp
+++ b/indra/newview/llfloateraddpaymentmethod.cpp
@@ -41,12 +41,12 @@ LLFloaterAddPaymentMethod::~LLFloaterAddPaymentMethod()
{
}
-BOOL LLFloaterAddPaymentMethod::postBuild()
+bool LLFloaterAddPaymentMethod::postBuild()
{
- setCanDrag(FALSE);
+ setCanDrag(false);
getChild<LLButton>("continue_btn")->setCommitCallback(boost::bind(&LLFloaterAddPaymentMethod::onContinueBtn, this));
getChild<LLButton>("close_btn")->setCommitCallback(boost::bind(&LLFloaterAddPaymentMethod::onCloseBtn, this));
- return TRUE;
+ return true;
}
void LLFloaterAddPaymentMethod::onOpen(const LLSD& key)
diff --git a/indra/newview/llfloateraddpaymentmethod.h b/indra/newview/llfloateraddpaymentmethod.h
index b3bb624484..d02b305d1b 100644
--- a/indra/newview/llfloateraddpaymentmethod.h
+++ b/indra/newview/llfloateraddpaymentmethod.h
@@ -34,8 +34,8 @@ class LLFloaterAddPaymentMethod:
{
friend class LLFloaterReg;
public:
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void onOpen(const LLSD& key);
+ bool postBuild() override;
+ void onOpen(const LLSD& key) override;
private:
LLFloaterAddPaymentMethod(const LLSD& key);
diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp
index 9813156bf2..69fa535143 100644
--- a/indra/newview/llfloaterauction.cpp
+++ b/indra/newview/llfloaterauction.cpp
@@ -43,7 +43,6 @@
#include "llmimetypes.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
-#include "llsavedsettingsglue.h"
#include "llviewertexturelist.h"
#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
@@ -87,9 +86,9 @@ LLFloaterAuction::~LLFloaterAuction()
{
}
-BOOL LLFloaterAuction::postBuild()
+bool LLFloaterAuction::postBuild()
{
- return TRUE;
+ return true;
}
void LLFloaterAuction::onOpen(const LLSD& key)
@@ -111,9 +110,9 @@ void LLFloaterAuction::initialize()
mParcelUpdateCapUrl = region->getCapability("ParcelPropertiesUpdate");
getChild<LLUICtrl>("parcel_text")->setValue(parcelp->getName());
- getChildView("snapshot_btn")->setEnabled(TRUE);
- getChildView("reset_parcel_btn")->setEnabled(TRUE);
- getChildView("start_auction_btn")->setEnabled(TRUE);
+ getChildView("snapshot_btn")->setEnabled(true);
+ getChildView("reset_parcel_btn")->setEnabled(true);
+ getChildView("start_auction_btn")->setEnabled(true);
U32 estate_id = LLEstateInfoModel::instance().getID();
// Only enable "Sell to Anyone" on Teen grid or if we don't know the ID yet
@@ -178,18 +177,20 @@ void LLFloaterAuction::onClickSnapshot(void* data)
LLPointer<LLImageRaw> raw = new LLImageRaw;
gForceRenderLandFence = self->getChild<LLUICtrl>("fence_check")->getValue().asBoolean();
- BOOL success = gViewerWindow->rawSnapshot(raw,
+ bool success = gViewerWindow->rawSnapshot(raw,
gViewerWindow->getWindowWidthScaled(),
gViewerWindow->getWindowHeightScaled(),
- TRUE,
- FALSE,
- FALSE, //UI
- FALSE, //HUD
- FALSE);
- gForceRenderLandFence = FALSE;
+ true,
+ false,
+ false, //UI
+ false, //HUD
+ false);
+ gForceRenderLandFence = false;
if (success)
{
+ LLImageDataLock lock(raw);
+
self->mTransactionID.generate();
self->mImageID = self->mTransactionID.makeAssetID(gAgent.getSecureSessionID());
@@ -215,7 +216,7 @@ void LLFloaterAuction::onClickSnapshot(void* data)
LLFileSystem j2c_file(self->mImageID, LLAssetType::AT_TEXTURE, LLFileSystem::WRITE);
j2c_file.write(j2c->getData(), j2c->getDataSize());
- self->mImage = LLViewerTextureManager::getLocalTexture((LLImageRaw*)raw, FALSE);
+ self->mImage = LLViewerTextureManager::getLocalTexture((LLImageRaw*)raw, false);
gGL.getTexUnit(0)->bind(self->mImage);
self->mImage->setAddressMode(LLTexUnit::TAM_CLAMP);
}
@@ -239,14 +240,14 @@ void LLFloaterAuction::onClickStartAuction(void* data)
gAssetStorage->storeAssetData(self->mTransactionID, LLAssetType::AT_IMAGE_TGA,
&auction_tga_upload_done,
(void*)name,
- FALSE);
+ false);
self->getWindow()->incBusyCount();
std::string* j2c_name = new std::string(parcel_name.asString());
gAssetStorage->storeAssetData(self->mTransactionID, LLAssetType::AT_TEXTURE,
&auction_j2c_upload_done,
(void*)j2c_name,
- FALSE);
+ false);
self->getWindow()->incBusyCount();
LLNotificationsUtil::add("UploadingAuctionSnapshot");
diff --git a/indra/newview/llfloaterauction.h b/indra/newview/llfloaterauction.h
index c83a11ba8b..04935c7c9e 100644
--- a/indra/newview/llfloaterauction.h
+++ b/indra/newview/llfloaterauction.h
@@ -47,8 +47,8 @@ class LLFloaterAuction : public LLFloater
friend class LLFloaterReg;
public:
// LLFloater interface
- /*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ void draw();
+ void onOpen(const LLSD& key) override;
+ void draw() override;
private:
@@ -63,7 +63,7 @@ private:
bool onSellToAnyoneConfirmed(const LLSD& notification, const LLSD& response); // Sell confirmation clicked
static void onClickStartAuction(void* data);
- /*virtual*/ BOOL postBuild();
+ bool postBuild() override;
void doResetParcel();
void doSellToAnyone();
diff --git a/indra/newview/llfloaterautoreplacesettings.cpp b/indra/newview/llfloaterautoreplacesettings.cpp
index 0964daa4d5..9b541f8f15 100644
--- a/indra/newview/llfloaterautoreplacesettings.cpp
+++ b/indra/newview/llfloaterautoreplacesettings.cpp
@@ -82,7 +82,7 @@ void LLFloaterAutoReplaceSettings::onClose(bool app_quitting)
cleanUp();
}
-BOOL LLFloaterAutoReplaceSettings::postBuild(void)
+bool LLFloaterAutoReplaceSettings::postBuild(void)
{
// get copies of the current settings that we will operate on
mEnabled = gSavedSettings.getBOOL("AutoReplace");
diff --git a/indra/newview/llfloaterautoreplacesettings.h b/indra/newview/llfloaterautoreplacesettings.h
index 2109aa7026..863b3610bc 100644
--- a/indra/newview/llfloaterautoreplacesettings.h
+++ b/indra/newview/llfloaterautoreplacesettings.h
@@ -40,10 +40,8 @@ class LLFloaterAutoReplaceSettings : public LLFloater
public:
LLFloaterAutoReplaceSettings(const LLSD& key);
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void onClose(bool app_quitting);
-
- void setData(void * data);
+ bool postBuild() override;
+ void onClose(bool app_quitting) override;
private:
diff --git a/indra/newview/llfloateravatar.cpp b/indra/newview/llfloateravatar.cpp
index f888d032ae..d76e6a2aa1 100644
--- a/indra/newview/llfloateravatar.cpp
+++ b/indra/newview/llfloateravatar.cpp
@@ -52,7 +52,7 @@ LLFloaterAvatar::~LLFloaterAvatar()
}
}
-BOOL LLFloaterAvatar::postBuild()
+bool LLFloaterAvatar::postBuild()
{
mAvatarPicker = findChild<LLMediaCtrl>("avatar_picker_contents");
if (mAvatarPicker)
@@ -60,7 +60,7 @@ BOOL LLFloaterAvatar::postBuild()
mAvatarPicker->clearCache();
}
enableResizeCtrls(true, true, false);
- return TRUE;
+ return true;
}
diff --git a/indra/newview/llfloateravatar.h b/indra/newview/llfloateravatar.h
index 76e9372709..30800dae2f 100644
--- a/indra/newview/llfloateravatar.h
+++ b/indra/newview/llfloateravatar.h
@@ -37,8 +37,8 @@ class LLFloaterAvatar:
friend class LLFloaterReg;
private:
LLFloaterAvatar(const LLSD& key);
- /*virtual*/ ~LLFloaterAvatar();
- /*virtual*/ BOOL postBuild();
+ ~LLFloaterAvatar();
+ bool postBuild() override;
LLMediaCtrl* mAvatarPicker;
};
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index 42ef41017a..5dd0388129 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -61,9 +61,9 @@ static const U32 AVATAR_PICKER_SEARCH_TIMEOUT = 180U;
static std::map<LLUUID, LLAvatarName> sAvatarNameMap;
LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(select_callback_t callback,
- BOOL allow_multiple,
- BOOL closeOnSelect,
- BOOL skip_agent,
+ bool allow_multiple,
+ bool closeOnSelect,
+ bool skip_agent,
const std::string& name,
LLView * frustumOrigin)
{
@@ -78,7 +78,7 @@ LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(select_callback_t callback,
floater->mSelectionCallback = callback;
floater->setAllowMultiple(allow_multiple);
- floater->mNearMeListComplete = FALSE;
+ floater->mNearMeListComplete = false;
floater->mCloseOnSelect = closeOnSelect;
floater->mExcludeAgentFromSearchResults = skip_agent;
@@ -103,9 +103,9 @@ LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(select_callback_t callback,
LLFloaterAvatarPicker::LLFloaterAvatarPicker(const LLSD& key)
: LLFloater(key),
mNumResultsReturned(0),
- mNearMeListComplete(FALSE),
- mCloseOnSelect(FALSE),
- mExcludeAgentFromSearchResults(FALSE),
+ mNearMeListComplete(false),
+ mCloseOnSelect(false),
+ mExcludeAgentFromSearchResults(false),
mContextConeOpacity (0.f),
mContextConeInAlpha(0.f),
mContextConeOutAlpha(0.f),
@@ -118,19 +118,19 @@ LLFloaterAvatarPicker::LLFloaterAvatarPicker(const LLSD& key)
mContextConeFadeTime = gSavedSettings.getF32("ContextConeFadeTime");
}
-BOOL LLFloaterAvatarPicker::postBuild()
+bool LLFloaterAvatarPicker::postBuild()
{
getChild<LLLineEditor>("Edit")->setKeystrokeCallback( boost::bind(&LLFloaterAvatarPicker::editKeystroke, this, _1, _2),NULL);
childSetAction("Find", boost::bind(&LLFloaterAvatarPicker::onBtnFind, this));
- getChildView("Find")->setEnabled(FALSE);
+ getChildView("Find")->setEnabled(false);
childSetAction("Refresh", boost::bind(&LLFloaterAvatarPicker::onBtnRefresh, this));
getChild<LLUICtrl>("near_me_range")->setCommitCallback(boost::bind(&LLFloaterAvatarPicker::onRangeAdjust, this));
LLScrollListCtrl* searchresults = getChild<LLScrollListCtrl>("SearchResults");
searchresults->setDoubleClickCallback( boost::bind(&LLFloaterAvatarPicker::onBtnSelect, this));
searchresults->setCommitCallback(boost::bind(&LLFloaterAvatarPicker::onList, this));
- getChildView("SearchResults")->setEnabled(FALSE);
+ getChildView("SearchResults")->setEnabled(false);
LLScrollListCtrl* nearme = getChild<LLScrollListCtrl>("NearMe");
nearme->setDoubleClickCallback(boost::bind(&LLFloaterAvatarPicker::onBtnSelect, this));
@@ -141,10 +141,10 @@ BOOL LLFloaterAvatarPicker::postBuild()
getChild<LLUICtrl>("Friends")->setCommitCallback(boost::bind(&LLFloaterAvatarPicker::onList, this));
childSetAction("ok_btn", boost::bind(&LLFloaterAvatarPicker::onBtnSelect, this));
- getChildView("ok_btn")->setEnabled(FALSE);
+ getChildView("ok_btn")->setEnabled(false);
childSetAction("cancel_btn", boost::bind(&LLFloaterAvatarPicker::onBtnClose, this));
- getChild<LLUICtrl>("Edit")->setFocus(TRUE);
+ getChild<LLUICtrl>("Edit")->setFocus(true);
LLPanel* search_panel = getChild<LLPanel>("SearchPanel");
if (search_panel)
@@ -158,13 +158,13 @@ BOOL LLFloaterAvatarPicker::postBuild()
getChild<LLTabContainer>("ResidentChooserTabs")->setCommitCallback(
boost::bind(&LLFloaterAvatarPicker::onTabChanged, this));
- setAllowMultiple(FALSE);
+ setAllowMultiple(false);
center();
populateFriend();
- return TRUE;
+ return true;
}
void LLFloaterAvatarPicker::setOkBtnEnableCb(validate_callback_t cb)
@@ -252,12 +252,12 @@ void LLFloaterAvatarPicker::onBtnSelect()
mSelectionCallback(avatar_ids, avatar_names);
}
}
- getChild<LLScrollListCtrl>("SearchResults")->deselectAllItems(TRUE);
- getChild<LLScrollListCtrl>("NearMe")->deselectAllItems(TRUE);
- getChild<LLScrollListCtrl>("Friends")->deselectAllItems(TRUE);
+ getChild<LLScrollListCtrl>("SearchResults")->deselectAllItems(true);
+ getChild<LLScrollListCtrl>("NearMe")->deselectAllItems(true);
+ getChild<LLScrollListCtrl>("Friends")->deselectAllItems(true);
if(mCloseOnSelect)
{
- mCloseOnSelect = FALSE;
+ mCloseOnSelect = false;
closeFloater();
}
}
@@ -266,7 +266,7 @@ void LLFloaterAvatarPicker::onBtnRefresh()
{
getChild<LLScrollListCtrl>("NearMe")->deleteAllItems();
getChild<LLScrollListCtrl>("NearMe")->setCommentText(getString("searching"));
- mNearMeListComplete = FALSE;
+ mNearMeListComplete = false;
}
void LLFloaterAvatarPicker::onBtnClose()
@@ -286,8 +286,8 @@ void LLFloaterAvatarPicker::onList()
void LLFloaterAvatarPicker::populateNearMe()
{
- BOOL all_loaded = TRUE;
- BOOL empty = TRUE;
+ bool all_loaded = true;
+ bool empty = true;
LLScrollListCtrl* near_me_scroller = getChild<LLScrollListCtrl>("NearMe");
near_me_scroller->deleteAllItems();
@@ -305,7 +305,7 @@ void LLFloaterAvatarPicker::populateNearMe()
{
element["columns"][0]["column"] = "name";
element["columns"][0]["value"] = LLCacheName::getDefaultName();
- all_loaded = FALSE;
+ all_loaded = false;
}
else
{
@@ -317,27 +317,27 @@ void LLFloaterAvatarPicker::populateNearMe()
sAvatarNameMap[av] = av_name;
}
near_me_scroller->addElement(element);
- empty = FALSE;
+ empty = false;
}
if (empty)
{
- getChildView("NearMe")->setEnabled(FALSE);
- getChildView("ok_btn")->setEnabled(FALSE);
+ getChildView("NearMe")->setEnabled(false);
+ getChildView("ok_btn")->setEnabled(false);
near_me_scroller->setCommentText(getString("no_one_near"));
}
else
{
- getChildView("NearMe")->setEnabled(TRUE);
- getChildView("ok_btn")->setEnabled(TRUE);
+ getChildView("NearMe")->setEnabled(true);
+ getChildView("ok_btn")->setEnabled(true);
near_me_scroller->selectFirstItem();
onList();
- near_me_scroller->setFocus(TRUE);
+ near_me_scroller->setFocus(true);
}
if (all_loaded)
{
- mNearMeListComplete = TRUE;
+ mNearMeListComplete = true;
}
}
@@ -357,7 +357,7 @@ void LLFloaterAvatarPicker::populateFriend()
{
friends_scroller->addStringUUIDItem(it->second, it->first);
}
- friends_scroller->sortByColumnIndex(0, TRUE);
+ friends_scroller->sortByColumnIndex(0, true);
}
void LLFloaterAvatarPicker::drawFrustum()
@@ -389,7 +389,7 @@ void LLFloaterAvatarPicker::draw()
}
}
-BOOL LLFloaterAvatarPicker::visibleItemsSelected() const
+bool LLFloaterAvatarPicker::visibleItemsSelected() const
{
LLPanel* active_panel = getChild<LLTabContainer>("ResidentChooserTabs")->getCurrentPanel();
@@ -405,7 +405,7 @@ BOOL LLFloaterAvatarPicker::visibleItemsSelected() const
{
return getChild<LLScrollListCtrl>("Friends")->getFirstSelectedIndex() >= 0;
}
- return FALSE;
+ return false;
}
/*static*/
@@ -505,11 +505,11 @@ void LLFloaterAvatarPicker::find()
getChild<LLScrollListCtrl>("SearchResults")->deleteAllItems();
getChild<LLScrollListCtrl>("SearchResults")->setCommentText(getString("searching"));
- getChildView("ok_btn")->setEnabled(FALSE);
+ getChildView("ok_btn")->setEnabled(false);
mNumResultsReturned = 0;
}
-void LLFloaterAvatarPicker::setAllowMultiple(BOOL allow_multiple)
+void LLFloaterAvatarPicker::setAllowMultiple(bool allow_multiple)
{
getChild<LLScrollListCtrl>("SearchResults")->setAllowMultipleSelection(allow_multiple);
getChild<LLScrollListCtrl>("NearMe")->setAllowMultipleSelection(allow_multiple);
@@ -540,8 +540,8 @@ LLScrollListCtrl* LLFloaterAvatarPicker::getActiveList()
return list;
}
-BOOL LLFloaterAvatarPicker::handleDragAndDrop(S32 x, S32 y, MASK mask,
- BOOL drop, EDragAndDropType cargo_type,
+bool LLFloaterAvatarPicker::handleDragAndDrop(S32 x, S32 y, MASK mask,
+ bool drop, EDragAndDropType cargo_type,
void *cargo_data, EAcceptance *accept,
std::string& tooltip_msg)
{
@@ -553,7 +553,7 @@ BOOL LLFloaterAvatarPicker::handleDragAndDrop(S32 x, S32 y, MASK mask,
if (localRectToOtherView(rc_point, &rc_list, list))
{
// Keep selected only one item
- list->deselectAllItems(TRUE);
+ list->deselectAllItems(true);
list->selectItemAt(rc_list.mLeft, rc_list.mBottom, mask);
LLScrollListItem* selection = list->getFirstSelected();
if (selection)
@@ -575,7 +575,7 @@ BOOL LLFloaterAvatarPicker::handleDragAndDrop(S32 x, S32 y, MASK mask,
}
}
*accept = ACCEPT_NO;
- return TRUE;
+ return true;
}
@@ -622,7 +622,7 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void*
search_results->deleteAllItems();
}
- BOOL found_one = FALSE;
+ bool found_one = false;
S32 num_new_rows = msg->getNumberOfBlocks("Data");
for (S32 i = 0; i < num_new_rows; i++)
{
@@ -638,14 +638,14 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void*
LLStringUtil::format_map_t map;
map["[TEXT]"] = floater->getChild<LLUICtrl>("Edit")->getValue().asString();
avatar_name = floater->getString("not_found", map);
- search_results->setEnabled(FALSE);
- floater->getChildView("ok_btn")->setEnabled(FALSE);
+ search_results->setEnabled(false);
+ floater->getChildView("ok_btn")->setEnabled(false);
}
else
{
avatar_name = LLCacheName::buildFullName(first_name, last_name);
- search_results->setEnabled(TRUE);
- found_one = TRUE;
+ search_results->setEnabled(true);
+ found_one = true;
LLAvatarName av_name;
av_name.fromString(avatar_name);
@@ -663,10 +663,10 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void*
if (found_one)
{
- floater->getChildView("ok_btn")->setEnabled(TRUE);
+ floater->getChildView("ok_btn")->setEnabled(true);
search_results->selectFirstItem();
floater->onList();
- search_results->setFocus(TRUE);
+ search_results->setFocus(true);
}
}
@@ -728,14 +728,14 @@ void LLFloaterAvatarPicker::processResponse(const LLUUID& query_id, const LLSD&
{
getChildView("ok_btn")->setEnabled(true);
search_results->setEnabled(true);
- search_results->sortByColumnIndex(1, TRUE);
+ search_results->sortByColumnIndex(1, true);
std::string text = getChild<LLUICtrl>("Edit")->getValue().asString();
- if (!search_results->selectItemByLabel(text, TRUE, 1))
+ if (!search_results->selectItemByLabel(text, true, 1))
{
search_results->selectFirstItem();
}
onList();
- search_results->setFocus(TRUE);
+ search_results->setFocus(true);
}
}
}
@@ -747,7 +747,7 @@ void LLFloaterAvatarPicker::editKeystroke(LLLineEditor* caller, void* user_data)
}
// virtual
-BOOL LLFloaterAvatarPicker::handleKeyHere(KEY key, MASK mask)
+bool LLFloaterAvatarPicker::handleKeyHere(KEY key, MASK mask)
{
if (key == KEY_RETURN && mask == MASK_NONE)
{
@@ -759,12 +759,12 @@ BOOL LLFloaterAvatarPicker::handleKeyHere(KEY key, MASK mask)
{
onBtnSelect();
}
- return TRUE;
+ return true;
}
else if (key == KEY_ESCAPE && mask == MASK_NONE)
{
closeFloater();
- return TRUE;
+ return true;
}
return LLFloater::handleKeyHere(key, mask);
diff --git a/indra/newview/llfloateravatarpicker.h b/indra/newview/llfloateravatarpicker.h
index fbee61b054..4a65481e5f 100644
--- a/indra/newview/llfloateravatarpicker.h
+++ b/indra/newview/llfloateravatarpicker.h
@@ -46,29 +46,29 @@ public:
typedef boost::function<void (const uuid_vec_t&, const std::vector<LLAvatarName>&)> select_callback_t;
// Call this to select an avatar.
static LLFloaterAvatarPicker* show(select_callback_t callback,
- BOOL allow_multiple = FALSE,
- BOOL closeOnSelect = FALSE,
- BOOL skip_agent = FALSE,
+ bool allow_multiple = false,
+ bool closeOnSelect = false,
+ bool skip_agent = false,
const std::string& name = "",
LLView * frustumOrigin = NULL);
LLFloaterAvatarPicker(const LLSD& key);
virtual ~LLFloaterAvatarPicker();
- virtual BOOL postBuild();
+ virtual bool postBuild();
void setOkBtnEnableCb(validate_callback_t cb);
static void processAvatarPickerReply(class LLMessageSystem* msg, void**);
void processResponse(const LLUUID& query_id, const LLSD& content);
- BOOL handleDragAndDrop(S32 x, S32 y, MASK mask,
- BOOL drop, EDragAndDropType cargo_type,
+ bool handleDragAndDrop(S32 x, S32 y, MASK mask,
+ bool drop, EDragAndDropType cargo_type,
void *cargo_data, EAcceptance *accept,
std::string& tooltip_msg);
void openFriendsTab();
- BOOL isExcludeAgentFromSearchResults() {return mExcludeAgentFromSearchResults;}
+ bool isExcludeAgentFromSearchResults() {return mExcludeAgentFromSearchResults;}
private:
void editKeystroke(class LLLineEditor* caller, void* user_data);
@@ -84,22 +84,22 @@ private:
void populateNearMe();
void populateFriend();
- BOOL visibleItemsSelected() const; // Returns true if any items in the current tab are selected.
+ bool visibleItemsSelected() const; // Returns true if any items in the current tab are selected.
static void findCoro(std::string url, LLUUID mQueryID, std::string mName);
void find();
- void setAllowMultiple(BOOL allow_multiple);
+ void setAllowMultiple(bool allow_multiple);
LLScrollListCtrl* getActiveList();
void drawFrustum();
virtual void draw();
- virtual BOOL handleKeyHere(KEY key, MASK mask);
+ virtual bool handleKeyHere(KEY key, MASK mask);
LLUUID mQueryID;
int mNumResultsReturned;
- BOOL mNearMeListComplete;
- BOOL mCloseOnSelect;
- BOOL mExcludeAgentFromSearchResults;
+ bool mNearMeListComplete;
+ bool mCloseOnSelect;
+ bool mExcludeAgentFromSearchResults;
LLHandle <LLView> mFrustumOrigin;
F32 mContextConeOpacity;
F32 mContextConeInAlpha;
diff --git a/indra/newview/llfloateravatarrendersettings.cpp b/indra/newview/llfloateravatarrendersettings.cpp
index 7d098e6c88..7c35444930 100644
--- a/indra/newview/llfloateravatarrendersettings.cpp
+++ b/indra/newview/llfloateravatarrendersettings.cpp
@@ -84,13 +84,13 @@ LLFloaterAvatarRenderSettings::~LLFloaterAvatarRenderSettings()
LLRenderMuteList::getInstance()->removeObserver(&sAvatarRenderMuteListObserver);
}
-BOOL LLFloaterAvatarRenderSettings::postBuild()
+bool LLFloaterAvatarRenderSettings::postBuild()
{
LLFloater::postBuild();
mAvatarSettingsList = getChild<LLNameListCtrl>("render_settings_list");
mAvatarSettingsList->setRightMouseDownCallback(boost::bind(&LLFloaterAvatarRenderSettings::onAvatarListRightClick, this, _1, _2, _3));
- return TRUE;
+ return true;
}
void LLFloaterAvatarRenderSettings::draw()
@@ -224,10 +224,10 @@ void LLFloaterAvatarRenderSettings::onClickAdd(const LLSD& userdata)
visual_setting = S32(LLVOAvatar::AV_ALWAYS_RENDER);
}
- LLView * button = findChild<LLButton>("plus_btn", TRUE);
+ LLView * button = findChild<LLButton>("plus_btn", true);
LLFloater* root_floater = gFloaterView->getParentFloater(this);
LLFloaterAvatarPicker * picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterAvatarRenderSettings::callbackAvatarPicked, this, _1, visual_setting),
- FALSE, TRUE, FALSE, root_floater->getName(), button);
+ false, true, false, root_floater->getName(), button);
if (root_floater)
{
@@ -259,14 +259,14 @@ void LLFloaterAvatarRenderSettings::setAvatarRenderSetting(const LLUUID& av_id,
}
}
-BOOL LLFloaterAvatarRenderSettings::handleKeyHere(KEY key, MASK mask )
+bool LLFloaterAvatarRenderSettings::handleKeyHere(KEY key, MASK mask )
{
- BOOL handled = FALSE;
+ bool handled = false;
if (KEY_DELETE == key)
{
setAvatarRenderSetting(mAvatarSettingsList->getCurrentID(), (S32)LLVOAvatar::AV_RENDER_NORMALLY);
- handled = TRUE;
+ handled = true;
}
return handled;
}
diff --git a/indra/newview/llfloateravatarrendersettings.h b/indra/newview/llfloateravatarrendersettings.h
index 2e0a844afd..962a810f2d 100644
--- a/indra/newview/llfloateravatarrendersettings.h
+++ b/indra/newview/llfloateravatarrendersettings.h
@@ -40,10 +40,10 @@ public:
LLFloaterAvatarRenderSettings(const LLSD& key);
virtual ~LLFloaterAvatarRenderSettings();
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ void draw();
- /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask );
+ bool postBuild() override;
+ void onOpen(const LLSD& key) override;
+ void draw() override;
+ bool handleKeyHere(KEY key, MASK mask) override;
void onAvatarListRightClick(LLUICtrl* ctrl, S32 x, S32 y);
@@ -59,7 +59,6 @@ public:
private:
void callbackAvatarPicked(const uuid_vec_t& ids, S32 visual_setting);
- void removePicker();
bool mNeedsUpdate;
LLListContextMenu* mContextMenu;
diff --git a/indra/newview/llfloateravatartextures.cpp b/indra/newview/llfloateravatartextures.cpp
index ebb73fc1f7..895cd2a79e 100644
--- a/indra/newview/llfloateravatartextures.cpp
+++ b/indra/newview/llfloateravatartextures.cpp
@@ -51,7 +51,7 @@ LLFloaterAvatarTextures::~LLFloaterAvatarTextures()
{
}
-BOOL LLFloaterAvatarTextures::postBuild()
+bool LLFloaterAvatarTextures::postBuild()
{
for (U32 i=0; i < TEX_NUM_INDICES; i++)
{
@@ -63,7 +63,7 @@ BOOL LLFloaterAvatarTextures::postBuild()
childSetAction("Dump", onClickDump, this);
refresh();
- return TRUE;
+ return true;
}
void LLFloaterAvatarTextures::draw()
diff --git a/indra/newview/llfloateravatartextures.h b/indra/newview/llfloateravatartextures.h
index 02474a10e1..a9502f400c 100644
--- a/indra/newview/llfloateravatartextures.h
+++ b/indra/newview/llfloateravatartextures.h
@@ -40,10 +40,10 @@ public:
LLFloaterAvatarTextures(const LLSD& id);
virtual ~LLFloaterAvatarTextures();
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void draw();
+ bool postBuild() override;
+ void draw() override;
- void refresh();
+ void refresh() override;
private:
static void onClickDump(void*);
diff --git a/indra/newview/llfloaterbanduration.cpp b/indra/newview/llfloaterbanduration.cpp
index 6ba6c30cab..c9141322e3 100644
--- a/indra/newview/llfloaterbanduration.cpp
+++ b/indra/newview/llfloaterbanduration.cpp
@@ -35,16 +35,16 @@ LLFloaterBanDuration::LLFloaterBanDuration(const LLSD& target)
{
}
-BOOL LLFloaterBanDuration::postBuild()
+bool LLFloaterBanDuration::postBuild()
{
childSetAction("ok_btn", boost::bind(&LLFloaterBanDuration::onClickBan, this));
childSetAction("cancel_btn", boost::bind(&LLFloaterBanDuration::onClickCancel, this));
getChild<LLUICtrl>("ban_duration_radio")->setCommitCallback(boost::bind(&LLFloaterBanDuration::onClickRadio, this));
getChild<LLRadioGroup>("ban_duration_radio")->setSelectedIndex(0);
- getChild<LLUICtrl>("ban_hours")->setEnabled(FALSE);
+ getChild<LLUICtrl>("ban_hours")->setEnabled(false);
- return TRUE;
+ return true;
}
LLFloaterBanDuration* LLFloaterBanDuration::show(select_callback_t callback, uuid_vec_t ids)
diff --git a/indra/newview/llfloaterbanduration.h b/indra/newview/llfloaterbanduration.h
index e8ec7cc669..4793b524f7 100644
--- a/indra/newview/llfloaterbanduration.h
+++ b/indra/newview/llfloaterbanduration.h
@@ -35,7 +35,7 @@ class LLFloaterBanDuration : public LLFloater
public:
LLFloaterBanDuration(const LLSD& target);
- BOOL postBuild();
+ bool postBuild() override;
static LLFloaterBanDuration* show(select_callback_t callback, uuid_vec_t id);
private:
diff --git a/indra/newview/llfloaterbeacons.cpp b/indra/newview/llfloaterbeacons.cpp
index cf38a00499..de3648908f 100644
--- a/indra/newview/llfloaterbeacons.cpp
+++ b/indra/newview/llfloaterbeacons.cpp
@@ -52,9 +52,9 @@ LLFloaterBeacons::LLFloaterBeacons(const LLSD& seed)
mCommitCallbackRegistrar.add("Beacons.UICheck", boost::bind(&LLFloaterBeacons::onClickUICheck, this,_1));
}
-BOOL LLFloaterBeacons::postBuild()
+bool LLFloaterBeacons::postBuild()
{
- return TRUE;
+ return true;
}
// Callback attached to each check box control to both affect their main purpose
@@ -73,10 +73,10 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl)
LLPipeline::getRenderScriptedBeacons() )
{
LLPipeline::setRenderScriptedBeacons(false);
- getChild<LLCheckBoxCtrl>("scripted")->setControlValue(LLSD(FALSE));
- getChild<LLCheckBoxCtrl>("scripted")->setValue(FALSE);
- getChild<LLCheckBoxCtrl>("touch_only")->setControlValue(LLSD(TRUE)); // just to be sure it's in sync with llpipeline
- getChild<LLCheckBoxCtrl>("touch_only")->setValue(TRUE);
+ getChild<LLCheckBoxCtrl>("scripted")->setControlValue(LLSD(false));
+ getChild<LLCheckBoxCtrl>("scripted")->setValue(false);
+ getChild<LLCheckBoxCtrl>("touch_only")->setControlValue(LLSD(true)); // just to be sure it's in sync with llpipeline
+ getChild<LLCheckBoxCtrl>("touch_only")->setValue(true);
}
}
else if(name == "scripted")
@@ -88,10 +88,10 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl)
LLPipeline::getRenderScriptedBeacons() )
{
LLPipeline::setRenderScriptedTouchBeacons(false);
- getChild<LLCheckBoxCtrl>("touch_only")->setControlValue(LLSD(FALSE));
- getChild<LLCheckBoxCtrl>("touch_only")->setValue(FALSE);
- getChild<LLCheckBoxCtrl>("scripted")->setControlValue(LLSD(TRUE)); // just to be sure it's in sync with llpipeline
- getChild<LLCheckBoxCtrl>("scripted")->setValue(TRUE);
+ getChild<LLCheckBoxCtrl>("touch_only")->setControlValue(LLSD(false));
+ getChild<LLCheckBoxCtrl>("touch_only")->setValue(false);
+ getChild<LLCheckBoxCtrl>("scripted")->setControlValue(LLSD(true)); // just to be sure it's in sync with llpipeline
+ getChild<LLCheckBoxCtrl>("scripted")->setValue(true);
}
}
else if(name == "physical") LLPipeline::setRenderPhysicalBeacons(check->get());
@@ -107,10 +107,10 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl)
!LLPipeline::getRenderHighlights() )
{
LLPipeline::setRenderBeacons(true);
- getChild<LLCheckBoxCtrl>("beacons")->setControlValue(LLSD(TRUE));
- getChild<LLCheckBoxCtrl>("beacons")->setValue(TRUE);
- getChild<LLCheckBoxCtrl>("highlights")->setControlValue(LLSD(FALSE)); // just to be sure it's in sync with llpipeline
- getChild<LLCheckBoxCtrl>("highlights")->setValue(FALSE);
+ getChild<LLCheckBoxCtrl>("beacons")->setControlValue(LLSD(true));
+ getChild<LLCheckBoxCtrl>("beacons")->setValue(true);
+ getChild<LLCheckBoxCtrl>("highlights")->setControlValue(LLSD(false)); // just to be sure it's in sync with llpipeline
+ getChild<LLCheckBoxCtrl>("highlights")->setValue(false);
}
}
else if(name == "beacons")
@@ -122,10 +122,10 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl)
!LLPipeline::getRenderHighlights() )
{
LLPipeline::setRenderHighlights(true);
- getChild<LLCheckBoxCtrl>("highlights")->setControlValue(LLSD(TRUE));
- getChild<LLCheckBoxCtrl>("highlights")->setValue(TRUE);
- getChild<LLCheckBoxCtrl>("beacons")->setControlValue(LLSD(FALSE)); // just to be sure it's in sync with llpipeline
- getChild<LLCheckBoxCtrl>("beacons")->setValue(FALSE);
+ getChild<LLCheckBoxCtrl>("highlights")->setControlValue(LLSD(true));
+ getChild<LLCheckBoxCtrl>("highlights")->setValue(true);
+ getChild<LLCheckBoxCtrl>("beacons")->setControlValue(LLSD(false)); // just to be sure it's in sync with llpipeline
+ getChild<LLCheckBoxCtrl>("beacons")->setValue(false);
}
}
}
diff --git a/indra/newview/llfloaterbeacons.h b/indra/newview/llfloaterbeacons.h
index 47d0696296..d83085a913 100644
--- a/indra/newview/llfloaterbeacons.h
+++ b/indra/newview/llfloaterbeacons.h
@@ -36,7 +36,7 @@ class LLFloaterBeacons : public LLFloater
public:
- /*virtual*/ BOOL postBuild();
+ bool postBuild() override;
// Needed to make the floater visibility toggle the beacons.
// Too bad we can't just add control_name="BeaconAlwaysOn" to the XML.
diff --git a/indra/newview/llfloaterbigpreview.cpp b/indra/newview/llfloaterbigpreview.cpp
index b516e9dd01..63439c816b 100644
--- a/indra/newview/llfloaterbigpreview.cpp
+++ b/indra/newview/llfloaterbigpreview.cpp
@@ -61,7 +61,7 @@ void LLFloaterBigPreview::closeOnFloaterOwnerClosing(LLFloater* floaterp)
}
}
-BOOL LLFloaterBigPreview::postBuild()
+bool LLFloaterBigPreview::postBuild()
{
mPreviewPlaceholder = getChild<LLUICtrl>("big_preview_placeholder");
return LLFloater::postBuild();
diff --git a/indra/newview/llfloaterbigpreview.h b/indra/newview/llfloaterbigpreview.h
index 513ed8da6e..03a8699f3d 100644
--- a/indra/newview/llfloaterbigpreview.h
+++ b/indra/newview/llfloaterbigpreview.h
@@ -35,7 +35,7 @@ public:
LLFloaterBigPreview(const LLSD& key);
~LLFloaterBigPreview();
- BOOL postBuild();
+ bool postBuild();
void draw();
void onCancel();
diff --git a/indra/newview/llfloaterbuildoptions.cpp b/indra/newview/llfloaterbuildoptions.cpp
index 1b65d8d683..9eef704d65 100644
--- a/indra/newview/llfloaterbuildoptions.cpp
+++ b/indra/newview/llfloaterbuildoptions.cpp
@@ -49,9 +49,9 @@ LLFloaterBuildOptions::LLFloaterBuildOptions(const LLSD& key)
LLFloaterBuildOptions::~LLFloaterBuildOptions()
{}
-BOOL LLFloaterBuildOptions::postBuild()
+bool LLFloaterBuildOptions::postBuild()
{
- return TRUE;
+ return true;
}
// virtual
@@ -63,5 +63,5 @@ void LLFloaterBuildOptions::onOpen(const LLSD& key)
// virtual
void LLFloaterBuildOptions::onClose(bool app_quitting)
{
- mObjectSelection = NULL;
+ mObjectSelection = nullptr;
}
diff --git a/indra/newview/llfloaterbuildoptions.h b/indra/newview/llfloaterbuildoptions.h
index 02c56cb6a9..b21a0117a3 100644
--- a/indra/newview/llfloaterbuildoptions.h
+++ b/indra/newview/llfloaterbuildoptions.h
@@ -43,10 +43,10 @@ class LLFloaterBuildOptions
: public LLFloater
{
public:
- virtual BOOL postBuild();
+ bool postBuild() override;
- /*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ void onClose(bool app_quitting);
+ void onOpen(const LLSD& key) override;
+ void onClose(bool app_quitting) override;
private:
friend class LLFloaterReg;
diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp
index abc9cdbcc2..10478d6bcb 100644
--- a/indra/newview/llfloaterbulkpermission.cpp
+++ b/indra/newview/llfloaterbulkpermission.cpp
@@ -53,7 +53,7 @@
LLFloaterBulkPermission::LLFloaterBulkPermission(const LLSD& seed)
: LLFloater(seed),
- mDone(FALSE)
+ mDone(false)
{
mID.generate();
mCommitCallbackRegistrar.add("BulkPermission.Ok", boost::bind(&LLFloaterBulkPermission::onOkBtn, this));
@@ -64,7 +64,7 @@ LLFloaterBulkPermission::LLFloaterBulkPermission(const LLSD& seed)
mCommitCallbackRegistrar.add("BulkPermission.CommitCopy", boost::bind(&LLFloaterBulkPermission::onCommitCopy, this));
}
-BOOL LLFloaterBulkPermission::postBuild()
+bool LLFloaterBulkPermission::postBuild()
{
mBulkChangeIncludeAnimations = gSavedSettings.getBOOL("BulkChangeIncludeAnimations");
mBulkChangeIncludeBodyParts = gSavedSettings.getBOOL("BulkChangeIncludeBodyParts");
@@ -89,7 +89,7 @@ BOOL LLFloaterBulkPermission::postBuild()
{
mBulkChangeNextOwnerTransfer = true;
}
- return TRUE;
+ return true;
}
void LLFloaterBulkPermission::doApply()
@@ -120,7 +120,7 @@ void LLFloaterBulkPermission::doApply()
}
else
{
- mDone = FALSE;
+ mDone = false;
if (!start())
{
LL_WARNS() << "Unexpected bulk permission change failure." << LL_ENDL;
@@ -204,16 +204,16 @@ void LLFloaterBulkPermission::onCloseBtn()
void LLFloaterBulkPermission::onCommitCopy()
{
// Implements fair use
- BOOL copyable = gSavedSettings.getBOOL("BulkChangeNextOwnerCopy");
+ bool copyable = gSavedSettings.getBOOL("BulkChangeNextOwnerCopy");
if(!copyable)
{
- gSavedSettings.setBOOL("BulkChangeNextOwnerTransfer", TRUE);
+ gSavedSettings.setBOOL("BulkChangeNextOwnerTransfer", true);
}
LLCheckBoxCtrl* xfer =getChild<LLCheckBoxCtrl>("next_owner_transfer");
xfer->setEnabled(copyable);
}
-BOOL LLFloaterBulkPermission::start()
+bool LLFloaterBulkPermission::start()
{
// note: number of top-level objects to modify is mObjectIDs.size().
getChild<LLScrollListCtrl>("queue output")->setCommentText(getString("start_text"));
@@ -221,10 +221,10 @@ BOOL LLFloaterBulkPermission::start()
}
// Go to the next object and start if found. Returns false if no objects left, true otherwise.
-BOOL LLFloaterBulkPermission::nextObject()
+bool LLFloaterBulkPermission::nextObject()
{
S32 count;
- BOOL successful_start = FALSE;
+ bool successful_start = false;
do
{
count = mObjectIDs.size();
@@ -240,17 +240,17 @@ BOOL LLFloaterBulkPermission::nextObject()
if(isDone() && !mDone)
{
getChild<LLScrollListCtrl>("queue output")->setCommentText(getString("done_text"));
- mDone = TRUE;
+ mDone = true;
}
return successful_start;
}
// Pop the top object off of the queue.
-// Return TRUE if the queue has started, otherwise FALSE.
-BOOL LLFloaterBulkPermission::popNext()
+// Return true if the queue has started, otherwise false.
+bool LLFloaterBulkPermission::popNext()
{
// get the head element from the container, and attempt to get its inventory.
- BOOL rv = FALSE;
+ bool rv = false;
S32 count = mObjectIDs.size();
if(mCurrentObjectID.isNull() && (count > 0))
{
@@ -264,7 +264,7 @@ BOOL LLFloaterBulkPermission::popNext()
LLUUID* id = new LLUUID(mID);
registerVOInventoryListener(obj,id);
requestVOInventory();
- rv = TRUE;
+ rv = true;
}
else
{
@@ -276,7 +276,7 @@ BOOL LLFloaterBulkPermission::popNext()
}
-void LLFloaterBulkPermission::doCheckUncheckAll(BOOL check)
+void LLFloaterBulkPermission::doCheckUncheckAll(bool check)
{
gSavedSettings.setBOOL("BulkChangeIncludeAnimations", check);
gSavedSettings.setBOOL("BulkChangeIncludeBodyParts" , check);
@@ -352,7 +352,7 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, LLInve
perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("BulkChange"));
perm.setMaskGroup(LLFloaterPerms::getGroupPerms("BulkChange"));
new_item->setPermissions(perm); // here's the beef
- updateInventory(object,new_item,TASK_INVENTORY_ITEM_KEY,FALSE);
+ updateInventory(object,new_item,TASK_INVENTORY_ITEM_KEY,false);
//status_text.setArg("[STATUS]", getString("status_ok_text"));
status_text.setArg("[STATUS]", "");
}
diff --git a/indra/newview/llfloaterbulkpermission.h b/indra/newview/llfloaterbulkpermission.h
index ab5d568667..c23327aa88 100644
--- a/indra/newview/llfloaterbulkpermission.h
+++ b/indra/newview/llfloaterbulkpermission.h
@@ -41,16 +41,16 @@ class LLFloaterBulkPermission : public LLFloater, public LLVOInventoryListener
friend class LLFloaterReg;
public:
- BOOL postBuild();
+ bool postBuild();
private:
LLFloaterBulkPermission(const LLSD& seed);
virtual ~LLFloaterBulkPermission() {}
- BOOL start(); // returns TRUE if the queue has started, otherwise FALSE.
- BOOL nextObject();
- BOOL popNext();
+ bool start(); // returns true if the queue has started, otherwise false.
+ bool nextObject();
+ bool popNext();
// This is the callback method for the viewer object currently
// being worked on.
@@ -73,15 +73,15 @@ private:
void onOkBtn();
void onApplyBtn();
void onCommitCopy();
- void onCheckAll() { doCheckUncheckAll(TRUE); }
- void onUncheckAll() { doCheckUncheckAll(FALSE); }
+ void onCheckAll() { doCheckUncheckAll(true); }
+ void onUncheckAll() { doCheckUncheckAll(false); }
// returns true if this is done
- BOOL isDone() const { return (mCurrentObjectID.isNull() || (mObjectIDs.size() == 0)); }
+ bool isDone() const { return (mCurrentObjectID.isNull() || (mObjectIDs.size() == 0)); }
//Read the settings and Apply the permissions
void doApply();
- void doCheckUncheckAll(BOOL check);
+ void doCheckUncheckAll(bool check);
private:
// UI
@@ -91,7 +91,7 @@ private:
// Object Queue
std::vector<LLUUID> mObjectIDs;
LLUUID mCurrentObjectID;
- BOOL mDone;
+ bool mDone;
bool mBulkChangeIncludeAnimations;
bool mBulkChangeIncludeBodyParts;
diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp
index 307ab8c4d1..707557d23d 100644
--- a/indra/newview/llfloaterbump.cpp
+++ b/indra/newview/llfloaterbump.cpp
@@ -77,7 +77,7 @@ LLFloaterBump::~LLFloaterBump()
}
}
-BOOL LLFloaterBump::postBuild()
+bool LLFloaterBump::postBuild()
{
mList = getChild<LLScrollListCtrl>("bump_list");
mList->setAllowMultipleSelection(false);
@@ -93,7 +93,7 @@ BOOL LLFloaterBump::postBuild()
menu->setItemVisible(std::string("Impostor seperator"), false);
}
- return TRUE;
+ return true;
}
// virtual
void LLFloaterBump::onOpen(const LLSD& key)
diff --git a/indra/newview/llfloaterbump.h b/indra/newview/llfloaterbump.h
index d2f9fabdd3..421d0b3f91 100644
--- a/indra/newview/llfloaterbump.h
+++ b/indra/newview/llfloaterbump.h
@@ -43,8 +43,8 @@ protected:
void onScrollListRightClicked(LLUICtrl* ctrl, S32 x, S32 y);
public:
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void onOpen(const LLSD& key);
+ bool postBuild() override;
+ void onOpen(const LLSD& key) override;
static LLFloaterBump* getInstance();
diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp
index ea93d3bfaa..0b7205a55b 100644
--- a/indra/newview/llfloaterbuy.cpp
+++ b/indra/newview/llfloaterbuy.cpp
@@ -54,10 +54,10 @@ LLFloaterBuy::LLFloaterBuy(const LLSD& key)
{
}
-BOOL LLFloaterBuy::postBuild()
+bool LLFloaterBuy::postBuild()
{
- getChildView("object_list")->setEnabled(FALSE);
- getChildView("item_list")->setEnabled(FALSE);
+ getChildView("object_list")->setEnabled(false);
+ getChildView("item_list")->setEnabled(false);
getChild<LLUICtrl>("cancel_btn")->setCommitCallback( boost::bind(&LLFloaterBuy::onClickCancel, this));
getChild<LLUICtrl>("buy_btn")->setCommitCallback( boost::bind(&LLFloaterBuy::onClickBuy, this));
@@ -70,12 +70,12 @@ BOOL LLFloaterBuy::postBuild()
// mid-session and the saved rect is off-center.
center();
- return TRUE;
+ return true;
}
LLFloaterBuy::~LLFloaterBuy()
{
- mObjectSelection = NULL;
+ mObjectSelection = nullptr;
}
void LLFloaterBuy::reset()
@@ -128,7 +128,7 @@ void LLFloaterBuy::show(const LLSaleInfo& sale_info)
LLUUID owner_id;
std::string owner_name;
- BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name);
+ bool owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name);
if (!owners_identical)
{
LLNotificationsUtil::add("BuyObjectOneOwner");
@@ -246,12 +246,12 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj,
LLSD row;
// Compute icon for this item
- BOOL item_is_multi = FALSE;
+ bool item_is_multi = false;
if (( inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED
|| inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS)
&& !(inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_SUBTYPE_MASK))
{
- item_is_multi = TRUE;
+ item_is_multi = true;
}
std::string icon_name = LLInventoryIcon::getIconName(inv_item->getType(),
diff --git a/indra/newview/llfloaterbuy.h b/indra/newview/llfloaterbuy.h
index e83b3c6ba6..fedbdce965 100644
--- a/indra/newview/llfloaterbuy.h
+++ b/indra/newview/llfloaterbuy.h
@@ -49,19 +49,18 @@ public:
LLFloaterBuy(const LLSD& key);
~LLFloaterBuy();
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void onClose(bool app_quitting);
+ bool postBuild() override;
+ void onClose(bool app_quitting) override;
static void show(const LLSaleInfo& sale_info);
protected:
void reset();
- void requestObjectInventories();
- /*virtual*/ void inventoryChanged(LLViewerObject* obj,
- LLInventoryObject::object_list_t* inv,
- S32 serial_num,
- void* data);
+ void inventoryChanged(LLViewerObject* obj,
+ LLInventoryObject::object_list_t* inv,
+ S32 serial_num,
+ void* data) override;
void onSelectionChanged();
void showViews(bool show);
diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp
index 440ec06c4e..ba9da863b4 100644
--- a/indra/newview/llfloaterbuycontents.cpp
+++ b/indra/newview/llfloaterbuycontents.cpp
@@ -57,15 +57,15 @@ LLFloaterBuyContents::LLFloaterBuyContents(const LLSD& key)
{
}
-BOOL LLFloaterBuyContents::postBuild()
+bool LLFloaterBuyContents::postBuild()
{
getChild<LLUICtrl>("cancel_btn")->setCommitCallback( boost::bind(&LLFloaterBuyContents::onClickCancel, this));
getChild<LLUICtrl>("buy_btn")->setCommitCallback( boost::bind(&LLFloaterBuyContents::onClickBuy, this));
- getChildView("item_list")->setEnabled(FALSE);
- getChildView("buy_btn")->setEnabled(FALSE);
- getChildView("wear_check")->setEnabled(FALSE);
+ getChildView("item_list")->setEnabled(false);
+ getChildView("buy_btn")->setEnabled(false);
+ getChildView("wear_check")->setEnabled(false);
setDefaultBtn("cancel_btn"); // to avoid accidental buy (SL-43130)
@@ -75,7 +75,7 @@ BOOL LLFloaterBuyContents::postBuild()
// mid-session and the saved rect is off-center.
center();
- return TRUE;
+ return true;
}
LLFloaterBuyContents::~LLFloaterBuyContents()
@@ -107,7 +107,7 @@ void LLFloaterBuyContents::show(const LLSaleInfo& sale_info)
LLUUID owner_id;
std::string owner_name;
- BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name);
+ bool owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name);
if (!owners_identical)
{
LLNotificationsUtil::add("BuyContentsOneOwner");
@@ -167,10 +167,10 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj,
// default to turning off the buy button.
LLView* buy_btn = getChildView("buy_btn");
- buy_btn->setEnabled(FALSE);
+ buy_btn->setEnabled(false);
LLUUID owner_id;
- BOOL is_group_owned;
+ bool is_group_owned;
LLAssetType::EType asset_type;
LLInventoryType::EType inv_type;
S32 wearable_count = 0;
@@ -208,17 +208,17 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj,
// There will be at least one item shown in the display, so go
// ahead and enable the buy button.
- buy_btn->setEnabled(TRUE);
+ buy_btn->setEnabled(true);
// Create the line in the list
LLSD row;
- BOOL item_is_multi = FALSE;
+ bool item_is_multi = false;
if ((inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED
|| inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS)
&& !(inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_SUBTYPE_MASK))
{
- item_is_multi = TRUE;
+ item_is_multi = true;
}
std::string icon_name = LLInventoryIcon::getIconName(inv_item->getType(),
@@ -256,7 +256,7 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj,
if (wearable_count > 0)
{
- getChildView("wear_check")->setEnabled(TRUE);
+ getChildView("wear_check")->setEnabled(true);
getChild<LLUICtrl>("wear_check")->setValue(LLSD(false) );
}
}
@@ -276,7 +276,7 @@ void LLFloaterBuyContents::onClickBuy()
// We may want to wear this item
if (getChild<LLUICtrl>("wear_check")->getValue())
{
- LLInventoryState::sWearNewClothing = TRUE;
+ LLInventoryState::sWearNewClothing = true;
}
// Put the items where we put new folders.
diff --git a/indra/newview/llfloaterbuycontents.h b/indra/newview/llfloaterbuycontents.h
index 19393fb6af..93d53a8a89 100644
--- a/indra/newview/llfloaterbuycontents.h
+++ b/indra/newview/llfloaterbuycontents.h
@@ -48,14 +48,13 @@ public:
LLFloaterBuyContents(const LLSD& key);
~LLFloaterBuyContents();
- /*virtual*/ BOOL postBuild();
+ bool postBuild() override;
protected:
- void requestObjectInventories();
- /*virtual*/ void inventoryChanged(LLViewerObject* obj,
- LLInventoryObject::object_list_t* inv,
- S32 serial_num,
- void* data);
+ void inventoryChanged(LLViewerObject* obj,
+ LLInventoryObject::object_list_t* inv,
+ S32 serial_num,
+ void* data) override;
void onClickBuy();
void onClickCancel();
diff --git a/indra/newview/llfloaterbuycurrency.cpp b/indra/newview/llfloaterbuycurrency.cpp
index 0cfac166c7..7717c7c437 100644
--- a/indra/newview/llfloaterbuycurrency.cpp
+++ b/indra/newview/llfloaterbuycurrency.cpp
@@ -66,13 +66,13 @@ public:
void noTarget();
void target(const std::string& name, S32 price);
- virtual BOOL postBuild();
+ virtual bool postBuild();
void updateUI();
void collapsePanels(bool collapse);
virtual void draw();
- virtual BOOL canClose();
+ virtual bool canClose();
void onClickBuy();
void onClickCancel();
@@ -135,7 +135,7 @@ void LLFloaterBuyCurrencyUI::target(const std::string& name, S32 price)
// virtual
-BOOL LLFloaterBuyCurrencyUI::postBuild()
+bool LLFloaterBuyCurrencyUI::postBuild()
{
mManager.prepare();
@@ -146,7 +146,7 @@ BOOL LLFloaterBuyCurrencyUI::postBuild()
updateUI();
- return TRUE;
+ return true;
}
void LLFloaterBuyCurrencyUI::draw()
@@ -169,7 +169,7 @@ void LLFloaterBuyCurrencyUI::draw()
LLFloater::draw();
}
-BOOL LLFloaterBuyCurrencyUI::canClose()
+bool LLFloaterBuyCurrencyUI::canClose()
{
return mManager.canCancel();
}
@@ -180,11 +180,11 @@ void LLFloaterBuyCurrencyUI::updateUI()
mManager.updateUI(!hasError && !mManager.buying());
// hide most widgets - we'll turn them on as needed next
- getChildView("info_buying")->setVisible(FALSE);
- getChildView("info_need_more")->setVisible(FALSE);
- getChildView("purchase_warning_repurchase")->setVisible(FALSE);
- getChildView("purchase_warning_notenough")->setVisible(FALSE);
- getChildView("contacting")->setVisible(FALSE);
+ getChildView("info_buying")->setVisible(false);
+ getChildView("info_need_more")->setVisible(false);
+ getChildView("purchase_warning_repurchase")->setVisible(false);
+ getChildView("purchase_warning_notenough")->setVisible(false);
+ getChildView("contacting")->setVisible(false);
if (hasError)
{
@@ -199,15 +199,15 @@ void LLFloaterBuyCurrencyUI::updateUI()
else
{
// display the main Buy L$ interface
- getChildView("normal_background")->setVisible(TRUE);
+ getChildView("normal_background")->setVisible(true);
if (mHasTarget)
{
- getChildView("info_need_more")->setVisible(TRUE);
+ getChildView("info_need_more")->setVisible(true);
}
else
{
- getChildView("info_buying")->setVisible(TRUE);
+ getChildView("info_buying")->setVisible(true);
}
if (mManager.buying())
@@ -224,18 +224,18 @@ void LLFloaterBuyCurrencyUI::updateUI()
}
S32 balance = gStatusBar->getBalance();
- getChildView("balance_label")->setVisible(TRUE);
- getChildView("balance_amount")->setVisible(TRUE);
+ getChildView("balance_label")->setVisible(true);
+ getChildView("balance_amount")->setVisible(true);
getChild<LLUICtrl>("balance_amount")->setTextArg("[AMT]", llformat("%d", balance));
S32 buying = mManager.getAmount();
- getChildView("buying_label")->setVisible(TRUE);
- getChildView("buying_amount")->setVisible(TRUE);
+ getChildView("buying_label")->setVisible(true);
+ getChildView("buying_amount")->setVisible(true);
getChild<LLUICtrl>("buying_amount")->setTextArg("[AMT]", llformat("%d", buying));
S32 total = balance + buying;
- getChildView("total_label")->setVisible(TRUE);
- getChildView("total_amount")->setVisible(TRUE);
+ getChildView("total_label")->setVisible(true);
+ getChildView("total_amount")->setVisible(true);
getChild<LLUICtrl>("total_amount")->setTextArg("[AMT]", llformat("%d", total));
if (mHasTarget)
diff --git a/indra/newview/llfloaterbuycurrencyhtml.cpp b/indra/newview/llfloaterbuycurrencyhtml.cpp
index a69aa8d227..07d21df179 100644
--- a/indra/newview/llfloaterbuycurrencyhtml.cpp
+++ b/indra/newview/llfloaterbuycurrencyhtml.cpp
@@ -42,13 +42,13 @@ LLFloaterBuyCurrencyHTML::LLFloaterBuyCurrencyHTML( const LLSD& key ):
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLFloaterBuyCurrencyHTML::postBuild()
+bool LLFloaterBuyCurrencyHTML::postBuild()
{
// observer media events
mBrowser = getChild<LLMediaCtrl>( "browser" );
mBrowser->addObserver( this );
- return TRUE;
+ return true;
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llfloaterbuycurrencyhtml.h b/indra/newview/llfloaterbuycurrencyhtml.h
index 6b1fc53f1f..53532d6265 100644
--- a/indra/newview/llfloaterbuycurrencyhtml.h
+++ b/indra/newview/llfloaterbuycurrencyhtml.h
@@ -37,7 +37,7 @@ class LLFloaterBuyCurrencyHTML :
public:
LLFloaterBuyCurrencyHTML( const LLSD& key );
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onClose( bool app_quitting );
// inherited from LLViewerMediaObserver
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp
index 464e7ff4a2..63157058b8 100644
--- a/indra/newview/llfloaterbuyland.cpp
+++ b/indra/newview/llfloaterbuyland.cpp
@@ -187,7 +187,7 @@ public:
void tellUserError(const std::string& message, const std::string& uri);
- virtual BOOL postBuild();
+ virtual bool postBuild();
void startBuyPreConfirm();
void startBuyPostConfirm(const std::string& password);
@@ -197,7 +197,7 @@ public:
void onClickErrorWeb();
virtual void draw();
- virtual BOOL canClose();
+ virtual bool canClose();
void onVisibilityChanged ( const LLSD& new_visibility );
@@ -306,7 +306,7 @@ void LLFloaterBuyLandUI::onClose(bool app_quitting)
// This object holds onto observer, transactions, and parcel state.
// Despite being single_instance, destroy it to call destructors and clean
// everything up.
- setVisible(FALSE);
+ setVisible(false);
destroy();
}
@@ -569,7 +569,7 @@ void LLFloaterBuyLandUI::updateCovenantInfo()
LLTextBox* box = getChild<LLTextBox>("covenant_text");
if(box)
{
- box->setVisible(FALSE);
+ box->setVisible(false);
}
// send EstateCovenantInfo message
@@ -605,14 +605,14 @@ void LLFloaterBuyLandUI::updateFloaterCovenantText(const std::string &string, co
refreshUI();
// remove the line stating that you must agree
- box->setVisible(FALSE);
+ box->setVisible(false);
}
else
{
check->setEnabled(true);
// remove the line stating that you must agree
- box->setVisible(TRUE);
+ box->setVisible(true);
}
}
@@ -733,7 +733,7 @@ void LLFloaterBuyLandUI::runWebSitePrep(const std::string& password)
return;
}
- BOOL remove_contribution = getChild<LLUICtrl>("remove_contribution")->getValue().asBoolean();
+ bool remove_contribution = getChild<LLUICtrl>("remove_contribution")->getValue().asBoolean();
mParcelBuyInfo = LLViewerParcelMgr::getInstance()->setupParcelBuy(gAgent.getID(), gAgent.getSessionID(),
gAgent.getGroupID(), mIsForGroup, mIsClaim, remove_contribution);
@@ -929,7 +929,7 @@ void LLFloaterBuyLandUI::tellUserError(
// virtual
-BOOL LLFloaterBuyLandUI::postBuild()
+bool LLFloaterBuyLandUI::postBuild()
{
setVisibleCallback(boost::bind(&LLFloaterBuyLandUI::onVisibilityChanged, this, _2));
@@ -941,7 +941,7 @@ BOOL LLFloaterBuyLandUI::postBuild()
center();
- return TRUE;
+ return true;
}
void LLFloaterBuyLandUI::setParcel(LLViewerRegion* region, LLParcelSelectionHandle parcel)
@@ -994,7 +994,7 @@ void LLFloaterBuyLandUI::draw()
}
// virtual
-BOOL LLFloaterBuyLandUI::canClose()
+bool LLFloaterBuyLandUI::canClose()
{
// mTransactionType check for pre-buy estimation stage and mCurrency to allow exit after transaction
bool can_close = !mTransaction && (mTransactionType != TransactionBuy || mCurrency.canCancel());
@@ -1097,9 +1097,9 @@ void LLFloaterBuyLandUI::refreshUI()
}
else
{
- getChildView("step_error")->setVisible(FALSE);
- getChildView("error_message")->setVisible(FALSE);
- getChildView("error_web")->setVisible(FALSE);
+ getChildView("step_error")->setVisible(false);
+ getChildView("error_message")->setVisible(false);
+ getChildView("error_web")->setVisible(false);
}
@@ -1134,16 +1134,16 @@ void LLFloaterBuyLandUI::refreshUI()
levels->setCurrentByIndex(mUserPlanChoice);
}
- getChildView("step_1")->setVisible(TRUE);
- getChildView("account_action")->setVisible(TRUE);
- getChildView("account_reason")->setVisible(TRUE);
+ getChildView("step_1")->setVisible(true);
+ getChildView("account_action")->setVisible(true);
+ getChildView("account_reason")->setVisible(true);
}
else
{
- getChildView("step_1")->setVisible(FALSE);
- getChildView("account_action")->setVisible(FALSE);
- getChildView("account_reason")->setVisible(FALSE);
- getChildView("account_level")->setVisible(FALSE);
+ getChildView("step_1")->setVisible(false);
+ getChildView("account_action")->setVisible(false);
+ getChildView("account_reason")->setVisible(false);
+ getChildView("account_level")->setVisible(false);
}
// section two: land use fees
@@ -1201,15 +1201,15 @@ void LLFloaterBuyLandUI::refreshUI()
getChild<LLUICtrl>("land_use_reason")->setValue(message);
- getChildView("step_2")->setVisible(TRUE);
- getChildView("land_use_action")->setVisible(TRUE);
- getChildView("land_use_reason")->setVisible(TRUE);
+ getChildView("step_2")->setVisible(true);
+ getChildView("land_use_action")->setVisible(true);
+ getChildView("land_use_reason")->setVisible(true);
}
else
{
- getChildView("step_2")->setVisible(FALSE);
- getChildView("land_use_action")->setVisible(FALSE);
- getChildView("land_use_reason")->setVisible(FALSE);
+ getChildView("step_2")->setVisible(false);
+ getChildView("land_use_action")->setVisible(false);
+ getChildView("land_use_reason")->setVisible(false);
}
// section three: purchase & currency
@@ -1281,18 +1281,18 @@ void LLFloaterBuyLandUI::refreshUI()
llformat("%d", minContribution));
getChildView("remove_contribution")->setVisible( showRemoveContribution);
- getChildView("step_3")->setVisible(TRUE);
- getChildView("purchase_action")->setVisible(TRUE);
- getChildView("currency_reason")->setVisible(TRUE);
- getChildView("currency_balance")->setVisible(TRUE);
+ getChildView("step_3")->setVisible(true);
+ getChildView("purchase_action")->setVisible(true);
+ getChildView("currency_reason")->setVisible(true);
+ getChildView("currency_balance")->setVisible(true);
}
else
{
- getChildView("step_3")->setVisible(FALSE);
- getChildView("purchase_action")->setVisible(FALSE);
- getChildView("currency_reason")->setVisible(FALSE);
- getChildView("currency_balance")->setVisible(FALSE);
- getChildView("remove_group_donation")->setVisible(FALSE);
+ getChildView("step_3")->setVisible(false);
+ getChildView("purchase_action")->setVisible(false);
+ getChildView("currency_reason")->setVisible(false);
+ getChildView("currency_balance")->setVisible(false);
+ getChildView("remove_group_donation")->setVisible(false);
}
diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp
index 6e29450ff3..a21ed1ac90 100644
--- a/indra/newview/llfloaterbvhpreview.cpp
+++ b/indra/newview/llfloaterbvhpreview.cpp
@@ -188,14 +188,14 @@ std::map <std::string, std::string> LLFloaterBvhPreview::getJointAliases()
//-----------------------------------------------------------------------------
// postBuild()
//-----------------------------------------------------------------------------
-BOOL LLFloaterBvhPreview::postBuild()
+bool LLFloaterBvhPreview::postBuild()
{
LLKeyframeMotion* motionp = NULL;
LLBVHLoader* loaderp = NULL;
if (!LLFloaterNameDesc::postBuild())
{
- return FALSE;
+ return false;
}
getChild<LLUICtrl>("name_form")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitName, this));
@@ -220,7 +220,7 @@ BOOL LLFloaterBvhPreview::postBuild()
mStopButton = getChild<LLButton>( "stop_btn");
mStopButton->setClickedCallback(boost::bind(&LLFloaterBvhPreview::onBtnStop, this));
- getChildView("bad_animation_text")->setVisible(FALSE);
+ getChildView("bad_animation_text")->setVisible(false);
mAnimPreview = new LLPreviewAnimation(256, 256);
@@ -294,7 +294,7 @@ BOOL LLFloaterBvhPreview::postBuild()
loaderp->serialize(dp);
dp.reset();
LL_INFOS("BVH") << "Deserializing motionp" << LL_ENDL;
- BOOL success = motionp && motionp->deserialize(dp, mMotionID, false);
+ bool success = motionp && motionp->deserialize(dp, mMotionID, false);
LL_INFOS("BVH") << "Done" << LL_ENDL;
delete []buffer;
@@ -331,7 +331,7 @@ BOOL LLFloaterBvhPreview::postBuild()
getChild<LLUICtrl>("hand_pose_combo")->setValue(LLHandMotion::getHandPoseName(motionp->getHandPose()));
getChild<LLUICtrl>("ease_in_time")->setValue(LLSD(motionp->getEaseInDuration()));
getChild<LLUICtrl>("ease_out_time")->setValue(LLSD(motionp->getEaseOutDuration()));
- setEnabled(TRUE);
+ setEnabled(true);
std::string seconds_string;
seconds_string = llformat(" - %.2f seconds", motionp->getDuration());
@@ -363,7 +363,7 @@ BOOL LLFloaterBvhPreview::postBuild()
}
}
- //setEnabled(FALSE);
+ //setEnabled(false);
mMotionID.setNull();
mAnimPreview = NULL;
}
@@ -372,7 +372,7 @@ BOOL LLFloaterBvhPreview::postBuild()
delete loaderp;
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
@@ -382,7 +382,7 @@ LLFloaterBvhPreview::~LLFloaterBvhPreview()
{
mAnimPreview = NULL;
- setEnabled(FALSE);
+ setEnabled(false);
}
//-----------------------------------------------------------------------------
@@ -433,7 +433,7 @@ void LLFloaterBvhPreview::resetMotion()
return;
LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();
- BOOL paused = avatarp->areAnimationsPaused();
+ bool paused = avatarp->areAnimationsPaused();
LLKeyframeMotion* motionp = dynamic_cast<LLKeyframeMotion*>(avatarp->findMotion(mMotionID));
if( motionp )
@@ -471,7 +471,7 @@ void LLFloaterBvhPreview::resetMotion()
//-----------------------------------------------------------------------------
// handleMouseDown()
//-----------------------------------------------------------------------------
-BOOL LLFloaterBvhPreview::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLFloaterBvhPreview::handleMouseDown(S32 x, S32 y, MASK mask)
{
if (mPreviewRect.pointInRect(x, y))
{
@@ -480,7 +480,7 @@ BOOL LLFloaterBvhPreview::handleMouseDown(S32 x, S32 y, MASK mask)
gViewerWindow->hideCursor();
mLastMouseX = x;
mLastMouseY = y;
- return TRUE;
+ return true;
}
return LLFloater::handleMouseDown(x, y, mask);
@@ -489,9 +489,9 @@ BOOL LLFloaterBvhPreview::handleMouseDown(S32 x, S32 y, MASK mask)
//-----------------------------------------------------------------------------
// handleMouseUp()
//-----------------------------------------------------------------------------
-BOOL LLFloaterBvhPreview::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLFloaterBvhPreview::handleMouseUp(S32 x, S32 y, MASK mask)
{
- gFocusMgr.setMouseCapture(FALSE);
+ gFocusMgr.setMouseCapture(nullptr);
gViewerWindow->showCursor();
return LLFloater::handleMouseUp(x, y, mask);
}
@@ -499,7 +499,7 @@ BOOL LLFloaterBvhPreview::handleMouseUp(S32 x, S32 y, MASK mask)
//-----------------------------------------------------------------------------
// handleHover()
//-----------------------------------------------------------------------------
-BOOL LLFloaterBvhPreview::handleHover(S32 x, S32 y, MASK mask)
+bool LLFloaterBvhPreview::handleHover(S32 x, S32 y, MASK mask)
{
MASK local_mask = mask & ~MASK_ALT;
@@ -548,13 +548,13 @@ BOOL LLFloaterBvhPreview::handleHover(S32 x, S32 y, MASK mask)
gViewerWindow->setCursor(UI_CURSOR_TOOLZOOMIN);
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// handleScrollWheel()
//-----------------------------------------------------------------------------
-BOOL LLFloaterBvhPreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
+bool LLFloaterBvhPreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
if (!mAnimPreview)
return false;
@@ -562,7 +562,7 @@ BOOL LLFloaterBvhPreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
mAnimPreview->zoom((F32)clicks * -0.2f);
mAnimPreview->requestUpdate();
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
@@ -672,13 +672,13 @@ void LLFloaterBvhPreview::onCommitBaseAnim()
{
LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();
- BOOL paused = avatarp->areAnimationsPaused();
+ bool paused = avatarp->areAnimationsPaused();
// stop all other possible base motions
- avatarp->stopMotion(mIDList["Standing"], TRUE);
- avatarp->stopMotion(mIDList["Walking"], TRUE);
- avatarp->stopMotion(mIDList["Sitting"], TRUE);
- avatarp->stopMotion(mIDList["Flying"], TRUE);
+ avatarp->stopMotion(mIDList["Standing"], true);
+ avatarp->stopMotion(mIDList["Walking"], true);
+ avatarp->stopMotion(mIDList["Sitting"], true);
+ avatarp->stopMotion(mIDList["Flying"], true);
resetMotion();
@@ -723,7 +723,7 @@ void LLFloaterBvhPreview::onCommitLoopIn()
{
motionp->setLoopIn((F32)getChild<LLUICtrl>("loop_in_point")->getValue().asReal() / 100.f);
resetMotion();
- getChild<LLUICtrl>("loop_check")->setValue(LLSD(TRUE));
+ getChild<LLUICtrl>("loop_check")->setValue(LLSD(true));
onCommitLoop();
}
}
@@ -743,7 +743,7 @@ void LLFloaterBvhPreview::onCommitLoopOut()
{
motionp->setLoopOut((F32)getChild<LLUICtrl>("loop_out_point")->getValue().asReal() * 0.01f * motionp->getDuration());
resetMotion();
- getChild<LLUICtrl>("loop_check")->setValue(LLSD(TRUE));
+ getChild<LLUICtrl>("loop_check")->setValue(LLSD(true));
onCommitLoop();
}
}
@@ -939,22 +939,22 @@ void LLFloaterBvhPreview::refresh()
bool show_play = true;
if (!mAnimPreview)
{
- getChildView("bad_animation_text")->setVisible(TRUE);
+ getChildView("bad_animation_text")->setVisible(true);
// play button visible but disabled
- mPlayButton->setEnabled(FALSE);
- mStopButton->setEnabled(FALSE);
- getChildView("ok_btn")->setEnabled(FALSE);
+ mPlayButton->setEnabled(false);
+ mStopButton->setEnabled(false);
+ getChildView("ok_btn")->setEnabled(false);
}
else
{
- getChildView("bad_animation_text")->setVisible(FALSE);
+ getChildView("bad_animation_text")->setVisible(false);
// re-enabled in case previous animation was bad
- mPlayButton->setEnabled(TRUE);
- mStopButton->setEnabled(TRUE);
+ mPlayButton->setEnabled(true);
+ mStopButton->setEnabled(true);
LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();
if (avatarp->isMotionActive(mMotionID))
{
- mStopButton->setEnabled(TRUE);
+ mStopButton->setEnabled(true);
LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(mMotionID);
if (!avatarp->areAnimationsPaused())
{
@@ -972,7 +972,7 @@ void LLFloaterBvhPreview::refresh()
// Motion just finished playing
mPauseRequest = avatarp->requestPause();
}
- getChildView("ok_btn")->setEnabled(TRUE);
+ getChildView("ok_btn")->setEnabled(true);
mAnimPreview->requestUpdate();
}
mPlayButton->setVisible(show_play);
@@ -1036,9 +1036,9 @@ void LLFloaterBvhPreview::onBtnOK(void* userdata)
//-----------------------------------------------------------------------------
// LLPreviewAnimation
//-----------------------------------------------------------------------------
-LLPreviewAnimation::LLPreviewAnimation(S32 width, S32 height) : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE)
+LLPreviewAnimation::LLPreviewAnimation(S32 width, S32 height) : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, false)
{
- mNeedsUpdate = TRUE;
+ mNeedsUpdate = true;
mCameraDistance = PREVIEW_CAMERA_DISTANCE;
mCameraYaw = 0.f;
mCameraPitch = 0.f;
@@ -1055,10 +1055,10 @@ LLPreviewAnimation::LLPreviewAnimation(S32 width, S32 height) : LLViewerDynamicT
mDummyAvatar->hideSkirt();
// stop extraneous animations
- mDummyAvatar->stopMotion( ANIM_AGENT_HEAD_ROT, TRUE );
- mDummyAvatar->stopMotion( ANIM_AGENT_EYE, TRUE );
- mDummyAvatar->stopMotion( ANIM_AGENT_BODY_NOISE, TRUE );
- mDummyAvatar->stopMotion( ANIM_AGENT_BREATHE_ROT, TRUE );
+ mDummyAvatar->stopMotion( ANIM_AGENT_HEAD_ROT, true );
+ mDummyAvatar->stopMotion( ANIM_AGENT_EYE, true );
+ mDummyAvatar->stopMotion( ANIM_AGENT_BODY_NOISE, true );
+ mDummyAvatar->stopMotion( ANIM_AGENT_BREATHE_ROT, true );
}
//-----------------------------------------------------------------------------
@@ -1078,9 +1078,9 @@ S8 LLPreviewAnimation::getType() const
//-----------------------------------------------------------------------------
// update()
//-----------------------------------------------------------------------------
-BOOL LLPreviewAnimation::render()
+bool LLPreviewAnimation::render()
{
- mNeedsUpdate = FALSE;
+ mNeedsUpdate = false;
LLVOAvatar* avatarp = mDummyAvatar;
gGL.matrixMode(LLRender::MM_PROJECTION);
@@ -1123,7 +1123,7 @@ BOOL LLPreviewAnimation::render()
camera->setViewNoBroadcast(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom);
camera->setAspect((F32) mFullWidth / (F32) mFullHeight);
- camera->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, FALSE);
+ camera->setPerspective(false, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, false);
//SJB: Animation is updated in LLVOAvatar::updateCharacter
@@ -1145,7 +1145,7 @@ BOOL LLPreviewAnimation::render()
}
gGL.color4f(1,1,1,1);
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
@@ -1153,7 +1153,7 @@ BOOL LLPreviewAnimation::render()
//-----------------------------------------------------------------------------
void LLPreviewAnimation::requestUpdate()
{
- mNeedsUpdate = TRUE;
+ mNeedsUpdate = true;
}
//-----------------------------------------------------------------------------
diff --git a/indra/newview/llfloaterbvhpreview.h b/indra/newview/llfloaterbvhpreview.h
index 9dfefc5a5f..da52981867 100644
--- a/indra/newview/llfloaterbvhpreview.h
+++ b/indra/newview/llfloaterbvhpreview.h
@@ -47,18 +47,18 @@ public:
/*virtual*/ S8 getType() const ;
- BOOL render();
+ bool render();
void requestUpdate();
void rotate(F32 yaw_radians, F32 pitch_radians);
void zoom(F32 zoom_delta);
void setZoom(F32 zoom_amt);
void pan(F32 right, F32 up);
- virtual BOOL needsUpdate() { return mNeedsUpdate; }
+ virtual bool needsUpdate() { return mNeedsUpdate; }
LLVOAvatar* getDummyAvatar() { return mDummyAvatar; }
protected:
- BOOL mNeedsUpdate;
+ bool mNeedsUpdate;
F32 mCameraDistance;
F32 mCameraYaw;
F32 mCameraPitch;
@@ -73,12 +73,12 @@ public:
LLFloaterBvhPreview(const std::string& filename);
virtual ~LLFloaterBvhPreview();
- BOOL postBuild();
+ bool postBuild();
- BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- BOOL handleHover(S32 x, S32 y, MASK mask);
- BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
+ bool handleMouseDown(S32 x, S32 y, MASK mask);
+ bool handleMouseUp(S32 x, S32 y, MASK mask);
+ bool handleHover(S32 x, S32 y, MASK mask);
+ bool handleScrollWheel(S32 x, S32 y, S32 clicks);
void onMouseCaptureLost();
void refresh();
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index 7985ce447f..dde4b6ff0e 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -72,7 +72,7 @@ public:
LLPanelCameraZoom() { onCreate(); }
- /* virtual */ BOOL postBuild();
+ /* virtual */ bool postBuild();
/* virtual */ void draw();
protected:
@@ -138,13 +138,13 @@ void set_view_visible(LLView* parent, const std::string& name, bool visible)
parent->getChildView(name)->setVisible(visible);
}
-BOOL LLPanelCameraItem::postBuild()
+bool LLPanelCameraItem::postBuild()
{
setMouseEnterCallback(boost::bind(set_view_visible, this, "hovered_icon", true));
setMouseLeaveCallback(boost::bind(set_view_visible, this, "hovered_icon", false));
setMouseDownCallback(boost::bind(&LLPanelCameraItem::onAnyMouseClick, this));
setRightMouseDownCallback(boost::bind(&LLPanelCameraItem::onAnyMouseClick, this));
- return TRUE;
+ return true;
}
void LLPanelCameraItem::onAnyMouseClick()
@@ -176,7 +176,7 @@ void LLPanelCameraZoom::onCreate()
mCommitCallbackRegistrar.add("Camera.rotate", boost::bind(&LLPanelCameraZoom::onCameraRotate, this));
}
-BOOL LLPanelCameraZoom::postBuild()
+bool LLPanelCameraZoom::postBuild()
{
mPlusBtn = getChild<LLButton>("zoom_plus_btn");
mMinusBtn = getChild<LLButton>("zoom_minus_btn");
@@ -426,7 +426,7 @@ void LLFloaterCamera::onOpen(const LLSD& key)
updateState();
else
toPrevMode();
- mClosed = FALSE;
+ mClosed = false;
populatePresetCombo();
@@ -449,25 +449,25 @@ void LLFloaterCamera::onClose(bool app_quitting)
mPrevMode = CAMERA_CTRL_MODE_PAN;
switchMode(CAMERA_CTRL_MODE_PAN);
- mClosed = TRUE;
+ mClosed = true;
- gAgent.setMovementLocked(FALSE);
+ gAgent.setMovementLocked(false);
}
LLFloaterCamera::LLFloaterCamera(const LLSD& val)
: LLFloater(val),
- mClosed(FALSE),
+ mClosed(false),
mCurrMode(CAMERA_CTRL_MODE_PAN),
mPrevMode(CAMERA_CTRL_MODE_PAN)
{
LLHints::getInstance()->registerHintTarget("view_popup", getHandle());
mCommitCallbackRegistrar.add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraItem, _2));
mCommitCallbackRegistrar.add("CameraPresets.Save", boost::bind(&LLFloaterCamera::onSavePreset, this));
- mCommitCallbackRegistrar.add("CameraPresets.ShowPresetsList", boost::bind(&LLFloaterReg::showInstance, "camera_presets", LLSD(), FALSE));
+ mCommitCallbackRegistrar.add("CameraPresets.ShowPresetsList", boost::bind(&LLFloaterReg::showInstance, "camera_presets", LLSD(), false));
}
// virtual
-BOOL LLFloaterCamera::postBuild()
+bool LLFloaterCamera::postBuild()
{
updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730)
@@ -482,7 +482,7 @@ BOOL LLFloaterCamera::postBuild()
mPreciseCtrls->setShowCursorHand(false);
mPreciseCtrls->setSoundFlags(LLView::MOUSE_UP);
- mPreciseCtrls->setClickedCallback(boost::bind(&LLFloaterReg::showInstance, "prefs_view_advanced", LLSD(), FALSE));
+ mPreciseCtrls->setClickedCallback(boost::bind(&LLFloaterReg::showInstance, "prefs_view_advanced", LLSD(), false));
mPresetCombo->setCommitCallback(boost::bind(&LLFloaterCamera::onCustomPresetSelected, this));
LLPresetsManager::getInstance()->setPresetListChangeCameraCallback(boost::bind(&LLFloaterCamera::populatePresetCombo, this));
@@ -585,7 +585,7 @@ void LLFloaterCamera::switchMode(ECameraControlMode mode)
default:
//normally we won't occur here
- llassert_always(FALSE);
+ llassert_always(false);
}
}
diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h
index f31bc5486b..0ff5ae14bc 100644
--- a/indra/newview/llfloatercamera.h
+++ b/indra/newview/llfloatercamera.h
@@ -92,7 +92,7 @@ private:
/* return instance if it exists - created by LLFloaterReg */
static LLFloaterCamera* findInstance();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
F32 getCurrentTransparency();
@@ -126,7 +126,7 @@ private:
// remains true until preset camera mode is chosen, or pan button is clicked, or escape pressed
static bool sFreeCamera;
static bool sAppearanceEditing;
- BOOL mClosed;
+ bool mClosed;
ECameraControlMode mPrevMode;
ECameraControlMode mCurrMode;
std::map<ECameraControlMode, LLButton*> mMode2Button;
@@ -160,7 +160,7 @@ public:
Optional<CommitCallbackParam> mousedown_callback;
Params();
};
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/** setting on/off background icon to indicate selected state */
/*virtual*/ void setValue(const LLSD& value);
// sends commit signal
diff --git a/indra/newview/llfloatercamerapresets.cpp b/indra/newview/llfloatercamerapresets.cpp
index a1cbffd094..76e24a9d16 100644
--- a/indra/newview/llfloatercamerapresets.cpp
+++ b/indra/newview/llfloatercamerapresets.cpp
@@ -38,14 +38,14 @@ LLFloaterCameraPresets::LLFloaterCameraPresets(const LLSD& key)
LLFloaterCameraPresets::~LLFloaterCameraPresets()
{}
-BOOL LLFloaterCameraPresets::postBuild()
+bool LLFloaterCameraPresets::postBuild()
{
mPresetList = getChild<LLFlatListView>("preset_list");
mPresetList->setCommitCallback(boost::bind(&LLFloaterCameraPresets::onSelectionChange, this));
mPresetList->setCommitOnSelectionChange(true);
LLPresetsManager::getInstance()->setPresetListChangeCameraCallback(boost::bind(&LLFloaterCameraPresets::populateList, this));
- return TRUE;
+ return true;
}
void LLFloaterCameraPresets::onOpen(const LLSD& key)
{
@@ -99,7 +99,7 @@ LLCameraPresetFlatItem::~LLCameraPresetFlatItem()
{
}
-BOOL LLCameraPresetFlatItem::postBuild()
+bool LLCameraPresetFlatItem::postBuild()
{
mDeleteBtn = getChild<LLButton>("delete_btn");
mDeleteBtn->setVisible(false);
diff --git a/indra/newview/llfloatercamerapresets.h b/indra/newview/llfloatercamerapresets.h
index 4430a4209e..9b07987755 100644
--- a/indra/newview/llfloatercamerapresets.h
+++ b/indra/newview/llfloatercamerapresets.h
@@ -34,7 +34,7 @@ class LLFloaterCameraPresets : public LLFloater
{
friend class LLFloaterReg;
- virtual BOOL postBuild();
+ virtual bool postBuild();
virtual void onOpen(const LLSD& key);
void populateList();
@@ -55,7 +55,7 @@ public:
void setValue(const LLSD& value);
- virtual BOOL postBuild();
+ virtual bool postBuild();
virtual void onMouseEnter(S32 x, S32 y, MASK mask);
virtual void onMouseLeave(S32 x, S32 y, MASK mask);
diff --git a/indra/newview/llfloaterchangeitemthumbnail.cpp b/indra/newview/llfloaterchangeitemthumbnail.cpp
index 776f8dc785..3a9612a354 100644
--- a/indra/newview/llfloaterchangeitemthumbnail.cpp
+++ b/indra/newview/llfloaterchangeitemthumbnail.cpp
@@ -52,26 +52,32 @@
class LLThumbnailImagePicker : public LLFilePickerThread
{
public:
- LLThumbnailImagePicker(const LLUUID &item_id);
- LLThumbnailImagePicker(const LLUUID &item_id, const LLUUID &task_id);
+ LLThumbnailImagePicker(const LLUUID &item_id, LLFloaterSimpleSnapshot::completion_t callback);
+ LLThumbnailImagePicker(const LLUUID &item_id, const LLUUID &task_id, LLFloaterSimpleSnapshot::completion_t callback);
~LLThumbnailImagePicker();
void notify(const std::vector<std::string>& filenames) override;
private:
LLUUID mInventoryId;
LLUUID mTaskId;
+ LLFloaterSimpleSnapshot::completion_t mCallback;
};
-LLThumbnailImagePicker::LLThumbnailImagePicker(const LLUUID &item_id)
+LLThumbnailImagePicker::LLThumbnailImagePicker(const LLUUID &item_id,
+ LLFloaterSimpleSnapshot::completion_t callback)
: LLFilePickerThread(LLFilePicker::FFLOAD_IMAGE)
, mInventoryId(item_id)
+ , mCallback(callback)
{
}
-LLThumbnailImagePicker::LLThumbnailImagePicker(const LLUUID &item_id, const LLUUID &task_id)
+LLThumbnailImagePicker::LLThumbnailImagePicker(const LLUUID &item_id,
+ const LLUUID &task_id,
+ LLFloaterSimpleSnapshot::completion_t callback)
: LLFilePickerThread(LLFilePicker::FFLOAD_IMAGE)
, mInventoryId(item_id)
, mTaskId(task_id)
+ , mCallback(callback)
{
}
@@ -91,12 +97,13 @@ void LLThumbnailImagePicker::notify(const std::vector<std::string>& filenames)
return;
}
- LLFloaterSimpleSnapshot::uploadThumbnail(file_path, mInventoryId, mTaskId);
+ LLFloaterSimpleSnapshot::uploadThumbnail(file_path, mInventoryId, mTaskId, mCallback);
}
LLFloaterChangeItemThumbnail::LLFloaterChangeItemThumbnail(const LLSD& key)
: LLFloater(key)
, mObserverInitialized(false)
+ , mMultipleThumbnails(false)
, mTooltipState(TOOLTIP_NONE)
{
}
@@ -107,15 +114,17 @@ LLFloaterChangeItemThumbnail::~LLFloaterChangeItemThumbnail()
removeVOInventoryListener();
}
-BOOL LLFloaterChangeItemThumbnail::postBuild()
+bool LLFloaterChangeItemThumbnail::postBuild()
{
mItemNameText = getChild<LLUICtrl>("item_name");
mItemTypeIcon = getChild<LLIconCtrl>("item_type_icon");
mThumbnailCtrl = getChild<LLThumbnailCtrl>("item_thumbnail");
mToolTipTextBox = getChild<LLTextBox>("tooltip_text");
+ mMultipleTextBox = getChild<LLTextBox>("multiple_lbl");
LLSD tooltip_text;
mToolTipTextBox->setValue(tooltip_text);
+ mMultipleTextBox->setVisible(false);
LLButton *upload_local = getChild<LLButton>("upload_local");
upload_local->setClickedCallback(onUploadLocal, (void*)this);
@@ -152,21 +161,55 @@ BOOL LLFloaterChangeItemThumbnail::postBuild()
void LLFloaterChangeItemThumbnail::onOpen(const LLSD& key)
{
- if (!key.has("item_id") && !key.isUUID())
+ if (!key.has("item_id") && !key.isUUID() && !key.isArray())
{
closeFloater();
}
- if (key.isUUID())
+ mItemList.clear();
+ mMultipleThumbnails = false;
+ if (key.isArray())
{
- mItemId = key.asUUID();
+ if (key.size() > 50)
+ {
+ // incident avoidance
+ LLNotificationsUtil::add("ThumbnailSelectionTooLarge");
+ closeFloater();
+ }
+
+ LLUUID image_id;
+ for (LLSD::array_const_iterator it = key.beginArray(); it != key.endArray(); ++it)
+ {
+ LLInventoryObject* obj = gInventory.getObject(it->asUUID());
+ if (obj)
+ {
+ if (mItemList.empty())
+ {
+ image_id = obj->getThumbnailUUID();
+ }
+ mItemList.insert(it->asUUID());
+ if (image_id != obj->getThumbnailUUID())
+ {
+ mMultipleThumbnails = true;
+ }
+ }
+ }
+ }
+ else if (key.isUUID())
+ {
+ mItemList.insert(key.asUUID());
}
else
{
- mItemId = key["item_id"].asUUID();
+ mItemList.insert(key["item_id"].asUUID());
mTaskId = key["task_id"].asUUID();
}
+ if (mItemList.size() == 0)
+ {
+ closeFloater();
+ }
+
refreshFromInventory();
}
@@ -180,11 +223,11 @@ void LLFloaterChangeItemThumbnail::onMouseEnter(S32 x, S32 y, MASK mask)
mPasteFromClipboardBtn->setEnabled(LLClipboard::instance().hasContents());
}
-BOOL LLFloaterChangeItemThumbnail::handleDragAndDrop(
+bool LLFloaterChangeItemThumbnail::handleDragAndDrop(
S32 x,
S32 y,
MASK mask,
- BOOL drop,
+ bool drop,
EDragAndDropType cargo_type,
void *cargo_data,
EAcceptance *accept,
@@ -214,14 +257,14 @@ BOOL LLFloaterChangeItemThumbnail::handleDragAndDrop(
LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFloaterChangeItemThumbnail " << getKey() << LL_ENDL;
- return TRUE;
+ return true;
}
void LLFloaterChangeItemThumbnail::changed(U32 mask)
{
//LLInventoryObserver
- if (mTaskId.notNull() || mItemId.isNull())
+ if (mTaskId.notNull() || mItemList.size() == 0)
{
// Task inventory or not set up yet
return;
@@ -229,13 +272,13 @@ void LLFloaterChangeItemThumbnail::changed(U32 mask)
const std::set<LLUUID>& mChangedItemIDs = gInventory.getChangedIDs();
std::set<LLUUID>::const_iterator it;
+ const LLUUID expected_id = *mItemList.begin();
for (it = mChangedItemIDs.begin(); it != mChangedItemIDs.end(); it++)
{
- // set dirty for 'item profile panel' only if changed item is the item for which 'item profile panel' is shown (STORM-288)
- if (*it == mItemId)
+ // check if there's a change we're interested in.
+ if (*it == expected_id)
{
- // if there's a change we're interested in.
if ((mask & (LLInventoryObserver::LABEL | LLInventoryObserver::INTERNAL | LLInventoryObserver::REMOVE)) != 0)
{
refreshFromInventory();
@@ -255,6 +298,12 @@ void LLFloaterChangeItemThumbnail::inventoryChanged(LLViewerObject* object,
LLInventoryObject* LLFloaterChangeItemThumbnail::getInventoryObject()
{
+ if (mItemList.size() == 0)
+ {
+ return NULL;
+ }
+
+ const LLUUID item_id = *mItemList.begin();
LLInventoryObject* obj = NULL;
if (mTaskId.isNull())
{
@@ -265,7 +314,7 @@ LLInventoryObject* LLFloaterChangeItemThumbnail::getInventoryObject()
mObserverInitialized = true;
}
- obj = gInventory.getObject(mItemId);
+ obj = gInventory.getObject(item_id);
}
else
{
@@ -278,7 +327,7 @@ LLInventoryObject* LLFloaterChangeItemThumbnail::getInventoryObject()
mObserverInitialized = false;
}
- obj = object->getInventoryObject(mItemId);
+ obj = object->getInventoryObject(item_id);
}
}
return obj;
@@ -337,7 +386,7 @@ void LLFloaterChangeItemThumbnail::refreshFromObject(LLInventoryObject* obj)
{
setTitle(getString("title_item_thumbnail"));
- icon_img = LLInventoryIcon::getIcon(item->getType(), item->getInventoryType(), item->getFlags(), FALSE);
+ icon_img = LLInventoryIcon::getIcon(item->getType(), item->getInventoryType(), item->getFlags(), false);
mRemoveImageBtn->setEnabled(thumbnail_id.notNull() && ((item->getActualType() != LLAssetType::AT_TEXTURE) || (item->getAssetUUID() != thumbnail_id)));
}
else
@@ -357,7 +406,7 @@ void LLFloaterChangeItemThumbnail::refreshFromObject(LLInventoryObject* obj)
LLInventoryModel::item_array_t items;
// Not LLIsOfAssetType, because we allow links
LLIsOutfitTextureType f;
- gInventory.getDirectDescendentsOf(mItemId, cats, items, f);
+ gInventory.getDirectDescendentsOf(*mItemList.begin(), cats, items, f);
if (1 == items.size())
{
@@ -384,12 +433,44 @@ void LLFloaterChangeItemThumbnail::refreshFromObject(LLInventoryObject* obj)
mRemoveImageBtn->setEnabled(thumbnail_id.notNull());
}
}
- mItemTypeIcon->setImage(icon_img);
- mItemNameText->setValue(obj->getName());
+ if (mItemList.size() == 1)
+ {
+ mItemTypeIcon->setImage(icon_img);
+ mItemTypeIcon->setVisible(true);
+ mMultipleTextBox->setVisible(false);
+ mItemNameText->setValue(obj->getName());
+ mItemNameText->setToolTip(std::string());
+ }
+ else
+ {
+ mItemTypeIcon->setVisible(false);
+ mMultipleTextBox->setVisible(mMultipleThumbnails);
+ mItemNameText->setValue(getString("multiple_item_names"));
+
+ // Display first five names as a tooltip
+ const S32 ITEMS_TO_SHOW = 5;
+ std::string items_str;
+ uuid_set_t::iterator iter = mItemList.begin();
+ uuid_set_t::iterator end = mItemList.end();
+ for (S32 i = 0; (iter != end) && (i < ITEMS_TO_SHOW); iter++, i++)
+ {
+ LLInventoryObject* pobj = gInventory.getObject(*iter);
+ if (pobj)
+ {
+ items_str += pobj->getName();
+ items_str += '\n';
+ }
+ }
+ if (mItemList.size() > ITEMS_TO_SHOW)
+ {
+ items_str += "...";
+ }
+ mItemNameText->setToolTip(items_str);
+ }
mThumbnailCtrl->setValue(thumbnail_id);
- mCopyToClipboardBtn->setEnabled(thumbnail_id.notNull());
+ mCopyToClipboardBtn->setEnabled(thumbnail_id.notNull() && !mMultipleThumbnails);
mPasteFromClipboardBtn->setEnabled(LLClipboard::instance().hasContents());
// todo: some elements might not support setting thumbnails
@@ -401,7 +482,17 @@ void LLFloaterChangeItemThumbnail::onUploadLocal(void *userdata)
{
LLFloaterChangeItemThumbnail *self = (LLFloaterChangeItemThumbnail*)userdata;
- (new LLThumbnailImagePicker(self->mItemId, self->mTaskId))->getFile();
+ LLUUID task_id = self->mTaskId;
+ uuid_set_t inventory_ids = self->mItemList;
+ LLHandle<LLFloater> handle = self->getHandle();
+ (new LLThumbnailImagePicker(
+ *self->mItemList.begin(),
+ self->mTaskId,
+ [inventory_ids, task_id, handle](const LLUUID& asset_id)
+ {
+ onUploadComplete(asset_id, task_id, inventory_ids, handle);
+ }
+ ))->getFile();
LLFloater* floaterp = self->mPickerHandle.get();
if (floaterp)
@@ -428,7 +519,7 @@ void LLFloaterChangeItemThumbnail::onUploadSnapshot(void *userdata)
else
{
LLSD key;
- key["item_id"] = self->mItemId;
+ key["item_id"] = *self->mItemList.begin();
key["task_id"] = self->mTaskId;
LLFloaterSimpleSnapshot* snapshot_floater = (LLFloaterSimpleSnapshot*)LLFloaterReg::showInstance("simple_snapshot", key, true);
if (snapshot_floater)
@@ -436,6 +527,14 @@ void LLFloaterChangeItemThumbnail::onUploadSnapshot(void *userdata)
self->addDependentFloater(snapshot_floater);
self->mSnapshotHandle = snapshot_floater->getHandle();
snapshot_floater->setOwner(self);
+ LLUUID task_id = self->mTaskId;
+ uuid_set_t inventory_ids = self->mItemList;
+ LLHandle<LLFloater> handle = self->getHandle();
+ snapshot_floater->setComplectionCallback(
+ [inventory_ids, task_id, handle](const LLUUID& asset_id)
+ {
+ onUploadComplete(asset_id, task_id, inventory_ids, handle);
+ });
}
}
@@ -532,7 +631,7 @@ void LLFloaterChangeItemThumbnail::onRemove(void *userdata)
LLFloaterChangeItemThumbnail *self = (LLFloaterChangeItemThumbnail*)userdata;
LLSD payload;
- payload["item_id"] = self->mItemId;
+ payload["item_id"] = *self->mItemList.begin();
payload["object_id"] = self->mTaskId;
LLNotificationsUtil::add("DeleteThumbnail", LLSD(), payload, boost::bind(&LLFloaterChangeItemThumbnail::onRemovalConfirmation, _1, _2, self->getHandle()));
}
@@ -551,7 +650,8 @@ void LLFloaterChangeItemThumbnail::onRemovalConfirmation(const LLSD& notificatio
struct ImageLoadedData
{
LLUUID mThumbnailId;
- LLUUID mObjectId;
+ LLUUID mTaskId;
+ uuid_set_t mItemIds;
LLHandle<LLFloater> mFloaterHandle;
bool mSilent;
// Keep image reference to prevent deletion on timeout
@@ -581,7 +681,8 @@ void LLFloaterChangeItemThumbnail::assignAndValidateAsset(const LLUUID &asset_id
mExpectingAssetId = asset_id;
}
ImageLoadedData *data = new ImageLoadedData();
- data->mObjectId = mItemId;
+ data->mTaskId = mTaskId;
+ data->mItemIds = mItemList;
data->mThumbnailId = asset_id;
data->mFloaterHandle = getHandle();
data->mSilent = silent;
@@ -589,11 +690,11 @@ void LLFloaterChangeItemThumbnail::assignAndValidateAsset(const LLUUID &asset_id
texturep->setLoadedCallback(onImageDataLoaded,
MAX_DISCARD_LEVEL, // Don't need full image, just size data
- FALSE,
- FALSE,
+ false,
+ false,
(void*)data,
NULL,
- FALSE);
+ false);
}
else
{
@@ -647,12 +748,12 @@ bool LLFloaterChangeItemThumbnail::validateAsset(const LLUUID &asset_id)
//static
void LLFloaterChangeItemThumbnail::onImageDataLoaded(
- BOOL success,
+ bool success,
LLViewerFetchedTexture *src_vi,
LLImageRaw* src,
LLImageRaw* aux_src,
S32 discard_level,
- BOOL final,
+ bool final,
void* userdata)
{
if (!userdata) return;
@@ -663,10 +764,13 @@ void LLFloaterChangeItemThumbnail::onImageDataLoaded(
if (success)
{
- // Update the item, set it even if floater is dead
+ // Update items, set thumnails even if floater is dead
if (validateAsset(data->mThumbnailId))
{
- setThumbnailId(data->mThumbnailId, data->mObjectId);
+ for (const LLUUID& id : data->mItemIds)
+ {
+ setThumbnailId(data->mThumbnailId, data->mTaskId, id);
+ }
}
else if (!data->mSilent)
{
@@ -690,12 +794,12 @@ void LLFloaterChangeItemThumbnail::onImageDataLoaded(
//static
void LLFloaterChangeItemThumbnail::onFullImageLoaded(
- BOOL success,
+ bool success,
LLViewerFetchedTexture* src_vi,
LLImageRaw* src,
LLImageRaw* aux_src,
S32 discard_level,
- BOOL final,
+ bool final,
void* userdata)
{
if (!userdata) return;
@@ -716,11 +820,23 @@ void LLFloaterChangeItemThumbnail::onFullImageLoaded(
}
else if (src_vi->getFullWidth() > LLFloaterSimpleSnapshot::THUMBNAIL_SNAPSHOT_DIM_MAX)
{
- LLFloaterSimpleSnapshot::uploadThumbnail(src, data->mObjectId, LLUUID::null);
+ LLUUID task_id = data->mTaskId;
+ uuid_set_t inventory_ids = data->mItemIds;
+ LLHandle<LLFloater> handle = data->mFloaterHandle;
+ LLFloaterSimpleSnapshot::uploadThumbnail(src,
+ *data->mItemIds.begin(),
+ task_id,
+ [inventory_ids, task_id, handle](const LLUUID& asset_id)
+ {
+ onUploadComplete(asset_id, task_id, inventory_ids, handle);
+ });
}
else
{
- setThumbnailId(data->mThumbnailId, data->mObjectId);
+ for (const LLUUID& id : data->mItemIds)
+ {
+ setThumbnailId(data->mThumbnailId, data->mTaskId, id);
+ }
}
}
@@ -745,12 +861,12 @@ void LLFloaterChangeItemThumbnail::showTexturePicker(const LLUUID &thumbnail_id)
thumbnail_id,
thumbnail_id,
thumbnail_id,
- FALSE,
- TRUE,
+ false,
+ true,
"SELECT PHOTO",
PERM_NONE,
PERM_NONE,
- FALSE,
+ false,
NULL,
PICK_TEXTURE);
@@ -770,8 +886,8 @@ void LLFloaterChangeItemThumbnail::showTexturePicker(const LLUUID &thumbnail_id)
}
);
- texture_floaterp->setLocalTextureEnabled(FALSE);
- texture_floaterp->setBakeTextureEnabled(FALSE);
+ texture_floaterp->setLocalTextureEnabled(false);
+ texture_floaterp->setBakeTextureEnabled(false);
texture_floaterp->setCanApplyImmediately(false);
texture_floaterp->setCanApply(false, true, false /*Hide 'preview disabled'*/);
texture_floaterp->setMinDimentionsLimits(LLFloaterSimpleSnapshot::THUMBNAIL_SNAPSHOT_DIM_MIN);
@@ -781,7 +897,7 @@ void LLFloaterChangeItemThumbnail::showTexturePicker(const LLUUID &thumbnail_id)
floaterp->openFloater();
}
- floaterp->setFocus(TRUE);
+ floaterp->setFocus(true);
}
void LLFloaterChangeItemThumbnail::onTexturePickerCommit()
@@ -838,19 +954,34 @@ void LLFloaterChangeItemThumbnail::onTexturePickerCommit()
&& (texturep->getCachedRawImageLevel() == 0 || texturep->getRawImageLevel() == 0)
&& (texturep->isCachedRawImageReady() || texturep->isRawImageValid()))
{
+ LLUUID task_id = mTaskId;
+ uuid_set_t inventory_ids = mItemList;
+ LLHandle<LLFloater> handle = getHandle();
+ LLFloaterSimpleSnapshot::completion_t callback =
+ [inventory_ids, task_id, handle](const LLUUID& asset_id)
+ {
+ onUploadComplete(asset_id, task_id, inventory_ids, handle);
+ };
if (texturep->isRawImageValid())
{
- LLFloaterSimpleSnapshot::uploadThumbnail(texturep->getRawImage(), mItemId, mTaskId);
+ LLFloaterSimpleSnapshot::uploadThumbnail(texturep->getRawImage(),
+ *mItemList.begin(),
+ mTaskId,
+ callback);
}
else
{
- LLFloaterSimpleSnapshot::uploadThumbnail(texturep->getCachedRawImage(), mItemId, mTaskId);
+ LLFloaterSimpleSnapshot::uploadThumbnail(texturep->getCachedRawImage(),
+ *mItemList.begin(),
+ mTaskId,
+ callback);
}
}
else
{
ImageLoadedData* data = new ImageLoadedData();
- data->mObjectId = mItemId;
+ data->mTaskId = mTaskId;
+ data->mItemIds = mItemList;
data->mThumbnailId = asset_id;
data->mFloaterHandle = getHandle();
data->mSilent = false;
@@ -860,11 +991,11 @@ void LLFloaterChangeItemThumbnail::onTexturePickerCommit()
texturep->setMinDiscardLevel(0);
texturep->setLoadedCallback(onFullImageLoaded,
0, // Need best quality
- TRUE,
- FALSE,
+ true,
+ false,
(void*)data,
NULL,
- FALSE);
+ false);
texturep->forceToSaveRawImage(0);
}
return;
@@ -874,6 +1005,41 @@ void LLFloaterChangeItemThumbnail::onTexturePickerCommit()
}
}
+//static
+void LLFloaterChangeItemThumbnail::onUploadComplete(const LLUUID& asset_id,
+ const LLUUID& task_id,
+ const uuid_set_t& inventory_ids,
+ LLHandle<LLFloater> handle)
+{
+ if (asset_id.isNull())
+ {
+ // failure
+ return;
+ }
+ uuid_set_t::iterator iter = inventory_ids.begin();
+ uuid_set_t::iterator end = inventory_ids.end();
+ if (iter == end)
+ {
+ LL_WARNS() << "Received empty item list!" << LL_ENDL;
+ }
+ else
+ {
+ iter++; // first element was set by upload
+ for (; iter != end; iter++)
+ {
+ setThumbnailId(asset_id, task_id, *iter);
+ }
+ }
+ if (!handle.isDead())
+ {
+ LLFloaterChangeItemThumbnail* floater = (LLFloaterChangeItemThumbnail*)handle.get();
+ if (floater)
+ {
+ floater->mMultipleThumbnails = false;
+ floater->mMultipleTextBox->setVisible(false);
+ }
+ }
+}
void LLFloaterChangeItemThumbnail::setThumbnailId(const LLUUID &new_thumbnail_id)
{
@@ -889,20 +1055,28 @@ void LLFloaterChangeItemThumbnail::setThumbnailId(const LLUUID &new_thumbnail_id
return;
}
- setThumbnailId(new_thumbnail_id, mItemId, obj);
+ for (const LLUUID &id : mItemList)
+ {
+ setThumbnailId(new_thumbnail_id, id, obj);
+ }
}
-void LLFloaterChangeItemThumbnail::setThumbnailId(const LLUUID& new_thumbnail_id, const LLUUID& object_id)
+void LLFloaterChangeItemThumbnail::setThumbnailId(const LLUUID& new_thumbnail_id, const LLUUID& task_id, const LLUUID& inv_obj_id)
{
- LLInventoryObject* obj = gInventory.getObject(object_id);
+ if (task_id.notNull())
+ {
+ LL_WARNS() << "Not supported" << LL_ENDL;
+ return;
+ }
+ LLInventoryObject* obj = gInventory.getObject(inv_obj_id);
if (!obj)
{
return;
}
- setThumbnailId(new_thumbnail_id, object_id, obj);
+ setThumbnailId(new_thumbnail_id, inv_obj_id, obj);
}
-void LLFloaterChangeItemThumbnail::setThumbnailId(const LLUUID& new_thumbnail_id, const LLUUID& object_id, LLInventoryObject* obj)
+void LLFloaterChangeItemThumbnail::setThumbnailId(const LLUUID& new_thumbnail_id, const LLUUID& inv_obj_id, LLInventoryObject* obj)
{
if (obj->getThumbnailUUID() != new_thumbnail_id)
{
@@ -920,12 +1094,12 @@ void LLFloaterChangeItemThumbnail::setThumbnailId(const LLUUID& new_thumbnail_id
LLViewerInventoryCategory* view_folder = dynamic_cast<LLViewerInventoryCategory*>(obj);
if (view_folder)
{
- update_inventory_category(object_id, updates, NULL);
+ update_inventory_category(inv_obj_id, updates, NULL);
}
LLViewerInventoryItem* view_item = dynamic_cast<LLViewerInventoryItem*>(obj);
if (view_item)
{
- update_inventory_item(object_id, updates, NULL);
+ update_inventory_item(inv_obj_id, updates, NULL);
}
}
}
diff --git a/indra/newview/llfloaterchangeitemthumbnail.h b/indra/newview/llfloaterchangeitemthumbnail.h
index a91e9b8ee9..3328a07725 100644
--- a/indra/newview/llfloaterchangeitemthumbnail.h
+++ b/indra/newview/llfloaterchangeitemthumbnail.h
@@ -45,16 +45,16 @@ public:
LLFloaterChangeItemThumbnail(const LLSD& key);
~LLFloaterChangeItemThumbnail();
- BOOL postBuild() override;
+ bool postBuild() override;
void onOpen(const LLSD& key) override;
void onFocusReceived() override;
void onMouseEnter(S32 x, S32 y, MASK mask) override;
- BOOL handleDragAndDrop(
+ bool handleDragAndDrop(
S32 x,
S32 y,
MASK mask,
- BOOL drop,
+ bool drop,
EDragAndDropType cargo_type,
void *cargo_data,
EAcceptance *accept,
@@ -83,27 +83,28 @@ private:
static void onRemovalConfirmation(const LLSD& notification, const LLSD& response, LLHandle<LLFloater> handle);
void assignAndValidateAsset(const LLUUID &asset_id, bool silent = false);
- static void onImageDataLoaded(BOOL success,
+ static void onImageDataLoaded(bool success,
LLViewerFetchedTexture *src_vi,
LLImageRaw* src,
LLImageRaw* aux_src,
S32 discard_level,
- BOOL final,
+ bool final,
void* userdata);
- static void onFullImageLoaded(BOOL success,
+ static void onFullImageLoaded(bool success,
LLViewerFetchedTexture* src_vi,
LLImageRaw* src,
LLImageRaw* aux_src,
S32 discard_level,
- BOOL final,
+ bool final,
void* userdata);
void showTexturePicker(const LLUUID &thumbnail_id);
void onTexturePickerCommit();
+ static void onUploadComplete(const LLUUID& asset_id, const LLUUID& task_id, const uuid_set_t& inventory_ids, LLHandle<LLFloater> handle);
void setThumbnailId(const LLUUID &new_thumbnail_id);
- static void setThumbnailId(const LLUUID& new_thumbnail_id, const LLUUID& object_id);
- static void setThumbnailId(const LLUUID& new_thumbnail_id, const LLUUID& object_id, LLInventoryObject* obj);
+ static void setThumbnailId(const LLUUID& new_thumbnail_id, const LLUUID& task_id, const LLUUID& inv_obj_id);
+ static void setThumbnailId(const LLUUID& new_thumbnail_id, const LLUUID& inv_obj_id, LLInventoryObject* obj);
enum EToolTipState
{
@@ -120,8 +121,9 @@ private:
void onButtonMouseLeave(LLUICtrl* button, const LLSD& param, EToolTipState state);
bool mObserverInitialized;
+ bool mMultipleThumbnails; // for multiselection
EToolTipState mTooltipState;
- LLUUID mItemId;
+ uuid_set_t mItemList;
LLUUID mTaskId;
LLUUID mExpectingAssetId;
@@ -129,6 +131,7 @@ private:
LLUICtrl *mItemNameText;
LLThumbnailCtrl *mThumbnailCtrl;
LLTextBox *mToolTipTextBox;
+ LLTextBox *mMultipleTextBox;
LLButton *mCopyToClipboardBtn;
LLButton *mPasteFromClipboardBtn;
LLButton *mRemoveImageBtn;
diff --git a/indra/newview/llfloaterclassified.cpp b/indra/newview/llfloaterclassified.cpp
index 3520b0f67a..9001f2198e 100644
--- a/indra/newview/llfloaterclassified.cpp
+++ b/indra/newview/llfloaterclassified.cpp
@@ -51,9 +51,9 @@ void LLFloaterClassified::onOpen(const LLSD& key)
LLFloater::onOpen(key);
}
-BOOL LLFloaterClassified::postBuild()
+bool LLFloaterClassified::postBuild()
{
- return TRUE;
+ return true;
}
diff --git a/indra/newview/llfloaterclassified.h b/indra/newview/llfloaterclassified.h
index 2c95d82b2c..45bd56695d 100644
--- a/indra/newview/llfloaterclassified.h
+++ b/indra/newview/llfloaterclassified.h
@@ -37,7 +37,7 @@ public:
virtual ~LLFloaterClassified();
void onOpen(const LLSD& key) override;
- BOOL postBuild() override;
+ bool postBuild() override;
bool matchesKey(const LLSD& key) override;
};
diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp
index ba91277c79..dd86c0f2b3 100644
--- a/indra/newview/llfloatercolorpicker.cpp
+++ b/indra/newview/llfloatercolorpicker.cpp
@@ -68,12 +68,12 @@
//
//////////////////////////////////////////////////////////////////////////////
-LLFloaterColorPicker::LLFloaterColorPicker (LLColorSwatchCtrl* swatch, BOOL show_apply_immediate )
+LLFloaterColorPicker::LLFloaterColorPicker (LLColorSwatchCtrl* swatch, bool show_apply_immediate )
: LLFloater(LLSD()),
mComponents ( 3 ),
- mMouseDownInLumRegion ( FALSE ),
- mMouseDownInHueRegion ( FALSE ),
- mMouseDownInSwatch ( FALSE ),
+ mMouseDownInLumRegion ( false ),
+ mMouseDownInHueRegion ( false ),
+ mMouseDownInSwatch ( false ),
// *TODO: Specify this in XML
mRGBViewerImageLeft ( 140 ),
mRGBViewerImageTop ( 356 ),
@@ -99,7 +99,7 @@ LLFloaterColorPicker::LLFloaterColorPicker (LLColorSwatchCtrl* swatch, BOOL show
mPaletteRegionWidth ( mLumRegionLeft + mLumRegionWidth - 10 ),
mPaletteRegionHeight ( 40 ),
mSwatch ( swatch ),
- mActive ( TRUE ),
+ mActive ( true ),
mCanApplyImmediately ( show_apply_immediate ),
mContextConeOpacity ( 0.f ),
mContextConeInAlpha ( 0.f ),
@@ -113,8 +113,8 @@ LLFloaterColorPicker::LLFloaterColorPicker (LLColorSwatchCtrl* swatch, BOOL show
if (!mCanApplyImmediately)
{
- mApplyImmediateCheck->setEnabled(FALSE);
- mApplyImmediateCheck->set(FALSE);
+ mApplyImmediateCheck->setEnabled(false);
+ mApplyImmediateCheck->set(false);
}
mContextConeInAlpha = gSavedSettings.getF32("ContextConeInAlpha");
@@ -135,6 +135,8 @@ void LLFloaterColorPicker::createUI ()
// create RGB type area (not really RGB but it's got R,G & B in it.,..
LLPointer<LLImageRaw> raw = new LLImageRaw ( mRGBViewerImageWidth, mRGBViewerImageHeight, mComponents );
+ LLImageDataLock lock(raw);
+
U8* bits = raw->getData();
S32 linesize = mRGBViewerImageWidth * mComponents;
for ( S32 y = 0; y < mRGBViewerImageHeight; ++y )
@@ -155,7 +157,7 @@ void LLFloaterColorPicker::createUI ()
* ( bits + x + y * linesize + 2 ) = ( U8 )( bVal * 255.0f );
}
}
- mRGBImage = LLViewerTextureManager::getLocalTexture( (LLImageRaw*)raw, FALSE );
+ mRGBImage = LLViewerTextureManager::getLocalTexture( (LLImageRaw*)raw, false );
gGL.getTexUnit(0)->bind(mRGBImage);
mRGBImage->setAddressMode(LLTexUnit::TAM_CLAMP);
@@ -171,15 +173,15 @@ void LLFloaterColorPicker::createUI ()
void LLFloaterColorPicker::showUI ()
{
openFloater(getKey());
- setVisible ( TRUE );
- setFocus ( TRUE );
+ setVisible ( true );
+ setFocus ( true );
// HACK: if system color picker is required - close the SL one we made and use default system dialog
if ( gSavedSettings.getBOOL ( "UseDefaultColorPicker" ) )
{
LLColorSwatchCtrl* swatch = getSwatch ();
- setVisible ( FALSE );
+ setVisible ( false );
// code that will get switched in for default system color picker
if ( swatch )
@@ -209,14 +211,14 @@ void LLFloaterColorPicker::showUI ()
//////////////////////////////////////////////////////////////////////////////
// called after the dialog is rendered
-BOOL LLFloaterColorPicker::postBuild()
+bool LLFloaterColorPicker::postBuild()
{
mCancelBtn = getChild<LLButton>( "cancel_btn" );
mCancelBtn->setClickedCallback ( onClickCancel, this );
mSelectBtn = getChild<LLButton>( "select_btn");
mSelectBtn->setClickedCallback ( onClickSelect, this );
- mSelectBtn->setFocus ( TRUE );
+ mSelectBtn->setFocus ( true );
mPipetteBtn = getChild<LLButton>("color_pipette" );
@@ -237,7 +239,7 @@ BOOL LLFloaterColorPicker::postBuild()
LLToolPipette::getInstance()->setToolSelectCallback(boost::bind(&LLFloaterColorPicker::onColorSelect, this, _1));
- return TRUE;
+ return true;
}
//////////////////////////////////////////////////////////////////////////////
@@ -423,7 +425,7 @@ void LLFloaterColorPicker::onClickSelect ( void* data )
void LLFloaterColorPicker::onClickPipette( )
{
- BOOL pipette_active = mPipetteBtn->getToggleState();
+ bool pipette_active = mPipetteBtn->getToggleState();
pipette_active = !pipette_active;
if (pipette_active)
{
@@ -470,8 +472,8 @@ void LLFloaterColorPicker::onColorSelect( const LLTextureEntry& te )
void LLFloaterColorPicker::onMouseCaptureLost()
{
- setMouseDownInHueRegion(FALSE);
- setMouseDownInLumRegion(FALSE);
+ setMouseDownInHueRegion(false);
+ setMouseDownInLumRegion(false);
}
F32 LLFloaterColorPicker::getSwatchTransparency()
@@ -480,7 +482,7 @@ F32 LLFloaterColorPicker::getSwatchTransparency()
return getTransparencyType() == TT_ACTIVE ? 1.f : LLFloater::getCurrentTransparency();
}
-BOOL LLFloaterColorPicker::isColorChanged()
+bool LLFloaterColorPicker::isColorChanged()
{
return ((getOrigR() != getCurR()) || (getOrigG() != getCurG()) || (getOrigB() != getCurB()));
}
@@ -525,7 +527,7 @@ void LLFloaterColorPicker::draw()
mRGBViewerImageLeft + mRGBViewerImageWidth + 1,
mRGBViewerImageTop,
LLColor4 ( 0.0f, 0.0f, 0.0f, alpha ),
- FALSE );
+ false );
// draw luminance slider
for ( S32 y = 0; y < mLumRegionHeight; ++y )
@@ -547,7 +549,7 @@ void LLFloaterColorPicker::draw()
gl_triangle_2d ( startX, startY,
startX + mLumMarkerSize, startY - mLumMarkerSize,
startX + mLumMarkerSize, startY + mLumMarkerSize,
- LLColor4 ( 0.75f, 0.75f, 0.75f, 1.0f ), TRUE );
+ LLColor4 ( 0.75f, 0.75f, 0.75f, 1.0f ), true );
// draw luminance slider outline
gl_rect_2d ( mLumRegionLeft,
@@ -555,7 +557,7 @@ void LLFloaterColorPicker::draw()
mLumRegionLeft + mLumRegionWidth + 1,
mLumRegionTop,
LLColor4 ( 0.0f, 0.0f, 0.0f, 1.0f ),
- FALSE );
+ false );
// draw selected color swatch
gl_rect_2d ( mSwatchRegionLeft,
@@ -563,7 +565,7 @@ void LLFloaterColorPicker::draw()
mSwatchRegionLeft + mSwatchRegionWidth,
mSwatchRegionTop,
LLColor4 ( getCurR (), getCurG (), getCurB (), alpha ),
- TRUE );
+ true );
// draw selected color swatch outline
gl_rect_2d ( mSwatchRegionLeft,
@@ -571,7 +573,7 @@ void LLFloaterColorPicker::draw()
mSwatchRegionLeft + mSwatchRegionWidth + 1,
mSwatchRegionTop,
LLColor4 ( 0.0f, 0.0f, 0.0f, 1.0f ),
- FALSE );
+ false );
// color palette code is a little more involved so break it out into its' own method
drawPalette ();
@@ -639,8 +641,8 @@ void LLFloaterColorPicker::drawPalette ()
// draw palette entry color
if ( mPalette [ curEntry ] )
{
- gl_rect_2d ( x1 + 2, y1 - 2, x2 - 2, y2 + 2, *mPalette [ curEntry++ ] % alpha, TRUE );
- gl_rect_2d ( x1 + 1, y1 - 1, x2 - 1, y2 + 1, LLColor4 ( 0.0f, 0.0f, 0.0f, 1.0f ), FALSE );
+ gl_rect_2d ( x1 + 2, y1 - 2, x2 - 2, y2 + 2, *mPalette [ curEntry++ ] % alpha, true );
+ gl_rect_2d ( x1 + 1, y1 - 1, x2 - 1, y2 + 1, LLColor4 ( 0.0f, 0.0f, 0.0f, 1.0f ), false );
}
}
}
@@ -744,7 +746,7 @@ void LLFloaterColorPicker::onTextEntryChanged ( LLUICtrl* ctrl )
//////////////////////////////////////////////////////////////////////////////
//
-BOOL LLFloaterColorPicker::updateRgbHslFromPoint ( S32 xPosIn, S32 yPosIn )
+bool LLFloaterColorPicker::updateRgbHslFromPoint ( S32 xPosIn, S32 yPosIn )
{
if ( xPosIn >= mRGBViewerImageLeft &&
xPosIn <= mRGBViewerImageLeft + mRGBViewerImageWidth &&
@@ -757,7 +759,7 @@ BOOL LLFloaterColorPicker::updateRgbHslFromPoint ( S32 xPosIn, S32 yPosIn )
getCurL () );
// indicate a value changed
- return TRUE;
+ return true;
}
else
if ( xPosIn >= mLumRegionLeft &&
@@ -772,15 +774,15 @@ BOOL LLFloaterColorPicker::updateRgbHslFromPoint ( S32 xPosIn, S32 yPosIn )
( ( F32 )yPosIn - ( ( F32 )mRGBViewerImageTop - ( F32 )mRGBViewerImageHeight ) ) / ( F32 )mRGBViewerImageHeight );
// indicate a value changed
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
//////////////////////////////////////////////////////////////////////////////
//
-BOOL LLFloaterColorPicker::handleMouseDown ( S32 x, S32 y, MASK mask )
+bool LLFloaterColorPicker::handleMouseDown ( S32 x, S32 y, MASK mask )
{
// make it the frontmost
gFloaterView->bringToFront(this);
@@ -795,13 +797,13 @@ BOOL LLFloaterColorPicker::handleMouseDown ( S32 x, S32 y, MASK mask )
{
gFocusMgr.setMouseCapture(this);
// mouse button down
- setMouseDownInHueRegion ( TRUE );
+ setMouseDownInHueRegion ( true );
// update all values based on initial click
updateRgbHslFromPoint ( x, y );
// required by base class
- return TRUE;
+ return true;
}
// rect containing RGB area
@@ -814,10 +816,10 @@ BOOL LLFloaterColorPicker::handleMouseDown ( S32 x, S32 y, MASK mask )
{
gFocusMgr.setMouseCapture(this);
// mouse button down
- setMouseDownInLumRegion ( TRUE );
+ setMouseDownInLumRegion ( true );
// required by base class
- return TRUE;
+ return true;
}
// rect containing swatch area
@@ -826,13 +828,13 @@ BOOL LLFloaterColorPicker::handleMouseDown ( S32 x, S32 y, MASK mask )
mSwatchRegionLeft + mSwatchRegionWidth,
mSwatchRegionTop - mSwatchRegionHeight );
- setMouseDownInSwatch( FALSE );
+ setMouseDownInSwatch( false );
if ( swatchRect.pointInRect ( x, y ) )
{
- setMouseDownInSwatch( TRUE );
+ setMouseDownInSwatch( true );
// required - dont drag windows here.
- return TRUE;
+ return true;
}
// rect containing palette area
@@ -846,7 +848,7 @@ BOOL LLFloaterColorPicker::handleMouseDown ( S32 x, S32 y, MASK mask )
// release keyboard focus so we can change text values
if (gFocusMgr.childHasKeyboardFocus(this))
{
- mSelectBtn->setFocus(TRUE);
+ mSelectBtn->setFocus(true);
}
// calculate which palette index we selected
@@ -869,7 +871,7 @@ BOOL LLFloaterColorPicker::handleMouseDown ( S32 x, S32 y, MASK mask )
updateTextEntry ();
}
- return TRUE;
+ return true;
}
// dispatch to base class for the rest of things
@@ -879,7 +881,7 @@ BOOL LLFloaterColorPicker::handleMouseDown ( S32 x, S32 y, MASK mask )
//////////////////////////////////////////////////////////////////////////////
//
-BOOL LLFloaterColorPicker::handleHover ( S32 x, S32 y, MASK mask )
+bool LLFloaterColorPicker::handleHover ( S32 x, S32 y, MASK mask )
{
// if we're the front most window
if ( isFrontmost () )
@@ -899,7 +901,7 @@ BOOL LLFloaterColorPicker::handleHover ( S32 x, S32 y, MASK mask )
clamped_y = llclamp(y, mLumRegionTop - mLumRegionHeight, mLumRegionTop);
}
- // update the stored RGB/HSL values using the mouse position - returns TRUE if RGB was updated
+ // update the stored RGB/HSL values using the mouse position - returns true if RGB was updated
if ( updateRgbHslFromPoint ( clamped_x, clamped_y ) )
{
// update text entry fields
@@ -937,7 +939,7 @@ BOOL LLFloaterColorPicker::handleHover ( S32 x, S32 y, MASK mask )
highlightEntry = xOffset + yOffset * numPaletteColumns;
}
- return TRUE;
+ return true;
}
}
@@ -947,7 +949,7 @@ BOOL LLFloaterColorPicker::handleHover ( S32 x, S32 y, MASK mask )
//////////////////////////////////////////////////////////////////////////////
// reverts state once mouse button is released
-BOOL LLFloaterColorPicker::handleMouseUp ( S32 x, S32 y, MASK mask )
+bool LLFloaterColorPicker::handleMouseUp ( S32 x, S32 y, MASK mask )
{
getWindow()->setCursor ( UI_CURSOR_ARROW );
@@ -1005,8 +1007,8 @@ BOOL LLFloaterColorPicker::handleMouseUp ( S32 x, S32 y, MASK mask )
}
// mouse button not down anymore
- setMouseDownInHueRegion ( FALSE );
- setMouseDownInLumRegion ( FALSE );
+ setMouseDownInHueRegion ( false );
+ setMouseDownInLumRegion ( false );
// mouse button not down in color swatch anymore
mMouseDownInSwatch = false;
@@ -1031,10 +1033,10 @@ void LLFloaterColorPicker::cancelSelection ()
LLColorSwatchCtrl::onColorChanged( getSwatch(), LLColorSwatchCtrl::COLOR_CANCEL );
// hide picker dialog
- this->setVisible ( FALSE );
+ this->setVisible ( false );
}
-void LLFloaterColorPicker::setMouseDownInHueRegion ( BOOL mouse_down_in_region )
+void LLFloaterColorPicker::setMouseDownInHueRegion ( bool mouse_down_in_region )
{
mMouseDownInHueRegion = mouse_down_in_region;
if (mouse_down_in_region)
@@ -1042,12 +1044,12 @@ void LLFloaterColorPicker::setMouseDownInHueRegion ( BOOL mouse_down_in_region )
if (gFocusMgr.childHasKeyboardFocus(this))
{
// get focus out of spinners so that they can update freely
- mSelectBtn->setFocus(TRUE);
+ mSelectBtn->setFocus(true);
}
}
}
-void LLFloaterColorPicker::setMouseDownInLumRegion ( BOOL mouse_down_in_region )
+void LLFloaterColorPicker::setMouseDownInLumRegion ( bool mouse_down_in_region )
{
mMouseDownInLumRegion = mouse_down_in_region;
if (mouse_down_in_region)
@@ -1055,12 +1057,12 @@ void LLFloaterColorPicker::setMouseDownInLumRegion ( BOOL mouse_down_in_region )
if (gFocusMgr.childHasKeyboardFocus(this))
{
// get focus out of spinners so that they can update freely
- mSelectBtn->setFocus(TRUE);
+ mSelectBtn->setFocus(true);
}
}
}
-void LLFloaterColorPicker::setMouseDownInSwatch (BOOL mouse_down_in_swatch)
+void LLFloaterColorPicker::setMouseDownInSwatch (bool mouse_down_in_swatch)
{
mMouseDownInSwatch = mouse_down_in_swatch;
if (mouse_down_in_swatch)
@@ -1068,12 +1070,12 @@ void LLFloaterColorPicker::setMouseDownInSwatch (BOOL mouse_down_in_swatch)
if (gFocusMgr.childHasKeyboardFocus(this))
{
// get focus out of spinners so that they can update freely
- mSelectBtn->setFocus(TRUE);
+ mSelectBtn->setFocus(true);
}
}
}
-void LLFloaterColorPicker::setActive(BOOL active)
+void LLFloaterColorPicker::setActive(bool active)
{
// shut down pipette tool if active
if (!active && mPipetteBtn->getToggleState())
diff --git a/indra/newview/llfloatercolorpicker.h b/indra/newview/llfloatercolorpicker.h
index 39dbc5b763..de2ea6579f 100644
--- a/indra/newview/llfloatercolorpicker.h
+++ b/indra/newview/llfloatercolorpicker.h
@@ -44,15 +44,15 @@ class LLFloaterColorPicker
: public LLFloater
{
public:
- LLFloaterColorPicker (LLColorSwatchCtrl* swatch, BOOL show_apply_immediate = FALSE);
+ LLFloaterColorPicker (LLColorSwatchCtrl* swatch, bool show_apply_immediate = false);
virtual ~LLFloaterColorPicker ();
// overrides
- virtual BOOL postBuild ();
+ virtual bool postBuild ();
virtual void draw ();
- virtual BOOL handleMouseDown ( S32 x, S32 y, MASK mask );
- virtual BOOL handleMouseUp ( S32 x, S32 y, MASK mask );
- virtual BOOL handleHover ( S32 x, S32 y, MASK mask );
+ virtual bool handleMouseDown ( S32 x, S32 y, MASK mask );
+ virtual bool handleMouseUp ( S32 x, S32 y, MASK mask );
+ virtual bool handleHover ( S32 x, S32 y, MASK mask );
virtual void onMouseCaptureLost();
virtual F32 getSwatchTransparency();
@@ -87,7 +87,7 @@ class LLFloaterColorPicker
F32 getCurL () { return curL; };
// updates current RGB/HSL values based on point in picker
- BOOL updateRgbHslFromPoint ( S32 xPosIn, S32 yPosIn );
+ bool updateRgbHslFromPoint ( S32 xPosIn, S32 yPosIn );
// updates text entry fields with current RGB/HSL
void updateTextEntry ();
@@ -95,16 +95,16 @@ class LLFloaterColorPicker
void stopUsingPipette();
// mutator / accessor for mouse button pressed in region
- void setMouseDownInHueRegion ( BOOL mouse_down_in_region );
- BOOL getMouseDownInHueRegion () { return mMouseDownInHueRegion; };
+ void setMouseDownInHueRegion ( bool mouse_down_in_region );
+ bool getMouseDownInHueRegion () { return mMouseDownInHueRegion; };
- void setMouseDownInLumRegion ( BOOL mouse_down_in_region );
- BOOL getMouseDownInLumRegion () { return mMouseDownInLumRegion; };
+ void setMouseDownInLumRegion ( bool mouse_down_in_region );
+ bool getMouseDownInLumRegion () { return mMouseDownInLumRegion; };
- void setMouseDownInSwatch (BOOL mouse_down_in_swatch);
- BOOL getMouseDownInSwatch () { return mMouseDownInSwatch; }
+ void setMouseDownInSwatch (bool mouse_down_in_swatch);
+ bool getMouseDownInSwatch () { return mMouseDownInSwatch; }
- BOOL isColorChanged ();
+ bool isColorChanged ();
// called when text entries (RGB/HSL etc.) are changed by user
void onTextEntryChanged ( LLUICtrl* ctrl );
@@ -113,7 +113,7 @@ class LLFloaterColorPicker
void hslToRgb ( F32 hValIn, F32 sValIn, F32 lValIn, F32& rValOut, F32& gValOut, F32& bValOut );
F32 hueToRgb ( F32 val1In, F32 val2In, F32 valHUeIn );
- void setActive(BOOL active);
+ void setActive(bool active);
protected:
// callbacks
@@ -142,9 +142,9 @@ class LLFloaterColorPicker
const S32 mComponents;
- BOOL mMouseDownInLumRegion;
- BOOL mMouseDownInHueRegion;
- BOOL mMouseDownInSwatch;
+ bool mMouseDownInLumRegion;
+ bool mMouseDownInHueRegion;
+ bool mMouseDownInSwatch;
const S32 mRGBViewerImageLeft;
const S32 mRGBViewerImageTop;
@@ -181,11 +181,11 @@ class LLFloaterColorPicker
LLColorSwatchCtrl* mSwatch;
// are we actively tied to some output?
- BOOL mActive;
+ bool mActive;
// enable/disable immediate updates
LLCheckBoxCtrl* mApplyImmediateCheck;
- BOOL mCanApplyImmediately;
+ bool mCanApplyImmediately;
LLButton* mSelectBtn;
LLButton* mCancelBtn;
diff --git a/indra/newview/llfloaterconversationlog.cpp b/indra/newview/llfloaterconversationlog.cpp
index 4c910c5655..244f251e4b 100644
--- a/indra/newview/llfloaterconversationlog.cpp
+++ b/indra/newview/llfloaterconversationlog.cpp
@@ -39,7 +39,7 @@ LLFloaterConversationLog::LLFloaterConversationLog(const LLSD& key)
mEnableCallbackRegistrar.add("CallLog.Check", boost::bind(&LLFloaterConversationLog::isActionChecked, this, _2));
}
-BOOL LLFloaterConversationLog::postBuild()
+bool LLFloaterConversationLog::postBuild()
{
mConversationLogList = getChild<LLConversationLogList>("conversation_log_list");
diff --git a/indra/newview/llfloaterconversationlog.h b/indra/newview/llfloaterconversationlog.h
index e971330f3d..b73878f401 100644
--- a/indra/newview/llfloaterconversationlog.h
+++ b/indra/newview/llfloaterconversationlog.h
@@ -37,9 +37,9 @@ public:
LLFloaterConversationLog(const LLSD& key);
virtual ~LLFloaterConversationLog(){};
- virtual BOOL postBuild();
+ bool postBuild() override;
- virtual void draw();
+ void draw() override;
void onFilterEdit(const std::string& search_string);
diff --git a/indra/newview/llfloaterconversationpreview.cpp b/indra/newview/llfloaterconversationpreview.cpp
index 580a3f2610..d4833984e7 100644
--- a/indra/newview/llfloaterconversationpreview.cpp
+++ b/indra/newview/llfloaterconversationpreview.cpp
@@ -59,7 +59,7 @@ LLFloaterConversationPreview::~LLFloaterConversationPreview()
{
}
-BOOL LLFloaterConversationPreview::postBuild()
+bool LLFloaterConversationPreview::postBuild()
{
mChatHistory = getChild<LLChatHistory>("chat_history");
diff --git a/indra/newview/llfloaterconversationpreview.h b/indra/newview/llfloaterconversationpreview.h
index 7ca4ee6945..1d9ceba6ea 100644
--- a/indra/newview/llfloaterconversationpreview.h
+++ b/indra/newview/llfloaterconversationpreview.h
@@ -41,12 +41,12 @@ public:
LLFloaterConversationPreview(const LLSD& session_id);
virtual ~LLFloaterConversationPreview();
- virtual BOOL postBuild();
+ bool postBuild() override;
void setPages(std::list<LLSD>* messages,const std::string& file_name);
- virtual void draw();
- virtual void onOpen(const LLSD& key);
- virtual void onClose(bool app_quitting);
+ void draw() override;
+ void onOpen(const LLSD& key) override;
+ void onClose(bool app_quitting) override;
private:
void onMoreHistoryBtnClick();
diff --git a/indra/newview/llfloatercreatelandmark.cpp b/indra/newview/llfloatercreatelandmark.cpp
index b82d8a29ba..9ffde4744a 100644
--- a/indra/newview/llfloatercreatelandmark.cpp
+++ b/indra/newview/llfloatercreatelandmark.cpp
@@ -116,7 +116,7 @@ LLFloaterCreateLandmark::~LLFloaterCreateLandmark()
removeObserver();
}
-BOOL LLFloaterCreateLandmark::postBuild()
+bool LLFloaterCreateLandmark::postBuild()
{
mFolderCombo = getChild<LLComboBox>("folder_combo");
mLandmarkTitleEditor = getChild<LLLineEditor>("title_editor");
@@ -131,7 +131,7 @@ BOOL LLFloaterCreateLandmark::postBuild()
mLandmarksID = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK);
- return TRUE;
+ return true;
}
void LLFloaterCreateLandmark::removeObserver()
@@ -345,7 +345,7 @@ void LLFloaterCreateLandmark::onSaveClicked()
gInventory.accountForUpdate(update);
new_item->setParent(folder_id);
- new_item->updateParentOnServer(FALSE);
+ new_item->updateParentOnServer(false);
}
removeObserver();
diff --git a/indra/newview/llfloatercreatelandmark.h b/indra/newview/llfloatercreatelandmark.h
index d84f5ae1fc..abe901303f 100644
--- a/indra/newview/llfloatercreatelandmark.h
+++ b/indra/newview/llfloatercreatelandmark.h
@@ -45,8 +45,8 @@ public:
LLFloaterCreateLandmark(const LLSD& key);
~LLFloaterCreateLandmark();
- BOOL postBuild();
- void onOpen(const LLSD& key);
+ bool postBuild() override;
+ void onOpen(const LLSD& key) override;
void setItem(const uuid_set_t& items);
void updateItem(const uuid_set_t& items, U32 mask);
diff --git a/indra/newview/llfloaterdeleteprefpreset.cpp b/indra/newview/llfloaterdeleteprefpreset.cpp
index 819b2bcee2..46fd1c5288 100644
--- a/indra/newview/llfloaterdeleteprefpreset.cpp
+++ b/indra/newview/llfloaterdeleteprefpreset.cpp
@@ -42,7 +42,7 @@ LLFloaterDeletePrefPreset::LLFloaterDeletePrefPreset(const LLSD &key)
}
// virtual
-BOOL LLFloaterDeletePrefPreset::postBuild()
+bool LLFloaterDeletePrefPreset::postBuild()
{
LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences");
if (preferences)
@@ -53,7 +53,7 @@ BOOL LLFloaterDeletePrefPreset::postBuild()
getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterDeletePrefPreset::onBtnCancel, this));
LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterDeletePrefPreset::onPresetsListChange, this));
- return TRUE;
+ return true;
}
void LLFloaterDeletePrefPreset::onOpen(const LLSD& key)
diff --git a/indra/newview/llfloaterdeleteprefpreset.h b/indra/newview/llfloaterdeleteprefpreset.h
index 0ab3da7139..e10bd79c81 100644
--- a/indra/newview/llfloaterdeleteprefpreset.h
+++ b/indra/newview/llfloaterdeleteprefpreset.h
@@ -38,8 +38,8 @@ class LLFloaterDeletePrefPreset : public LLFloater
public:
LLFloaterDeletePrefPreset(const LLSD &key);
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void onOpen(const LLSD& key);
+ bool postBuild() override;
+ void onOpen(const LLSD& key) override;
void onBtnDelete();
void onBtnCancel();
diff --git a/indra/newview/llfloaterdestinations.cpp b/indra/newview/llfloaterdestinations.cpp
index af21cb593f..5dcf68d864 100644
--- a/indra/newview/llfloaterdestinations.cpp
+++ b/indra/newview/llfloaterdestinations.cpp
@@ -45,10 +45,10 @@ LLFloaterDestinations::~LLFloaterDestinations()
{
}
-BOOL LLFloaterDestinations::postBuild()
+bool LLFloaterDestinations::postBuild()
{
enableResizeCtrls(true, true, false);
- return TRUE;
+ return true;
}
diff --git a/indra/newview/llfloaterdestinations.h b/indra/newview/llfloaterdestinations.h
index 85d9b3391e..b659ff4df7 100644
--- a/indra/newview/llfloaterdestinations.h
+++ b/indra/newview/llfloaterdestinations.h
@@ -36,8 +36,8 @@ class LLFloaterDestinations:
friend class LLFloaterReg;
private:
LLFloaterDestinations(const LLSD& key);
- /*virtual*/ ~LLFloaterDestinations();
- /*virtual*/ BOOL postBuild();
+ ~LLFloaterDestinations();
+ bool postBuild() override;
};
#endif
diff --git a/indra/newview/llfloaterdisplayname.cpp b/indra/newview/llfloaterdisplayname.cpp
index ad2533debc..b92206218f 100644
--- a/indra/newview/llfloaterdisplayname.cpp
+++ b/indra/newview/llfloaterdisplayname.cpp
@@ -45,7 +45,7 @@ class LLFloaterDisplayName : public LLFloater
public:
LLFloaterDisplayName(const LLSD& key);
virtual ~LLFloaterDisplayName() { }
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
void onSave();
void onReset();
void onCancel();
@@ -87,7 +87,7 @@ void LLFloaterDisplayName::onOpen(const LLSD& key)
getChild<LLUICtrl>("save_btn")->setEnabled(false);
getChild<LLUICtrl>("display_name_editor")->setEnabled(false);
getChild<LLUICtrl>("display_name_confirm")->setEnabled(false);
- getChild<LLUICtrl>("cancel_btn")->setFocus(TRUE);
+ getChild<LLUICtrl>("cancel_btn")->setFocus(true);
}
else
@@ -100,7 +100,7 @@ void LLFloaterDisplayName::onOpen(const LLSD& key)
}
}
-BOOL LLFloaterDisplayName::postBuild()
+bool LLFloaterDisplayName::postBuild()
{
getChild<LLUICtrl>("reset_btn")->setCommitCallback(boost::bind(&LLFloaterDisplayName::onReset, this));
getChild<LLUICtrl>("cancel_btn")->setCommitCallback(boost::bind(&LLFloaterDisplayName::onCancel, this));
@@ -108,7 +108,7 @@ BOOL LLFloaterDisplayName::postBuild()
center();
- return TRUE;
+ return true;
}
void LLFloaterDisplayName::onCacheSetName(bool success,
@@ -171,7 +171,7 @@ void LLFloaterDisplayName::onReset()
{
// UI is enabled, fill the first field
getChild<LLUICtrl>("display_name_confirm")->clear();
- getChild<LLUICtrl>("display_name_confirm")->setFocus(TRUE);
+ getChild<LLUICtrl>("display_name_confirm")->setFocus(true);
}
else
{
diff --git a/indra/newview/llfloatereditenvironmentbase.cpp b/indra/newview/llfloatereditenvironmentbase.cpp
index e7e0ff717e..07bc5701cf 100644
--- a/indra/newview/llfloatereditenvironmentbase.cpp
+++ b/indra/newview/llfloatereditenvironmentbase.cpp
@@ -443,7 +443,7 @@ void LLFloaterEditEnvironmentBase::onInventoryCreated(LLUUID asset_id, LLUUID in
}
clearDirtyFlag();
- setFocus(TRUE); // Call back the focus...
+ setFocus(true); // Call back the focus...
loadInventoryItem(inventory_id, can_trans);
}
diff --git a/indra/newview/llfloatereditenvironmentbase.h b/indra/newview/llfloatereditenvironmentbase.h
index d900d7f003..96cb37c6ee 100644
--- a/indra/newview/llfloatereditenvironmentbase.h
+++ b/indra/newview/llfloatereditenvironmentbase.h
@@ -57,7 +57,7 @@ public:
virtual LLSettingsBase::ptr_t getEditSettings() const = 0;
- virtual BOOL isDirty() const override { return getIsDirty(); }
+ virtual bool isDirty() const override { return getIsDirty(); }
protected:
typedef std::function<void()> on_confirm_fn;
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index 4e764674e5..00e4961f6a 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -203,7 +203,7 @@ LLFloaterEditExtDayCycle::~LLFloaterEditExtDayCycle()
}
// virtual
-BOOL LLFloaterEditExtDayCycle::postBuild()
+bool LLFloaterEditExtDayCycle::postBuild()
{
getChild<LLLineEditor>(TXT_DAY_NAME)->setKeystrokeCallback(boost::bind(&LLFloaterEditExtDayCycle::onCommitName, this, _1, _2), NULL);
@@ -264,7 +264,7 @@ BOOL LLFloaterEditExtDayCycle::postBuild()
panel->setOnDirtyFlagChanged([this](LLPanel *, bool val) { onPanelDirtyFlagChanged(val); });
}
- return TRUE;
+ return true;
}
void LLFloaterEditExtDayCycle::onOpen(const LLSD& key)
@@ -423,7 +423,7 @@ void LLFloaterEditExtDayCycle::onClose(bool app_quitting)
}
-void LLFloaterEditExtDayCycle::onVisibilityChange(BOOL new_visibility)
+void LLFloaterEditExtDayCycle::onVisibilityChange(bool new_visibility)
{
}
@@ -534,7 +534,7 @@ void LLFloaterEditExtDayCycle::setEditName(const std::string &name)
}
/* virtual */
-BOOL LLFloaterEditExtDayCycle::handleKeyUp(KEY key, MASK mask, BOOL called_from_parent)
+bool LLFloaterEditExtDayCycle::handleKeyUp(KEY key, MASK mask, bool called_from_parent)
{
if (!mEditDay)
{
@@ -890,7 +890,7 @@ void LLFloaterEditExtDayCycle::onFrameSliderCallback(const LLSD &data)
keymap_t::iterator it = mSliderKeyMap.find(curslider);
if (it != mSliderKeyMap.end())
{
- if (gKeyboard->currentMask(TRUE) == MASK_SHIFT && mShiftCopyEnabled && mCanMod)
+ if (gKeyboard->currentMask(true) == MASK_SHIFT && mShiftCopyEnabled && mCanMod)
{
// don't move the point/frame as long as shift is pressed and user is attempting to copy
// handleKeyUp will do the move if user releases key too early.
@@ -961,7 +961,7 @@ void LLFloaterEditExtDayCycle::onFrameSliderMouseDown(S32 x, S32 y, MASK mask)
std::string slidername = mFramesSlider->getCurSlider();
- mShiftCopyEnabled = !slidername.empty() && gKeyboard->currentMask(TRUE) == MASK_SHIFT;
+ mShiftCopyEnabled = !slidername.empty() && gKeyboard->currentMask(true) == MASK_SHIFT;
if (!slidername.empty())
{
@@ -1213,7 +1213,7 @@ void LLFloaterEditExtDayCycle::updateButtons()
mDeleteFrameButton->setEnabled(can_manipulate && isRemovingFrameAllowed());
mLoadFrame->setEnabled(can_manipulate);
- BOOL enable_play = mEditDay ? TRUE : FALSE;
+ bool enable_play = mEditDay ? true : false;
childSetEnabled(BTN_PLAY, enable_play);
childSetEnabled(BTN_SKIP_BACK, enable_play);
childSetEnabled(BTN_SKIP_FORWARD, enable_play);
@@ -1562,8 +1562,8 @@ void LLFloaterEditExtDayCycle::startPlay()
gIdleCallbacks.addFunction(onIdlePlay, this);
mPlayStartFrame = mTimeSlider->getCurSliderValue();
- getChild<LLView>("play_layout", true)->setVisible(FALSE);
- getChild<LLView>("pause_layout", true)->setVisible(TRUE);
+ getChild<LLView>("play_layout", true)->setVisible(false);
+ getChild<LLView>("pause_layout", true)->setVisible(true);
}
void LLFloaterEditExtDayCycle::stopPlay()
@@ -1577,8 +1577,8 @@ void LLFloaterEditExtDayCycle::stopPlay()
F32 frame = mTimeSlider->getCurSliderValue();
selectFrame(frame, LLSettingsDay::DEFAULT_FRAME_SLOP_FACTOR);
- getChild<LLView>("play_layout", true)->setVisible(TRUE);
- getChild<LLView>("pause_layout", true)->setVisible(FALSE);
+ getChild<LLView>("play_layout", true)->setVisible(true);
+ getChild<LLView>("pause_layout", true)->setVisible(false);
}
//static
@@ -1698,7 +1698,7 @@ void LLFloaterEditExtDayCycle::doOpenInventoryFloater(LLSettingsType::type_e typ
picker->setTrackMode(LLFloaterSettingsPicker::TRACK_NONE);
}
picker->openFloater();
- picker->setFocus(TRUE);
+ picker->setFocus(true);
}
void LLFloaterEditExtDayCycle::onPickerCommitSetting(LLUUID item_id, S32 track)
diff --git a/indra/newview/llfloatereditextdaycycle.h b/indra/newview/llfloatereditextdaycycle.h
index 025a2ee5d1..e9acec0d12 100644
--- a/indra/newview/llfloatereditextdaycycle.h
+++ b/indra/newview/llfloatereditextdaycycle.h
@@ -79,12 +79,12 @@ public:
LLFloaterEditExtDayCycle(const LLSD &key);
virtual ~LLFloaterEditExtDayCycle();
- virtual BOOL postBuild() override;
+ virtual bool postBuild() override;
virtual void onOpen(const LLSD& key) override;
virtual void onClose(bool app_quitting) override;
//virtual void onFocusReceived() override;
//virtual void onFocusLost() override;
- virtual void onVisibilityChange(BOOL new_visibility) override;
+ virtual void onVisibilityChange(bool new_visibility) override;
connection_t setEditCommitSignal(edit_commit_signal_t::slot_type cb);
@@ -100,7 +100,7 @@ public:
virtual LLSettingsBase::ptr_t getEditSettings() const override { return mEditDay; }
- BOOL handleKeyUp(KEY key, MASK mask, BOOL called_from_parent) override;
+ bool handleKeyUp(KEY key, MASK mask, bool called_from_parent) override;
protected:
virtual void setEditSettingsAndUpdate(const LLSettingsBase::ptr_t &settings) override;
diff --git a/indra/newview/llfloatereditsky.cpp b/indra/newview/llfloatereditsky.cpp
deleted file mode 100644
index fa51143f3a..0000000000
--- a/indra/newview/llfloatereditsky.cpp
+++ /dev/null
@@ -1,699 +0,0 @@
-/**
- * @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"
-
-#include <boost/make_shared.hpp>
-
-// 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"
-#include "lljoystickbutton.h"
-
-// newview
-#include "llagent.h"
-#include "llcolorswatch.h"
-#include "llregioninfomodel.h"
-#include "llviewerregion.h"
-
-#include "v3colorutil.h"
-#include "llenvironment.h"
-#include "llenvadapters.h"
-
-namespace
-{
- const F32 WL_SUN_AMBIENT_SLIDER_SCALE(3.0f);
- const F32 WL_BLUE_HORIZON_DENSITY_SCALE(2.0f);
- const F32 WL_CLOUD_SLIDER_SCALE(1.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),
- mSkyAdapter()
-{
-}
-
-// 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");
- mSkyAdapter = std::make_shared<LLSkySettingsAdapter>();
-
- LLEnvironment::instance().setSkyListChange(boost::bind(&LLFloaterEditSky::onSkyPresetListChange, this));
-
- 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
- {
- LLEnvironment::instance().clearEnvironment(LLEnvironment::ENV_EDIT);
- LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
- }
-}
-
-// 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));
-
- // Connect to region info updates.
- LLRegionInfoModel::instance().setUpdateCallback(boost::bind(&LLFloaterEditSky::onRegionInfoUpdate, this));
-
- // sunlight
- getChild<LLUICtrl>("WLSunlight")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &mSkyAdapter->mSunlight));
-
- // glow
- getChild<LLUICtrl>("WLGlowR")->setCommitCallback(boost::bind(&LLFloaterEditSky::onGlowRMoved, this, _1, &mSkyAdapter->mGlow));
- getChild<LLUICtrl>("WLGlowB")->setCommitCallback(boost::bind(&LLFloaterEditSky::onGlowBMoved, this, _1, &mSkyAdapter->mGlow));
-
- // time of day
-// getChild<LLUICtrl>("WLSunPos")->setCommitCallback(boost::bind(&LLFloaterEditSky::onSunMoved, this, _1, &mSkyAdapter->mLightnorm)); // multi-slider
-// getChild<LLTimeCtrl>("WLDayTime")->setCommitCallback(boost::bind(&LLFloaterEditSky::onTimeChanged, this)); // time ctrl
-// getChild<LLUICtrl>("WLEastAngle")->setCommitCallback(boost::bind(&LLFloaterEditSky::onSunMoved, this, _1, &mSkyAdapter->mLightnorm));
- getChild<LLJoystickQuaternion>("WLSunRotation")->setCommitCallback(boost::bind(&LLFloaterEditSky::onSunRotationChanged, this));
- getChild<LLJoystickQuaternion>("WLMoonRotation")->setCommitCallback(boost::bind(&LLFloaterEditSky::onMoonRotationChanged, this));
-
- // Clouds
-
- // Cloud Color
- getChild<LLUICtrl>("WLCloudColor")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &mSkyAdapter->mCloudColor));
-
- // Cloud
- getChild<LLUICtrl>("WLCloudX")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlRMoved, this, _1, &mSkyAdapter->mCloudMain));
- getChild<LLUICtrl>("WLCloudY")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlGMoved, this, _1, &mSkyAdapter->mCloudMain));
- getChild<LLUICtrl>("WLCloudDensity")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlBMoved, this, _1, &mSkyAdapter->mCloudMain));
-
- // Cloud Detail
- getChild<LLUICtrl>("WLCloudDetailX")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlRMoved, this, _1, &mSkyAdapter->mCloudDetail));
- getChild<LLUICtrl>("WLCloudDetailY")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlGMoved, this, _1, &mSkyAdapter->mCloudDetail));
- getChild<LLUICtrl>("WLCloudDetailDensity")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlBMoved, this, _1, &mSkyAdapter->mCloudDetail));
-
- // Cloud extras
- getChild<LLUICtrl>("WLCloudCoverage")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mCloudCoverage));
- getChild<LLUICtrl>("WLCloudScale")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mCloudScale));
- getChild<LLUICtrl>("WLCloudScrollX")->setCommitCallback(boost::bind(&LLFloaterEditSky::onCloudScrollXMoved, this, _1));
- getChild<LLUICtrl>("WLCloudScrollY")->setCommitCallback(boost::bind(&LLFloaterEditSky::onCloudScrollYMoved, this, _1));
-
-
- // Dome
- getChild<LLUICtrl>("WLGamma")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mWLGamma));
- getChild<LLUICtrl>("WLStarAlpha")->setCommitCallback(boost::bind(&LLFloaterEditSky::onStarAlphaMoved, this, _1));
-}
-
-//=================================================================================================
-
-void LLFloaterEditSky::syncControls()
-{
- LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky();
- mEditSettings = psky;
-
- std::string name = psky->getName();
-
- mSkyPresetNameEditor->setText(name);
- mSkyPresetCombo->setValue(name);
-
- // Lighting
-
- // sunlight
- mSkyAdapter->mSunlight.setColor3( psky->getSunlightColor() );
- setColorSwatch("WLSunlight", mSkyAdapter->mSunlight, WL_SUN_AMBIENT_SLIDER_SCALE);
-
- // glow
- mSkyAdapter->mGlow.setColor3( psky->getGlow() );
- childSetValue("WLGlowR", 2 - mSkyAdapter->mGlow.getRed() / 20.0f);
- childSetValue("WLGlowB", -mSkyAdapter->mGlow.getBlue() / 5.0f);
-
-// LLSettingsSky::azimalt_t azal = psky->getSunRotationAzAl();
-//
-// F32 time24 = sun_pos_to_time24(azal.second / F_TWO_PI);
-// getChild<LLMultiSliderCtrl>("WLSunPos")->setCurSliderValue(time24, TRUE);
-// getChild<LLTimeCtrl>("WLDayTime")->setTime24(time24);
-// childSetValue("WLEastAngle", azal.first / F_TWO_PI);
- getChild<LLJoystickQuaternion>("WLSunRotation")->setRotation(psky->getSunRotation());
- getChild<LLJoystickQuaternion>("WLMoonRotation")->setRotation(psky->getMoonRotation());
-
- // Clouds
-
- // Cloud Color
- mSkyAdapter->mCloudColor.setColor3( psky->getCloudColor() );
- setColorSwatch("WLCloudColor", mSkyAdapter->mCloudColor, WL_CLOUD_SLIDER_SCALE);
-
- // Cloud
- mSkyAdapter->mCloudMain.setColor3( psky->getCloudPosDensity1() );
- childSetValue("WLCloudX", mSkyAdapter->mCloudMain.getRed());
- childSetValue("WLCloudY", mSkyAdapter->mCloudMain.getGreen());
- childSetValue("WLCloudDensity", mSkyAdapter->mCloudMain.getBlue());
-
- // Cloud Detail
- mSkyAdapter->mCloudDetail.setColor3( psky->getCloudPosDensity2() );
- childSetValue("WLCloudDetailX", mSkyAdapter->mCloudDetail.getRed());
- childSetValue("WLCloudDetailY", mSkyAdapter->mCloudDetail.getGreen());
- childSetValue("WLCloudDetailDensity", mSkyAdapter->mCloudDetail.getBlue());
-
- // Cloud extras
- mSkyAdapter->mCloudCoverage = psky->getCloudShadow();
- mSkyAdapter->mCloudScale = psky->getCloudScale();
- childSetValue("WLCloudCoverage", (F32) mSkyAdapter->mCloudCoverage);
- childSetValue("WLCloudScale", (F32) mSkyAdapter->mCloudScale);
-
- // cloud scrolling
- LLVector2 scroll_rate = psky->getCloudScrollRate();
-
- // LAPRAS: These should go away...
- childDisable("WLCloudLockX");
- childDisable("WLCloudLockY");
-
- // disable if locked, enable if not
- childEnable("WLCloudScrollX");
- childEnable("WLCloudScrollY");
-
- // *HACK cloud scrolling is off my an additive of 10
- childSetValue("WLCloudScrollX", scroll_rate[0] - 10.0f);
- childSetValue("WLCloudScrollY", scroll_rate[1] - 10.0f);
-
- // Tweak extras
-
- mSkyAdapter->mWLGamma = psky->getGamma();
- childSetValue("WLGamma", (F32) mSkyAdapter->mWLGamma);
-
- childSetValue("WLStarAlpha", psky->getStarBrightness());
-}
-
-void LLFloaterEditSky::setColorSwatch(const std::string& name, const WLColorControl& from_ctrl, F32 k)
-{
- // Set the value, dividing it by <k> first.
- LLColor4 color = from_ctrl.getColor4();
- getChild<LLColorSwatchCtrl>(name)->set(color / k);
-}
-
-// color control callbacks
-void LLFloaterEditSky::onColorControlMoved(LLUICtrl* ctrl, WLColorControl* color_ctrl)
-{
- LLColorSwatchCtrl* swatch = static_cast<LLColorSwatchCtrl*>(ctrl);
- LLColor4 color_vec(swatch->get().mV);
-
- // Multiply RGB values by the appropriate factor.
- F32 k = WL_CLOUD_SLIDER_SCALE;
- if (color_ctrl->getIsSunOrAmbientColor())
- {
- k = WL_SUN_AMBIENT_SLIDER_SCALE;
- }
- else if (color_ctrl->getIsBlueHorizonOrDensity())
- {
- k = WL_BLUE_HORIZON_DENSITY_SCALE;
- }
-
- color_vec *= k; // intensity isn't affected by the multiplication
-
- // Set intensity to maximum of the RGB values.
- color_vec.mV[3] = color_max(color_vec);
-
- // Apply the new RGBI value.
- color_ctrl->setColor4(color_vec);
- color_ctrl->update(mEditSettings);
-}
-
-void LLFloaterEditSky::onColorControlRMoved(LLUICtrl* ctrl, void* userdata)
-{
- LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
- WLColorControl* color_ctrl = static_cast<WLColorControl *>(userdata);
-
- F32 red_value = sldr_ctrl->getValueF32();
- F32 k = 1.0f;
-
- if (color_ctrl->getIsSunOrAmbientColor())
- {
- k = WL_SUN_AMBIENT_SLIDER_SCALE;
- }
- if (color_ctrl->getIsBlueHorizonOrDensity())
- {
- k = WL_BLUE_HORIZON_DENSITY_SCALE;
- }
- color_ctrl->setRed(red_value * k);
-
- adjustIntensity(color_ctrl, red_value, k);
- color_ctrl->update(mEditSettings);
-}
-
-void LLFloaterEditSky::onColorControlGMoved(LLUICtrl* ctrl, void* userdata)
-{
- LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
- WLColorControl* color_ctrl = static_cast<WLColorControl *>(userdata);
-
- F32 green_value = sldr_ctrl->getValueF32();
- F32 k = 1.0f;
-
- if (color_ctrl->getIsSunOrAmbientColor())
- {
- k = WL_SUN_AMBIENT_SLIDER_SCALE;
- }
- if (color_ctrl->getIsBlueHorizonOrDensity())
- {
- k = WL_BLUE_HORIZON_DENSITY_SCALE;
- }
- color_ctrl->setGreen(green_value * k);
-
- adjustIntensity(color_ctrl, green_value, k);
- color_ctrl->update(mEditSettings);
-}
-
-void LLFloaterEditSky::onColorControlBMoved(LLUICtrl* ctrl, void* userdata)
-{
- LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
- WLColorControl* color_ctrl = static_cast<WLColorControl *>(userdata);
-
- F32 blue_value = sldr_ctrl->getValueF32();
- F32 k = 1.0f;
-
- if (color_ctrl->getIsSunOrAmbientColor())
- {
- k = WL_SUN_AMBIENT_SLIDER_SCALE;
- }
- if (color_ctrl->getIsBlueHorizonOrDensity())
- {
- k = WL_BLUE_HORIZON_DENSITY_SCALE;
- }
- color_ctrl->setBlue(blue_value * k);
-
- adjustIntensity(color_ctrl, blue_value, k);
- color_ctrl->update(mEditSettings);
-}
-
-void LLFloaterEditSky::adjustIntensity(WLColorControl *ctrl, F32 val, F32 scale)
-{
- if (ctrl->getHasSliderName())
- {
- LLColor4 color = ctrl->getColor4();
- F32 i = color_max(color) / scale;
- ctrl->setIntensity(i);
- std::string name = ctrl->getSliderName();
- name.append("I");
-
- childSetValue(name, i);
- }
-}
-
-
-/// GLOW SPECIFIC CODE
-void LLFloaterEditSky::onGlowRMoved(LLUICtrl* ctrl, void* userdata)
-{
-
- LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
- WLColorControl* color_ctrl = static_cast<WLColorControl *>(userdata);
-
- // scaled by 20
- color_ctrl->setRed((2 - sldr_ctrl->getValueF32()) * 20);
-
- color_ctrl->update(mEditSettings);
-}
-
-/// \NOTE that we want NEGATIVE (-) B
-void LLFloaterEditSky::onGlowBMoved(LLUICtrl* ctrl, void* userdata)
-{
- 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->setBlue(-sldr_ctrl->getValueF32() * 5);
-
- color_ctrl->update(mEditSettings);
-}
-
-void LLFloaterEditSky::onFloatControlMoved(LLUICtrl* ctrl, void* userdata)
-{
- LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
- WLFloatControl * floatControl = static_cast<WLFloatControl *>(userdata);
-
- floatControl->setValue(sldr_ctrl->getValueF32() / floatControl->getMult());
-
- floatControl->update(mEditSettings);
-}
-
-
-// Lighting callbacks
-
-// time of day
-void LLFloaterEditSky::onSunMoved(LLUICtrl* ctrl, void* userdata)
-{
- 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
- F32 azimuth = F_TWO_PI * east_sldr->getValueF32();
- F32 altitude = F_TWO_PI * time24_to_sun_pos(time24);
- mEditSettings->setSunRotation(azimuth, altitude);
- mEditSettings->setMoonRotation(azimuth + F_PI, -altitude);
-
- LLVector4 sunnorm( mEditSettings->getSunDirection(), 1.f );
-
- color_ctrl->update(mEditSettings);
-}
-
-void LLFloaterEditSky::onTimeChanged()
-{
- F32 time24 = getChild<LLTimeCtrl>("WLDayTime")->getTime24();
- getChild<LLMultiSliderCtrl>("WLSunPos")->setCurSliderValue(time24, TRUE);
- onSunMoved(getChild<LLUICtrl>("WLSunPos"), &(mSkyAdapter->mLightnorm));
-}
-
-void LLFloaterEditSky::onSunRotationChanged()
-{
- LLJoystickQuaternion* sun_spinner = getChild<LLJoystickQuaternion>("WLSunRotation");
- LLQuaternion sunrot(sun_spinner->getRotation());
-
- mEditSettings->setSunRotation(sunrot);
-}
-
-void LLFloaterEditSky::onMoonRotationChanged()
-{
- LLJoystickQuaternion* moon_spinner = getChild<LLJoystickQuaternion>("WLMoonRotation");
- LLQuaternion moonrot(moon_spinner->getRotation());
-
- mEditSettings->setMoonRotation(moonrot);
-}
-
-void LLFloaterEditSky::onStarAlphaMoved(LLUICtrl* ctrl)
-{
- LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
-
- mEditSettings->setStarBrightness(sldr_ctrl->getValueF32());
-}
-
-// Clouds
-void LLFloaterEditSky::onCloudScrollXMoved(LLUICtrl* ctrl)
-{
- LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
- // *HACK all cloud scrolling is off by an additive of 10.
- mEditSettings->setCloudScrollRateX(sldr_ctrl->getValueF32() + 10.0f);
-}
-
-void LLFloaterEditSky::onCloudScrollYMoved(LLUICtrl* ctrl)
-{
- LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
-
- // *HACK all cloud scrolling is off by an additive of 10.
- mEditSettings->setCloudScrollRateY(sldr_ctrl->getValueF32() + 10.0f);
-}
-
-//=================================================================================================
-
-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();
-
- LLEnvironment::list_name_id_t list = LLEnvironment::instance().getSkyList();
-
- for (LLEnvironment::list_name_id_t::iterator it = list.begin(); it != list.end(); ++it)
- {
- mSkyPresetCombo->add((*it).first, llsd::array((*it).first, (*it).second));
- }
-
- 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()
-{
-#if 0
- LLWLParamKey key(getSelectedSkyPreset());
- llassert(key.scope == LLEnvKey::SCOPE_REGION);
-
- LL_DEBUGS("Windlight") << "Saving region sky preset: " << key.name << LL_ENDL;
- 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;
-#endif
-}
-
-std::string LLFloaterEditSky::getSelectedPresetName() const
-{
- std::string name;
- if (mSkyPresetNameEditor->getVisible())
- {
- name = mSkyPresetNameEditor->getText();
- }
- else
- {
- LLSD combo_val = mSkyPresetCombo->getValue();
- name = combo_val[0].asString();
- }
-
- return name;
-}
-
-void LLFloaterEditSky::onSkyPresetNameEdited()
-{
- std::string name = mSkyPresetNameEditor->getText();
- LLSettingsWater::ptr_t psky = LLEnvironment::instance().getCurrentWater();
-
- psky->setName(name);
-}
-
-void LLFloaterEditSky::onSkyPresetSelected()
-{
- std::string name;
-
- name = getSelectedPresetName();
-
- LLSettingsSky::ptr_t psky = LLEnvironment::instance().findSkyByName(name);
-
- if (!psky)
- {
- LL_WARNS("WATEREDIT") << "Could not find water preset" << LL_ENDL;
- enableEditing(false);
- return;
- }
-
- psky = psky->buildClone();
- LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_EDIT, psky);
- mEditSettings = psky;
-
- syncControls();
- enableEditing(true);
-
-}
-
-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 currently displayed water params to the selected preset.
- std::string name = mEditSettings->getName();
-
- LL_DEBUGS("Windlight") << "Saving sky preset " << name << LL_ENDL;
-
- LLEnvironment::instance().addSky(mEditSettings);
-
- // Change preference if requested.
- if (mMakeDefaultCheckBox->getEnabled() && mMakeDefaultCheckBox->getValue())
- {
- LL_DEBUGS("Windlight") << name << " is now the new preferred sky preset" << LL_ENDL;
- LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, mEditSettings);
- }
-
- closeFloater();
-}
-
-void LLFloaterEditSky::onBtnSave()
-{
- LLEnvironment::instance().addSky(mEditSettings);
- LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, mEditSettings);
-
- closeFloater();
-}
-
-void LLFloaterEditSky::onBtnCancel()
-{
- closeFloater();
-}
-
-void LLFloaterEditSky::onSkyPresetListChange()
-{
- refreshSkyPresetsList();
-}
-
-void LLFloaterEditSky::onRegionSettingsChange()
-{
-#if 0
- // 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();
- }
-#endif
-}
-
-void LLFloaterEditSky::onRegionInfoUpdate()
-{
-#if 0
- 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);
-#endif
-}
diff --git a/indra/newview/llfloatereditwater.cpp b/indra/newview/llfloatereditwater.cpp
deleted file mode 100644
index 4a6268435b..0000000000
--- a/indra/newview/llfloatereditwater.cpp
+++ /dev/null
@@ -1,526 +0,0 @@
-/**
- * @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"
-
-#include <boost/make_shared.hpp>
-
-// 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 "llenvironment.h"
-#include "llsettingswater.h"
-#include "llenvadapters.h"
-
-#include "v3colorutil.h"
-
-#undef max // Fixes a Windows compiler error
-
-LLFloaterEditWater::LLFloaterEditWater(const LLSD &key):
- LLFloater(key),
- mWaterPresetNameEditor(NULL),
- mWaterPresetCombo(NULL),
- mMakeDefaultCheckBox(NULL),
- mSaveButton(NULL),
- mWaterAdapter()
-{
-}
-
-// 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");
-
- mWaterAdapter = std::make_shared<LLWatterSettingsAdapter>();
-
- LLEnvironment::instance().setWaterListChange(boost::bind(&LLFloaterEditWater::onWaterPresetListChange, this));
-
- 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
- {
- LLEnvironment::instance().clearEnvironment(LLEnvironment::ENV_EDIT);
- LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
- }
-}
-
-// 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));
-
- // Connect to region info updates.
- LLRegionInfoModel::instance().setUpdateCallback(boost::bind(&LLFloaterEditWater::onRegionInfoUpdate, this));
-
- //-------------------------------------------------------------------------
-
- getChild<LLUICtrl>("WaterFogColor")->setCommitCallback(boost::bind(&LLFloaterEditWater::onColorControlMoved, this, _1, &mWaterAdapter->mFogColor));
-
- // fog density
- getChild<LLUICtrl>("WaterFogDensity")->setCommitCallback(boost::bind(&LLFloaterEditWater::onExpFloatControlMoved, this, _1, &mWaterAdapter->mFogDensity));
- getChild<LLUICtrl>("WaterUnderWaterFogMod")->setCommitCallback(boost::bind(&LLFloaterEditWater::onFloatControlMoved, this, _1, &mWaterAdapter->mUnderWaterFogMod));
-
- // blue density
- getChild<LLUICtrl>("WaterNormalScaleX")->setCommitCallback(boost::bind(&LLFloaterEditWater::onVector3ControlXMoved, this, _1, &mWaterAdapter->mNormalScale));
- getChild<LLUICtrl>("WaterNormalScaleY")->setCommitCallback(boost::bind(&LLFloaterEditWater::onVector3ControlYMoved, this, _1, &mWaterAdapter->mNormalScale));
- getChild<LLUICtrl>("WaterNormalScaleZ")->setCommitCallback(boost::bind(&LLFloaterEditWater::onVector3ControlZMoved, this, _1, &mWaterAdapter->mNormalScale));
-
- // fresnel
- getChild<LLUICtrl>("WaterFresnelScale")->setCommitCallback(boost::bind(&LLFloaterEditWater::onFloatControlMoved, this, _1, &mWaterAdapter->mFresnelScale));
- getChild<LLUICtrl>("WaterFresnelOffset")->setCommitCallback(boost::bind(&LLFloaterEditWater::onFloatControlMoved, this, _1, &mWaterAdapter->mFresnelOffset));
-
- // scale above/below
- getChild<LLUICtrl>("WaterScaleAbove")->setCommitCallback(boost::bind(&LLFloaterEditWater::onFloatControlMoved, this, _1, &mWaterAdapter->mScaleAbove));
- getChild<LLUICtrl>("WaterScaleBelow")->setCommitCallback(boost::bind(&LLFloaterEditWater::onFloatControlMoved, this, _1, &mWaterAdapter->mScaleBelow));
-
- // blur mult
- getChild<LLUICtrl>("WaterBlurMult")->setCommitCallback(boost::bind(&LLFloaterEditWater::onFloatControlMoved, this, _1, &mWaterAdapter->mBlurMultiplier));
-
- // wave direction
- getChild<LLUICtrl>("WaterWave1DirX")->setCommitCallback(boost::bind(&LLFloaterEditWater::onVector2ControlXMoved, this, _1, &mWaterAdapter->mWave1Dir));
- getChild<LLUICtrl>("WaterWave1DirY")->setCommitCallback(boost::bind(&LLFloaterEditWater::onVector2ControlYMoved, this, _1, &mWaterAdapter->mWave1Dir));
- getChild<LLUICtrl>("WaterWave2DirX")->setCommitCallback(boost::bind(&LLFloaterEditWater::onVector2ControlXMoved, this, _1, &mWaterAdapter->mWave2Dir));
- getChild<LLUICtrl>("WaterWave2DirY")->setCommitCallback(boost::bind(&LLFloaterEditWater::onVector2ControlYMoved, this, _1, &mWaterAdapter->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.
-
- LLSettingsWater::ptr_t pwater = LLEnvironment::instance().getCurrentWater();
- mEditSettings = pwater;
-
- std::string name = pwater->getName();
- mWaterPresetNameEditor->setText(name);
- mWaterPresetCombo->setValue(name);
-
- //getChild<LLUICtrl>("WaterGlow")->setValue(col.mV[3]);
- getChild<LLColorSwatchCtrl>("WaterFogColor")->set(LLColor4(pwater->getWaterFogColor()));
-
- // fog and wavelets
- mWaterAdapter->mFogDensity = pwater->getWaterFogDensity();
- getChild<LLUICtrl>("WaterFogDensity")->setValue(mWaterAdapter->mFogDensity.getExp());
-
- mWaterAdapter->mUnderWaterFogMod = pwater->getFogMod();
- getChild<LLUICtrl>("WaterUnderWaterFogMod")->setValue(static_cast<F32>(mWaterAdapter->mUnderWaterFogMod));
-
- mWaterAdapter->mNormalScale = pwater->getNormalScale();
- getChild<LLUICtrl>("WaterNormalScaleX")->setValue(mWaterAdapter->mNormalScale.getX());
- getChild<LLUICtrl>("WaterNormalScaleY")->setValue(mWaterAdapter->mNormalScale.getY());
- getChild<LLUICtrl>("WaterNormalScaleZ")->setValue(mWaterAdapter->mNormalScale.getZ());
-
- // Fresnel
- mWaterAdapter->mFresnelScale = pwater->getFresnelScale();
- getChild<LLUICtrl>("WaterFresnelScale")->setValue(static_cast<F32>(mWaterAdapter->mFresnelScale));
- mWaterAdapter->mFresnelOffset = pwater->getFresnelOffset();
- getChild<LLUICtrl>("WaterFresnelOffset")->setValue(static_cast<F32>(mWaterAdapter->mFresnelOffset));
-
- // Scale Above/Below
- mWaterAdapter->mScaleAbove = pwater->getScaleAbove();
- getChild<LLUICtrl>("WaterScaleAbove")->setValue(static_cast<F32>(mWaterAdapter->mScaleAbove));
- mWaterAdapter->mScaleBelow = pwater->getScaleBelow();
- getChild<LLUICtrl>("WaterScaleBelow")->setValue(static_cast<F32>(mWaterAdapter->mScaleBelow));
-
- // blur mult
- mWaterAdapter->mBlurMultiplier = pwater->getBlurMultiplier();
- getChild<LLUICtrl>("WaterBlurMult")->setValue(static_cast<F32>(mWaterAdapter->mBlurMultiplier));
-
- // wave directions
- mWaterAdapter->mWave1Dir = pwater->getWave1Dir();
- getChild<LLUICtrl>("WaterWave1DirX")->setValue(mWaterAdapter->mWave1Dir.getU());
- getChild<LLUICtrl>("WaterWave1DirY")->setValue(mWaterAdapter->mWave1Dir.getV());
-
- mWaterAdapter->mWave2Dir = pwater->getWave2Dir();
- getChild<LLUICtrl>("WaterWave2DirX")->setValue(mWaterAdapter->mWave2Dir.getU());
- getChild<LLUICtrl>("WaterWave2DirY")->setValue(mWaterAdapter->mWave2Dir.getV());
-
- LLTextureCtrl* textCtrl = getChild<LLTextureCtrl>("WaterNormalMap");
- textCtrl->setImageAssetID(pwater->getNormalMapID());
-}
-
-
-// vector control callbacks
-void LLFloaterEditWater::onVector3ControlXMoved(LLUICtrl* ctrl, WLVect3Control* vector_ctrl)
-{
- LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
-
- vector_ctrl->setX( sldr_ctrl->getValueF32() );
- vector_ctrl->update(mEditSettings);
-}
-
-// vector control callbacks
-void LLFloaterEditWater::onVector3ControlYMoved(LLUICtrl* ctrl, WLVect3Control* vector_ctrl)
-{
- LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
-
- vector_ctrl->setY(sldr_ctrl->getValueF32());
- vector_ctrl->update(mEditSettings);
-}
-
-// vector control callbacks
-void LLFloaterEditWater::onVector3ControlZMoved(LLUICtrl* ctrl, WLVect3Control* vector_ctrl)
-{
- LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
-
- vector_ctrl->setZ(sldr_ctrl->getValueF32());
- vector_ctrl->update(mEditSettings);
-}
-
-
-// vector control callbacks
-void LLFloaterEditWater::onVector2ControlXMoved(LLUICtrl* ctrl, WLVect2Control* vector_ctrl)
-{
- LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
-
- vector_ctrl->setU(sldr_ctrl->getValueF32());
- vector_ctrl->update(mEditSettings);
-}
-
-// vector control callbacks
-void LLFloaterEditWater::onVector2ControlYMoved(LLUICtrl* ctrl, WLVect2Control* vector_ctrl)
-{
- LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
-
- vector_ctrl->setV(sldr_ctrl->getValueF32());
- vector_ctrl->update(mEditSettings);
-}
-
-void LLFloaterEditWater::onFloatControlMoved(LLUICtrl* ctrl, WLFloatControl* floatControl)
-{
- LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
-
- floatControl->setValue(sldr_ctrl->getValueF32());
- floatControl->update(mEditSettings);
-}
-
-void LLFloaterEditWater::onExpFloatControlMoved(LLUICtrl* ctrl, WLXFloatControl* expFloatControl)
-{
- LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
-
- expFloatControl->setExp(sldr_ctrl->getValueF32());
- expFloatControl->update(mEditSettings);
-}
-
-void LLFloaterEditWater::onColorControlMoved(LLUICtrl* ctrl, WLColorControl* color_ctrl)
-{
- LLColorSwatchCtrl* swatch = static_cast<LLColorSwatchCtrl*>(ctrl);
- color_ctrl->setColor4( swatch->get() );
- color_ctrl->update(mEditSettings);
-}
-
-void LLFloaterEditWater::onNormalMapPicked(LLUICtrl* ctrl)
-{
- LLTextureCtrl* textCtrl = static_cast<LLTextureCtrl*>(ctrl);
- LLUUID textID = textCtrl->getImageAssetID();
- mEditSettings->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();
-
- LLEnvironment::list_name_id_t list = LLEnvironment::instance().getWaterList();
-
- for (LLEnvironment::list_name_id_t::iterator it = list.begin(); it != list.end(); ++it)
- {
- mWaterPresetCombo->add((*it).first, llsd::array((*it).first, (*it).second));
- }
-
- 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()
-{
-#if 0
- llassert(getCurrentScope() == LLEnvKey::SCOPE_REGION); // make sure we're editing region water
-
- LL_DEBUGS("Windlight") << "Saving region water preset" << LL_ENDL;
-
- //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;
-#endif
-}
-
-#if 0
-std::string LLFloaterEditWater::getCurrentPresetName() const
-{
- std::string name;
- LLEnvKey::EScope scope;
- getSelectedPreset(name, scope);
- return name;
-}
-#endif
-
-#if 0
-LLEnvKey::EScope LLFloaterEditWater::getCurrentScope() const
-{
- std::string name;
- LLEnvKey::EScope scope;
- getSelectedPreset(name, scope);
- return scope;
-}
-#endif
-
-std::string LLFloaterEditWater::getSelectedPresetName() const
-{
- std::string name;
- if (mWaterPresetNameEditor->getVisible())
- {
- name = mWaterPresetNameEditor->getText();
- }
- else
- {
- LLSD combo_val = mWaterPresetCombo->getValue();
- name = combo_val[0].asString();
- }
-
- return name;
-}
-
-void LLFloaterEditWater::onWaterPresetNameEdited()
-{
- std::string name = mWaterPresetNameEditor->getText();
- LLSettingsWater::ptr_t pwater = LLEnvironment::instance().getCurrentWater();
-
- pwater->setName(name);
-#if 0
- // Disable saving a water preset having empty name.
- mSaveButton->setEnabled(!getCurrentPresetName().empty());
-#endif
-}
-
-void LLFloaterEditWater::onWaterPresetSelected()
-{
- std::string name;
-
- name = getSelectedPresetName();
-
- LLSettingsWater::ptr_t pwater = LLEnvironment::instance().findWaterByName(name);
-
- if (!pwater)
- {
- LL_WARNS("WATEREDIT") << "Could not find water preset" << LL_ENDL;
- enableEditing(false);
- return;
- }
-
- pwater = pwater->buildClone();
- LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_EDIT, pwater);
- mEditSettings = pwater;
-
- syncControls();
- enableEditing(true);
-}
-
-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 = mEditSettings->getName();
-
- LL_DEBUGS("Windlight") << "Saving sky preset " << name << LL_ENDL;
-
- LLEnvironment::instance().addWater(mEditSettings);
-
- // Change preference if requested.
- if (mMakeDefaultCheckBox->getEnabled() && mMakeDefaultCheckBox->getValue())
- {
- LL_DEBUGS("Windlight") << name << " is now the new preferred water preset" << LL_ENDL;
- LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, mEditSettings);
- }
-
- closeFloater();
-}
-
-void LLFloaterEditWater::onBtnSave()
-{
- LLEnvironment::instance().addWater(mEditSettings);
- LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, mEditSettings);
-
- closeFloater();
-}
-
-void LLFloaterEditWater::onBtnCancel()
-{
- closeFloater();
-}
-
-void LLFloaterEditWater::onWaterPresetListChange()
-{
- refreshWaterPresetsList();
-}
-
-void LLFloaterEditWater::onRegionSettingsChange()
-{
-#if 0
- // 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();
- }
-#endif
-}
-
-void LLFloaterEditWater::onRegionInfoUpdate()
-{
-#if 0
- 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);
-#endif
-}
diff --git a/indra/newview/llfloateremojipicker.cpp b/indra/newview/llfloateremojipicker.cpp
index 1578caa39c..bfde125476 100644
--- a/indra/newview/llfloateremojipicker.cpp
+++ b/indra/newview/llfloateremojipicker.cpp
@@ -80,7 +80,7 @@ public:
addChild(mList);
}
- virtual void updatePanel(BOOL allow_modify) override {}
+ virtual void updatePanel(bool allow_modify) override {}
public:
LLScrollingPanelList* mList;
@@ -114,7 +114,7 @@ public:
mText.size()); // max_chars
}
- virtual void updatePanel(BOOL allow_modify) override {}
+ virtual void updatePanel(bool allow_modify) override {}
private:
const LLWString mText;
@@ -151,7 +151,7 @@ public:
1); // max_chars
}
- virtual void updatePanel(BOOL allow_modify) override {}
+ virtual void updatePanel(bool allow_modify) override {}
const LLEmojiSearchResult& getData() const { return mData; }
LLWString getText() const { return mText; }
@@ -298,14 +298,14 @@ LLFloaterEmojiPicker::LLFloaterEmojiPicker(const LLSD& key)
: super(key)
{
// This floater should hover on top of our dependent (with the dependent having the focus)
- setFocusStealsFrontmost(FALSE);
- setBackgroundVisible(FALSE);
- setAutoFocus(FALSE);
+ setFocusStealsFrontmost(false);
+ setBackgroundVisible(false);
+ setAutoFocus(false);
loadState();
}
-BOOL LLFloaterEmojiPicker::postBuild()
+bool LLFloaterEmojiPicker::postBuild()
{
mGroups = getChild<LLPanel>("Groups");
mBadge = getChild<LLPanel>("Badge");
@@ -314,7 +314,7 @@ BOOL LLFloaterEmojiPicker::postBuild()
mDummy = getChild<LLTextBox>("Dummy");
mPreview = new LLEmojiPreviewPanel();
- mPreview->setVisible(FALSE);
+ mPreview->setVisible(false);
addChild(mPreview);
return LLFloater::postBuild();
@@ -329,7 +329,7 @@ void LLFloaterEmojiPicker::onOpen(const LLSD& key)
initialize();
- gFloaterView->adjustToFitScreen(this, FALSE);
+ gFloaterView->adjustToFitScreen(this, false);
}
void LLFloaterEmojiPicker::dirtyRect()
@@ -374,7 +374,7 @@ void LLFloaterEmojiPicker::initialize()
return;
}
- mGroups->setVisible(FALSE);
+ mGroups->setVisible(false);
mFocusedIconRow = -1;
mFocusedIconCol = -1;
mFocusedIcon = nullptr;
@@ -396,7 +396,7 @@ void LLFloaterEmojiPicker::initialize()
return;
}
- mGroups->setVisible(TRUE);
+ mGroups->setVisible(true);
mPreview->setIcon(nullptr);
showPreview(true);
@@ -405,8 +405,8 @@ void LLFloaterEmojiPicker::initialize()
std::find(mFilteredEmojiGroups.begin(), mFilteredEmojiGroups.end(), groupIndex))) %
(1 + mFilteredEmojiGroups.size());
- mGroupButtons[mSelectedGroupIndex]->setToggleState(TRUE);
- mGroupButtons[mSelectedGroupIndex]->setUseFontColor(TRUE);
+ mGroupButtons[mSelectedGroupIndex]->setToggleState(true);
+ mGroupButtons[mSelectedGroupIndex]->setUseFontColor(true);
fillEmojis();
}
@@ -576,9 +576,9 @@ void LLFloaterEmojiPicker::createGroupButton(LLButton::Params& params, const LLR
button->setMouseLeaveCallback([this](LLUICtrl* ctrl, const LLSD&) { onGroupButtonMouseLeave(ctrl); });
button->setRect(rect);
- button->setTabStop(FALSE);
+ button->setTabStop(false);
button->setLabel(LLUIString(LLWString(1, emoji)));
- button->setUseFontColor(FALSE);
+ button->setUseFontColor(false);
mGroupButtons.push_back(button);
mGroups->addChild(button);
@@ -615,13 +615,13 @@ void LLFloaterEmojiPicker::selectEmojiGroup(U32 index)
if (mSelectedGroupIndex < mGroupButtons.size())
{
- mGroupButtons[mSelectedGroupIndex]->setUseFontColor(FALSE);
- mGroupButtons[mSelectedGroupIndex]->setToggleState(FALSE);
+ mGroupButtons[mSelectedGroupIndex]->setUseFontColor(false);
+ mGroupButtons[mSelectedGroupIndex]->setToggleState(false);
}
mSelectedGroupIndex = index;
- mGroupButtons[mSelectedGroupIndex]->setToggleState(TRUE);
- mGroupButtons[mSelectedGroupIndex]->setUseFontColor(TRUE);
+ mGroupButtons[mSelectedGroupIndex]->setToggleState(true);
+ mGroupButtons[mSelectedGroupIndex]->setUseFontColor(true);
LLButton* button = mGroupButtons[mSelectedGroupIndex];
LLRect rect = mBadge->getRect();
@@ -675,7 +675,7 @@ void LLFloaterEmojiPicker::fillEmojis(bool fromResize)
LLScrollingPanelList::Params row_list_params;
row_list_params.rect = row_panel_params.rect;
- row_list_params.is_horizontal = TRUE;
+ row_list_params.is_horizontal = true;
row_list_params.padding = 0;
row_list_params.spacing = icon_spacing;
@@ -832,8 +832,8 @@ void LLFloaterEmojiPicker::createEmojiIcon(const LLEmojiSearchResult& emoji,
void LLFloaterEmojiPicker::showPreview(bool show)
{
//mPreview->setIcon(nullptr);
- mDummy->setVisible(show ? FALSE : TRUE);
- mPreview->setVisible(show ? TRUE : FALSE);
+ mDummy->setVisible(show ? false : true);
+ mPreview->setVisible(show ? true : false);
}
void LLFloaterEmojiPicker::onGroupButtonClick(LLUICtrl* ctrl)
@@ -855,7 +855,7 @@ void LLFloaterEmojiPicker::onGroupButtonMouseEnter(LLUICtrl* ctrl)
{
if (LLButton* button = dynamic_cast<LLButton*>(ctrl))
{
- button->setUseFontColor(TRUE);
+ button->setUseFontColor(true);
}
}
@@ -929,7 +929,7 @@ void LLFloaterEmojiPicker::onEmojiMouseUp(LLUICtrl* ctrl)
onCommit();
- if (!mHint.empty() || !(gKeyboard->currentMask(TRUE) & MASK_SHIFT))
+ if (!mHint.empty() || !(gKeyboard->currentMask(true) & MASK_SHIFT))
{
hideFloater();
}
@@ -1054,18 +1054,18 @@ bool LLFloaterEmojiPicker::moveFocusedIconNext()
void LLFloaterEmojiPicker::selectGridIcon(LLEmojiGridIcon* icon)
{
- icon->setBackgroundVisible(TRUE);
+ icon->setBackgroundVisible(true);
mPreview->setIcon(icon);
}
void LLFloaterEmojiPicker::unselectGridIcon(LLEmojiGridIcon* icon)
{
- icon->setBackgroundVisible(FALSE);
+ icon->setBackgroundVisible(false);
mPreview->setIcon(nullptr);
}
// virtual
-BOOL LLFloaterEmojiPicker::handleKey(KEY key, MASK mask, BOOL called_from_parent)
+bool LLFloaterEmojiPicker::handleKey(KEY key, MASK mask, bool called_from_parent)
{
if (mask == MASK_NONE)
{
@@ -1073,19 +1073,19 @@ BOOL LLFloaterEmojiPicker::handleKey(KEY key, MASK mask, BOOL called_from_parent
{
case KEY_UP:
moveFocusedIconUp();
- return TRUE;
+ return true;
case KEY_DOWN:
moveFocusedIconDown();
- return TRUE;
+ return true;
case KEY_LEFT:
moveFocusedIconPrev();
- return TRUE;
+ return true;
case KEY_RIGHT:
moveFocusedIconNext();
- return TRUE;
+ return true;
case KEY_ESCAPE:
hideFloater();
- return TRUE;
+ return true;
}
}
@@ -1095,10 +1095,10 @@ BOOL LLFloaterEmojiPicker::handleKey(KEY key, MASK mask, BOOL called_from_parent
{
case KEY_LEFT:
selectEmojiGroup((mSelectedGroupIndex + mFilteredEmojis.size()) % mGroupButtons.size());
- return TRUE;
+ return true;
case KEY_RIGHT:
selectEmojiGroup((mSelectedGroupIndex + 1) % mGroupButtons.size());
- return TRUE;
+ return true;
}
}
@@ -1112,7 +1112,7 @@ BOOL LLFloaterEmojiPicker::handleKey(KEY key, MASK mask, BOOL called_from_parent
onEmojiMouseUp(mFocusedIcon);
}
mRecentReturnPressedMs = time;
- return TRUE;
+ return true;
}
if (mHint.empty())
@@ -1128,7 +1128,7 @@ BOOL LLFloaterEmojiPicker::handleKey(KEY key, MASK mask, BOOL called_from_parent
mFilterPattern += (char)key;
initialize();
}
- return TRUE;
+ return true;
}
else if (key == KEY_BACKSPACE)
{
@@ -1141,7 +1141,7 @@ BOOL LLFloaterEmojiPicker::handleKey(KEY key, MASK mask, BOOL called_from_parent
}
initialize();
}
- return TRUE;
+ return true;
}
}
diff --git a/indra/newview/llfloateremojipicker.h b/indra/newview/llfloateremojipicker.h
index 5d0402ca83..c35616e054 100644
--- a/indra/newview/llfloateremojipicker.h
+++ b/indra/newview/llfloateremojipicker.h
@@ -45,7 +45,7 @@ public:
LLFloaterEmojiPicker(const LLSD& key);
- virtual BOOL postBuild() override;
+ virtual bool postBuild() override;
virtual void dirtyRect() override;
virtual void goneFromFront() override;
@@ -94,7 +94,7 @@ private:
void unselectGridIcon(LLEmojiGridIcon* icon);
void onOpen(const LLSD& key) override;
- virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent) override;
+ virtual bool handleKey(KEY key, MASK mask, bool called_from_parent) override;
class LLPanel* mGroups { nullptr };
class LLPanel* mBadge { nullptr };
diff --git a/indra/newview/llfloaterenvironmentadjust.cpp b/indra/newview/llfloaterenvironmentadjust.cpp
index c98afefa65..1849c4801d 100644
--- a/indra/newview/llfloaterenvironmentadjust.cpp
+++ b/indra/newview/llfloaterenvironmentadjust.cpp
@@ -84,7 +84,7 @@ LLFloaterEnvironmentAdjust::~LLFloaterEnvironmentAdjust()
{}
//-------------------------------------------------------------------------
-BOOL LLFloaterEnvironmentAdjust::postBuild()
+bool LLFloaterEnvironmentAdjust::postBuild()
{
getChild<LLUICtrl>(FIELD_SKY_AMBIENT_LIGHT)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onAmbientLightChanged(); });
getChild<LLUICtrl>(FIELD_SKY_BLUE_HORIZON)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onBlueHorizonChanged(); });
@@ -113,7 +113,7 @@ BOOL LLFloaterEnvironmentAdjust::postBuild()
getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudMapChanged(); });
getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setDefaultImageAssetID(LLSettingsSky::GetDefaultCloudNoiseTextureId());
- getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setAllowNoTexture(TRUE);
+ getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setAllowNoTexture(true);
getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP)->setDefaultImageAssetID(LLSettingsWater::GetDefaultWaterNormalAssetId());
getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP)->setBlankImageAssetID(BLANK_OBJECT_NORMAL);
@@ -122,7 +122,7 @@ BOOL LLFloaterEnvironmentAdjust::postBuild()
getChild<LLUICtrl>(FIELD_REFLECTION_PROBE_AMBIANCE)->setCommitCallback([this](LLUICtrl*, const LLSD&) { onReflectionProbeAmbianceChanged(); });
refresh();
- return TRUE;
+ return true;
}
void LLFloaterEnvironmentAdjust::onOpen(const LLSD& key)
@@ -157,12 +157,12 @@ void LLFloaterEnvironmentAdjust::refresh()
{
if (!mLiveSky || !mLiveWater)
{
- setAllChildrenEnabled(FALSE);
+ setAllChildrenEnabled(false);
return;
}
- setEnabled(TRUE);
- setAllChildrenEnabled(TRUE);
+ setEnabled(true);
+ setAllChildrenEnabled(true);
getChild<LLColorSwatchCtrl>(FIELD_SKY_AMBIENT_LIGHT)->set(mLiveSky->getAmbientColor() / SLIDER_SCALE_SUN_AMBIENT);
getChild<LLColorSwatchCtrl>(FIELD_SKY_BLUE_HORIZON)->set(mLiveSky->getBlueHorizon() / SLIDER_SCALE_BLUE_HORIZON_DENSITY);
diff --git a/indra/newview/llfloaterenvironmentadjust.h b/indra/newview/llfloaterenvironmentadjust.h
index db893cca12..228771418d 100644
--- a/indra/newview/llfloaterenvironmentadjust.h
+++ b/indra/newview/llfloaterenvironmentadjust.h
@@ -49,7 +49,7 @@ public:
virtual ~LLFloaterEnvironmentAdjust();
- virtual BOOL postBuild() override;
+ virtual bool postBuild() override;
virtual void onOpen(const LLSD& key) override;
virtual void onClose(bool app_quitting) override;
diff --git a/indra/newview/llfloaterevent.cpp b/indra/newview/llfloaterevent.cpp
index a3504ac6ee..52be7d76e3 100644
--- a/indra/newview/llfloaterevent.cpp
+++ b/indra/newview/llfloaterevent.cpp
@@ -71,7 +71,7 @@ LLFloaterEvent::~LLFloaterEvent()
}
-BOOL LLFloaterEvent::postBuild()
+bool LLFloaterEvent::postBuild()
{
mBrowser = getChild<LLMediaCtrl>("browser");
if (mBrowser)
@@ -79,7 +79,7 @@ BOOL LLFloaterEvent::postBuild()
mBrowser->addObserver(this);
}
- return TRUE;
+ return true;
}
void LLFloaterEvent::handleMediaEvent(LLPluginClassMedia *self, EMediaEvent event)
diff --git a/indra/newview/llfloaterevent.h b/indra/newview/llfloaterevent.h
index ed90055d95..501981a80f 100644
--- a/indra/newview/llfloaterevent.h
+++ b/indra/newview/llfloaterevent.h
@@ -42,7 +42,7 @@ public:
LLFloaterEvent(const LLSD& key);
/*virtual*/ ~LLFloaterEvent();
- /*virtual*/ BOOL postBuild();
+ bool postBuild() override;
void setEventID(const U32 event_id);
@@ -51,7 +51,7 @@ public:
protected:
- /*virtual*/ void handleMediaEvent(LLPluginClassMedia *self, EMediaEvent event);
+ void handleMediaEvent(LLPluginClassMedia *self, EMediaEvent event) override;
U32 mEventID;
diff --git a/indra/newview/llfloaterexperiencepicker.cpp b/indra/newview/llfloaterexperiencepicker.cpp
index c642da7b83..b39c731489 100644
--- a/indra/newview/llfloaterexperiencepicker.cpp
+++ b/indra/newview/llfloaterexperiencepicker.cpp
@@ -44,7 +44,7 @@
#include "lldraghandle.h"
#include "llpanelexperiencepicker.h"
-LLFloaterExperiencePicker* LLFloaterExperiencePicker::show( select_callback_t callback, const LLUUID& key, BOOL allow_multiple, BOOL close_on_select, filter_list filters, LLView * frustumOrigin )
+LLFloaterExperiencePicker* LLFloaterExperiencePicker::show( select_callback_t callback, const LLUUID& key, bool allow_multiple, bool close_on_select, filter_list filters, LLView * frustumOrigin )
{
LLFloaterExperiencePicker* floater =
LLFloaterReg::showTypedInstance<LLFloaterExperiencePicker>("experience_search", key);
@@ -102,7 +102,7 @@ LLFloaterExperiencePicker::~LLFloaterExperiencePicker()
gFocusMgr.releaseFocusIfNeeded( this );
}
-BOOL LLFloaterExperiencePicker::postBuild()
+bool LLFloaterExperiencePicker::postBuild()
{
mSearchPanel = new LLPanelExperiencePicker();
addChild(mSearchPanel);
diff --git a/indra/newview/llfloaterexperiencepicker.h b/indra/newview/llfloaterexperiencepicker.h
index 29054a57db..b941cca3c9 100644
--- a/indra/newview/llfloaterexperiencepicker.h
+++ b/indra/newview/llfloaterexperiencepicker.h
@@ -43,14 +43,14 @@ public:
typedef boost::function<bool (const LLSD&)> filter_function;
typedef std::vector<filter_function> filter_list;
- static LLFloaterExperiencePicker* show( select_callback_t callback, const LLUUID& key, BOOL allow_multiple, BOOL close_on_select, filter_list filters, LLView * frustumOrigin);
+ static LLFloaterExperiencePicker* show( select_callback_t callback, const LLUUID& key, bool allow_multiple, bool close_on_select, filter_list filters, LLView * frustumOrigin);
LLFloaterExperiencePicker(const LLSD& key);
virtual ~LLFloaterExperiencePicker();
- BOOL postBuild();
+ bool postBuild() override;
- virtual void draw();
+ void draw() override;
private:
LLPanelExperiencePicker* mSearchPanel;
diff --git a/indra/newview/llfloaterexperienceprofile.cpp b/indra/newview/llfloaterexperienceprofile.cpp
index f6afdd29fb..5700dcfce1 100644
--- a/indra/newview/llfloaterexperienceprofile.cpp
+++ b/indra/newview/llfloaterexperienceprofile.cpp
@@ -140,7 +140,7 @@ LLFloaterExperienceProfile::~LLFloaterExperienceProfile()
}
-BOOL LLFloaterExperienceProfile::postBuild()
+bool LLFloaterExperienceProfile::postBuild()
{
if (mExperienceId.notNull())
@@ -178,7 +178,7 @@ BOOL LLFloaterExperienceProfile::postBuild()
childSetCommitCallback(EDIT IMG_LOGO, boost::bind(&LLFloaterExperienceProfile::onFieldChanged, this), NULL);
- getChild<LLTextEditor>(EDIT TF_DESC)->setCommitOnFocusLost(TRUE);
+ getChild<LLTextEditor>(EDIT TF_DESC)->setCommitOnFocusLost(true);
LLEventPumps::instance().obtain("experience_permission").listen(mExperienceId.asString()+"-profile",
@@ -190,7 +190,7 @@ BOOL LLFloaterExperienceProfile::postBuild()
changeToEdit();
}
- return TRUE;
+ return true;
}
void LLFloaterExperienceProfile::experienceCallback(LLHandle<LLFloaterExperienceProfile> handle, const LLSD& experience )
@@ -314,11 +314,11 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience )
LLLayoutPanel* topPanel = getChild<LLLayoutPanel>(PNL_TOP);
- imagePanel->setVisible(FALSE);
- descriptionPanel->setVisible(FALSE);
- locationPanel->setVisible(FALSE);
- marketplacePanel->setVisible(FALSE);
- topPanel->setVisible(FALSE);
+ imagePanel->setVisible(false);
+ descriptionPanel->setVisible(false);
+ locationPanel->setVisible(false);
+ marketplacePanel->setVisible(false);
+ topPanel->setVisible(false);
LLTextBox* child = getChild<LLTextBox>(TF_NAME);
@@ -380,9 +380,9 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience )
enable = getChild<LLCheckBoxCtrl>(EDIT BTN_PRIVATE);
enable->set(properties & LLExperienceCache::PROPERTY_PRIVATE);
- topPanel->setVisible(TRUE);
+ topPanel->setVisible(true);
child=getChild<LLTextBox>(TF_GRID_WIDE);
- child->setVisible(TRUE);
+ child->setVisible(true);
if(properties & LLExperienceCache::PROPERTY_GRID)
{
@@ -395,13 +395,13 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience )
if(getChild<LLButton>(BTN_EDIT)->getVisible())
{
- topPanel->setVisible(TRUE);
+ topPanel->setVisible(true);
}
if(properties & LLExperienceCache::PROPERTY_PRIVILEGED)
{
child = getChild<LLTextBox>(TF_PRIVILEGED);
- child->setVisible(TRUE);
+ child->setVisible(true);
}
else
{
@@ -433,16 +433,16 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience )
child->setText(value);
if(value.size())
{
- marketplacePanel->setVisible(TRUE);
+ marketplacePanel->setVisible(true);
}
else
{
- marketplacePanel->setVisible(FALSE);
+ marketplacePanel->setVisible(false);
}
}
else
{
- marketplacePanel->setVisible(FALSE);
+ marketplacePanel->setVisible(false);
}
linechild = getChild<LLLineEditor>(EDIT TF_MRKT);
@@ -454,7 +454,7 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience )
LLUUID id = data[IMG_LOGO].asUUID();
logo->setImageAssetID(id);
- imagePanel->setVisible(TRUE);
+ imagePanel->setVisible(true);
logo = getChild<LLTextureCtrl>(EDIT IMG_LOGO);
logo->setImageAssetID(data[IMG_LOGO].asUUID());
@@ -464,8 +464,8 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience )
}
else
{
- marketplacePanel->setVisible(FALSE);
- imagePanel->setVisible(FALSE);
+ marketplacePanel->setVisible(false);
+ imagePanel->setVisible(false);
}
mDirty=false;
@@ -533,17 +533,17 @@ void LLFloaterExperienceProfile::onFieldChanged()
}
-BOOL LLFloaterExperienceProfile::canClose()
+bool LLFloaterExperienceProfile::canClose()
{
if(mForceClose || !mDirty)
{
- return TRUE;
+ return true;
}
else
{
// Bring up view-modal dialog: Save changes? Yes, No, Cancel
LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLFloaterExperienceProfile::handleSaveChangesDialog, this, _1, _2, CLOSE));
- return FALSE;
+ return false;
}
}
@@ -560,7 +560,7 @@ bool LLFloaterExperienceProfile::handleSaveChangesDialog( const LLSD& notificati
case 1: // "No"
if(action != NOTHING)
{
- mForceClose = TRUE;
+ mForceClose = true;
if(action==CLOSE)
{
closeFloater();
@@ -738,37 +738,37 @@ void LLFloaterExperienceProfile::updatePermission( const LLSD& permission )
void LLFloaterExperienceProfile::experienceAllowed()
{
LLButton* button=getChild<LLButton>(BTN_ALLOW);
- button->setEnabled(FALSE);
+ button->setEnabled(false);
button=getChild<LLButton>(BTN_FORGET);
- button->setEnabled(TRUE);
+ button->setEnabled(true);
button=getChild<LLButton>(BTN_BLOCK);
- button->setEnabled(TRUE);
+ button->setEnabled(true);
}
void LLFloaterExperienceProfile::experienceForgotten()
{
LLButton* button=getChild<LLButton>(BTN_ALLOW);
- button->setEnabled(TRUE);
+ button->setEnabled(true);
button=getChild<LLButton>(BTN_FORGET);
- button->setEnabled(FALSE);
+ button->setEnabled(false);
button=getChild<LLButton>(BTN_BLOCK);
- button->setEnabled(TRUE);
+ button->setEnabled(true);
}
void LLFloaterExperienceProfile::experienceBlocked()
{
LLButton* button=getChild<LLButton>(BTN_ALLOW);
- button->setEnabled(TRUE);
+ button->setEnabled(true);
button=getChild<LLButton>(BTN_FORGET);
- button->setEnabled(TRUE);
+ button->setEnabled(true);
button=getChild<LLButton>(BTN_BLOCK);
- button->setEnabled(FALSE);
+ button->setEnabled(false);
}
void LLFloaterExperienceProfile::onClose( bool app_quitting )
@@ -918,8 +918,8 @@ void LLFloaterExperienceProfile::experienceIsAdmin(LLHandle<LLFloaterExperienceP
}
if (enabled && result["status"].asBoolean())
{
- parent->getChild<LLLayoutPanel>(PNL_TOP)->setVisible(TRUE);
- parent->getChild<LLButton>(BTN_EDIT)->setVisible(TRUE);
+ parent->getChild<LLLayoutPanel>(PNL_TOP)->setVisible(true);
+ parent->getChild<LLButton>(BTN_EDIT)->setVisible(true);
}
}
diff --git a/indra/newview/llfloaterexperienceprofile.h b/indra/newview/llfloaterexperienceprofile.h
index f9b6e2e2eb..0f4a3eeea2 100644
--- a/indra/newview/llfloaterexperienceprofile.h
+++ b/indra/newview/llfloaterexperienceprofile.h
@@ -60,7 +60,7 @@ public:
void refreshExperience(const LLSD& experience);
void onSaveComplete( const LLSD& content );
- virtual BOOL canClose();
+ virtual bool canClose();
virtual void onClose(bool app_quitting);
protected:
@@ -87,7 +87,7 @@ protected:
static void experienceCallback(LLHandle<LLFloaterExperienceProfile> handle, const LLSD& experience);
static bool experiencePermission(LLHandle<LLFloaterExperienceProfile> handle, const LLSD& permission);
- BOOL postBuild();
+ bool postBuild();
bool setMaturityString(U8 maturity, LLTextBox* child, LLComboBox* combo);
bool handleSaveChangesDialog(const LLSD& notification, const LLSD& response, PostSaveAction action);
void doSave( int success_action );
diff --git a/indra/newview/llfloaterexperiences.cpp b/indra/newview/llfloaterexperiences.cpp
index 184e39402a..8e5a48ce6c 100644
--- a/indra/newview/llfloaterexperiences.cpp
+++ b/indra/newview/llfloaterexperiences.cpp
@@ -58,7 +58,7 @@ LLPanelExperiences* LLFloaterExperiences::addTab(const std::string& name, bool s
return newPanel;
}
-BOOL LLFloaterExperiences::postBuild()
+bool LLFloaterExperiences::postBuild()
{
getChild<LLTabContainer>("xp_tabs")->addTabPanel(new LLPanelExperiencePicker());
addTab("Allowed_Experiences_Tab", true);
@@ -74,7 +74,7 @@ BOOL LLFloaterExperiences::postBuild()
getChild<LLTabContainer>("xp_tabs")->addTabPanel(new LLPanelExperienceLog());
resizeToTabs();
- return TRUE;
+ return true;
}
@@ -129,7 +129,7 @@ void LLFloaterExperiences::resizeToTabs()
{
rect.mRight = rect.mLeft + tabs->getTotalTabWidth() + TAB_WIDTH_PADDING;
}
- reshape(rect.getWidth(), rect.getHeight(), FALSE);
+ reshape(rect.getWidth(), rect.getHeight(), false);
}
void LLFloaterExperiences::refreshContents()
diff --git a/indra/newview/llfloaterexperiences.h b/indra/newview/llfloaterexperiences.h
index 6d0559af7c..241798490c 100644
--- a/indra/newview/llfloaterexperiences.h
+++ b/indra/newview/llfloaterexperiences.h
@@ -47,7 +47,7 @@ protected:
void clearFromRecent(const LLSD& ids);
void resizeToTabs();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
void refreshContents();
void setupRecentTabs();
LLPanelExperiences* addTab(const std::string& name, bool select);
diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp
index 3e8bad3ef5..45a2efb265 100644
--- a/indra/newview/llfloaterfixedenvironment.cpp
+++ b/indra/newview/llfloaterfixedenvironment.cpp
@@ -94,12 +94,12 @@ LLFloaterFixedEnvironment::~LLFloaterFixedEnvironment()
delete mFlyoutControl;
}
-BOOL LLFloaterFixedEnvironment::postBuild()
+bool LLFloaterFixedEnvironment::postBuild()
{
mTab = getChild<LLTabContainer>(CONTROL_TAB_AREA);
mTxtName = getChild<LLLineEditor>(FIELD_SETTINGS_NAME);
- mTxtName->setCommitOnFocusLost(TRUE);
+ mTxtName->setCommitOnFocusLost(true);
mTxtName->setCommitCallback([this](LLUICtrl *, const LLSD &) { onNameChanged(mTxtName->getValue().asString()); });
getChild<LLButton>(BUTTON_NAME_IMPORT)->setClickedCallback([this](LLUICtrl *, const LLSD &) { onButtonImport(); });
@@ -110,7 +110,7 @@ BOOL LLFloaterFixedEnvironment::postBuild()
mFlyoutControl->setAction([this](LLUICtrl *ctrl, const LLSD &data) { onButtonApply(ctrl, data); });
mFlyoutControl->setMenuItemVisible(ACTION_COMMIT, false);
- return TRUE;
+ return true;
}
void LLFloaterFixedEnvironment::onOpen(const LLSD& key)
@@ -367,7 +367,7 @@ void LLFloaterFixedEnvironment::onInventoryCreated(LLUUID asset_id, LLUUID inven
}
}
clearDirtyFlag();
- setFocus(TRUE); // Call back the focus...
+ setFocus(true); // Call back the focus...
loadInventoryItem(inventory_id, can_trans);
}
@@ -404,7 +404,7 @@ void LLFloaterFixedEnvironment::doSelectFromInventory()
picker->setSettingsFilter(mSettings->getSettingsTypeValue());
picker->openFloater();
- picker->setFocus(TRUE);
+ picker->setFocus(true);
}
//=========================================================================
@@ -412,10 +412,10 @@ LLFloaterFixedEnvironmentWater::LLFloaterFixedEnvironmentWater(const LLSD &key):
LLFloaterFixedEnvironment(key)
{}
-BOOL LLFloaterFixedEnvironmentWater::postBuild()
+bool LLFloaterFixedEnvironmentWater::postBuild()
{
if (!LLFloaterFixedEnvironment::postBuild())
- return FALSE;
+ return false;
LLPanelSettingsWater * panel;
panel = new LLPanelSettingsWaterMainTab;
@@ -424,7 +424,7 @@ BOOL LLFloaterFixedEnvironmentWater::postBuild()
panel->setOnDirtyFlagChanged( [this] (LLPanel *, bool value) { onPanelDirtyFlagChanged(value); });
mTab->addTabPanel(LLTabContainer::TabPanelParams().panel(panel).select_tab(true));
- return TRUE;
+ return true;
}
void LLFloaterFixedEnvironmentWater::updateEditEnvironment(void)
@@ -479,10 +479,10 @@ LLFloaterFixedEnvironmentSky::LLFloaterFixedEnvironmentSky(const LLSD &key) :
LLFloaterFixedEnvironment(key)
{}
-BOOL LLFloaterFixedEnvironmentSky::postBuild()
+bool LLFloaterFixedEnvironmentSky::postBuild()
{
if (!LLFloaterFixedEnvironment::postBuild())
- return FALSE;
+ return false;
LLPanelSettingsSky * panel;
panel = new LLPanelSettingsSkyAtmosTab;
@@ -503,7 +503,7 @@ BOOL LLFloaterFixedEnvironmentSky::postBuild()
panel->setOnDirtyFlagChanged([this](LLPanel *, bool value) { onPanelDirtyFlagChanged(value); });
mTab->addTabPanel(LLTabContainer::TabPanelParams().panel(panel).select_tab(false));
- return TRUE;
+ return true;
}
void LLFloaterFixedEnvironmentSky::updateEditEnvironment(void)
diff --git a/indra/newview/llfloaterfixedenvironment.h b/indra/newview/llfloaterfixedenvironment.h
index f35f4a4368..a5d3e50f7c 100644
--- a/indra/newview/llfloaterfixedenvironment.h
+++ b/indra/newview/llfloaterfixedenvironment.h
@@ -50,7 +50,7 @@ public:
LLFloaterFixedEnvironment(const LLSD &key);
~LLFloaterFixedEnvironment();
- virtual BOOL postBuild() override;
+ virtual bool postBuild() override;
virtual void onOpen(const LLSD& key) override;
virtual void onClose(bool app_quitting) override;
@@ -101,7 +101,7 @@ class LLFloaterFixedEnvironmentWater : public LLFloaterFixedEnvironment
public:
LLFloaterFixedEnvironmentWater(const LLSD &key);
- BOOL postBuild() override;
+ bool postBuild() override;
virtual void onOpen(const LLSD& key) override;
@@ -121,7 +121,7 @@ class LLFloaterFixedEnvironmentSky : public LLFloaterFixedEnvironment
public:
LLFloaterFixedEnvironmentSky(const LLSD &key);
- BOOL postBuild() override;
+ bool postBuild() override;
virtual void onOpen(const LLSD& key) override;
virtual void onClose(bool app_quitting) override;
diff --git a/indra/newview/llfloaterforgetuser.cpp b/indra/newview/llfloaterforgetuser.cpp
index f576ce7a76..be21de503e 100644
--- a/indra/newview/llfloaterforgetuser.cpp
+++ b/indra/newview/llfloaterforgetuser.cpp
@@ -56,7 +56,7 @@ LLFloaterForgetUser::~LLFloaterForgetUser()
}
}
-BOOL LLFloaterForgetUser::postBuild()
+bool LLFloaterForgetUser::postBuild()
{
mScrollList = getChild<LLScrollListCtrl>("user_list");
@@ -120,12 +120,12 @@ BOOL LLFloaterForgetUser::postBuild()
bool enable_button = mScrollList->getFirstSelectedIndex() != -1;
LLCheckBoxCtrl *chk_box = getChild<LLCheckBoxCtrl>("delete_data");
chk_box->setEnabled(enable_button);
- chk_box->set(FALSE);
+ chk_box->set(false);
LLButton *button = getChild<LLButton>("forget");
button->setEnabled(enable_button);
button->setCommitCallback(boost::bind(&LLFloaterForgetUser::onForgetClicked, this));
- return TRUE;
+ return true;
}
void LLFloaterForgetUser::onForgetClicked()
@@ -135,7 +135,7 @@ void LLFloaterForgetUser::onForgetClicked()
const std::string user_id = user_data["user_id"];
LLCheckBoxCtrl *chk_box = getChild<LLCheckBoxCtrl>("delete_data");
- BOOL delete_data = chk_box->getValue();
+ bool delete_data = chk_box->getValue();
if (delete_data && mUserGridsCount[user_id] > 1)
{
@@ -192,7 +192,7 @@ void LLFloaterForgetUser::processForgetUser()
{
LLScrollListCtrl *scroll_list = getChild<LLScrollListCtrl>("user_list");
LLCheckBoxCtrl *chk_box = getChild<LLCheckBoxCtrl>("delete_data");
- BOOL delete_data = chk_box->getValue();
+ bool delete_data = chk_box->getValue();
LLSD user_data = scroll_list->getSelectedValue();
const std::string user_id = user_data["user_id"];
const std::string grid = user_data["grid"];
diff --git a/indra/newview/llfloaterforgetuser.h b/indra/newview/llfloaterforgetuser.h
index 801fcbb412..2bbccc8192 100644
--- a/indra/newview/llfloaterforgetuser.h
+++ b/indra/newview/llfloaterforgetuser.h
@@ -37,7 +37,7 @@ public:
LLFloaterForgetUser(const LLSD &key);
~LLFloaterForgetUser();
- BOOL postBuild();
+ bool postBuild() override;
void onForgetClicked();
private:
diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp
index f29046c513..f0dd7be67b 100644
--- a/indra/newview/llfloatergesture.cpp
+++ b/indra/newview/llfloatergesture.cpp
@@ -51,7 +51,7 @@
#include "llviewercontrol.h"
#include "llfloaterperms.h"
-BOOL item_name_precedes( LLInventoryItem* a, LLInventoryItem* b )
+bool item_name_precedes( LLInventoryItem* a, LLInventoryItem* b )
{
return LLStringUtil::precedesDict( a->getName(), b->getName() );
}
@@ -85,7 +85,7 @@ public:
perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Gestures"));
perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Gestures"));
item->setPermissions(perm);
- item->updateServer(FALSE);
+ item->updateServer(false);
}
}
};
@@ -188,7 +188,7 @@ LLFloaterGesture::~LLFloaterGesture()
}
// virtual
-BOOL LLFloaterGesture::postBuild()
+bool LLFloaterGesture::postBuild()
{
std::string label;
@@ -224,9 +224,9 @@ BOOL LLFloaterGesture::postBuild()
{
buildGestureList();
- mGestureList->setFocus(TRUE);
+ mGestureList->setFocus(true);
- const BOOL ascending = TRUE;
+ constexpr bool ascending = true;
mGestureList->sortByColumn(std::string("name"), ascending);
mGestureList->selectFirstItem();
}
@@ -234,7 +234,7 @@ BOOL LLFloaterGesture::postBuild()
// Update button labels
onCommitList();
- return TRUE;
+ return true;
}
@@ -457,8 +457,8 @@ void LLFloaterGesture::onClickPlay()
if(!LLGestureMgr::instance().isGestureActive(item_id))
{
// we need to inform server about gesture activating to be consistent with LLPreviewGesture and LLGestureComboList.
- BOOL inform_server = TRUE;
- BOOL deactivate_similar = FALSE;
+ bool inform_server = true;
+ bool deactivate_similar = false;
LLGestureMgr::instance().setGestureLoadedCallback(item_id, boost::bind(&LLFloaterGesture::playGesture, this, item_id));
LLViewerInventoryItem *item = gInventory.getItem(item_id);
llassert(item);
@@ -499,13 +499,13 @@ void LLFloaterGesture::onActivateBtnClick()
LLGestureMgr* gm = LLGestureMgr::getInstance();
uuid_vec_t::const_iterator it = ids.begin();
- BOOL first_gesture_state = gm->isGestureActive(*it);
- BOOL is_mixed = FALSE;
+ bool first_gesture_state = gm->isGestureActive(*it);
+ bool is_mixed = false;
while( ++it != ids.end() )
{
if(first_gesture_state != gm->isGestureActive(*it))
{
- is_mixed = TRUE;
+ is_mixed = true;
break;
}
}
@@ -678,7 +678,7 @@ void LLFloaterGesture::onDeleteSelected()
new_item->setParent(trash_id);
// no need to restamp it though it's a move into trash because
// it's a brand new item already.
- new_item->updateParentOnServer(FALSE);
+ new_item->updateParentOnServer(false);
gInventory.updateItem(new_item);
}
}
diff --git a/indra/newview/llfloatergesture.h b/indra/newview/llfloatergesture.h
index 1d702c6704..63d7e0e548 100644
--- a/indra/newview/llfloatergesture.h
+++ b/indra/newview/llfloatergesture.h
@@ -56,7 +56,7 @@ public:
LLFloaterGesture(const LLSD& key);
virtual ~LLFloaterGesture();
- virtual BOOL postBuild();
+ virtual bool postBuild();
virtual void done ();
void refreshAll();
/**
diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp
index 4b22f7427b..813bde0fac 100644
--- a/indra/newview/llfloatergodtools.cpp
+++ b/indra/newview/llfloatergodtools.cpp
@@ -82,10 +82,10 @@ const F32 SECONDS_BETWEEN_UPDATE_REQUESTS = 5.0f;
void LLFloaterGodTools::onOpen(const LLSD& key)
{
center();
- setFocus(TRUE);
+ setFocus(true);
// LLPanel *panel = getChild<LLTabContainer>("GodTools Tabs")->getCurrentPanel();
// if (panel)
-// panel->setFocus(TRUE);
+// panel->setFocus(true);
if (mPanelObjectTools)
mPanelObjectTools->setTargetAvatar(LLUUID::null);
@@ -124,11 +124,11 @@ LLFloaterGodTools::LLFloaterGodTools(const LLSD& key)
mFactoryMap["request"] = LLCallbackMap(createPanelRequest, this);
}
-BOOL LLFloaterGodTools::postBuild()
+bool LLFloaterGodTools::postBuild()
{
sendRegionInfoRequest();
getChild<LLTabContainer>("GodTools Tabs")->selectTabByName("region");
- return TRUE;
+ return true;
}
// static
void* LLFloaterGodTools::createPanelGrid(void *userdata)
@@ -200,7 +200,7 @@ void LLFloaterGodTools::showPanel(const std::string& panel_name)
openFloater();
LLPanel *panel = getChild<LLTabContainer>("GodTools Tabs")->getCurrentPanel();
if (panel)
- panel->setFocus(TRUE);
+ panel->setFocus(true);
}
// static
@@ -442,22 +442,22 @@ LLPanelRegionTools::LLPanelRegionTools()
mCommitCallbackRegistrar.add("RegionTools.SaveState", boost::bind(&LLPanelRegionTools::onSaveState, this));
}
-BOOL LLPanelRegionTools::postBuild()
+bool LLPanelRegionTools::postBuild()
{
getChild<LLLineEditor>("region name")->setKeystrokeCallback(onChangeSimName, this);
getChild<LLLineEditor>("region name")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);
getChild<LLLineEditor>("estate")->setPrevalidate(&LLTextValidate::validatePositiveS32);
getChild<LLLineEditor>("parentestate")->setPrevalidate(&LLTextValidate::validatePositiveS32);
- getChildView("parentestate")->setEnabled(FALSE);
+ getChildView("parentestate")->setEnabled(false);
getChild<LLLineEditor>("gridposx")->setPrevalidate(&LLTextValidate::validatePositiveS32);
- getChildView("gridposx")->setEnabled(FALSE);
+ getChildView("gridposx")->setEnabled(false);
getChild<LLLineEditor>("gridposy")->setPrevalidate(&LLTextValidate::validatePositiveS32);
- getChildView("gridposy")->setEnabled(FALSE);
+ getChildView("gridposy")->setEnabled(false);
getChild<LLLineEditor>("redirectx")->setPrevalidate(&LLTextValidate::validatePositiveS32);
getChild<LLLineEditor>("redirecty")->setPrevalidate(&LLTextValidate::validatePositiveS32);
- return TRUE;
+ return true;
}
// Destroys the object
@@ -483,41 +483,41 @@ void LLPanelRegionTools::clearAllWidgets()
{
// clear all widgets
getChild<LLUICtrl>("region name")->setValue("unknown");
- getChild<LLUICtrl>("region name")->setFocus( FALSE);
+ getChild<LLUICtrl>("region name")->setFocus( false);
- getChild<LLUICtrl>("check prelude")->setValue(FALSE);
- getChildView("check prelude")->setEnabled(FALSE);
+ getChild<LLUICtrl>("check prelude")->setValue(false);
+ getChildView("check prelude")->setEnabled(false);
- getChild<LLUICtrl>("check fixed sun")->setValue(FALSE);
- getChildView("check fixed sun")->setEnabled(FALSE);
+ getChild<LLUICtrl>("check fixed sun")->setValue(false);
+ getChildView("check fixed sun")->setEnabled(false);
- getChild<LLUICtrl>("check reset home")->setValue(FALSE);
- getChildView("check reset home")->setEnabled(FALSE);
+ getChild<LLUICtrl>("check reset home")->setValue(false);
+ getChildView("check reset home")->setEnabled(false);
- getChild<LLUICtrl>("check damage")->setValue(FALSE);
- getChildView("check damage")->setEnabled(FALSE);
+ getChild<LLUICtrl>("check damage")->setValue(false);
+ getChildView("check damage")->setEnabled(false);
- getChild<LLUICtrl>("check visible")->setValue(FALSE);
- getChildView("check visible")->setEnabled(FALSE);
+ getChild<LLUICtrl>("check visible")->setValue(false);
+ getChildView("check visible")->setEnabled(false);
- getChild<LLUICtrl>("block terraform")->setValue(FALSE);
- getChildView("block terraform")->setEnabled(FALSE);
+ getChild<LLUICtrl>("block terraform")->setValue(false);
+ getChildView("block terraform")->setEnabled(false);
- getChild<LLUICtrl>("block dwell")->setValue(FALSE);
- getChildView("block dwell")->setEnabled(FALSE);
+ getChild<LLUICtrl>("block dwell")->setValue(false);
+ getChildView("block dwell")->setEnabled(false);
- getChild<LLUICtrl>("is sandbox")->setValue(FALSE);
- getChildView("is sandbox")->setEnabled(FALSE);
+ getChild<LLUICtrl>("is sandbox")->setValue(false);
+ getChildView("is sandbox")->setEnabled(false);
getChild<LLUICtrl>("billable factor")->setValue(BILLABLE_FACTOR_DEFAULT);
- getChildView("billable factor")->setEnabled(FALSE);
+ getChildView("billable factor")->setEnabled(false);
getChild<LLUICtrl>("land cost")->setValue(PRICE_PER_METER_DEFAULT);
- getChildView("land cost")->setEnabled(FALSE);
+ getChildView("land cost")->setEnabled(false);
- getChildView("Apply")->setEnabled(FALSE);
- getChildView("Bake Terrain")->setEnabled(FALSE);
- getChildView("Autosave now")->setEnabled(FALSE);
+ getChildView("Apply")->setEnabled(false);
+ getChildView("Bake Terrain")->setEnabled(false);
+ getChildView("Autosave now")->setEnabled(false);
}
@@ -525,21 +525,21 @@ void LLPanelRegionTools::enableAllWidgets()
{
// enable all of the widgets
- getChildView("check prelude")->setEnabled(TRUE);
- getChildView("check fixed sun")->setEnabled(TRUE);
- getChildView("check reset home")->setEnabled(TRUE);
- getChildView("check damage")->setEnabled(TRUE);
- getChildView("check visible")->setEnabled(FALSE); // use estates to update...
- getChildView("block terraform")->setEnabled(TRUE);
- getChildView("block dwell")->setEnabled(TRUE);
- getChildView("is sandbox")->setEnabled(TRUE);
+ getChildView("check prelude")->setEnabled(true);
+ getChildView("check fixed sun")->setEnabled(true);
+ getChildView("check reset home")->setEnabled(true);
+ getChildView("check damage")->setEnabled(true);
+ getChildView("check visible")->setEnabled(false); // use estates to update...
+ getChildView("block terraform")->setEnabled(true);
+ getChildView("block dwell")->setEnabled(true);
+ getChildView("is sandbox")->setEnabled(true);
- getChildView("billable factor")->setEnabled(TRUE);
- getChildView("land cost")->setEnabled(TRUE);
+ getChildView("billable factor")->setEnabled(true);
+ getChildView("land cost")->setEnabled(true);
- getChildView("Apply")->setEnabled(FALSE); // don't enable this one
- getChildView("Bake Terrain")->setEnabled(TRUE);
- getChildView("Autosave now")->setEnabled(TRUE);
+ getChildView("Apply")->setEnabled(false); // don't enable this one
+ getChildView("Bake Terrain")->setEnabled(true);
+ getChildView("Autosave now")->setEnabled(true);
}
void LLPanelRegionTools::onSaveState(void* userdata)
@@ -718,14 +718,14 @@ void LLPanelRegionTools::setParentEstateID(U32 id)
void LLPanelRegionTools::setCheckFlags(U64 flags)
{
- getChild<LLUICtrl>("check prelude")->setValue(is_prelude(flags) ? TRUE : FALSE);
- getChild<LLUICtrl>("check fixed sun")->setValue(flags & REGION_FLAGS_SUN_FIXED ? TRUE : FALSE);
- getChild<LLUICtrl>("check reset home")->setValue(flags & REGION_FLAGS_RESET_HOME_ON_TELEPORT ? TRUE : FALSE);
- getChild<LLUICtrl>("check damage")->setValue(flags & REGION_FLAGS_ALLOW_DAMAGE ? TRUE : FALSE);
- getChild<LLUICtrl>("check visible")->setValue(flags & REGION_FLAGS_EXTERNALLY_VISIBLE ? TRUE : FALSE);
- getChild<LLUICtrl>("block terraform")->setValue(flags & REGION_FLAGS_BLOCK_TERRAFORM ? TRUE : FALSE);
- getChild<LLUICtrl>("block dwell")->setValue(flags & REGION_FLAGS_BLOCK_DWELL ? TRUE : FALSE);
- getChild<LLUICtrl>("is sandbox")->setValue(flags & REGION_FLAGS_SANDBOX ? TRUE : FALSE );
+ getChild<LLUICtrl>("check prelude")->setValue(is_prelude(flags) ? true : false);
+ getChild<LLUICtrl>("check fixed sun")->setValue(flags & REGION_FLAGS_SUN_FIXED ? true : false);
+ getChild<LLUICtrl>("check reset home")->setValue(flags & REGION_FLAGS_RESET_HOME_ON_TELEPORT ? true : false);
+ getChild<LLUICtrl>("check damage")->setValue(flags & REGION_FLAGS_ALLOW_DAMAGE ? true : false);
+ getChild<LLUICtrl>("check visible")->setValue(flags & REGION_FLAGS_EXTERNALLY_VISIBLE ? true : false);
+ getChild<LLUICtrl>("block terraform")->setValue(flags & REGION_FLAGS_BLOCK_TERRAFORM ? true : false);
+ getChild<LLUICtrl>("block dwell")->setValue(flags & REGION_FLAGS_BLOCK_DWELL ? true : false);
+ getChild<LLUICtrl>("is sandbox")->setValue(flags & REGION_FLAGS_SANDBOX ? true : false );
}
void LLPanelRegionTools::setBillableFactor(F32 billable_factor)
@@ -742,7 +742,7 @@ void LLPanelRegionTools::onChangeAnything()
{
if (gAgent.isGodlike())
{
- getChildView("Apply")->setEnabled(TRUE);
+ getChildView("Apply")->setEnabled(true);
}
}
@@ -751,8 +751,8 @@ void LLPanelRegionTools::onChangePrelude()
// checking prelude auto-checks fixed sun
if (getChild<LLUICtrl>("check prelude")->getValue().asBoolean())
{
- getChild<LLUICtrl>("check fixed sun")->setValue(TRUE);
- getChild<LLUICtrl>("check reset home")->setValue(TRUE);
+ getChild<LLUICtrl>("check fixed sun")->setValue(true);
+ getChild<LLUICtrl>("check reset home")->setValue(true);
onChangeAnything();
}
// pass on to default onChange handler
@@ -765,7 +765,7 @@ void LLPanelRegionTools::onChangeSimName(LLLineEditor* caller, void* userdata )
if (userdata && gAgent.isGodlike())
{
LLPanelRegionTools* region_tools = (LLPanelRegionTools*) userdata;
- region_tools->getChildView("Apply")->setEnabled(TRUE);
+ region_tools->getChildView("Apply")->setEnabled(true);
}
}
@@ -790,7 +790,7 @@ void LLPanelRegionTools::onApplyChanges()
LLViewerRegion *region = gAgent.getRegion();
if (region && gAgent.isGodlike())
{
- getChildView("Apply")->setEnabled(FALSE);
+ getChildView("Apply")->setEnabled(false);
god_tools->sendGodUpdateRegionInfo();
//LLFloaterReg::getTypedInstance<LLFloaterGodTools>("god_tools")->sendGodUpdateRegionInfo();
}
@@ -824,7 +824,7 @@ void LLPanelRegionTools::onSelectRegion()
LLVector3d north_east(REGION_WIDTH_METERS, REGION_WIDTH_METERS, 0);
LLViewerParcelMgr::getInstance()->selectLand(regionp->getOriginGlobal(),
- regionp->getOriginGlobal() + north_east, FALSE);
+ regionp->getOriginGlobal() + north_east, false);
}
@@ -862,9 +862,9 @@ LLPanelGridTools::~LLPanelGridTools()
{
}
-BOOL LLPanelGridTools::postBuild()
+bool LLPanelGridTools::postBuild()
{
- return TRUE;
+ return true;
}
void LLPanelGridTools::refresh()
@@ -946,10 +946,10 @@ LLPanelObjectTools::~LLPanelObjectTools()
// base class will take care of everything
}
-BOOL LLPanelObjectTools::postBuild()
+bool LLPanelObjectTools::postBuild()
{
refresh();
- return TRUE;
+ return true;
}
void LLPanelObjectTools::setTargetAvatar(const LLUUID &target_id)
@@ -1004,36 +1004,36 @@ U64 LLPanelObjectTools::computeRegionFlags(U64 flags) const
void LLPanelObjectTools::setCheckFlags(U64 flags)
{
- getChild<LLUICtrl>("disable scripts")->setValue(flags & REGION_FLAGS_SKIP_SCRIPTS ? TRUE : FALSE);
- getChild<LLUICtrl>("disable collisions")->setValue(flags & REGION_FLAGS_SKIP_COLLISIONS ? TRUE : FALSE);
- getChild<LLUICtrl>("disable physics")->setValue(flags & REGION_FLAGS_SKIP_PHYSICS ? TRUE : FALSE);
+ getChild<LLUICtrl>("disable scripts")->setValue(flags & REGION_FLAGS_SKIP_SCRIPTS ? true : false);
+ getChild<LLUICtrl>("disable collisions")->setValue(flags & REGION_FLAGS_SKIP_COLLISIONS ? true : false);
+ getChild<LLUICtrl>("disable physics")->setValue(flags & REGION_FLAGS_SKIP_PHYSICS ? true : false);
}
void LLPanelObjectTools::clearAllWidgets()
{
- getChild<LLUICtrl>("disable scripts")->setValue(FALSE);
- getChildView("disable scripts")->setEnabled(FALSE);
+ getChild<LLUICtrl>("disable scripts")->setValue(false);
+ getChildView("disable scripts")->setEnabled(false);
- getChildView("Apply")->setEnabled(FALSE);
- getChildView("Set Target")->setEnabled(FALSE);
- getChildView("Delete Target's Scripted Objects On Others Land")->setEnabled(FALSE);
- getChildView("Delete Target's Scripted Objects On *Any* Land")->setEnabled(FALSE);
- getChildView("Delete *ALL* Of Target's Objects")->setEnabled(FALSE);
+ getChildView("Apply")->setEnabled(false);
+ getChildView("Set Target")->setEnabled(false);
+ getChildView("Delete Target's Scripted Objects On Others Land")->setEnabled(false);
+ getChildView("Delete Target's Scripted Objects On *Any* Land")->setEnabled(false);
+ getChildView("Delete *ALL* Of Target's Objects")->setEnabled(false);
}
void LLPanelObjectTools::enableAllWidgets()
{
- getChildView("disable scripts")->setEnabled(TRUE);
+ getChildView("disable scripts")->setEnabled(true);
- getChildView("Apply")->setEnabled(FALSE); // don't enable this one
- getChildView("Set Target")->setEnabled(TRUE);
- getChildView("Delete Target's Scripted Objects On Others Land")->setEnabled(TRUE);
- getChildView("Delete Target's Scripted Objects On *Any* Land")->setEnabled(TRUE);
- getChildView("Delete *ALL* Of Target's Objects")->setEnabled(TRUE);
- getChildView("Get Top Colliders")->setEnabled(TRUE);
- getChildView("Get Top Scripts")->setEnabled(TRUE);
+ getChildView("Apply")->setEnabled(false); // don't enable this one
+ getChildView("Set Target")->setEnabled(true);
+ getChildView("Delete Target's Scripted Objects On Others Land")->setEnabled(true);
+ getChildView("Delete Target's Scripted Objects On *Any* Land")->setEnabled(true);
+ getChildView("Delete *ALL* Of Target's Objects")->setEnabled(true);
+ getChildView("Get Top Colliders")->setEnabled(true);
+ getChildView("Get Top Scripts")->setEnabled(true);
}
@@ -1154,7 +1154,7 @@ void LLPanelObjectTools::onClickSet()
{
LLView * button = findChild<LLButton>("Set Target");
LLFloater * root_floater = gFloaterView->getParentFloater(this);
- LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelObjectTools::callbackAvatarID, this, _1,_2), FALSE, FALSE, FALSE, root_floater->getName(), button);
+ LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelObjectTools::callbackAvatarID, this, _1,_2), false, false, false, root_floater->getName(), button);
// grandparent is a floater, which can have a dependent
if (picker)
{
@@ -1167,7 +1167,7 @@ void LLPanelObjectTools::onClickSetBySelection(void* data)
LLPanelObjectTools* panelp = (LLPanelObjectTools*) data;
if (!panelp) return;
- const BOOL non_root_ok = TRUE;
+ const bool non_root_ok = true;
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(NULL, non_root_ok);
if (!node) return;
@@ -1195,7 +1195,7 @@ void LLPanelObjectTools::onChangeAnything()
{
if (gAgent.isGodlike())
{
- getChildView("Apply")->setEnabled(TRUE);
+ getChildView("Apply")->setEnabled(true);
}
}
@@ -1207,7 +1207,7 @@ void LLPanelObjectTools::onApplyChanges()
if (region && gAgent.isGodlike())
{
// TODO -- implement this
- getChildView("Apply")->setEnabled(FALSE);
+ getChildView("Apply")->setEnabled(false);
god_tools->sendGodUpdateRegionInfo();
//LLFloaterReg::getTypedInstance<LLFloaterGodTools>("god_tools")->sendGodUpdateRegionInfo();
}
@@ -1231,11 +1231,11 @@ LLPanelRequestTools::~LLPanelRequestTools()
{
}
-BOOL LLPanelRequestTools::postBuild()
+bool LLPanelRequestTools::postBuild()
{
refresh();
- return TRUE;
+ return true;
}
void LLPanelRequestTools::refresh()
@@ -1344,7 +1344,7 @@ void LLPanelRequestTools::sendRequest(const LLHost& host)
{
gXferManager->requestFile(std::string("terrain.raw"), std::string("terrain.raw"), LL_PATH_NONE,
host,
- FALSE,
+ false,
terrain_download_done,
NULL);
}
diff --git a/indra/newview/llfloatergodtools.h b/indra/newview/llfloatergodtools.h
index cbaeee7051..71396c8716 100644
--- a/indra/newview/llfloatergodtools.h
+++ b/indra/newview/llfloatergodtools.h
@@ -102,7 +102,7 @@ protected:
protected:
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
// When the floater is going away, reset any options that need to be
// cleared.
void resetToolState();
@@ -127,7 +127,7 @@ public:
LLPanelRegionTools();
/*virtual*/ ~LLPanelRegionTools();
- BOOL postBuild();
+ bool postBuild();
/*virtual*/ void refresh();
@@ -189,7 +189,7 @@ public:
LLPanelGridTools();
virtual ~LLPanelGridTools();
- BOOL postBuild();
+ bool postBuild();
void refresh();
@@ -213,7 +213,7 @@ public:
LLPanelObjectTools();
/*virtual*/ ~LLPanelObjectTools();
- BOOL postBuild();
+ bool postBuild();
/*virtual*/ void refresh();
@@ -254,7 +254,7 @@ public:
LLPanelRequestTools();
/*virtual*/ ~LLPanelRequestTools();
- BOOL postBuild();
+ bool postBuild();
void refresh();
diff --git a/indra/newview/llfloatergotoline.cpp b/indra/newview/llfloatergotoline.cpp
index 3b34f03532..b297d251d1 100644
--- a/indra/newview/llfloatergotoline.cpp
+++ b/indra/newview/llfloatergotoline.cpp
@@ -58,16 +58,16 @@ LLFloaterGotoLine::LLFloaterGotoLine(LLScriptEdCore* editor_core)
}
}
-BOOL LLFloaterGotoLine::postBuild()
+bool LLFloaterGotoLine::postBuild()
{
mGotoBox = getChild<LLLineEditor>("goto_line");
mGotoBox->setCommitCallback(boost::bind(&LLFloaterGotoLine::onGotoBoxCommit, this));
- mGotoBox->setCommitOnFocusLost(FALSE);
+ mGotoBox->setCommitOnFocusLost(false);
getChild<LLLineEditor>("goto_line")->setPrevalidate(LLTextValidate::validateNonNegativeS32);
childSetAction("goto_btn", onBtnGoto,this);
setDefaultBtn("goto_btn");
- return TRUE;
+ return true;
}
//static
@@ -111,7 +111,7 @@ void LLFloaterGotoLine::handleBtnGoto()
{
mEditorCore->mEditor->deselect();
mEditorCore->mEditor->setCursor(row, column);
- mEditorCore->mEditor->setFocus(TRUE);
+ mEditorCore->mEditor->setFocus(true);
}
}
}
@@ -122,17 +122,17 @@ bool LLFloaterGotoLine::hasAccelerators() const
{
return mEditorCore->hasAccelerators();
}
- return FALSE;
+ return false;
}
-BOOL LLFloaterGotoLine::handleKeyHere(KEY key, MASK mask)
+bool LLFloaterGotoLine::handleKeyHere(KEY key, MASK mask)
{
if (mEditorCore)
{
return mEditorCore->handleKeyHere(key, mask);
}
- return FALSE;
+ return false;
}
void LLFloaterGotoLine::onGotoBoxCommit()
@@ -148,11 +148,11 @@ void LLFloaterGotoLine::onGotoBoxCommit()
S32 rownew = 0;
S32 columnnew = 0;
- mEditorCore->mEditor->getCurrentLineAndColumn( &rownew, &columnnew, FALSE ); // don't include wordwrap
+ mEditorCore->mEditor->getCurrentLineAndColumn( &rownew, &columnnew, false ); // don't include wordwrap
if (rownew == row && columnnew == column)
{
mEditorCore->mEditor->deselect();
- mEditorCore->mEditor->setFocus(TRUE);
+ mEditorCore->mEditor->setFocus(true);
sInstance->closeFloater();
} //else do nothing (if the cursor-position didn't change)
}
diff --git a/indra/newview/llfloatergotoline.h b/indra/newview/llfloatergotoline.h
index 058d601752..ae388ee33c 100644
--- a/indra/newview/llfloatergotoline.h
+++ b/indra/newview/llfloatergotoline.h
@@ -40,7 +40,7 @@ public:
LLFloaterGotoLine(LLScriptEdCore* editor_core);
~LLFloaterGotoLine();
- /*virtual*/ BOOL postBuild();
+ bool postBuild() override;
static void show(LLScriptEdCore* editor_core);
static void onBtnGoto(void* userdata);
@@ -49,8 +49,8 @@ public:
LLScriptEdCore* getEditorCore() { return mEditorCore; }
static LLFloaterGotoLine* getInstance() { return sInstance; }
- virtual bool hasAccelerators() const;
- virtual BOOL handleKeyHere(KEY key, MASK mask);
+ bool hasAccelerators() const override;
+ bool handleKeyHere(KEY key, MASK mask) override;
private:
diff --git a/indra/newview/llfloatergridstatus.cpp b/indra/newview/llfloatergridstatus.cpp
index 9745e17bbb..eb3d23d785 100644
--- a/indra/newview/llfloatergridstatus.cpp
+++ b/indra/newview/llfloatergridstatus.cpp
@@ -43,16 +43,16 @@ const std::string DEFAULT_GRID_STATUS_URL = "http://status.secondlifegrid.net/";
LLFloaterGridStatus::LLFloaterGridStatus(const Params& key) :
LLFloaterWebContent(key),
- mIsFirstUpdate(TRUE)
+ mIsFirstUpdate(true)
{
}
-BOOL LLFloaterGridStatus::postBuild()
+bool LLFloaterGridStatus::postBuild()
{
LLFloaterWebContent::postBuild();
mWebBrowser->addObserver(this);
- return TRUE;
+ return true;
}
void LLFloaterGridStatus::onOpen(const LLSD& key)
@@ -154,7 +154,7 @@ void LLFloaterGridStatus::getGridStatusRSSCoro()
{
gToolBarView->flashCommand(LLCommandId("gridstatus"), true);
}
- getInstance()->setFirstUpdate(FALSE);
+ getInstance()->setFirstUpdate(false);
}
// virtual
diff --git a/indra/newview/llfloatergridstatus.h b/indra/newview/llfloatergridstatus.h
index 0c3deb7d4c..9b134f1641 100644
--- a/indra/newview/llfloatergridstatus.h
+++ b/indra/newview/llfloatergridstatus.h
@@ -50,21 +50,21 @@ public:
static void getGridStatusRSSCoro();
void startGridStatusTimer();
- BOOL isFirstUpdate() { return mIsFirstUpdate; }
- void setFirstUpdate(BOOL first_update) { mIsFirstUpdate = first_update; }
+ bool isFirstUpdate() { return mIsFirstUpdate; }
+ void setFirstUpdate(bool first_update) { mIsFirstUpdate = first_update; }
static LLFloaterGridStatus* getInstance();
private:
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
void applyPreferredRect();
static std::map<std::string, std::string> sItemsMap;
LLFrameTimer mGridStatusTimer;
- BOOL mIsFirstUpdate;
+ bool mIsFirstUpdate;
};
#endif // LL_LLFLOATERGRIDSTATUS_H
diff --git a/indra/newview/llfloatergroups.cpp b/indra/newview/llfloatergroups.cpp
index f341e2ebcb..e3faa5e8b4 100644
--- a/indra/newview/llfloatergroups.cpp
+++ b/indra/newview/llfloatergroups.cpp
@@ -75,7 +75,7 @@ void LLFloaterGroupPicker::setPowersMask(U64 powers_mask)
}
-BOOL LLFloaterGroupPicker::postBuild()
+bool LLFloaterGroupPicker::postBuild()
{
LLScrollListCtrl* list_ctrl = getChild<LLScrollListCtrl>("group list");
if (list_ctrl)
@@ -91,9 +91,9 @@ BOOL LLFloaterGroupPicker::postBuild()
setDefaultBtn("OK");
- getChildView("OK")->setEnabled(TRUE);
+ getChildView("OK")->setEnabled(true);
- return TRUE;
+ return true;
}
void LLFloaterGroupPicker::removeNoneOption()
@@ -179,7 +179,7 @@ void LLPanelGroups::reset()
enableButtons();
}
-BOOL LLPanelGroups::postBuild()
+bool LLPanelGroups::postBuild()
{
childSetCommitCallback("group list", onGroupList, this);
@@ -210,7 +210,7 @@ BOOL LLPanelGroups::postBuild()
reset();
- return TRUE;
+ return true;
}
void LLPanelGroups::enableButtons()
@@ -224,23 +224,23 @@ void LLPanelGroups::enableButtons()
if(group_id != gAgent.getGroupID())
{
- getChildView("Activate")->setEnabled(TRUE);
+ getChildView("Activate")->setEnabled(true);
}
else
{
- getChildView("Activate")->setEnabled(FALSE);
+ getChildView("Activate")->setEnabled(false);
}
if (group_id.notNull())
{
- getChildView("Info")->setEnabled(TRUE);
- getChildView("IM")->setEnabled(TRUE);
- getChildView("Leave")->setEnabled(TRUE);
+ getChildView("Info")->setEnabled(true);
+ getChildView("IM")->setEnabled(true);
+ getChildView("Leave")->setEnabled(true);
}
else
{
- getChildView("Info")->setEnabled(FALSE);
- getChildView("IM")->setEnabled(FALSE);
- getChildView("Leave")->setEnabled(FALSE);
+ getChildView("Info")->setEnabled(false);
+ getChildView("IM")->setEnabled(false);
+ getChildView("Leave")->setEnabled(false);
}
getChildView("Create")->setEnabled(gAgent.canJoinGroups());
}
@@ -371,7 +371,7 @@ void init_group_list(LLScrollListCtrl* group_list, const LLUUID& highlight_id, U
}
}
- group_list->sortOnce(0, TRUE);
+ group_list->sortOnce(0, true);
// add "none" to list at top
{
diff --git a/indra/newview/llfloatergroups.h b/indra/newview/llfloatergroups.h
index 1ad27cea19..10c060ee70 100644
--- a/indra/newview/llfloatergroups.h
+++ b/indra/newview/llfloatergroups.h
@@ -60,11 +60,7 @@ public:
typedef boost::signals2::signal<void (LLUUID id)> signal_t;
void setSelectGroupCallback(const signal_t::slot_type& cb) { mGroupSelectSignal.connect(cb); }
void setPowersMask(U64 powers_mask);
- BOOL postBuild();
-
- // implementation of factory policy
- static LLFloaterGroupPicker* findInstance(const LLSD& seed);
- static LLFloaterGroupPicker* createInstance(const LLSD& seed);
+ bool postBuild();
// for cases like inviting avatar to group we don't want the none option
void removeNoneOption();
@@ -97,7 +93,7 @@ public:
protected:
// initialize based on the type
- BOOL postBuild();
+ bool postBuild();
// highlight_id is a group id to highlight
void enableButtons();
@@ -109,8 +105,6 @@ protected:
static void onBtnIM(void* userdata);
static void onBtnLeave(void* userdata);
static void onBtnSearch(void* userdata);
- static void onBtnVote(void* userdata);
- static void onDoubleClickGroup(void* userdata);
void create();
void activate();
@@ -118,10 +112,6 @@ protected:
void startIM();
void leave();
void search();
- void callVote();
-
- static bool callbackLeaveGroup(const LLSD& notification, const LLSD& response);
-
};
diff --git a/indra/newview/llfloaterhelpbrowser.cpp b/indra/newview/llfloaterhelpbrowser.cpp
index c0bb213540..4ec56cb092 100644
--- a/indra/newview/llfloaterhelpbrowser.cpp
+++ b/indra/newview/llfloaterhelpbrowser.cpp
@@ -47,7 +47,7 @@ LLFloaterHelpBrowser::LLFloaterHelpBrowser(const LLSD& key)
{
}
-BOOL LLFloaterHelpBrowser::postBuild()
+bool LLFloaterHelpBrowser::postBuild()
{
mBrowser = getChild<LLMediaCtrl>("browser");
mBrowser->addObserver(this);
@@ -56,7 +56,7 @@ BOOL LLFloaterHelpBrowser::postBuild()
childSetAction("open_browser", onClickOpenWebBrowser, this);
buildURLHistory();
- return TRUE;
+ return true;
}
void LLFloaterHelpBrowser::buildURLHistory()
@@ -74,7 +74,7 @@ void LLFloaterHelpBrowser::buildURLHistory()
void LLFloaterHelpBrowser::onOpen(const LLSD& key)
{
- gSavedSettings.setBOOL("HelpFloaterOpen", TRUE);
+ gSavedSettings.setBOOL("HelpFloaterOpen", true);
std::string topic = key.asString();
mBrowser->navigateTo(LLViewerHelp::instance().getURL(topic));
@@ -85,7 +85,7 @@ void LLFloaterHelpBrowser::onClose(bool app_quitting)
{
if (!app_quitting)
{
- gSavedSettings.setBOOL("HelpFloaterOpen", FALSE);
+ 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 bf4f544a14..aaec3cde86 100644
--- a/indra/newview/llfloaterhelpbrowser.h
+++ b/indra/newview/llfloaterhelpbrowser.h
@@ -40,7 +40,7 @@ class LLFloaterHelpBrowser :
public:
LLFloaterHelpBrowser(const LLSD& key);
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onClose(bool app_quitting);
/*virtual*/ void onOpen(const LLSD& key);
diff --git a/indra/newview/llfloaterhoverheight.cpp b/indra/newview/llfloaterhoverheight.cpp
index a00fc4aa84..7a60b4eb57 100644
--- a/indra/newview/llfloaterhoverheight.cpp
+++ b/indra/newview/llfloaterhoverheight.cpp
@@ -45,7 +45,7 @@ void LLFloaterHoverHeight::syncFromPreferenceSetting(void *user_data, bool updat
LLFloaterHoverHeight *self = static_cast<LLFloaterHoverHeight*>(user_data);
LLSliderCtrl* sldrCtrl = self->getChild<LLSliderCtrl>("HoverHeightSlider");
- sldrCtrl->setValue(value,FALSE);
+ sldrCtrl->setValue(value,false);
if (isAgentAvatarValid() && update_offset)
{
@@ -56,7 +56,7 @@ void LLFloaterHoverHeight::syncFromPreferenceSetting(void *user_data, bool updat
}
}
-BOOL LLFloaterHoverHeight::postBuild()
+bool LLFloaterHoverHeight::postBuild()
{
LLSliderCtrl* sldrCtrl = getChild<LLSliderCtrl>("HoverHeightSlider");
sldrCtrl->setMinValue(MIN_HOVER_Z);
@@ -86,7 +86,7 @@ BOOL LLFloaterHoverHeight::postBuild()
// Set up based on initial region.
onRegionChanged();
- return TRUE;
+ return true;
}
void LLFloaterHoverHeight::onClose(bool app_quitting)
diff --git a/indra/newview/llfloaterhoverheight.h b/indra/newview/llfloaterhoverheight.h
index a643fa2516..08d3f26acb 100644
--- a/indra/newview/llfloaterhoverheight.h
+++ b/indra/newview/llfloaterhoverheight.h
@@ -33,7 +33,7 @@ class LLFloaterHoverHeight: public LLFloater
{
public:
LLFloaterHoverHeight(const LLSD& key);
- BOOL postBuild();
+ bool postBuild();
static void onSliderMoved(LLUICtrl* ctrl, void* userData);
diff --git a/indra/newview/llfloaterhowto.cpp b/indra/newview/llfloaterhowto.cpp
index a359fb7c7d..2cbff9de28 100644
--- a/indra/newview/llfloaterhowto.cpp
+++ b/indra/newview/llfloaterhowto.cpp
@@ -33,8 +33,8 @@
#include "llweb.h"
-const S32 STACK_WIDTH = 300;
-const S32 STACK_HEIGHT = 505; // content will be 500
+constexpr S32 STACK_WIDTH = 300;
+constexpr S32 STACK_HEIGHT = 505; // content will be 500
LLFloaterHowTo::LLFloaterHowTo(const Params& key) :
LLFloaterWebContent(key)
@@ -42,11 +42,11 @@ LLFloaterHowTo::LLFloaterHowTo(const Params& key) :
mShowPageTitle = false;
}
-BOOL LLFloaterHowTo::postBuild()
+bool LLFloaterHowTo::postBuild()
{
LLFloaterWebContent::postBuild();
- return TRUE;
+ return true;
}
void LLFloaterHowTo::onOpen(const LLSD& key)
@@ -78,14 +78,14 @@ LLFloaterHowTo* LLFloaterHowTo::getInstance()
return LLFloaterReg::getTypedInstance<LLFloaterHowTo>("guidebook");
}
-BOOL LLFloaterHowTo::handleKeyHere(KEY key, MASK mask)
+bool LLFloaterHowTo::handleKeyHere(KEY key, MASK mask)
{
- BOOL handled = FALSE;
+ bool handled = false;
if (KEY_F1 == key )
{
closeFloater();
- handled = TRUE;
+ handled = true;
}
return handled;
diff --git a/indra/newview/llfloaterhowto.h b/indra/newview/llfloaterhowto.h
index d8da355600..c6dee0099a 100644
--- a/indra/newview/llfloaterhowto.h
+++ b/indra/newview/llfloaterhowto.h
@@ -44,14 +44,14 @@ public:
void onOpen(const LLSD& key) override;
- BOOL handleKeyHere(KEY key, MASK mask) override;
+ bool handleKeyHere(KEY key, MASK mask) override;
static LLFloaterHowTo* getInstance();
bool matchesKey(const LLSD& key) override { return true; /*single instance*/ };
private:
- BOOL postBuild() override;
+ bool postBuild() override;
};
#endif // LL_LLFLOATERHOWTO_H
diff --git a/indra/newview/llfloaterhud.cpp b/indra/newview/llfloaterhud.cpp
index 58c76a0b85..9de78bb8ab 100644
--- a/indra/newview/llfloaterhud.cpp
+++ b/indra/newview/llfloaterhud.cpp
@@ -55,10 +55,10 @@ LLFloaterHUD::LLFloaterHUD(const LLSD& key)
}
// Opaque background since we never get the focus
- setBackgroundOpaque(TRUE);
+ setBackgroundOpaque(true);
}
-BOOL LLFloaterHUD::postBuild()
+bool LLFloaterHUD::postBuild()
{
mWebBrowser = getChild<LLMediaCtrl>("floater_hud_browser" );
if (mWebBrowser)
@@ -75,7 +75,7 @@ BOOL LLFloaterHUD::postBuild()
mWebBrowser->navigateTo(url);
}
- return TRUE;
+ return true;
}
// Destructor
diff --git a/indra/newview/llfloaterhud.h b/indra/newview/llfloaterhud.h
index e560d6320b..8940e5fe2f 100644
--- a/indra/newview/llfloaterhud.h
+++ b/indra/newview/llfloaterhud.h
@@ -36,7 +36,7 @@ class LLFloaterHUD : public LLFloater
friend class LLFloaterReg;
public:
- BOOL postBuild();
+ bool postBuild() override;
private:
// Handles its own construction and destruction, so private.
diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp
index ba0f97e2e1..902f261596 100644
--- a/indra/newview/llfloaterimagepreview.cpp
+++ b/indra/newview/llfloaterimagepreview.cpp
@@ -34,6 +34,7 @@
#include "llimagepng.h"
#include "llagent.h"
+#include "llagentbenefits.h"
#include "llbutton.h"
#include "llcheckboxctrl.h"
#include "llcombobox.h"
@@ -86,11 +87,11 @@ LLFloaterImagePreview::LLFloaterImagePreview(const std::string& filename) :
//-----------------------------------------------------------------------------
// postBuild()
//-----------------------------------------------------------------------------
-BOOL LLFloaterImagePreview::postBuild()
+bool LLFloaterImagePreview::postBuild()
{
if (!LLFloaterNameDesc::postBuild())
{
- return FALSE;
+ return false;
}
LLCtrlSelectionInterface* iface = childGetSelectionInterface("clothing_type_combo");
@@ -106,12 +107,12 @@ BOOL LLFloaterImagePreview::postBuild()
PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
mPreviewImageRect.set(0.f, 1.f, 1.f, 0.f);
- getChildView("bad_image_text")->setVisible(FALSE);
+ getChildView("bad_image_text")->setVisible(false);
if (mRawImagep.notNull() && gAgent.getRegion() != NULL)
{
mAvatarPreview = new LLImagePreviewAvatar(256, 256);
- mAvatarPreview->setPreviewTarget("mPelvis", "mUpperBodyMesh0", mRawImagep, 2.f, FALSE);
+ mAvatarPreview->setPreviewTarget("mPelvis", "mUpperBodyMesh0", mRawImagep, 2.f, false);
mSculptedPreview = new LLImagePreviewSculpted(256, 256);
mSculptedPreview->setPreviewTarget(mRawImagep, 2.0f);
@@ -121,7 +122,7 @@ BOOL LLFloaterImagePreview::postBuild()
// We want "lossless_check" to be unchecked when it is disabled, regardless of
// LosslessJ2CUpload state, so only assign control when enabling checkbox
LLCheckBoxCtrl* check_box = getChild<LLCheckBoxCtrl>("lossless_check");
- check_box->setEnabled(TRUE);
+ check_box->setEnabled(true);
check_box->setControlVariable(gSavedSettings.getControl("LosslessJ2CUpload"));
}
}
@@ -129,9 +130,9 @@ BOOL LLFloaterImagePreview::postBuild()
{
mAvatarPreview = NULL;
mSculptedPreview = NULL;
- getChildView("bad_image_text")->setVisible(TRUE);
- getChildView("clothing_type_combo")->setEnabled(FALSE);
- getChildView("ok_btn")->setEnabled(FALSE);
+ getChildView("bad_image_text")->setVisible(true);
+ getChildView("clothing_type_combo")->setEnabled(false);
+ getChildView("ok_btn")->setEnabled(false);
if(!mImageLoadError.empty())
{
@@ -141,7 +142,16 @@ BOOL LLFloaterImagePreview::postBuild()
getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnOK, this));
- return TRUE;
+ return true;
+}
+
+
+//-----------------------------------------------------------------------------
+// getExpectedUploadCost()
+//-----------------------------------------------------------------------------
+S32 LLFloaterImagePreview::getExpectedUploadCost() const
+{
+ return LLAgentBenefitsMgr::current().getTextureUploadCost(mRawImagep);
}
//-----------------------------------------------------------------------------
@@ -181,28 +191,28 @@ void LLFloaterImagePreview::onPreviewTypeCommit(LLUICtrl* ctrl, void* userdata)
case 0:
break;
case 1:
- fp->mAvatarPreview->setPreviewTarget("mSkull", "mHairMesh0", fp->mRawImagep, 0.4f, FALSE);
+ fp->mAvatarPreview->setPreviewTarget("mSkull", "mHairMesh0", fp->mRawImagep, 0.4f, false);
break;
case 2:
- fp->mAvatarPreview->setPreviewTarget("mSkull", "mHeadMesh0", fp->mRawImagep, 0.4f, FALSE);
+ fp->mAvatarPreview->setPreviewTarget("mSkull", "mHeadMesh0", fp->mRawImagep, 0.4f, false);
break;
case 3:
- fp->mAvatarPreview->setPreviewTarget("mChest", "mUpperBodyMesh0", fp->mRawImagep, 1.0f, FALSE);
+ fp->mAvatarPreview->setPreviewTarget("mChest", "mUpperBodyMesh0", fp->mRawImagep, 1.0f, false);
break;
case 4:
- fp->mAvatarPreview->setPreviewTarget("mKneeLeft", "mLowerBodyMesh0", fp->mRawImagep, 1.2f, FALSE);
+ fp->mAvatarPreview->setPreviewTarget("mKneeLeft", "mLowerBodyMesh0", fp->mRawImagep, 1.2f, false);
break;
case 5:
- fp->mAvatarPreview->setPreviewTarget("mSkull", "mHeadMesh0", fp->mRawImagep, 0.4f, TRUE);
+ fp->mAvatarPreview->setPreviewTarget("mSkull", "mHeadMesh0", fp->mRawImagep, 0.4f, true);
break;
case 6:
- fp->mAvatarPreview->setPreviewTarget("mChest", "mUpperBodyMesh0", fp->mRawImagep, 1.2f, TRUE);
+ fp->mAvatarPreview->setPreviewTarget("mChest", "mUpperBodyMesh0", fp->mRawImagep, 1.2f, true);
break;
case 7:
- fp->mAvatarPreview->setPreviewTarget("mKneeLeft", "mLowerBodyMesh0", fp->mRawImagep, 1.2f, TRUE);
+ fp->mAvatarPreview->setPreviewTarget("mKneeLeft", "mLowerBodyMesh0", fp->mRawImagep, 1.2f, true);
break;
case 8:
- fp->mAvatarPreview->setPreviewTarget("mKneeLeft", "mSkirtMesh0", fp->mRawImagep, 1.3f, FALSE);
+ fp->mAvatarPreview->setPreviewTarget("mKneeLeft", "mSkirtMesh0", fp->mRawImagep, 1.3f, false);
break;
case 9:
fp->mSculptedPreview->setPreviewTarget(fp->mRawImagep, 2.0f);
@@ -258,7 +268,7 @@ void LLFloaterImagePreview::draw()
}
else
{
- mImagep = LLViewerTextureManager::getLocalTexture(mRawImagep.get(), FALSE) ;
+ mImagep = LLViewerTextureManager::getLocalTexture(mRawImagep.get(), false) ;
gGL.getTexUnit(0)->unbind(mImagep->getTarget()) ;
gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mImagep->getTexName());
@@ -378,7 +388,7 @@ bool LLFloaterImagePreview::loadImage(const std::string& src_filename)
return false;
}
- raw_image->biasedScaleToPowerOfTwo(1024);
+ raw_image->biasedScaleToPowerOfTwo(LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT);
mRawImagep = raw_image;
return true;
@@ -387,7 +397,7 @@ bool LLFloaterImagePreview::loadImage(const std::string& src_filename)
//-----------------------------------------------------------------------------
// handleMouseDown()
//-----------------------------------------------------------------------------
-BOOL LLFloaterImagePreview::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLFloaterImagePreview::handleMouseDown(S32 x, S32 y, MASK mask)
{
if (mPreviewRect.pointInRect(x, y))
{
@@ -396,7 +406,7 @@ BOOL LLFloaterImagePreview::handleMouseDown(S32 x, S32 y, MASK mask)
gViewerWindow->hideCursor();
mLastMouseX = x;
mLastMouseY = y;
- return TRUE;
+ return true;
}
return LLFloater::handleMouseDown(x, y, mask);
@@ -405,9 +415,9 @@ BOOL LLFloaterImagePreview::handleMouseDown(S32 x, S32 y, MASK mask)
//-----------------------------------------------------------------------------
// handleMouseUp()
//-----------------------------------------------------------------------------
-BOOL LLFloaterImagePreview::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLFloaterImagePreview::handleMouseUp(S32 x, S32 y, MASK mask)
{
- gFocusMgr.setMouseCapture(FALSE);
+ gFocusMgr.setMouseCapture(nullptr);
gViewerWindow->showCursor();
return LLFloater::handleMouseUp(x, y, mask);
}
@@ -415,7 +425,7 @@ BOOL LLFloaterImagePreview::handleMouseUp(S32 x, S32 y, MASK mask)
//-----------------------------------------------------------------------------
// handleHover()
//-----------------------------------------------------------------------------
-BOOL LLFloaterImagePreview::handleHover(S32 x, S32 y, MASK mask)
+bool LLFloaterImagePreview::handleHover(S32 x, S32 y, MASK mask)
{
MASK local_mask = mask & ~MASK_ALT;
@@ -529,13 +539,13 @@ BOOL LLFloaterImagePreview::handleHover(S32 x, S32 y, MASK mask)
gViewerWindow->setCursor(UI_CURSOR_TOOLZOOMIN);
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// handleScrollWheel()
//-----------------------------------------------------------------------------
-BOOL LLFloaterImagePreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
+bool LLFloaterImagePreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
if (mPreviewRect.pointInRect(x, y) && mAvatarPreview)
{
@@ -546,7 +556,7 @@ BOOL LLFloaterImagePreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
mSculptedPreview->refresh();
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
@@ -562,9 +572,9 @@ void LLFloaterImagePreview::onMouseCaptureLostImagePreview(LLMouseHandler* handl
//-----------------------------------------------------------------------------
// LLImagePreviewAvatar
//-----------------------------------------------------------------------------
-LLImagePreviewAvatar::LLImagePreviewAvatar(S32 width, S32 height) : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE)
+LLImagePreviewAvatar::LLImagePreviewAvatar(S32 width, S32 height) : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, false)
{
- mNeedsUpdate = TRUE;
+ mNeedsUpdate = true;
mTargetJoint = NULL;
mTargetMesh = NULL;
mCameraDistance = 0.f;
@@ -590,7 +600,7 @@ S8 LLImagePreviewAvatar::getType() const
return LLViewerDynamicTexture::LL_IMAGE_PREVIEW_AVATAR ;
}
-void LLImagePreviewAvatar::setPreviewTarget(const std::string& joint_name, const std::string& mesh_name, LLImageRaw* imagep, F32 distance, BOOL male)
+void LLImagePreviewAvatar::setPreviewTarget(const std::string& joint_name, const std::string& mesh_name, LLImageRaw* imagep, F32 distance, bool male)
{
mTargetJoint = mDummyAvatar->mRoot->findJoint(joint_name);
// clear out existing test mesh
@@ -611,11 +621,11 @@ void LLImagePreviewAvatar::setPreviewTarget(const std::string& joint_name, const
mDummyAvatar->updateVisualParams();
mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable);
}
- mDummyAvatar->mRoot->setVisible(FALSE, TRUE);
+ mDummyAvatar->mRoot->setVisible(false, true);
mTargetMesh = dynamic_cast<LLViewerJointMesh*>(mDummyAvatar->mRoot->findJoint(mesh_name));
mTargetMesh->setTestTexture(mTextureName);
- mTargetMesh->setVisible(TRUE, FALSE);
+ mTargetMesh->setVisible(true, false);
mCameraDistance = distance;
mCameraZoom = 1.f;
mCameraPitch = 0.f;
@@ -642,9 +652,9 @@ void LLImagePreviewAvatar::clearPreviewTexture(const std::string& mesh_name)
//-----------------------------------------------------------------------------
// update()
//-----------------------------------------------------------------------------
-BOOL LLImagePreviewAvatar::render()
+bool LLImagePreviewAvatar::render()
{
- mNeedsUpdate = FALSE;
+ mNeedsUpdate = false;
LLVOAvatar* avatarp = mDummyAvatar;
gGL.pushUIMatrix();
@@ -689,7 +699,7 @@ BOOL LLImagePreviewAvatar::render()
LLViewerCamera::getInstance()->setAspect((F32)mFullWidth / mFullHeight);
LLViewerCamera::getInstance()->setView(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom);
- LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, FALSE);
+ LLViewerCamera::getInstance()->setPerspective(false, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, false);
LLVertexBuffer::unbind();
avatarp->updateLOD();
@@ -711,7 +721,7 @@ BOOL LLImagePreviewAvatar::render()
gGL.popUIMatrix();
gGL.color4f(1,1,1,1);
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
@@ -719,7 +729,7 @@ BOOL LLImagePreviewAvatar::render()
//-----------------------------------------------------------------------------
void LLImagePreviewAvatar::refresh()
{
- mNeedsUpdate = TRUE;
+ mNeedsUpdate = true;
}
//-----------------------------------------------------------------------------
@@ -751,9 +761,9 @@ void LLImagePreviewAvatar::pan(F32 right, F32 up)
// LLImagePreviewSculpted
//-----------------------------------------------------------------------------
-LLImagePreviewSculpted::LLImagePreviewSculpted(S32 width, S32 height) : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE)
+LLImagePreviewSculpted::LLImagePreviewSculpted(S32 width, S32 height) : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, false)
{
- mNeedsUpdate = TRUE;
+ mNeedsUpdate = true;
mCameraDistance = 0.f;
mCameraYaw = 0.f;
mCameraPitch = 0.f;
@@ -789,6 +799,7 @@ void LLImagePreviewSculpted::setPreviewTarget(LLImageRaw* imagep, F32 distance)
if (imagep)
{
+ LLImageDataSharedLock lock(imagep);
mVolume->sculpt(imagep->getWidth(), imagep->getHeight(), imagep->getComponents(), imagep->getData(), 0, false);
}
@@ -845,9 +856,9 @@ void LLImagePreviewSculpted::setPreviewTarget(LLImageRaw* imagep, F32 distance)
//-----------------------------------------------------------------------------
// render()
//-----------------------------------------------------------------------------
-BOOL LLImagePreviewSculpted::render()
+bool LLImagePreviewSculpted::render()
{
- mNeedsUpdate = FALSE;
+ mNeedsUpdate = false;
LLGLSUIDefault def;
LLGLDisable no_blend(GL_BLEND);
LLGLEnable cull(GL_CULL_FACE);
@@ -891,7 +902,7 @@ BOOL LLImagePreviewSculpted::render()
LLViewerCamera::getInstance()->setAspect((F32) mFullWidth / mFullHeight);
LLViewerCamera::getInstance()->setView(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom);
- LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, FALSE);
+ LLViewerCamera::getInstance()->setPerspective(false, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, false);
const LLVolumeFace &vf = mVolume->getVolumeFace(0);
U32 num_indices = vf.mNumIndices;
@@ -914,7 +925,7 @@ BOOL LLImagePreviewSculpted::render()
gObjectPreviewProgram.unbind();
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
@@ -922,7 +933,7 @@ BOOL LLImagePreviewSculpted::render()
//-----------------------------------------------------------------------------
void LLImagePreviewSculpted::refresh()
{
- mNeedsUpdate = TRUE;
+ mNeedsUpdate = true;
}
//-----------------------------------------------------------------------------
diff --git a/indra/newview/llfloaterimagepreview.h b/indra/newview/llfloaterimagepreview.h
index d034622c35..2edd11b1f4 100644
--- a/indra/newview/llfloaterimagepreview.h
+++ b/indra/newview/llfloaterimagepreview.h
@@ -48,20 +48,20 @@ protected:
public:
LLImagePreviewSculpted(S32 width, S32 height);
- /*virtual*/ S8 getType() const ;
+ S8 getType() const override;
void setPreviewTarget(LLImageRaw *imagep, F32 distance);
void setTexture(U32 name) { mTextureName = name; }
- BOOL render();
+ bool render() override;
void refresh();
void rotate(F32 yaw_radians, F32 pitch_radians);
void zoom(F32 zoom_amt);
void pan(F32 right, F32 up);
- virtual BOOL needsRender() { return mNeedsUpdate; }
+ virtual bool needsRender() override { return mNeedsUpdate; }
protected:
- BOOL mNeedsUpdate;
+ bool mNeedsUpdate;
U32 mTextureName;
F32 mCameraDistance;
F32 mCameraYaw;
@@ -81,21 +81,21 @@ protected:
public:
LLImagePreviewAvatar(S32 width, S32 height);
- /*virtual*/ S8 getType() const ;
+ S8 getType() const override;
- void setPreviewTarget(const std::string& joint_name, const std::string& mesh_name, LLImageRaw* imagep, F32 distance, BOOL male);
+ void setPreviewTarget(const std::string& joint_name, const std::string& mesh_name, LLImageRaw* imagep, F32 distance, bool male);
void setTexture(U32 name) { mTextureName = name; }
void clearPreviewTexture(const std::string& mesh_name);
- BOOL render();
+ bool render() override;
void refresh();
void rotate(F32 yaw_radians, F32 pitch_radians);
void zoom(F32 zoom_amt);
void pan(F32 right, F32 up);
- virtual BOOL needsRender() { return mNeedsUpdate; }
+ virtual bool needsRender() override { return mNeedsUpdate; }
protected:
- BOOL mNeedsUpdate;
+ bool mNeedsUpdate;
LLJoint* mTargetJoint;
LLViewerJointMesh* mTargetMesh;
F32 mCameraDistance;
@@ -113,12 +113,14 @@ public:
LLFloaterImagePreview(const std::string& filename);
virtual ~LLFloaterImagePreview();
- virtual BOOL postBuild();
+ bool postBuild() override;
+
+ S32 getExpectedUploadCost() const override;
- BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- BOOL handleHover(S32 x, S32 y, MASK mask);
- BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
+ bool handleMouseDown(S32 x, S32 y, MASK mask) override;
+ bool handleMouseUp(S32 x, S32 y, MASK mask) override;
+ bool handleHover(S32 x, S32 y, MASK mask) override;
+ bool handleScrollWheel(S32 x, S32 y, S32 clicks) override;
static void onMouseCaptureLostImagePreview(LLMouseHandler*);
@@ -126,7 +128,7 @@ public:
protected:
static void onPreviewTypeCommit(LLUICtrl*,void*);
- void draw();
+ void draw() override;
bool loadImage(const std::string& filename);
LLPointer<LLImageRaw> mRawImagep;
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 44938d5509..13fe7e16a9 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -88,7 +88,7 @@ LLFloaterIMContainer::LLFloaterIMContainer(const LLSD& seed, const Params& param
// Firstly add our self to IMSession observers, so we catch session events
LLIMMgr::getInstance()->addSessionObserver(this);
- mAutoResize = FALSE;
+ mAutoResize = false;
LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::IM, this);
}
@@ -114,7 +114,7 @@ LLFloaterIMContainer::~LLFloaterIMContainer()
}
}
-void LLFloaterIMContainer::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg)
+void LLFloaterIMContainer::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, bool has_offline_msg)
{
addConversationListItem(session_id);
LLFloaterIMSessionTab::addToHost(session_id);
@@ -182,7 +182,7 @@ void LLFloaterIMContainer::onCurrentChannelChanged(const LLUUID& session_id)
}
}
-BOOL LLFloaterIMContainer::postBuild()
+bool LLFloaterIMContainer::postBuild()
{
mOrigMinWidth = getMinWidth();
mOrigMinHeight = getMinHeight();
@@ -267,7 +267,7 @@ BOOL LLFloaterIMContainer::postBuild()
S32 conversations_panel_width = gSavedPerAccountSettings.getS32("ConversationsListPaneWidth");
LLRect conversations_panel_rect = mConversationsPane->getRect();
conversations_panel_rect.mRight = conversations_panel_rect.mLeft + conversations_panel_width;
- mConversationsPane->handleReshape(conversations_panel_rect, TRUE);
+ mConversationsPane->handleReshape(conversations_panel_rect, true);
}
// Init the sort order now that the root had been created
@@ -294,7 +294,7 @@ BOOL LLFloaterIMContainer::postBuild()
mParticipantRefreshTimer.setTimerExpirySec(0);
mParticipantRefreshTimer.start();
- return TRUE;
+ return true;
}
void LLFloaterIMContainer::onOpen(const LLSD& key)
@@ -309,7 +309,7 @@ void LLFloaterIMContainer::onOpen(const LLSD& key)
// virtual
void LLFloaterIMContainer::addFloater(LLFloater* floaterp,
- BOOL select_added_floater,
+ bool select_added_floater,
LLTabContainer::eInsertionPoint insertion_point)
{
if(!floaterp) return;
@@ -329,7 +329,7 @@ void LLFloaterIMContainer::addFloater(LLFloater* floaterp,
LLIconCtrl* icon = 0;
- bool is_in_group = gAgent.isInGroup(session_id, TRUE);
+ bool is_in_group = gAgent.isInGroup(session_id, true);
LLUUID icon_id;
if (is_in_group)
@@ -372,7 +372,7 @@ void LLFloaterIMContainer::addFloater(LLFloater* floaterp,
void LLFloaterIMContainer::onCloseFloater(LLUUID& id)
{
mSessions.erase(id);
- setFocus(TRUE);
+ setFocus(true);
}
void LLFloaterIMContainer::onNewMessageReceived(const LLSD& data)
@@ -384,8 +384,8 @@ void LLFloaterIMContainer::onNewMessageReceived(const LLSD& data)
if(floaterp && current_floater && floaterp != current_floater)
{
if(LLMultiFloater::isFloaterFlashing(floaterp))
- LLMultiFloater::setFloaterFlashing(floaterp, FALSE);
- LLMultiFloater::setFloaterFlashing(floaterp, TRUE);
+ LLMultiFloater::setFloaterFlashing(floaterp, false);
+ LLMultiFloater::setFloaterFlashing(floaterp, true);
}
}
@@ -634,7 +634,7 @@ void LLFloaterIMContainer::handleConversationModelEvent(const LLSD& event)
{
participant_view = createConversationViewParticipant(participant_model);
participant_view->addToFolder(session_view);
- participant_view->setVisible(TRUE);
+ participant_view->setVisible(true);
}
}
// Add a participant view to the conversation floater
@@ -718,7 +718,7 @@ void LLFloaterIMContainer::returnFloaterToHost()
floater->onTearOffClicked();
}
-void LLFloaterIMContainer::setMinimized(BOOL b)
+void LLFloaterIMContainer::setMinimized(bool b)
{
bool was_minimized = isMinimized();
LLMultiFloater::setMinimized(b);
@@ -741,7 +741,7 @@ void LLFloaterIMContainer::setMinimized(BOOL b)
}
}
-void LLFloaterIMContainer::setVisible(BOOL visible)
+void LLFloaterIMContainer::setVisible(bool visible)
{
LLFloaterIMNearbyChat* nearby_chat;
if (visible)
@@ -823,7 +823,7 @@ void LLFloaterIMContainer::getDetachedConversationFloaters(floater_list_t& float
}
}
-void LLFloaterIMContainer::setVisibleAndFrontmost(BOOL take_focus, const LLSD& key)
+void LLFloaterIMContainer::setVisibleAndFrontmost(bool take_focus, const LLSD& key)
{
LLMultiFloater::setVisibleAndFrontmost(take_focus, key);
// Do not select "Nearby Chat" conversation, since it will bring its window to front
@@ -988,7 +988,7 @@ void LLFloaterIMContainer::onAddButtonClicked()
{
LLView * button = findChild<LLView>("conversations_pane_buttons_expanded")->findChild<LLButton>("add_btn");
LLFloater* root_floater = gFloaterView->getParentFloater(this);
- LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterIMContainer::onAvatarPicked, this, _1), TRUE, TRUE, TRUE, root_floater->getName(), button);
+ LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterIMContainer::onAvatarPicked, this, _1), true, true, true, root_floater->getName(), button);
if (picker && root_floater)
{
@@ -1058,7 +1058,7 @@ void LLFloaterIMContainer::onCustomAction(const LLSD& userdata)
}
}
-BOOL LLFloaterIMContainer::isActionChecked(const LLSD& userdata)
+bool LLFloaterIMContainer::isActionChecked(const LLSD& userdata)
{
LLConversationSort order = mConversationViewModel.getSorter();
std::string command = userdata.asString();
@@ -1094,7 +1094,7 @@ BOOL LLFloaterIMContainer::isActionChecked(const LLSD& userdata)
{
return gSavedSettings.getBOOL("TranslateChat");
}
- return FALSE;
+ return false;
}
void LLFloaterIMContainer::setSortOrderSessions(const LLConversationFilter::ESortOrderType order)
@@ -1706,9 +1706,9 @@ void LLFloaterIMContainer::selectNextConversationByID(const LLUUID& uuid)
}
// Synchronous select the conversation item and the conversation floater
-BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool select_widget, bool focus_floater/*=true*/)
+bool LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool select_widget, bool focus_floater/*=true*/)
{
- BOOL handled = TRUE;
+ bool handled = true;
LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id);
/* widget processing */
@@ -1717,7 +1717,7 @@ BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool
LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,session_id);
if (widget && widget->getParentFolder())
{
- widget->getParentFolder()->setSelection(widget, FALSE, FALSE);
+ widget->getParentFolder()->setSelection(widget, false, false);
mConversationsRoot->scrollToShowSelection();
}
}
@@ -1898,10 +1898,10 @@ bool LLFloaterIMContainer::removeConversationListItem(const LLUUID& uuid, bool c
is_widget_selected = widget->isSelected();
if (mConversationsRoot)
{
- new_selection = mConversationsRoot->getNextFromChild(widget, FALSE);
+ new_selection = mConversationsRoot->getNextFromChild(widget, false);
if (!new_selection)
{
- new_selection = mConversationsRoot->getPreviousFromChild(widget, FALSE);
+ new_selection = mConversationsRoot->getPreviousFromChild(widget, false);
}
}
@@ -1918,7 +1918,7 @@ bool LLFloaterIMContainer::removeConversationListItem(const LLUUID& uuid, bool c
// Don't let the focus fall IW, select and refocus on the first conversation in the list
if (change_focus)
{
- setFocus(TRUE);
+ setFocus(true);
if (new_selection)
{
if (mConversationsWidgets.size() == 1)
@@ -2250,7 +2250,7 @@ void LLFloaterIMContainer::openNearbyChat()
if (nearby_chat)
{
reSelectConversation();
- nearby_chat->setOpen(TRUE);
+ nearby_chat->setOpen(true);
}
}
}
@@ -2310,27 +2310,27 @@ bool LLFloaterIMContainer::isScrolledOutOfSight(LLConversationViewSession* conve
return !mConversationsRoot->getVisibleRect().overlaps(widget_rect);
}
-BOOL LLFloaterIMContainer::handleKeyHere(KEY key, MASK mask )
+bool LLFloaterIMContainer::handleKeyHere(KEY key, MASK mask )
{
- BOOL handled = FALSE;
+ bool handled = false;
if(mask == MASK_ALT)
{
if (KEY_RETURN == key )
{
expandConversation();
- handled = TRUE;
+ handled = true;
}
if ((KEY_DOWN == key ) || (KEY_RIGHT == key))
{
selectNextorPreviousConversation(true);
- handled = TRUE;
+ handled = true;
}
if ((KEY_UP == key) || (KEY_LEFT == key))
{
selectNextorPreviousConversation(false);
- handled = TRUE;
+ handled = true;
}
}
return handled;
@@ -2358,11 +2358,11 @@ bool LLFloaterIMContainer::selectNextorPreviousConversation(bool select_next, bo
{
if(select_next)
{
- new_selection = mConversationsRoot->getNextFromChild(widget, FALSE);
+ new_selection = mConversationsRoot->getNextFromChild(widget, false);
}
else
{
- new_selection = mConversationsRoot->getPreviousFromChild(widget, FALSE);
+ new_selection = mConversationsRoot->getPreviousFromChild(widget, false);
}
if (new_selection)
{
@@ -2403,12 +2403,12 @@ bool LLFloaterIMContainer::isParticipantListExpanded()
return is_expanded;
}
-// By default, if torn off session is currently frontmost, LLFloater::isFrontmost() will return FALSE, which can lead to some bugs
+// By default, if torn off session is currently frontmost, LLFloater::isFrontmost() will return false, which can lead to some bugs
// So LLFloater::isFrontmost() is overriden here to check both selected session and the IM floater itself
// Exclude "Nearby Chat" session from the check, as "Nearby Chat" window and "Conversations" floater can be brought
// to front independently
/*virtual*/
-BOOL LLFloaterIMContainer::isFrontmost()
+bool LLFloaterIMContainer::isFrontmost()
{
LLFloaterIMSessionTab* selected_session = LLFloaterIMSessionTab::getConversation(mSelectedSession);
LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat");
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index 82f3b00ebc..966c3dde5b 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -56,25 +56,25 @@ public:
LLFloaterIMContainer(const LLSD& seed, const Params& params = getDefaultParams());
virtual ~LLFloaterIMContainer();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ void draw();
- /*virtual*/ void setMinimized(BOOL b);
- /*virtual*/ void setVisible(BOOL visible);
- /*virtual*/ void setVisibleAndFrontmost(BOOL take_focus=TRUE, const LLSD& key = LLSD());
+ /*virtual*/ void setMinimized(bool b);
+ /*virtual*/ void setVisible(bool visible);
+ /*virtual*/ void setVisibleAndFrontmost(bool take_focus=true, const LLSD& key = LLSD());
/*virtual*/ void updateResizeLimits();
/*virtual*/ void handleReshape(const LLRect& rect, bool by_user);
void onCloseFloater(LLUUID& id);
/*virtual*/ void addFloater(LLFloater* floaterp,
- BOOL select_added_floater,
+ bool select_added_floater,
LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END);
void returnFloaterToHost();
void showConversation(const LLUUID& session_id);
void selectConversation(const LLUUID& session_id);
void selectNextConversationByID(const LLUUID& session_id);
- BOOL selectConversationPair(const LLUUID& session_id, bool select_widget, bool focus_floater = true);
+ bool selectConversationPair(const LLUUID& session_id, bool select_widget, bool focus_floater = true);
void clearAllFlashStates();
bool selectAdjacentConversation(bool focus_selected);
bool selectNextorPreviousConversation(bool select_next, bool focus_selected = true);
@@ -83,7 +83,6 @@ public:
/*virtual*/ void tabClose();
void showStub(bool visible);
- static LLFloater* getCurrentVoiceFloater();
static LLFloaterIMContainer* findInstance();
static LLFloaterIMContainer* getInstance();
@@ -97,7 +96,7 @@ public:
static void idle(void* user_data);
// LLIMSessionObserver observe triggers
- /*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg);
+ /*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, bool has_offline_msg);
/*virtual*/ void sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id);
/*virtual*/ void sessionVoiceOrIMStarted(const LLUUID& session_id);
/*virtual*/ void sessionRemoved(const LLUUID& session_id);
@@ -116,11 +115,11 @@ public:
void doToParticipants(const std::string& item, uuid_vec_t& selectedIDS);
void assignResizeLimits();
- virtual BOOL handleKeyHere(KEY key, MASK mask );
+ virtual bool handleKeyHere(KEY key, MASK mask );
/*virtual*/ void closeFloater(bool app_quitting = false);
void closeAllConversations();
void closeSelectedConversations(const uuid_vec_t& ids);
- /*virtual*/ BOOL isFrontmost();
+ /*virtual*/ bool isFrontmost();
private:
@@ -147,7 +146,7 @@ private:
void onAddButtonClicked();
void onAvatarPicked(const uuid_vec_t& ids);
- BOOL isActionChecked(const LLSD& userdata);
+ bool isActionChecked(const LLSD& userdata);
void onCustomAction (const LLSD& userdata);
void setSortOrderSessions(const LLConversationFilter::ESortOrderType order);
void setSortOrderParticipants(const LLConversationFilter::ESortOrderType order);
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index 40bdf14deb..341e938765 100644
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -71,9 +71,9 @@
S32 LLFloaterIMNearbyChat::sLastSpecialChatChannel = 0;
-const S32 EXPANDED_HEIGHT = 266;
-const S32 COLLAPSED_HEIGHT = 60;
-const S32 EXPANDED_MIN_HEIGHT = 150;
+constexpr S32 EXPANDED_HEIGHT = 266;
+constexpr S32 COLLAPSED_HEIGHT = 60;
+constexpr S32 EXPANDED_MIN_HEIGHT = 150;
// legacy callback glue
void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel);
@@ -120,10 +120,10 @@ LLFloaterIMNearbyChat* LLFloaterIMNearbyChat::buildFloater(const LLSD& key)
}
//virtual
-BOOL LLFloaterIMNearbyChat::postBuild()
+bool LLFloaterIMNearbyChat::postBuild()
{
- setIsSingleInstance(TRUE);
- BOOL result = LLFloaterIMSessionTab::postBuild();
+ setIsSingleInstance(true);
+ bool result = LLFloaterIMSessionTab::postBuild();
mInputEditor->setAutoreplaceCallback(boost::bind(&LLAutoReplace::autoreplaceCallback, LLAutoReplace::getInstance(), _1, _2, _3, _4, _5));
mInputEditor->setCommitCallback(boost::bind(&LLFloaterIMNearbyChat::onChatBoxCommit, this));
@@ -154,7 +154,7 @@ void LLFloaterIMNearbyChat::closeHostedFloater()
// If detached from conversations window close anyway
if (!getHost())
{
- setVisible(FALSE);
+ setVisible(false);
}
// Should check how many conversations are ongoing. Select next to "Nearby Chat" in case there are some other besides.
@@ -269,7 +269,7 @@ void LLFloaterIMNearbyChat::removeScreenChat()
}
-void LLFloaterIMNearbyChat::setVisible(BOOL visible)
+void LLFloaterIMNearbyChat::setVisible(bool visible)
{
LLFloaterIMSessionTab::setVisible(visible);
@@ -280,7 +280,7 @@ void LLFloaterIMNearbyChat::setVisible(BOOL visible)
}
-void LLFloaterIMNearbyChat::setVisibleAndFrontmost(BOOL take_focus, const LLSD& key)
+void LLFloaterIMNearbyChat::setVisibleAndFrontmost(bool take_focus, const LLSD& key)
{
LLFloaterIMSessionTab::setVisibleAndFrontmost(take_focus, key);
@@ -381,7 +381,7 @@ void LLFloaterIMNearbyChat::showHistory()
}
else
{
- LLFloaterIMContainer::getInstance()->setFocus(TRUE);
+ LLFloaterIMContainer::getInstance()->setFocus(true);
}
setResizeLimits(getMinWidth(), EXPANDED_MIN_HEIGHT);
}
@@ -392,21 +392,21 @@ std::string LLFloaterIMNearbyChat::getCurrentChat()
}
// virtual
-BOOL LLFloaterIMNearbyChat::handleKeyHere( KEY key, MASK mask )
+bool LLFloaterIMNearbyChat::handleKeyHere( KEY key, MASK mask )
{
- BOOL handled = FALSE;
+ bool handled = false;
if( KEY_RETURN == key && mask == MASK_CONTROL)
{
// shout
sendChat(CHAT_TYPE_SHOUT);
- handled = TRUE;
+ handled = true;
}
else if (KEY_RETURN == key && mask == MASK_SHIFT)
{
// whisper
sendChat(CHAT_TYPE_WHISPER);
- handled = TRUE;
+ handled = true;
}
@@ -416,19 +416,19 @@ BOOL LLFloaterIMNearbyChat::handleKeyHere( KEY key, MASK mask )
if ((KEY_UP == key) || (KEY_LEFT == key))
{
floater_container->selectNextorPreviousConversation(false);
- handled = TRUE;
+ handled = true;
}
if ((KEY_DOWN == key ) || (KEY_RIGHT == key))
{
floater_container->selectNextorPreviousConversation(true);
- handled = TRUE;
+ handled = true;
}
}
return handled;
}
-BOOL LLFloaterIMNearbyChat::matchChatTypeTrigger(const std::string& in_str, std::string* out_str)
+bool LLFloaterIMNearbyChat::matchChatTypeTrigger(const std::string& in_str, std::string* out_str)
{
U32 in_len = in_str.length();
S32 cnt = sizeof(sChatTypeTriggers) / sizeof(*sChatTypeTriggers);
@@ -681,8 +681,8 @@ void LLFloaterIMNearbyChat::displaySpeakingIndicator()
LLUUID id;
id.setNull();
- mSpeakerMgr->update(FALSE);
- mSpeakerMgr->getSpeakerList(&speaker_list, FALSE);
+ mSpeakerMgr->update(false);
+ mSpeakerMgr->getSpeakerList(&speaker_list, false);
for (LLSpeakerMgr::speaker_list_t::iterator i = speaker_list.begin(); i != speaker_list.end(); ++i)
{
@@ -695,12 +695,12 @@ void LLFloaterIMNearbyChat::displaySpeakingIndicator()
}
}
-void LLFloaterIMNearbyChat::sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate)
+void LLFloaterIMNearbyChat::sendChatFromViewer(const std::string &utf8text, EChatType type, bool animate)
{
sendChatFromViewer(utf8str_to_wstring(utf8text), type, animate);
}
-void LLFloaterIMNearbyChat::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate)
+void LLFloaterIMNearbyChat::sendChatFromViewer(const LLWString &wtext, EChatType type, bool animate)
{
// Look for "/20 foo" channel chats.
S32 channel = 0;
@@ -784,7 +784,7 @@ void LLFloaterIMNearbyChat::startChat(const char* line)
nearby_chat->setMinimized(false);
}
nearby_chat->show();
- nearby_chat->setFocus(TRUE);
+ nearby_chat->setFocus(true);
if (line)
{
@@ -803,7 +803,7 @@ void LLFloaterIMNearbyChat::stopChat()
LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat");
if (nearby_chat)
{
- nearby_chat->mInputEditor->setFocus(FALSE);
+ nearby_chat->mInputEditor->setFocus(false);
gAgent.stopTyping();
}
}
diff --git a/indra/newview/llfloaterimnearbychat.h b/indra/newview/llfloaterimnearbychat.h
index f0daacd6a9..1933317956 100644
--- a/indra/newview/llfloaterimnearbychat.h
+++ b/indra/newview/llfloaterimnearbychat.h
@@ -50,11 +50,11 @@ public:
static LLFloaterIMNearbyChat* buildFloater(const LLSD& key);
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ void onClose(bool app_quitting);
- /*virtual*/ void setVisible(BOOL visible);
- /*virtual*/ void setVisibleAndFrontmost(BOOL take_focus=TRUE, const LLSD& key = LLSD());
+ /*virtual*/ void setVisible(bool visible);
+ /*virtual*/ void setVisibleAndFrontmost(bool take_focus=true, const LLSD& key = LLSD());
/*virtual*/ void closeHostedFloater();
void loadHistory();
@@ -72,20 +72,20 @@ public:
std::string getCurrentChat();
S32 getMessageArchiveLength() {return mMessageArchive.size();}
- virtual BOOL handleKeyHere( KEY key, MASK mask );
+ virtual bool handleKeyHere( KEY key, MASK mask );
static void startChat(const char* line);
static void stopChat();
- static void sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate);
- static void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate);
+ static void sendChatFromViewer(const std::string &utf8text, EChatType type, bool animate);
+ static void sendChatFromViewer(const LLWString &wtext, EChatType type, bool animate);
static bool isWordsName(const std::string& name);
void showHistory();
protected:
- static BOOL matchChatTypeTrigger(const std::string& in_str, std::string* out_str);
+ static bool matchChatTypeTrigger(const std::string& in_str, std::string* out_str);
void onChatBoxKeystroke();
void onChatBoxFocusLost();
void onChatBoxFocusReceived();
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index dfee4096fe..baa274adad 100644
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -123,7 +123,7 @@ protected:
{
if (!toast) return;
LL_DEBUGS("NearbyChat") << "Pooling toast" << LL_ENDL;
- toast->setVisible(FALSE);
+ toast->setVisible(false);
toast->stopTimer();
toast->setIsHidden(true);
@@ -334,7 +334,7 @@ void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat)
if( ((EChatType)chat_type == CHAT_TYPE_DEBUG_MSG))
{
- if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE)
+ if(gSavedSettings.getBOOL("ShowScriptErrors") == false)
return;
if(gSavedSettings.getS32("ShowScriptErrorsLocation")== 1)
return;
@@ -442,7 +442,7 @@ void LLFloaterIMNearbyChatScreenChannel::arrangeToasts()
if (toast)
{
toast->setIsHidden(false);
- toast->setVisible(TRUE);
+ toast->setVisible(true);
}
}
@@ -487,7 +487,7 @@ void LLFloaterIMNearbyChatHandler::initChannel()
void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
const LLSD &args)
{
- if(chat_msg.mMuted == TRUE)
+ if(chat_msg.mMuted == true)
return;
if(chat_msg.mText.empty())
@@ -524,7 +524,7 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
{
if (LLFloater::isQuitRequested()) return;
- if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE)
+ if(gSavedSettings.getBOOL("ShowScriptErrors") == false)
return;
// don't process debug messages from not owned objects, see EXT-7762
diff --git a/indra/newview/llfloaterimnearbychatlistener.cpp b/indra/newview/llfloaterimnearbychatlistener.cpp
index 5a5f6c72c8..9571f3a540 100644
--- a/indra/newview/llfloaterimnearbychatlistener.cpp
+++ b/indra/newview/llfloaterimnearbychatlistener.cpp
@@ -95,6 +95,6 @@ void LLFloaterIMNearbyChatListener::sendChat(LLSD const & chat_data) const
}
// Send it as if it was typed in
- mChatbar.sendChatFromViewer(chat_to_send, type_o_chat, ((BOOL)(channel == 0)) && gSavedSettings.getBOOL("PlayChatAnim"));
+ mChatbar.sendChatFromViewer(chat_to_send, type_o_chat, ((bool)(channel == 0)) && gSavedSettings.getBOOL("PlayChatAnim"));
}
diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index ed2a2807b5..af35d5fd17 100644
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -108,7 +108,7 @@ void LLFloaterIMSession::refresh()
if (mMeTypingTimer.getElapsedTimeF32() > ME_TYPING_TIMEOUT && false == mShouldSendTypingState)
{
LL_DEBUGS("TypingMsgs") << "Send additional Start Typing packet" << LL_ENDL;
- LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, TRUE);
+ LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, true);
mMeTypingTimer.reset();
}
@@ -330,7 +330,7 @@ void LLFloaterIMSession::initIMFloater()
// Disable input editor if session cannot accept text
if ( mSession && !mSession->mTextIMPossible )
{
- mInputEditor->setEnabled(FALSE);
+ mInputEditor->setEnabled(false);
mInputEditor->setLabel(LLTrans::getString("IM_unavailable_text_label"));
}
@@ -342,9 +342,9 @@ void LLFloaterIMSession::initIMFloater()
}
//virtual
-BOOL LLFloaterIMSession::postBuild()
+bool LLFloaterIMSession::postBuild()
{
- BOOL result = LLFloaterIMSessionTab::postBuild();
+ bool result = LLFloaterIMSessionTab::postBuild();
mInputEditor->setMaxTextLength(1023);
mInputEditor->setAutoreplaceCallback(boost::bind(&LLAutoReplace::autoreplaceCallback, LLAutoReplace::getInstance(), _1, _2, _3, _4, _5));
@@ -377,7 +377,7 @@ void LLFloaterIMSession::onAddButtonClicked()
{
LLView * button = findChild<LLView>("toolbar_panel")->findChild<LLButton>("add_btn");
LLFloater* root_floater = gFloaterView->getParentFloater(this);
- LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterIMSession::addSessionParticipants, this, _1), TRUE, TRUE, FALSE, root_floater->getName(), button);
+ LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterIMSession::addSessionParticipants, this, _1), true, true, false, root_floater->getName(), button);
if (!picker)
{
return;
@@ -604,13 +604,13 @@ LLFloaterIMSession* LLFloaterIMSession::show(const LLUUID& session_id)
LLTabContainer::eInsertionPoint i_pt = LLTabContainer::END;
if (floater_container)
{
- floater_container->addFloater(floater, TRUE, i_pt);
+ floater_container->addFloater(floater, true, i_pt);
}
}
floater->openFloater(floater->getKey());
- floater->setVisible(TRUE);
+ floater->setVisible(true);
return floater;
}
@@ -668,7 +668,7 @@ void LLFloaterIMSession::setDocked(bool docked, bool pop_on_undock)
}
}
-void LLFloaterIMSession::setMinimized(BOOL b)
+void LLFloaterIMSession::setMinimized(bool b)
{
bool wasMinimized = isMinimized();
LLFloaterIMSessionTab::setMinimized(b);
@@ -685,7 +685,7 @@ void LLFloaterIMSession::setMinimized(BOOL b)
}
}
-void LLFloaterIMSession::setVisible(BOOL visible)
+void LLFloaterIMSession::setVisible(bool visible)
{
LLNotificationsUI::LLScreenChannel* channel = static_cast<LLNotificationsUI::LLScreenChannel*>
(LLNotificationsUI::LLChannelManager::getInstance()->
@@ -721,7 +721,7 @@ void LLFloaterIMSession::setVisible(BOOL visible)
}
-BOOL LLFloaterIMSession::getVisible()
+bool LLFloaterIMSession::getVisible()
{
bool visible;
@@ -740,7 +740,7 @@ BOOL LLFloaterIMSession::getVisible()
}
else
{
- // getVisible() returns TRUE when Tabbed IM window is minimized.
+ // getVisible() returns true when Tabbed IM window is minimized.
visible = is_active && !im_container->isMinimized()
&& im_container->getVisible();
}
@@ -753,7 +753,7 @@ BOOL LLFloaterIMSession::getVisible()
return visible;
}
-void LLFloaterIMSession::setFocus(BOOL focus)
+void LLFloaterIMSession::setFocus(bool focus)
{
LLFloaterIMSessionTab::setFocus(focus);
@@ -781,8 +781,8 @@ bool LLFloaterIMSession::toggle(const LLUUID& session_id)
}
else if(floater && ((!floater->isDocked() || floater->getVisible()) && !floater->hasFocus()))
{
- floater->setVisible(TRUE);
- floater->setFocus(TRUE);
+ floater->setVisible(true);
+ floater->setFocus(true);
return true;
}
}
@@ -988,7 +988,7 @@ void LLFloaterIMSession::setTyping(bool typing)
if ( mTypingTimer.getElapsedTimeF32() > 1.f )
{
// Still typing, send 'start typing' notification
- LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, TRUE);
+ LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, true);
mShouldSendTypingState = false;
mMeTypingTimer.reset();
}
@@ -996,7 +996,7 @@ void LLFloaterIMSession::setTyping(bool typing)
else
{
// Send 'stop typing' notification immediately
- LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, FALSE);
+ LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, false);
mShouldSendTypingState = false;
}
}
@@ -1006,12 +1006,12 @@ void LLFloaterIMSession::setTyping(bool typing)
LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
if (speaker_mgr)
{
- speaker_mgr->setSpeakerTyping(gAgent.getID(), FALSE);
+ speaker_mgr->setSpeakerTyping(gAgent.getID(), false);
}
}
}
-void LLFloaterIMSession::processIMTyping(const LLUUID& from_id, BOOL typing)
+void LLFloaterIMSession::processIMTyping(const LLUUID& from_id, bool typing)
{
LL_DEBUGS("TypingMsgs") << "typing=" << typing << LL_ENDL;
if ( typing )
@@ -1052,7 +1052,7 @@ void LLFloaterIMSession::processAgentListUpdates(const LLSD& body)
// process the moderator mutes
if (agent_id == gAgentID && agent_data.has("info") && agent_data["info"].has("mutes"))
{
- BOOL moderator_muted_text = agent_data["info"]["mutes"]["text"].asBoolean();
+ bool moderator_muted_text = agent_data["info"]["mutes"]["text"].asBoolean();
mInputEditor->setEnabled(!moderator_muted_text);
std::string label;
if (moderator_muted_text)
@@ -1097,7 +1097,7 @@ void LLFloaterIMSession::processSessionUpdate(const LLSD& session_update)
if ( false && session_update.has("moderated_mode") &&
session_update["moderated_mode"].has("voice") )
{
- BOOL voice_moderated = session_update["moderated_mode"]["voice"];
+ bool voice_moderated = session_update["moderated_mode"]["voice"];
const std::string session_label = LLIMModel::instance().getName(mSessionID);
if (voice_moderated)
@@ -1130,7 +1130,7 @@ void LLFloaterIMSession::draw()
}
// virtual
-BOOL LLFloaterIMSession::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+bool LLFloaterIMSession::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
@@ -1153,7 +1153,7 @@ BOOL LLFloaterIMSession::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
cargo_type, cargo_data, accept);
}
- return TRUE;
+ return true;
}
bool LLFloaterIMSession::dropPerson(LLUUID* person_id, bool drop)
@@ -1176,14 +1176,14 @@ bool LLFloaterIMSession::dropPerson(LLUUID* person_id, bool drop)
return res;
}
-BOOL LLFloaterIMSession::isInviteAllowed() const
+bool LLFloaterIMSession::isInviteAllowed() const
{
return ( (IM_SESSION_CONFERENCE_START == mDialog)
|| (IM_SESSION_INVITE == mDialog && !gAgent.isInGroup(mSessionID))
|| mIsP2PChat);
}
-BOOL LLFloaterIMSession::inviteToSession(const uuid_vec_t& ids)
+bool LLFloaterIMSession::inviteToSession(const uuid_vec_t& ids)
{
LLViewerRegion* region = gAgent.getRegion();
bool is_region_exist = region != NULL;
@@ -1264,7 +1264,7 @@ Note: OTHER_TYPING_TIMEOUT must be > ME_TYPING_TIMEOUT for proper operation of t
LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
if ( speaker_mgr )
{
- speaker_mgr->setSpeakerTyping(from_id, TRUE);
+ speaker_mgr->setSpeakerTyping(from_id, true);
}
}
}
@@ -1281,7 +1281,7 @@ void LLFloaterIMSession::removeTypingIndicator(const LLUUID& from_id)
LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
if (speaker_mgr)
{
- speaker_mgr->setSpeakerTyping(from_id, FALSE);
+ speaker_mgr->setSpeakerTyping(from_id, false);
}
}
}
diff --git a/indra/newview/llfloaterimsession.h b/indra/newview/llfloaterimsession.h
index 28464fc14b..0064b5fa16 100644
--- a/indra/newview/llfloaterimsession.h
+++ b/indra/newview/llfloaterimsession.h
@@ -64,15 +64,15 @@ public:
void initIMFloater();
// LLView overrides
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void setMinimized(BOOL b);
- /*virtual*/ void setVisible(BOOL visible);
- /*virtual*/ BOOL getVisible();
- /*virtual*/ void setFocus(BOOL focus);
+ /*virtual*/ bool postBuild();
+ /*virtual*/ void setMinimized(bool b);
+ /*virtual*/ void setVisible(bool visible);
+ /*virtual*/ bool getVisible();
+ /*virtual*/ void setFocus(bool focus);
// Check typing timeout timer.
/*virtual*/ void draw();
- /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
@@ -122,7 +122,7 @@ public:
const LLVoiceChannel::EState& old_state,
const LLVoiceChannel::EState& new_state);
- void processIMTyping(const LLUUID& from_id, BOOL typing);
+ void processIMTyping(const LLUUID& from_id, bool typing);
void processAgentListUpdates(const LLSD& body);
void processSessionUpdate(const LLSD& session_update);
@@ -148,8 +148,8 @@ private:
bool dropPerson(LLUUID* person_id, bool drop);
- BOOL isInviteAllowed() const;
- BOOL inviteToSession(const uuid_vec_t& agent_ids);
+ bool isInviteAllowed() const;
+ bool inviteToSession(const uuid_vec_t& agent_ids);
static void onInputEditorFocusReceived( LLFocusableElement* caller,void* userdata );
static void onInputEditorFocusLost(LLFocusableElement* caller, void* userdata);
static void onInputEditorKeystroke(LLTextEditor* caller, void* userdata);
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 24cc398f3b..9b1fc96706 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -78,7 +78,7 @@ LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id)
mInputPanels(NULL),
mChatLayoutPanelHeight(0)
{
- setAutoFocus(FALSE);
+ setAutoFocus(false);
mSession = LLIMModel::getInstance()->findIMSession(mSessionID);
mCommitCallbackRegistrar.add("IMSession.Menu.Action",
@@ -102,6 +102,26 @@ LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id)
LLFloaterIMSessionTab::~LLFloaterIMSessionTab()
{
delete mRefreshTimer;
+
+ LLFloaterIMContainer* im_container = LLFloaterIMContainer::findInstance();
+ if (im_container)
+ {
+ LLParticipantList* session = dynamic_cast<LLParticipantList*>(im_container->getSessionModel(mSessionID));
+ if (session)
+ {
+ for (const conversations_widgets_map::value_type& widget_pair : mConversationsWidgets)
+ {
+ LLFolderViewItem* widget = widget_pair.second;
+ LLFolderViewModelItem* item_vmi = widget->getViewModelItem();
+ if (item_vmi && item_vmi->getNumRefs() == 1)
+ {
+ // This is the last pointer, remove participant from session
+ // before participant gets deleted on destroyView.
+ session->removeChild(item_vmi);
+ }
+ }
+ }
+ }
}
// static
@@ -141,7 +161,7 @@ LLFloaterIMSessionTab* LLFloaterIMSessionTab::getConversation(const LLUUID& uuid
};
// virtual
-void LLFloaterIMSessionTab::setVisible(BOOL visible)
+void LLFloaterIMSessionTab::setVisible(bool visible)
{
if (visible && !mHasVisibleBeenInitialized)
{
@@ -164,7 +184,7 @@ void LLFloaterIMSessionTab::setVisible(BOOL visible)
}
// virtual
-void LLFloaterIMSessionTab::setFocus(BOOL focus)
+void LLFloaterIMSessionTab::setFocus(bool focus)
{
super::setFocus(focus);
@@ -175,7 +195,7 @@ void LLFloaterIMSessionTab::setFocus(BOOL focus)
if (mInputEditor)
{
- mInputEditor->setFocus(TRUE);
+ mInputEditor->setFocus(true);
}
}
}
@@ -238,9 +258,9 @@ void LLFloaterIMSessionTab::assignResizeLimits()
}
// virtual
-BOOL LLFloaterIMSessionTab::postBuild()
+bool LLFloaterIMSessionTab::postBuild()
{
- BOOL result;
+ bool result;
mBodyStack = getChild<LLLayoutStack>("main_stack");
mParticipantListAndHistoryStack = getChild<LLLayoutStack>("im_panels");
@@ -305,8 +325,8 @@ BOOL LLFloaterIMSessionTab::postBuild()
mInputEditor->setTextExpandedCallback(boost::bind(&LLFloaterIMSessionTab::reshapeChatLayoutPanel, this));
mInputEditor->setMouseUpCallback(boost::bind(&LLFloaterIMSessionTab::onInputEditorClicked, this));
- mInputEditor->setCommitOnFocusLost( FALSE );
- mInputEditor->setPassDelete(TRUE);
+ mInputEditor->setCommitOnFocusLost(false);
+ mInputEditor->setPassDelete(true);
mInputEditor->setFont(LLViewerChat::getChatFont());
mChatLayoutPanelHeight = mChatLayoutPanel->getRect().getHeight();
@@ -453,19 +473,19 @@ void LLFloaterIMSessionTab::onInputEditorClicked()
void LLFloaterIMSessionTab::onEmojiRecentPanelToggleBtnClicked()
{
- BOOL show = mEmojiRecentPanel->getVisible() ? FALSE : TRUE;
+ bool show = mEmojiRecentPanel->getVisible() ? false : true;
if (show)
{
initEmojiRecentPanel();
}
mEmojiRecentPanel->setVisible(show);
- mInputEditor->setFocus(TRUE);
+ mInputEditor->setFocus(true);
}
void LLFloaterIMSessionTab::onEmojiPickerShowBtnClicked()
{
- mInputEditor->setFocus(TRUE);
+ mInputEditor->setFocus(true);
mInputEditor->showEmojiHelper();
}
@@ -474,8 +494,8 @@ void LLFloaterIMSessionTab::initEmojiRecentPanel()
std::list<llwchar>& recentlyUsed = LLFloaterEmojiPicker::getRecentlyUsed();
if (recentlyUsed.empty())
{
- mEmojiRecentEmptyText->setVisible(TRUE);
- mEmojiRecentIconsCtrl->setVisible(FALSE);
+ mEmojiRecentEmptyText->setVisible(true);
+ mEmojiRecentIconsCtrl->setVisible(false);
}
else
{
@@ -485,8 +505,8 @@ void LLFloaterIMSessionTab::initEmojiRecentPanel()
emojis += emoji;
}
mEmojiRecentIconsCtrl->setEmojis(emojis);
- mEmojiRecentEmptyText->setVisible(FALSE);
- mEmojiRecentIconsCtrl->setVisible(TRUE);
+ mEmojiRecentEmptyText->setVisible(false);
+ mEmojiRecentIconsCtrl->setVisible(true);
}
}
@@ -533,7 +553,6 @@ void LLFloaterIMSessionTab::appendMessage(const LLChat& chat, const LLSD& args)
{
im_box->setTimeNow(mSessionID, chat.mFromID);
}
-
LLChat& tmp_chat = const_cast<LLChat&>(chat);
if (tmp_chat.mTimeStr.empty())
@@ -638,7 +657,7 @@ void LLFloaterIMSessionTab::addConversationViewParticipant(LLConversationItem* p
mConversationsWidgets[uuid] = participant_view;
participant_view->addToFolder(mConversationsRoot);
participant_view->addToSession(mSessionID);
- participant_view->setVisible(TRUE);
+ participant_view->setVisible(true);
}
}
@@ -647,6 +666,27 @@ void LLFloaterIMSessionTab::removeConversationViewParticipant(const LLUUID& part
LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,participant_id);
if (widget)
{
+ LLFolderViewModelItem* item_vmi = widget->getViewModelItem();
+ if (item_vmi && item_vmi->getNumRefs() == 1)
+ {
+ // This is the last pointer, remove participant from session
+ // before participant gets deleted on destroyView.
+ //
+ // Floater (widget) and participant's view can simultaneously
+ // co-own the model, in which case view is responsible for
+ // the deletion and floater is free to clear and recreate
+ // the list, yet there are cases where only widget owns
+ // the pointer so it should do the cleanup.
+ // See "add_participant".
+ //
+ // Todo: If it keeps causing issues turn participants
+ // into LLPointers in the session
+ LLParticipantList* session = getParticipantList();
+ if (session)
+ {
+ session->removeChild(item_vmi);
+ }
+ }
widget->destroyView();
}
mConversationsWidgets.erase(participant_id);
@@ -683,7 +723,7 @@ void LLFloaterIMSessionTab::refreshConversation()
if (widget_it->second->getViewModelItem())
{
widget_it->second->refresh();
- widget_it->second->setVisible(TRUE);
+ widget_it->second->setVisible(true);
}
++widget_it;
}
@@ -928,7 +968,7 @@ void LLFloaterIMSessionTab::forceReshape()
void LLFloaterIMSessionTab::reshapeChatLayoutPanel()
{
- mChatLayoutPanel->reshape(mChatLayoutPanel->getRect().getWidth(), mInputEditor->getRect().getHeight() + mInputEditorPad, FALSE);
+ mChatLayoutPanel->reshape(mChatLayoutPanel->getRect().getWidth(), mInputEditor->getRect().getHeight() + mInputEditorPad, false);
}
// static
@@ -1089,7 +1129,7 @@ void LLFloaterIMSessionTab::onOpen(const LLSD& key)
mInputButtonPanel->setVisible(isTornOff());
- setFocus(TRUE);
+ setFocus(true);
}
@@ -1121,8 +1161,7 @@ void LLFloaterIMSessionTab::onTearOffClicked()
void LLFloaterIMSessionTab::updateGearBtn()
{
-
- BOOL prevVisibility = mGearBtn->getVisible();
+ bool prevVisibility = mGearBtn->getVisible();
mGearBtn->setVisible(checkIfTornOff() && mIsP2PChat);
@@ -1267,9 +1306,9 @@ LLView* LLFloaterIMSessionTab::getChatHistory()
return mChatHistory;
}
-BOOL LLFloaterIMSessionTab::handleKeyHere(KEY key, MASK mask )
+bool LLFloaterIMSessionTab::handleKeyHere(KEY key, MASK mask )
{
- BOOL handled = FALSE;
+ bool handled = false;
if(mask == MASK_ALT)
{
@@ -1277,17 +1316,17 @@ BOOL LLFloaterIMSessionTab::handleKeyHere(KEY key, MASK mask )
if (KEY_RETURN == key && !isTornOff())
{
floater_container->expandConversation();
- handled = TRUE;
+ handled = true;
}
if ((KEY_UP == key) || (KEY_LEFT == key))
{
floater_container->selectNextorPreviousConversation(false);
- handled = TRUE;
+ handled = true;
}
if ((KEY_DOWN == key ) || (KEY_RIGHT == key))
{
floater_container->selectNextorPreviousConversation(true);
- handled = TRUE;
+ handled = true;
}
}
return handled;
diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h
index cc985b2753..8a024611ff 100644
--- a/indra/newview/llfloaterimsessiontab.h
+++ b/indra/newview/llfloaterimsessiontab.h
@@ -77,10 +77,10 @@ public:
// LLFloater overrides
/*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void draw();
- /*virtual*/ void setVisible(BOOL visible);
- /*virtual*/ void setFocus(BOOL focus);
+ /*virtual*/ void setVisible(bool visible);
+ /*virtual*/ void setFocus(bool focus);
/*virtual*/ void closeFloater(bool app_quitting = false);
// Handle the left hand participant list widgets
@@ -97,7 +97,7 @@ public:
virtual void updateMessages() {}
LLConversationItem* getCurSelectedViewModelItem();
void forceReshape();
- virtual BOOL handleKeyHere( KEY key, MASK mask );
+ virtual bool handleKeyHere( KEY key, MASK mask );
bool isMessagePaneExpanded(){return mMessagePaneExpanded;}
void setMessagePaneExpanded(bool expanded){mMessagePaneExpanded = expanded;}
void restoreFloater();
diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp
index 10088d20c2..547f71c986 100644
--- a/indra/newview/llfloaterinspect.cpp
+++ b/indra/newview/llfloaterinspect.cpp
@@ -47,7 +47,7 @@
LLFloaterInspect::LLFloaterInspect(const LLSD& key)
: LLFloater(key),
- mDirty(FALSE),
+ mDirty(false),
mOwnerNameCacheConnection(),
mCreatorNameCacheConnection()
{
@@ -56,7 +56,7 @@ LLFloaterInspect::LLFloaterInspect(const LLSD& key)
mCommitCallbackRegistrar.add("Inspect.SelectObject", boost::bind(&LLFloaterInspect::onSelectObject, this));
}
-BOOL LLFloaterInspect::postBuild()
+bool LLFloaterInspect::postBuild()
{
mObjectList = getChild<LLScrollListCtrl>("object_list");
// childSetAction("button owner",onClickOwnerProfile, this);
@@ -65,7 +65,7 @@ BOOL LLFloaterInspect::postBuild()
refresh();
- return TRUE;
+ return true;
}
LLFloaterInspect::~LLFloaterInspect(void)
@@ -89,13 +89,13 @@ LLFloaterInspect::~LLFloaterInspect(void)
}
else
{
- LLFloaterReg::showInstance("build", LLSD(), TRUE);
+ LLFloaterReg::showInstance("build", LLSD(), true);
}
}
void LLFloaterInspect::onOpen(const LLSD& key)
{
- BOOL forcesel = LLSelectMgr::getInstance()->setForceSelection(TRUE);
+ bool forcesel = LLSelectMgr::getInstance()->setForceSelection(true);
LLToolMgr::getInstance()->setTransientTool(LLToolCompInspect::getInstance());
LLSelectMgr::getInstance()->setForceSelection(forcesel); // restore previouis value
mObjectSelection = LLSelectMgr::getInstance()->getSelection();
@@ -345,7 +345,7 @@ void LLFloaterInspect::draw()
if (mDirty)
{
refresh();
- mDirty = FALSE;
+ mDirty = false;
}
LLFloater::draw();
diff --git a/indra/newview/llfloaterinspect.h b/indra/newview/llfloaterinspect.h
index 44381eac96..d772d84027 100644
--- a/indra/newview/llfloaterinspect.h
+++ b/indra/newview/llfloaterinspect.h
@@ -44,12 +44,12 @@ public:
// static void show(void* ignored = NULL);
void onOpen(const LLSD& key);
- virtual BOOL postBuild();
+ virtual bool postBuild();
void dirty();
LLUUID getSelectedUUID();
virtual void draw();
virtual void refresh();
-// static BOOL isVisible();
+// static bool isVisible();
virtual void onFocusReceived();
void onClickCreatorProfile();
void onClickOwnerProfile();
@@ -58,7 +58,7 @@ public:
LLScrollListCtrl* mObjectList;
protected:
// protected members
- void setDirty() { mDirty = TRUE; }
+ void setDirty() { mDirty = true; }
bool mDirty;
private:
diff --git a/indra/newview/llfloaterinventorysettings.cpp b/indra/newview/llfloaterinventorysettings.cpp
index 29d6e90a33..e5ee69f240 100644
--- a/indra/newview/llfloaterinventorysettings.cpp
+++ b/indra/newview/llfloaterinventorysettings.cpp
@@ -36,9 +36,9 @@ LLFloaterInventorySettings::LLFloaterInventorySettings(const LLSD& key)
LLFloaterInventorySettings::~LLFloaterInventorySettings()
{}
-BOOL LLFloaterInventorySettings::postBuild()
+bool LLFloaterInventorySettings::postBuild()
{
getChild<LLButton>("ok_btn")->setCommitCallback(boost::bind(&LLFloater::closeFloater, this, false));
- return TRUE;
+ return true;
}
diff --git a/indra/newview/llfloaterinventorysettings.h b/indra/newview/llfloaterinventorysettings.h
index 50304276c7..3fe3a001b9 100644
--- a/indra/newview/llfloaterinventorysettings.h
+++ b/indra/newview/llfloaterinventorysettings.h
@@ -35,7 +35,7 @@ class LLFloaterInventorySettings
friend class LLFloaterReg;
public:
- virtual BOOL postBuild();
+ bool postBuild() override;
private:
LLFloaterInventorySettings(const LLSD& key);
diff --git a/indra/newview/llfloaterinventorythumbnailshelper.cpp b/indra/newview/llfloaterinventorythumbnailshelper.cpp
index 814f88e9b9..9775eda697 100644
--- a/indra/newview/llfloaterinventorythumbnailshelper.cpp
+++ b/indra/newview/llfloaterinventorythumbnailshelper.cpp
@@ -52,7 +52,7 @@ LLFloaterInventoryThumbnailsHelper::~LLFloaterInventoryThumbnailsHelper()
{
}
-BOOL LLFloaterInventoryThumbnailsHelper::postBuild()
+bool LLFloaterInventoryThumbnailsHelper::postBuild()
{
mInventoryThumbnailsList = getChild<LLScrollListCtrl>("inventory_thumbnails_list");
mInventoryThumbnailsList->setAllowMultipleSelection(true);
diff --git a/indra/newview/llfloaterinventorythumbnailshelper.h b/indra/newview/llfloaterinventorythumbnailshelper.h
index b42a85d1a5..71eeef31ee 100644
--- a/indra/newview/llfloaterinventorythumbnailshelper.h
+++ b/indra/newview/llfloaterinventorythumbnailshelper.h
@@ -40,7 +40,7 @@ class LLFloaterInventoryThumbnailsHelper:
friend class LLFloaterReg;
private:
LLFloaterInventoryThumbnailsHelper(const LLSD& key);
- BOOL postBuild() override;
+ bool postBuild() override;
~LLFloaterInventoryThumbnailsHelper();
LLScrollListCtrl* mInventoryThumbnailsList;
diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp
index 558b14bba7..8be154e148 100644
--- a/indra/newview/llfloaterjoystick.cpp
+++ b/indra/newview/llfloaterjoystick.cpp
@@ -132,7 +132,7 @@ void LLFloaterJoystick::draw()
LLFloater::draw();
}
-BOOL LLFloaterJoystick::postBuild()
+bool LLFloaterJoystick::postBuild()
{
center();
F32 range = gSavedSettings.getBOOL("Cursor3D") ? 128.f : 2.f;
@@ -160,7 +160,7 @@ BOOL LLFloaterJoystick::postBuild()
refresh();
refreshListOfDevices();
- return TRUE;
+ return true;
}
LLFloaterJoystick::~LLFloaterJoystick()
@@ -407,7 +407,7 @@ void LLFloaterJoystick::onCommitJoystickEnabled(LLUICtrl*, void *joy_panel)
joystick_enabled = true;
}
gSavedSettings.setBOOL("JoystickEnabled", joystick_enabled);
- BOOL flycam_enabled = self->mCheckFlycamEnabled->get();
+ bool flycam_enabled = self->mCheckFlycamEnabled->get();
if (!joystick_enabled || !flycam_enabled)
{
diff --git a/indra/newview/llfloaterjoystick.h b/indra/newview/llfloaterjoystick.h
index 1d46efd3f6..97eee0a630 100644
--- a/indra/newview/llfloaterjoystick.h
+++ b/indra/newview/llfloaterjoystick.h
@@ -39,7 +39,7 @@ class LLFloaterJoystick : public LLFloater
public:
- virtual BOOL postBuild();
+ virtual bool postBuild();
virtual void refresh();
virtual void apply(); // Apply the changed values.
virtual void cancel(); // Cancel the changed values.
diff --git a/indra/newview/llfloaterlagmeter.cpp b/indra/newview/llfloaterlagmeter.cpp
index db00f69f03..1cd46cdd44 100644
--- a/indra/newview/llfloaterlagmeter.cpp
+++ b/indra/newview/llfloaterlagmeter.cpp
@@ -50,11 +50,11 @@ LLFloaterLagMeter::LLFloaterLagMeter(const LLSD& key)
mCommitCallbackRegistrar.add("LagMeter.ClickShrink", boost::bind(&LLFloaterLagMeter::onClickShrink, this));
}
-BOOL LLFloaterLagMeter::postBuild()
+bool LLFloaterLagMeter::postBuild()
{
// Don't let this window take keyboard focus -- it's confusing to
// lose arrow-key driving when testing lag.
- setIsChrome(TRUE);
+ setIsChrome(true);
// were we shrunk last time?
if (isShrunk())
@@ -117,7 +117,7 @@ BOOL LLFloaterLagMeter::postBuild()
// childSetAction("minimize", onClickShrink, this);
updateControls(isShrunk()); // if expanded append colon to the labels (EXT-4079)
- return TRUE;
+ return true;
}
LLFloaterLagMeter::~LLFloaterLagMeter()
{
@@ -348,7 +348,7 @@ void LLFloaterLagMeter::updateControls(bool shrink)
button->setLabel( getString("bigger_label", mStringArgs) );
}
// Don't put keyboard focus on the button
- button->setFocus(FALSE);
+ button->setFocus(false);
// self->mClientText->setVisible(self->mShrunk);
// self->mClientCause->setVisible(self->mShrunk);
@@ -365,7 +365,7 @@ void LLFloaterLagMeter::updateControls(bool shrink)
// self->mShrunk = !self->mShrunk;
}
-BOOL LLFloaterLagMeter::isShrunk()
+bool LLFloaterLagMeter::isShrunk()
{
return gSavedSettings.getBOOL("LagMeterShrunk");
}
diff --git a/indra/newview/llfloaterlagmeter.h b/indra/newview/llfloaterlagmeter.h
index 929ea40629..5072ec8ed6 100644
--- a/indra/newview/llfloaterlagmeter.h
+++ b/indra/newview/llfloaterlagmeter.h
@@ -37,7 +37,7 @@ class LLFloaterLagMeter : public LLFloater
public:
/*virtual*/ void draw();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
private:
LLFloaterLagMeter(const LLSD& key);
@@ -46,7 +46,7 @@ private:
void determineNetwork();
void determineServer();
void updateControls(bool shrink);
- BOOL isShrunk();
+ bool isShrunk();
void onClickShrink();
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 9c4c9b3e59..f8fc812d29 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -93,8 +93,8 @@ static std::string OWNER_GROUP = "2";
static std::string MATURITY = "[MATURITY]";
// constants used in callbacks below - syntactic sugar.
-static const BOOL BUY_GROUP_LAND = TRUE;
-static const BOOL BUY_PERSONAL_LAND = FALSE;
+static const bool BUY_GROUP_LAND = true;
+static const bool BUY_PERSONAL_LAND = false;
LLPointer<LLParcelSelection> LLPanelLandGeneral::sSelectionForBuyPass = NULL;
// Statics
@@ -125,7 +125,7 @@ class LLPanelLandExperiences
{
public:
LLPanelLandExperiences(LLSafeHandle<LLParcelSelection>& parcelp);
- virtual BOOL postBuild();
+ virtual bool postBuild();
void refresh();
void experienceAdded(const LLUUID& id, U32 xp_type, U32 access_type);
@@ -155,7 +155,7 @@ public:
return ((parcelp) ? (parcelp->getArea() >= MINIMUM_PARCEL_SIZE) : false);
}
- virtual BOOL postBuild() override;
+ virtual bool postBuild() override;
virtual void refresh() override;
virtual LLParcel * getParcel() override;
@@ -318,7 +318,7 @@ LLFloaterLand::LLFloaterLand(const LLSD& seed)
LLViewerParcelMgr::getInstance()->addObserver( sObserver );
}
-BOOL LLFloaterLand::postBuild()
+bool LLFloaterLand::postBuild()
{
setVisibleCallback(boost::bind(&LLFloaterLand::onVisibilityChanged, this, _2));
@@ -331,7 +331,7 @@ BOOL LLFloaterLand::postBuild()
tab->selectTab(sLastTab);
}
- return TRUE;
+ return true;
}
@@ -439,19 +439,19 @@ void* LLFloaterLand::createPanelLandEnvironment(void* data)
LLPanelLandGeneral::LLPanelLandGeneral(LLParcelSelectionHandle& parcel)
: LLPanel(),
- mUncheckedSell(FALSE),
+ mUncheckedSell(false),
mParcel(parcel)
{
}
-BOOL LLPanelLandGeneral::postBuild()
+bool LLPanelLandGeneral::postBuild()
{
mEditName = getChild<LLLineEditor>("Name");
mEditName->setCommitCallback(onCommitAny, this);
getChild<LLLineEditor>("Name")->setPrevalidate(LLTextValidate::validateASCIIPrintableNoPipe);
mEditDesc = getChild<LLTextEditor>("Description");
- mEditDesc->setCommitOnFocusLost(TRUE);
+ mEditDesc->setCommitOnFocusLost(true);
mEditDesc->setCommitCallback(onCommitAny, this);
mEditDesc->setContentTrusted(false);
// No prevalidate function - historically the prevalidate function was broken,
@@ -544,7 +544,7 @@ BOOL LLPanelLandGeneral::postBuild()
if(gDisconnected)
{
- return TRUE;
+ return true;
}
// note: on region change this will not be re checked, should not matter on Agni as
@@ -566,7 +566,7 @@ BOOL LLPanelLandGeneral::postBuild()
}
}
- return TRUE;
+ return true;
}
@@ -578,51 +578,51 @@ LLPanelLandGeneral::~LLPanelLandGeneral()
// public
void LLPanelLandGeneral::refresh()
{
- mEditName->setEnabled(FALSE);
+ mEditName->setEnabled(false);
mEditName->setText(LLStringUtil::null);
- mEditDesc->setEnabled(FALSE);
+ mEditDesc->setEnabled(false);
mEditDesc->setText(getString("no_selection_text"));
mTextSalePending->setText(LLStringUtil::null);
- mTextSalePending->setEnabled(FALSE);
+ mTextSalePending->setEnabled(false);
- mBtnDeedToGroup->setEnabled(FALSE);
- mBtnSetGroup->setEnabled(FALSE);
- mBtnStartAuction->setEnabled(FALSE);
+ mBtnDeedToGroup->setEnabled(false);
+ mBtnSetGroup->setEnabled(false);
+ mBtnStartAuction->setEnabled(false);
- mCheckDeedToGroup ->set(FALSE);
- mCheckDeedToGroup ->setEnabled(FALSE);
- mCheckContributeWithDeed->set(FALSE);
- mCheckContributeWithDeed->setEnabled(FALSE);
+ mCheckDeedToGroup ->set(false);
+ mCheckDeedToGroup ->setEnabled(false);
+ mCheckContributeWithDeed->set(false);
+ mCheckContributeWithDeed->setEnabled(false);
mTextOwner->setText(LLStringUtil::null);
mContentRating->setText(LLStringUtil::null);
mLandType->setText(LLStringUtil::null);
mBtnProfile->setLabel(getString("profile_text"));
- mBtnProfile->setEnabled(FALSE);
+ mBtnProfile->setEnabled(false);
mTextClaimDate->setText(LLStringUtil::null);
mTextGroup->setText(LLStringUtil::null);
mTextPrice->setText(LLStringUtil::null);
- mSaleInfoForSale1->setVisible(FALSE);
- mSaleInfoForSale2->setVisible(FALSE);
- mSaleInfoForSaleObjects->setVisible(FALSE);
- mSaleInfoForSaleNoObjects->setVisible(FALSE);
- mSaleInfoNotForSale->setVisible(FALSE);
- mBtnSellLand->setVisible(FALSE);
- mBtnStopSellLand->setVisible(FALSE);
+ mSaleInfoForSale1->setVisible(false);
+ mSaleInfoForSale2->setVisible(false);
+ mSaleInfoForSaleObjects->setVisible(false);
+ mSaleInfoForSaleNoObjects->setVisible(false);
+ mSaleInfoNotForSale->setVisible(false);
+ mBtnSellLand->setVisible(false);
+ mBtnStopSellLand->setVisible(false);
mTextPriceLabel->setText(LLStringUtil::null);
mTextDwell->setText(LLStringUtil::null);
- mBtnBuyLand->setEnabled(FALSE);
- mBtnScriptLimits->setEnabled(FALSE);
- mBtnBuyGroupLand->setEnabled(FALSE);
- mBtnReleaseLand->setEnabled(FALSE);
- mBtnReclaimLand->setEnabled(FALSE);
- mBtnBuyPass->setEnabled(FALSE);
+ mBtnBuyLand->setEnabled(false);
+ mBtnScriptLimits->setEnabled(false);
+ mBtnBuyGroupLand->setEnabled(false);
+ mBtnReleaseLand->setEnabled(false);
+ mBtnReclaimLand->setEnabled(false);
+ mBtnBuyPass->setEnabled(false);
if(gDisconnected)
{
@@ -635,24 +635,24 @@ void LLPanelLandGeneral::refresh()
if(regionp && (regionp->getOwner() == gAgent.getID()))
{
region_owner = true;
- mBtnReleaseLand->setVisible(FALSE);
- mBtnReclaimLand->setVisible(TRUE);
+ mBtnReleaseLand->setVisible(false);
+ mBtnReclaimLand->setVisible(true);
}
else
{
- mBtnReleaseLand->setVisible(TRUE);
- mBtnReclaimLand->setVisible(FALSE);
+ mBtnReleaseLand->setVisible(true);
+ mBtnReclaimLand->setVisible(false);
}
LLParcel *parcel = mParcel->getParcel();
if (parcel)
{
// something selected, hooray!
- BOOL is_leased = (LLParcel::OS_LEASED == parcel->getOwnershipStatus());
- BOOL region_xfer = FALSE;
+ bool is_leased = (LLParcel::OS_LEASED == parcel->getOwnershipStatus());
+ bool region_xfer = false;
if(regionp
&& !(regionp->getRegionFlag(REGION_FLAGS_BLOCK_LAND_RESELL)))
{
- region_xfer = TRUE;
+ region_xfer = true;
}
if (regionp)
@@ -662,57 +662,57 @@ void LLPanelLandGeneral::refresh()
}
// estate owner/manager cannot edit other parts of the parcel
- BOOL estate_manager_sellable = !parcel->getAuctionID()
+ bool estate_manager_sellable = !parcel->getAuctionID()
&& gAgent.canManageEstate()
// estate manager/owner can only sell parcels owned by estate owner
&& regionp
&& (parcel->getOwnerID() == regionp->getOwner());
- BOOL owner_sellable = region_xfer && !parcel->getAuctionID()
+ bool owner_sellable = region_xfer && !parcel->getAuctionID()
&& LLViewerParcelMgr::isParcelModifiableByAgent(
parcel, GP_LAND_SET_SALE_INFO);
- BOOL can_be_sold = owner_sellable || estate_manager_sellable;
+ bool can_be_sold = owner_sellable || estate_manager_sellable;
const LLUUID &owner_id = parcel->getOwnerID();
- BOOL is_public = parcel->isPublic();
+ bool is_public = parcel->isPublic();
// Is it owned?
if (is_public)
{
mTextSalePending->setText(LLStringUtil::null);
- mTextSalePending->setEnabled(FALSE);
+ mTextSalePending->setEnabled(false);
mTextOwner->setText(getString("public_text"));
- mTextOwner->setEnabled(FALSE);
- mBtnProfile->setEnabled(FALSE);
+ mTextOwner->setEnabled(false);
+ mBtnProfile->setEnabled(false);
mTextClaimDate->setText(LLStringUtil::null);
- mTextClaimDate->setEnabled(FALSE);
+ mTextClaimDate->setEnabled(false);
mTextGroup->setText(getString("none_text"));
- mTextGroup->setEnabled(FALSE);
- mBtnStartAuction->setEnabled(FALSE);
+ mTextGroup->setEnabled(false);
+ mBtnStartAuction->setEnabled(false);
}
else
{
if(!is_leased && (owner_id == gAgent.getID()))
{
mTextSalePending->setText(getString("need_tier_to_modify"));
- mTextSalePending->setEnabled(TRUE);
+ mTextSalePending->setEnabled(true);
}
else if(parcel->getAuctionID())
{
mTextSalePending->setText(getString("auction_id_text"));
mTextSalePending->setTextArg("[ID]", llformat("%u", parcel->getAuctionID()));
- mTextSalePending->setEnabled(TRUE);
+ mTextSalePending->setEnabled(true);
}
else
{
// not the owner, or it is leased
mTextSalePending->setText(LLStringUtil::null);
- mTextSalePending->setEnabled(FALSE);
+ mTextSalePending->setEnabled(false);
}
//refreshNames();
- mTextOwner->setEnabled(TRUE);
+ mTextOwner->setEnabled(true);
// We support both group and personal profiles
- mBtnProfile->setEnabled(TRUE);
+ mBtnProfile->setEnabled(true);
if (parcel->getGroupID().isNull())
{
@@ -720,7 +720,7 @@ void LLPanelLandGeneral::refresh()
mBtnProfile->setLabel(getString("profile_text"));
mTextGroup->setText(getString("none_text"));
- mTextGroup->setEnabled(FALSE);
+ mTextGroup->setEnabled(false);
}
else
{
@@ -728,7 +728,7 @@ void LLPanelLandGeneral::refresh()
mBtnProfile->setLabel(getString("info_text"));
//mTextGroup->setText("HIPPOS!");//parcel->getGroupName());
- mTextGroup->setEnabled(TRUE);
+ mTextGroup->setEnabled(true);
}
// Display claim date
@@ -740,25 +740,25 @@ void LLPanelLandGeneral::refresh()
mTextClaimDate->setText(claim_date_str);
mTextClaimDate->setEnabled(is_leased);
- BOOL enable_auction = (gAgent.getGodLevel() >= GOD_LIAISON)
+ bool enable_auction = (gAgent.getGodLevel() >= GOD_LIAISON)
&& (owner_id == GOVERNOR_LINDEN_ID)
&& (parcel->getAuctionID() == 0);
mBtnStartAuction->setEnabled(enable_auction);
}
// Display options
- BOOL can_edit_identity = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_IDENTITY);
+ bool can_edit_identity = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_IDENTITY);
mEditName->setEnabled(can_edit_identity);
mEditDesc->setEnabled(can_edit_identity);
mEditDesc->setParseURLs(!can_edit_identity);
- BOOL can_edit_agent_only = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_NO_POWERS);
+ bool can_edit_agent_only = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_NO_POWERS);
mBtnSetGroup->setEnabled(can_edit_agent_only && !parcel->getIsGroupOwned());
const LLUUID& group_id = parcel->getGroupID();
// Can only allow deeding if you own it and it's got a group.
- BOOL enable_deed = (owner_id == gAgent.getID()
+ bool enable_deed = (owner_id == gAgent.getID()
&& group_id.notNull()
&& gAgent.isInGroup(group_id));
// You don't need special powers to allow your object to
@@ -770,7 +770,7 @@ void LLPanelLandGeneral::refresh()
// Actually doing the deeding requires you to have GP_LAND_DEED
// powers in the group.
- BOOL can_deed = gAgent.hasPowerInGroup(group_id, GP_LAND_DEED);
+ bool can_deed = gAgent.hasPowerInGroup(group_id, GP_LAND_DEED);
mBtnDeedToGroup->setEnabled( parcel->getAllowDeedToGroup()
&& group_id.notNull()
&& can_deed
@@ -780,10 +780,10 @@ void LLPanelLandGeneral::refresh()
mEditName->setText( parcel->getName() );
mEditDesc->setText( parcel->getDesc() );
- BOOL for_sale = parcel->getForSale();
+ bool for_sale = parcel->getForSale();
- mBtnSellLand->setVisible(FALSE);
- mBtnStopSellLand->setVisible(FALSE);
+ mBtnSellLand->setVisible(false);
+ mBtnStopSellLand->setVisible(false);
// show pricing information
S32 area;
@@ -812,19 +812,19 @@ void LLPanelLandGeneral::refresh()
if (for_sale)
{
- mSaleInfoForSale1->setVisible(TRUE);
- mSaleInfoForSale2->setVisible(TRUE);
+ mSaleInfoForSale1->setVisible(true);
+ mSaleInfoForSale2->setVisible(true);
if (parcel->getSellWithObjects())
{
- mSaleInfoForSaleObjects->setVisible(TRUE);
- mSaleInfoForSaleNoObjects->setVisible(FALSE);
+ mSaleInfoForSaleObjects->setVisible(true);
+ mSaleInfoForSaleNoObjects->setVisible(false);
}
else
{
- mSaleInfoForSaleObjects->setVisible(FALSE);
- mSaleInfoForSaleNoObjects->setVisible(TRUE);
+ mSaleInfoForSaleObjects->setVisible(false);
+ mSaleInfoForSaleNoObjects->setVisible(true);
}
- mSaleInfoNotForSale->setVisible(FALSE);
+ mSaleInfoNotForSale->setVisible(false);
F32 cost_per_sqm = 0.0f;
if (area > 0)
@@ -837,19 +837,19 @@ void LLPanelLandGeneral::refresh()
mSaleInfoForSale1->setTextArg("[PRICE_PER_SQM]", llformat("%.1f", cost_per_sqm));
if (can_be_sold)
{
- mBtnStopSellLand->setVisible(TRUE);
+ mBtnStopSellLand->setVisible(true);
}
}
else
{
- mSaleInfoForSale1->setVisible(FALSE);
- mSaleInfoForSale2->setVisible(FALSE);
- mSaleInfoForSaleObjects->setVisible(FALSE);
- mSaleInfoForSaleNoObjects->setVisible(FALSE);
- mSaleInfoNotForSale->setVisible(TRUE);
+ mSaleInfoForSale1->setVisible(false);
+ mSaleInfoForSale2->setVisible(false);
+ mSaleInfoForSaleObjects->setVisible(false);
+ mSaleInfoForSaleNoObjects->setVisible(false);
+ mSaleInfoNotForSale->setVisible(true);
if (can_be_sold)
{
- mBtnSellLand->setVisible(TRUE);
+ mBtnSellLand->setVisible(true);
}
}
@@ -869,15 +869,15 @@ void LLPanelLandGeneral::refresh()
}
else
{
- BOOL is_owner_release = LLViewerParcelMgr::isParcelOwnedByAgent(parcel, GP_LAND_RELEASE);
- BOOL is_manager_release = (gAgent.canManageEstate() &&
+ bool is_owner_release = LLViewerParcelMgr::isParcelOwnedByAgent(parcel, GP_LAND_RELEASE);
+ bool is_manager_release = (gAgent.canManageEstate() &&
regionp &&
(parcel->getOwnerID() != regionp->getOwner()));
- BOOL can_release = is_owner_release || is_manager_release;
+ bool can_release = is_owner_release || is_manager_release;
mBtnReleaseLand->setEnabled( can_release );
}
- BOOL use_pass = parcel->getOwnerID()!= gAgent.getID() && parcel->getParcelFlag(PF_USE_PASS_LIST) && !LLViewerParcelMgr::getInstance()->isCollisionBanned();;
+ bool use_pass = parcel->getOwnerID()!= gAgent.getID() && parcel->getParcelFlag(PF_USE_PASS_LIST) && !LLViewerParcelMgr::getInstance()->isCollisionBanned();;
mBtnBuyPass->setEnabled(use_pass);
}
@@ -996,7 +996,7 @@ void LLPanelLandGeneral::setGroup(const LLUUID& group_id)
// static
void LLPanelLandGeneral::onClickBuyLand(void* data)
{
- BOOL* for_group = (BOOL*)data;
+ bool* for_group = (bool*)data;
LLViewerParcelMgr::getInstance()->startBuyLand(*for_group);
}
@@ -1035,7 +1035,7 @@ void LLPanelLandGeneral::onClickReclaim(void*)
}
// static
-BOOL LLPanelLandGeneral::enableBuyPass(void* data)
+bool LLPanelLandGeneral::enableBuyPass(void* data)
{
LLPanelLandGeneral* panelp = (LLPanelLandGeneral*)data;
LLParcel* parcel = panelp != NULL ? panelp->mParcel->getParcel() : LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel();
@@ -1123,8 +1123,8 @@ void LLPanelLandGeneral::onCommitAny(LLUICtrl *ctrl, void *userdata)
parcel->setName(name);
parcel->setDesc(desc);
- BOOL allow_deed_to_group= panelp->mCheckDeedToGroup->get();
- BOOL contribute_with_deed = panelp->mCheckContributeWithDeed->get();
+ bool allow_deed_to_group= panelp->mCheckDeedToGroup->get();
+ bool contribute_with_deed = panelp->mCheckContributeWithDeed->get();
parcel->setParcelFlag(PF_ALLOW_DEED_TO_GROUP, allow_deed_to_group);
parcel->setContributeWithDeed(contribute_with_deed);
@@ -1150,7 +1150,7 @@ void LLPanelLandGeneral::onClickStopSellLand(void* data)
LLPanelLandGeneral* panelp = (LLPanelLandGeneral*)data;
LLParcel* parcel = panelp->mParcel->getParcel();
- parcel->setParcelFlag(PF_FOR_SALE, FALSE);
+ parcel->setParcelFlag(PF_FOR_SALE, false);
parcel->setSalePrice(0);
parcel->setAuthorizedBuyerID(LLUUID::null);
@@ -1183,18 +1183,18 @@ LLPanelLandObjects::LLPanelLandObjects(LLParcelSelectionHandle& parcel)
mBtnRefresh(NULL),
mBtnReturnOwnerList(NULL),
mOwnerList(NULL),
- mFirstReply(TRUE),
+ mFirstReply(true),
mSelectedCount(0),
- mSelectedIsGroup(FALSE)
+ mSelectedIsGroup(false)
{
}
-BOOL LLPanelLandObjects::postBuild()
+bool LLPanelLandObjects::postBuild()
{
- mFirstReply = TRUE;
+ mFirstReply = true;
mParcelObjectBonus = getChild<LLTextBox>("parcel_object_bonus");
mSWTotalObjects = getChild<LLTextBox>("objects_available");
mObjectContribution = getChild<LLTextBox>("object_contrib_text");
@@ -1240,12 +1240,12 @@ BOOL LLPanelLandObjects::postBuild()
mOwnerList = getChild<LLNameListCtrl>("owner list");
mOwnerList->setIsFriendCallback(LLAvatarActions::isFriend);
- mOwnerList->sortByColumnIndex(3, FALSE);
+ mOwnerList->sortByColumnIndex(3, false);
childSetCommitCallback("owner list", onCommitList, this);
mOwnerList->setDoubleClickCallback(onDoubleClickOwner, this);
mOwnerList->setContextMenu(LLScrollListCtrl::MENU_AVATAR);
- return TRUE;
+ return true;
}
@@ -1272,7 +1272,7 @@ void LLPanelLandObjects::onDoubleClickOwner(void *userdata)
return;
}
// Is this a group?
- BOOL is_group = cell->getValue().asString() == OWNER_GROUP;
+ bool is_group = cell->getValue().asString() == OWNER_GROUP;
if (is_group)
{
LLGroupActions::show(owner_id);
@@ -1289,19 +1289,19 @@ void LLPanelLandObjects::refresh()
{
LLParcel *parcel = mParcel->getParcel();
- mBtnShowOwnerObjects->setEnabled(FALSE);
- mBtnShowGroupObjects->setEnabled(FALSE);
- mBtnShowOtherObjects->setEnabled(FALSE);
- mBtnReturnOwnerObjects->setEnabled(FALSE);
- mBtnReturnGroupObjects->setEnabled(FALSE);
- mBtnReturnOtherObjects->setEnabled(FALSE);
- mCleanOtherObjectsTime->setEnabled(FALSE);
- mBtnRefresh-> setEnabled(FALSE);
- mBtnReturnOwnerList-> setEnabled(FALSE);
+ mBtnShowOwnerObjects->setEnabled(false);
+ mBtnShowGroupObjects->setEnabled(false);
+ mBtnShowOtherObjects->setEnabled(false);
+ mBtnReturnOwnerObjects->setEnabled(false);
+ mBtnReturnGroupObjects->setEnabled(false);
+ mBtnReturnOtherObjects->setEnabled(false);
+ mCleanOtherObjectsTime->setEnabled(false);
+ mBtnRefresh-> setEnabled(false);
+ mBtnReturnOwnerList-> setEnabled(false);
mSelectedOwners.clear();
mOwnerList->deleteAllItems();
- mOwnerList->setEnabled(FALSE);
+ mOwnerList->setEnabled(false);
if (!parcel || gDisconnected)
{
@@ -1340,12 +1340,12 @@ void LLPanelLandObjects::refresh()
if (parcel_object_bonus != 1.0f)
{
- mParcelObjectBonus->setVisible(TRUE);
+ mParcelObjectBonus->setVisible(true);
mParcelObjectBonus->setTextArg("[BONUS]", llformat("%.2f", parcel_object_bonus));
}
else
{
- mParcelObjectBonus->setVisible(FALSE);
+ mParcelObjectBonus->setVisible(false);
}
if (sw_total > sw_max)
@@ -1369,30 +1369,30 @@ void LLPanelLandObjects::refresh()
mSelectedObjects->setTextArg("[COUNT]", llformat("%d", selected));
mCleanOtherObjectsTime->setText(llformat("%d", mOtherTime));
- BOOL can_return_owned = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_RETURN_GROUP_OWNED);
- BOOL can_return_group_set = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_RETURN_GROUP_SET);
- BOOL can_return_other = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_RETURN_NON_GROUP);
+ bool can_return_owned = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_RETURN_GROUP_OWNED);
+ bool can_return_group_set = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_RETURN_GROUP_SET);
+ bool can_return_other = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_RETURN_NON_GROUP);
if (can_return_owned || can_return_group_set || can_return_other)
{
if (owned && can_return_owned)
{
- mBtnShowOwnerObjects->setEnabled(TRUE);
- mBtnReturnOwnerObjects->setEnabled(TRUE);
+ mBtnShowOwnerObjects->setEnabled(true);
+ mBtnReturnOwnerObjects->setEnabled(true);
}
if (group && can_return_group_set)
{
- mBtnShowGroupObjects->setEnabled(TRUE);
- mBtnReturnGroupObjects->setEnabled(TRUE);
+ mBtnShowGroupObjects->setEnabled(true);
+ mBtnReturnGroupObjects->setEnabled(true);
}
if (other && can_return_other)
{
- mBtnShowOtherObjects->setEnabled(TRUE);
- mBtnReturnOtherObjects->setEnabled(TRUE);
+ mBtnShowOtherObjects->setEnabled(true);
+ mBtnReturnOtherObjects->setEnabled(true);
}
- mCleanOtherObjectsTime->setEnabled(TRUE);
- mBtnRefresh->setEnabled(TRUE);
+ mCleanOtherObjectsTime->setEnabled(true);
+ mBtnRefresh->setEnabled(true);
}
}
}
@@ -1617,8 +1617,8 @@ void LLPanelLandObjects::onClickRefresh(void* userdata)
// ready the list for results
self->mOwnerList->deleteAllItems();
self->mOwnerList->setCommentText(LLTrans::getString("Searching"));
- self->mOwnerList->setEnabled(FALSE);
- self->mFirstReply = TRUE;
+ self->mOwnerList->setEnabled(false);
+ self->mFirstReply = true;
// send the message
msg->newMessageFast(_PREHASH_ParcelObjectOwnersRequest);
@@ -1649,18 +1649,18 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo
S32 rows = msg->getNumberOfBlocksFast(_PREHASH_Data);
//uuid_list_t return_ids;
LLUUID owner_id;
- BOOL is_group_owned;
+ bool is_group_owned;
S32 object_count;
U32 most_recent_time = 0;
- BOOL is_online;
+ bool is_online;
std::string object_count_str;
- //BOOL b_need_refresh = FALSE;
+ //bool b_need_refresh = false;
// If we were waiting for the first reply, clear the "Searching..." text.
if (self->mFirstReply)
{
self->mOwnerList->deleteAllItems();
- self->mFirstReply = FALSE;
+ self->mFirstReply = false;
}
for(S32 i = 0; i < rows; ++i)
@@ -1720,7 +1720,7 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo
}
else
{
- self->mOwnerList->setEnabled(TRUE);
+ self->mOwnerList->setEnabled(true);
}
self->mBtnRefresh->setEnabled(true);
@@ -1731,7 +1731,7 @@ void LLPanelLandObjects::onCommitList(LLUICtrl* ctrl, void* data)
{
LLPanelLandObjects* self = (LLPanelLandObjects*)data;
- if (FALSE == self->mOwnerList->getCanSelect())
+ if (false == self->mOwnerList->getCanSelect())
{
return;
}
@@ -1755,7 +1755,7 @@ void LLPanelLandObjects::onCommitList(LLUICtrl* ctrl, void* data)
// Set the selection, and enable the return button.
self->mSelectedOwners.clear();
self->mSelectedOwners.insert(item->getUUID());
- self->mBtnReturnOwnerList->setEnabled(TRUE);
+ self->mBtnReturnOwnerList->setEnabled(true);
// Highlight this user's objects
clickShowCore(self, RT_LIST, &(self->mSelectedOwners));
@@ -1934,7 +1934,7 @@ LLPanelLandOptions::LLPanelLandOptions(LLParcelSelectionHandle& parcel)
}
-BOOL LLPanelLandOptions::postBuild()
+bool LLPanelLandOptions::postBuild()
{
mCheckEditObjects = getChild<LLCheckBoxCtrl>( "edit objects check");
childSetCommitCallback("edit objects check", onCommitAny, this);
@@ -1992,8 +1992,8 @@ BOOL LLPanelLandOptions::postBuild()
if (gAgent.wantsPGOnly())
{
// Disable these buttons if they are PG (Teen) users
- mMatureCtrl->setVisible(FALSE);
- mMatureCtrl->setEnabled(FALSE);
+ mMatureCtrl->setVisible(false);
+ mMatureCtrl->setEnabled(false);
}
@@ -2001,7 +2001,7 @@ BOOL LLPanelLandOptions::postBuild()
if (mSnapshotCtrl)
{
mSnapshotCtrl->setCommitCallback( onCommitAny, this );
- mSnapshotCtrl->setAllowNoTexture ( TRUE );
+ mSnapshotCtrl->setAllowNoTexture ( true );
mSnapshotCtrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER);
mSnapshotCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
}
@@ -2024,7 +2024,7 @@ BOOL LLPanelLandOptions::postBuild()
mLandingTypeCombo = getChild<LLComboBox>( "landing type");
childSetCommitCallback("landing type", onCommitAny, this);
- return TRUE;
+ return true;
}
@@ -2041,55 +2041,55 @@ void LLPanelLandOptions::refresh()
LLParcel *parcel = mParcel->getParcel();
if (!parcel || gDisconnected)
{
- mCheckEditObjects ->set(FALSE);
- mCheckEditObjects ->setEnabled(FALSE);
+ mCheckEditObjects ->set(false);
+ mCheckEditObjects ->setEnabled(false);
- mCheckEditGroupObjects ->set(FALSE);
- mCheckEditGroupObjects ->setEnabled(FALSE);
+ mCheckEditGroupObjects ->set(false);
+ mCheckEditGroupObjects ->setEnabled(false);
- mCheckAllObjectEntry ->set(FALSE);
- mCheckAllObjectEntry ->setEnabled(FALSE);
+ mCheckAllObjectEntry ->set(false);
+ mCheckAllObjectEntry ->setEnabled(false);
- mCheckGroupObjectEntry ->set(FALSE);
- mCheckGroupObjectEntry ->setEnabled(FALSE);
+ mCheckGroupObjectEntry ->set(false);
+ mCheckGroupObjectEntry ->setEnabled(false);
- mCheckSafe ->set(FALSE);
- mCheckSafe ->setEnabled(FALSE);
+ mCheckSafe ->set(false);
+ mCheckSafe ->setEnabled(false);
- mCheckFly ->set(FALSE);
- mCheckFly ->setEnabled(FALSE);
+ mCheckFly ->set(false);
+ mCheckFly ->setEnabled(false);
- mCheckGroupScripts ->set(FALSE);
- mCheckGroupScripts ->setEnabled(FALSE);
+ mCheckGroupScripts ->set(false);
+ mCheckGroupScripts ->setEnabled(false);
- mCheckOtherScripts ->set(FALSE);
- mCheckOtherScripts ->setEnabled(FALSE);
+ mCheckOtherScripts ->set(false);
+ mCheckOtherScripts ->setEnabled(false);
- mPushRestrictionCtrl->set(FALSE);
- mPushRestrictionCtrl->setEnabled(FALSE);
+ mPushRestrictionCtrl->set(false);
+ mPushRestrictionCtrl->setEnabled(false);
- mSeeAvatarsCtrl->set(TRUE);
- mSeeAvatarsCtrl->setEnabled(FALSE);
- mSeeAvatarsText->setEnabled(FALSE);
+ mSeeAvatarsCtrl->set(true);
+ mSeeAvatarsCtrl->setEnabled(false);
+ mSeeAvatarsText->setEnabled(false);
mLandingTypeCombo->setCurrentByIndex(0);
- mLandingTypeCombo->setEnabled(FALSE);
+ mLandingTypeCombo->setEnabled(false);
mSnapshotCtrl->setImageAssetID(LLUUID::null);
- mSnapshotCtrl->setEnabled(FALSE);
+ mSnapshotCtrl->setEnabled(false);
mLocationText->setTextArg("[LANDING]", getString("landing_point_none"));
- mSetBtn->setEnabled(FALSE);
- mClearBtn->setEnabled(FALSE);
+ mSetBtn->setEnabled(false);
+ mClearBtn->setEnabled(false);
- mMatureCtrl->setEnabled(FALSE);
+ mMatureCtrl->setEnabled(false);
}
else
{
// something selected, hooray!
// Display options
- BOOL can_change_options = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_OPTIONS);
+ bool can_change_options = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_OPTIONS);
mCheckEditObjects ->set( parcel->getAllowModify() );
mCheckEditObjects ->setEnabled( can_change_options );
@@ -2119,7 +2119,7 @@ void LLPanelLandOptions::refresh()
{
mPushRestrictionCtrl->setLabel(getString("push_restrict_region_text"));
mPushRestrictionCtrl->setEnabled(false);
- mPushRestrictionCtrl->set(TRUE);
+ mPushRestrictionCtrl->set(true);
}
else
{
@@ -2131,7 +2131,7 @@ void LLPanelLandOptions::refresh()
mSeeAvatarsCtrl->setEnabled(can_change_options && parcel->getHaveNewParcelLimitData());
mSeeAvatarsText->setEnabled(can_change_options && parcel->getHaveNewParcelLimitData());
- BOOL can_change_landing_point = LLViewerParcelMgr::isParcelModifiableByAgent(parcel,
+ bool can_change_landing_point = LLViewerParcelMgr::isParcelModifiableByAgent(parcel,
GP_LAND_SET_LANDING_POINT);
mLandingTypeCombo->setCurrentByIndex((S32)parcel->getLandingType());
mLandingTypeCombo->setEnabled( can_change_landing_point );
@@ -2166,13 +2166,13 @@ void LLPanelLandOptions::refresh()
if (gAgent.wantsPGOnly())
{
// Disable these buttons if they are PG (Teen) users
- mMatureCtrl->setVisible(FALSE);
- mMatureCtrl->setEnabled(FALSE);
+ mMatureCtrl->setVisible(false);
+ mMatureCtrl->setEnabled(false);
}
else
{
// not teen so fill in the data for the maturity control
- mMatureCtrl->setVisible(TRUE);
+ mMatureCtrl->setVisible(true);
LLStyle::Params style;
style.image(LLUI::getUIImage(gFloaterView->getParentFloater(this)->getString("maturity_icon_moderate")));
LLCheckBoxWithTBAcess* fullaccess_mature_ctrl = (LLCheckBoxWithTBAcess*)mMatureCtrl;
@@ -2180,7 +2180,7 @@ void LLPanelLandOptions::refresh()
fullaccess_mature_ctrl->getTextBox()->appendImageSegment(style);
fullaccess_mature_ctrl->getTextBox()->appendText(getString("mature_check_mature"), false);
fullaccess_mature_ctrl->setToolTip(getString("mature_check_mature_tooltip"));
- fullaccess_mature_ctrl->reshape(fullaccess_mature_ctrl->getRect().getWidth(), fullaccess_mature_ctrl->getRect().getHeight(), FALSE);
+ fullaccess_mature_ctrl->reshape(fullaccess_mature_ctrl->getRect().getWidth(), fullaccess_mature_ctrl->getRect().getHeight(), false);
// they can see the checkbox, but its disposition depends on the
// state of the region
@@ -2189,8 +2189,8 @@ void LLPanelLandOptions::refresh()
{
if (regionp->getSimAccess() == SIM_ACCESS_PG)
{
- mMatureCtrl->setEnabled(FALSE);
- mMatureCtrl->set(FALSE);
+ mMatureCtrl->setEnabled(false);
+ mMatureCtrl->set(false);
}
else if (regionp->getSimAccess() == SIM_ACCESS_MATURE)
{
@@ -2199,8 +2199,8 @@ void LLPanelLandOptions::refresh()
}
else if (regionp->getSimAccess() == SIM_ACCESS_ADULT)
{
- mMatureCtrl->setEnabled(FALSE);
- mMatureCtrl->set(TRUE);
+ mMatureCtrl->setEnabled(false);
+ mMatureCtrl->set(true);
mMatureCtrl->setLabel(getString("mature_check_adult"));
mMatureCtrl->setToolTip(getString("mature_check_adult_tooltip"));
}
@@ -2222,12 +2222,12 @@ void LLPanelLandOptions::refreshSearch()
LLParcel *parcel = mParcel->getParcel();
if (!parcel || gDisconnected)
{
- mCheckShowDirectory->set(FALSE);
- mCheckShowDirectory->setEnabled(FALSE);
+ mCheckShowDirectory->set(false);
+ mCheckShowDirectory->setEnabled(false);
const std::string& none_string = LLParcel::getCategoryString(LLParcel::C_NONE);
mCategoryCombo->setValue(none_string);
- mCategoryCombo->setEnabled(FALSE);
+ mCategoryCombo->setEnabled(false);
return;
}
@@ -2240,7 +2240,7 @@ void LLPanelLandOptions::refreshSearch()
&& region
&& !(region->getRegionFlag(REGION_FLAGS_BLOCK_PARCEL_SEARCH));
- BOOL show_directory = parcel->getParcelFlag(PF_SHOW_DIRECTORY);
+ bool show_directory = parcel->getParcelFlag(PF_SHOW_DIRECTORY);
mCheckShowDirectory->set(show_directory);
// Set by string in case the order in UI doesn't match the order by index.
@@ -2315,21 +2315,21 @@ void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata)
}
// Extract data from UI
- BOOL create_objects = self->mCheckEditObjects->get();
- BOOL create_group_objects = self->mCheckEditGroupObjects->get() || self->mCheckEditObjects->get();
- BOOL all_object_entry = self->mCheckAllObjectEntry->get();
- BOOL group_object_entry = self->mCheckGroupObjectEntry->get() || self->mCheckAllObjectEntry->get();
- BOOL allow_terraform = false; // removed from UI so always off now - self->mCheckEditLand->get();
- BOOL allow_damage = !self->mCheckSafe->get();
- BOOL allow_fly = self->mCheckFly->get();
- BOOL allow_landmark = TRUE; // cannot restrict landmark creation
- BOOL allow_other_scripts = self->mCheckOtherScripts->get();
- BOOL allow_group_scripts = self->mCheckGroupScripts->get() || allow_other_scripts;
- 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();
+ bool create_objects = self->mCheckEditObjects->get();
+ bool create_group_objects = self->mCheckEditGroupObjects->get() || self->mCheckEditObjects->get();
+ bool all_object_entry = self->mCheckAllObjectEntry->get();
+ bool group_object_entry = self->mCheckGroupObjectEntry->get() || self->mCheckAllObjectEntry->get();
+ bool allow_terraform = false; // removed from UI so always off now - self->mCheckEditLand->get();
+ bool allow_damage = !self->mCheckSafe->get();
+ bool allow_fly = self->mCheckFly->get();
+ bool allow_landmark = true; // cannot restrict landmark creation
+ bool allow_other_scripts = self->mCheckOtherScripts->get();
+ bool allow_group_scripts = self->mCheckGroupScripts->get() || allow_other_scripts;
+ 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());
S32 landing_type_index = self->mLandingTypeCombo->getCurrentIndex();
@@ -2441,7 +2441,7 @@ LLPanelLandAccess::LLPanelLandAccess(LLParcelSelectionHandle& parcel)
}
-BOOL LLPanelLandAccess::postBuild()
+bool LLPanelLandAccess::postBuild()
{
childSetCommitCallback("public_access", onCommitPublicAccess, this);
childSetCommitCallback("limit_payment", onCommitAny, this);
@@ -2460,19 +2460,19 @@ BOOL LLPanelLandAccess::postBuild()
mListAccess = getChild<LLNameListCtrl>("AccessList");
if (mListAccess)
{
- mListAccess->sortByColumnIndex(0, TRUE); // ascending
+ mListAccess->sortByColumnIndex(0, true); // ascending
mListAccess->setContextMenu(LLScrollListCtrl::MENU_AVATAR);
}
mListBanned = getChild<LLNameListCtrl>("BannedList");
if (mListBanned)
{
- mListBanned->sortByColumnIndex(0, TRUE); // ascending
+ mListBanned->sortByColumnIndex(0, true); // ascending
mListBanned->setContextMenu(LLScrollListCtrl::MENU_AVATAR);
mListBanned->setAlternateSort();
}
- return TRUE;
+ return true;
}
@@ -2488,9 +2488,9 @@ void LLPanelLandAccess::refresh()
// Display options
if (parcel && !gDisconnected)
{
- BOOL use_access_list = parcel->getParcelFlag(PF_USE_ACCESS_LIST);
- BOOL use_group = parcel->getParcelFlag(PF_USE_ACCESS_GROUP);
- BOOL public_access = !use_access_list;
+ bool use_access_list = parcel->getParcelFlag(PF_USE_ACCESS_LIST);
+ bool use_group = parcel->getParcelFlag(PF_USE_ACCESS_GROUP);
+ bool public_access = !use_access_list;
if (parcel->getRegionAllowAccessOverride())
{
@@ -2499,8 +2499,8 @@ void LLPanelLandAccess::refresh()
}
else
{
- getChild<LLUICtrl>("public_access")->setValue(TRUE);
- getChild<LLUICtrl>("GroupCheck")->setValue(FALSE);
+ getChild<LLUICtrl>("public_access")->setValue(true);
+ getChild<LLUICtrl>("GroupCheck")->setValue(false);
}
std::string group_name;
gCacheName->getGroupName(parcel->getGroupID(), group_name);
@@ -2549,9 +2549,9 @@ void LLPanelLandAccess::refresh()
}
prefix.append(" " + parent_floater->getString("Remaining") + ") ");
}
- mListAccess->addNameItem(entry.mID, ADD_DEFAULT, TRUE, "", prefix);
+ mListAccess->addNameItem(entry.mID, ADD_DEFAULT, true, "", prefix);
}
- mListAccess->sortByName(TRUE);
+ mListAccess->sortByName(true);
}
// Ban List
@@ -2617,12 +2617,12 @@ void LLPanelLandAccess::refresh()
columns[1]["alt_value"] = entry.mTime != 0 ? std::to_string(seconds) : "Always";
mListBanned->addElement(item);
}
- mListBanned->sortByName(TRUE);
+ mListBanned->sortByName(true);
}
if(parcel->getRegionDenyAnonymousOverride())
{
- getChild<LLUICtrl>("limit_payment")->setValue(TRUE);
+ getChild<LLUICtrl>("limit_payment")->setValue(true);
getChild<LLUICtrl>("limit_payment")->setLabelArg("[ESTATE_PAYMENT_LIMIT]", getString("access_estate_defined") );
}
else
@@ -2632,7 +2632,7 @@ void LLPanelLandAccess::refresh()
}
if(parcel->getRegionDenyAgeUnverifiedOverride())
{
- getChild<LLUICtrl>("limit_age_verified")->setValue(TRUE);
+ getChild<LLUICtrl>("limit_age_verified")->setValue(true);
getChild<LLUICtrl>("limit_age_verified")->setLabelArg("[ESTATE_AGE_LIMIT]", getString("access_estate_defined") );
}
else
@@ -2641,7 +2641,7 @@ void LLPanelLandAccess::refresh()
getChild<LLUICtrl>("limit_age_verified")->setLabelArg("[ESTATE_AGE_LIMIT]", std::string() );
}
- BOOL use_pass = parcel->getParcelFlag(PF_USE_PASS_LIST);
+ bool use_pass = parcel->getParcelFlag(PF_USE_PASS_LIST);
getChild<LLUICtrl>("PassCheck")->setValue(use_pass);
LLCtrlSelectionInterface* passcombo = childGetSelectionInterface("pass_combo");
if (passcombo)
@@ -2660,12 +2660,12 @@ void LLPanelLandAccess::refresh()
}
else
{
- getChild<LLUICtrl>("public_access")->setValue(FALSE);
- getChild<LLUICtrl>("limit_payment")->setValue(FALSE);
- getChild<LLUICtrl>("limit_age_verified")->setValue(FALSE);
- getChild<LLUICtrl>("GroupCheck")->setValue(FALSE);
+ getChild<LLUICtrl>("public_access")->setValue(false);
+ getChild<LLUICtrl>("limit_payment")->setValue(false);
+ getChild<LLUICtrl>("limit_age_verified")->setValue(false);
+ getChild<LLUICtrl>("GroupCheck")->setValue(false);
getChild<LLUICtrl>("GroupCheck")->setLabelArg("[GROUP]", LLStringUtil::null );
- getChild<LLUICtrl>("PassCheck")->setValue(FALSE);
+ getChild<LLUICtrl>("PassCheck")->setValue(false);
getChild<LLUICtrl>("PriceSpin")->setValue((F32)PARCEL_PASS_PRICE_DEFAULT);
getChild<LLUICtrl>("HoursSpin")->setValue(PARCEL_PASS_HOURS_DEFAULT );
getChild<LLUICtrl>("AccessList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",0));
@@ -2677,26 +2677,26 @@ void LLPanelLandAccess::refresh()
void LLPanelLandAccess::refresh_ui()
{
- getChildView("public_access")->setEnabled(FALSE);
- getChildView("limit_payment")->setEnabled(FALSE);
- getChildView("limit_age_verified")->setEnabled(FALSE);
- getChildView("GroupCheck")->setEnabled(FALSE);
- getChildView("PassCheck")->setEnabled(FALSE);
- getChildView("pass_combo")->setEnabled(FALSE);
- getChildView("PriceSpin")->setEnabled(FALSE);
- getChildView("HoursSpin")->setEnabled(FALSE);
- getChildView("AccessList")->setEnabled(FALSE);
- getChildView("BannedList")->setEnabled(FALSE);
- getChildView("add_allowed")->setEnabled(FALSE);
- getChildView("remove_allowed")->setEnabled(FALSE);
- getChildView("add_banned")->setEnabled(FALSE);
- getChildView("remove_banned")->setEnabled(FALSE);
+ getChildView("public_access")->setEnabled(false);
+ getChildView("limit_payment")->setEnabled(false);
+ getChildView("limit_age_verified")->setEnabled(false);
+ getChildView("GroupCheck")->setEnabled(false);
+ getChildView("PassCheck")->setEnabled(false);
+ getChildView("pass_combo")->setEnabled(false);
+ getChildView("PriceSpin")->setEnabled(false);
+ getChildView("HoursSpin")->setEnabled(false);
+ getChildView("AccessList")->setEnabled(false);
+ getChildView("BannedList")->setEnabled(false);
+ getChildView("add_allowed")->setEnabled(false);
+ getChildView("remove_allowed")->setEnabled(false);
+ getChildView("add_banned")->setEnabled(false);
+ getChildView("remove_banned")->setEnabled(false);
LLParcel *parcel = mParcel->getParcel();
if (parcel && !gDisconnected)
{
- BOOL can_manage_allowed = false;
- BOOL can_manage_banned = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_BANNED);
+ bool can_manage_allowed = false;
+ bool can_manage_banned = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_BANNED);
if (parcel->getRegionAllowAccessOverride())
{ // Estate owner may have disabled allowing the parcel owner from managing access.
@@ -2704,14 +2704,14 @@ void LLPanelLandAccess::refresh_ui()
}
getChildView("public_access")->setEnabled(can_manage_allowed);
- BOOL public_access = getChild<LLUICtrl>("public_access")->getValue().asBoolean();
+ bool public_access = getChild<LLUICtrl>("public_access")->getValue().asBoolean();
if (public_access)
{
bool override = false;
if(parcel->getRegionDenyAnonymousOverride())
{
override = true;
- getChildView("limit_payment")->setEnabled(FALSE);
+ getChildView("limit_payment")->setEnabled(false);
}
else
{
@@ -2720,7 +2720,7 @@ void LLPanelLandAccess::refresh_ui()
if(parcel->getRegionDenyAgeUnverifiedOverride())
{
override = true;
- getChildView("limit_age_verified")->setEnabled(FALSE);
+ getChildView("limit_age_verified")->setEnabled(false);
}
else
{
@@ -2734,17 +2734,17 @@ void LLPanelLandAccess::refresh_ui()
{
getChildView("Only Allow")->setToolTip(std::string());
}
- getChildView("PassCheck")->setEnabled(FALSE);
- getChildView("pass_combo")->setEnabled(FALSE);
- getChildView("AccessList")->setEnabled(FALSE);
+ getChildView("PassCheck")->setEnabled(false);
+ getChildView("pass_combo")->setEnabled(false);
+ getChildView("AccessList")->setEnabled(false);
}
else
{
- getChildView("limit_payment")->setEnabled(FALSE);
- getChildView("limit_age_verified")->setEnabled(FALSE);
+ getChildView("limit_payment")->setEnabled(false);
+ getChildView("limit_age_verified")->setEnabled(false);
- BOOL sell_passes = getChild<LLUICtrl>("PassCheck")->getValue().asBoolean();
+ bool sell_passes = getChild<LLUICtrl>("PassCheck")->getValue().asBoolean();
getChildView("PassCheck")->setEnabled(can_manage_allowed);
if (sell_passes)
{
@@ -2762,7 +2762,7 @@ void LLPanelLandAccess::refresh_ui()
getChildView("AccessList")->setEnabled(can_manage_allowed);
S32 allowed_list_count = parcel->mAccessList.size();
getChildView("add_allowed")->setEnabled(can_manage_allowed && allowed_list_count < PARCEL_MAX_ACCESS_LIST);
- BOOL has_selected = (mListAccess && mListAccess->getSelectionInterface()->getFirstSelectedIndex() >= 0);
+ bool has_selected = (mListAccess && mListAccess->getSelectionInterface()->getFirstSelectedIndex() >= 0);
getChildView("remove_allowed")->setEnabled(can_manage_allowed && has_selected);
getChildView("BannedList")->setEnabled(can_manage_banned);
@@ -2817,8 +2817,8 @@ void LLPanelLandAccess::onCommitGroupCheck(LLUICtrl *ctrl, void *userdata)
return;
}
- BOOL use_pass_list = !self->getChild<LLUICtrl>("public_access")->getValue().asBoolean();
- BOOL use_access_group = self->getChild<LLUICtrl>("GroupCheck")->getValue().asBoolean();
+ bool use_pass_list = !self->getChild<LLUICtrl>("public_access")->getValue().asBoolean();
+ bool use_access_group = self->getChild<LLUICtrl>("GroupCheck")->getValue().asBoolean();
LLCtrlSelectionInterface* passcombo = self->childGetSelectionInterface("pass_combo");
if (passcombo)
{
@@ -2846,30 +2846,30 @@ void LLPanelLandAccess::onCommitAny(LLUICtrl *ctrl, void *userdata)
}
// Extract data from UI
- BOOL public_access = self->getChild<LLUICtrl>("public_access")->getValue().asBoolean();
- BOOL use_access_group = self->getChild<LLUICtrl>("GroupCheck")->getValue().asBoolean();
+ bool public_access = self->getChild<LLUICtrl>("public_access")->getValue().asBoolean();
+ bool use_access_group = self->getChild<LLUICtrl>("GroupCheck")->getValue().asBoolean();
if (use_access_group)
{
std::string group_name;
if (!gCacheName->getGroupName(parcel->getGroupID(), group_name))
{
- use_access_group = FALSE;
+ use_access_group = false;
}
}
- BOOL limit_payment = FALSE, limit_age_verified = FALSE;
- BOOL use_access_list = FALSE;
- BOOL use_pass_list = FALSE;
+ bool limit_payment = false, limit_age_verified = false;
+ bool use_access_list = false;
+ bool use_pass_list = false;
if (public_access)
{
- use_access_list = FALSE;
+ use_access_list = false;
limit_payment = self->getChild<LLUICtrl>("limit_payment")->getValue().asBoolean();
limit_age_verified = self->getChild<LLUICtrl>("limit_age_verified")->getValue().asBoolean();
}
else
{
- use_access_list = TRUE;
+ use_access_list = true;
use_pass_list = self->getChild<LLUICtrl>("PassCheck")->getValue().asBoolean();
LLCtrlSelectionInterface* passcombo = self->childGetSelectionInterface("pass_combo");
if (passcombo)
@@ -2878,7 +2878,7 @@ void LLPanelLandAccess::onCommitAny(LLUICtrl *ctrl, void *userdata)
{
if (passcombo->getSelectedValue().asString() == "group")
{
- use_access_group = FALSE;
+ use_access_group = false;
}
}
}
@@ -2891,7 +2891,7 @@ void LLPanelLandAccess::onCommitAny(LLUICtrl *ctrl, void *userdata)
parcel->setParcelFlag(PF_USE_ACCESS_GROUP, use_access_group);
parcel->setParcelFlag(PF_USE_ACCESS_LIST, use_access_list);
parcel->setParcelFlag(PF_USE_PASS_LIST, use_pass_list);
- parcel->setParcelFlag(PF_USE_BAN_LIST, TRUE);
+ parcel->setParcelFlag(PF_USE_BAN_LIST, true);
parcel->setParcelFlag(PF_DENY_ANONYMOUS, limit_payment);
parcel->setParcelFlag(PF_DENY_AGEUNVERIFIED, limit_age_verified);
@@ -2910,7 +2910,7 @@ void LLPanelLandAccess::onClickAddAccess()
LLView * button = findChild<LLButton>("add_allowed");
LLFloater * root_floater = gFloaterView->getParentFloater(this);
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(
- boost::bind(&LLPanelLandAccess::callbackAvatarCBAccess, this, _1), FALSE, FALSE, FALSE, root_floater->getName(), button);
+ boost::bind(&LLPanelLandAccess::callbackAvatarCBAccess, this, _1), false, false, false, root_floater->getName(), button);
if (picker)
{
root_floater->addDependentFloater(picker);
@@ -2967,7 +2967,7 @@ void LLPanelLandAccess::onClickAddBanned()
LLView * button = findChild<LLButton>("add_banned");
LLFloater * root_floater = gFloaterView->getParentFloater(this);
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(
- boost::bind(&LLPanelLandAccess::callbackAvatarCBBanned, this, _1), TRUE, FALSE, FALSE, root_floater->getName(), button);
+ boost::bind(&LLPanelLandAccess::callbackAvatarCBBanned, this, _1), true, false, false, root_floater->getName(), button);
if (picker)
{
root_floater->addDependentFloater(picker);
@@ -3051,13 +3051,13 @@ LLPanelLandCovenant::~LLPanelLandCovenant()
{
}
-BOOL LLPanelLandCovenant::postBuild()
+bool LLPanelLandCovenant::postBuild()
{
mLastRegionID = LLUUID::null;
mNextUpdateTime = 0;
mTextEstateOwner = getChild<LLTextBox>("estate_owner_text");
mTextEstateOwner->setIsFriendCallback(LLAvatarActions::isFriend);
- return TRUE;
+ return true;
}
// virtual
@@ -3224,7 +3224,7 @@ LLPanelLandExperiences::LLPanelLandExperiences( LLSafeHandle<LLParcelSelection>&
}
-BOOL LLPanelLandExperiences::postBuild()
+bool LLPanelLandExperiences::postBuild()
{
mAllowed = setupList("panel_allowed", EXPERIENCE_KEY_TYPE_ALLOWED, AL_ALLOW_EXPERIENCE);
mBlocked = setupList("panel_blocked", EXPERIENCE_KEY_TYPE_BLOCKED, AL_BLOCK_EXPERIENCE);
@@ -3235,8 +3235,8 @@ BOOL LLPanelLandExperiences::postBuild()
// no privileged ones
mBlocked->addFilter(boost::bind(LLPanelExperiencePicker::FilterWithoutProperties, _1, LLExperienceCache::PROPERTY_PRIVILEGED|LLExperienceCache::PROPERTY_GRID));
- getChild<LLLayoutPanel>("trusted_layout_panel")->setVisible(FALSE);
- getChild<LLTextBox>("experiences_help_text")->setVisible(FALSE);
+ getChild<LLLayoutPanel>("trusted_layout_panel")->setVisible(false);
+ getChild<LLTextBox>("experiences_help_text")->setVisible(false);
getChild<LLTextBox>("allowed_text_help")->setText(getString("allowed_parcel_text"));
getChild<LLTextBox>("blocked_text_help")->setText(getString("blocked_parcel_text"));
@@ -3291,13 +3291,13 @@ void LLPanelLandExperiences::refreshPanel(LLPanelExperienceListEditor* panel, U3
if (!parcel || gDisconnected)
{
// disable the panel
- panel->setEnabled(FALSE);
+ panel->setEnabled(false);
panel->setExperienceIds(LLSD::emptyArray());
}
else
{
// enable the panel
- panel->setEnabled(TRUE);
+ panel->setEnabled(true);
LLAccessEntry::map entries = parcel->getExperienceKeysByType(xp_type);
LLAccessEntry::map::iterator it = entries.begin();
LLSD ids = LLSD::emptyArray();
@@ -3326,17 +3326,17 @@ LLPanelLandEnvironment::LLPanelLandEnvironment(LLParcelSelectionHandle& parcel)
{
}
-BOOL LLPanelLandEnvironment::postBuild()
+bool LLPanelLandEnvironment::postBuild()
{
if (!LLPanelEnvironmentInfo::postBuild())
- return FALSE;
+ return false;
getChild<LLUICtrl>(BTN_USEDEFAULT)->setLabelArg("[USEDEFAULT]", getString(STR_LABEL_USEREGION));
- getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setVisible(FALSE);
- getChild<LLUICtrl>(PNL_REGION_MSG)->setVisible(FALSE);
- getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(TRUE);
+ getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setVisible(false);
+ getChild<LLUICtrl>(PNL_REGION_MSG)->setVisible(false);
+ getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(true);
- return TRUE;
+ return true;
}
void LLPanelLandEnvironment::refresh()
diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h
index 684950d88b..0e69581617 100644
--- a/indra/newview/llfloaterland.h
+++ b/indra/newview/llfloaterland.h
@@ -82,7 +82,7 @@ public:
LLParcel* getCurrentSelectedParcel();
virtual void onOpen(const LLSD& key);
- virtual BOOL postBuild();
+ virtual bool postBuild();
private:
// Does its own instance management, so clients not allowed
@@ -130,7 +130,7 @@ public:
// we send an update to the simulator, it usually replies with the
// parcel information, causing the land to be reselected. This allows
// us to suppress that behavior.
- static BOOL sRequestReplyOnUpdate;
+ static bool sRequestReplyOnUpdate;
};
@@ -153,7 +153,7 @@ public:
static void onClickRelease(void*);
static void onClickReclaim(void*);
static void onClickBuyPass(void* deselect_when_done);
- static BOOL enableBuyPass(void*);
+ static bool enableBuyPass(void*);
static void onCommitAny(LLUICtrl* ctrl, void *userdata);
static void finalizeCommit(void * userdata);
static void onForSaleChange(LLUICtrl *ctrl, void * userdata);
@@ -175,10 +175,10 @@ public:
static void confirmSaleChange(S32 landSize, S32 salePrice, std::string authorizedName, void(*callback)(void*), void* userdata);
static void callbackConfirmSaleChange(S32 option, void* userdata);
- virtual BOOL postBuild();
+ virtual bool postBuild();
protected:
- BOOL mUncheckedSell; // True only when verifying land information when land is for sale on sale info change
+ bool mUncheckedSell; // True only when verifying land information when land is for sale on sale info change
LLTextBox* mLabelName;
LLLineEditor* mEditName;
@@ -274,7 +274,7 @@ public:
static void onCommitClean(LLUICtrl* caller, void* user_data);
static void processParcelObjectOwnersReply(LLMessageSystem *msg, void **);
- virtual BOOL postBuild();
+ virtual bool postBuild();
protected:
@@ -302,12 +302,12 @@ protected:
LLPointer<LLUIImage> mIconAvatarOffline;
LLPointer<LLUIImage> mIconGroup;
- BOOL mFirstReply;
+ bool mFirstReply;
uuid_list_t mSelectedOwners;
std::string mSelectedName;
S32 mSelectedCount;
- BOOL mSelectedIsGroup;
+ bool mSelectedIsGroup;
LLSafeHandle<LLParcelSelection>& mParcel;
};
@@ -319,7 +319,7 @@ class LLPanelLandOptions
public:
LLPanelLandOptions(LLSafeHandle<LLParcelSelection>& parcelp);
virtual ~LLPanelLandOptions();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void draw();
/*virtual*/ void refresh();
@@ -378,7 +378,7 @@ public:
static void onClickRemoveAccess(void*);
static void onClickRemoveBanned(void*);
- virtual BOOL postBuild();
+ virtual bool postBuild();
void onClickAddAccess();
void onClickAddBanned();
@@ -400,7 +400,7 @@ class LLPanelLandCovenant
public:
LLPanelLandCovenant(LLSafeHandle<LLParcelSelection>& parcelp);
virtual ~LLPanelLandCovenant();
- virtual BOOL postBuild();
+ virtual bool postBuild();
void refresh();
static void updateCovenantText(const std::string& string);
static void updateEstateName(const std::string& name);
diff --git a/indra/newview/llfloaterlandholdings.cpp b/indra/newview/llfloaterlandholdings.cpp
index a3222d622f..901841c541 100644
--- a/indra/newview/llfloaterlandholdings.cpp
+++ b/indra/newview/llfloaterlandholdings.cpp
@@ -60,20 +60,20 @@ LLFloaterLandHoldings::LLFloaterLandHoldings(const LLSD& key)
: LLFloater(key),
mActualArea(0),
mBillableArea(0),
- mFirstPacketReceived(FALSE),
+ mFirstPacketReceived(false),
mSortColumn(""),
- mSortAscending(TRUE)
+ mSortAscending(true)
{
}
-BOOL LLFloaterLandHoldings::postBuild()
+bool LLFloaterLandHoldings::postBuild()
{
childSetAction("Teleport", onClickTeleport, this);
childSetAction("Show on Map", onClickMap, this);
// Grant list
LLScrollListCtrl* grant_list = getChild<LLScrollListCtrl>("grant list");
- grant_list->sortByColumnIndex(0, TRUE);
+ grant_list->sortByColumnIndex(0, true);
grant_list->setDoubleClickCallback(onGrantList, this);
S32 count = gAgent.mGroups.size();
@@ -99,7 +99,7 @@ BOOL LLFloaterLandHoldings::postBuild()
center();
- return TRUE;
+ return true;
}
@@ -139,10 +139,10 @@ void LLFloaterLandHoldings::draw()
void LLFloaterLandHoldings::refresh()
{
LLCtrlSelectionInterface *list = childGetSelectionInterface("parcel list");
- BOOL enable_btns = FALSE;
+ bool enable_btns = false;
if (list && list->getFirstSelectedIndex()> -1)
{
- enable_btns = TRUE;
+ enable_btns = true;
}
getChildView("Teleport")->setEnabled(enable_btns);
@@ -183,7 +183,7 @@ void LLFloaterLandHoldings::processPlacesReply(LLMessageSystem* msg, void**)
// If this is the first packet, clear out the "loading..." indicator
if (!self->mFirstPacketReceived)
{
- self->mFirstPacketReceived = TRUE;
+ self->mFirstPacketReceived = true;
list->operateOnAll(LLCtrlSelectionInterface::OP_DELETE);
}
diff --git a/indra/newview/llfloaterlandholdings.h b/indra/newview/llfloaterlandholdings.h
index 90e75b1062..21bff27c02 100644
--- a/indra/newview/llfloaterlandholdings.h
+++ b/indra/newview/llfloaterlandholdings.h
@@ -41,7 +41,7 @@ public:
LLFloaterLandHoldings(const LLSD& key);
virtual ~LLFloaterLandHoldings();
- virtual BOOL postBuild();
+ virtual bool postBuild();
virtual void onOpen(const LLSD& key);
virtual void draw();
@@ -69,10 +69,10 @@ protected:
// Has a packet of data been received?
// Used to clear out the mParcelList's "Loading..." indicator
- BOOL mFirstPacketReceived;
+ bool mFirstPacketReceived;
std::string mSortColumn;
- BOOL mSortAscending;
+ bool mSortAscending;
};
#endif
diff --git a/indra/newview/llfloaterlinkreplace.cpp b/indra/newview/llfloaterlinkreplace.cpp
index b42c49c607..98dc6f365e 100644
--- a/indra/newview/llfloaterlinkreplace.cpp
+++ b/indra/newview/llfloaterlinkreplace.cpp
@@ -52,7 +52,7 @@ LLFloaterLinkReplace::~LLFloaterLinkReplace()
{
}
-BOOL LLFloaterLinkReplace::postBuild()
+bool LLFloaterLinkReplace::postBuild()
{
mStartBtn = getChild<LLButton>("btn_start");
mStartBtn->setCommitCallback(boost::bind(&LLFloaterLinkReplace::onStartClicked, this));
@@ -68,7 +68,7 @@ BOOL LLFloaterLinkReplace::postBuild()
mStatusText = getChild<LLTextBox>("status_text");
- return TRUE;
+ return true;
}
void LLFloaterLinkReplace::onOpen(const LLSD& key)
@@ -199,8 +199,8 @@ void LLFloaterLinkReplace::onStartClickedResponse(const LLSD& notification, cons
args["NUM"] = llformat("%d", mRemainingItems);
mStatusText->setText(getString("ItemsRemaining", args));
- mStartBtn->setEnabled(FALSE);
- mRefreshBtn->setEnabled(FALSE);
+ mStartBtn->setEnabled(false);
+ mRefreshBtn->setEnabled(false);
mEventTimer.start();
tick();
@@ -296,8 +296,8 @@ void LLFloaterLinkReplace::decreaseOpenItemCount()
if (mRemainingItems == 0)
{
mStatusText->setText(getString("ReplaceFinished"));
- mStartBtn->setEnabled(TRUE);
- mRefreshBtn->setEnabled(TRUE);
+ mStartBtn->setEnabled(true);
+ mRefreshBtn->setEnabled(true);
mEventTimer.stop();
LL_INFOS() << "Inventory link replace finished." << LL_ENDL;
}
@@ -310,7 +310,7 @@ void LLFloaterLinkReplace::decreaseOpenItemCount()
}
}
-BOOL LLFloaterLinkReplace::tick()
+bool LLFloaterLinkReplace::tick()
{
LL_DEBUGS() << "Calling tick - remaining items = " << mRemainingInventoryItems.size() << LL_ENDL;
@@ -329,7 +329,7 @@ BOOL LLFloaterLinkReplace::tick()
}
processBatch(current_batch);
- return FALSE;
+ return false;
}
void LLFloaterLinkReplace::processBatch(LLInventoryModel::item_array_t items)
@@ -378,7 +378,7 @@ void LLFloaterLinkReplace::processBatch(LLInventoryModel::item_array_t items)
static LLDefaultChildRegistry::Register<LLInventoryLinkReplaceDropTarget> r("inventory_link_replace_drop_target");
-BOOL LLInventoryLinkReplaceDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+bool LLInventoryLinkReplaceDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
@@ -411,7 +411,7 @@ BOOL LLInventoryLinkReplaceDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask
*accept = ACCEPT_NO;
}
- return TRUE;
+ return true;
}
void LLInventoryLinkReplaceDropTarget::setItem(LLInventoryItem* item)
diff --git a/indra/newview/llfloaterlinkreplace.h b/indra/newview/llfloaterlinkreplace.h
index 060773f93e..7096eedd4b 100644
--- a/indra/newview/llfloaterlinkreplace.h
+++ b/indra/newview/llfloaterlinkreplace.h
@@ -56,13 +56,13 @@ public:
return mDADSignal.connect(cb);
}
- virtual BOOL postBuild()
+ virtual bool postBuild()
{
- setEnabled(FALSE);
+ setEnabled(false);
return LLLineEditor::postBuild();
}
- virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
@@ -86,10 +86,10 @@ public:
LLFloaterLinkReplace(const LLSD& key);
virtual ~LLFloaterLinkReplace();
- BOOL postBuild();
+ bool postBuild();
virtual void onOpen(const LLSD& key);
- virtual BOOL tick();
+ virtual bool tick();
private:
void checkEnableStart();
diff --git a/indra/newview/llfloaterloadprefpreset.cpp b/indra/newview/llfloaterloadprefpreset.cpp
index 8ed76b1df4..8281cc3f4b 100644
--- a/indra/newview/llfloaterloadprefpreset.cpp
+++ b/indra/newview/llfloaterloadprefpreset.cpp
@@ -41,7 +41,7 @@ LLFloaterLoadPrefPreset::LLFloaterLoadPrefPreset(const LLSD &key)
}
// virtual
-BOOL LLFloaterLoadPrefPreset::postBuild()
+bool LLFloaterLoadPrefPreset::postBuild()
{
LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences");
if (preferences)
@@ -52,7 +52,7 @@ BOOL LLFloaterLoadPrefPreset::postBuild()
getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterLoadPrefPreset::onBtnCancel, this));
LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterLoadPrefPreset::onPresetsListChange, this));
- return TRUE;
+ return true;
}
void LLFloaterLoadPrefPreset::onOpen(const LLSD& key)
diff --git a/indra/newview/llfloaterloadprefpreset.h b/indra/newview/llfloaterloadprefpreset.h
index 9471f6f1e1..cae05bc062 100644
--- a/indra/newview/llfloaterloadprefpreset.h
+++ b/indra/newview/llfloaterloadprefpreset.h
@@ -38,8 +38,8 @@ class LLFloaterLoadPrefPreset : public LLFloater
public:
LLFloaterLoadPrefPreset(const LLSD &key);
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void onOpen(const LLSD& key);
+ bool postBuild() override;
+ void onOpen(const LLSD& key) override;
void onBtnOk();
void onBtnCancel();
diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp
index fd1af7ccc0..900816675d 100755
--- a/indra/newview/llfloatermap.cpp
+++ b/indra/newview/llfloatermap.cpp
@@ -75,7 +75,7 @@ LLFloaterMap::~LLFloaterMap()
{
}
-BOOL LLFloaterMap::postBuild()
+bool LLFloaterMap::postBuild()
{
mMap = getChild<LLNetMap>("Net Map");
mMap->setToolTipMsg(getString("ToolTipMsg"));
@@ -117,13 +117,13 @@ BOOL LLFloaterMap::postBuild()
return true;
}
-BOOL LLFloaterMap::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLFloaterMap::handleDoubleClick(S32 x, S32 y, MASK mask)
{
// If floater is minimized, minimap should be shown on doubleclick (STORM-299)
if (isMinimized())
{
- setMinimized(FALSE);
- return TRUE;
+ setMinimized(false);
+ return true;
}
LLVector3d pos_global = mMap->viewPosToGlobal(x, y);
@@ -144,7 +144,7 @@ BOOL LLFloaterMap::handleDoubleClick(S32 x, S32 y, MASK mask)
{
LLFloaterReg::showInstance("world_map");
}
- return TRUE;
+ return true;
}
void LLFloaterMap::setDirectionPos(LLTextBox *text_box, F32 rotation)
@@ -229,19 +229,19 @@ void LLFloaterMap::draw()
// Note: we can't just gAgent.check cameraMouselook() because the transition states are wrong.
if(gAgentCamera.cameraMouselook())
{
- setMouseOpaque(FALSE);
- getDragHandle()->setMouseOpaque(FALSE);
+ setMouseOpaque(false);
+ getDragHandle()->setMouseOpaque(false);
}
else
{
- setMouseOpaque(TRUE);
- getDragHandle()->setMouseOpaque(TRUE);
+ setMouseOpaque(true);
+ getDragHandle()->setMouseOpaque(true);
}
LLFloater::draw();
}
-void LLFloaterMap::reshape(S32 width, S32 height, BOOL called_from_parent)
+void LLFloaterMap::reshape(S32 width, S32 height, bool called_from_parent)
{
LLFloater::reshape(width, height, called_from_parent);
diff --git a/indra/newview/llfloatermap.h b/indra/newview/llfloatermap.h
index 929b1795aa..8005e40327 100644
--- a/indra/newview/llfloatermap.h
+++ b/indra/newview/llfloatermap.h
@@ -42,10 +42,10 @@ public:
static LLFloaterMap* getInstance();
virtual ~LLFloaterMap();
- /*virtual*/ BOOL postBuild();
- /*virtual*/ BOOL handleDoubleClick( S32 x, S32 y, MASK mask );
- /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
- /*virtual*/ void draw();
+ bool postBuild() override;
+ bool handleDoubleClick( S32 x, S32 y, MASK mask ) override;
+ void reshape(S32 width, S32 height, bool called_from_parent = true) override;
+ void draw() override;
private:
void setDirectionPos( LLTextBox* text_box, F32 rotation );
diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp
index 6216f4e39a..9e3d8e19f3 100644
--- a/indra/newview/llfloatermarketplacelistings.cpp
+++ b/indra/newview/llfloatermarketplacelistings.cpp
@@ -62,7 +62,7 @@ LLPanelMarketplaceListings::LLPanelMarketplaceListings()
mEnableCallbackRegistrar.add("Marketplace.ViewSort.CheckItem", boost::bind(&LLPanelMarketplaceListings::onViewSortMenuItemCheck, this, _2));
}
-BOOL LLPanelMarketplaceListings::postBuild()
+bool LLPanelMarketplaceListings::postBuild()
{
childSetAction("add_btn", boost::bind(&LLPanelMarketplaceListings::onAddButtonClicked, this));
childSetAction("audit_btn", boost::bind(&LLPanelMarketplaceListings::onAuditButtonClicked, this));
@@ -71,19 +71,19 @@ BOOL LLPanelMarketplaceListings::postBuild()
mFilterEditor->setCommitCallback(boost::bind(&LLPanelMarketplaceListings::onFilterEdit, this, _2));
mAuditBtn = getChild<LLButton>("audit_btn");
- mAuditBtn->setEnabled(FALSE);
+ mAuditBtn->setEnabled(false);
return LLPanel::postBuild();
}
-BOOL LLPanelMarketplaceListings::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+bool LLPanelMarketplaceListings::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
std::string& tooltip_msg)
{
LLView * handled_view = childrenHandleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
- BOOL handled = (handled_view != NULL);
+ bool handled = (handled_view != NULL);
// Special case the drop zone
if (handled && (handled_view->getName() == "marketplace_drop_zone"))
{
@@ -190,7 +190,7 @@ void LLPanelMarketplaceListings::draw()
LLPanel::draw();
}
-void LLPanelMarketplaceListings::onSelectionChange(LLInventoryPanel *panel, const std::deque<LLFolderViewItem*>& items, BOOL user_action)
+void LLPanelMarketplaceListings::onSelectionChange(LLInventoryPanel *panel, const std::deque<LLFolderViewItem*>& items, bool user_action)
{
panel->onSelectionChange(items, user_action);
}
@@ -251,8 +251,8 @@ void LLPanelMarketplaceListings::onAddButtonClicked()
if (panel)
{
gInventory.notifyObservers();
- panel->setSelectionByID(new_cat_id, TRUE);
- panel->getRootFolder()->setNeedsAutoRename(TRUE);
+ panel->setSelectionByID(new_cat_id, true);
+ panel->getRootFolder()->setNeedsAutoRename(true);
}
}
);
@@ -395,7 +395,7 @@ LLFloaterMarketplaceListings::~LLFloaterMarketplaceListings()
delete mCategoryAddedObserver;
}
-BOOL LLFloaterMarketplaceListings::postBuild()
+bool LLFloaterMarketplaceListings::postBuild()
{
mInventoryStatus = getChild<LLTextBox>("marketplace_status");
mInventoryInitializationInProgress = getChild<LLView>("initialization_progress_indicator");
@@ -420,7 +420,7 @@ BOOL LLFloaterMarketplaceListings::postBuild()
}
- return TRUE;
+ return true;
}
void LLFloaterMarketplaceListings::onClose(bool app_quitting)
@@ -612,7 +612,7 @@ void LLFloaterMarketplaceListings::updateView()
{
// Just show the loading indicator in that case and fetch the data (fetch will be skipped if it's already loading)
mInventoryInitializationInProgress->setVisible(true);
- mPanelListings->setVisible(FALSE);
+ mPanelListings->setVisible(false);
fetchContents();
return;
}
@@ -629,13 +629,13 @@ void LLFloaterMarketplaceListings::updateView()
// We need to rebuild the tabs cleanly the first time we make them visible
setPanels();
}
- mPanelListings->setVisible(TRUE);
- mInventoryPlaceholder->setVisible(FALSE);
+ mPanelListings->setVisible(true);
+ mInventoryPlaceholder->setVisible(false);
}
else
{
- mPanelListings->setVisible(FALSE);
- mInventoryPlaceholder->setVisible(TRUE);
+ mPanelListings->setVisible(false);
+ mInventoryPlaceholder->setVisible(true);
std::string text;
std::string title;
@@ -704,7 +704,7 @@ bool LLFloaterMarketplaceListings::isAccepted(EAcceptance accept)
return (accept >= ACCEPT_YES_COPY_SINGLE);
}
-BOOL LLFloaterMarketplaceListings::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+bool LLFloaterMarketplaceListings::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
@@ -713,14 +713,14 @@ BOOL LLFloaterMarketplaceListings::handleDragAndDrop(S32 x, S32 y, MASK mask, BO
// If there's no panel to accept drops or no existing marketplace listings folder, we refuse all drop
if (!mPanelListings || mRootFolderId.isNull())
{
- return FALSE;
+ return false;
}
tooltip_msg = "";
// Pass to the children
LLView * handled_view = childrenHandleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
- BOOL handled = (handled_view != NULL);
+ bool handled = (handled_view != NULL);
// If no one handled it or it was not accepted and we drop on an empty panel, we try to accept it at the floater level
// as if it was dropped on the marketplace listings root folder
@@ -737,7 +737,7 @@ BOOL LLFloaterMarketplaceListings::handleDragAndDrop(S32 x, S32 y, MASK mask, BO
return handled;
}
-BOOL LLFloaterMarketplaceListings::handleHover(S32 x, S32 y, MASK mask)
+bool LLFloaterMarketplaceListings::handleHover(S32 x, S32 y, MASK mask)
{
return LLFloater::handleHover(x, y, mask);
}
@@ -785,9 +785,9 @@ LLFloaterAssociateListing::~LLFloaterAssociateListing()
gFocusMgr.releaseFocusIfNeeded( this );
}
-BOOL LLFloaterAssociateListing::postBuild()
+bool LLFloaterAssociateListing::postBuild()
{
- getChild<LLButton>("OK")->setCommitCallback(boost::bind(&LLFloaterAssociateListing::apply, this, TRUE));
+ getChild<LLButton>("OK")->setCommitCallback(boost::bind(&LLFloaterAssociateListing::apply, this, true));
getChild<LLButton>("Cancel")->setCommitCallback(boost::bind(&LLFloaterAssociateListing::cancel, this));
getChild<LLLineEditor>("listing_id")->setPrevalidate(&LLTextValidate::validateNonNegativeS32);
center();
@@ -795,17 +795,17 @@ BOOL LLFloaterAssociateListing::postBuild()
return LLFloater::postBuild();
}
-BOOL LLFloaterAssociateListing::handleKeyHere(KEY key, MASK mask)
+bool LLFloaterAssociateListing::handleKeyHere(KEY key, MASK mask)
{
if (key == KEY_RETURN && mask == MASK_NONE)
{
apply();
- return TRUE;
+ return true;
}
else if (key == KEY_ESCAPE && mask == MASK_NONE)
{
cancel();
- return TRUE;
+ return true;
}
return LLFloater::handleKeyHere(key, mask);
@@ -827,11 +827,11 @@ void LLFloaterAssociateListing::callback_apply(const LLSD& notification, const L
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0) // YES
{
- apply(FALSE);
+ apply(false);
}
}
-void LLFloaterAssociateListing::apply(BOOL user_confirm)
+void LLFloaterAssociateListing::apply(bool user_confirm)
{
if (mUUID.notNull())
{
@@ -876,17 +876,17 @@ mEditor(NULL)
{
}
-BOOL LLFloaterMarketplaceValidation::postBuild()
+bool LLFloaterMarketplaceValidation::postBuild()
{
childSetAction("OK", onOK, this);
// This widget displays the validation messages
mEditor = getChild<LLTextEditor>("validation_text");
- mEditor->setEnabled(FALSE);
- mEditor->setFocus(TRUE);
+ mEditor->setEnabled(false);
+ mEditor->setFocus(true);
mEditor->setValue(LLSD());
- return TRUE;
+ return true;
}
LLFloaterMarketplaceValidation::~LLFloaterMarketplaceValidation()
@@ -1021,7 +1021,7 @@ LLFloaterItemProperties::~LLFloaterItemProperties()
{
}
-BOOL LLFloaterItemProperties::postBuild()
+bool LLFloaterItemProperties::postBuild()
{
return LLFloater::postBuild();
}
diff --git a/indra/newview/llfloatermarketplacelistings.h b/indra/newview/llfloatermarketplacelistings.h
index 78d43f97a9..5dc0e4479e 100644
--- a/indra/newview/llfloatermarketplacelistings.h
+++ b/indra/newview/llfloatermarketplacelistings.h
@@ -52,8 +52,8 @@ class LLPanelMarketplaceListings : public LLPanel
{
public:
LLPanelMarketplaceListings();
- BOOL postBuild();
- BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ bool postBuild();
+ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
@@ -72,7 +72,7 @@ private:
bool onViewSortMenuItemCheck(const LLSD& userdata);
void onAddButtonClicked();
void onAuditButtonClicked();
- void onSelectionChange(LLInventoryPanel *panel, const std::deque<LLFolderViewItem*>& items, BOOL user_action);
+ void onSelectionChange(LLInventoryPanel *panel, const std::deque<LLFolderViewItem*>& items, bool user_action);
void onTabChange();
void onFilterEdit(const std::string& search_string);
@@ -99,8 +99,8 @@ public:
void initializeMarketPlace();
// virtuals
- BOOL postBuild();
- BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ bool postBuild();
+ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
@@ -108,7 +108,7 @@ public:
void showNotification(const LLNotificationPtr& notification);
- BOOL handleHover(S32 x, S32 y, MASK mask);
+ bool handleHover(S32 x, S32 y, MASK mask);
void onMouseLeave(S32 x, S32 y, MASK mask);
protected:
@@ -152,8 +152,8 @@ class LLFloaterAssociateListing : public LLFloater
{
friend class LLFloaterReg;
public:
- virtual BOOL postBuild();
- virtual BOOL handleKeyHere(KEY key, MASK mask);
+ virtual bool postBuild();
+ virtual bool handleKeyHere(KEY key, MASK mask);
static LLFloaterAssociateListing* show(const LLUUID& folder_id);
@@ -162,7 +162,7 @@ private:
virtual ~LLFloaterAssociateListing();
// UI Callbacks
- void apply(BOOL user_confirm = TRUE);
+ void apply(bool user_confirm = true);
void cancel();
void callback_apply(const LLSD& notification, const LLSD& response);
@@ -184,7 +184,7 @@ public:
LLFloaterMarketplaceValidation(const LLSD& key);
virtual ~LLFloaterMarketplaceValidation();
- virtual BOOL postBuild();
+ virtual bool postBuild();
virtual void draw();
virtual void onOpen(const LLSD& key);
@@ -219,7 +219,7 @@ public:
LLFloaterItemProperties(const LLSD& key);
virtual ~LLFloaterItemProperties();
- BOOL postBuild();
+ bool postBuild();
virtual void onOpen(const LLSD& key);
private:
diff --git a/indra/newview/llfloatermediasettings.cpp b/indra/newview/llfloatermediasettings.cpp
index b34961e8a2..3749ee3aa7 100644
--- a/indra/newview/llfloatermediasettings.cpp
+++ b/indra/newview/llfloatermediasettings.cpp
@@ -80,7 +80,7 @@ LLFloaterMediaSettings::~LLFloaterMediaSettings()
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLFloaterMediaSettings::postBuild()
+bool LLFloaterMediaSettings::postBuild()
{
mApplyBtn = getChild<LLButton>("Apply");
mApplyBtn->setClickedCallback(onBtnApply, this);
@@ -121,7 +121,7 @@ BOOL LLFloaterMediaSettings::postBuild()
sInstance = this;
- return TRUE;
+ return true;
}
//static
diff --git a/indra/newview/llfloatermediasettings.h b/indra/newview/llfloatermediasettings.h
index 151e43e6b9..f3a218b9f5 100644
--- a/indra/newview/llfloatermediasettings.h
+++ b/indra/newview/llfloatermediasettings.h
@@ -41,9 +41,9 @@ public:
LLFloaterMediaSettings(const LLSD& key);
~LLFloaterMediaSettings();
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ void onClose(bool app_quitting);
+ bool postBuild() override;
+ void onOpen(const LLSD& key) override;
+ void onClose(bool app_quitting) override;
static LLFloaterMediaSettings* getInstance();
static bool instanceExists();
@@ -55,7 +55,7 @@ public:
const std::string getHomeUrl();
//bool passesWhiteList( const std::string& test_url );
- virtual void draw();
+ virtual void draw() override;
bool mIdenticalHasMediaInfo;
bool mMultipleMedia;
diff --git a/indra/newview/llfloatermemleak.cpp b/indra/newview/llfloatermemleak.cpp
index c43526acaf..327de5e2c3 100644
--- a/indra/newview/llfloatermemleak.cpp
+++ b/indra/newview/llfloatermemleak.cpp
@@ -40,9 +40,9 @@ U32 LLFloaterMemLeak::sMemLeakingSpeed = 0 ; //bytes leaked per frame
U32 LLFloaterMemLeak::sMaxLeakedMem = 0 ; //maximum allowed leaked memory
U32 LLFloaterMemLeak::sTotalLeaked = 0 ;
S32 LLFloaterMemLeak::sStatus = LLFloaterMemLeak::STOP ;
-BOOL LLFloaterMemLeak::sbAllocationFailed = FALSE ;
+bool LLFloaterMemLeak::sbAllocationFailed = false ;
-extern BOOL gSimulateMemLeak;
+extern bool gSimulateMemLeak;
LLFloaterMemLeak::LLFloaterMemLeak(const LLSD& key)
: LLFloater(key)
@@ -57,7 +57,7 @@ LLFloaterMemLeak::LLFloaterMemLeak(const LLSD& key)
}
//----------------------------------------------
-BOOL LLFloaterMemLeak::postBuild(void)
+bool LLFloaterMemLeak::postBuild(void)
{
F32 a, b ;
a = getChild<LLUICtrl>("leak_speed")->getValue().asReal();
@@ -79,8 +79,8 @@ BOOL LLFloaterMemLeak::postBuild(void)
sMaxLeakedMem = ((U32)b) << 20 ;
}
- sbAllocationFailed = FALSE ;
- return TRUE ;
+ sbAllocationFailed = false ;
+ return true ;
}
LLFloaterMemLeak::~LLFloaterMemLeak()
{
@@ -105,14 +105,14 @@ void LLFloaterMemLeak::release()
sStatus = STOP ;
sTotalLeaked = 0 ;
- sbAllocationFailed = FALSE ;
- gSimulateMemLeak = FALSE;
+ sbAllocationFailed = false ;
+ gSimulateMemLeak = false;
}
void LLFloaterMemLeak::stop()
{
sStatus = STOP ;
- sbAllocationFailed = TRUE ;
+ sbAllocationFailed = true ;
}
void LLFloaterMemLeak::idle()
@@ -122,7 +122,7 @@ void LLFloaterMemLeak::idle()
return ;
}
- sbAllocationFailed = FALSE ;
+ sbAllocationFailed = false ;
if(RELEASE == sStatus)
{
@@ -183,7 +183,7 @@ void LLFloaterMemLeak::onChangeMaxMemLeaking()
void LLFloaterMemLeak::onClickStart()
{
sStatus = START ;
- gSimulateMemLeak = TRUE;
+ gSimulateMemLeak = true;
}
void LLFloaterMemLeak::onClickStop()
@@ -198,7 +198,7 @@ void LLFloaterMemLeak::onClickRelease()
void LLFloaterMemLeak::onClickClose()
{
- setVisible(FALSE);
+ setVisible(false);
}
void LLFloaterMemLeak::draw()
diff --git a/indra/newview/llfloatermemleak.h b/indra/newview/llfloatermemleak.h
index 86416eaa07..122d4016ca 100644
--- a/indra/newview/llfloatermemleak.h
+++ b/indra/newview/llfloatermemleak.h
@@ -35,8 +35,8 @@ class LLFloaterMemLeak : public LLFloater
public:
/// initialize all the callbacks for the menu
- virtual BOOL postBuild() ;
- virtual void draw() ;
+ bool postBuild() override;
+ void draw() override;
void onChangeLeakingSpeed();
void onChangeMaxMemLeaking();
@@ -67,7 +67,7 @@ private:
static U32 sMaxLeakedMem ; //maximum allowed leaked memory
static U32 sTotalLeaked ;
static S32 sStatus ; //0: stop ; >0: start ; <0: release
- static BOOL sbAllocationFailed ;
+ static bool sbAllocationFailed ;
std::vector<char*> mLeakedMem ;
};
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index c37d8fae53..c276a221d6 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -75,15 +75,15 @@ LLFloaterModelPreview* LLFloaterModelPreview::sInstance = NULL;
// should be represented by Retain spinner with values from 1 to 100 by 1.
// To achieve this, RETAIN_COEFFICIENT is used while creating spinner
// and when value is requested from spinner.
-const double RETAIN_COEFFICIENT = 100;
+constexpr double RETAIN_COEFFICIENT = 100;
// "Cosine%" decomp parameter has values from 0.9 to 1 by 0.001
// But according to the UI spec for upload model floater, this parameter
// should be represented by Smooth combobox with only 10 values.
// So this const is used as a size of Smooth combobox list.
-const S32 SMOOTH_VALUES_NUMBER = 10;
-const S32 PREVIEW_RENDER_SIZE = 1024;
-const F32 PREVIEW_CAMERA_DISTANCE = 16.f;
+constexpr S32 SMOOTH_VALUES_NUMBER = 10;
+constexpr S32 PREVIEW_RENDER_SIZE = 1024;
+constexpr F32 PREVIEW_CAMERA_DISTANCE = 16.f;
class LLMeshFilePicker : public LLFilePickerThread
{
@@ -148,11 +148,11 @@ mAvatarTabIndex(0)
//-----------------------------------------------------------------------------
// postBuild()
//-----------------------------------------------------------------------------
-BOOL LLFloaterModelPreview::postBuild()
+bool LLFloaterModelPreview::postBuild()
{
if (!LLFloater::postBuild())
{
- return FALSE;
+ return false;
}
childSetCommitCallback("cancel_btn", onCancel, this);
@@ -283,14 +283,14 @@ BOOL LLFloaterModelPreview::postBuild()
mCalculateBtn->setEnabled(false);
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// reshape()
//-----------------------------------------------------------------------------
-void LLFloaterModelPreview::reshape(S32 width, S32 height, BOOL called_from_parent)
+void LLFloaterModelPreview::reshape(S32 width, S32 height, bool called_from_parent)
{
LLFloaterModelUploadBase::reshape(width, height, called_from_parent);
@@ -849,7 +849,7 @@ void LLFloaterModelPreview::draw()
//-----------------------------------------------------------------------------
// handleMouseDown()
//-----------------------------------------------------------------------------
-BOOL LLFloaterModelPreview::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLFloaterModelPreview::handleMouseDown(S32 x, S32 y, MASK mask)
{
if (mPreviewRect.pointInRect(x, y))
{
@@ -858,7 +858,7 @@ BOOL LLFloaterModelPreview::handleMouseDown(S32 x, S32 y, MASK mask)
gViewerWindow->hideCursor();
mLastMouseX = x;
mLastMouseY = y;
- return TRUE;
+ return true;
}
return LLFloater::handleMouseDown(x, y, mask);
@@ -867,9 +867,9 @@ BOOL LLFloaterModelPreview::handleMouseDown(S32 x, S32 y, MASK mask)
//-----------------------------------------------------------------------------
// handleMouseUp()
//-----------------------------------------------------------------------------
-BOOL LLFloaterModelPreview::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLFloaterModelPreview::handleMouseUp(S32 x, S32 y, MASK mask)
{
- gFocusMgr.setMouseCapture(FALSE);
+ gFocusMgr.setMouseCapture(nullptr);
gViewerWindow->showCursor();
return LLFloater::handleMouseUp(x, y, mask);
}
@@ -877,7 +877,7 @@ BOOL LLFloaterModelPreview::handleMouseUp(S32 x, S32 y, MASK mask)
//-----------------------------------------------------------------------------
// handleHover()
//-----------------------------------------------------------------------------
-BOOL LLFloaterModelPreview::handleHover (S32 x, S32 y, MASK mask)
+bool LLFloaterModelPreview::handleHover (S32 x, S32 y, MASK mask)
{
MASK local_mask = mask & ~MASK_ALT;
@@ -928,13 +928,13 @@ BOOL LLFloaterModelPreview::handleHover (S32 x, S32 y, MASK mask)
gViewerWindow->setCursor(UI_CURSOR_TOOLZOOMIN);
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// handleScrollWheel()
//-----------------------------------------------------------------------------
-BOOL LLFloaterModelPreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
+bool LLFloaterModelPreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
if (mPreviewRect.pointInRect(x, y) && mModelPreview)
{
@@ -945,7 +945,7 @@ BOOL LLFloaterModelPreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
LLFloaterModelUploadBase::handleScrollWheel(x, y, clicks);
}
- return TRUE;
+ return true;
}
/*virtual*/
diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h
index bda042186b..72d191f8ee 100644
--- a/indra/newview/llfloatermodelpreview.h
+++ b/indra/newview/llfloatermodelpreview.h
@@ -69,16 +69,16 @@ public:
LLFloaterModelPreview(const LLSD& key);
virtual ~LLFloaterModelPreview();
- virtual BOOL postBuild();
- /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+ virtual bool postBuild();
+ /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true);
void initModelPreview();
static bool showModelPreview();
- BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- BOOL handleHover(S32 x, S32 y, MASK mask);
- BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
+ bool handleMouseDown(S32 x, S32 y, MASK mask);
+ bool handleMouseUp(S32 x, S32 y, MASK mask);
+ bool handleHover(S32 x, S32 y, MASK mask);
+ bool handleScrollWheel(S32 x, S32 y, S32 clicks);
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ void onClose(bool app_quitting);
diff --git a/indra/newview/llfloatermyenvironment.cpp b/indra/newview/llfloatermyenvironment.cpp
index 21d106c8b1..ea3e76f377 100644
--- a/indra/newview/llfloatermyenvironment.cpp
+++ b/indra/newview/llfloatermyenvironment.cpp
@@ -97,7 +97,7 @@ LLFloaterMyEnvironment::~LLFloaterMyEnvironment()
}
-BOOL LLFloaterMyEnvironment::postBuild()
+bool LLFloaterMyEnvironment::postBuild()
{
mInventoryList = getChild<LLInventoryPanel>(PANEL_SETTINGS);
@@ -108,7 +108,7 @@ BOOL LLFloaterMyEnvironment::postBuild()
mInventoryList->setFilterTypes(filter_types);
- mInventoryList->setSelectCallback([this](const std::deque<LLFolderViewItem*>&, BOOL) { onSelectionChange(); });
+ mInventoryList->setSelectCallback([this](const std::deque<LLFolderViewItem*>&, bool) { onSelectionChange(); });
mInventoryList->setShowFolderState(mShowFolders);
mInventoryList->setFilterSettingsTypes(mTypeFilter);
}
@@ -122,8 +122,8 @@ BOOL LLFloaterMyEnvironment::postBuild()
mFilterEdit->setCommitCallback([this](LLUICtrl*, const LLSD& param){ onFilterEdit(param.asString()); });
childSetCommitCallback(BUTTON_DELETE, [this](LLUICtrl *, void*) { onDeleteSelected(); }, nullptr);
- mSavedFolderState.setApply(FALSE);
- return TRUE;
+ mSavedFolderState.setApply(false);
+ return true;
}
void LLFloaterMyEnvironment::refresh()
@@ -205,7 +205,7 @@ void LLFloaterMyEnvironment::onFilterEdit(const std::string& search_string)
return;
}
- mSavedFolderState.setApply(TRUE);
+ mSavedFolderState.setApply(true);
mInventoryList->getRootFolder()->applyFunctorRecursively(mSavedFolderState);
// add folder with current item to list of previously opened folders
LLOpenFoldersWithSelection opener;
@@ -216,7 +216,7 @@ void LLFloaterMyEnvironment::onFilterEdit(const std::string& search_string)
else if (mInventoryList->getFilterSubString().empty())
{
// first letter in search term, save existing folder open state
- mSavedFolderState.setApply(FALSE);
+ mSavedFolderState.setApply(false);
mInventoryList->getRootFolder()->applyFunctorRecursively(mSavedFolderState);
}
@@ -247,7 +247,7 @@ void LLFloaterMyEnvironment::onDeleteSelected()
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(inv_item);
new_item->setParent(trash_id);
- new_item->updateParentOnServer(FALSE);
+ new_item->updateParentOnServer(false);
gInventory.updateItem(new_item);
}
}
diff --git a/indra/newview/llfloatermyenvironment.h b/indra/newview/llfloatermyenvironment.h
index fea0981590..b98ccc52db 100644
--- a/indra/newview/llfloatermyenvironment.h
+++ b/indra/newview/llfloatermyenvironment.h
@@ -43,7 +43,7 @@ public:
LLFloaterMyEnvironment(const LLSD& key);
virtual ~LLFloaterMyEnvironment();
- virtual BOOL postBuild() override;
+ virtual bool postBuild() override;
virtual void refresh() override;
virtual void onOpen(const LLSD& key) override;
diff --git a/indra/newview/llfloatermyscripts.cpp b/indra/newview/llfloatermyscripts.cpp
index 6f9a6c9066..e3c0523b74 100644
--- a/indra/newview/llfloatermyscripts.cpp
+++ b/indra/newview/llfloatermyscripts.cpp
@@ -36,7 +36,7 @@
#include "lltrans.h"
#include "llviewerregion.h"
-const S32 SIZE_OF_ONE_KB = 1024;
+constexpr S32 SIZE_OF_ONE_KB = 1024;
LLFloaterMyScripts::LLFloaterMyScripts(const LLSD& seed)
: LLFloater(seed),
@@ -50,14 +50,14 @@ LLFloaterMyScripts::LLFloaterMyScripts(const LLSD& seed)
{
}
-BOOL LLFloaterMyScripts::postBuild()
+bool LLFloaterMyScripts::postBuild()
{
childSetAction("refresh_list_btn", onClickRefresh, this);
std::string msg_waiting = LLTrans::getString("ScriptLimitsRequestWaiting");
getChild<LLUICtrl>("loading_text")->setValue(LLSD(msg_waiting));
mAttachmentDetailsRequested = requestAttachmentDetails();
- return TRUE;
+ return true;
}
// virtual
diff --git a/indra/newview/llfloatermyscripts.h b/indra/newview/llfloatermyscripts.h
index 3c053a0223..d22286814a 100644
--- a/indra/newview/llfloatermyscripts.h
+++ b/indra/newview/llfloatermyscripts.h
@@ -35,8 +35,8 @@ class LLFloaterMyScripts : public LLFloater
public:
LLFloaterMyScripts(const LLSD& seed);
- BOOL postBuild();
- /*virtual*/ void onOpen(const LLSD& key);
+ bool postBuild() override;
+ void onOpen(const LLSD& key) override;
void setAttachmentDetails(LLSD content);
void setAttachmentSummary(LLSD content);
bool requestAttachmentDetails();
diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp
index 1e9549a04e..bbe125659f 100644
--- a/indra/newview/llfloaternamedesc.cpp
+++ b/indra/newview/llfloaternamedesc.cpp
@@ -64,7 +64,7 @@ const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE;
//-----------------------------------------------------------------------------
LLFloaterNameDesc::LLFloaterNameDesc(const LLSD& filename )
: LLFloater(filename),
- mIsAudio(FALSE)
+ mIsAudio(false)
{
mFilenameAndPath = filename.asString();
mFilename = gDirUtilp->getBaseFileName(mFilenameAndPath, false);
@@ -73,7 +73,7 @@ LLFloaterNameDesc::LLFloaterNameDesc(const LLSD& filename )
//-----------------------------------------------------------------------------
// postBuild()
//-----------------------------------------------------------------------------
-BOOL LLFloaterNameDesc::postBuild()
+bool LLFloaterNameDesc::postBuild()
{
LLRect r;
@@ -135,7 +135,7 @@ BOOL LLFloaterNameDesc::postBuild()
setDefaultBtn("ok_btn");
- return TRUE;
+ return true;
}
S32 LLFloaterNameDesc::getExpectedUploadCost() const
@@ -186,7 +186,7 @@ void LLFloaterNameDesc::doCommit()
//-----------------------------------------------------------------------------
void LLFloaterNameDesc::onBtnOK( )
{
- getChildView("ok_btn")->setEnabled(FALSE); // don't allow inadvertent extra uploads
+ getChildView("ok_btn")->setEnabled(false); // don't allow inadvertent extra uploads
LLAssetStorage::LLStoreAssetCallback callback;
S32 expected_upload_cost = getExpectedUploadCost();
@@ -233,17 +233,17 @@ void LLFloaterNameDesc::onBtnCancel()
LLFloaterSoundPreview::LLFloaterSoundPreview(const LLSD& filename )
: LLFloaterNameDesc(filename)
{
- mIsAudio = TRUE;
+ mIsAudio = true;
}
-BOOL LLFloaterSoundPreview::postBuild()
+bool LLFloaterSoundPreview::postBuild()
{
if (!LLFloaterNameDesc::postBuild())
{
- return FALSE;
+ return false;
}
getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnOK, this));
- return TRUE;
+ return true;
}
@@ -256,14 +256,14 @@ LLFloaterAnimPreview::LLFloaterAnimPreview(const LLSD& filename )
{
}
-BOOL LLFloaterAnimPreview::postBuild()
+bool LLFloaterAnimPreview::postBuild()
{
if (!LLFloaterNameDesc::postBuild())
{
- return FALSE;
+ return false;
}
getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnOK, this));
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
@@ -273,15 +273,15 @@ BOOL LLFloaterAnimPreview::postBuild()
LLFloaterScriptPreview::LLFloaterScriptPreview(const LLSD& filename )
: LLFloaterNameDesc(filename)
{
- mIsText = TRUE;
+ mIsText = true;
}
-BOOL LLFloaterScriptPreview::postBuild()
+bool LLFloaterScriptPreview::postBuild()
{
if (!LLFloaterNameDesc::postBuild())
{
- return FALSE;
+ return false;
}
getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnOK, this));
- return TRUE;
+ return true;
}
diff --git a/indra/newview/llfloaternamedesc.h b/indra/newview/llfloaternamedesc.h
index 589f470e82..d81cd97641 100644
--- a/indra/newview/llfloaternamedesc.h
+++ b/indra/newview/llfloaternamedesc.h
@@ -41,19 +41,19 @@ class LLFloaterNameDesc : public LLFloater
public:
LLFloaterNameDesc(const LLSD& filename);
virtual ~LLFloaterNameDesc();
- virtual BOOL postBuild();
+ bool postBuild() override;
void onBtnOK();
void onBtnCancel();
void doCommit();
- S32 getExpectedUploadCost() const;
+ virtual S32 getExpectedUploadCost() const;
protected:
- virtual void onCommit();
+ virtual void onCommit() override;
protected:
- BOOL mIsAudio;
+ bool mIsAudio;
bool mIsText;
std::string mFilenameAndPath;
@@ -64,21 +64,21 @@ class LLFloaterSoundPreview : public LLFloaterNameDesc
{
public:
LLFloaterSoundPreview(const LLSD& filename );
- virtual BOOL postBuild();
+ bool postBuild() override;
};
class LLFloaterAnimPreview : public LLFloaterNameDesc
{
public:
LLFloaterAnimPreview(const LLSD& filename );
- virtual BOOL postBuild();
+ bool postBuild() override;
};
class LLFloaterScriptPreview : public LLFloaterNameDesc
{
public:
LLFloaterScriptPreview(const LLSD& filename );
- virtual BOOL postBuild();
+ bool postBuild() override;
};
#endif // LL_LLFLOATERNAMEDESC_H
diff --git a/indra/newview/llfloaternewfeaturenotification.cpp b/indra/newview/llfloaternewfeaturenotification.cpp
index 1e50024967..be347c46b0 100644
--- a/indra/newview/llfloaternewfeaturenotification.cpp
+++ b/indra/newview/llfloaternewfeaturenotification.cpp
@@ -38,9 +38,9 @@ LLFloaterNewFeatureNotification::~LLFloaterNewFeatureNotification()
{
}
-BOOL LLFloaterNewFeatureNotification::postBuild()
+bool LLFloaterNewFeatureNotification::postBuild()
{
- setCanDrag(FALSE);
+ setCanDrag(false);
getChild<LLButton>("close_btn")->setCommitCallback(boost::bind(&LLFloaterNewFeatureNotification::onCloseBtn, this));
const std::string title_txt = "title_txt";
@@ -57,7 +57,7 @@ BOOL LLFloaterNewFeatureNotification::postBuild()
reshape(rect.getWidth() + 90, rect.getHeight() + 45);
}
- return TRUE;
+ return true;
}
void LLFloaterNewFeatureNotification::onOpen(const LLSD& key)
diff --git a/indra/newview/llfloaternewfeaturenotification.h b/indra/newview/llfloaternewfeaturenotification.h
index 95501451dc..c007e01d9f 100644
--- a/indra/newview/llfloaternewfeaturenotification.h
+++ b/indra/newview/llfloaternewfeaturenotification.h
@@ -34,7 +34,7 @@ class LLFloaterNewFeatureNotification:
{
friend class LLFloaterReg;
public:
- BOOL postBuild() override;
+ bool postBuild() override;
void onOpen(const LLSD& key) override;
private:
diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp
index fd03efa061..9b205b79bd 100644
--- a/indra/newview/llfloaternotificationsconsole.cpp
+++ b/indra/newview/llfloaternotificationsconsole.cpp
@@ -42,7 +42,7 @@ class LLNotificationChannelPanel : public LLLayoutPanel
public:
LLNotificationChannelPanel(const Params& p);
~LLNotificationChannelPanel();
- BOOL postBuild();
+ bool postBuild();
private:
bool update(const LLSD& payload);
@@ -72,7 +72,7 @@ LLNotificationChannelPanel::~LLNotificationChannelPanel()
}
}
-BOOL LLNotificationChannelPanel::postBuild()
+bool LLNotificationChannelPanel::postBuild()
{
LLButton* header_button = getChild<LLButton>("header");
header_button->setLabel(mChannelPtr->getName());
@@ -83,7 +83,7 @@ BOOL LLNotificationChannelPanel::postBuild()
LLScrollListCtrl* scroll = getChild<LLScrollListCtrl>("notifications_list");
scroll->setDoubleClickCallback(onClickNotification, this);
scroll->setRect(LLRect( getRect().mLeft, getRect().mTop, getRect().mRight, 0));
- return TRUE;
+ return true;
}
//static
@@ -117,7 +117,7 @@ void LLNotificationChannelPanel::onClickNotification(void* user_data)
void* data = firstselected->getUserdata();
if (data)
{
- gFloaterView->getParentFloater(self)->addDependentFloater(new LLFloaterNotification((LLNotification*)data), TRUE);
+ gFloaterView->getParentFloater(self)->addDependentFloater(new LLFloaterNotification((LLNotification*)data), true);
}
}
}
@@ -154,7 +154,7 @@ LLFloaterNotificationConsole::LLFloaterNotificationConsole(const LLSD& key)
mCommitCallbackRegistrar.add("ClickAdd", boost::bind(&LLFloaterNotificationConsole::onClickAdd, this));
}
-BOOL LLFloaterNotificationConsole::postBuild()
+bool LLFloaterNotificationConsole::postBuild()
{
// these are in the order of processing
addChannel("Unexpired");
@@ -181,7 +181,7 @@ BOOL LLFloaterNotificationConsole::postBuild()
}
notifications->sortByName();
- return TRUE;
+ return true;
}
void LLFloaterNotificationConsole::addChannel(const std::string& name, bool open)
@@ -240,7 +240,7 @@ LLFloaterNotification::LLFloaterNotification(LLNotification* note)
buildFromFile("floater_notification.xml");
}
-BOOL LLFloaterNotification::postBuild()
+bool LLFloaterNotification::postBuild()
{
setTitle(mNote->getName());
getChild<LLUICtrl>("payload")->setValue(mNote->getMessage());
@@ -250,7 +250,7 @@ BOOL LLFloaterNotification::postBuild()
LLNotificationFormPtr form(mNote->getForm());
if(!form)
{
- return TRUE;
+ return true;
}
responses_combo->setCommitCallback(onCommitResponse, this);
@@ -264,7 +264,7 @@ BOOL LLFloaterNotification::postBuild()
response_list->addSimpleElement(text);
}
- return TRUE;
+ return true;
}
void LLFloaterNotification::respond()
diff --git a/indra/newview/llfloaternotificationsconsole.h b/indra/newview/llfloaternotificationsconsole.h
index 4e92b7d857..c3bc2d39be 100644
--- a/indra/newview/llfloaternotificationsconsole.h
+++ b/indra/newview/llfloaternotificationsconsole.h
@@ -41,7 +41,7 @@ class LLFloaterNotificationConsole :
public:
// LLPanel
- BOOL postBuild();
+ bool postBuild();
void addChannel(const std::string& type, bool open = false);
void updateResizeLimits(LLLayoutStack &stack);
@@ -64,7 +64,7 @@ public:
LLFloaterNotification(LLNotification* note);
// LLPanel
- BOOL postBuild();
+ bool postBuild();
void respond();
private:
diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp
index d1679fd936..81505582d1 100644
--- a/indra/newview/llfloaternotificationstabbed.cpp
+++ b/indra/newview/llfloaternotificationstabbed.cpp
@@ -58,7 +58,7 @@ LLFloaterNotificationsTabbed::LLFloaterNotificationsTabbed(const LLSD& key) : LL
}
//---------------------------------------------------------------------------------
-BOOL LLFloaterNotificationsTabbed::postBuild()
+bool LLFloaterNotificationsTabbed::postBuild()
{
mGroupInviteMessageList = getChild<LLNotificationListView>("group_invite_notification_list");
mGroupNoticeMessageList = getChild<LLNotificationListView>("group_notice_notification_list");
@@ -78,14 +78,14 @@ BOOL LLFloaterNotificationsTabbed::postBuild()
// get a corresponding channel
initChannel();
- BOOL rv = LLTransientDockableFloater::postBuild();
+ bool rv = LLTransientDockableFloater::postBuild();
setTitle(getString("title_notification_tabbed_window"));
return rv;
}
//---------------------------------------------------------------------------------
-void LLFloaterNotificationsTabbed::setMinimized(BOOL minimize)
+void LLFloaterNotificationsTabbed::setMinimized(bool minimize)
{
LLTransientDockableFloater::setMinimized(minimize);
}
@@ -101,7 +101,7 @@ void LLFloaterNotificationsTabbed::handleReshape(const LLRect& rect, bool by_use
void LLFloaterNotificationsTabbed::onStartUpToastClick(S32 x, S32 y, MASK mask)
{
// just set floater visible. Screen channels will be cleared.
- setVisible(TRUE);
+ setVisible(true);
}
//---------------------------------------------------------------------------------
@@ -140,7 +140,7 @@ void LLFloaterNotificationsTabbed::removeItemByID(const LLUUID& id, std::string
// hide chiclet window if there are no items left
if(isWindowEmpty())
{
- setVisible(FALSE);
+ setVisible(false);
}
}
@@ -168,7 +168,7 @@ void LLFloaterNotificationsTabbed::initChannel()
}
//---------------------------------------------------------------------------------
-void LLFloaterNotificationsTabbed::setVisible(BOOL visible)
+void LLFloaterNotificationsTabbed::setVisible(bool visible)
{
if (visible)
{
@@ -186,7 +186,7 @@ void LLFloaterNotificationsTabbed::setVisible(BOOL visible)
}
// do not show empty window
- if (NULL == mNotificationsSeparator || isWindowEmpty()) visible = FALSE;
+ if (NULL == mNotificationsSeparator || isWindowEmpty()) visible = false;
LLTransientDockableFloater::setVisible(visible);
@@ -356,7 +356,7 @@ void LLFloaterNotificationsTabbed::collapseAllOnCurrentTab()
{
LLNotificationListItem* notify_item = dynamic_cast<LLNotificationListItem*>(*iter);
if (notify_item)
- notify_item->setExpanded(FALSE);
+ notify_item->setExpanded(false);
}
}
@@ -411,7 +411,7 @@ void LLFloaterNotificationsTabbed::onItemClick(LLNotificationListItem* item)
}
else
{
- item->setExpanded(TRUE);
+ item->setExpanded(true);
}
}
diff --git a/indra/newview/llfloaternotificationstabbed.h b/indra/newview/llfloaternotificationstabbed.h
index 8dd20b18c4..a8ff3d8002 100644
--- a/indra/newview/llfloaternotificationstabbed.h
+++ b/indra/newview/llfloaternotificationstabbed.h
@@ -72,7 +72,7 @@ public:
LLFloaterNotificationsTabbed(const LLSD& key);
virtual ~LLFloaterNotificationsTabbed();
- BOOL postBuild();
+ bool postBuild();
// other interface functions
// check is window empty
@@ -85,11 +85,11 @@ public:
void updateNotificationCounter(S32 panelIndex, S32 counterValue, std::string stringName);
// Operating with outfit
- virtual void setVisible(BOOL visible);
+ virtual void setVisible(bool visible);
/*virtual*/ void setDocked(bool docked, bool pop_on_undock = true);
// override LLFloater's minimization according to EXT-1216
- /*virtual*/ void setMinimized(BOOL minimize);
+ /*virtual*/ void setMinimized(bool minimize);
/*virtual*/ void handleReshape(const LLRect& rect, bool by_user);
void onStartUpToastClick(S32 x, S32 y, MASK mask);
@@ -101,8 +101,8 @@ public:
static LLFloaterNotificationsTabbed* getInstance(const LLSD& key = LLSD());
// size constants for the window and for its elements
- static const S32 MAX_WINDOW_HEIGHT = 200;
- static const S32 MIN_WINDOW_WIDTH = 318;
+ static constexpr S32 MAX_WINDOW_HEIGHT = 200;
+ static constexpr S32 MIN_WINDOW_WIDTH = 318;
private:
// init Window's channel
diff --git a/indra/newview/llfloaterobjectweights.cpp b/indra/newview/llfloaterobjectweights.cpp
index ed1ad4426f..96e7ae8b98 100644
--- a/indra/newview/llfloaterobjectweights.cpp
+++ b/indra/newview/llfloaterobjectweights.cpp
@@ -84,7 +84,7 @@ LLFloaterObjectWeights::~LLFloaterObjectWeights()
}
// virtual
-BOOL LLFloaterObjectWeights::postBuild()
+bool LLFloaterObjectWeights::postBuild()
{
mSelectedObjects = getChild<LLTextBox>("objects");
mSelectedPrims = getChild<LLTextBox>("prims");
@@ -99,7 +99,7 @@ BOOL LLFloaterObjectWeights::postBuild()
mRemainingCapacity = getChild<LLTextBox>("remaining_capacity");
mTotalCapacity = getChild<LLTextBox>("total_capacity");
- return TRUE;
+ return true;
}
// virtual
diff --git a/indra/newview/llfloaterobjectweights.h b/indra/newview/llfloaterobjectweights.h
index 1a2c317bad..90df0a47ee 100644
--- a/indra/newview/llfloaterobjectweights.h
+++ b/indra/newview/llfloaterobjectweights.h
@@ -58,7 +58,7 @@ public:
LLFloaterObjectWeights(const LLSD& key);
~LLFloaterObjectWeights();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onOpen(const LLSD& key);
diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp
index d3ab22f792..ec3dee1d89 100644
--- a/indra/newview/llfloateropenobject.cpp
+++ b/indra/newview/llfloateropenobject.cpp
@@ -53,7 +53,7 @@
LLFloaterOpenObject::LLFloaterOpenObject(const LLSD& key)
: LLFloater(key),
mPanelInventoryObject(NULL),
- mDirty(TRUE)
+ mDirty(true)
{
mCommitCallbackRegistrar.add("OpenObject.MoveToInventory", boost::bind(&LLFloaterOpenObject::onClickMoveToInventory, this));
mCommitCallbackRegistrar.add("OpenObject.Cancel", boost::bind(&LLFloaterOpenObject::onClickCancel, this));
@@ -65,13 +65,13 @@ LLFloaterOpenObject::~LLFloaterOpenObject()
}
// virtual
-BOOL LLFloaterOpenObject::postBuild()
+bool LLFloaterOpenObject::postBuild()
{
getChild<LLUICtrl>("object_name")->setTextArg("[DESC]", std::string("Object") ); // *Note: probably do not want to translate this
mPanelInventoryObject = getChild<LLPanelObjectInventory>("object_contents");
refresh();
- return TRUE;
+ return true;
}
void LLFloaterOpenObject::onOpen(const LLSD& key)
@@ -97,18 +97,18 @@ void LLFloaterOpenObject::refresh()
mPanelInventoryObject->refresh();
std::string name = "";
- BOOL enabled = FALSE;
+ bool enabled = false;
LLSelectNode* node = mObjectSelection->getFirstRootNode();
if (node)
{
name = node->mName;
- enabled = TRUE;
+ enabled = true;
}
else
{
name = "";
- enabled = FALSE;
+ enabled = false;
}
getChild<LLUICtrl>("object_name")->setTextArg("[DESC]", name);
@@ -123,14 +123,14 @@ void LLFloaterOpenObject::draw()
if (mDirty)
{
refresh();
- mDirty = FALSE;
+ mDirty = false;
}
LLFloater::draw();
}
void LLFloaterOpenObject::dirty()
{
- mDirty = TRUE;
+ mDirty = true;
}
@@ -184,9 +184,9 @@ void LLFloaterOpenObject::callbackCreateInventoryCategory(const LLUUID& category
// Copy and/or move the items into the newly created folder.
// Ignore any "you're going to break this item" messages.
- BOOL success = move_inv_category_world_to_agent(object_id,
+ bool success = move_inv_category_world_to_agent(object_id,
category_id,
- TRUE,
+ true,
[](S32 result, void* data, const LLMoveInv*)
{
callbackMoveInventory(result, data);
diff --git a/indra/newview/llfloateropenobject.h b/indra/newview/llfloateropenobject.h
index 745753316b..953fae21d2 100644
--- a/indra/newview/llfloateropenobject.h
+++ b/indra/newview/llfloateropenobject.h
@@ -55,7 +55,7 @@ public:
protected:
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
void refresh();
void draw();
virtual void onOpen(const LLSD& key);
@@ -76,7 +76,7 @@ protected:
LLPanelObjectInventory* mPanelInventoryObject;
LLSafeHandle<LLObjectSelection> mObjectSelection;
- BOOL mDirty;
+ bool mDirty;
};
#endif
diff --git a/indra/newview/llfloaterpathfindingcharacters.cpp b/indra/newview/llfloaterpathfindingcharacters.cpp
index 87f927ff65..098a2edc64 100644
--- a/indra/newview/llfloaterpathfindingcharacters.cpp
+++ b/indra/newview/llfloaterpathfindingcharacters.cpp
@@ -65,17 +65,17 @@ void LLFloaterPathfindingCharacters::onClose(bool pIsAppQuitting)
LLFloaterPathfindingObjects::onClose( pIsAppQuitting );
}
-BOOL LLFloaterPathfindingCharacters::isShowPhysicsCapsule() const
+bool LLFloaterPathfindingCharacters::isShowPhysicsCapsule() const
{
return mShowPhysicsCapsuleCheckBox->get();
}
-void LLFloaterPathfindingCharacters::setShowPhysicsCapsule(BOOL pIsShowPhysicsCapsule)
+void LLFloaterPathfindingCharacters::setShowPhysicsCapsule(bool pIsShowPhysicsCapsule)
{
mShowPhysicsCapsuleCheckBox->set(pIsShowPhysicsCapsule && (LLPathingLib::getInstance() != NULL));
}
-BOOL LLFloaterPathfindingCharacters::isPhysicsCapsuleEnabled(LLUUID& id, LLVector3& pos, LLQuaternion& rot) const
+bool LLFloaterPathfindingCharacters::isPhysicsCapsuleEnabled(LLUUID& id, LLVector3& pos, LLQuaternion& rot) const
{
id = mSelectedCharacterId;
// Physics capsule is enable if the checkbox is enabled and if we can get the required render
@@ -117,7 +117,7 @@ LLFloaterPathfindingCharacters::~LLFloaterPathfindingCharacters()
{
}
-BOOL LLFloaterPathfindingCharacters::postBuild()
+bool LLFloaterPathfindingCharacters::postBuild()
{
mBeaconColor = LLUIColorTable::getInstance()->getColor("PathfindingCharacterBeaconColor");
@@ -195,7 +195,7 @@ void LLFloaterPathfindingCharacters::onShowPhysicsCapsuleClicked()
{
if (isShowPhysicsCapsule())
{
- setShowPhysicsCapsule(FALSE);
+ setShowPhysicsCapsule(false);
}
}
else
@@ -246,7 +246,7 @@ void LLFloaterPathfindingCharacters::updateStateOnDisplayControls()
mShowPhysicsCapsuleCheckBox->setEnabled(isEditEnabled);
if (!isEditEnabled)
{
- setShowPhysicsCapsule(FALSE);
+ setShowPhysicsCapsule(false);
}
}
diff --git a/indra/newview/llfloaterpathfindingcharacters.h b/indra/newview/llfloaterpathfindingcharacters.h
index 4021f4f119..c9294840af 100644
--- a/indra/newview/llfloaterpathfindingcharacters.h
+++ b/indra/newview/llfloaterpathfindingcharacters.h
@@ -44,10 +44,10 @@ class LLFloaterPathfindingCharacters : public LLFloaterPathfindingObjects
public:
virtual void onClose(bool pIsAppQuitting);
- BOOL isShowPhysicsCapsule() const;
- void setShowPhysicsCapsule(BOOL pIsShowPhysicsCapsule);
+ bool isShowPhysicsCapsule() const;
+ void setShowPhysicsCapsule(bool pIsShowPhysicsCapsule);
- BOOL isPhysicsCapsuleEnabled(LLUUID& id, LLVector3& pos, LLQuaternion& rot) const;
+ bool isPhysicsCapsuleEnabled(LLUUID& id, LLVector3& pos, LLQuaternion& rot) const;
static void openCharactersWithSelectedObjects();
static LLHandle<LLFloaterPathfindingCharacters> getInstanceHandle();
@@ -58,7 +58,7 @@ protected:
LLFloaterPathfindingCharacters(const LLSD& pSeed);
virtual ~LLFloaterPathfindingCharacters();
- virtual BOOL postBuild();
+ virtual bool postBuild();
virtual void requestGetObjects();
diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp
index ccf3e723fd..c9ac08e781 100644
--- a/indra/newview/llfloaterpathfindingconsole.cpp
+++ b/indra/newview/llfloaterpathfindingconsole.cpp
@@ -95,7 +95,7 @@ LLHandle<LLFloaterPathfindingConsole> LLFloaterPathfindingConsole::sInstanceHand
// LLFloaterPathfindingConsole
//---------------------------------------------------------------------------
-BOOL LLFloaterPathfindingConsole::postBuild()
+bool LLFloaterPathfindingConsole::postBuild()
{
mViewTestTabContainer = findChild<LLTabContainer>("view_test_tab_container");
llassert(mViewTestTabContainer != NULL);
@@ -297,94 +297,94 @@ LLHandle<LLFloaterPathfindingConsole> LLFloaterPathfindingConsole::getInstanceHa
return sInstanceHandle;
}
-BOOL LLFloaterPathfindingConsole::isRenderNavMesh() const
+bool LLFloaterPathfindingConsole::isRenderNavMesh() const
{
return mShowNavMeshCheckBox->get();
}
-void LLFloaterPathfindingConsole::setRenderNavMesh(BOOL pIsRenderNavMesh)
+void LLFloaterPathfindingConsole::setRenderNavMesh(bool pIsRenderNavMesh)
{
mShowNavMeshCheckBox->set(pIsRenderNavMesh);
setNavMeshRenderState();
}
-BOOL LLFloaterPathfindingConsole::isRenderWalkables() const
+bool LLFloaterPathfindingConsole::isRenderWalkables() const
{
return mShowWalkablesCheckBox->get();
}
-void LLFloaterPathfindingConsole::setRenderWalkables(BOOL pIsRenderWalkables)
+void LLFloaterPathfindingConsole::setRenderWalkables(bool pIsRenderWalkables)
{
mShowWalkablesCheckBox->set(pIsRenderWalkables);
}
-BOOL LLFloaterPathfindingConsole::isRenderStaticObstacles() const
+bool LLFloaterPathfindingConsole::isRenderStaticObstacles() const
{
return mShowStaticObstaclesCheckBox->get();
}
-void LLFloaterPathfindingConsole::setRenderStaticObstacles(BOOL pIsRenderStaticObstacles)
+void LLFloaterPathfindingConsole::setRenderStaticObstacles(bool pIsRenderStaticObstacles)
{
mShowStaticObstaclesCheckBox->set(pIsRenderStaticObstacles);
}
-BOOL LLFloaterPathfindingConsole::isRenderMaterialVolumes() const
+bool LLFloaterPathfindingConsole::isRenderMaterialVolumes() const
{
return mShowMaterialVolumesCheckBox->get();
}
-void LLFloaterPathfindingConsole::setRenderMaterialVolumes(BOOL pIsRenderMaterialVolumes)
+void LLFloaterPathfindingConsole::setRenderMaterialVolumes(bool pIsRenderMaterialVolumes)
{
mShowMaterialVolumesCheckBox->set(pIsRenderMaterialVolumes);
}
-BOOL LLFloaterPathfindingConsole::isRenderExclusionVolumes() const
+bool LLFloaterPathfindingConsole::isRenderExclusionVolumes() const
{
return mShowExclusionVolumesCheckBox->get();
}
-void LLFloaterPathfindingConsole::setRenderExclusionVolumes(BOOL pIsRenderExclusionVolumes)
+void LLFloaterPathfindingConsole::setRenderExclusionVolumes(bool pIsRenderExclusionVolumes)
{
mShowExclusionVolumesCheckBox->set(pIsRenderExclusionVolumes);
}
-BOOL LLFloaterPathfindingConsole::isRenderWorld() const
+bool LLFloaterPathfindingConsole::isRenderWorld() const
{
return mShowWorldCheckBox->get();
}
-void LLFloaterPathfindingConsole::setRenderWorld(BOOL pIsRenderWorld)
+void LLFloaterPathfindingConsole::setRenderWorld(bool pIsRenderWorld)
{
mShowWorldCheckBox->set(pIsRenderWorld);
setWorldRenderState();
}
-BOOL LLFloaterPathfindingConsole::isRenderWorldMovablesOnly() const
+bool LLFloaterPathfindingConsole::isRenderWorldMovablesOnly() const
{
return (mShowWorldCheckBox->get() && mShowWorldMovablesOnlyCheckBox->get());
}
-void LLFloaterPathfindingConsole::setRenderWorldMovablesOnly(BOOL pIsRenderWorldMovablesOnly)
+void LLFloaterPathfindingConsole::setRenderWorldMovablesOnly(bool pIsRenderWorldMovablesOnly)
{
mShowWorldMovablesOnlyCheckBox->set(pIsRenderWorldMovablesOnly);
}
-BOOL LLFloaterPathfindingConsole::isRenderWaterPlane() const
+bool LLFloaterPathfindingConsole::isRenderWaterPlane() const
{
return mShowRenderWaterPlaneCheckBox->get();
}
-void LLFloaterPathfindingConsole::setRenderWaterPlane(BOOL pIsRenderWaterPlane)
+void LLFloaterPathfindingConsole::setRenderWaterPlane(bool pIsRenderWaterPlane)
{
mShowRenderWaterPlaneCheckBox->set(pIsRenderWaterPlane);
}
-BOOL LLFloaterPathfindingConsole::isRenderXRay() const
+bool LLFloaterPathfindingConsole::isRenderXRay() const
{
return mShowXRayCheckBox->get();
}
-void LLFloaterPathfindingConsole::setRenderXRay(BOOL pIsRenderXRay)
+void LLFloaterPathfindingConsole::setRenderXRay(bool pIsRenderXRay)
{
mShowXRayCheckBox->set(pIsRenderXRay);
}
@@ -603,8 +603,8 @@ void LLFloaterPathfindingConsole::handleNavMeshZoneStatus(LLPathfindingNavMeshZo
void LLFloaterPathfindingConsole::onRegionBoundaryCross()
{
initializeNavMeshZoneForCurrentRegion();
- setRenderWorld(TRUE);
- setRenderWorldMovablesOnly(FALSE);
+ setRenderWorld(true);
+ setRenderWorldMovablesOnly(false);
}
void LLFloaterPathfindingConsole::onPathEvent()
@@ -644,15 +644,15 @@ void LLFloaterPathfindingConsole::onPathEvent()
void LLFloaterPathfindingConsole::setDefaultInputs()
{
mViewTestTabContainer->selectTab(XUI_VIEW_TAB_INDEX);
- setRenderWorld(TRUE);
- setRenderWorldMovablesOnly(FALSE);
- setRenderNavMesh(FALSE);
- setRenderWalkables(FALSE);
- setRenderMaterialVolumes(FALSE);
- setRenderStaticObstacles(FALSE);
- setRenderExclusionVolumes(FALSE);
- setRenderWaterPlane(FALSE);
- setRenderXRay(FALSE);
+ setRenderWorld(true);
+ setRenderWorldMovablesOnly(false);
+ setRenderNavMesh(false);
+ setRenderWalkables(false);
+ setRenderMaterialVolumes(false);
+ setRenderStaticObstacles(false);
+ setRenderExclusionVolumes(false);
+ setRenderWaterPlane(false);
+ setRenderXRay(false);
}
void LLFloaterPathfindingConsole::setConsoleState(EConsoleState pConsoleState)
@@ -665,18 +665,18 @@ void LLFloaterPathfindingConsole::setConsoleState(EConsoleState pConsoleState)
void LLFloaterPathfindingConsole::setWorldRenderState()
{
- BOOL renderWorld = isRenderWorld();
+ bool renderWorld = isRenderWorld();
mShowWorldMovablesOnlyCheckBox->setEnabled(renderWorld && mShowWorldCheckBox->getEnabled());
if (!renderWorld)
{
- mShowWorldMovablesOnlyCheckBox->set(FALSE);
+ mShowWorldMovablesOnlyCheckBox->set(false);
}
}
void LLFloaterPathfindingConsole::setNavMeshRenderState()
{
- BOOL renderNavMesh = isRenderNavMesh();
+ bool renderNavMesh = isRenderNavMesh();
mShowNavMeshWalkabilityLabel->setEnabled(renderNavMesh);
mShowNavMeshWalkabilityComboBox->setEnabled(renderNavMesh);
@@ -702,106 +702,106 @@ void LLFloaterPathfindingConsole::updateControlsOnConsoleState()
case kConsoleStateRegionNotEnabled :
case kConsoleStateRegionLoading :
mViewTestTabContainer->selectTab(XUI_VIEW_TAB_INDEX);
- mViewTab->setEnabled(FALSE);
- mShowLabel->setEnabled(FALSE);
- mShowWorldCheckBox->setEnabled(FALSE);
- mShowWorldMovablesOnlyCheckBox->setEnabled(FALSE);
- mShowNavMeshCheckBox->setEnabled(FALSE);
- mShowNavMeshWalkabilityLabel->setEnabled(FALSE);
- mShowNavMeshWalkabilityComboBox->setEnabled(FALSE);
- mShowWalkablesCheckBox->setEnabled(FALSE);
- mShowStaticObstaclesCheckBox->setEnabled(FALSE);
- mShowMaterialVolumesCheckBox->setEnabled(FALSE);
- mShowExclusionVolumesCheckBox->setEnabled(FALSE);
- mShowRenderWaterPlaneCheckBox->setEnabled(FALSE);
- mShowXRayCheckBox->setEnabled(FALSE);
- mTestTab->setEnabled(FALSE);
- mCtrlClickLabel->setEnabled(FALSE);
- mShiftClickLabel->setEnabled(FALSE);
- mCharacterWidthLabel->setEnabled(FALSE);
- mCharacterWidthUnitLabel->setEnabled(FALSE);
- mCharacterWidthSlider->setEnabled(FALSE);
- mCharacterTypeLabel->setEnabled(FALSE);
- mCharacterTypeComboBox->setEnabled(FALSE);
- mClearPathButton->setEnabled(FALSE);
+ mViewTab->setEnabled(false);
+ mShowLabel->setEnabled(false);
+ mShowWorldCheckBox->setEnabled(false);
+ mShowWorldMovablesOnlyCheckBox->setEnabled(false);
+ mShowNavMeshCheckBox->setEnabled(false);
+ mShowNavMeshWalkabilityLabel->setEnabled(false);
+ mShowNavMeshWalkabilityComboBox->setEnabled(false);
+ mShowWalkablesCheckBox->setEnabled(false);
+ mShowStaticObstaclesCheckBox->setEnabled(false);
+ mShowMaterialVolumesCheckBox->setEnabled(false);
+ mShowExclusionVolumesCheckBox->setEnabled(false);
+ mShowRenderWaterPlaneCheckBox->setEnabled(false);
+ mShowXRayCheckBox->setEnabled(false);
+ mTestTab->setEnabled(false);
+ mCtrlClickLabel->setEnabled(false);
+ mShiftClickLabel->setEnabled(false);
+ mCharacterWidthLabel->setEnabled(false);
+ mCharacterWidthUnitLabel->setEnabled(false);
+ mCharacterWidthSlider->setEnabled(false);
+ mCharacterTypeLabel->setEnabled(false);
+ mCharacterTypeComboBox->setEnabled(false);
+ mClearPathButton->setEnabled(false);
clearPath();
break;
case kConsoleStateLibraryNotImplemented :
mViewTestTabContainer->selectTab(XUI_VIEW_TAB_INDEX);
- mViewTab->setEnabled(FALSE);
- mShowLabel->setEnabled(FALSE);
- mShowWorldCheckBox->setEnabled(FALSE);
- mShowWorldMovablesOnlyCheckBox->setEnabled(FALSE);
- mShowNavMeshCheckBox->setEnabled(FALSE);
- mShowNavMeshWalkabilityLabel->setEnabled(FALSE);
- mShowNavMeshWalkabilityComboBox->setEnabled(FALSE);
- mShowWalkablesCheckBox->setEnabled(FALSE);
- mShowStaticObstaclesCheckBox->setEnabled(FALSE);
- mShowMaterialVolumesCheckBox->setEnabled(FALSE);
- mShowExclusionVolumesCheckBox->setEnabled(FALSE);
- mShowRenderWaterPlaneCheckBox->setEnabled(FALSE);
- mShowXRayCheckBox->setEnabled(FALSE);
- mTestTab->setEnabled(FALSE);
- mCtrlClickLabel->setEnabled(FALSE);
- mShiftClickLabel->setEnabled(FALSE);
- mCharacterWidthLabel->setEnabled(FALSE);
- mCharacterWidthUnitLabel->setEnabled(FALSE);
- mCharacterWidthSlider->setEnabled(FALSE);
- mCharacterTypeLabel->setEnabled(FALSE);
- mCharacterTypeComboBox->setEnabled(FALSE);
- mClearPathButton->setEnabled(FALSE);
+ mViewTab->setEnabled(false);
+ mShowLabel->setEnabled(false);
+ mShowWorldCheckBox->setEnabled(false);
+ mShowWorldMovablesOnlyCheckBox->setEnabled(false);
+ mShowNavMeshCheckBox->setEnabled(false);
+ mShowNavMeshWalkabilityLabel->setEnabled(false);
+ mShowNavMeshWalkabilityComboBox->setEnabled(false);
+ mShowWalkablesCheckBox->setEnabled(false);
+ mShowStaticObstaclesCheckBox->setEnabled(false);
+ mShowMaterialVolumesCheckBox->setEnabled(false);
+ mShowExclusionVolumesCheckBox->setEnabled(false);
+ mShowRenderWaterPlaneCheckBox->setEnabled(false);
+ mShowXRayCheckBox->setEnabled(false);
+ mTestTab->setEnabled(false);
+ mCtrlClickLabel->setEnabled(false);
+ mShiftClickLabel->setEnabled(false);
+ mCharacterWidthLabel->setEnabled(false);
+ mCharacterWidthUnitLabel->setEnabled(false);
+ mCharacterWidthSlider->setEnabled(false);
+ mCharacterTypeLabel->setEnabled(false);
+ mCharacterTypeComboBox->setEnabled(false);
+ mClearPathButton->setEnabled(false);
clearPath();
break;
case kConsoleStateCheckingVersion :
case kConsoleStateDownloading :
case kConsoleStateError :
mViewTestTabContainer->selectTab(XUI_VIEW_TAB_INDEX);
- mViewTab->setEnabled(FALSE);
- mShowLabel->setEnabled(FALSE);
- mShowWorldCheckBox->setEnabled(FALSE);
- mShowWorldMovablesOnlyCheckBox->setEnabled(FALSE);
- mShowNavMeshCheckBox->setEnabled(FALSE);
- mShowNavMeshWalkabilityLabel->setEnabled(FALSE);
- mShowNavMeshWalkabilityComboBox->setEnabled(FALSE);
- mShowWalkablesCheckBox->setEnabled(FALSE);
- mShowStaticObstaclesCheckBox->setEnabled(FALSE);
- mShowMaterialVolumesCheckBox->setEnabled(FALSE);
- mShowExclusionVolumesCheckBox->setEnabled(FALSE);
- mShowRenderWaterPlaneCheckBox->setEnabled(FALSE);
- mShowXRayCheckBox->setEnabled(FALSE);
- mTestTab->setEnabled(FALSE);
- mCtrlClickLabel->setEnabled(FALSE);
- mShiftClickLabel->setEnabled(FALSE);
- mCharacterWidthLabel->setEnabled(FALSE);
- mCharacterWidthUnitLabel->setEnabled(FALSE);
- mCharacterWidthSlider->setEnabled(FALSE);
- mCharacterTypeLabel->setEnabled(FALSE);
- mCharacterTypeComboBox->setEnabled(FALSE);
- mClearPathButton->setEnabled(FALSE);
+ mViewTab->setEnabled(false);
+ mShowLabel->setEnabled(false);
+ mShowWorldCheckBox->setEnabled(false);
+ mShowWorldMovablesOnlyCheckBox->setEnabled(false);
+ mShowNavMeshCheckBox->setEnabled(false);
+ mShowNavMeshWalkabilityLabel->setEnabled(false);
+ mShowNavMeshWalkabilityComboBox->setEnabled(false);
+ mShowWalkablesCheckBox->setEnabled(false);
+ mShowStaticObstaclesCheckBox->setEnabled(false);
+ mShowMaterialVolumesCheckBox->setEnabled(false);
+ mShowExclusionVolumesCheckBox->setEnabled(false);
+ mShowRenderWaterPlaneCheckBox->setEnabled(false);
+ mShowXRayCheckBox->setEnabled(false);
+ mTestTab->setEnabled(false);
+ mCtrlClickLabel->setEnabled(false);
+ mShiftClickLabel->setEnabled(false);
+ mCharacterWidthLabel->setEnabled(false);
+ mCharacterWidthUnitLabel->setEnabled(false);
+ mCharacterWidthSlider->setEnabled(false);
+ mCharacterTypeLabel->setEnabled(false);
+ mCharacterTypeComboBox->setEnabled(false);
+ mClearPathButton->setEnabled(false);
clearPath();
break;
case kConsoleStateHasNavMesh :
- mViewTab->setEnabled(TRUE);
- mShowLabel->setEnabled(TRUE);
- mShowWorldCheckBox->setEnabled(TRUE);
+ mViewTab->setEnabled(true);
+ mShowLabel->setEnabled(true);
+ mShowWorldCheckBox->setEnabled(true);
setWorldRenderState();
- mShowNavMeshCheckBox->setEnabled(TRUE);
+ mShowNavMeshCheckBox->setEnabled(true);
setNavMeshRenderState();
- mShowWalkablesCheckBox->setEnabled(TRUE);
- mShowStaticObstaclesCheckBox->setEnabled(TRUE);
- mShowMaterialVolumesCheckBox->setEnabled(TRUE);
- mShowExclusionVolumesCheckBox->setEnabled(TRUE);
- mShowRenderWaterPlaneCheckBox->setEnabled(TRUE);
- mShowXRayCheckBox->setEnabled(TRUE);
- mTestTab->setEnabled(TRUE);
- mCtrlClickLabel->setEnabled(TRUE);
- mShiftClickLabel->setEnabled(TRUE);
- mCharacterWidthLabel->setEnabled(TRUE);
- mCharacterWidthUnitLabel->setEnabled(TRUE);
- mCharacterWidthSlider->setEnabled(TRUE);
- mCharacterTypeLabel->setEnabled(TRUE);
- mCharacterTypeComboBox->setEnabled(TRUE);
- mClearPathButton->setEnabled(TRUE);
+ mShowWalkablesCheckBox->setEnabled(true);
+ mShowStaticObstaclesCheckBox->setEnabled(true);
+ mShowMaterialVolumesCheckBox->setEnabled(true);
+ mShowExclusionVolumesCheckBox->setEnabled(true);
+ mShowRenderWaterPlaneCheckBox->setEnabled(true);
+ mShowXRayCheckBox->setEnabled(true);
+ mTestTab->setEnabled(true);
+ mCtrlClickLabel->setEnabled(true);
+ mShiftClickLabel->setEnabled(true);
+ mCharacterWidthLabel->setEnabled(true);
+ mCharacterWidthUnitLabel->setEnabled(true);
+ mCharacterWidthSlider->setEnabled(true);
+ mCharacterTypeLabel->setEnabled(true);
+ mCharacterTypeComboBox->setEnabled(true);
+ mClearPathButton->setEnabled(true);
break;
default :
llassert(0);
@@ -1065,7 +1065,7 @@ void LLFloaterPathfindingConsole::updatePathTestStatus()
}
-BOOL LLFloaterPathfindingConsole::isRenderAnyShapes() const
+bool LLFloaterPathfindingConsole::isRenderAnyShapes() const
{
return (isRenderWalkables() || isRenderStaticObstacles() ||
isRenderMaterialVolumes() || isRenderExclusionVolumes());
diff --git a/indra/newview/llfloaterpathfindingconsole.h b/indra/newview/llfloaterpathfindingconsole.h
index e999e57741..7d557a73b5 100644
--- a/indra/newview/llfloaterpathfindingconsole.h
+++ b/indra/newview/llfloaterpathfindingconsole.h
@@ -55,40 +55,40 @@ class LLFloaterPathfindingConsole
friend class LLFloaterReg;
public:
- virtual BOOL postBuild();
+ virtual bool postBuild();
virtual void onOpen(const LLSD& pKey);
virtual void onClose(bool pIsAppQuitting);
static LLHandle<LLFloaterPathfindingConsole> getInstanceHandle();
- BOOL isRenderNavMesh() const;
- void setRenderNavMesh(BOOL pIsRenderNavMesh);
+ bool isRenderNavMesh() const;
+ void setRenderNavMesh(bool pIsRenderNavMesh);
- BOOL isRenderWalkables() const;
- void setRenderWalkables(BOOL pIsRenderWalkables);
+ bool isRenderWalkables() const;
+ void setRenderWalkables(bool pIsRenderWalkables);
- BOOL isRenderStaticObstacles() const;
- void setRenderStaticObstacles(BOOL pIsRenderStaticObstacles);
+ bool isRenderStaticObstacles() const;
+ void setRenderStaticObstacles(bool pIsRenderStaticObstacles);
- BOOL isRenderMaterialVolumes() const;
- void setRenderMaterialVolumes(BOOL pIsRenderMaterialVolumes);
+ bool isRenderMaterialVolumes() const;
+ void setRenderMaterialVolumes(bool pIsRenderMaterialVolumes);
- BOOL isRenderExclusionVolumes() const;
- void setRenderExclusionVolumes(BOOL pIsRenderExclusionVolumes);
+ bool isRenderExclusionVolumes() const;
+ void setRenderExclusionVolumes(bool pIsRenderExclusionVolumes);
- BOOL isRenderWorld() const;
- void setRenderWorld(BOOL pIsRenderWorld);
+ bool isRenderWorld() const;
+ void setRenderWorld(bool pIsRenderWorld);
- BOOL isRenderWorldMovablesOnly() const;
- void setRenderWorldMovablesOnly(BOOL pIsRenderWorldMovablesOnly);
+ bool isRenderWorldMovablesOnly() const;
+ void setRenderWorldMovablesOnly(bool pIsRenderWorldMovablesOnly);
- BOOL isRenderWaterPlane() const;
- void setRenderWaterPlane(BOOL pIsRenderWaterPlane);
+ bool isRenderWaterPlane() const;
+ void setRenderWaterPlane(bool pIsRenderWaterPlane);
- BOOL isRenderXRay() const;
- void setRenderXRay(BOOL pIsRenderXRay);
+ bool isRenderXRay() const;
+ void setRenderXRay(bool pIsRenderXRay);
- BOOL isRenderAnyShapes() const;
+ bool isRenderAnyShapes() const;
U32 getRenderShapeFlags();
LLPathingLib::LLPLCharacterType getRenderHeatmapType() const;
diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp
index 03aede94c6..b33e3d6ea5 100644
--- a/indra/newview/llfloaterpathfindinglinksets.cpp
+++ b/indra/newview/llfloaterpathfindinglinksets.cpp
@@ -111,7 +111,7 @@ LLFloaterPathfindingLinksets::~LLFloaterPathfindingLinksets()
{
}
-BOOL LLFloaterPathfindingLinksets::postBuild()
+bool LLFloaterPathfindingLinksets::postBuild()
{
mBeaconColor = LLUIColorTable::getInstance()->getColor("PathfindingLinksetBeaconColor");
@@ -577,12 +577,12 @@ void LLFloaterPathfindingLinksets::updateStateOnEditFields()
void LLFloaterPathfindingLinksets::updateStateOnEditLinksetUse()
{
- BOOL useWalkable = FALSE;
- BOOL useStaticObstacle = FALSE;
- BOOL useDynamicObstacle = FALSE;
- BOOL useMaterialVolume = FALSE;
- BOOL useExclusionVolume = FALSE;
- BOOL useDynamicPhantom = FALSE;
+ bool useWalkable = false;
+ bool useStaticObstacle = false;
+ bool useDynamicObstacle = false;
+ bool useMaterialVolume = false;
+ bool useExclusionVolume = false;
+ bool useDynamicPhantom = false;
LLPathfindingObjectListPtr selectedObjects = getSelectedObjects();
if ((selectedObjects != NULL) && !selectedObjects->isEmpty())
diff --git a/indra/newview/llfloaterpathfindinglinksets.h b/indra/newview/llfloaterpathfindinglinksets.h
index a954d8a8ec..efdbc573ec 100644
--- a/indra/newview/llfloaterpathfindinglinksets.h
+++ b/indra/newview/llfloaterpathfindinglinksets.h
@@ -55,7 +55,7 @@ protected:
LLFloaterPathfindingLinksets(const LLSD& pSeed);
virtual ~LLFloaterPathfindingLinksets();
- virtual BOOL postBuild();
+ virtual bool postBuild();
virtual void requestGetObjects();
diff --git a/indra/newview/llfloaterpathfindingobjects.cpp b/indra/newview/llfloaterpathfindingobjects.cpp
index 5cf16f3ad6..00dbf5b8fb 100644
--- a/indra/newview/llfloaterpathfindingobjects.cpp
+++ b/indra/newview/llfloaterpathfindingobjects.cpp
@@ -75,7 +75,7 @@ void LLFloaterPathfindingObjects::onOpen(const LLSD &pKey)
LLFloater::onOpen(pKey);
selectNoneObjects();
- mObjectsScrollList->setCommitOnSelectionChange(TRUE);
+ mObjectsScrollList->setCommitOnSelectionChange(true);
if (!mSelectionUpdateSlot.connected())
{
@@ -112,7 +112,7 @@ void LLFloaterPathfindingObjects::onClose(bool pIsAppQuitting)
mSelectionUpdateSlot.disconnect();
}
- mObjectsScrollList->setCommitOnSelectionChange(FALSE);
+ mObjectsScrollList->setCommitOnSelectionChange(false);
selectNoneObjects();
if (mObjectsSelection.notNull())
@@ -194,7 +194,7 @@ LLFloaterPathfindingObjects::~LLFloaterPathfindingObjects()
clearAllObjects();
}
-BOOL LLFloaterPathfindingObjects::postBuild()
+bool LLFloaterPathfindingObjects::postBuild()
{
mDefaultBeaconColor = LLUIColorTable::getInstance()->getColor("PathfindingDefaultBeaconColor");
mDefaultBeaconTextColor = LLUIColorTable::getInstance()->getColor("PathfindingDefaultBeaconTextColor");
@@ -204,7 +204,7 @@ BOOL LLFloaterPathfindingObjects::postBuild()
mObjectsScrollList = findChild<LLScrollListCtrl>("objects_scroll_list");
llassert(mObjectsScrollList != NULL);
mObjectsScrollList->setCommitCallback(boost::bind(&LLFloaterPathfindingObjects::onScrollListSelectionChanged, this));
- mObjectsScrollList->sortByColumnIndex(static_cast<U32>(getNameColumnIndex()), TRUE);
+ mObjectsScrollList->sortByColumnIndex(static_cast<U32>(getNameColumnIndex()), true);
mMessagingStatus = findChild<LLTextBase>("messaging_status");
llassert(mMessagingStatus != NULL);
@@ -494,14 +494,14 @@ void LLFloaterPathfindingObjects::showFloaterWithSelectionObjects()
rebuildObjectsScrollList(true);
if (isMinimized())
{
- setMinimized(FALSE);
+ setMinimized(false);
}
setVisibleAndFrontmost();
}
- setFocus(TRUE);
+ setFocus(true);
}
-BOOL LLFloaterPathfindingObjects::isShowBeacons() const
+bool LLFloaterPathfindingObjects::isShowBeacons() const
{
return mShowBeaconCheckBox->get();
}
@@ -788,22 +788,22 @@ void LLFloaterPathfindingObjects::updateStateOnListControls()
case kMessagingUnknown:
case kMessagingGetRequestSent :
case kMessagingSetRequestSent :
- mRefreshListButton->setEnabled(FALSE);
- mSelectAllButton->setEnabled(FALSE);
- mSelectNoneButton->setEnabled(FALSE);
+ mRefreshListButton->setEnabled(false);
+ mSelectAllButton->setEnabled(false);
+ mSelectNoneButton->setEnabled(false);
break;
case kMessagingGetError :
case kMessagingSetError :
case kMessagingNotEnabled :
- mRefreshListButton->setEnabled(TRUE);
- mSelectAllButton->setEnabled(FALSE);
- mSelectNoneButton->setEnabled(FALSE);
+ mRefreshListButton->setEnabled(true);
+ mSelectAllButton->setEnabled(false);
+ mSelectNoneButton->setEnabled(false);
break;
case kMessagingComplete :
{
int numItems = mObjectsScrollList->getItemCount();
int numSelectedItems = mObjectsScrollList->getNumSelected();
- mRefreshListButton->setEnabled(TRUE);
+ mRefreshListButton->setEnabled(true);
mSelectAllButton->setEnabled(numSelectedItems < numItems);
mSelectNoneButton->setEnabled(numSelectedItems > 0);
}
diff --git a/indra/newview/llfloaterpathfindingobjects.h b/indra/newview/llfloaterpathfindingobjects.h
index 752f741959..6e744c9fa1 100644
--- a/indra/newview/llfloaterpathfindingobjects.h
+++ b/indra/newview/llfloaterpathfindingobjects.h
@@ -73,7 +73,7 @@ protected:
LLFloaterPathfindingObjects(const LLSD &pSeed);
virtual ~LLFloaterPathfindingObjects();
- virtual BOOL postBuild();
+ virtual bool postBuild();
virtual void requestGetObjects();
LLPathfindingManager::request_id_t getNewRequestId();
@@ -96,7 +96,7 @@ protected:
void showFloaterWithSelectionObjects();
- BOOL isShowBeacons() const;
+ bool isShowBeacons() const;
void clearAllObjects();
void selectAllObjects();
void selectNoneObjects();
diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp
index 94261b2e4e..aa3106095c 100644
--- a/indra/newview/llfloaterpay.cpp
+++ b/indra/newview/llfloaterpay.cpp
@@ -83,7 +83,7 @@ class LLFloaterPay : public LLFloater
public:
LLFloaterPay(const LLSD& key);
virtual ~LLFloaterPay();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onClose(bool app_quitting);
void setCallback(money_callback callback) { mCallback = callback; }
@@ -104,15 +104,15 @@ private:
static void onGive(give_money_ptr info);
void give(S32 amount);
static void processPayPriceReply(LLMessageSystem* msg, void **userdata);
- void finishPayUI(const LLUUID& target_id, BOOL is_group);
+ void finishPayUI(const LLUUID& target_id, bool is_group);
protected:
std::vector<give_money_ptr> mCallbackData;
money_callback mCallback;
LLTextBox* mObjectNameText;
LLUUID mTargetUUID;
- BOOL mTargetIsGroup;
- BOOL mHaveName;
+ bool mTargetIsGroup;
+ bool mHaveName;
LLButton* mQuickPayButton[MAX_PAY_BUTTONS];
give_money_ptr mQuickPayInfo[MAX_PAY_BUTTONS];
@@ -130,8 +130,8 @@ LLFloaterPay::LLFloaterPay(const LLSD& key)
mCallback(NULL),
mObjectNameText(NULL),
mTargetUUID(key.asUUID()),
- mTargetIsGroup(FALSE),
- mHaveName(FALSE)
+ mTargetIsGroup(false),
+ mHaveName(false)
{
}
@@ -150,7 +150,7 @@ LLFloaterPay::~LLFloaterPay()
gMessageSystem->setHandlerFuncFast(_PREHASH_PayPriceReply, 0, 0);
}
-BOOL LLFloaterPay::postBuild()
+bool LLFloaterPay::postBuild()
{
S32 i = 0;
@@ -158,7 +158,7 @@ BOOL LLFloaterPay::postBuild()
mCallbackData.push_back(info);
childSetAction("fastpay 1", boost::bind(LLFloaterPay::onGive, info));
- getChildView("fastpay 1")->setVisible(FALSE);
+ getChildView("fastpay 1")->setVisible(false);
mQuickPayButton[i] = getChild<LLButton>("fastpay 1");
mQuickPayInfo[i] = info;
@@ -168,7 +168,7 @@ BOOL LLFloaterPay::postBuild()
mCallbackData.push_back(info);
childSetAction("fastpay 5", boost::bind(LLFloaterPay::onGive, info));
- getChildView("fastpay 5")->setVisible(FALSE);
+ getChildView("fastpay 5")->setVisible(false);
mQuickPayButton[i] = getChild<LLButton>("fastpay 5");
mQuickPayInfo[i] = info;
@@ -178,7 +178,7 @@ BOOL LLFloaterPay::postBuild()
mCallbackData.push_back(info);
childSetAction("fastpay 10", boost::bind(LLFloaterPay::onGive, info));
- getChildView("fastpay 10")->setVisible(FALSE);
+ getChildView("fastpay 10")->setVisible(false);
mQuickPayButton[i] = getChild<LLButton>("fastpay 10");
mQuickPayInfo[i] = info;
@@ -188,15 +188,15 @@ BOOL LLFloaterPay::postBuild()
mCallbackData.push_back(info);
childSetAction("fastpay 20", boost::bind(LLFloaterPay::onGive, info));
- getChildView("fastpay 20")->setVisible(FALSE);
+ getChildView("fastpay 20")->setVisible(false);
mQuickPayButton[i] = getChild<LLButton>("fastpay 20");
mQuickPayInfo[i] = info;
++i;
- getChildView("amount text")->setVisible(FALSE);
- getChildView("amount")->setVisible(FALSE);
+ getChildView("amount text")->setVisible(false);
+ getChildView("amount")->setVisible(false);
getChild<LLLineEditor>("amount")->setKeystrokeCallback(&LLFloaterPay::onKeystroke, this);
getChild<LLLineEditor>("amount")->setPrevalidate(LLTextValidate::validateNonNegativeS32);
@@ -206,12 +206,12 @@ BOOL LLFloaterPay::postBuild()
childSetAction("pay btn", boost::bind(LLFloaterPay::onGive, info));
setDefaultBtn("pay btn");
- getChildView("pay btn")->setVisible(FALSE);
- getChildView("pay btn")->setEnabled(FALSE);
+ getChildView("pay btn")->setVisible(false);
+ getChildView("pay btn")->setEnabled(false);
childSetAction("cancel btn",&LLFloaterPay::onCancel,this);
- return TRUE;
+ return true;
}
// virtual
@@ -241,25 +241,25 @@ void LLFloaterPay::processPayPriceReply(LLMessageSystem* msg, void **userdata)
if (PAY_PRICE_HIDE == price)
{
- self->getChildView("amount")->setVisible(FALSE);
- self->getChildView("pay btn")->setVisible(FALSE);
- self->getChildView("amount text")->setVisible(FALSE);
+ self->getChildView("amount")->setVisible(false);
+ self->getChildView("pay btn")->setVisible(false);
+ self->getChildView("amount text")->setVisible(false);
}
else if (PAY_PRICE_DEFAULT == price)
{
- self->getChildView("amount")->setVisible(TRUE);
- self->getChildView("pay btn")->setVisible(TRUE);
- self->getChildView("amount text")->setVisible(TRUE);
+ self->getChildView("amount")->setVisible(true);
+ self->getChildView("pay btn")->setVisible(true);
+ self->getChildView("amount text")->setVisible(true);
}
else
{
// PAY_PRICE_HIDE and PAY_PRICE_DEFAULT are negative values
// So we take the absolute value here after we have checked for those cases
- self->getChildView("amount")->setVisible(TRUE);
- self->getChildView("pay btn")->setVisible(TRUE);
- self->getChildView("pay btn")->setEnabled(TRUE);
- self->getChildView("amount text")->setVisible(TRUE);
+ self->getChildView("amount")->setVisible(true);
+ self->getChildView("pay btn")->setVisible(true);
+ self->getChildView("pay btn")->setEnabled(true);
+ self->getChildView("amount text")->setVisible(true);
self->getChild<LLUICtrl>("amount")->setValue(llformat("%d", llabs(price)));
}
@@ -282,7 +282,7 @@ void LLFloaterPay::processPayPriceReply(LLMessageSystem* msg, void **userdata)
self->mQuickPayButton[i]->setLabelSelected(button_str);
self->mQuickPayButton[i]->setLabelUnselected(button_str);
- self->mQuickPayButton[i]->setVisible(TRUE);
+ self->mQuickPayButton[i]->setVisible(true);
self->mQuickPayInfo[i]->mAmount = pay_button;
if ( pay_button > max_pay_amount )
@@ -292,7 +292,7 @@ void LLFloaterPay::processPayPriceReply(LLMessageSystem* msg, void **userdata)
}
else
{
- self->mQuickPayButton[i]->setVisible(FALSE);
+ self->mQuickPayButton[i]->setVisible(false);
}
}
@@ -345,10 +345,10 @@ void LLFloaterPay::processPayPriceReply(LLMessageSystem* msg, void **userdata)
for (i=num_blocks;i<MAX_PAY_BUTTONS;++i)
{
- self->mQuickPayButton[i]->setVisible(FALSE);
+ self->mQuickPayButton[i]->setVisible(false);
}
- self->reshape( self->getRect().getWidth() + padding_required, self->getRect().getHeight(), FALSE );
+ self->reshape( self->getRect().getWidth() + padding_required, self->getRect().getHeight(), false );
}
msg->setHandlerFunc("PayPriceReply",NULL,NULL);
}
@@ -388,7 +388,7 @@ void LLFloaterPay::payViaObject(money_callback callback, LLSafeHandle<LLObjectSe
msg->setHandlerFuncFast(_PREHASH_PayPriceReply, processPayPriceReply,(void **)floater);
LLUUID owner_id;
- BOOL is_group = FALSE;
+ bool is_group = false;
node->mPermissions->getOwnership(owner_id, is_group);
floater->getChild<LLUICtrl>("object_name_text")->setValue(node->mName);
@@ -407,13 +407,13 @@ void LLFloaterPay::payDirectly(money_callback callback,
floater->setCallback(callback);
floater->mObjectSelection = NULL;
- floater->getChildView("amount")->setVisible(TRUE);
- floater->getChildView("pay btn")->setVisible(TRUE);
- floater->getChildView("amount text")->setVisible(TRUE);
+ floater->getChildView("amount")->setVisible(true);
+ floater->getChildView("pay btn")->setVisible(true);
+ floater->getChildView("amount text")->setVisible(true);
for(S32 i=0;i<MAX_PAY_BUTTONS;++i)
{
- floater->mQuickPayButton[i]->setVisible(TRUE);
+ floater->mQuickPayButton[i]->setVisible(true);
}
floater->finishPayUI(target_id, is_group);
@@ -436,7 +436,7 @@ bool LLFloaterPay::payConfirmationCallback(const LLSD& notification, const LLSD&
return false;
}
-void LLFloaterPay::finishPayUI(const LLUUID& target_id, BOOL is_group)
+void LLFloaterPay::finishPayUI(const LLUUID& target_id, bool is_group)
{
std::string slurl;
if (is_group)
@@ -454,7 +454,7 @@ void LLFloaterPay::finishPayUI(const LLUUID& target_id, BOOL is_group)
// Make sure the amount field has focus
LLLineEditor* amount = getChild<LLLineEditor>("amount");
- amount->setFocus(TRUE);
+ amount->setFocus(true);
amount->selectAll();
mTargetIsGroup = is_group;
@@ -505,7 +505,7 @@ void LLFloaterPay::onGive(give_money_ptr info)
if (amount > PAY_AMOUNT_NOTIFICATION && gStatusBar && gStatusBar->getBalance() > amount)
{
LLUUID payee_id = LLUUID::null;
- BOOL is_group = false;
+ bool is_group = false;
if (floater->mObjectSelection.notNull())
{
LLSelectNode* node = floater->mObjectSelection->getFirstRootNode();
@@ -569,7 +569,7 @@ void LLFloaterPay::give(S32 amount)
}
S32 tx_type = TRANS_PAY_OBJECT;
if(dest_object->isAvatar()) tx_type = TRANS_GIFT;
- mCallback(mTargetUUID, region, amount, FALSE, tx_type, object_name);
+ mCallback(mTargetUUID, region, amount, false, tx_type, object_name);
mObjectSelection = NULL;
// request the object owner in order to check if the owner needs to be unmuted
diff --git a/indra/newview/llfloaterpay.h b/indra/newview/llfloaterpay.h
index f322e5ef04..84aa2b87c2 100644
--- a/indra/newview/llfloaterpay.h
+++ b/indra/newview/llfloaterpay.h
@@ -32,7 +32,7 @@ class LLObjectSelection;
class LLUUID;
class LLViewerRegion;
-typedef void (*money_callback)(const LLUUID&, LLViewerRegion*,S32,BOOL,S32,const std::string&);
+typedef void (*money_callback)(const LLUUID&, LLViewerRegion*,S32,bool,S32,const std::string&);
namespace LLFloaterPayUtil
{
diff --git a/indra/newview/llfloaterperformance.cpp b/indra/newview/llfloaterperformance.cpp
index 19fc3e673e..6b93ab2b49 100644
--- a/indra/newview/llfloaterperformance.cpp
+++ b/indra/newview/llfloaterperformance.cpp
@@ -91,7 +91,7 @@ LLFloaterPerformance::~LLFloaterPerformance()
delete mUpdateTimer;
}
-BOOL LLFloaterPerformance::postBuild()
+bool LLFloaterPerformance::postBuild()
{
mMainPanel = getChild<LLPanel>("panel_performance_main");
mNearbyPanel = getChild<LLPanel>("panel_performance_nearby");
@@ -152,16 +152,16 @@ BOOL LLFloaterPerformance::postBuild()
mStartAutotuneBtn->setCommitCallback(boost::bind(&LLFloaterPerformance::startAutotune, this));
mStopAutotuneBtn->setCommitCallback(boost::bind(&LLFloaterPerformance::stopAutotune, this));
- gSavedPerAccountSettings.declareBOOL("HadEnabledAutoFPS", FALSE, "User had enabled AutoFPS at least once", LLControlVariable::PERSIST_ALWAYS);
+ gSavedPerAccountSettings.declareBOOL("HadEnabledAutoFPS", false, "User had enabled AutoFPS at least once", LLControlVariable::PERSIST_ALWAYS);
- return TRUE;
+ return true;
}
void LLFloaterPerformance::showSelectedPanel(LLPanel* selected_panel)
{
hidePanels();
- mMainPanel->setVisible(FALSE);
- selected_panel->setVisible(TRUE);
+ mMainPanel->setVisible(false);
+ selected_panel->setVisible(true);
if (mHUDsPanel == selected_panel)
{
@@ -214,16 +214,16 @@ void LLFloaterPerformance::draw()
void LLFloaterPerformance::showMainPanel()
{
hidePanels();
- mMainPanel->setVisible(TRUE);
+ mMainPanel->setVisible(true);
}
void LLFloaterPerformance::hidePanels()
{
- mNearbyPanel->setVisible(FALSE);
- mComplexityPanel->setVisible(FALSE);
- mHUDsPanel->setVisible(FALSE);
- mSettingsPanel->setVisible(FALSE);
- mAutoadjustmentsPanel->setVisible(FALSE);
+ mNearbyPanel->setVisible(false);
+ mComplexityPanel->setVisible(false);
+ mHUDsPanel->setVisible(false);
+ mSettingsPanel->setVisible(false);
+ mAutoadjustmentsPanel->setVisible(false);
}
void LLFloaterPerformance::initBackBtn(LLPanel* panel)
@@ -321,7 +321,7 @@ void LLFloaterPerformance::populateHUDList()
}
}
}
- mHUDList->sortByColumnIndex(1, FALSE);
+ mHUDList->sortByColumnIndex(1, false);
mHUDList->setScrollPos(prev_pos);
mHUDList->selectItemBySpecialId(prev_selected_id);
}
@@ -413,7 +413,7 @@ void LLFloaterPerformance::populateObjectList()
}
}
}
- mObjectList->sortByColumnIndex(1, FALSE);
+ mObjectList->sortByColumnIndex(1, false);
mObjectList->setScrollPos(prev_pos);
mObjectList->selectItemBySpecialId(prev_selected_id);
}
@@ -503,7 +503,7 @@ void LLFloaterPerformance::populateNearbyList()
}
char_iter++;
}
- mNearbyList->sortByColumnIndex(1, FALSE);
+ mNearbyList->sortByColumnIndex(1, false);
mNearbyList->setScrollPos(prev_pos);
mNearbyList->selectByID(prev_selected_id);
}
@@ -732,7 +732,7 @@ void LLFloaterPerformance::enableAutotuneWarning()
{
if (!gSavedPerAccountSettings.getBOOL("HadEnabledAutoFPS") && LLPerfStats::tunables.userAutoTuneEnabled)
{
- gSavedPerAccountSettings.setBOOL("HadEnabledAutoFPS", TRUE);
+ gSavedPerAccountSettings.setBOOL("HadEnabledAutoFPS", true);
LLNotificationsUtil::add("EnableAutoFPSWarning", LLSD(), LLSD(),
[](const LLSD& notif, const LLSD& resp)
diff --git a/indra/newview/llfloaterperformance.h b/indra/newview/llfloaterperformance.h
index 620dbac5bb..5fecd99825 100644
--- a/indra/newview/llfloaterperformance.h
+++ b/indra/newview/llfloaterperformance.h
@@ -38,7 +38,7 @@ public:
LLFloaterPerformance(const LLSD& key);
virtual ~LLFloaterPerformance();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void draw();
void showSelectedPanel(LLPanel* selected_panel);
diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp
index b53839977e..2a223124a8 100644
--- a/indra/newview/llfloaterperms.cpp
+++ b/indra/newview/llfloaterperms.cpp
@@ -46,9 +46,9 @@ LLFloaterPerms::LLFloaterPerms(const LLSD& seed)
{
}
-BOOL LLFloaterPerms::postBuild()
+bool LLFloaterPerms::postBuild()
{
- return TRUE;
+ return true;
}
//static
@@ -126,7 +126,7 @@ const std::string LLFloaterPermsDefault::sCategoryNames[CAT_LAST] =
"Materials"
};
-BOOL LLFloaterPermsDefault::postBuild()
+bool LLFloaterPermsDefault::postBuild()
{
if(!gSavedSettings.getBOOL("DefaultUploadPermissionsConverted"))
{
@@ -162,17 +162,17 @@ void LLFloaterPermsDefault::onCommitCopy(const LLSD& user_data)
// Implements fair use
std::string prefix = user_data.asString();
- BOOL copyable = gSavedSettings.getBOOL(prefix+"NextOwnerCopy");
+ bool copyable = gSavedSettings.getBOOL(prefix+"NextOwnerCopy");
if(!copyable)
{
- gSavedSettings.setBOOL(prefix+"NextOwnerTransfer", TRUE);
+ gSavedSettings.setBOOL(prefix+"NextOwnerTransfer", true);
}
LLCheckBoxCtrl* xfer = getChild<LLCheckBoxCtrl>(prefix+"_transfer");
xfer->setEnabled(copyable);
}
-const int MAX_HTTP_RETRIES = 5;
-const float RETRY_TIMEOUT = 5.0;
+constexpr int MAX_HTTP_RETRIES = 5;
+constexpr float RETRY_TIMEOUT = 5.0;
void LLFloaterPermsDefault::sendInitialPerms()
{
diff --git a/indra/newview/llfloaterperms.h b/indra/newview/llfloaterperms.h
index 97ddec7cba..beeccbdc3b 100644
--- a/indra/newview/llfloaterperms.h
+++ b/indra/newview/llfloaterperms.h
@@ -37,7 +37,7 @@ class LLFloaterPerms : public LLFloater
friend class LLFloaterReg;
public:
- /*virtual*/ BOOL postBuild();
+ bool postBuild() override;
// Convenience methods to get current permission preference bitfields from saved settings:
static U32 getEveryonePerms(std::string prefix=""); // prefix + "EveryoneCopy"
@@ -55,7 +55,7 @@ class LLFloaterPermsDefault : public LLFloater
friend class LLFloaterReg;
public:
- /*virtual*/ BOOL postBuild();
+ bool postBuild() override;
void ok();
void cancel();
void onClickOK();
@@ -81,7 +81,7 @@ enum Categories
private:
LLFloaterPermsDefault(const LLSD& seed);
- void refresh();
+ void refresh() override;
static const std::string sCategoryNames[CAT_LAST];
static void updateCapCoro(std::string url);
diff --git a/indra/newview/llfloaterpostprocess.cpp b/indra/newview/llfloaterpostprocess.cpp
index 2d61109e17..376d36f61a 100644
--- a/indra/newview/llfloaterpostprocess.cpp
+++ b/indra/newview/llfloaterpostprocess.cpp
@@ -49,7 +49,7 @@ LLFloaterPostProcess::~LLFloaterPostProcess()
}
-BOOL LLFloaterPostProcess::postBuild()
+bool LLFloaterPostProcess::postBuild()
{
/// Color Filter Callbacks
childSetCommitCallback("ColorFilterToggle", &LLFloaterPostProcess::onBoolToggle, (char*)"enable_color_filter");
@@ -84,7 +84,7 @@ BOOL LLFloaterPostProcess::postBuild()
getChild<LLComboBox>("PPSaveEffect")->setCommitCallback(boost::bind(&LLFloaterPostProcess::onSaveEffect, this, editBox));
syncMenu();
- return TRUE;
+ return true;
}
// Bool Toggle
diff --git a/indra/newview/llfloaterpostprocess.h b/indra/newview/llfloaterpostprocess.h
index 424a5fc8f0..bc978efdb7 100644
--- a/indra/newview/llfloaterpostprocess.h
+++ b/indra/newview/llfloaterpostprocess.h
@@ -49,7 +49,7 @@ public:
LLFloaterPostProcess(const LLSD& key);
virtual ~LLFloaterPostProcess();
- /*virtual*/ BOOL postBuild();
+ bool postBuild();
/// post process callbacks
static void onBoolToggle(LLUICtrl* ctrl, void* userData);
@@ -67,11 +67,6 @@ public:
/// sync up sliders
void syncMenu();
-
-/*
- void refresh();
-*/
-public:
};
#endif
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index a3e173398f..b1db7bc4f4 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -181,7 +181,7 @@ bool callback_clear_cache(const LLSD& notification, const LLSD& response)
if ( option == 0 ) // YES
{
// flag client texture cache for clearing next time the client runs
- gSavedSettings.setBOOL("PurgeCacheOnNextStartup", TRUE);
+ gSavedSettings.setBOOL("PurgeCacheOnNextStartup", true);
LLNotificationsUtil::add("CacheWillClear");
}
@@ -201,7 +201,7 @@ bool callback_clear_browser_cache(const LLSD& notification, const LLSD& response
LLNavigationBar::getInstance()->clearHistoryCache();
// flag client texture cache for clearing next time the client runs
- gSavedSettings.setBOOL("PurgeCacheOnNextStartup", TRUE);
+ gSavedSettings.setBOOL("PurgeCacheOnNextStartup", true);
LLNotificationsUtil::add("CacheWillClear");
LLSearchHistory::getInstance()->clearHistory();
@@ -428,7 +428,7 @@ void LLFloaterPreference::saveAvatarPropertiesCoro(const std::string cap_url, bo
LL_DEBUGS("Preferences") << "Agent id: " << gAgentID << " Data: " << data << " Result: " << httpResults << LL_ENDL;
}
-BOOL LLFloaterPreference::postBuild()
+bool LLFloaterPreference::postBuild()
{
gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLFloaterIMSessionTab::processChatHistoryStyleUpdate, false));
@@ -438,6 +438,12 @@ BOOL LLFloaterPreference::postBuild()
gSavedSettings.getControl("PreferredMaturity")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeMaturity, this));
+ gSavedSettings.getControl("RenderAvatarComplexityMode")->getSignal()->connect(
+ [this](LLControlVariable* control, const LLSD& new_val, const LLSD& old_val)
+ {
+ onChangeComplexityMode(new_val);
+ });
+
gSavedPerAccountSettings.getControl("ModelUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeModelFolder, this));
gSavedPerAccountSettings.getControl("PBRUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangePBRFolder, this));
gSavedPerAccountSettings.getControl("TextureUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeTextureFolder, this));
@@ -448,11 +454,11 @@ BOOL LLFloaterPreference::postBuild()
if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab")))
tabcontainer->selectFirstTab();
- getChild<LLUICtrl>("cache_location")->setEnabled(FALSE); // make it read-only but selectable (STORM-227)
+ getChild<LLUICtrl>("cache_location")->setEnabled(false); // make it read-only but selectable (STORM-227)
std::string cache_location = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "");
setCacheLocation(cache_location);
- getChild<LLUICtrl>("log_path_string")->setEnabled(FALSE); // make it read-only but selectable
+ getChild<LLUICtrl>("log_path_string")->setEnabled(false); // make it read-only but selectable
getChild<LLComboBox>("language_combobox")->setCommitCallback(boost::bind(&LLFloaterPreference::onLanguageChange, this));
@@ -477,6 +483,9 @@ BOOL LLFloaterPreference::postBuild()
LLSliderCtrl* fov_slider = getChild<LLSliderCtrl>("camera_fov");
fov_slider->setMinValue(LLViewerCamera::getInstance()->getMinView());
fov_slider->setMaxValue(LLViewerCamera::getInstance()->getMaxView());
+
+ bool enable_complexity = gSavedSettings.getS32("RenderAvatarComplexityMode") != LLVOAvatar::AV_RENDER_ONLY_SHOW_FRIENDS;
+ getChild<LLSliderCtrl>("IndirectMaxComplexity")->setEnabled(enable_complexity);
// Hook up and init for filtering
mFilterEdit = getChild<LLSearchEditor>("search_prefs_edit");
@@ -505,7 +514,7 @@ BOOL LLFloaterPreference::postBuild()
getChild<LLComboBox>("language_combobox")->add("System default", LLSD("default"), ADD_TOP, true);
}
- return TRUE;
+ return true;
}
void LLFloaterPreference::updateDeleteTranscriptsButton()
@@ -517,7 +526,7 @@ void LLFloaterPreference::updateDeleteTranscriptsButton()
void LLFloaterPreference::onDoNotDisturbResponseChanged()
{
- // set "DoNotDisturbResponseChanged" TRUE if user edited message differs from default, FALSE otherwise
+ // set "DoNotDisturbResponseChanged" true if user edited message differs from default, false otherwise
bool response_changed_flag =
LLTrans::getString("DoNotDisturbModeResponseDefault")
!= getChild<LLUICtrl>("do_not_disturb_response")->getValue().asString();
@@ -533,7 +542,7 @@ LLFloaterPreference::~LLFloaterPreference()
void LLFloaterPreference::draw()
{
- BOOL has_first_selected = (getChildRef<LLScrollListCtrl>("disabled_popups").getFirstSelected()!=NULL);
+ bool has_first_selected = (getChildRef<LLScrollListCtrl>("disabled_popups").getFirstSelected()!=NULL);
gSavedSettings.setBOOL("FirstSelectedDisabledPopups", has_first_selected);
has_first_selected = (getChildRef<LLScrollListCtrl>("enabled_popups").getFirstSelected()!=NULL);
@@ -588,7 +597,7 @@ void LLFloaterPreference::apply()
LLViewerMedia::getInstance()->setCookiesEnabled(getChild<LLUICtrl>("cookies_enabled")->getValue());
- if (hasChild("web_proxy_enabled", TRUE) &&hasChild("web_proxy_editor", TRUE) && hasChild("web_proxy_port", TRUE))
+ if (hasChild("web_proxy_enabled", true) &&hasChild("web_proxy_editor", true) && hasChild("web_proxy_port", true))
{
bool proxy_enable = getChild<LLUICtrl>("web_proxy_enabled")->getValue();
std::string proxy_address = getChild<LLUICtrl>("web_proxy_editor")->getValue();
@@ -621,7 +630,7 @@ void LLFloaterPreference::apply()
saveAvatarProperties();
}
-void LLFloaterPreference::cancel()
+void LLFloaterPreference::cancel(const std::vector<std::string> settings_to_skip)
{
LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core");
// Call cancel() on all panels that derive from LLPanelPreference
@@ -631,7 +640,7 @@ void LLFloaterPreference::cancel()
LLView* view = *iter;
LLPanelPreference* panel = dynamic_cast<LLPanelPreference*>(view);
if (panel)
- panel->cancel();
+ panel->cancel(settings_to_skip);
}
// hide joystick pref floater
LLFloaterReg::hideInstance("pref_joystick");
@@ -679,7 +688,7 @@ void LLFloaterPreference::onOpen(const LLSD& key)
{
// this variable and if that follows it are used to properly handle do not disturb mode response message
- static bool initialized = FALSE;
+ static bool initialized = false;
// if user is logged in and we haven't initialized do not disturb mode response yet, do it
if (!initialized && LLStartUp::getStartupState() == STATE_STARTED)
{
@@ -688,8 +697,8 @@ void LLFloaterPreference::onOpen(const LLSD& key)
// To keep track of whether do not disturb response is default or changed by user additional setting DoNotDisturbResponseChanged
// was added into per account settings.
- // initialization should happen once,so setting variable to TRUE
- initialized = TRUE;
+ // initialization should happen once,so setting variable to true
+ initialized = true;
// this connection is needed to properly set "DoNotDisturbResponseChanged" setting when user makes changes in
// do not disturb response message.
gSavedPerAccountSettings.getControl("DoNotDisturbModeResponse")->getSignal()->connect(boost::bind(&LLFloaterPreference::onDoNotDisturbResponseChanged, this));
@@ -862,7 +871,7 @@ void LLFloaterPreference::setRecommendedSettings()
void LLFloaterPreference::resetAutotuneSettings()
{
- gSavedSettings.setBOOL("AutoTuneFPS", FALSE);
+ gSavedSettings.setBOOL("AutoTuneFPS", false);
const std::string autotune_settings[] = {
"AutoTuneLock",
@@ -976,12 +985,12 @@ void LLFloaterPreference::onBtnOK(const LLSD& userdata)
}
LLUIColorTable::instance().saveUserSettings();
- gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE);
+ gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), true);
//Only save once logged in and loaded per account settings
if(mGotPersonalInfo)
{
- gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE);
+ gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), true);
}
}
else
@@ -1012,14 +1021,15 @@ void LLFloaterPreference::onBtnCancel(const LLSD& userdata)
}
refresh();
}
- cancel();
-
+
if (userdata.asString() == "closeadvanced")
{
+ cancel({"RenderQualityPerformance"});
LLFloaterReg::hideInstance("prefs_graphics_advanced");
}
else
{
+ cancel();
closeFloater();
}
}
@@ -1231,7 +1241,7 @@ void LLFloaterPreference::refreshEnabledState()
LLCheckBoxCtrl* ctrl_pbr = getChild<LLCheckBoxCtrl>("UsePBRShaders");
//PBR
- ctrl_pbr->setEnabled(TRUE);
+ ctrl_pbr->setEnabled(true);
// Cannot have floater active until caps have been received
getChild<LLButton>("default_creation_permissions")->setEnabled(LLStartUp::getStartupState() < STATE_STARTED ? false : true);
@@ -1324,9 +1334,9 @@ void LLFloaterPreference::onClickEnablePopup()
for (itor = items.begin(); itor != items.end(); ++itor)
{
LLNotificationTemplatePtr templatep = LLNotifications::instance().getTemplate(*(std::string*)((*itor)->getUserdata()));
- //gSavedSettings.setWarning(templatep->mName, TRUE);
+ //gSavedSettings.setWarning(templatep->mName, true);
std::string notification_name = templatep->mName;
- LLUI::getInstance()->mSettingGroups["ignores"]->setBOOL(notification_name, TRUE);
+ LLUI::getInstance()->mSettingGroups["ignores"]->setBOOL(notification_name, true);
}
buildPopupLists();
@@ -1475,28 +1485,28 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility)
if (visibility == VISIBILITY_DEFAULT)
{
mOriginalHideOnlineStatus = false;
- getChildView("online_visibility")->setEnabled(TRUE);
+ getChildView("online_visibility")->setEnabled(true);
}
else if (visibility == VISIBILITY_HIDDEN)
{
mOriginalHideOnlineStatus = true;
- getChildView("online_visibility")->setEnabled(TRUE);
+ getChildView("online_visibility")->setEnabled(true);
}
else
{
mOriginalHideOnlineStatus = true;
}
- getChild<LLUICtrl>("online_searchresults")->setEnabled(TRUE);
- getChildView("friends_online_notify_checkbox")->setEnabled(TRUE);
+ getChild<LLUICtrl>("online_searchresults")->setEnabled(true);
+ getChildView("friends_online_notify_checkbox")->setEnabled(true);
getChild<LLUICtrl>("online_visibility")->setValue(mOriginalHideOnlineStatus);
getChild<LLUICtrl>("online_visibility")->setLabelArg("[DIR_VIS]", mDirectoryVisibility);
- getChildView("favorites_on_login_check")->setEnabled(TRUE);
- getChildView("log_path_button")->setEnabled(TRUE);
- getChildView("chat_font_size")->setEnabled(TRUE);
- getChildView("conversation_log_combo")->setEnabled(TRUE);
- getChild<LLUICtrl>("voice_call_friends_only_check")->setEnabled(TRUE);
+ getChildView("favorites_on_login_check")->setEnabled(true);
+ getChildView("log_path_button")->setEnabled(true);
+ getChildView("chat_font_size")->setEnabled(true);
+ getChildView("conversation_log_combo")->setEnabled(true);
+ getChild<LLUICtrl>("voice_call_friends_only_check")->setEnabled(true);
getChild<LLUICtrl>("voice_call_friends_only_check")->setValue(gSavedPerAccountSettings.getBOOL("VoiceCallsFriendsOnly"));
}
@@ -1628,6 +1638,12 @@ void LLFloaterPreference::onChangeMaturity()
getChild<LLIconCtrl>("rating_icon_adult")->setVisible(sim_access == SIM_ACCESS_ADULT);
}
+void LLFloaterPreference::onChangeComplexityMode(const LLSD& newvalue)
+{
+ bool enable_complexity = newvalue.asInteger() != LLVOAvatar::AV_RENDER_ONLY_SHOW_FRIENDS;
+ getChild<LLSliderCtrl>("IndirectMaxComplexity")->setEnabled(enable_complexity);
+}
+
std::string get_category_path(LLFolderType::EType cat_type)
{
LLUUID cat_id = gInventory.findUserDefinedCategoryUUIDForType(cat_type);
@@ -1744,9 +1760,9 @@ void LLFloaterPreference::onAtmosShaderChange()
if(ctrl_alm)
{
//Deferred/SSAO/Shadows
- BOOL bumpshiny = LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump") && gSavedSettings.getBOOL("RenderObjectBump");
- BOOL shaders = gSavedSettings.getBOOL("WindLightUseAtmosShaders");
- BOOL enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
+ bool bumpshiny = LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump") && gSavedSettings.getBOOL("RenderObjectBump");
+ bool shaders = gSavedSettings.getBOOL("WindLightUseAtmosShaders");
+ bool enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
bumpshiny &&
shaders;
@@ -1960,12 +1976,12 @@ public:
protected:
- BOOL tick()
+ bool tick()
{
mCallback(mNewValue);
mEventTimer.stop();
- return FALSE;
+ return false;
}
private:
@@ -1987,31 +2003,31 @@ LLPanelPreference::LLPanelPreference()
}
//virtual
-BOOL LLPanelPreference::postBuild()
+bool LLPanelPreference::postBuild()
{
////////////////////// PanelGeneral ///////////////////
- if (hasChild("display_names_check", TRUE))
+ if (hasChild("display_names_check", true))
{
- BOOL use_people_api = gSavedSettings.getBOOL("UsePeopleAPI");
+ bool use_people_api = gSavedSettings.getBOOL("UsePeopleAPI");
LLCheckBoxCtrl* ctrl_display_name = getChild<LLCheckBoxCtrl>("display_names_check");
ctrl_display_name->setEnabled(use_people_api);
if (!use_people_api)
{
- ctrl_display_name->setValue(FALSE);
+ ctrl_display_name->setValue(false);
}
}
////////////////////// PanelVoice ///////////////////
- if (hasChild("voice_unavailable", TRUE))
+ if (hasChild("voice_unavailable", true))
{
- BOOL voice_disabled = gSavedSettings.getBOOL("CmdLineDisableVoice");
+ bool voice_disabled = gSavedSettings.getBOOL("CmdLineDisableVoice");
getChildView("voice_unavailable")->setVisible( voice_disabled);
getChildView("enable_voice_check")->setVisible( !voice_disabled);
}
//////////////////////PanelSkins ///////////////////
- if (hasChild("skin_selection", TRUE))
+ if (hasChild("skin_selection", true))
{
LLFloaterPreference::refreshSkin(this);
@@ -2025,32 +2041,32 @@ BOOL LLPanelPreference::postBuild()
}
//////////////////////PanelPrivacy ///////////////////
- if (hasChild("media_enabled", TRUE))
+ if (hasChild("media_enabled", true))
{
bool media_enabled = gSavedSettings.getBOOL("AudioStreamingMedia");
getChild<LLCheckBoxCtrl>("media_enabled")->set(media_enabled);
getChild<LLCheckBoxCtrl>("autoplay_enabled")->setEnabled(media_enabled);
}
- if (hasChild("music_enabled", TRUE))
+ if (hasChild("music_enabled", true))
{
getChild<LLCheckBoxCtrl>("music_enabled")->set(gSavedSettings.getBOOL("AudioStreamingMusic"));
}
- if (hasChild("voice_call_friends_only_check", TRUE))
+ if (hasChild("voice_call_friends_only_check", true))
{
getChild<LLCheckBoxCtrl>("voice_call_friends_only_check")->setCommitCallback(boost::bind(&showFriendsOnlyWarning, _1, _2));
}
- if (hasChild("allow_multiple_viewer_check", TRUE))
+ if (hasChild("allow_multiple_viewer_check", true))
{
getChild<LLCheckBoxCtrl>("allow_multiple_viewer_check")->setCommitCallback(boost::bind(&showMultipleViewersWarning, _1, _2));
}
- if (hasChild("favorites_on_login_check", TRUE))
+ if (hasChild("favorites_on_login_check", true))
{
getChild<LLCheckBoxCtrl>("favorites_on_login_check")->setCommitCallback(boost::bind(&handleFavoritesOnLoginChanged, _1, _2));
bool show_favorites_at_login = LLPanelLogin::getShowFavorites();
getChild<LLCheckBoxCtrl>("favorites_on_login_check")->setValue(show_favorites_at_login);
}
- if (hasChild("mute_chb_label", TRUE))
+ if (hasChild("mute_chb_label", true))
{
getChild<LLTextBox>("mute_chb_label")->setShowCursorHand(false);
getChild<LLTextBox>("mute_chb_label")->setSoundFlags(LLView::MOUSE_UP);
@@ -2058,7 +2074,7 @@ BOOL LLPanelPreference::postBuild()
}
//////////////////////PanelSetup ///////////////////
- if (hasChild("max_bandwidth", TRUE))
+ if (hasChild("max_bandwidth", true))
{
mBandWidthUpdater = new LLPanelPreference::Updater(boost::bind(&handleBandwidthChanged, _1), BANDWIDTH_UPDATER_TIMEOUT);
gSavedSettings.getControl("ThrottleBandwidthKBPS")->getSignal()->connect(boost::bind(&LLPanelPreference::Updater::update, mBandWidthUpdater, _2));
@@ -2187,7 +2203,7 @@ void LLPanelPreference::toggleMuteWhenMinimized()
}
}
-void LLPanelPreference::cancel()
+void LLPanelPreference::cancel(const std::vector<std::string> settings_to_skip)
{
for (control_values_map_t::iterator iter = mSavedValues.begin();
iter != mSavedValues.end(); ++iter)
@@ -2200,6 +2216,12 @@ void LLPanelPreference::cancel()
continue;
}
+ auto found = std::find(settings_to_skip.begin(), settings_to_skip.end(), control->getName());
+ if (found != settings_to_skip.end())
+ {
+ continue;
+ }
+
control->set(ctrl_value);
}
@@ -2221,7 +2243,7 @@ void LLPanelPreference::setControlFalse(const LLSD& user_data)
LLControlVariable* control = findControl(control_name);
if (control)
- control->set(LLSD(FALSE));
+ control->set(LLSD(false));
}
void LLPanelPreference::updateMediaAutoPlayCheckbox(LLUICtrl* ctrl)
@@ -2298,7 +2320,7 @@ private:
static LLPanelInjector<LLPanelPreferenceGraphics> t_pref_graph("panel_preference_graphics");
static LLPanelInjector<LLPanelPreferencePrivacy> t_pref_privacy("panel_preference_privacy");
-BOOL LLPanelPreferenceGraphics::postBuild()
+bool LLPanelPreferenceGraphics::postBuild()
{
LLFloaterReg::showInstance("prefs_graphics_advanced");
LLFloaterReg::hideInstance("prefs_graphics_advanced");
@@ -2442,9 +2464,9 @@ void LLPanelPreferenceGraphics::resetDirtyChilds()
}
}
-void LLPanelPreferenceGraphics::cancel()
+void LLPanelPreferenceGraphics::cancel(const std::vector<std::string> settings_to_skip)
{
- LLPanelPreference::cancel();
+ LLPanelPreference::cancel(settings_to_skip);
}
void LLPanelPreferenceGraphics::saveSettings()
{
@@ -2485,7 +2507,7 @@ LLPanelPreferenceControls::~LLPanelPreferenceControls()
{
}
-BOOL LLPanelPreferenceControls::postBuild()
+bool LLPanelPreferenceControls::postBuild()
{
// populate list of controls
pControlsTable = getChild<LLScrollListCtrl>("controls_list");
@@ -2495,7 +2517,7 @@ BOOL LLPanelPreferenceControls::postBuild()
pKeyModeBox->setCommitCallback(boost::bind(&LLPanelPreferenceControls::onModeCommit, this));
getChild<LLButton>("restore_defaults")->setCommitCallback(boost::bind(&LLPanelPreferenceControls::onRestoreDefaultsBtn, this));
- return TRUE;
+ return true;
}
void LLPanelPreferenceControls::regenerateControls()
@@ -2732,7 +2754,7 @@ void LLPanelPreferenceControls::apply()
}
}
-void LLPanelPreferenceControls::cancel()
+void LLPanelPreferenceControls::cancel(const std::vector<std::string> settings_to_skip)
{
for (U32 i = 0; i < LLKeyConflictHandler::MODE_COUNT - 1; ++i)
{
@@ -2821,7 +2843,7 @@ void LLPanelPreferenceControls::onListCommit()
if (root_floater)
root_floater->addDependentFloater(dialog);
dialog->openFloater();
- dialog->setFocus(TRUE);
+ dialog->setFocus(true);
}
}
else
@@ -3087,12 +3109,12 @@ LLFloaterPreferenceProxy::~LLFloaterPreferenceProxy()
{
}
-BOOL LLFloaterPreferenceProxy::postBuild()
+bool LLFloaterPreferenceProxy::postBuild()
{
LLRadioGroup* socksAuth = getChild<LLRadioGroup>("socks5_auth_type");
if (!socksAuth)
{
- return FALSE;
+ return false;
}
if (socksAuth->getSelectedValue().asString() == "None")
{
@@ -3107,7 +3129,7 @@ BOOL LLFloaterPreferenceProxy::postBuild()
getChild<LLLineEditor>("socks5_password")->setValue(socks_cred->getAuthenticator()["creds"].asString());
}
- return TRUE;
+ return true;
}
void LLFloaterPreferenceProxy::onOpen(const LLSD& key)
@@ -3259,9 +3281,9 @@ void LLFloaterPreferenceProxy::onChangeSocksSettings()
// Check for invalid states for the other HTTP proxy radio
LLRadioGroup* otherHttpProxy = getChild<LLRadioGroup>("other_http_proxy_type");
if ((otherHttpProxy->getSelectedValue().asString() == "Socks" &&
- getChild<LLCheckBoxCtrl>("socks_proxy_enabled")->get() == FALSE )||(
+ getChild<LLCheckBoxCtrl>("socks_proxy_enabled")->get() == false )||(
otherHttpProxy->getSelectedValue().asString() == "Web" &&
- getChild<LLCheckBoxCtrl>("web_proxy_enabled")->get() == FALSE ) )
+ getChild<LLCheckBoxCtrl>("web_proxy_enabled")->get() == false ) )
{
otherHttpProxy->selectFirstItem();
}
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 04ac87364d..c6891c61aa 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -79,9 +79,9 @@ public:
~LLFloaterPreference();
void apply();
- void cancel();
+ void cancel(const std::vector<std::string> settings_to_skip = {});
/*virtual*/ void draw();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ void onClose(bool app_quitting);
/*virtual*/ void changed();
@@ -164,7 +164,6 @@ public:
void onClickLogPath();
void changeLogPath(const std::vector<std::string>& filenames, std::string proposed_name);
bool moveTranscriptsAndLog();
- void enableHistory();
void setPersonalInfo(const std::string& visibility);
void refreshEnabledState();
void onCommitWindowedMode();
@@ -174,10 +173,8 @@ public:
void refreshUI();
- void onCommitMediaEnabled();
- void onCommitMusicEnabled();
- void applyResolution();
void onChangeMaturity();
+ void onChangeComplexityMode(const LLSD& newvalue);
void onChangeModelFolder();
void onChangePBRFolder();
void onChangeTextureFolder();
@@ -199,7 +196,6 @@ public:
void buildPopupLists();
static void refreshSkin(void* data);
void selectPanel(const LLSD& name);
- void saveCameraPreset(std::string& preset);
void saveGraphicsPreset(std::string& preset);
void setRecommendedSettings();
@@ -246,12 +242,12 @@ class LLPanelPreference : public LLPanel
{
public:
LLPanelPreference();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
virtual ~LLPanelPreference();
virtual void apply();
- virtual void cancel();
+ virtual void cancel(const std::vector<std::string> settings_to_skip = {});
void setControlFalse(const LLSD& user_data);
virtual void setHardwareDefaults();
@@ -292,16 +288,14 @@ private:
class LLPanelPreferenceGraphics : public LLPanelPreference
{
public:
- BOOL postBuild();
+ bool postBuild();
void draw();
- void cancel();
+ void cancel(const std::vector<std::string> settings_to_skip = {});
void saveSettings();
void resetDirtyChilds();
void setHardwareDefaults();
void setPresetText();
- static const std::string getPresetsPath();
-
protected:
bool hasDirtyChilds();
@@ -317,10 +311,10 @@ public:
LLPanelPreferenceControls();
virtual ~LLPanelPreferenceControls();
- BOOL postBuild();
+ bool postBuild();
void apply();
- void cancel();
+ void cancel(const std::vector<std::string> settings_to_skip = {});
void saveSettings();
void resetDirtyChilds();
@@ -388,7 +382,7 @@ public:
void cancel();
protected:
- BOOL postBuild();
+ bool postBuild();
void onOpen(const LLSD& key);
void onClose(bool app_quitting);
void saveSettings();
diff --git a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
index a91f0ec060..6741dbb7e4 100644
--- a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
+++ b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
@@ -51,17 +51,17 @@ LLFloaterPreferenceGraphicsAdvanced::LLFloaterPreferenceGraphicsAdvanced(const L
mCommitCallbackRegistrar.add("Pref.Cancel", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::onBtnCancel, this, _2));
mCommitCallbackRegistrar.add("Pref.OK", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::onBtnOK, this, _2));
-
- gSavedSettings.getControl("RenderAvatarMaxNonImpostors")->getSignal()->connect(boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateIndirectMaxNonImpostors, this, _2));
}
LLFloaterPreferenceGraphicsAdvanced::~LLFloaterPreferenceGraphicsAdvanced()
{
mComplexityChangedSignal.disconnect();
+ mComplexityModeChangedSignal.disconnect();
mLODFactorChangedSignal.disconnect();
+ mNumImpostorsChangedSignal.disconnect();
}
-BOOL LLFloaterPreferenceGraphicsAdvanced::postBuild()
+bool LLFloaterPreferenceGraphicsAdvanced::postBuild()
{
// Don't do this on Mac as their braindead GL versioning
// sets this when 8x and 16x are indeed available
@@ -75,12 +75,30 @@ BOOL LLFloaterPreferenceGraphicsAdvanced::postBuild()
}
LLCheckBoxCtrl *use_HiDPI = getChild<LLCheckBoxCtrl>("use HiDPI");
- use_HiDPI->setVisible(FALSE);
+ use_HiDPI->setVisible(false);
#endif
- mComplexityChangedSignal = gSavedSettings.getControl("RenderAvatarMaxComplexity")->getCommitSignal()->connect(boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateComplexityText, this));
- mLODFactorChangedSignal = gSavedSettings.getControl("RenderVolumeLODFactor")->getCommitSignal()->connect(boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateObjectMeshDetailText, this));
- return TRUE;
+ mComplexityChangedSignal = gSavedSettings.getControl("RenderAvatarMaxComplexity")->getCommitSignal()->connect(
+ [this](LLControlVariable* control, const LLSD& new_val, const LLSD& old_val)
+ {
+ updateComplexityText();
+ });
+ mComplexityModeChangedSignal = gSavedSettings.getControl("RenderAvatarComplexityMode")->getSignal()->connect(
+ [this](LLControlVariable* control, const LLSD& new_val, const LLSD& old_val)
+ {
+ updateComplexityMode(new_val);
+ });
+ mLODFactorChangedSignal = gSavedSettings.getControl("RenderVolumeLODFactor")->getCommitSignal()->connect(
+ [this](LLControlVariable* control, const LLSD& new_val, const LLSD& old_val)
+ {
+ updateObjectMeshDetailText();
+ });
+ mNumImpostorsChangedSignal = gSavedSettings.getControl("RenderAvatarMaxNonImpostors")->getSignal()->connect(
+ [this](LLControlVariable* control, const LLSD& new_val, const LLSD& old_val)
+ {
+ updateIndirectMaxNonImpostors(new_val);
+ });
+ return true;
}
void LLFloaterPreferenceGraphicsAdvanced::onOpen(const LLSD& key)
@@ -93,7 +111,7 @@ void LLFloaterPreferenceGraphicsAdvanced::onClickCloseBtn(bool app_quitting)
LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
if (instance)
{
- instance->cancel();
+ instance->cancel({"RenderQualityPerformance"});
}
updateMaxComplexity();
}
@@ -144,6 +162,10 @@ void LLFloaterPreferenceGraphicsAdvanced::refresh()
gSavedSettings.getU32("RenderAvatarMaxComplexity"),
getChild<LLTextBox>("IndirectMaxComplexityText", true));
refreshEnabledState();
+
+ bool enable_complexity = gSavedSettings.getS32("RenderAvatarComplexityMode") != LLVOAvatar::AV_RENDER_ONLY_SHOW_FRIENDS;
+ getChild<LLSliderCtrl>("IndirectMaxComplexity")->setEnabled(enable_complexity);
+ getChild<LLSliderCtrl>("IndirectMaxNonImpostors")->setEnabled(enable_complexity);
}
void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledGraphics()
@@ -159,6 +181,13 @@ void LLFloaterPreferenceGraphicsAdvanced::updateMaxComplexity()
getChild<LLTextBox>("IndirectMaxComplexityText"));
}
+void LLFloaterPreferenceGraphicsAdvanced::updateComplexityMode(const LLSD& newvalue)
+{
+ bool enable_complexity = newvalue.asInteger() != LLVOAvatar::AV_RENDER_ONLY_SHOW_FRIENDS;
+ getChild<LLSliderCtrl>("IndirectMaxComplexity")->setEnabled(enable_complexity);
+ getChild<LLSliderCtrl>("IndirectMaxNonImpostors")->setEnabled(enable_complexity);
+}
+
void LLFloaterPreferenceGraphicsAdvanced::updateComplexityText()
{
LLAvatarComplexityControls::setText(gSavedSettings.getU32("RenderAvatarMaxComplexity"),
@@ -255,96 +284,96 @@ void LLFloaterPreferenceGraphicsAdvanced::disableUnavailableSettings()
// disabled windlight
if (!LLFeatureManager::getInstance()->isFeatureAvailable("WindLightUseAtmosShaders"))
{
- ctrl_wind_light->setEnabled(FALSE);
- ctrl_wind_light->setValue(FALSE);
+ ctrl_wind_light->setEnabled(false);
+ ctrl_wind_light->setValue(false);
- sky->setEnabled(FALSE);
- sky_text->setEnabled(FALSE);
+ sky->setEnabled(false);
+ sky_text->setEnabled(false);
//deferred needs windlight, disable deferred
- ctrl_shadows->setEnabled(FALSE);
+ ctrl_shadows->setEnabled(false);
ctrl_shadows->setValue(0);
- shadows_text->setEnabled(FALSE);
+ shadows_text->setEnabled(false);
- ctrl_ssao->setEnabled(FALSE);
- ctrl_ssao->setValue(FALSE);
+ ctrl_ssao->setEnabled(false);
+ ctrl_ssao->setValue(false);
- ctrl_dof->setEnabled(FALSE);
- ctrl_dof->setValue(FALSE);
+ ctrl_dof->setEnabled(false);
+ ctrl_dof->setValue(false);
- ctrl_deferred->setEnabled(FALSE);
- ctrl_deferred->setValue(FALSE);
+ ctrl_deferred->setEnabled(false);
+ ctrl_deferred->setValue(false);
}
// disabled deferred
if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred"))
{
- ctrl_shadows->setEnabled(FALSE);
+ ctrl_shadows->setEnabled(false);
ctrl_shadows->setValue(0);
- shadows_text->setEnabled(FALSE);
+ shadows_text->setEnabled(false);
- ctrl_ssao->setEnabled(FALSE);
- ctrl_ssao->setValue(FALSE);
+ ctrl_ssao->setEnabled(false);
+ ctrl_ssao->setValue(false);
- ctrl_dof->setEnabled(FALSE);
- ctrl_dof->setValue(FALSE);
+ ctrl_dof->setEnabled(false);
+ ctrl_dof->setValue(false);
- ctrl_deferred->setEnabled(FALSE);
- ctrl_deferred->setValue(FALSE);
+ ctrl_deferred->setEnabled(false);
+ ctrl_deferred->setValue(false);
}
// disabled deferred SSAO
if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO"))
{
- ctrl_ssao->setEnabled(FALSE);
- ctrl_ssao->setValue(FALSE);
+ ctrl_ssao->setEnabled(false);
+ ctrl_ssao->setValue(false);
}
// disabled deferred shadows
if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderShadowDetail"))
{
- ctrl_shadows->setEnabled(FALSE);
+ ctrl_shadows->setEnabled(false);
ctrl_shadows->setValue(0);
- shadows_text->setEnabled(FALSE);
+ shadows_text->setEnabled(false);
}
// disabled reflections
if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderReflectionDetail"))
{
- ctrl_reflections->setEnabled(FALSE);
- ctrl_reflections->setValue(FALSE);
- reflections_text->setEnabled(FALSE);
+ ctrl_reflections->setEnabled(false);
+ ctrl_reflections->setValue(false);
+ reflections_text->setEnabled(false);
}
// disabled av
if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderAvatarVP"))
{
- ctrl_avatar_vp->setEnabled(FALSE);
- ctrl_avatar_vp->setValue(FALSE);
+ ctrl_avatar_vp->setEnabled(false);
+ ctrl_avatar_vp->setValue(false);
- ctrl_avatar_cloth->setEnabled(FALSE);
- ctrl_avatar_cloth->setValue(FALSE);
+ ctrl_avatar_cloth->setEnabled(false);
+ ctrl_avatar_cloth->setValue(false);
//deferred needs AvatarVP, disable deferred
- ctrl_shadows->setEnabled(FALSE);
+ ctrl_shadows->setEnabled(false);
ctrl_shadows->setValue(0);
- shadows_text->setEnabled(FALSE);
+ shadows_text->setEnabled(false);
- ctrl_ssao->setEnabled(FALSE);
- ctrl_ssao->setValue(FALSE);
+ ctrl_ssao->setEnabled(false);
+ ctrl_ssao->setValue(false);
- ctrl_dof->setEnabled(FALSE);
- ctrl_dof->setValue(FALSE);
+ ctrl_dof->setEnabled(false);
+ ctrl_dof->setValue(false);
- ctrl_deferred->setEnabled(FALSE);
- ctrl_deferred->setValue(FALSE);
+ ctrl_deferred->setEnabled(false);
+ ctrl_deferred->setValue(false);
}
// disabled cloth
if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderAvatarCloth"))
{
- ctrl_avatar_cloth->setEnabled(FALSE);
- ctrl_avatar_cloth->setValue(FALSE);
+ ctrl_avatar_cloth->setEnabled(false);
+ ctrl_avatar_cloth->setValue(false);
}
}
@@ -354,14 +383,14 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
LLTextBox* reflections_text = getChild<LLTextBox>("ReflectionsText");
// Reflections
- BOOL reflections = LLCubeMap::sUseCubeMaps;
+ bool reflections = LLCubeMap::sUseCubeMaps;
ctrl_reflections->setEnabled(reflections);
reflections_text->setEnabled(reflections);
// Bump & Shiny
LLCheckBoxCtrl* bumpshiny_ctrl = getChild<LLCheckBoxCtrl>("BumpShiny");
bool bumpshiny = LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump");
- bumpshiny_ctrl->setEnabled(bumpshiny ? TRUE : FALSE);
+ bumpshiny_ctrl->setEnabled(bumpshiny ? true : false);
// Avatar Mode
// Enable Avatar Shaders
@@ -373,18 +402,18 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
if (LLViewerShaderMgr::sInitialized)
{
S32 max_avatar_shader = LLViewerShaderMgr::instance()->mMaxAvatarShaderLevel;
- avatar_vp_enabled = (max_avatar_shader > 0) ? TRUE : FALSE;
+ avatar_vp_enabled = (max_avatar_shader > 0) ? true : false;
}
ctrl_avatar_vp->setEnabled(avatar_vp_enabled);
- if (gSavedSettings.getBOOL("RenderAvatarVP") == FALSE)
+ if (gSavedSettings.getBOOL("RenderAvatarVP") == false)
{
- ctrl_avatar_cloth->setEnabled(FALSE);
+ ctrl_avatar_cloth->setEnabled(false);
}
else
{
- ctrl_avatar_cloth->setEnabled(TRUE);
+ ctrl_avatar_cloth->setEnabled(true);
}
// Vertex Shaders, Global Shader Enable
@@ -392,25 +421,25 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
LLSliderCtrl* terrain_detail = getChild<LLSliderCtrl>("TerrainDetail"); // can be linked with control var
LLTextBox* terrain_text = getChild<LLTextBox>("TerrainDetailText");
- terrain_detail->setEnabled(FALSE);
- terrain_text->setEnabled(FALSE);
+ terrain_detail->setEnabled(false);
+ terrain_text->setEnabled(false);
// WindLight
//LLCheckBoxCtrl* ctrl_wind_light = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
- //ctrl_wind_light->setEnabled(TRUE);
+ //ctrl_wind_light->setEnabled(true);
LLSliderCtrl* sky = getChild<LLSliderCtrl>("SkyMeshDetail");
LLTextBox* sky_text = getChild<LLTextBox>("SkyMeshDetailText");
- sky->setEnabled(TRUE);
- sky_text->setEnabled(TRUE);
+ sky->setEnabled(true);
+ sky_text->setEnabled(true);
- BOOL enabled = TRUE;
+ bool enabled = true;
#if 0 // deferred always on now
//Deferred/SSAO/Shadows
LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
- ((bumpshiny_ctrl && bumpshiny_ctrl->get()) ? TRUE : FALSE) &&
- (ctrl_wind_light->get()) ? TRUE : FALSE;
+ ((bumpshiny_ctrl && bumpshiny_ctrl->get()) ? true : false) &&
+ (ctrl_wind_light->get()) ? true : false;
ctrl_deferred->setEnabled(enabled);
#endif
@@ -418,7 +447,7 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
LLCheckBoxCtrl* ctrl_pbr = getChild<LLCheckBoxCtrl>("UsePBRShaders");
//PBR
- ctrl_pbr->setEnabled(TRUE);
+ ctrl_pbr->setEnabled(true);
LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO");
LLCheckBoxCtrl* ctrl_dof = getChild<LLCheckBoxCtrl>("UseDoF");
@@ -426,7 +455,7 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
LLTextBox* shadow_text = getChild<LLTextBox>("RenderShadowDetailText");
// note, okay here to get from ctrl_deferred as it's twin, ctrl_deferred2 will alway match it
- enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO");// && (ctrl_deferred->get() ? TRUE : FALSE);
+ enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO");// && (ctrl_deferred->get() ? true : false);
//ctrl_deferred->set(gSavedSettings.getBOOL("RenderDeferred"));
@@ -442,12 +471,12 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderVBOEnable"))
{
- getChildView("vbo")->setEnabled(FALSE);
+ getChildView("vbo")->setEnabled(false);
}
if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderCompressTextures"))
{
- getChildView("texture compression")->setEnabled(FALSE);
+ getChildView("texture compression")->setEnabled(false);
}
// if no windlight shaders, turn off nighttime brightness, gamma, and fog distance
diff --git a/indra/newview/llfloaterpreferencesgraphicsadvanced.h b/indra/newview/llfloaterpreferencesgraphicsadvanced.h
index 2c92f3dbf1..8791bdce19 100644
--- a/indra/newview/llfloaterpreferencesgraphicsadvanced.h
+++ b/indra/newview/llfloaterpreferencesgraphicsadvanced.h
@@ -37,7 +37,7 @@ class LLFloaterPreferenceGraphicsAdvanced : public LLFloater
public:
LLFloaterPreferenceGraphicsAdvanced(const LLSD& key);
~LLFloaterPreferenceGraphicsAdvanced();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
void onOpen(const LLSD& key);
void onClickCloseBtn(bool app_quitting);
void disableUnavailableSettings();
@@ -48,6 +48,7 @@ public:
void updateIndirectMaxNonImpostors(const LLSD& newvalue);
void setMaxNonImpostorsText(U32 value, LLTextBox* text_box);
void updateMaxComplexity();
+ void updateComplexityMode(const LLSD& newvalue);
void updateComplexityText();
void updateObjectMeshDetailText();
void refresh();
@@ -61,7 +62,9 @@ protected:
void onBtnCancel(const LLSD& userdata);
boost::signals2::connection mComplexityChangedSignal;
+ boost::signals2::connection mComplexityModeChangedSignal;
boost::signals2::connection mLODFactorChangedSignal;
+ boost::signals2::connection mNumImpostorsChangedSignal;
};
#endif //LLFLOATERPREFERENCEGRAPHICSADVANCED_H
diff --git a/indra/newview/llfloaterpreviewtrash.cpp b/indra/newview/llfloaterpreviewtrash.cpp
index cf4e3f04e6..bd50a6b821 100644
--- a/indra/newview/llfloaterpreviewtrash.cpp
+++ b/indra/newview/llfloaterpreviewtrash.cpp
@@ -37,7 +37,7 @@ LLFloaterPreviewTrash::LLFloaterPreviewTrash(const LLSD& key)
{
}
-BOOL LLFloaterPreviewTrash::postBuild()
+bool LLFloaterPreviewTrash::postBuild()
{
getChild<LLUICtrl>("empty_btn")->setCommitCallback(
boost::bind(&LLFloaterPreviewTrash::onClickEmpty, this));
@@ -49,7 +49,7 @@ BOOL LLFloaterPreviewTrash::postBuild()
// mid-session and the saved rect is off-center.
center();
- return TRUE;
+ return true;
}
LLFloaterPreviewTrash::~LLFloaterPreviewTrash()
@@ -60,7 +60,7 @@ LLFloaterPreviewTrash::~LLFloaterPreviewTrash()
// static
void LLFloaterPreviewTrash::show()
{
- LLFloaterReg::showTypedInstance<LLFloaterPreviewTrash>("preview_trash", LLSD(), TRUE);
+ LLFloaterReg::showTypedInstance<LLFloaterPreviewTrash>("preview_trash", LLSD(), true);
}
// static
diff --git a/indra/newview/llfloaterpreviewtrash.h b/indra/newview/llfloaterpreviewtrash.h
index 465c0c677f..ec071931a5 100644
--- a/indra/newview/llfloaterpreviewtrash.h
+++ b/indra/newview/llfloaterpreviewtrash.h
@@ -39,7 +39,7 @@ public:
LLFloaterPreviewTrash(const LLSD& key);
~LLFloaterPreviewTrash();
- /*virtual*/ BOOL postBuild();
+ bool postBuild() override;
protected:
void onClickEmpty();
diff --git a/indra/newview/llfloaterprofile.cpp b/indra/newview/llfloaterprofile.cpp
index 6ccdace6c5..33d5114c98 100644
--- a/indra/newview/llfloaterprofile.cpp
+++ b/indra/newview/llfloaterprofile.cpp
@@ -59,11 +59,11 @@ void LLFloaterProfile::onOpen(const LLSD& key)
mNameCallbackConnection = LLAvatarNameCache::get(mAvatarId, boost::bind(&LLFloaterProfile::onAvatarNameCache, this, _1, _2));
}
-BOOL LLFloaterProfile::postBuild()
+bool LLFloaterProfile::postBuild()
{
mPanelProfile = findChild<LLPanelProfile>(PANEL_PROFILE_VIEW);
- return TRUE;
+ return true;
}
void LLFloaterProfile::onClickCloseBtn(bool app_quitting)
diff --git a/indra/newview/llfloaterprofile.h b/indra/newview/llfloaterprofile.h
index b3ed02fc2c..20c82c07b1 100644
--- a/indra/newview/llfloaterprofile.h
+++ b/indra/newview/llfloaterprofile.h
@@ -40,7 +40,7 @@ public:
LLFloaterProfile(const LLSD& key);
virtual ~LLFloaterProfile();
- BOOL postBuild() override;
+ bool postBuild() override;
void onOpen(const LLSD& key) override;
void onClickCloseBtn(bool app_quitting = false) override;
diff --git a/indra/newview/llfloaterprofiletexture.cpp b/indra/newview/llfloaterprofiletexture.cpp
index ec2e627165..2217e81302 100644
--- a/indra/newview/llfloaterprofiletexture.cpp
+++ b/indra/newview/llfloaterprofiletexture.cpp
@@ -41,7 +41,7 @@
LLFloaterProfileTexture::LLFloaterProfileTexture(LLView* owner)
: LLFloater(LLSD())
- , mUpdateDimensions(TRUE)
+ , mUpdateDimensions(true)
, mLastHeight(0)
, mLastWidth(0)
, mImage(NULL)
@@ -63,18 +63,18 @@ LLFloaterProfileTexture::~LLFloaterProfileTexture()
}
// virtual
-BOOL LLFloaterProfileTexture::postBuild()
+bool LLFloaterProfileTexture::postBuild()
{
mProfileIcon = getChild<LLIconCtrl>("profile_pic");
mCloseButton = getChild<LLButton>("close_btn");
mCloseButton->setCommitCallback([this](LLUICtrl*, void*) { closeFloater(); }, nullptr);
- return TRUE;
+ return true;
}
// virtual
-void LLFloaterProfileTexture::reshape(S32 width, S32 height, BOOL called_from_parent)
+void LLFloaterProfileTexture::reshape(S32 width, S32 height, bool called_from_parent)
{
LLFloater::reshape(width, height, called_from_parent);
}
@@ -101,7 +101,7 @@ void LLFloaterProfileTexture::updateDimensions()
{
mAssetStatus = LLPreview::PREVIEW_ASSET_LOADED;
// Asset has been fully loaded
- mUpdateDimensions = TRUE;
+ mUpdateDimensions = true;
}
mLastHeight = img_height;
@@ -110,7 +110,7 @@ void LLFloaterProfileTexture::updateDimensions()
// Reshape the floater only when required
if (mUpdateDimensions)
{
- mUpdateDimensions = FALSE;
+ mUpdateDimensions = false;
LLRect old_floater_rect = getRect();
LLRect old_image_rect = mProfileIcon->getRect();
@@ -130,7 +130,7 @@ void LLFloaterProfileTexture::updateDimensions()
//reshape floater
reshape(width, height);
- gFloaterView->adjustToFitScreen(this, FALSE);
+ gFloaterView->adjustToFitScreen(this, false);
}
}
@@ -182,7 +182,7 @@ void LLFloaterProfileTexture::loadAsset(const LLUUID &image_id)
if ((mImage->getFullWidth() * mImage->getFullHeight()) == 0)
{
mImage->setLoadedCallback(LLFloaterProfileTexture::onTextureLoaded,
- 0, TRUE, FALSE, new LLHandle<LLFloater>(getHandle()), &mCallbackTextureList);
+ 0, true, false, new LLHandle<LLFloater>(getHandle()), &mCallbackTextureList);
mImage->setBoostLevel(LLGLTexture::BOOST_PREVIEW);
mAssetStatus = LLPreview::PREVIEW_ASSET_LOADING;
@@ -192,18 +192,18 @@ void LLFloaterProfileTexture::loadAsset(const LLUUID &image_id)
mAssetStatus = LLPreview::PREVIEW_ASSET_LOADED;
}
- mUpdateDimensions = TRUE;
+ mUpdateDimensions = true;
updateDimensions();
}
// static
void LLFloaterProfileTexture::onTextureLoaded(
- BOOL success,
+ bool success,
LLViewerFetchedTexture *src_vi,
LLImageRaw* src,
LLImageRaw* aux_src,
S32 discard_level,
- BOOL final,
+ bool final,
void* userdata)
{
LLHandle<LLFloater>* handle = (LLHandle<LLFloater>*)userdata;
@@ -213,7 +213,7 @@ void LLFloaterProfileTexture::onTextureLoaded(
LLFloaterProfileTexture* floater = static_cast<LLFloaterProfileTexture*>(handle->get());
if (floater && success)
{
- floater->mUpdateDimensions = TRUE;
+ floater->mUpdateDimensions = true;
floater->updateDimensions();
}
}
diff --git a/indra/newview/llfloaterprofiletexture.h b/indra/newview/llfloaterprofiletexture.h
index 66a61213dd..10ab201695 100644
--- a/indra/newview/llfloaterprofiletexture.h
+++ b/indra/newview/llfloaterprofiletexture.h
@@ -48,17 +48,17 @@ public:
static void onTextureLoaded(
- BOOL success,
+ bool success,
LLViewerFetchedTexture *src_vi,
LLImageRaw* src,
LLImageRaw* aux_src,
S32 discard_level,
- BOOL final,
+ bool final,
void* userdata);
- void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE) override;
+ void reshape(S32 width, S32 height, bool called_from_parent = true) override;
protected:
- BOOL postBuild() override;
+ bool postBuild() override;
private:
void updateDimensions();
@@ -70,7 +70,7 @@ private:
F32 mContextConeOpacity;
S32 mLastHeight;
S32 mLastWidth;
- BOOL mUpdateDimensions;
+ bool mUpdateDimensions;
LLHandle<LLView> mOwnerHandle;
LLIconCtrl* mProfileIcon;
diff --git a/indra/newview/llfloaterregiondebugconsole.cpp b/indra/newview/llfloaterregiondebugconsole.cpp
index e817589622..1e3be4ce71 100644
--- a/indra/newview/llfloaterregiondebugconsole.cpp
+++ b/indra/newview/llfloaterregiondebugconsole.cpp
@@ -106,7 +106,7 @@ LLFloaterRegionDebugConsole::~LLFloaterRegionDebugConsole()
mReplySignalConnection.disconnect();
}
-BOOL LLFloaterRegionDebugConsole::postBuild()
+bool LLFloaterRegionDebugConsole::postBuild()
{
LLLineEditor* input = getChild<LLLineEditor>("region_debug_console_input");
input->setEnableLineHistory(true);
@@ -126,12 +126,12 @@ BOOL LLFloaterRegionDebugConsole::postBuild()
mOutput->appendText(
CONSOLE_NOT_SUPPORTED + PROMPT,
false);
- return TRUE;
+ return true;
}
}
mOutput->appendText("> ", false);
- return TRUE;
+ return true;
}
void LLFloaterRegionDebugConsole::onInput(LLUICtrl* ctrl, const LLSD& param)
diff --git a/indra/newview/llfloaterregiondebugconsole.h b/indra/newview/llfloaterregiondebugconsole.h
index f55d964924..05b6f7d356 100644
--- a/indra/newview/llfloaterregiondebugconsole.h
+++ b/indra/newview/llfloaterregiondebugconsole.h
@@ -43,8 +43,7 @@ public:
LLFloaterRegionDebugConsole(LLSD const & key);
virtual ~LLFloaterRegionDebugConsole();
- // virtual
- BOOL postBuild();
+ bool postBuild() override;
void onInput(LLUICtrl* ctrl, const LLSD& param);
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 187ac9d323..4105cf0d10 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -62,6 +62,7 @@
#include "llfloaterreg.h"
#include "llfloaterregiondebugconsole.h"
#include "llfloatertelehub.h"
+#include "llgltfmateriallist.h"
#include "llinventorymodel.h"
#include "lllineeditor.h"
#include "llnamelistctrl.h"
@@ -86,7 +87,6 @@
#include "llviewerstats.h"
#include "llviewertexteditor.h"
#include "llviewerwindow.h"
-#include "llvlcomposition.h"
#include "lltrans.h"
#include "llagentui.h"
#include "llmeshrepository.h"
@@ -100,7 +100,6 @@
#include "llavatarnamecache.h"
#include "llenvironment.h"
-const S32 TERRAIN_TEXTURE_COUNT = 4;
const S32 CORNER_COUNT = 4;
const U32 MAX_LISTED_NAMES = 100;
@@ -196,7 +195,7 @@ public:
bool refreshFromRegion(LLViewerRegion* region);
- virtual BOOL postBuild() override;
+ virtual bool postBuild() override;
virtual void onOpen(const LLSD& key) override {};
virtual S32 getParcelId() override { return INVALID_PARCEL_ID; }
@@ -234,7 +233,7 @@ LLFloaterRegionInfo::LLFloaterRegionInfo(const LLSD& seed)
mRegionChangedCallback()
{}
-BOOL LLFloaterRegionInfo::postBuild()
+bool LLFloaterRegionInfo::postBuild()
{
mTab = getChild<LLTabContainer>("region_panels");
mTab->setCommitCallback(boost::bind(&LLFloaterRegionInfo::onTabSelected, this, _2));
@@ -279,7 +278,7 @@ BOOL LLFloaterRegionInfo::postBuild()
if(gDisconnected)
{
- return TRUE;
+ return true;
}
if(!gAgent.getRegionCapability("RegionExperiences").empty())
@@ -297,7 +296,7 @@ BOOL LLFloaterRegionInfo::postBuild()
// Request region info when agent region changes.
mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLFloaterRegionInfo::onRegionChanged, this));
- return TRUE;
+ return true;
}
LLFloaterRegionInfo::~LLFloaterRegionInfo()
@@ -340,17 +339,16 @@ void LLFloaterRegionInfo::onRegionChanged()
}
}
-// static
void LLFloaterRegionInfo::requestRegionInfo()
{
LLTabContainer* tab = findChild<LLTabContainer>("region_panels");
if (tab)
{
- tab->getChild<LLPanel>("General")->setCtrlsEnabled(FALSE);
- tab->getChild<LLPanel>("Debug")->setCtrlsEnabled(FALSE);
- tab->getChild<LLPanel>("Terrain")->setCtrlsEnabled(FALSE);
- tab->getChild<LLPanel>("Estate")->setCtrlsEnabled(FALSE);
- tab->getChild<LLPanel>("Access")->setCtrlsEnabled(FALSE);
+ tab->getChild<LLPanel>("General")->setCtrlsEnabled(false);
+ tab->getChild<LLPanel>("Debug")->setCtrlsEnabled(false);
+ tab->getChild<LLPanel>("Terrain")->setCtrlsEnabled(false);
+ tab->getChild<LLPanel>("Estate")->setCtrlsEnabled(false);
+ tab->getChild<LLPanel>("Access")->setCtrlsEnabled(false);
}
// Must allow anyone to request the RegionInfo data
@@ -421,7 +419,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");
LLViewerRegion* region = gAgent.getRegion();
- BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
+ bool allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
// *TODO: Replace parsing msg with accessing the region info model.
LLRegionInfoModel& region_info = LLRegionInfoModel::instance();
@@ -437,7 +435,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
F32 water_height;
F32 terrain_raise_limit;
F32 terrain_lower_limit;
- BOOL use_estate_sun;
+ bool use_estate_sun;
F32 sun_hour;
msg->getString("RegionInfo", "SimName", sim_name);
msg->getU8("RegionInfo", "MaxAgents", agent_limit);
@@ -499,14 +497,14 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
panel->getChild<LLUICtrl>("region_type")->setValue(LLSD(sim_type));
panel->getChild<LLUICtrl>("version_channel_text")->setValue(gLastVersionChannel);
- panel->getChild<LLUICtrl>("block_terraform_check")->setValue((region_flags & REGION_FLAGS_BLOCK_TERRAFORM) ? TRUE : FALSE );
- panel->getChild<LLUICtrl>("block_fly_check")->setValue((region_flags & REGION_FLAGS_BLOCK_FLY) ? TRUE : FALSE );
- panel->getChild<LLUICtrl>("block_fly_over_check")->setValue((region_flags & REGION_FLAGS_BLOCK_FLYOVER) ? TRUE : FALSE );
- panel->getChild<LLUICtrl>("allow_damage_check")->setValue((region_flags & REGION_FLAGS_ALLOW_DAMAGE) ? TRUE : FALSE );
- panel->getChild<LLUICtrl>("restrict_pushobject")->setValue((region_flags & REGION_FLAGS_RESTRICT_PUSHOBJECT) ? TRUE : FALSE );
- panel->getChild<LLUICtrl>("allow_land_resell_check")->setValue((region_flags & REGION_FLAGS_BLOCK_LAND_RESELL) ? FALSE : TRUE );
- panel->getChild<LLUICtrl>("allow_parcel_changes_check")->setValue((region_flags & REGION_FLAGS_ALLOW_PARCEL_CHANGES) ? TRUE : FALSE );
- panel->getChild<LLUICtrl>("block_parcel_search_check")->setValue((region_flags & REGION_FLAGS_BLOCK_PARCEL_SEARCH) ? TRUE : FALSE );
+ panel->getChild<LLUICtrl>("block_terraform_check")->setValue((region_flags & REGION_FLAGS_BLOCK_TERRAFORM) ? true : false );
+ panel->getChild<LLUICtrl>("block_fly_check")->setValue((region_flags & REGION_FLAGS_BLOCK_FLY) ? true : false );
+ panel->getChild<LLUICtrl>("block_fly_over_check")->setValue((region_flags & REGION_FLAGS_BLOCK_FLYOVER) ? true : false );
+ panel->getChild<LLUICtrl>("allow_damage_check")->setValue((region_flags & REGION_FLAGS_ALLOW_DAMAGE) ? true : false );
+ panel->getChild<LLUICtrl>("restrict_pushobject")->setValue((region_flags & REGION_FLAGS_RESTRICT_PUSHOBJECT) ? true : false );
+ panel->getChild<LLUICtrl>("allow_land_resell_check")->setValue((region_flags & REGION_FLAGS_BLOCK_LAND_RESELL) ? false : true );
+ panel->getChild<LLUICtrl>("allow_parcel_changes_check")->setValue((region_flags & REGION_FLAGS_ALLOW_PARCEL_CHANGES) ? true : false );
+ panel->getChild<LLUICtrl>("block_parcel_search_check")->setValue((region_flags & REGION_FLAGS_BLOCK_PARCEL_SEARCH) ? true : false );
panel->getChild<LLUICtrl>("agent_limit_spin")->setValue(LLSD((F32)agent_limit) );
panel->getChild<LLUICtrl>("object_bonus_spin")->setValue(LLSD(object_bonus_factor) );
panel->getChild<LLUICtrl>("access_combo")->setValue(LLSD(sim_access) );
@@ -523,7 +521,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
U32 parent_estate_id;
msg->getU32("RegionInfo", "ParentEstateID", parent_estate_id);
- BOOL teen_grid = (parent_estate_id == 5); // *TODO add field to estate table and test that
+ bool teen_grid = (parent_estate_id == 5); // *TODO add field to estate table and test that
panel->getChildView("access_combo")->setEnabled(gAgent.isGodlike() || (region && region->canManageEstate() && !teen_grid));
panel->setCtrlsEnabled(allow_modify);
@@ -532,9 +530,9 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
panel = tab->getChild<LLPanel>("Debug");
panel->getChild<LLUICtrl>("region_text")->setValue(LLSD(sim_name) );
- panel->getChild<LLUICtrl>("disable_scripts_check")->setValue(LLSD((BOOL)((region_flags & REGION_FLAGS_SKIP_SCRIPTS) ? TRUE : FALSE )) );
- panel->getChild<LLUICtrl>("disable_collisions_check")->setValue(LLSD((BOOL)((region_flags & REGION_FLAGS_SKIP_COLLISIONS) ? TRUE : FALSE )) );
- panel->getChild<LLUICtrl>("disable_physics_check")->setValue(LLSD((BOOL)((region_flags & REGION_FLAGS_SKIP_PHYSICS) ? TRUE : FALSE )) );
+ panel->getChild<LLUICtrl>("disable_scripts_check")->setValue(LLSD((bool)((region_flags & REGION_FLAGS_SKIP_SCRIPTS) ? true : false )) );
+ panel->getChild<LLUICtrl>("disable_collisions_check")->setValue(LLSD((bool)((region_flags & REGION_FLAGS_SKIP_COLLISIONS) ? true : false )) );
+ panel->getChild<LLUICtrl>("disable_physics_check")->setValue(LLSD((bool)((region_flags & REGION_FLAGS_SKIP_PHYSICS) ? true : false )) );
panel->setCtrlsEnabled(allow_modify);
// TERRAIN PANEL
@@ -605,6 +603,16 @@ LLPanelRegionEnvironment* LLFloaterRegionInfo::getPanelEnvironment()
return panel;
}
+LLTerrainMaterials::Type material_type_from_ctrl(LLCheckBoxCtrl* ctrl)
+{
+ return ctrl->get() ? LLTerrainMaterials::Type::PBR : LLTerrainMaterials::Type::TEXTURE;
+}
+
+void material_type_to_ctrl(LLCheckBoxCtrl* ctrl, LLTerrainMaterials::Type new_type)
+{
+ ctrl->set(new_type == LLTerrainMaterials::Type::PBR);
+}
+
// static
LLPanelRegionTerrainInfo* LLFloaterRegionInfo::getPanelRegionTerrain()
{
@@ -634,12 +642,12 @@ void LLFloaterRegionInfo::disableTabCtrls()
{
LLTabContainer* tab = getChild<LLTabContainer>("region_panels");
- tab->getChild<LLPanel>("General")->setCtrlsEnabled(FALSE);
- tab->getChild<LLPanel>("Debug")->setCtrlsEnabled(FALSE);
- tab->getChild<LLPanel>("Terrain")->setCtrlsEnabled(FALSE);
- tab->getChild<LLPanel>("panel_env_info")->setCtrlsEnabled(FALSE);
- tab->getChild<LLPanel>("Estate")->setCtrlsEnabled(FALSE);
- tab->getChild<LLPanel>("Access")->setCtrlsEnabled(FALSE);
+ tab->getChild<LLPanel>("General")->setCtrlsEnabled(false);
+ tab->getChild<LLPanel>("Debug")->setCtrlsEnabled(false);
+ tab->getChild<LLPanel>("Terrain")->setCtrlsEnabled(false);
+ tab->getChild<LLPanel>("panel_env_info")->setCtrlsEnabled(false);
+ tab->getChild<LLPanel>("Estate")->setCtrlsEnabled(false);
+ tab->getChild<LLPanel>("Access")->setCtrlsEnabled(false);
}
void LLFloaterRegionInfo::onTabSelected(const LLSD& param)
@@ -742,7 +750,7 @@ void LLPanelRegionInfo::onChangeText(LLLineEditor* caller, void* user_data)
// virtual
-BOOL LLPanelRegionInfo::postBuild()
+bool LLPanelRegionInfo::postBuild()
{
// If the panel has an Apply button, set a callback for it.
LLUICtrl* apply_btn = findChild<LLUICtrl>("apply_btn");
@@ -752,7 +760,7 @@ BOOL LLPanelRegionInfo::postBuild()
}
refresh();
- return TRUE;
+ return true;
}
// virtual
@@ -800,7 +808,7 @@ void LLPanelRegionInfo::sendEstateOwnerMessage(
msg->sendReliable(mHost);
}
-void LLPanelRegionInfo::enableButton(const std::string& btn_name, BOOL enable)
+void LLPanelRegionInfo::enableButton(const std::string& btn_name, bool enable)
{
LLView* button = findChildView(btn_name);
if (button) button->setEnabled(enable);
@@ -809,7 +817,7 @@ void LLPanelRegionInfo::enableButton(const std::string& btn_name, BOOL enable)
void LLPanelRegionInfo::disableButton(const std::string& btn_name)
{
LLView* button = findChildView(btn_name);
- if (button) button->setEnabled(FALSE);
+ if (button) button->setEnabled(false);
}
void LLPanelRegionInfo::initCtrl(const std::string& name)
@@ -828,9 +836,9 @@ void LLPanelRegionInfo::onClickManageTelehub()
//
bool LLPanelRegionGeneralInfo::refreshFromRegion(LLViewerRegion* region)
{
- BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
+ bool allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
setCtrlsEnabled(allow_modify);
- getChildView("apply_btn")->setEnabled(FALSE);
+ getChildView("apply_btn")->setEnabled(false);
getChildView("access_text")->setEnabled(allow_modify);
// getChildView("access_combo")->setEnabled(allow_modify);
// now set in processRegionInfo for teen grid detection
@@ -844,7 +852,7 @@ bool LLPanelRegionGeneralInfo::refreshFromRegion(LLViewerRegion* region)
return LLPanelRegionInfo::refreshFromRegion(region);
}
-BOOL LLPanelRegionGeneralInfo::postBuild()
+bool LLPanelRegionGeneralInfo::postBuild()
{
// Enable the "Apply" button if something is changed. JC
initCtrl("block_terraform_check");
@@ -871,7 +879,7 @@ BOOL LLPanelRegionGeneralInfo::postBuild()
}
refresh();
- return TRUE;
+ return true;
}
void LLPanelRegionGeneralInfo::onBtnSet()
@@ -911,7 +919,7 @@ void LLPanelRegionGeneralInfo::onClickKick()
LLView * button = findChild<LLButton>("kick_btn");
LLFloater* parent_floater = gFloaterView->getParentFloater(this);
LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelRegionGeneralInfo::onKickCommit, this, _1),
- FALSE, TRUE, FALSE, parent_floater->getName(), button);
+ false, true, false, parent_floater->getName(), button);
if (child_floater)
{
parent_floater->addDependentFloater(child_floater);
@@ -1016,7 +1024,7 @@ bool LLPanelRegionGeneralInfo::onMessageCommit(const LLSD& notification, const L
// strings[7] = restrict pushobject
// strings[8] = 'Y' - allow parcel subdivide, 'N' - not
// strings[9] = 'Y' - block parcel search, 'N' - allow
-BOOL LLPanelRegionGeneralInfo::sendUpdate()
+bool LLPanelRegionGeneralInfo::sendUpdate()
{
LL_INFOS() << "LLPanelRegionGeneralInfo::sendUpdate()" << LL_ENDL;
@@ -1085,13 +1093,13 @@ BOOL LLPanelRegionGeneralInfo::sendUpdate()
LLNotificationsUtil::add("RegionMaturityChange");
}
- return TRUE;
+ return true;
}
/////////////////////////////////////////////////////////////////////////////
// LLPanelRegionDebugInfo
/////////////////////////////////////////////////////////////////////////////
-BOOL LLPanelRegionDebugInfo::postBuild()
+bool LLPanelRegionDebugInfo::postBuild()
{
LLPanelRegionInfo::postBuild();
initCtrl("disable_scripts_check");
@@ -1106,16 +1114,16 @@ BOOL LLPanelRegionDebugInfo::postBuild()
childSetAction("cancel_restart_btn", onClickCancelRestart, this);
childSetAction("region_debug_console_btn", onClickDebugConsole, this);
- return TRUE;
+ return true;
}
// virtual
bool LLPanelRegionDebugInfo::refreshFromRegion(LLViewerRegion* region)
{
- BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
+ bool allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
setCtrlsEnabled(allow_modify);
- getChildView("apply_btn")->setEnabled(FALSE);
- getChildView("target_avatar_name")->setEnabled(FALSE);
+ getChildView("apply_btn")->setEnabled(false);
+ getChildView("target_avatar_name")->setEnabled(false);
getChildView("choose_avatar_btn")->setEnabled(allow_modify);
getChildView("return_scripts")->setEnabled(allow_modify && !mTargetAvatar.isNull());
@@ -1132,7 +1140,7 @@ bool LLPanelRegionDebugInfo::refreshFromRegion(LLViewerRegion* region)
}
// virtual
-BOOL LLPanelRegionDebugInfo::sendUpdate()
+bool LLPanelRegionDebugInfo::sendUpdate()
{
LL_INFOS() << "LLPanelRegionDebugInfo::sendUpdate" << LL_ENDL;
strings_t strings;
@@ -1149,7 +1157,7 @@ BOOL LLPanelRegionDebugInfo::sendUpdate()
LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
sendEstateOwnerMessage(gMessageSystem, "setregiondebug", invoice, strings);
- return TRUE;
+ return true;
}
void LLPanelRegionDebugInfo::onClickChooseAvatar()
@@ -1157,7 +1165,7 @@ void LLPanelRegionDebugInfo::onClickChooseAvatar()
LLView * button = findChild<LLButton>("choose_avatar_btn");
LLFloater* parent_floater = gFloaterView->getParentFloater(this);
LLFloater * child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelRegionDebugInfo::callbackAvatarID, this, _1, _2),
- FALSE, TRUE, FALSE, parent_floater->getName(), button);
+ false, true, false, parent_floater->getName(), button);
if (child_floater)
{
parent_floater->addDependentFloater(child_floater);
@@ -1305,18 +1313,25 @@ void LLPanelRegionDebugInfo::onClickDebugConsole(void* data)
LLFloaterReg::showInstance("region_debug_console");
}
-BOOL LLPanelRegionTerrainInfo::validateTextureSizes()
+bool LLPanelRegionTerrainInfo::validateTextureSizes()
{
- static const S32 MAX_TERRAIN_TEXTURE_SIZE = 1024;
- for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i)
+ if (mMaterialTypeCtrl)
+ {
+ const LLTerrainMaterials::Type material_type = material_type_from_ctrl(mMaterialTypeCtrl);
+ const bool is_material_selected = material_type == LLTerrainMaterials::Type::PBR;
+ if (is_material_selected) { return true; }
+ }
+
+ bool valid = true;
+ static LLCachedControl<U32> max_texture_resolution(gSavedSettings, "RenderMaxTextureResolution", 2048);
+ const S32 max_terrain_texture_size = (S32)max_texture_resolution;
+ for(S32 i = 0; i < LLTerrainMaterials::ASSET_COUNT; ++i)
{
- std::string buffer;
- buffer = llformat("texture_detail_%d", i);
- LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>(buffer);
+ LLTextureCtrl* texture_ctrl = mTextureDetailCtrl[i];
if (!texture_ctrl) continue;
LLUUID image_asset_id = texture_ctrl->getImageAssetID();
- LLViewerTexture* img = LLViewerTextureManager::getFetchedTexture(image_asset_id);
+ LLViewerFetchedTexture* img = LLViewerTextureManager::getFetchedTexture(image_asset_id);
S32 components = img->getComponents();
// Must ask for highest resolution version's width. JC
S32 width = img->getFullWidth();
@@ -1324,34 +1339,136 @@ BOOL LLPanelRegionTerrainInfo::validateTextureSizes()
//LL_INFOS() << "texture detail " << i << " is " << width << "x" << height << "x" << components << LL_ENDL;
- if (components != 3)
+ if (components != 3 && components != 4)
{
LLSD args;
args["TEXTURE_NUM"] = i+1;
args["TEXTURE_BIT_DEPTH"] = llformat("%d",components * 8);
- args["MAX_SIZE"] = MAX_TERRAIN_TEXTURE_SIZE;
+ args["MAX_SIZE"] = max_terrain_texture_size;
LLNotificationsUtil::add("InvalidTerrainBitDepth", args);
- return FALSE;
+ valid = false;
+ continue;
}
- if (width > MAX_TERRAIN_TEXTURE_SIZE || height > MAX_TERRAIN_TEXTURE_SIZE)
+ if (components == 4)
+ {
+ if (!img->hasSavedRawImage())
+ {
+ // Raw image isn't loaded yet
+ // Assume it's invalid due to presence of alpha channel
+ LLSD args;
+ args["TEXTURE_NUM"] = i+1;
+ args["TEXTURE_BIT_DEPTH"] = llformat("%d",components * 8);
+ LLNotificationsUtil::add("InvalidTerrainAlphaNotFullyLoaded", args);
+ valid = false;
+ }
+ else
+ {
+ // Slower path: Calculate alpha from raw image pixels (not needed
+ // for GLTF materials, which use alphaMode to determine
+ // transparency)
+ // Raw image is pretty much guaranteed to be saved due to the texture swatches
+ LLImageRaw* raw = img->getSavedRawImage();
+ if (raw->checkHasTransparentPixels())
+ {
+ LLSD args;
+ args["TEXTURE_NUM"] = i+1;
+ LLNotificationsUtil::add("InvalidTerrainAlpha", args);
+ valid = false;
+ }
+ LL_WARNS() << "Terrain texture image in slot " << i << " with ID " << image_asset_id << " has alpha channel, but pixels are opaque. Is alpha being optimized away in the texture uploader?" << LL_ENDL;
+ }
+ }
+
+ if (width > max_terrain_texture_size || height > max_terrain_texture_size)
{
LLSD args;
args["TEXTURE_NUM"] = i+1;
args["TEXTURE_SIZE_X"] = width;
args["TEXTURE_SIZE_Y"] = height;
- args["MAX_SIZE"] = MAX_TERRAIN_TEXTURE_SIZE;
+ args["MAX_SIZE"] = max_terrain_texture_size;
LLNotificationsUtil::add("InvalidTerrainSize", args);
- return FALSE;
-
+ valid = false;
}
}
- return TRUE;
+ return valid;
+}
+
+bool LLPanelRegionTerrainInfo::validateMaterials()
+{
+ if (mMaterialTypeCtrl)
+ {
+ const LLTerrainMaterials::Type material_type = material_type_from_ctrl(mMaterialTypeCtrl);
+ const bool is_texture_selected = material_type == LLTerrainMaterials::Type::TEXTURE;
+ if (is_texture_selected) { return true; }
+ }
+
+ // *TODO: If/when we implement additional GLTF extensions, they may not be
+ // compatible with our GLTF terrain implementation. We may want to disallow
+ // materials with some features from being set on terrain, if their
+ // implementation on terrain is not compliant with the spec:
+ // - KHR_materials_transmission: Probably OK?
+ // - KHR_materials_ior: Probably OK?
+ // - KHR_materials_volume: Likely incompatible, as our terrain
+ // heightmaps cannot currently be described as finite enclosed
+ // volumes.
+ // See also LLGLTFMaterial
+#ifdef LL_WINDOWS
+ llassert(sizeof(LLGLTFMaterial) == 232);
+#endif
+
+ bool valid = true;
+ for (S32 i = 0; i < LLTerrainMaterials::ASSET_COUNT; ++i)
+ {
+ LLTextureCtrl* material_ctrl = mMaterialDetailCtrl[i];
+ if (!material_ctrl) { continue; }
+
+ const LLUUID& material_asset_id = material_ctrl->getImageAssetID();
+ llassert(material_asset_id.notNull());
+ if (material_asset_id.isNull()) { return false; }
+ const LLFetchedGLTFMaterial* material = gGLTFMaterialList.getMaterial(material_asset_id);
+ if (!material->isLoaded())
+ {
+ if (material->isFetching())
+ {
+ LLSD args;
+ args["MATERIAL_NUM"] = i + 1;
+ LLNotificationsUtil::add("InvalidTerrainMaterialNotLoaded", args);
+ }
+ else // Loading failed
+ {
+ LLSD args;
+ args["MATERIAL_NUM"] = i + 1;
+ LLNotificationsUtil::add("InvalidTerrainMaterialLoadFailed", args);
+ }
+ valid = false;
+ continue;
+ }
+
+ if (material->mDoubleSided)
+ {
+ LLSD args;
+ args["MATERIAL_NUM"] = i + 1;
+ LLNotificationsUtil::add("InvalidTerrainMaterialDoubleSided", args);
+ valid = false;
+ }
+ if (material->mAlphaMode != LLGLTFMaterial::ALPHA_MODE_OPAQUE && material->mAlphaMode != LLGLTFMaterial::ALPHA_MODE_MASK)
+ {
+ LLSD args;
+ args["MATERIAL_NUM"] = i + 1;
+ const char* alpha_mode = material->getAlphaMode();
+ args["MATERIAL_ALPHA_MODE"] = alpha_mode;
+ LLNotificationsUtil::add("InvalidTerrainMaterialAlphaMode", args);
+ valid = false;
+ }
+ }
+
+ return valid;
}
-BOOL LLPanelRegionTerrainInfo::validateTextureHeights()
+bool LLPanelRegionTerrainInfo::validateTextureHeights()
{
for (S32 i = 0; i < CORNER_COUNT; ++i)
{
@@ -1360,19 +1477,34 @@ BOOL LLPanelRegionTerrainInfo::validateTextureHeights()
if (getChild<LLUICtrl>(low)->getValue().asReal() > getChild<LLUICtrl>(high)->getValue().asReal())
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
/////////////////////////////////////////////////////////////////////////////
// LLPanelRegionTerrainInfo
/////////////////////////////////////////////////////////////////////////////
+
+LLPanelRegionTerrainInfo::LLPanelRegionTerrainInfo()
+: LLPanelRegionInfo()
+{
+ const LLUUID (&default_textures)[LLVLComposition::ASSET_COUNT] = LLVLComposition::getDefaultTextures();
+ for (S32 i = 0; i < LLTerrainMaterials::ASSET_COUNT; ++i)
+ {
+ mLastSetTextures[i] = default_textures[i];
+ }
+ for (S32 i = 0; i < LLTerrainMaterials::ASSET_COUNT; ++i)
+ {
+ mLastSetMaterials[i] = BLANK_MATERIAL_ASSET_ID;
+ }
+}
+
// Initialize statics
-BOOL LLPanelRegionTerrainInfo::postBuild()
+bool LLPanelRegionTerrainInfo::postBuild()
{
LLPanelRegionInfo::postBuild();
@@ -1380,11 +1512,22 @@ BOOL LLPanelRegionTerrainInfo::postBuild()
initCtrl("terrain_raise_spin");
initCtrl("terrain_lower_spin");
+ mMaterialTypeCtrl = findChild<LLCheckBoxCtrl>("terrain_material_type");
+ if (mMaterialTypeCtrl) { mMaterialTypeCtrl->setCommitCallback(boost::bind(&LLPanelRegionTerrainInfo::onSelectMaterialType, this)); }
+
std::string buffer;
- for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i)
+
+ for(S32 i = 0; i < LLTerrainMaterials::ASSET_COUNT; ++i)
{
buffer = llformat("texture_detail_%d", i);
initCtrl(buffer);
+ mTextureDetailCtrl[i] = findChild<LLTextureCtrl>(buffer);
+ }
+ for(S32 i = 0; i < LLTerrainMaterials::ASSET_COUNT; ++i)
+ {
+ buffer = llformat("material_detail_%d", i);
+ initCtrl(buffer);
+ mMaterialDetailCtrl[i] = findChild<LLTextureCtrl>(buffer);
}
for(S32 i = 0; i < CORNER_COUNT; ++i)
@@ -1405,37 +1548,166 @@ BOOL LLPanelRegionTerrainInfo::postBuild()
return LLPanelRegionInfo::postBuild();
}
+void LLPanelRegionTerrainInfo::onSelectMaterialType()
+{
+ updateForMaterialType();
+ onChangeAnything();
+}
+
+void LLPanelRegionTerrainInfo::updateForMaterialType()
+{
+ if (!mMaterialTypeCtrl) { return; }
+ const LLTerrainMaterials::Type material_type = material_type_from_ctrl(mMaterialTypeCtrl);
+ const bool show_texture_controls = material_type == LLTerrainMaterials::Type::TEXTURE;
+ const bool show_material_controls = material_type == LLTerrainMaterials::Type::PBR;
+
+ // Toggle visibility of correct swatches
+ for(S32 i = 0; i < LLTerrainMaterials::ASSET_COUNT; ++i)
+ {
+ LLTextureCtrl* texture_ctrl = mTextureDetailCtrl[i];
+ if (texture_ctrl)
+ {
+ texture_ctrl->setVisible(show_texture_controls);
+ }
+ }
+ for(S32 i = 0; i < LLTerrainMaterials::ASSET_COUNT; ++i)
+ {
+ LLTextureCtrl* material_ctrl = mMaterialDetailCtrl[i];
+ if (material_ctrl)
+ {
+ material_ctrl->setVisible(show_material_controls);
+ }
+ }
+
+ // Toggle visibility of labels
+ LLUICtrl* texture_label = findChild<LLUICtrl>("detail_texture_text");
+ if (texture_label) { texture_label->setVisible(show_texture_controls); }
+ LLUICtrl* material_label = findChild<LLUICtrl>("detail_material_text");
+ if (material_label) { material_label->setVisible(show_material_controls); }
+
+ // Toggle visibility of documentation labels for terrain blending ranges
+ const std::vector<std::string> doc_suffixes { "5", "10", "11" };
+ std::string buffer;
+ for (const std::string& suffix : doc_suffixes)
+ {
+ buffer = "height_text_lbl" + suffix;
+ LLUICtrl* texture_doc_label = findChild<LLUICtrl>(buffer);
+ if (texture_doc_label) { texture_doc_label->setVisible(show_texture_controls); }
+ buffer += "_material";
+ LLUICtrl* material_doc_label = findChild<LLUICtrl>(buffer);
+ if (material_doc_label) { material_doc_label->setVisible(show_material_controls); }
+ }
+}
+
// virtual
bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region)
{
- BOOL owner_or_god = gAgent.isGodlike()
+ bool owner_or_god = gAgent.isGodlike()
|| (region && (region->getOwner() == gAgent.getID()));
- BOOL owner_or_god_or_manager = owner_or_god
+ bool owner_or_god_or_manager = owner_or_god
|| (region && region->isEstateManager());
setCtrlsEnabled(owner_or_god_or_manager);
- getChildView("apply_btn")->setEnabled(FALSE);
+ 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)
- {
- LL_DEBUGS() << "Detail Texture " << i << ": "
- << compp->getDetailTextureID(i) << LL_ENDL;
- LLUUID tmp_id(compp->getDetailTextureID(i));
- texture_ctrl->setImageAssetID(tmp_id);
- }
- }
+ static LLCachedControl<bool> feature_pbr_terrain_enabled(gSavedSettings, "RenderTerrainPBREnabled", false);
+
+ const bool textures_ready = compp->texturesReady(false, false);
+ const bool materials_ready = feature_pbr_terrain_enabled && compp->materialsReady(false, false);
+
+ bool set_texture_swatches;
+ bool set_material_swatches;
+ bool reset_texture_swatches;
+ bool reset_material_swatches;
+ LLTerrainMaterials::Type material_type;
+ if (!textures_ready && !materials_ready)
+ {
+ // Are these 4 texture IDs or 4 material IDs? Who knows! Let's set
+ // the IDs on both pickers for now.
+ material_type = LLTerrainMaterials::Type::TEXTURE;
+ set_texture_swatches = true;
+ set_material_swatches = true;
+ reset_texture_swatches = false;
+ reset_material_swatches = false;
+ }
+ else
+ {
+ material_type = compp->getMaterialType();
+ set_texture_swatches = material_type == LLTerrainMaterials::Type::TEXTURE;
+ set_material_swatches = !set_texture_swatches;
+ reset_texture_swatches = !set_texture_swatches;
+ reset_material_swatches = !set_material_swatches;
+ }
+
+ if (mMaterialTypeCtrl)
+ {
+ material_type_to_ctrl(mMaterialTypeCtrl, material_type);
+ updateForMaterialType();
+ mMaterialTypeCtrl->setVisible(feature_pbr_terrain_enabled);
+ }
+
+ if (set_texture_swatches)
+ {
+ for(S32 i = 0; i < LLTerrainMaterials::ASSET_COUNT; ++i)
+ {
+ LLTextureCtrl* asset_ctrl = mTextureDetailCtrl[i];
+ if(asset_ctrl)
+ {
+ LL_DEBUGS("Terrain", "Texture") << "Detail Texture " << i << ": "
+ << compp->getDetailAssetID(i) << LL_ENDL;
+ LLUUID tmp_id(compp->getDetailAssetID(i));
+ asset_ctrl->setImageAssetID(tmp_id);
+ }
+ }
+ }
+ if (set_material_swatches)
+ {
+ for(S32 i = 0; i < LLTerrainMaterials::ASSET_COUNT; ++i)
+ {
+ LLTextureCtrl* asset_ctrl = mMaterialDetailCtrl[i];
+ if(asset_ctrl)
+ {
+ LL_DEBUGS("Terrain", "Material") << "Detail Material " << i << ": "
+ << compp->getDetailAssetID(i) << LL_ENDL;
+ LLUUID tmp_id(compp->getDetailAssetID(i));
+ asset_ctrl->setImageAssetID(tmp_id);
+ }
+ }
+ }
+ if (reset_texture_swatches)
+ {
+ for(S32 i = 0; i < LLTerrainMaterials::ASSET_COUNT; ++i)
+ {
+ LL_DEBUGS("Terrain", "Texture") << "Reset Texture swatch " << i
+ << LL_ENDL;
+ LLTextureCtrl* asset_ctrl = mTextureDetailCtrl[i];
+ if(asset_ctrl)
+ {
+ asset_ctrl->setImageAssetID(mLastSetTextures[i]);
+ }
+ }
+ }
+ if (reset_material_swatches)
+ {
+ for(S32 i = 0; i < LLTerrainMaterials::ASSET_COUNT; ++i)
+ {
+ LL_DEBUGS("Terrain", "Material") << "Reset Material swatch " << i
+ << LL_ENDL;
+ LLTextureCtrl* asset_ctrl = mMaterialDetailCtrl[i];
+ if(asset_ctrl)
+ {
+ asset_ctrl->setImageAssetID(mLastSetMaterials[i]);
+ }
+ }
+ }
+
+ std::string buffer;
for(S32 i = 0; i < CORNER_COUNT; ++i)
{
buffer = llformat("height_start_spin_%d", i);
@@ -1449,6 +1721,9 @@ bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region)
LL_DEBUGS() << "no region set" << LL_ENDL;
getChild<LLUICtrl>("region_text")->setValue(LLSD(""));
}
+
+ // Update visibility of terrain swatches, etc
+ refresh();
getChildView("download_raw_btn")->setEnabled(owner_or_god);
getChildView("upload_raw_btn")->setEnabled(owner_or_god);
@@ -1459,31 +1734,22 @@ bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region)
// virtual
-BOOL LLPanelRegionTerrainInfo::sendUpdate()
+bool LLPanelRegionTerrainInfo::sendUpdate()
{
LL_INFOS() << "LLPanelRegionTerrainInfo::sendUpdate" << LL_ENDL;
- std::string buffer;
- strings_t strings;
- LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
-
- // 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();
-
- // and sync the region with it
- region_info.sendRegionTerrain(invoice);
-
- // =======================================
- // Assemble and send texturedetail message
// Make sure user hasn't chosen wacky textures.
if (!validateTextureSizes())
{
- return FALSE;
+ return false;
}
+ // Prevent applying unsupported alpha blend/double-sided materials
+ if (!validateMaterials())
+ {
+ return FALSE;
+ }
+
// Check if terrain Elevation Ranges are correct
if (gSavedSettings.getBOOL("RegionCheckTextureHeights") && !validateTextureHeights())
{
@@ -1491,30 +1757,65 @@ BOOL LLPanelRegionTerrainInfo::sendUpdate()
{
LLNotificationsUtil::add("ConfirmTextureHeights", LLSD(), LLSD(), boost::bind(&LLPanelRegionTerrainInfo::callbackTextureHeights, this, _1, _2));
mAskedTextureHeights = true;
- return FALSE;
+ return false;
}
else if (!mConfirmedTextureHeights)
{
- return FALSE;
+ return false;
}
}
- LLTextureCtrl* texture_ctrl;
+ std::string buffer;
+ strings_t strings;
+ LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
+
+ // 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();
+
+ // and sync the region with it
+ region_info.sendRegionTerrain(invoice);
+
+ // =======================================
+ // Assemble and send texturedetail message
+
std::string id_str;
LLMessageSystem* msg = gMessageSystem;
- 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);
- }
- }
+ // Send either material IDs instead of texture IDs depending on
+ // material_type - they both occupy the same slot.
+ const LLTerrainMaterials::Type material_type = mMaterialTypeCtrl ? material_type_from_ctrl(mMaterialTypeCtrl) : LLTerrainMaterials::Type::TEXTURE;
+ for(S32 i = 0; i < LLTerrainMaterials::ASSET_COUNT; ++i)
+ {
+ LLTextureCtrl* asset_ctrl;
+ if (material_type == LLTerrainMaterials::Type::PBR)
+ {
+ asset_ctrl = mMaterialDetailCtrl[i];
+ }
+ else
+ {
+ asset_ctrl = mTextureDetailCtrl[i];
+ }
+
+ if (!asset_ctrl) { continue; }
+
+ LLUUID tmp_id(asset_ctrl->getImageAssetID());
+ tmp_id.toString(id_str);
+ buffer = llformat("%d %s", i, id_str.c_str());
+ strings.push_back(buffer);
+
+ // Store asset for later terrain editing
+ if (material_type == LLTerrainMaterials::Type::PBR)
+ {
+ mLastSetMaterials[i] = tmp_id;
+ }
+ else
+ {
+ mLastSetTextures[i] = tmp_id;
+ }
+ }
sendEstateOwnerMessage(msg, "texturedetail", invoice, strings);
strings.clear();
@@ -1536,7 +1837,7 @@ BOOL LLPanelRegionTerrainInfo::sendUpdate()
sendEstateOwnerMessage(msg, "texturecommit", invoice, strings);
- return TRUE;
+ return true;
}
bool LLPanelRegionTerrainInfo::callbackTextureHeights(const LLSD& notification, const LLSD& response)
@@ -1552,7 +1853,7 @@ bool LLPanelRegionTerrainInfo::callbackTextureHeights(const LLSD& notification,
}
else if (option == 2) // don't ask
{
- gSavedSettings.setBOOL("RegionCheckTextureHeights", FALSE);
+ gSavedSettings.setBOOL("RegionCheckTextureHeights", false);
mConfirmedTextureHeights = true;
}
@@ -1667,7 +1968,7 @@ void LLPanelEstateInfo::onClickKickUser()
LLView * button = findChild<LLButton>("kick_user_from_estate_btn");
LLFloater* parent_floater = gFloaterView->getParentFloater(this);
LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelEstateInfo::onKickUserCommit, this, _1),
- FALSE, TRUE, FALSE, parent_floater->getName(), button);
+ false, true, false, parent_floater->getName(), button);
if (child_floater)
{
parent_floater->addDependentFloater(child_floater);
@@ -1808,13 +2109,13 @@ void LLPanelEstateInfo::updateEstateName(const std::string& name)
void LLPanelEstateInfo::updateControls(LLViewerRegion* region)
{
- BOOL god = gAgent.isGodlike();
- BOOL owner = (region && (region->getOwner() == gAgent.getID()));
- BOOL manager = (region && region->isEstateManager());
+ bool god = gAgent.isGodlike();
+ bool owner = (region && (region->getOwner() == gAgent.getID()));
+ bool manager = (region && region->isEstateManager());
setCtrlsEnabled(god || owner || manager);
- getChildView("apply_btn")->setEnabled(FALSE);
- getChildView("estate_owner")->setEnabled(TRUE);
+ getChildView("apply_btn")->setEnabled(false);
+ getChildView("estate_owner")->setEnabled(true);
getChildView("message_estate_btn")->setEnabled(god || owner || manager);
getChildView("kick_user_from_estate_btn")->setEnabled(god || owner || manager);
@@ -1859,7 +2160,7 @@ bool LLPanelEstateInfo::estateUpdate(LLMessageSystem* msg)
}
-BOOL LLPanelEstateInfo::postBuild()
+bool LLPanelEstateInfo::postBuild()
{
// set up the callbacks for the generic controls
initCtrl("externally_visible_radio");
@@ -1875,7 +2176,7 @@ BOOL LLPanelEstateInfo::postBuild()
getChild<LLUICtrl>("parcel_access_override")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeAccessOverride, this));
- getChild<LLUICtrl>("externally_visible_radio")->setFocus(TRUE);
+ getChild<LLUICtrl>("externally_visible_radio")->setFocus(true);
getChild<LLTextBox>("estate_owner")->setIsFriendCallback(LLAvatarActions::isFriend);
@@ -1921,7 +2222,7 @@ void LLPanelEstateInfo::refreshFromEstate()
refresh();
}
-BOOL LLPanelEstateInfo::sendUpdate()
+bool LLPanelEstateInfo::sendUpdate()
{
LL_INFOS() << "LLPanelEsateInfo::sendUpdate()" << LL_ENDL;
@@ -1938,7 +2239,7 @@ BOOL LLPanelEstateInfo::sendUpdate()
// for normal estates, just make the change
LLNotifications::instance().forceResponse(params, 0);
}
- return TRUE;
+ return true;
}
bool LLPanelEstateInfo::callbackChangeLindenEstate(const LLSD& notification, const LLSD& response)
@@ -2125,7 +2426,7 @@ bool LLPanelEstateCovenant::estateUpdate(LLMessageSystem* msg)
}
// virtual
-BOOL LLPanelEstateCovenant::postBuild()
+bool LLPanelEstateCovenant::postBuild()
{
mEstateNameText = getChild<LLTextBox>("estate_name_text");
mEstateOwnerText = getChild<LLTextBox>("estate_owner_text");
@@ -2145,7 +2446,7 @@ void LLPanelEstateCovenant::updateChild(LLUICtrl* child_ctrl)
}
// virtual
-BOOL LLPanelEstateCovenant::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+bool LLPanelEstateCovenant::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
@@ -2156,7 +2457,7 @@ BOOL LLPanelEstateCovenant::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop
if (!gAgent.canManageEstate())
{
*accept = ACCEPT_NO;
- return TRUE;
+ return true;
}
switch(cargo_type)
@@ -2176,7 +2477,7 @@ BOOL LLPanelEstateCovenant::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop
break;
}
- return TRUE;
+ return true;
}
// static
@@ -2225,7 +2526,7 @@ bool LLPanelEstateCovenant::confirmResetCovenantCallback(const LLSD& notificatio
void LLPanelEstateCovenant::loadInvItem(LLInventoryItem *itemp)
{
- const BOOL high_priority = TRUE;
+ const bool high_priority = true;
if (itemp)
{
gAssetStorage->getInvItemAsset(gAgent.getRegionHost(),
@@ -2337,9 +2638,9 @@ void LLPanelEstateCovenant::sendChangeCovenantID(const LLUUID &asset_id)
}
// virtual
-BOOL LLPanelEstateCovenant::sendUpdate()
+bool LLPanelEstateCovenant::sendUpdate()
{
- return TRUE;
+ return true;
}
std::string LLPanelEstateCovenant::getEstateName() const
@@ -2506,13 +2807,13 @@ bool LLDispatchSetEstateExperience::operator()(
return true;
}
-BOOL LLPanelRegionExperiences::postBuild()
+bool LLPanelRegionExperiences::postBuild()
{
mAllowed = setupList("panel_allowed", ESTATE_EXPERIENCE_ALLOWED_ADD, ESTATE_EXPERIENCE_ALLOWED_REMOVE);
mTrusted = setupList("panel_trusted", ESTATE_EXPERIENCE_TRUSTED_ADD, ESTATE_EXPERIENCE_TRUSTED_REMOVE);
mBlocked = setupList("panel_blocked", ESTATE_EXPERIENCE_BLOCKED_ADD, ESTATE_EXPERIENCE_BLOCKED_REMOVE);
- getChild<LLLayoutPanel>("trusted_layout_panel")->setVisible(TRUE);
+ getChild<LLLayoutPanel>("trusted_layout_panel")->setVisible(true);
getChild<LLTextBox>("experiences_help_text")->setText(getString("estate_caption"));
getChild<LLTextBox>("trusted_text_help")->setText(getString("trusted_estate_text"));
getChild<LLTextBox>("allowed_text_help")->setText(getString("allowed_estate_text"));
@@ -2653,7 +2954,7 @@ std::string LLPanelRegionExperiences::regionCapabilityQuery(LLViewerRegion* regi
bool LLPanelRegionExperiences::refreshFromRegion(LLViewerRegion* region)
{
- BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
+ bool allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
mAllowed->loading();
mAllowed->setReadonly(!allow_modify);
@@ -2692,7 +2993,7 @@ LLSD LLPanelRegionExperiences::addIds(LLPanelExperienceListEditor* panel)
}
-BOOL LLPanelRegionExperiences::sendUpdate()
+bool LLPanelRegionExperiences::sendUpdate()
{
LLViewerRegion* region = gAgent.getRegion();
@@ -2705,7 +3006,7 @@ BOOL LLPanelRegionExperiences::sendUpdate()
LLExperienceCache::instance().setRegionExperiences(boost::bind(&LLPanelRegionExperiences::regionCapabilityQuery, region, _1),
content, boost::bind(&LLPanelRegionExperiences::infoCallback, getDerivedHandle<LLPanelRegionExperiences>(), _1));
- return TRUE;
+ return true;
}
void LLPanelRegionExperiences::itemChanged( U32 event_type, const LLUUID& id )
@@ -2770,13 +3071,13 @@ LLPanelEstateAccess::LLPanelEstateAccess()
: LLPanelRegionInfo(), mPendingUpdate(false)
{}
-BOOL LLPanelEstateAccess::postBuild()
+bool LLPanelEstateAccess::postBuild()
{
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)
{
- avatar_name_list->setCommitOnSelectionChange(TRUE);
+ avatar_name_list->setCommitOnSelectionChange(true);
avatar_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS);
}
@@ -2789,7 +3090,7 @@ BOOL LLPanelEstateAccess::postBuild()
LLNameListCtrl* group_name_list = getChild<LLNameListCtrl>("allowed_group_name_list");
if (group_name_list)
{
- group_name_list->setCommitOnSelectionChange(TRUE);
+ group_name_list->setCommitOnSelectionChange(true);
group_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS);
}
@@ -2802,7 +3103,7 @@ BOOL LLPanelEstateAccess::postBuild()
LLNameListCtrl* banned_name_list = getChild<LLNameListCtrl>("banned_avatar_name_list");
if (banned_name_list)
{
- banned_name_list->setCommitOnSelectionChange(TRUE);
+ banned_name_list->setCommitOnSelectionChange(true);
banned_name_list->setMaxItemCount(ESTATE_MAX_BANNED_IDS);
}
@@ -2815,28 +3116,28 @@ BOOL LLPanelEstateAccess::postBuild()
LLNameListCtrl* manager_name_list = getChild<LLNameListCtrl>("estate_manager_name_list");
if (manager_name_list)
{
- manager_name_list->setCommitOnSelectionChange(TRUE);
+ manager_name_list->setCommitOnSelectionChange(true);
manager_name_list->setMaxItemCount(ESTATE_MAX_MANAGERS * 4); // Allow extras for dupe issue
}
childSetAction("add_estate_manager_btn", boost::bind(&LLPanelEstateAccess::onClickAddEstateManager, this));
childSetAction("remove_estate_manager_btn", boost::bind(&LLPanelEstateAccess::onClickRemoveEstateManager, this));
- return TRUE;
+ return true;
}
void LLPanelEstateAccess::updateControls(LLViewerRegion* region)
{
- BOOL god = gAgent.isGodlike();
- BOOL owner = (region && (region->getOwner() == gAgent.getID()));
- BOOL manager = (region && region->isEstateManager());
- BOOL enable_cotrols = god || owner || manager;
+ bool god = gAgent.isGodlike();
+ bool owner = (region && (region->getOwner() == gAgent.getID()));
+ bool manager = (region && region->isEstateManager());
+ bool enable_cotrols = god || owner || manager;
setCtrlsEnabled(enable_cotrols);
- BOOL has_allowed_avatar = getChild<LLNameListCtrl>("allowed_avatar_name_list")->getFirstSelected() ? TRUE : FALSE;
- BOOL has_allowed_group = getChild<LLNameListCtrl>("allowed_group_name_list")->getFirstSelected() ? TRUE : FALSE;
- BOOL has_banned_agent = getChild<LLNameListCtrl>("banned_avatar_name_list")->getFirstSelected() ? TRUE : FALSE;
- BOOL has_estate_manager = getChild<LLNameListCtrl>("estate_manager_name_list")->getFirstSelected() ? TRUE : FALSE;
+ bool has_allowed_avatar = getChild<LLNameListCtrl>("allowed_avatar_name_list")->getFirstSelected() ? true : false;
+ bool has_allowed_group = getChild<LLNameListCtrl>("allowed_group_name_list")->getFirstSelected() ? true : false;
+ bool has_banned_agent = getChild<LLNameListCtrl>("banned_avatar_name_list")->getFirstSelected() ? true : false;
+ bool has_estate_manager = getChild<LLNameListCtrl>("estate_manager_name_list")->getFirstSelected() ? true : false;
getChildView("add_allowed_avatar_btn")->setEnabled(enable_cotrols);
getChildView("remove_allowed_avatar_btn")->setEnabled(has_allowed_avatar && enable_cotrols);
@@ -3099,7 +3400,7 @@ bool LLPanelEstateAccess::accessAddCore2(const LLSD& notification, const LLSD& r
// avatar picker yes multi-select, yes close-on-select
LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelEstateAccess::accessAddCore3, _1, _2, (void*)change_info),
- TRUE, TRUE, FALSE, parent_floater_name, button);
+ true, true, false, parent_floater_name, button);
//Allows the closed parent floater to close the child floater (avatar picker)
if (child_floater)
@@ -3565,7 +3866,7 @@ void LLPanelEstateAccess::requestEstateGetAccessCoro(std::string url)
LLUUID id = (*it)["id"].asUUID();
allowed_agent_name_list->addNameItem(id);
}
- allowed_agent_name_list->sortByName(TRUE);
+ allowed_agent_name_list->sortByName(true);
}
LLNameListCtrl* banned_agent_name_list = panel->getChild<LLNameListCtrl>("banned_avatar_name_list");
@@ -3608,7 +3909,7 @@ void LLPanelEstateAccess::requestEstateGetAccessCoro(std::string url)
banned_agent_name_list->addElement(item);
}
- banned_agent_name_list->sortByName(TRUE);
+ banned_agent_name_list->sortByName(true);
}
LLNameListCtrl* allowed_group_name_list = panel->getChild<LLNameListCtrl>("allowed_group_name_list");
@@ -3627,7 +3928,7 @@ void LLPanelEstateAccess::requestEstateGetAccessCoro(std::string url)
LLUUID id = (*it)["id"].asUUID();
allowed_group_name_list->addGroupNameItem(id);
}
- allowed_group_name_list->sortByName(TRUE);
+ allowed_group_name_list->sortByName(true);
}
LLNameListCtrl* estate_manager_name_list = panel->getChild<LLNameListCtrl>("estate_manager_name_list");
@@ -3646,7 +3947,7 @@ void LLPanelEstateAccess::requestEstateGetAccessCoro(std::string url)
LLUUID id = (*it)["agent_id"].asUUID();
estate_manager_name_list->addNameItem(id);
}
- estate_manager_name_list->sortByName(TRUE);
+ estate_manager_name_list->sortByName(true);
}
@@ -3691,7 +3992,7 @@ void LLPanelEstateAccess::searchAgent(LLNameListCtrl* listCtrl, const std::strin
}
else
{
- listCtrl->deselectAllItems(TRUE);
+ listCtrl->deselectAllItems(true);
}
}
@@ -3745,21 +4046,21 @@ LLPanelRegionEnvironment::~LLPanelRegionEnvironment()
mCommitConnect.disconnect();
}
-BOOL LLPanelRegionEnvironment::postBuild()
+bool LLPanelRegionEnvironment::postBuild()
{
LLEstateInfoModel& estate_info = LLEstateInfoModel::instance();
if (!LLPanelEnvironmentInfo::postBuild())
- return FALSE;
+ return false;
getChild<LLUICtrl>(BTN_USEDEFAULT)->setLabelArg("[USEDEFAULT]", getString(STR_LABEL_USEDEFAULT));
- getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setVisible(TRUE);
- getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(TRUE);
+ getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setVisible(true);
+ getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(true);
getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setCommitCallback([this](LLUICtrl *, const LLSD &value){ onChkAllowOverride(value.asBoolean()); });
mCommitConnect = estate_info.setCommitCallback(boost::bind(&LLPanelRegionEnvironment::refreshFromEstate, this));
- return TRUE;
+ return true;
}
diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h
index 3eb39b250f..f0731d517a 100644
--- a/indra/newview/llfloaterregioninfo.h
+++ b/indra/newview/llfloaterregioninfo.h
@@ -36,6 +36,7 @@
#include "llpanel.h"
#include "llextendedstatus.h"
#include "llpanelenvironment.h"
+#include "llvlcomposition.h"
#include "lleventcoro.h"
@@ -55,6 +56,7 @@ class LLRadioGroup;
class LLSliderCtrl;
class LLSpinCtrl;
class LLTextBox;
+class LLTextureCtrl;
class LLPanelRegionGeneralInfo;
class LLPanelRegionDebugInfo;
@@ -75,9 +77,9 @@ class LLFloaterRegionInfo : public LLFloater
public:
- /*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ void onClose(bool app_quitting);
- /*virtual*/ BOOL postBuild();
+ void onOpen(const LLSD& key) override;
+ void onClose(bool app_quitting) override;
+ bool postBuild() override;
static void processEstateOwnerRequest(LLMessageSystem* msg, void**);
@@ -98,7 +100,7 @@ public:
static LLPanelRegionEnvironment* getPanelEnvironment();
// from LLPanel
- virtual void refresh();
+ void refresh() override;
void onRegionChanged();
void requestRegionInfo();
@@ -144,10 +146,10 @@ public:
virtual bool refreshFromRegion(LLViewerRegion* region);
virtual bool estateUpdate(LLMessageSystem* msg) { return true; }
- virtual BOOL postBuild();
+ bool postBuild() override;
virtual void updateChild(LLUICtrl* child_ctrl);
- void enableButton(const std::string& btn_name, BOOL enable = TRUE);
+ void enableButton(const std::string& btn_name, bool enable = true);
void disableButton(const std::string& btn_name);
void onClickManageTelehub();
@@ -155,9 +157,9 @@ public:
protected:
void initCtrl(const std::string& name);
- // Returns TRUE if update sent and apply button should be
+ // Returns true if update sent and apply button should be
// disabled.
- virtual BOOL sendUpdate() { return TRUE; }
+ virtual bool sendUpdate() { return true; }
typedef std::vector<std::string> strings_t;
//typedef std::vector<U32> integers_t;
@@ -184,16 +186,15 @@ public:
: LLPanelRegionInfo() {}
~LLPanelRegionGeneralInfo() {}
- virtual bool refreshFromRegion(LLViewerRegion* region);
+ bool refreshFromRegion(LLViewerRegion* region) override;
- // LLPanel
- virtual BOOL postBuild();
+ bool postBuild() override;
void onBtnSet();
void setObjBonusFactor(F32 object_bonus_factor) {mObjBonusFactor = object_bonus_factor;}
protected:
- virtual BOOL sendUpdate();
+ bool sendUpdate() override;
void onClickKick();
void onKickCommit(const uuid_vec_t& ids);
static void onClickKickAll(void* userdata);
@@ -214,13 +215,13 @@ public:
LLPanelRegionDebugInfo()
: LLPanelRegionInfo(), mTargetAvatar() {}
~LLPanelRegionDebugInfo() {}
- // LLPanel
- virtual BOOL postBuild();
+
+ bool postBuild() override;
- virtual bool refreshFromRegion(LLViewerRegion* region);
+ bool refreshFromRegion(LLViewerRegion* region) override;
protected:
- virtual BOOL sendUpdate();
+ bool sendUpdate() override;
void onClickChooseAvatar();
void callbackAvatarID(const uuid_vec_t& ids, const std::vector<LLAvatarName> names);
@@ -244,20 +245,22 @@ class LLPanelRegionTerrainInfo : public LLPanelRegionInfo
LOG_CLASS(LLPanelRegionTerrainInfo);
public:
- LLPanelRegionTerrainInfo() : LLPanelRegionInfo() {}
+ LLPanelRegionTerrainInfo();
~LLPanelRegionTerrainInfo() {}
- virtual BOOL postBuild(); // LLPanel
+ bool postBuild() override;
- virtual bool refreshFromRegion(LLViewerRegion* region); // refresh local settings from region update from simulator
+ bool refreshFromRegion(LLViewerRegion* region) override; // refresh local settings from region update from simulator
void setEnvControls(bool available); // Whether environment settings are available for this region
- BOOL validateTextureSizes();
- BOOL validateTextureHeights();
+ bool validateTextureSizes();
+ bool validateMaterials();
+ bool validateTextureHeights();
//static void onChangeAnything(LLUICtrl* ctrl, void* userData); // callback for any change, to enable commit button
- virtual BOOL sendUpdate();
+ void onSelectMaterialType();
+ void updateForMaterialType();
static void onClickDownloadRaw(void*);
static void onClickUploadRaw(void*);
@@ -265,9 +268,17 @@ public:
bool callbackBakeTerrain(const LLSD& notification, const LLSD& response);
bool callbackTextureHeights(const LLSD& notification, const LLSD& response);
+protected:
+ bool sendUpdate() override;
+
private:
bool mConfirmedTextureHeights;
bool mAskedTextureHeights;
+ LLCheckBoxCtrl* mMaterialTypeCtrl = nullptr;
+ LLTextureCtrl* mTextureDetailCtrl[LLTerrainMaterials::ASSET_COUNT];
+ LLTextureCtrl* mMaterialDetailCtrl[LLTerrainMaterials::ASSET_COUNT];
+ LLUUID mLastSetTextures[LLTerrainMaterials::ASSET_COUNT];
+ LLUUID mLastSetMaterials[LLTerrainMaterials::ASSET_COUNT];
};
/////////////////////////////////////////////////////////////////////////////
@@ -303,13 +314,12 @@ public:
static void updateEstateName(const std::string& name);
static void updateEstateOwnerName(const std::string& name);
- virtual bool refreshFromRegion(LLViewerRegion* region);
- virtual bool estateUpdate(LLMessageSystem* msg);
+ bool refreshFromRegion(LLViewerRegion* region) override;
+ bool estateUpdate(LLMessageSystem* msg) override;
- // LLPanel
- virtual BOOL postBuild();
- virtual void updateChild(LLUICtrl* child_ctrl);
- virtual void refresh();
+ bool postBuild() override;
+ void updateChild(LLUICtrl* child_ctrl) override;
+ void refresh() override;
void refreshFromEstate();
@@ -319,14 +329,14 @@ public:
void setOwnerName(const std::string& name);
protected:
- virtual BOOL sendUpdate();
+ bool sendUpdate() override;
// confirmation dialog callback
bool callbackChangeLindenEstate(const LLSD& notification, const LLSD& response);
void commitEstateAccess();
void commitEstateManagers();
- BOOL checkSunHourSlider(LLUICtrl* child_ctrl);
+ bool checkSunHourSlider(LLUICtrl* child_ctrl);
U32 mEstateID;
};
@@ -339,17 +349,16 @@ public:
LLPanelEstateCovenant();
~LLPanelEstateCovenant() {}
- // LLPanel
- virtual BOOL postBuild();
- virtual void updateChild(LLUICtrl* child_ctrl);
- virtual bool refreshFromRegion(LLViewerRegion* region);
- virtual bool estateUpdate(LLMessageSystem* msg);
+ bool postBuild() override;
+ void updateChild(LLUICtrl* child_ctrl) override;
+ bool refreshFromRegion(LLViewerRegion* region) override;
+ bool estateUpdate(LLMessageSystem* msg) override;
// LLView overrides
- BOOL handleDragAndDrop(S32 x, S32 y, MASK mask,
- BOOL drop, EDragAndDropType cargo_type,
+ bool handleDragAndDrop(S32 x, S32 y, MASK mask,
+ bool drop, EDragAndDropType cargo_type,
void *cargo_data, EAcceptance *accept,
- std::string& tooltip_msg);
+ std::string& tooltip_msg) override;
static bool confirmChangeCovenantCallback(const LLSD& notification, const LLSD& response);
static void resetCovenantID(void* userdata);
static bool confirmResetCovenantCallback(const LLSD& notification, const LLSD& response);
@@ -382,7 +391,7 @@ public:
} EAssetStatus;
protected:
- virtual BOOL sendUpdate();
+ bool sendUpdate() override;
LLTextBox* mEstateNameText;
LLTextBox* mEstateOwnerText;
LLTextBox* mLastModifiedText;
@@ -401,16 +410,19 @@ class LLPanelRegionExperiences : public LLPanelRegionInfo
public:
LLPanelRegionExperiences(){}
- /*virtual*/ BOOL postBuild();
- virtual BOOL sendUpdate();
+ bool postBuild() override;
static bool experienceCoreConfirm(const LLSD& notification, const LLSD& response);
static void sendEstateExperienceDelta(U32 flags, const LLUUID& agent_id);
static void infoCallback(LLHandle<LLPanelRegionExperiences> handle, const LLSD& content);
- bool refreshFromRegion(LLViewerRegion* region);
+ bool refreshFromRegion(LLViewerRegion* region) override;
void sendPurchaseRequest()const;
void processResponse( const LLSD& content );
+
+protected:
+ bool sendUpdate() override;
+
private:
void refreshRegionExperiences();
@@ -435,8 +447,8 @@ class LLPanelEstateAccess : public LLPanelRegionInfo
public:
LLPanelEstateAccess();
- virtual BOOL postBuild();
- virtual void updateChild(LLUICtrl* child_ctrl);
+ bool postBuild() override;
+ void updateChild(LLUICtrl* child_ctrl) override;
void updateControls(LLViewerRegion* region);
void updateLists();
@@ -444,7 +456,7 @@ public:
void setPendingUpdate(bool pending) { mPendingUpdate = pending; }
bool getPendingUpdate() { return mPendingUpdate; }
- virtual bool refreshFromRegion(LLViewerRegion* region);
+ bool refreshFromRegion(LLViewerRegion* region) override;
private:
void onClickAddAllowedAgent();
@@ -486,7 +498,7 @@ private:
void copyListToClipboard(std::string list_name);
bool mPendingUpdate;
- BOOL mCtrlsEnabled;
+ bool mCtrlsEnabled;
};
#endif
diff --git a/indra/newview/llfloaterregionrestarting.cpp b/indra/newview/llfloaterregionrestarting.cpp
index 95d4265bb4..d370106d49 100644
--- a/indra/newview/llfloaterregionrestarting.cpp
+++ b/indra/newview/llfloaterregionrestarting.cpp
@@ -50,7 +50,7 @@ LLFloaterRegionRestarting::~LLFloaterRegionRestarting()
mRegionChangedConnection.disconnect();
}
-BOOL LLFloaterRegionRestarting::postBuild()
+bool LLFloaterRegionRestarting::postBuild()
{
mRegionChangedConnection = gAgent.addRegionChangedCallback(boost::bind(&LLFloaterRegionRestarting::regionChange, this));
@@ -66,7 +66,7 @@ BOOL LLFloaterRegionRestarting::postBuild()
refresh();
- return TRUE;
+ return true;
}
void LLFloaterRegionRestarting::regionChange()
@@ -74,11 +74,11 @@ void LLFloaterRegionRestarting::regionChange()
close();
}
-BOOL LLFloaterRegionRestarting::tick()
+bool LLFloaterRegionRestarting::tick()
{
refresh();
- return FALSE;
+ return false;
}
void LLFloaterRegionRestarting::refresh()
diff --git a/indra/newview/llfloaterregionrestarting.h b/indra/newview/llfloaterregionrestarting.h
index 46416db2c8..b31005cc2d 100644
--- a/indra/newview/llfloaterregionrestarting.h
+++ b/indra/newview/llfloaterregionrestarting.h
@@ -42,8 +42,8 @@ public:
private:
LLFloaterRegionRestarting(const LLSD& key);
virtual ~LLFloaterRegionRestarting();
- virtual BOOL postBuild();
- virtual BOOL tick();
+ virtual bool postBuild();
+ virtual bool tick();
virtual void refresh();
virtual void draw();
virtual void regionChange();
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index 2df4ca973d..5f3e69189d 100644
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -151,10 +151,10 @@ LLFloaterReporter::LLFloaterReporter(const LLSD& key)
mScreenID(),
mAbuserID(),
mOwnerName(),
- mDeselectOnClose( FALSE ),
- mPicking( FALSE),
+ mDeselectOnClose( false ),
+ mPicking( false),
mPosition(),
- mCopyrightWarningSeen( FALSE ),
+ mCopyrightWarningSeen( false ),
mResourceDatap(new LLResourceData()),
mAvatarNameCacheConnection()
{
@@ -162,13 +162,13 @@ LLFloaterReporter::LLFloaterReporter(const LLSD& key)
}
// virtual
-BOOL LLFloaterReporter::postBuild()
+bool LLFloaterReporter::postBuild()
{
LLSLURL slurl;
LLAgentUI::buildSLURL(slurl);
getChild<LLUICtrl>("abuse_location_edit")->setValue(slurl.getSLURLString());
- enableControls(TRUE);
+ enableControls(true);
// convert the position to a string
LLVector3d pos = gAgent.getPositionGlobal();
@@ -185,7 +185,7 @@ BOOL LLFloaterReporter::postBuild()
getChild<LLUICtrl>("owner_name")->setValue(LLStringUtil::null);
mOwnerName = LLStringUtil::null;
- getChild<LLUICtrl>("summary_edit")->setFocus(TRUE);
+ getChild<LLUICtrl>("summary_edit")->setFocus(true);
mDefaultSummary = getChild<LLUICtrl>("details_edit")->getValue().asString();
@@ -229,7 +229,7 @@ BOOL LLFloaterReporter::postBuild()
center();
- return TRUE;
+ return true;
}
// virtual
@@ -268,11 +268,11 @@ void LLFloaterReporter::onIdle(void* user_data)
}
}
-void LLFloaterReporter::enableControls(BOOL enable)
+void LLFloaterReporter::enableControls(bool enable)
{
getChildView("category_combo")->setEnabled(enable);
getChildView("chat_check")->setEnabled(enable);
- getChildView("screenshot")->setEnabled(FALSE);
+ getChildView("screenshot")->setEnabled(false);
getChildView("pick_btn")->setEnabled(enable);
getChildView("summary_edit")->setEnabled(enable);
getChildView("details_edit")->setEnabled(enable);
@@ -365,10 +365,10 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id)
void LLFloaterReporter::onClickSelectAbuser()
{
- LLView * button = findChild<LLButton>("select_abuser", TRUE);
+ LLView * button = findChild<LLButton>("select_abuser", true);
LLFloater * root_floater = gFloaterView->getParentFloater(this);
- LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterReporter::callbackAvatarID, this, _1, _2), FALSE, TRUE, FALSE, root_floater->getName(), button);
+ LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterReporter::callbackAvatarID, this, _1, _2), false, true, false, root_floater->getName(), button);
if (picker)
{
root_floater->addDependentFloater(picker);
@@ -504,7 +504,7 @@ void LLFloaterReporter::onClickSend(void *userdata)
category_value == IP_PERMISSONS_EXPLOIT)
{
LLNotificationsUtil::add("HelpReportAbuseContainsCopyright");
- self->mCopyrightWarningSeen = TRUE;
+ self->mCopyrightWarningSeen = true;
return;
}
}
@@ -528,8 +528,8 @@ void LLFloaterReporter::onClickSend(void *userdata)
}
else
{
- self->getChildView("send_btn")->setEnabled(FALSE);
- self->getChildView("cancel_btn")->setEnabled(FALSE);
+ self->getChildView("send_btn")->setEnabled(false);
+ self->getChildView("cancel_btn")->setEnabled(false);
// the callback from uploading the image calls sendReportViaLegacy()
self->uploadImage();
}
@@ -543,7 +543,7 @@ void LLFloaterReporter::onClickCancel(void *userdata)
LLFloaterReporter *self = (LLFloaterReporter *)userdata;
// reset flag in case the next report also contains this text
- self->mCopyrightWarningSeen = FALSE;
+ self->mCopyrightWarningSeen = false;
if (self->mPicking)
{
@@ -559,12 +559,12 @@ void LLFloaterReporter::onClickObjPicker(void *userdata)
LLFloaterReporter *self = (LLFloaterReporter *)userdata;
LLToolObjPicker::getInstance()->setExitCallback(LLFloaterReporter::closePickTool, self);
LLToolMgr::getInstance()->setTransientTool(LLToolObjPicker::getInstance());
- self->mPicking = TRUE;
+ self->mPicking = true;
self->getChild<LLUICtrl>("object_name")->setValue(LLStringUtil::null);
self->getChild<LLUICtrl>("owner_name")->setValue(LLStringUtil::null);
self->mOwnerName = LLStringUtil::null;
LLButton* pick_btn = self->getChild<LLButton>("pick_btn");
- if (pick_btn) pick_btn->setToggleState(TRUE);
+ if (pick_btn) pick_btn->setToggleState(true);
}
@@ -577,9 +577,9 @@ void LLFloaterReporter::closePickTool(void *userdata)
self->getObjectInfo(object_id);
LLToolMgr::getInstance()->clearTransientTool();
- self->mPicking = FALSE;
+ self->mPicking = false;
LLButton* pick_btn = self->getChild<LLButton>("pick_btn");
- if (pick_btn) pick_btn->setToggleState(FALSE);
+ if (pick_btn) pick_btn->setToggleState(false);
}
@@ -594,7 +594,7 @@ void LLFloaterReporter::showFromMenu(EReportType report_type)
LLFloaterReporter* reporter_floater = LLFloaterReg::findTypedInstance<LLFloaterReporter>("reporter");
if(reporter_floater && reporter_floater->isInVisibleChain())
{
- gSavedPerAccountSettings.setBOOL("PreviousScreenshotForReport", FALSE);
+ gSavedPerAccountSettings.setBOOL("PreviousScreenshotForReport", false);
}
reporter_floater = LLFloaterReg::showTypedInstance<LLFloaterReporter>("reporter", LLSD());
if (reporter_floater)
@@ -609,7 +609,7 @@ void LLFloaterReporter::show(const LLUUID& object_id, const std::string& avatar_
LLFloaterReporter* reporter_floater = LLFloaterReg::findTypedInstance<LLFloaterReporter>("reporter");
if(reporter_floater && reporter_floater->isInVisibleChain())
{
- gSavedPerAccountSettings.setBOOL("PreviousScreenshotForReport", FALSE);
+ gSavedPerAccountSettings.setBOOL("PreviousScreenshotForReport", false);
}
reporter_floater = LLFloaterReg::showTypedInstance<LLFloaterReporter>("reporter");
if (avatar_name.empty())
@@ -627,7 +627,7 @@ void LLFloaterReporter::show(const LLUUID& object_id, const std::string& avatar_
}
// Need to deselect on close
- reporter_floater->mDeselectOnClose = TRUE;
+ reporter_floater->mDeselectOnClose = true;
}
@@ -637,13 +637,13 @@ void LLFloaterReporter::showFromExperience( const LLUUID& experience_id )
LLFloaterReporter* reporter_floater = LLFloaterReg::findTypedInstance<LLFloaterReporter>("reporter");
if(reporter_floater && reporter_floater->isInVisibleChain())
{
- gSavedPerAccountSettings.setBOOL("PreviousScreenshotForReport", FALSE);
+ gSavedPerAccountSettings.setBOOL("PreviousScreenshotForReport", false);
}
reporter_floater = LLFloaterReg::showTypedInstance<LLFloaterReporter>("reporter");
reporter_floater->getExperienceInfo(experience_id);
// Need to deselect on close
- reporter_floater->mDeselectOnClose = TRUE;
+ reporter_floater->mDeselectOnClose = true;
}
@@ -739,7 +739,7 @@ LLSD LLFloaterReporter::gatherReport()
if (!regionp) return LLSD(); // *TODO handle this failure case more gracefully
// reset flag in case the next report also contains this text
- mCopyrightWarningSeen = FALSE;
+ mCopyrightWarningSeen = false;
std::ostringstream summary;
if (!LLGridManager::getInstance()->isInProductionGrid())
@@ -873,7 +873,7 @@ void LLFloaterReporter::sendReportViaCaps(std::string url, std::string sshot_url
void LLFloaterReporter::takeScreenshot(bool use_prev_screenshot)
{
- gSavedPerAccountSettings.setBOOL("PreviousScreenshotForReport", TRUE);
+ gSavedPerAccountSettings.setBOOL("PreviousScreenshotForReport", true);
if(!use_prev_screenshot)
{
std::string screenshot_filename(gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter() + SCREEN_PREV_FILENAME);
@@ -917,7 +917,7 @@ void LLFloaterReporter::takeScreenshot(bool use_prev_screenshot)
// store in the image list so it doesn't try to fetch from the server
LLPointer<LLViewerFetchedTexture> image_in_list =
LLViewerTextureManager::getFetchedTexture(mResourceDatap->mAssetInfo.mUuid);
- image_in_list->createGLTexture(0, mImageRaw, 0, TRUE, LLGLTexture::OTHER);
+ image_in_list->createGLTexture(0, mImageRaw, 0, true, LLGLTexture::OTHER);
// the texture picker then uses that texture
LLTextureCtrl* texture = getChild<LLTextureCtrl>("screenshot");
@@ -937,14 +937,14 @@ void LLFloaterReporter::takeNewSnapshot()
const S32 IMAGE_HEIGHT = 768;
// Take a screenshot, but don't draw this floater.
- setVisible(FALSE);
- if (!gViewerWindow->rawSnapshot(mImageRaw,IMAGE_WIDTH, IMAGE_HEIGHT, TRUE, FALSE, TRUE /*UI*/, TRUE, FALSE))
+ setVisible(false);
+ if (!gViewerWindow->rawSnapshot(mImageRaw,IMAGE_WIDTH, IMAGE_HEIGHT, true, false, true /*UI*/, true, false))
{
LL_WARNS() << "Unable to take screenshot" << LL_ENDL;
- setVisible(TRUE);
+ setVisible(true);
return;
}
- setVisible(TRUE);
+ setVisible(true);
if(gSavedPerAccountSettings.getBOOL("PreviousScreenshotForReport"))
{
@@ -988,7 +988,7 @@ void LLFloaterReporter::uploadImage()
gAssetStorage->storeAssetData(mResourceDatap->mAssetInfo.mTransactionID,
mResourceDatap->mAssetInfo.mType,
LLFloaterReporter::uploadDoneCallback,
- (void*)mResourceDatap, TRUE);
+ (void*)mResourceDatap, true);
}
diff --git a/indra/newview/llfloaterreporter.h b/indra/newview/llfloaterreporter.h
index b6c70e866d..ba4da60c52 100644
--- a/indra/newview/llfloaterreporter.h
+++ b/indra/newview/llfloaterreporter.h
@@ -80,7 +80,7 @@ class LLFloaterReporter
public:
LLFloaterReporter(const LLSD& key);
/*virtual*/ ~LLFloaterReporter();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ void onClose(bool app_quitting);
@@ -119,7 +119,7 @@ private:
void sendReportViaLegacy(const LLSD & report);
void sendReportViaCaps(std::string url, std::string sshot_url, const LLSD & report);
void setPosBox(const LLVector3d &pos);
- void enableControls(BOOL own_avatar);
+ void enableControls(bool own_avatar);
void getExperienceInfo(const LLUUID& object_id);
void getObjectInfo(const LLUUID& object_id);
void callbackAvatarID(const uuid_vec_t& ids, const std::vector<LLAvatarName> names);
@@ -137,10 +137,10 @@ private:
LLUUID mExperienceID;
// Store the real name, not the link, for upstream reporting
std::string mOwnerName;
- BOOL mDeselectOnClose;
- BOOL mPicking;
+ bool mDeselectOnClose;
+ bool mPicking;
LLVector3 mPosition;
- BOOL mCopyrightWarningSeen;
+ bool mCopyrightWarningSeen;
std::string mDefaultSummary;
LLResourceData* mResourceDatap;
boost::signals2::connection mAvatarNameCacheConnection;
diff --git a/indra/newview/llfloatersavecamerapreset.cpp b/indra/newview/llfloatersavecamerapreset.cpp
index 11809f9c82..66f7429747 100644
--- a/indra/newview/llfloatersavecamerapreset.cpp
+++ b/indra/newview/llfloatersavecamerapreset.cpp
@@ -47,7 +47,7 @@ LLFloaterSaveCameraPreset::LLFloaterSaveCameraPreset(const LLSD &key)
}
// virtual
-BOOL LLFloaterSaveCameraPreset::postBuild()
+bool LLFloaterSaveCameraPreset::postBuild()
{
mPresetCombo = getChild<LLComboBox>("preset_combo");
@@ -64,7 +64,7 @@ BOOL LLFloaterSaveCameraPreset::postBuild()
LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterSaveCameraPreset::onPresetsListChange, this));
- return TRUE;
+ return true;
}
void LLFloaterSaveCameraPreset::onPresetNameEdited()
@@ -113,7 +113,7 @@ void LLFloaterSaveCameraPreset::onBtnSave()
gSavedSettings.setVector3("CameraOffsetRearView", gAgentCamera.getCurrentCameraOffset());
gSavedSettings.setVector3d("FocusOffsetRearView", gAgentCamera.getCurrentFocusOffset());
gAgentCamera.resetCameraZoomFraction();
- gAgentCamera.setFocusOnAvatar(TRUE, TRUE, FALSE);
+ gAgentCamera.setFocusOnAvatar(true, true, false);
}
else
{
diff --git a/indra/newview/llfloatersavecamerapreset.h b/indra/newview/llfloatersavecamerapreset.h
index 282f213438..26d9716b35 100644
--- a/indra/newview/llfloatersavecamerapreset.h
+++ b/indra/newview/llfloatersavecamerapreset.h
@@ -40,8 +40,8 @@ class LLFloaterSaveCameraPreset : public LLModalDialog
public:
LLFloaterSaveCameraPreset(const LLSD &key);
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void onOpen(const LLSD& key);
+ bool postBuild() override;
+ void onOpen(const LLSD& key) override;
void onBtnSave();
void onBtnCancel();
diff --git a/indra/newview/llfloatersaveprefpreset.cpp b/indra/newview/llfloatersaveprefpreset.cpp
index dd47d02bfa..ce16056700 100644
--- a/indra/newview/llfloatersaveprefpreset.cpp
+++ b/indra/newview/llfloatersaveprefpreset.cpp
@@ -42,7 +42,7 @@ LLFloaterSavePrefPreset::LLFloaterSavePrefPreset(const LLSD &key)
}
// virtual
-BOOL LLFloaterSavePrefPreset::postBuild()
+bool LLFloaterSavePrefPreset::postBuild()
{
LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences");
if (preferences)
@@ -61,7 +61,7 @@ BOOL LLFloaterSavePrefPreset::postBuild()
mSaveButton = getChild<LLButton>("save");
mPresetCombo = getChild<LLComboBox>("preset_combo");
- return TRUE;
+ return true;
}
void LLFloaterSavePrefPreset::onPresetNameEdited()
diff --git a/indra/newview/llfloatersaveprefpreset.h b/indra/newview/llfloatersaveprefpreset.h
index ae58180e7f..e62e054b1d 100644
--- a/indra/newview/llfloatersaveprefpreset.h
+++ b/indra/newview/llfloatersaveprefpreset.h
@@ -38,8 +38,8 @@ class LLFloaterSavePrefPreset : public LLFloater
public:
LLFloaterSavePrefPreset(const LLSD &key);
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void onOpen(const LLSD& key);
+ bool postBuild() override;
+ void onOpen(const LLSD& key) override;
void onBtnSave();
void onBtnCancel();
diff --git a/indra/newview/llfloatersceneloadstats.cpp b/indra/newview/llfloatersceneloadstats.cpp
index 8aa93eae96..8e2120c5ba 100644
--- a/indra/newview/llfloatersceneloadstats.cpp
+++ b/indra/newview/llfloatersceneloadstats.cpp
@@ -34,7 +34,7 @@ LLFloaterSceneLoadStats::LLFloaterSceneLoadStats( const LLSD& key )
: LLFloater(key)
{}
-BOOL LLFloaterSceneLoadStats::postBuild()
+bool LLFloaterSceneLoadStats::postBuild()
{
- return TRUE;
+ return true;
}
diff --git a/indra/newview/llfloatersceneloadstats.h b/indra/newview/llfloatersceneloadstats.h
index aa414bf544..530367303a 100644
--- a/indra/newview/llfloatersceneloadstats.h
+++ b/indra/newview/llfloatersceneloadstats.h
@@ -36,7 +36,7 @@ private:
LLFloaterSceneLoadStats(const LLSD& key);
public:
- BOOL postBuild();
+ bool postBuild() override;
};
diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp
index 1ea3a07536..b31f7c3580 100644
--- a/indra/newview/llfloaterscriptdebug.cpp
+++ b/indra/newview/llfloaterscriptdebug.cpp
@@ -55,9 +55,9 @@ LLFloaterScriptDebug::LLFloaterScriptDebug(const LLSD& key)
{
// avoid resizing of the window to match
// the initial size of the tabbed-childs, whenever a tab is opened or closed
- mAutoResize = FALSE;
+ mAutoResize = false;
// enabled autocous blocks controling focus via LLFloaterReg::showInstance
- setAutoFocus(FALSE);
+ setAutoFocus(false);
}
LLFloaterScriptDebug::~LLFloaterScriptDebug()
@@ -69,26 +69,26 @@ void LLFloaterScriptDebug::show(const LLUUID& object_id)
addOutputWindow(object_id);
}
-BOOL LLFloaterScriptDebug::postBuild()
+bool LLFloaterScriptDebug::postBuild()
{
LLMultiFloater::postBuild();
if (mTabContainer)
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-void LLFloaterScriptDebug::setVisible(BOOL visible)
+void LLFloaterScriptDebug::setVisible(bool visible)
{
if(visible)
{
LLFloaterScriptDebugOutput* floater_output = LLFloaterReg::findTypedInstance<LLFloaterScriptDebugOutput>("script_debug_output", LLUUID::null);
if (floater_output == NULL)
{
- floater_output = dynamic_cast<LLFloaterScriptDebugOutput*>(LLFloaterReg::showInstance("script_debug_output", LLUUID::null, FALSE));
+ floater_output = dynamic_cast<LLFloaterScriptDebugOutput*>(LLFloaterReg::showInstance("script_debug_output", LLUUID::null, false));
if (floater_output)
{
addFloater(floater_output, false);
@@ -119,7 +119,7 @@ LLFloater* LLFloaterScriptDebug::addOutputWindow(const LLUUID &object_id)
LLFloater::setFloaterHost(host);
// prevent stealing focus, see EXT-8040
- LLFloater* floaterp = LLFloaterReg::showInstance("script_debug_output", object_id, FALSE);
+ LLFloater* floaterp = LLFloaterReg::showInstance("script_debug_output", object_id, false);
LLFloater::setFloaterHost(NULL);
return floaterp;
@@ -140,12 +140,12 @@ void LLFloaterScriptDebug::addScriptLine(const std::string &utf8mesg, const std:
{
if (isAgentAvatarValid())
{
- ((LLViewerObject*)gAgentAvatarp)->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI));
+ ((LLViewerObject*)gAgentAvatarp)->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", FTT_LOCAL_FILE, true, LLGLTexture::BOOST_UI));
}
}
else
{
- objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI));
+ objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", FTT_LOCAL_FILE, true, LLGLTexture::BOOST_UI));
}
floater_label = llformat("%s(%.0f, %.0f, %.0f)",
user_name.c_str(),
@@ -184,14 +184,14 @@ LLFloaterScriptDebugOutput::LLFloaterScriptDebugOutput(const LLSD& object_id)
mObjectID(object_id.asUUID())
{
// enabled autocous blocks controling focus via LLFloaterReg::showInstance
- setAutoFocus(FALSE);
+ setAutoFocus(false);
}
-BOOL LLFloaterScriptDebugOutput::postBuild()
+bool LLFloaterScriptDebugOutput::postBuild()
{
LLFloater::postBuild();
mHistoryEditor = getChild<LLViewerTextEditor>("Chat History Editor");
- return TRUE;
+ return true;
}
LLFloaterScriptDebugOutput::~LLFloaterScriptDebugOutput()
@@ -202,8 +202,8 @@ void LLFloaterScriptDebugOutput::addLine(const std::string &utf8mesg, const std:
{
if (mObjectID.isNull())
{
- setCanTearOff(FALSE);
- setCanClose(FALSE);
+ setCanTearOff(false);
+ setCanClose(false);
}
else
{
diff --git a/indra/newview/llfloaterscriptdebug.h b/indra/newview/llfloaterscriptdebug.h
index 8c08b234f3..dd5a8fbdaf 100644
--- a/indra/newview/llfloaterscriptdebug.h
+++ b/indra/newview/llfloaterscriptdebug.h
@@ -37,8 +37,8 @@ class LLFloaterScriptDebug : public LLMultiFloater
public:
LLFloaterScriptDebug(const LLSD& key);
virtual ~LLFloaterScriptDebug();
- virtual BOOL postBuild();
- virtual void setVisible(BOOL visible);
+ virtual bool postBuild();
+ virtual void setVisible(bool visible);
static void show(const LLUUID& object_id);
/*virtual*/ void closeFloater(bool app_quitting = false);
@@ -59,7 +59,7 @@ public:
void addLine(const std::string &utf8mesg, const std::string &user_name, const LLColor4& color);
- virtual BOOL postBuild();
+ virtual bool postBuild();
protected:
LLTextEditor* mHistoryEditor;
diff --git a/indra/newview/llfloaterscriptedprefs.cpp b/indra/newview/llfloaterscriptedprefs.cpp
index 2484a08626..742b512872 100644
--- a/indra/newview/llfloaterscriptedprefs.cpp
+++ b/indra/newview/llfloaterscriptedprefs.cpp
@@ -40,7 +40,7 @@ LLFloaterScriptEdPrefs::LLFloaterScriptEdPrefs(const LLSD& key)
mCommitCallbackRegistrar.add("ScriptPref.getUIColor", boost::bind(&LLFloaterScriptEdPrefs::getUIColor, this ,_1, _2));
}
-BOOL LLFloaterScriptEdPrefs::postBuild()
+bool LLFloaterScriptEdPrefs::postBuild()
{
mEditor = getChild<LLScriptEditor>("Script Preview");
if (mEditor)
@@ -48,7 +48,7 @@ BOOL LLFloaterScriptEdPrefs::postBuild()
mEditor->initKeywords();
mEditor->loadKeywords();
}
- return TRUE;
+ return true;
}
void LLFloaterScriptEdPrefs::applyUIColor(LLUICtrl* ctrl, const LLSD& param)
diff --git a/indra/newview/llfloaterscriptedprefs.h b/indra/newview/llfloaterscriptedprefs.h
index 31df897aac..f6a9027bfa 100644
--- a/indra/newview/llfloaterscriptedprefs.h
+++ b/indra/newview/llfloaterscriptedprefs.h
@@ -37,7 +37,7 @@ class LLFloaterScriptEdPrefs : public LLFloater
{
public:
LLFloaterScriptEdPrefs(const LLSD& key);
- BOOL postBuild();
+ bool postBuild() override;
private:
~LLFloaterScriptEdPrefs() {};
diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp
index 40fe11b309..e274b6b954 100644
--- a/indra/newview/llfloaterscriptlimits.cpp
+++ b/indra/newview/llfloaterscriptlimits.cpp
@@ -88,14 +88,14 @@ LLFloaterScriptLimits::LLFloaterScriptLimits(const LLSD& seed)
{
}
-BOOL LLFloaterScriptLimits::postBuild()
+bool LLFloaterScriptLimits::postBuild()
{
mTab = getChild<LLTabContainer>("scriptlimits_panels");
if(!mTab)
{
LL_WARNS() << "Error! couldn't get scriptlimits_panels, aborting Script Information setup" << LL_ENDL;
- return FALSE;
+ return false;
}
// contruct the panel
@@ -104,7 +104,7 @@ BOOL LLFloaterScriptLimits::postBuild()
panel_memory->buildFromFile( "panel_script_limits_region_memory.xml");
mTab->addTabPanel(panel_memory);
mTab->selectTab(0);
- return TRUE;
+ return true;
}
LLFloaterScriptLimits::~LLFloaterScriptLimits()
@@ -132,10 +132,10 @@ LLPanelScriptLimitsInfo::LLPanelScriptLimitsInfo()
// virtual
-BOOL LLPanelScriptLimitsInfo::postBuild()
+bool LLPanelScriptLimitsInfo::postBuild()
{
refresh();
- return TRUE;
+ return true;
}
// virtual
@@ -156,9 +156,9 @@ LLPanelScriptLimitsRegionMemory::~LLPanelScriptLimitsRegionMemory()
}
};
-BOOL LLPanelScriptLimitsRegionMemory::getLandScriptResources()
+bool LLPanelScriptLimitsRegionMemory::getLandScriptResources()
{
- if (!gAgent.getRegion()) return FALSE;
+ if (!gAgent.getRegion()) return false;
LLSD body;
std::string url = gAgent.getRegion()->getCapability("LandResources");
@@ -166,11 +166,11 @@ BOOL LLPanelScriptLimitsRegionMemory::getLandScriptResources()
{
LLCoros::instance().launch("LLPanelScriptLimitsRegionMemory::getLandScriptResourcesCoro",
boost::bind(&LLPanelScriptLimitsRegionMemory::getLandScriptResourcesCoro, this, url));
- return TRUE;
+ return true;
}
else
{
- return FALSE;
+ return false;
}
}
@@ -468,7 +468,7 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content)
// ...and if not use the slightly more painful method of disovery:
else
{
- BOOL name_is_cached;
+ bool name_is_cached;
if (is_group_owned)
{
name_is_cached = gCacheName->getGroupName(owner_id, owner_buf);
@@ -640,7 +640,7 @@ void LLPanelScriptLimitsRegionMemory::setRegionSummary(LLSD content)
}
}
-BOOL LLPanelScriptLimitsRegionMemory::postBuild()
+bool LLPanelScriptLimitsRegionMemory::postBuild()
{
childSetAction("refresh_list_btn", onClickRefresh, this);
childSetAction("highlight_btn", onClickHighlight, this);
@@ -652,7 +652,7 @@ BOOL LLPanelScriptLimitsRegionMemory::postBuild()
LLScrollListCtrl *list = getChild<LLScrollListCtrl>("scripts_list");
if(!list)
{
- return FALSE;
+ return false;
}
list->setCommitCallback(boost::bind(&LLPanelScriptLimitsRegionMemory::checkButtonsEnabled, this));
checkButtonsEnabled();
@@ -661,13 +661,13 @@ BOOL LLPanelScriptLimitsRegionMemory::postBuild()
for(S32 column = 0; column < list->getNumColumns(); column++)
{
LLScrollListColumn* columnp = list->getColumn(column);
- columnp->mHeader->setHasResizableElement(TRUE);
+ columnp->mHeader->setHasResizableElement(true);
}
return StartRequestChain();
}
-BOOL LLPanelScriptLimitsRegionMemory::StartRequestChain()
+bool LLPanelScriptLimitsRegionMemory::StartRequestChain()
{
LLUUID region_id;
@@ -677,7 +677,7 @@ BOOL LLPanelScriptLimitsRegionMemory::StartRequestChain()
getChild<LLUICtrl>("loading_text")->setValue(LLSD(std::string("")));
//might have to do parent post build here
//if not logic below could use early outs
- return FALSE;
+ return false;
}
LLParcel* parcel = instance->getCurrentSelectedParcel();
LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
@@ -693,7 +693,7 @@ BOOL LLPanelScriptLimitsRegionMemory::StartRequestChain()
{
std::string msg_wrong_region = LLTrans::getString("ScriptLimitsRequestWrongRegion");
getChild<LLUICtrl>("loading_text")->setValue(LLSD(msg_wrong_region));
- return FALSE;
+ return false;
}
LLVector3d pos_global = region->getCenterGlobal();
diff --git a/indra/newview/llfloaterscriptlimits.h b/indra/newview/llfloaterscriptlimits.h
index d2192f9d01..193733414c 100644
--- a/indra/newview/llfloaterscriptlimits.h
+++ b/indra/newview/llfloaterscriptlimits.h
@@ -47,7 +47,7 @@ class LLFloaterScriptLimits : public LLFloater
friend class LLFloaterReg;
public:
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
// from LLPanel
virtual void refresh();
@@ -71,7 +71,7 @@ class LLPanelScriptLimitsInfo : public LLPanel
public:
LLPanelScriptLimitsInfo();
- virtual BOOL postBuild();
+ virtual bool postBuild();
virtual void updateChild(LLUICtrl* child_ctrl);
protected:
@@ -102,14 +102,14 @@ public:
~LLPanelScriptLimitsRegionMemory();
// LLPanel
- virtual BOOL postBuild();
+ virtual bool postBuild();
void setRegionDetails(LLSD content);
void setRegionSummary(LLSD content);
- BOOL StartRequestChain();
+ bool StartRequestChain();
- BOOL getLandScriptResources();
+ bool getLandScriptResources();
void clearList();
void showBeacon();
void returnObjectsFromParcel(S32 local_id);
diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp
index 37ae80fa8f..84cff0cd9a 100644
--- a/indra/newview/llfloatersearch.cpp
+++ b/indra/newview/llfloatersearch.cpp
@@ -106,12 +106,12 @@ LLFloaterSearch::LLFloaterSearch(const Params& key) :
mCollectionType.insert("people");
}
-BOOL LLFloaterSearch::postBuild()
+bool LLFloaterSearch::postBuild()
{
LLFloaterWebContent::postBuild();
mWebBrowser->addObserver(this);
- return TRUE;
+ return true;
}
void LLFloaterSearch::onOpen(const LLSD& key)
@@ -121,7 +121,7 @@ void LLFloaterSearch::onOpen(const LLSD& key)
p.allow_address_entry = false;
LLFloaterWebContent::onOpen(p);
- mWebBrowser->setFocus(TRUE);
+ mWebBrowser->setFocus(true);
search(p.search);
}
@@ -153,7 +153,7 @@ void LLFloaterSearch::search(const SearchQuery &p)
}
// reset the god level warning as we're sending the latest state
- getChildView("refresh_search")->setVisible(FALSE);
+ getChildView("refresh_search")->setVisible(false);
mSearchGodLevel = gAgent.getGodLevel();
// work out the subdir to use based on the requested category
diff --git a/indra/newview/llfloatersearch.h b/indra/newview/llfloatersearch.h
index cc77ce696f..03cdae042e 100644
--- a/indra/newview/llfloatersearch.h
+++ b/indra/newview/llfloatersearch.h
@@ -83,7 +83,7 @@ public:
void godLevelChanged(U8 godlevel);
private:
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
std::set<std::string> mSearchType;
std::set<std::string> mCollectionType;
diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp
index b139e5daf5..c5274efb4a 100644
--- a/indra/newview/llfloatersellland.cpp
+++ b/indra/newview/llfloatersellland.cpp
@@ -99,7 +99,7 @@ private:
void onBuyerNameCache(const LLAvatarName& av_name);
public:
- virtual BOOL postBuild();
+ virtual bool postBuild();
bool setParcel(LLViewerRegion* region, LLParcelSelectionHandle parcel);
static bool callbackHighlightTransferable(const LLSD& notification, const LLSD& response);
@@ -165,7 +165,7 @@ void LLFloaterSellLandUI::SelectionObserver::changed()
}
}
-BOOL LLFloaterSellLandUI::postBuild()
+bool LLFloaterSellLandUI::postBuild()
{
childSetCommitCallback("sell_to", onChangeValue, this);
childSetCommitCallback("price", onChangeValue, this);
@@ -177,7 +177,7 @@ BOOL LLFloaterSellLandUI::postBuild()
childSetAction("show_objects", doShowObjects, this);
center();
getChild<LLUICtrl>("profile_scroll")->setTabStop(true);
- return TRUE;
+ return true;
}
bool LLFloaterSellLandUI::setParcel(LLViewerRegion* region, LLParcelSelectionHandle parcel)
@@ -291,13 +291,13 @@ void LLFloaterSellLandUI::refreshUI()
F32 per_meter_price = 0;
per_meter_price = F32(mParcelPrice) / F32(mParcelActualArea);
getChild<LLUICtrl>("price_per_m")->setTextArg("[PER_METER]", llformat("%0.2f", per_meter_price));
- getChildView("price_per_m")->setVisible(TRUE);
+ getChildView("price_per_m")->setVisible(true);
setBadge("step_price", BADGE_OK);
}
else
{
- getChildView("price_per_m")->setVisible(FALSE);
+ getChildView("price_per_m")->setVisible(false);
if ("" == price_str)
{
@@ -312,8 +312,8 @@ void LLFloaterSellLandUI::refreshUI()
if (mSellToBuyer)
{
getChild<LLUICtrl>("sell_to")->setValue("user");
- getChildView("sell_to_agent")->setVisible(TRUE);
- getChildView("sell_to_select_agent")->setVisible(TRUE);
+ getChildView("sell_to_agent")->setVisible(true);
+ getChildView("sell_to_select_agent")->setVisible(true);
}
else
{
@@ -325,8 +325,8 @@ void LLFloaterSellLandUI::refreshUI()
{
getChild<LLUICtrl>("sell_to")->setValue("select");
}
- getChildView("sell_to_agent")->setVisible(FALSE);
- getChildView("sell_to_select_agent")->setVisible(FALSE);
+ getChildView("sell_to_agent")->setVisible(false);
+ getChildView("sell_to_select_agent")->setVisible(false);
}
// Must select Sell To: Anybody, or User (with a specified username)
@@ -356,11 +356,11 @@ void LLFloaterSellLandUI::refreshUI()
if (valid_sell_to && valid_price && valid_sell_objects)
{
- getChildView("sell_btn")->setEnabled(TRUE);
+ getChildView("sell_btn")->setEnabled(true);
}
else
{
- getChildView("sell_btn")->setEnabled(FALSE);
+ getChildView("sell_btn")->setEnabled(false);
}
}
@@ -403,7 +403,7 @@ void LLFloaterSellLandUI::onChangeValue(LLUICtrl *ctrl, void *userdata)
void LLFloaterSellLandUI::doSelectAgent()
{
LLView * button = findChild<LLView>("sell_to_select_agent");
- LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterSellLandUI::callbackAvatarPick, this, _1, _2), FALSE, TRUE, FALSE, this->getName(), button);
+ LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterSellLandUI::callbackAvatarPick, this, _1, _2), false, true, false, this->getName(), button);
// grandparent is a floater, in order to set up dependency
if (picker)
{
@@ -537,7 +537,7 @@ bool LLFloaterSellLandUI::onConfirmSale(const LLSD& notification, const LLSD& re
// return;
// }
- parcel->setParcelFlag(PF_FOR_SALE, TRUE);
+ parcel->setParcelFlag(PF_FOR_SALE, true);
parcel->setSalePrice(sale_price);
bool sell_with_objects = false;
if ("yes" == getChild<LLUICtrl>("sell_objects")->getValue().asString())
diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp
index 3c7f341613..210f938667 100644
--- a/indra/newview/llfloatersettingsdebug.cpp
+++ b/indra/newview/llfloatersettingsdebug.cpp
@@ -47,7 +47,7 @@ LLFloaterSettingsDebug::LLFloaterSettingsDebug(const LLSD& key)
LLFloaterSettingsDebug::~LLFloaterSettingsDebug()
{}
-BOOL LLFloaterSettingsDebug::postBuild()
+bool LLFloaterSettingsDebug::postBuild()
{
enableResizeCtrls(true, false, true);
@@ -56,14 +56,14 @@ BOOL LLFloaterSettingsDebug::postBuild()
getChild<LLFilterEditor>("filter_input")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::setSearchFilter, this, _2));
mSettingList = getChild<LLScrollListCtrl>("setting_list");
- mSettingList->setCommitOnSelectionChange(TRUE);
+ mSettingList->setCommitOnSelectionChange(true);
mSettingList->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onSettingSelect, this));
updateList();
gSavedSettings.getControl("DebugSettingsHideDefault")->getCommitSignal()->connect(boost::bind(&LLFloaterSettingsDebug::updateList, this, false));
- return TRUE;
+ return true;
}
void LLFloaterSettingsDebug::draw()
@@ -247,7 +247,7 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
switch(type)
{
case TYPE_U32:
- spinner1->setVisible(TRUE);
+ spinner1->setVisible(true);
spinner1->setLabel(std::string("value")); // Debug, don't translate
if (!spinner1->hasFocus())
{
@@ -259,7 +259,7 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
}
break;
case TYPE_S32:
- spinner1->setVisible(TRUE);
+ spinner1->setVisible(true);
spinner1->setLabel(std::string("value")); // Debug, don't translate
if (!spinner1->hasFocus())
{
@@ -271,7 +271,7 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
}
break;
case TYPE_F32:
- spinner1->setVisible(TRUE);
+ spinner1->setVisible(true);
spinner1->setLabel(std::string("value")); // Debug, don't translate
if (!spinner1->hasFocus())
{
@@ -293,7 +293,7 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
}
break;
case TYPE_STRING:
- getChildView("val_text")->setVisible( TRUE);
+ getChildView("val_text")->setVisible( true);
if (!getChild<LLUICtrl>("val_text")->hasFocus())
{
getChild<LLUICtrl>("val_text")->setValue(sd);
@@ -303,11 +303,11 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
{
LLVector3 v;
v.setValue(sd);
- spinner1->setVisible(TRUE);
+ spinner1->setVisible(true);
spinner1->setLabel(std::string("X"));
- spinner2->setVisible(TRUE);
+ spinner2->setVisible(true);
spinner2->setLabel(std::string("Y"));
- spinner3->setVisible(TRUE);
+ spinner3->setVisible(true);
spinner3->setLabel(std::string("Z"));
if (!spinner1->hasFocus())
{
@@ -330,11 +330,11 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
{
LLVector3d v;
v.setValue(sd);
- spinner1->setVisible(TRUE);
+ spinner1->setVisible(true);
spinner1->setLabel(std::string("X"));
- spinner2->setVisible(TRUE);
+ spinner2->setVisible(true);
spinner2->setLabel(std::string("Y"));
- spinner3->setVisible(TRUE);
+ spinner3->setVisible(true);
spinner3->setLabel(std::string("Z"));
if (!spinner1->hasFocus())
{
@@ -357,13 +357,13 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
{
LLQuaternion q;
q.setValue(sd);
- spinner1->setVisible(TRUE);
+ spinner1->setVisible(true);
spinner1->setLabel(std::string("X"));
- spinner2->setVisible(TRUE);
+ spinner2->setVisible(true);
spinner2->setLabel(std::string("Y"));
- spinner3->setVisible(TRUE);
+ spinner3->setVisible(true);
spinner3->setLabel(std::string("Z"));
- spinner4->setVisible(TRUE);
+ spinner4->setVisible(true);
spinner4->setLabel(std::string("S"));
if (!spinner1->hasFocus())
{
@@ -391,13 +391,13 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
{
LLRect r;
r.setValue(sd);
- spinner1->setVisible(TRUE);
+ spinner1->setVisible(true);
spinner1->setLabel(std::string("Left"));
- spinner2->setVisible(TRUE);
+ spinner2->setVisible(true);
spinner2->setLabel(std::string("Right"));
- spinner3->setVisible(TRUE);
+ spinner3->setVisible(true);
spinner3->setLabel(std::string("Bottom"));
- spinner4->setVisible(TRUE);
+ spinner4->setVisible(true);
spinner4->setLabel(std::string("Top"));
if (!spinner1->hasFocus())
{
@@ -441,13 +441,13 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
{
LLColor4 clr;
clr.setValue(sd);
- color_swatch->setVisible(TRUE);
+ color_swatch->setVisible(true);
// only set if changed so color picker doesn't update
if(clr != LLColor4(color_swatch->getValue()))
{
- color_swatch->set(LLColor4(sd), TRUE, FALSE);
+ color_swatch->set(LLColor4(sd), true, false);
}
- spinner4->setVisible(TRUE);
+ spinner4->setVisible(true);
spinner4->setLabel(std::string("Alpha"));
if (!spinner4->hasFocus())
{
@@ -462,7 +462,7 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
{
LLColor3 clr;
clr.setValue(sd);
- color_swatch->setVisible(TRUE);
+ color_swatch->setVisible(true);
color_swatch->setValue(sd);
break;
}
diff --git a/indra/newview/llfloatersettingsdebug.h b/indra/newview/llfloatersettingsdebug.h
index 888eaadcbd..75e5752d29 100644
--- a/indra/newview/llfloatersettingsdebug.h
+++ b/indra/newview/llfloatersettingsdebug.h
@@ -39,7 +39,7 @@ class LLFloaterSettingsDebug
public:
- virtual BOOL postBuild();
+ virtual bool postBuild();
virtual void draw();
void updateControl(LLControlVariable* control);
diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp
index 532e7da67f..2305764914 100644
--- a/indra/newview/llfloatersidepanelcontainer.cpp
+++ b/indra/newview/llfloatersidepanelcontainer.cpp
@@ -125,7 +125,7 @@ LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_na
}
else if (!hasFocus())
{
- setFocus(TRUE);
+ setFocus(true);
}
LLPanel* panel = NULL;
diff --git a/indra/newview/llfloatersimplesnapshot.cpp b/indra/newview/llfloatersimplesnapshot.cpp
index 58604c5628..b021d01682 100644
--- a/indra/newview/llfloatersimplesnapshot.cpp
+++ b/indra/newview/llfloatersimplesnapshot.cpp
@@ -50,7 +50,7 @@ const S32 LLFloaterSimpleSnapshot::THUMBNAIL_SNAPSHOT_DIM_MIN = 64;
static const std::string THUMBNAIL_UPLOAD_CAP = "InventoryThumbnailUpload";
-void post_thumbnail_image_coro(std::string cap_url, std::string path_to_image, LLSD first_data)
+void post_thumbnail_image_coro(std::string cap_url, std::string path_to_image, LLSD first_data, LLFloaterSimpleSnapshot::completion_t callback)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
@@ -129,6 +129,11 @@ void post_thumbnail_image_coro(std::string cap_url, std::string path_to_image, L
{
LL_WARNS("Thumbnail") << "Failed to upload image " << result << LL_ENDL;
}
+
+ if (callback)
+ {
+ callback(LLUUID());
+ }
return;
}
@@ -153,6 +158,11 @@ void post_thumbnail_image_coro(std::string cap_url, std::string path_to_image, L
// Are we supposed to get BulkUpdateInventory?
gInventory.addChangedMask(LLInventoryObserver::INTERNAL, item_id);
}
+
+ if (callback)
+ {
+ callback(result["new_asset"].asUUID());
+ }
}
///----------------------------------------------------------------------------
@@ -218,8 +228,8 @@ void LLFloaterSimpleSnapshot::Impl::updateResolution(void* data)
if (original_width != width || original_height != height)
{
// hide old preview as the aspect ratio could be wrong
- checkAutoSnapshot(previewp, FALSE);
- previewp->updateSnapshot(TRUE);
+ checkAutoSnapshot(previewp, false);
+ previewp->updateSnapshot(true);
}
}
}
@@ -258,7 +268,7 @@ LLFloaterSimpleSnapshot::~LLFloaterSimpleSnapshot()
{
}
-BOOL LLFloaterSimpleSnapshot::postBuild()
+bool LLFloaterSimpleSnapshot::postBuild()
{
childSetAction("new_snapshot_btn", ImplBase::onClickNewSnapshot, this);
childSetAction("save_btn", boost::bind(&LLFloaterSimpleSnapshot::onSend, this));
@@ -281,15 +291,15 @@ BOOL LLFloaterSimpleSnapshot::postBuild()
impl->setAdvanced(true);
impl->setSkipReshaping(true);
- previewp->mKeepAspectRatio = FALSE;
+ previewp->mKeepAspectRatio = false;
previewp->setThumbnailPlaceholderRect(getThumbnailPlaceholderRect());
previewp->setAllowRenderUI(false);
- previewp->setThumbnailSubsampled(TRUE);
+ previewp->setThumbnailSubsampled(true);
- return TRUE;
+ return true;
}
-const S32 PREVIEW_OFFSET_Y = 70;
+constexpr S32 PREVIEW_OFFSET_Y = 70;
void LLFloaterSimpleSnapshot::draw()
{
@@ -338,12 +348,12 @@ void LLFloaterSimpleSnapshot::onOpen(const LLSD& key)
LLSnapshotLivePreview* preview = getPreviewView();
if (preview)
{
- preview->updateSnapshot(TRUE);
+ preview->updateSnapshot(true);
}
- focusFirstItem(FALSE);
- gSnapshotFloaterView->setEnabled(TRUE);
- gSnapshotFloaterView->setVisible(TRUE);
- gSnapshotFloaterView->adjustToFitScreen(this, FALSE);
+ focusFirstItem(false);
+ gSnapshotFloaterView->setEnabled(true);
+ gSnapshotFloaterView->setVisible(true);
+ gSnapshotFloaterView->adjustToFitScreen(this, false);
impl->updateControls(this);
impl->setStatus(ImplBase::STATUS_READY);
@@ -364,7 +374,7 @@ void LLFloaterSimpleSnapshot::onSend()
std::string temp_file = gDirUtilp->getTempFilename();
if (previewp->createUploadFile(temp_file, THUMBNAIL_SNAPSHOT_DIM_MAX, THUMBNAIL_SNAPSHOT_DIM_MIN))
{
- uploadImageUploadFile(temp_file, mInventoryId, mTaskId);
+ uploadImageUploadFile(temp_file, mInventoryId, mTaskId, mUploadCompletionCallback);
closeFloater();
}
else
@@ -372,6 +382,10 @@ void LLFloaterSimpleSnapshot::onSend()
LLSD notif_args;
notif_args["REASON"] = LLImage::getLastError().c_str();
LLNotificationsUtil::add("CannotUploadTexture", notif_args);
+ if (mUploadCompletionCallback)
+ {
+ mUploadCompletionCallback(LLUUID::null);
+ }
}
}
@@ -381,7 +395,10 @@ void LLFloaterSimpleSnapshot::postSave()
}
// static
-void LLFloaterSimpleSnapshot::uploadThumbnail(const std::string &file_path, const LLUUID &inventory_id, const LLUUID &task_id)
+void LLFloaterSimpleSnapshot::uploadThumbnail(const std::string &file_path,
+ const LLUUID &inventory_id,
+ const LLUUID &task_id,
+ completion_t callback)
{
// generate a temp texture file for coroutine
std::string temp_file = gDirUtilp->getTempFilename();
@@ -394,11 +411,14 @@ void LLFloaterSimpleSnapshot::uploadThumbnail(const std::string &file_path, cons
LL_WARNS("Thumbnail") << "Failed to upload thumbnail for " << inventory_id << " " << task_id << ", reason: " << notif_args["REASON"].asString() << LL_ENDL;
return;
}
- uploadImageUploadFile(temp_file, inventory_id, task_id);
+ uploadImageUploadFile(temp_file, inventory_id, task_id, callback);
}
// static
-void LLFloaterSimpleSnapshot::uploadThumbnail(LLPointer<LLImageRaw> raw_image, const LLUUID& inventory_id, const LLUUID& task_id)
+void LLFloaterSimpleSnapshot::uploadThumbnail(LLPointer<LLImageRaw> raw_image,
+ const LLUUID& inventory_id,
+ const LLUUID& task_id,
+ completion_t callback)
{
std::string temp_file = gDirUtilp->getTempFilename();
if (!LLViewerTextureList::createUploadFile(raw_image, temp_file, THUMBNAIL_SNAPSHOT_DIM_MAX, THUMBNAIL_SNAPSHOT_DIM_MIN))
@@ -409,11 +429,14 @@ void LLFloaterSimpleSnapshot::uploadThumbnail(LLPointer<LLImageRaw> raw_image, c
LL_WARNS("Thumbnail") << "Failed to upload thumbnail for " << inventory_id << " " << task_id << ", reason: " << notif_args["REASON"].asString() << LL_ENDL;
return;
}
- uploadImageUploadFile(temp_file, inventory_id, task_id);
+ uploadImageUploadFile(temp_file, inventory_id, task_id, callback);
}
// static
-void LLFloaterSimpleSnapshot::uploadImageUploadFile(const std::string &temp_file, const LLUUID &inventory_id, const LLUUID &task_id)
+void LLFloaterSimpleSnapshot::uploadImageUploadFile(const std::string &temp_file,
+ const LLUUID &inventory_id,
+ const LLUUID &task_id,
+ completion_t callback)
{
LLSD data;
@@ -442,7 +465,7 @@ void LLFloaterSimpleSnapshot::uploadImageUploadFile(const std::string &temp_file
}
LLCoros::instance().launch("postAgentUserImageCoro",
- boost::bind(post_thumbnail_image_coro, cap_url, temp_file, data));
+ boost::bind(post_thumbnail_image_coro, cap_url, temp_file, data, callback));
}
void LLFloaterSimpleSnapshot::update()
@@ -482,7 +505,7 @@ void LLFloaterSimpleSnapshot::saveTexture()
return;
}
- previewp->saveTexture(TRUE, getInventoryId().asString());
+ previewp->saveTexture(true, getInventoryId().asString());
closeFloater();
}
diff --git a/indra/newview/llfloatersimplesnapshot.h b/indra/newview/llfloatersimplesnapshot.h
index 91a81ee5c3..0baed9c26b 100644
--- a/indra/newview/llfloatersimplesnapshot.h
+++ b/indra/newview/llfloatersimplesnapshot.h
@@ -44,7 +44,7 @@ public:
LLFloaterSimpleSnapshot(const LLSD& key);
~LLFloaterSimpleSnapshot();
- BOOL postBuild();
+ bool postBuild();
void onOpen(const LLSD& key);
void draw();
@@ -62,8 +62,17 @@ public:
void setOwner(LLView *owner_view) { mOwner = owner_view; }
void postSave();
- static void uploadThumbnail(const std::string &file_path, const LLUUID &inventory_id, const LLUUID &task_id);
- static void uploadThumbnail(LLPointer<LLImageRaw> raw_image, const LLUUID& inventory_id, const LLUUID& task_id);
+
+ typedef boost::function<void(const LLUUID& asset_id)> completion_t;
+ void setComplectionCallback(completion_t callback) { mUploadCompletionCallback = callback; }
+ static void uploadThumbnail(const std::string &file_path,
+ const LLUUID &inventory_id,
+ const LLUUID &task_id,
+ completion_t callback = completion_t());
+ static void uploadThumbnail(LLPointer<LLImageRaw> raw_image,
+ const LLUUID& inventory_id,
+ const LLUUID& task_id,
+ completion_t callback = completion_t());
class Impl;
friend class Impl;
@@ -76,13 +85,17 @@ private:
void onCancel();
// uploads upload-ready file
- static void uploadImageUploadFile(const std::string &temp_file, const LLUUID &inventory_id, const LLUUID &task_id);
+ static void uploadImageUploadFile(const std::string &temp_file,
+ const LLUUID &inventory_id,
+ const LLUUID &task_id,
+ completion_t callback);
LLUUID mInventoryId;
LLUUID mTaskId;
LLView* mOwner;
F32 mContextConeOpacity;
+ completion_t mUploadCompletionCallback;
};
///----------------------------------------------------------------------------
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index ca2069cbfc..0d370abdbc 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -100,7 +100,7 @@ LLSpinCtrl* LLFloaterSnapshot::Impl::getHeightSpinner(LLFloaterSnapshotBase* flo
return active_panel ? active_panel->getHeightSpinner() : floater->getChild<LLSpinCtrl>("snapshot_height");
}
-void LLFloaterSnapshot::Impl::enableAspectRatioCheckbox(LLFloaterSnapshotBase* floater, BOOL enable)
+void LLFloaterSnapshot::Impl::enableAspectRatioCheckbox(LLFloaterSnapshotBase* floater, bool enable)
{
LLPanelSnapshot* active_panel = getActivePanel(floater);
if (active_panel)
@@ -109,7 +109,7 @@ void LLFloaterSnapshot::Impl::enableAspectRatioCheckbox(LLFloaterSnapshotBase* f
}
}
-void LLFloaterSnapshot::Impl::setAspectRatioCheckboxValue(LLFloaterSnapshotBase* floater, BOOL checked)
+void LLFloaterSnapshot::Impl::setAspectRatioCheckboxValue(LLFloaterSnapshotBase* floater, bool checked)
{
LLPanelSnapshot* active_panel = getActivePanel(floater);
if (active_panel)
@@ -145,8 +145,8 @@ LLSnapshotModel::ESnapshotLayerType LLFloaterSnapshot::Impl::getLayerType(LLFloa
void LLFloaterSnapshot::Impl::setResolution(LLFloaterSnapshotBase* floater, const std::string& comboname)
{
LLComboBox* combo = floater->getChild<LLComboBox>(comboname);
- combo->setVisible(TRUE);
- updateResolution(combo, floater, FALSE); // to sync spinners with combo
+ combo->setVisible(true);
+ updateResolution(combo, floater, false); // to sync spinners with combo
}
//virtual
@@ -179,7 +179,7 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate
floaterp->getChild<LLUICtrl>("image_res_text")->setVisible(mAdvanced);
floaterp->getChild<LLUICtrl>("file_size_label")->setVisible(mAdvanced);
- if (floaterp->hasChild("360_label", TRUE))
+ if (floaterp->hasChild("360_label", true))
{
floaterp->getChild<LLUICtrl>("360_label")->setVisible(mAdvanced);
}
@@ -197,7 +197,7 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate
if (use_freeze_frame)
{
// stop all mouse events at fullscreen preview layer
- floaterp->getParent()->setMouseOpaque(TRUE);
+ floaterp->getParent()->setMouseOpaque(true);
// shrink to smaller layout
// *TODO: unneeded?
@@ -206,8 +206,8 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate
// can see and interact with fullscreen preview now
if (previewp)
{
- previewp->setVisible(TRUE);
- previewp->setEnabled(TRUE);
+ previewp->setVisible(true);
+ previewp->setEnabled(true);
}
//RN: freeze all avatars
@@ -220,7 +220,7 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate
}
// freeze everything else
- gSavedSettings.setBOOL("FreezeTime", TRUE);
+ gSavedSettings.setBOOL("FreezeTime", true);
if (LLToolMgr::getInstance()->getCurrentToolset() != gCameraToolset)
{
@@ -230,20 +230,20 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate
}
else // turning off freeze frame mode
{
- floaterp->getParent()->setMouseOpaque(FALSE);
+ floaterp->getParent()->setMouseOpaque(false);
// *TODO: unneeded?
floaterp->reshape(floaterp->getRect().getWidth(), floaterp->getRect().getHeight());
if (previewp)
{
- previewp->setVisible(FALSE);
- previewp->setEnabled(FALSE);
+ previewp->setVisible(false);
+ previewp->setEnabled(false);
}
//RN: thaw all avatars
floaterp->impl->mAvatarPauseHandles.clear();
// thaw everything else
- gSavedSettings.setBOOL("FreezeTime", FALSE);
+ gSavedSettings.setBOOL("FreezeTime", false);
// restore last tool (e.g. pie menu, etc)
if (floaterp->impl->mLastToolset)
@@ -324,8 +324,8 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshotBase* floater)
}
LLSnapshotLivePreview* previewp = getPreviewView();
- BOOL got_bytes = previewp && previewp->getDataSize() > 0;
- BOOL got_snap = previewp && previewp->getSnapshotUpToDate();
+ bool got_bytes = previewp && previewp->getDataSize() > 0;
+ bool got_snap = previewp && previewp->getSnapshotUpToDate();
// *TODO: Separate maximum size for Web images from postcards
LL_DEBUGS() << "Is snapshot up-to-date? " << got_snap << LL_ENDL;
@@ -433,11 +433,11 @@ void LLFloaterSnapshotBase::ImplBase::setNeedRefresh(bool need)
}
// virtual
-void LLFloaterSnapshotBase::ImplBase::checkAutoSnapshot(LLSnapshotLivePreview* previewp, BOOL update_thumbnail)
+void LLFloaterSnapshotBase::ImplBase::checkAutoSnapshot(LLSnapshotLivePreview* previewp, bool update_thumbnail)
{
if (previewp)
{
- BOOL autosnap = gSavedSettings.getBOOL("AutoSnapshot");
+ bool autosnap = gSavedSettings.getBOOL("AutoSnapshot");
LL_DEBUGS() << "updating " << (autosnap ? "snapshot" : "thumbnail") << LL_ENDL;
previewp->updateSnapshot(autosnap, update_thumbnail, autosnap ? AUTO_SNAPSHOT_TIME_DELAY : 0.f);
}
@@ -452,7 +452,7 @@ void LLFloaterSnapshotBase::ImplBase::onClickNewSnapshot(void* data)
{
floater->impl->setStatus(ImplBase::STATUS_READY);
LL_DEBUGS() << "updating snapshot" << LL_ENDL;
- previewp->mForceUpdateSnapshot = TRUE;
+ previewp->mForceUpdateSnapshot = true;
}
}
@@ -473,11 +473,11 @@ void LLFloaterSnapshotBase::ImplBase::onClickAutoSnap(LLUICtrl *ctrl, void* data
// static
void LLFloaterSnapshotBase::ImplBase::onClickNoPost(LLUICtrl *ctrl, void* data)
{
- BOOL no_post = ((LLCheckBoxCtrl*)ctrl)->get();
+ bool no_post = ((LLCheckBoxCtrl*)ctrl)->get();
gSavedSettings.setBOOL("RenderSnapshotNoPost", no_post);
LLFloaterSnapshotBase* view = (LLFloaterSnapshotBase*)data;
- view->getPreviewView()->updateSnapshot(TRUE, TRUE);
+ view->getPreviewView()->updateSnapshot(true, true);
view->impl->updateControls(view);
}
@@ -496,7 +496,7 @@ void LLFloaterSnapshotBase::ImplBase::onClickFilter(LLUICtrl *ctrl, void* data)
LLComboBox* filterbox = static_cast<LLComboBox *>(view->getChild<LLComboBox>("filters_combobox"));
std::string filter_name = (filterbox->getCurrentIndex() ? filterbox->getSimple() : "");
previewp->setFilter(filter_name);
- previewp->updateSnapshot(TRUE);
+ previewp->updateSnapshot(true);
}
}
}
@@ -513,7 +513,7 @@ void LLFloaterSnapshotBase::ImplBase::onClickUICheck(LLUICtrl *ctrl, void* data)
LLSnapshotLivePreview* previewp = view->getPreviewView();
if(previewp)
{
- previewp->updateSnapshot(TRUE, TRUE);
+ previewp->updateSnapshot(true, true);
}
view->impl->updateControls(view);
}
@@ -531,13 +531,13 @@ void LLFloaterSnapshotBase::ImplBase::onClickHUDCheck(LLUICtrl *ctrl, void* data
LLSnapshotLivePreview* previewp = view->getPreviewView();
if(previewp)
{
- previewp->updateSnapshot(TRUE, TRUE);
+ previewp->updateSnapshot(true, true);
}
view->impl->updateControls(view);
}
}
-void LLFloaterSnapshot::Impl::applyKeepAspectCheck(LLFloaterSnapshotBase* view, BOOL checked)
+void LLFloaterSnapshot::Impl::applyKeepAspectCheck(LLFloaterSnapshotBase* view, bool checked)
{
gSavedSettings.setBOOL("KeepAspectForSnapshot", checked);
@@ -557,12 +557,12 @@ void LLFloaterSnapshot::Impl::applyKeepAspectCheck(LLFloaterSnapshotBase* view,
S32 w, h ;
previewp->getSize(w, h) ;
- updateSpinners(view, previewp, w, h, TRUE); // may change w and h
+ updateSpinners(view, previewp, w, h, true); // may change w and h
LL_DEBUGS() << "updating thumbnail" << LL_ENDL;
previewp->setSize(w, h) ;
- previewp->updateSnapshot(TRUE);
- checkAutoSnapshot(previewp, TRUE);
+ previewp->updateSnapshot(true);
+ checkAutoSnapshot(previewp, true);
}
}
}
@@ -596,26 +596,26 @@ void LLFloaterSnapshot::Impl::checkAspectRatio(LLFloaterSnapshotBase *view, S32
// Don't round texture sizes; textures are commonly stretched in world, profiles, etc and need to be "squashed" during upload, not cropped here
if (LLSnapshotModel::SNAPSHOT_TEXTURE == getActiveSnapshotType(view))
{
- previewp->mKeepAspectRatio = FALSE ;
+ previewp->mKeepAspectRatio = false ;
return ;
}
- BOOL keep_aspect = FALSE, enable_cb = FALSE;
+ bool keep_aspect = false, enable_cb = false;
if (0 == index) // current window size
{
- enable_cb = FALSE;
- keep_aspect = TRUE;
+ enable_cb = false;
+ keep_aspect = true;
}
else if (-1 == index) // custom
{
- enable_cb = TRUE;
+ enable_cb = true;
keep_aspect = gSavedSettings.getBOOL("KeepAspectForSnapshot");
}
else // predefined resolution
{
- enable_cb = FALSE;
- keep_aspect = FALSE;
+ enable_cb = false;
+ keep_aspect = false;
}
view->impl->mAspectRatioCheckOff = !enable_cb;
@@ -672,7 +672,7 @@ void LLFloaterSnapshot::Impl::setFinished(bool finished, bool ok, const std::str
}
// Apply a new resolution selected from the given combobox.
-void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL do_update)
+void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, bool do_update)
{
LLComboBox* combobox = (LLComboBox*)ctrl;
LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
@@ -771,10 +771,10 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL
previewp->setSize(width, height);
// hide old preview as the aspect ratio could be wrong
- checkAutoSnapshot(previewp, FALSE);
+ checkAutoSnapshot(previewp, false);
LL_DEBUGS() << "updating thumbnail" << LL_ENDL;
// Don't update immediately, give window chance to redraw
- getPreviewView()->updateSnapshot(TRUE, FALSE, 1.f);
+ getPreviewView()->updateSnapshot(true, false, 1.f);
if(do_update)
{
LL_DEBUGS() << "Will update controls" << LL_ENDL;
@@ -798,8 +798,8 @@ void LLFloaterSnapshot::Impl::onCommitLayerTypes(LLUICtrl* ctrl, void*data)
{
previewp->setSnapshotBufferType((LLSnapshotModel::ESnapshotLayerType)combobox->getCurrentIndex());
}
- view->impl->checkAutoSnapshot(previewp, TRUE);
- previewp->updateSnapshot(TRUE, TRUE);
+ view->impl->checkAutoSnapshot(previewp, true);
+ previewp->updateSnapshot(true, true);
}
}
@@ -818,7 +818,7 @@ void LLFloaterSnapshot::Impl::onImageFormatChange(LLFloaterSnapshotBase* view)
{
gSavedSettings.setS32("SnapshotFormat", getImageFormat(view));
LL_DEBUGS() << "image format changed, updating snapshot" << LL_ENDL;
- getPreviewView()->updateSnapshot(TRUE);
+ getPreviewView()->updateSnapshot(true);
updateControls(view);
}
}
@@ -832,7 +832,7 @@ void LLFloaterSnapshot::Impl::comboSetCustom(LLFloaterSnapshotBase* floater, con
}
// Update supplied width and height according to the constrain proportions flag; limit them by max_val.
-BOOL LLFloaterSnapshot::Impl::checkImageSize(LLSnapshotLivePreview* previewp, S32& width, S32& height, BOOL isWidthChanged, S32 max_value)
+bool LLFloaterSnapshot::Impl::checkImageSize(LLSnapshotLivePreview* previewp, S32& width, S32& height, bool isWidthChanged, S32 max_value)
{
S32 w = width ;
S32 h = height ;
@@ -841,7 +841,7 @@ BOOL LLFloaterSnapshot::Impl::checkImageSize(LLSnapshotLivePreview* previewp, S3
{
if(gViewerWindow->getWindowWidthRaw() < 1 || gViewerWindow->getWindowHeightRaw() < 1)
{
- return FALSE ;
+ return false ;
}
//aspect ratio of the current window
@@ -887,7 +887,7 @@ void LLFloaterSnapshot::Impl::setImageSizeSpinnersValues(LLFloaterSnapshotBase*
}
}
-void LLFloaterSnapshot::Impl::updateSpinners(LLFloaterSnapshotBase* view, LLSnapshotLivePreview* previewp, S32& width, S32& height, BOOL is_width_changed)
+void LLFloaterSnapshot::Impl::updateSpinners(LLFloaterSnapshotBase* view, LLSnapshotLivePreview* previewp, S32& width, S32& height, bool is_width_changed)
{
getWidthSpinner(view)->resetDirty();
getHeightSpinner(view)->resetDirty();
@@ -914,13 +914,13 @@ void LLFloaterSnapshot::Impl::applyCustomResolution(LLFloaterSnapshotBase* view,
previewp->setMaxImageSize((S32) getWidthSpinner(view)->getMaxValue()) ;
previewp->setSize(w,h);
- checkAutoSnapshot(previewp, FALSE);
+ checkAutoSnapshot(previewp, false);
comboSetCustom(view, "profile_size_combo");
comboSetCustom(view, "postcard_size_combo");
comboSetCustom(view, "texture_size_combo");
comboSetCustom(view, "local_size_combo");
LL_DEBUGS() << "applied custom resolution, updating thumbnail" << LL_ENDL;
- previewp->updateSnapshot(TRUE);
+ previewp->updateSnapshot(true);
}
}
}
@@ -956,7 +956,7 @@ LLFloaterSnapshotBase::~LLFloaterSnapshotBase()
if (impl->mPreviewHandle.get()) impl->mPreviewHandle.get()->die();
//unfreeze everything else
- gSavedSettings.setBOOL("FreezeTime", FALSE);
+ gSavedSettings.setBOOL("FreezeTime", false);
if (impl->mLastToolset)
{
@@ -982,7 +982,7 @@ LLFloaterSnapshot::~LLFloaterSnapshot()
}
// virtual
-BOOL LLFloaterSnapshot::postBuild()
+bool LLFloaterSnapshot::postBuild()
{
mRefreshBtn = getChild<LLUICtrl>("new_snapshot_btn");
childSetAction("new_snapshot_btn", ImplBase::onClickNewSnapshot, this);
@@ -1000,7 +1000,7 @@ BOOL LLFloaterSnapshot::postBuild()
childSetCommitCallback("layer_types", Impl::onCommitLayerTypes, this);
getChild<LLUICtrl>("layer_types")->setValue("colors");
- getChildView("layer_types")->setEnabled(FALSE);
+ getChildView("layer_types")->setEnabled(false);
getChild<LLUICtrl>("freeze_frame_check")->setValue(gSavedSettings.getBOOL("UseFreezeFrame"));
childSetCommitCallback("freeze_frame_check", ImplBase::onCommitFreezeFrame, this);
@@ -1064,7 +1064,7 @@ BOOL LLFloaterSnapshot::postBuild()
previewp->setThumbnailPlaceholderRect(getThumbnailPlaceholderRect());
- return TRUE;
+ return true;
}
// virtual
@@ -1123,13 +1123,13 @@ void LLFloaterSnapshot::onOpen(const LLSD& key)
if(preview)
{
LL_DEBUGS() << "opened, updating snapshot" << LL_ENDL;
- preview->setAllowFullScreenPreview(TRUE);
- preview->updateSnapshot(TRUE);
+ preview->setAllowFullScreenPreview(true);
+ preview->updateSnapshot(true);
}
- focusFirstItem(FALSE);
- gSnapshotFloaterView->setEnabled(TRUE);
- gSnapshotFloaterView->setVisible(TRUE);
- gSnapshotFloaterView->adjustToFitScreen(this, FALSE);
+ focusFirstItem(false);
+ gSnapshotFloaterView->setEnabled(true);
+ gSnapshotFloaterView->setVisible(true);
+ gSnapshotFloaterView->adjustToFitScreen(this, false);
impl->updateControls(this);
impl->setAdvanced(gSavedSettings.getBOOL("AdvanceSnapshot"));
@@ -1153,18 +1153,18 @@ void LLFloaterSnapshot::on360Snapshot()
//virtual
void LLFloaterSnapshotBase::onClose(bool app_quitting)
{
- getParent()->setMouseOpaque(FALSE);
+ getParent()->setMouseOpaque(false);
//unfreeze everything, hide fullscreen preview
LLSnapshotLivePreview* previewp = getPreviewView();
if (previewp)
{
- previewp->setAllowFullScreenPreview(FALSE);
- previewp->setVisible(FALSE);
- previewp->setEnabled(FALSE);
+ previewp->setAllowFullScreenPreview(false);
+ previewp->setVisible(false);
+ previewp->setEnabled(false);
}
- gSavedSettings.setBOOL("FreezeTime", FALSE);
+ gSavedSettings.setBOOL("FreezeTime", false);
impl->mAvatarPauseHandles.clear();
if (impl->mLastToolset)
@@ -1263,17 +1263,17 @@ S32 LLFloaterSnapshot::notify(const LLSD& info)
return 0;
}
-BOOL LLFloaterSnapshot::isWaitingState()
+bool LLFloaterSnapshot::isWaitingState()
{
return (impl->getStatus() == ImplBase::STATUS_WORKING);
}
-BOOL LLFloaterSnapshotBase::ImplBase::updatePreviewList(bool initialized)
+bool LLFloaterSnapshotBase::ImplBase::updatePreviewList(bool initialized)
{
if (!initialized)
- return FALSE;
+ return false;
- BOOL changed = FALSE;
+ bool changed = false;
LL_DEBUGS() << "npreviews: " << LLSnapshotLivePreview::sList.size() << LL_ENDL;
for (std::set<LLSnapshotLivePreview*>::iterator iter = LLSnapshotLivePreview::sList.begin();
iter != LLSnapshotLivePreview::sList.end(); ++iter)
@@ -1424,7 +1424,7 @@ LLSnapshotFloaterView::~LLSnapshotFloaterView()
}
// virtual
-BOOL LLSnapshotFloaterView::handleKey(KEY key, MASK mask, BOOL called_from_parent)
+bool LLSnapshotFloaterView::handleKey(KEY key, MASK mask, bool called_from_parent)
{
// use default handler when not in freeze-frame mode
if(!gSavedSettings.getBOOL("FreezeTime"))
@@ -1440,13 +1440,13 @@ BOOL LLSnapshotFloaterView::handleKey(KEY key, MASK mask, BOOL called_from_paren
else
{
// bounce keystrokes back down
- LLFloaterView::handleKey(key, mask, TRUE);
+ LLFloaterView::handleKey(key, mask, true);
}
- return TRUE;
+ return true;
}
// virtual
-BOOL LLSnapshotFloaterView::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLSnapshotFloaterView::handleMouseDown(S32 x, S32 y, MASK mask)
{
// use default handler when not in freeze-frame mode
if(!gSavedSettings.getBOOL("FreezeTime"))
@@ -1458,11 +1458,11 @@ BOOL LLSnapshotFloaterView::handleMouseDown(S32 x, S32 y, MASK mask)
{
LLToolMgr::getInstance()->getCurrentTool()->handleMouseDown( x, y, mask );
}
- return TRUE;
+ return true;
}
// virtual
-BOOL LLSnapshotFloaterView::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLSnapshotFloaterView::handleMouseUp(S32 x, S32 y, MASK mask)
{
// use default handler when not in freeze-frame mode
if(!gSavedSettings.getBOOL("FreezeTime"))
@@ -1474,11 +1474,11 @@ BOOL LLSnapshotFloaterView::handleMouseUp(S32 x, S32 y, MASK mask)
{
LLToolMgr::getInstance()->getCurrentTool()->handleMouseUp( x, y, mask );
}
- return TRUE;
+ return true;
}
// virtual
-BOOL LLSnapshotFloaterView::handleHover(S32 x, S32 y, MASK mask)
+bool LLSnapshotFloaterView::handleHover(S32 x, S32 y, MASK mask)
{
// use default handler when not in freeze-frame mode
if(!gSavedSettings.getBOOL("FreezeTime"))
@@ -1490,5 +1490,5 @@ BOOL LLSnapshotFloaterView::handleHover(S32 x, S32 y, MASK mask)
{
LLToolMgr::getInstance()->getCurrentTool()->handleHover( x, y, mask );
}
- return TRUE;
+ return true;
}
diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h
index 89cb2bc809..44064c73fd 100644
--- a/indra/newview/llfloatersnapshot.h
+++ b/indra/newview/llfloatersnapshot.h
@@ -119,13 +119,13 @@ public:
virtual EStatus getStatus() const { return mStatus; }
virtual void setNeedRefresh(bool need);
- static BOOL updatePreviewList(bool initialized);
+ static bool updatePreviewList(bool initialized);
void setAdvanced(bool advanced) { mAdvanced = advanced; }
void setSkipReshaping(bool skip) { mSkipReshaping = skip; }
virtual LLSnapshotModel::ESnapshotLayerType getLayerType(LLFloaterSnapshotBase* floater) = 0;
- virtual void checkAutoSnapshot(LLSnapshotLivePreview* floater, BOOL update_thumbnail = FALSE);
+ virtual void checkAutoSnapshot(LLSnapshotLivePreview* floater, bool update_thumbnail = false);
void setWorking(bool working);
virtual void setFinished(bool finished, bool ok = true, const std::string& msg = LLStringUtil::null) = 0;
@@ -150,7 +150,7 @@ public:
LLFloaterSnapshot(const LLSD& key);
/*virtual*/ ~LLFloaterSnapshot();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ S32 notify(const LLSD& info);
@@ -167,7 +167,7 @@ public:
void saveLocal(const snapshot_saved_signal_t::slot_type& success_cb, const snapshot_saved_signal_t::slot_type& failure_cb);
static void setAgentEmail(const std::string& email);
- BOOL isWaitingState();
+ bool isWaitingState();
class Impl;
friend class Impl;
@@ -187,24 +187,24 @@ public:
~Impl()
{}
- void applyKeepAspectCheck(LLFloaterSnapshotBase* view, BOOL checked);
- void updateResolution(LLUICtrl* ctrl, void* data, BOOL do_update = TRUE);
+ void applyKeepAspectCheck(LLFloaterSnapshotBase* view, bool checked);
+ void updateResolution(LLUICtrl* ctrl, void* data, bool do_update = true);
static void onCommitLayerTypes(LLUICtrl* ctrl, void*data);
void onImageQualityChange(LLFloaterSnapshotBase* view, S32 quality_val);
void onImageFormatChange(LLFloaterSnapshotBase* view);
void applyCustomResolution(LLFloaterSnapshotBase* view, S32 w, S32 h);
static void onSendingPostcardFinished(LLFloaterSnapshotBase* floater, bool status);
- BOOL checkImageSize(LLSnapshotLivePreview* previewp, S32& width, S32& height, BOOL isWidthChanged, S32 max_value);
+ bool checkImageSize(LLSnapshotLivePreview* previewp, S32& width, S32& height, bool isWidthChanged, S32 max_value);
void setImageSizeSpinnersValues(LLFloaterSnapshotBase *view, S32 width, S32 height);
- void updateSpinners(LLFloaterSnapshotBase* view, LLSnapshotLivePreview* previewp, S32& width, S32& height, BOOL is_width_changed);
+ void updateSpinners(LLFloaterSnapshotBase* view, LLSnapshotLivePreview* previewp, S32& width, S32& height, bool is_width_changed);
static void onSnapshotUploadFinished(LLFloaterSnapshotBase* floater, bool status);
/*virtual*/ LLPanelSnapshot* getActivePanel(LLFloaterSnapshotBase* floater, bool ok_if_not_found = true);
/*virtual*/ LLSnapshotModel::ESnapshotFormat getImageFormat(LLFloaterSnapshotBase* floater);
LLSpinCtrl* getWidthSpinner(LLFloaterSnapshotBase* floater);
LLSpinCtrl* getHeightSpinner(LLFloaterSnapshotBase* floater);
- void enableAspectRatioCheckbox(LLFloaterSnapshotBase* floater, BOOL enable);
- void setAspectRatioCheckboxValue(LLFloaterSnapshotBase* floater, BOOL checked);
+ void enableAspectRatioCheckbox(LLFloaterSnapshotBase* floater, bool enable);
+ void setAspectRatioCheckboxValue(LLFloaterSnapshotBase* floater, bool checked);
/*virtual*/ std::string getSnapshotPanelPrefix();
void setResolution(LLFloaterSnapshotBase* floater, const std::string& comboname);
@@ -232,10 +232,10 @@ protected:
public:
virtual ~LLSnapshotFloaterView();
- /*virtual*/ BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
- /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleKey(KEY key, MASK mask, bool called_from_parent);
+ /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask);
};
extern LLSnapshotFloaterView* gSnapshotFloaterView;
diff --git a/indra/newview/llfloatersounddevices.cpp b/indra/newview/llfloatersounddevices.cpp
index 72c077d215..87ac37a003 100644
--- a/indra/newview/llfloatersounddevices.cpp
+++ b/indra/newview/llfloatersounddevices.cpp
@@ -51,7 +51,7 @@ LLFloaterSoundDevices::~LLFloaterSoundDevices()
}
// virtual
-BOOL LLFloaterSoundDevices::postBuild()
+bool LLFloaterSoundDevices::postBuild()
{
LLTransientDockableFloater::postBuild();
@@ -65,7 +65,7 @@ BOOL LLFloaterSoundDevices::postBuild()
getChild<LLUICtrl>("voice_output_device")->setCommitCallback(boost::bind(&LLPanelVoiceDeviceSettings::apply, panel));
getChild<LLUICtrl>("mic_volume_slider")->setCommitCallback(boost::bind(&LLPanelVoiceDeviceSettings::apply, panel));
}
- return TRUE;
+ return true;
}
//virtual
@@ -75,7 +75,7 @@ void LLFloaterSoundDevices::setDocked(bool docked, bool pop_on_undock/* = true*/
}
// virtual
-void LLFloaterSoundDevices::setFocus( BOOL b )
+void LLFloaterSoundDevices::setFocus(bool b)
{
LLTransientDockableFloater::setFocus(b);
diff --git a/indra/newview/llfloatersounddevices.h b/indra/newview/llfloatersounddevices.h
index f09ee3b069..0073a1419b 100644
--- a/indra/newview/llfloatersounddevices.h
+++ b/indra/newview/llfloatersounddevices.h
@@ -39,9 +39,9 @@ public:
LLFloaterSoundDevices(const LLSD& key);
~LLFloaterSoundDevices();
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true);
- /*virtual*/ void setFocus( BOOL b );
+ bool postBuild() override;
+ void setDocked(bool docked, bool pop_on_undock = true) override;
+ void setFocus(bool b) override;
};
diff --git a/indra/newview/llfloaterspellchecksettings.cpp b/indra/newview/llfloaterspellchecksettings.cpp
index 32eb70cd39..e0eb5261d6 100644
--- a/indra/newview/llfloaterspellchecksettings.cpp
+++ b/indra/newview/llfloaterspellchecksettings.cpp
@@ -61,7 +61,7 @@ void LLFloaterSpellCheckerSettings::draw()
getChild<LLUICtrl>("spellcheck_remove_btn")->setEnabled(enable_remove);
}
-BOOL LLFloaterSpellCheckerSettings::postBuild(void)
+bool LLFloaterSpellCheckerSettings::postBuild(void)
{
gSavedSettings.getControl("SpellCheck")->getSignal()->connect(boost::bind(&LLFloaterSpellCheckerSettings::refreshDictionaries, this, false));
LLSpellChecker::setSettingsChangeCallback(boost::bind(&LLFloaterSpellCheckerSettings::onSpellCheckSettingsChange, this));
@@ -248,7 +248,7 @@ LLFloaterSpellCheckerImport::LLFloaterSpellCheckerImport(const LLSD& key)
{
}
-BOOL LLFloaterSpellCheckerImport::postBuild(void)
+bool LLFloaterSpellCheckerImport::postBuild()
{
getChild<LLUICtrl>("dictionary_path_browse")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerImport::onBtnBrowse, this));
getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerImport::onBtnOK, this));
diff --git a/indra/newview/llfloaterspellchecksettings.h b/indra/newview/llfloaterspellchecksettings.h
index f9bbefafb7..e15b60037f 100644
--- a/indra/newview/llfloaterspellchecksettings.h
+++ b/indra/newview/llfloaterspellchecksettings.h
@@ -34,10 +34,10 @@ class LLFloaterSpellCheckerSettings : public LLFloater
public:
LLFloaterSpellCheckerSettings(const LLSD& key);
- /*virtual*/ void draw();
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ void onClose(bool app_quitting);
+ void draw() override;
+ bool postBuild() override;
+ void onOpen(const LLSD& key) override;
+ void onClose(bool app_quitting) override;
protected:
void onBtnImport();
@@ -52,7 +52,7 @@ class LLFloaterSpellCheckerImport : public LLFloater
public:
LLFloaterSpellCheckerImport(const LLSD& key);
- /*virtual*/ BOOL postBuild();
+ bool postBuild() override;
protected:
void onBtnBrowse();
diff --git a/indra/newview/llfloatertelehub.cpp b/indra/newview/llfloatertelehub.cpp
index b845fd132d..99e737efb5 100644
--- a/indra/newview/llfloatertelehub.cpp
+++ b/indra/newview/llfloatertelehub.cpp
@@ -53,7 +53,7 @@ LLFloaterTelehub::LLFloaterTelehub(const LLSD& key)
{
}
-BOOL LLFloaterTelehub::postBuild()
+bool LLFloaterTelehub::postBuild()
{
gMessageSystem->setHandlerFunc("TelehubInfo", processTelehubInfo);
@@ -66,10 +66,10 @@ BOOL LLFloaterTelehub::postBuild()
if (list)
{
// otherwise you can't walk with arrow keys while floater is up
- list->setAllowKeyboardMovement(FALSE);
+ list->setAllowKeyboardMovement(false);
}
- return TRUE;
+ return true;
}
void LLFloaterTelehub::onOpen(const LLSD& key)
{
@@ -100,29 +100,29 @@ void LLFloaterTelehub::draw()
// Per-frame updates, because we don't have a selection manager observer.
void LLFloaterTelehub::refresh()
{
- const BOOL children_ok = TRUE;
+ constexpr bool children_ok = true;
LLViewerObject* object = mObjectSelection->getFirstRootObject(children_ok);
- BOOL have_selection = (object != NULL);
- BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME );
+ bool have_selection = (object != NULL);
+ bool all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME );
getChildView("connect_btn")->setEnabled(have_selection && all_volume);
- BOOL have_telehub = mTelehubObjectID.notNull();
+ bool have_telehub = mTelehubObjectID.notNull();
getChildView("disconnect_btn")->setEnabled(have_telehub);
- BOOL space_avail = (mNumSpawn < MAX_SPAWNPOINTS_PER_TELEHUB);
+ bool space_avail = (mNumSpawn < MAX_SPAWNPOINTS_PER_TELEHUB);
getChildView("add_spawn_point_btn")->setEnabled(have_selection && all_volume && space_avail);
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("spawn_points_list");
if (list)
{
- BOOL enable_remove = (list->getFirstSelected() != NULL);
+ bool enable_remove = (list->getFirstSelected() != NULL);
getChildView("remove_spawn_point_btn")->setEnabled(enable_remove);
}
}
// static
-BOOL LLFloaterTelehub::renderBeacons()
+bool LLFloaterTelehub::renderBeacons()
{
// only render if we've got a telehub
LLFloaterTelehub* floater = LLFloaterReg::findTypedInstance<LLFloaterTelehub>("telehubs");
diff --git a/indra/newview/llfloatertelehub.h b/indra/newview/llfloatertelehub.h
index 9b9b11fb29..1c71daa6a9 100644
--- a/indra/newview/llfloatertelehub.h
+++ b/indra/newview/llfloatertelehub.h
@@ -41,15 +41,15 @@ public:
LLFloaterTelehub(const LLSD& key);
~LLFloaterTelehub();
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void onOpen(const LLSD& key);
+ bool postBuild() override;
+ void onOpen(const LLSD& key) override;
- /*virtual*/ void draw();
+ void draw() override;
- static BOOL renderBeacons();
+ static bool renderBeacons();
static void addBeacons();
- void refresh();
+ void refresh() override;
void sendTelehubInfoRequest();
void onClickConnect();
diff --git a/indra/newview/llfloatertestinspectors.cpp b/indra/newview/llfloatertestinspectors.cpp
index 8a1582569b..7dd6a86f33 100644
--- a/indra/newview/llfloatertestinspectors.cpp
+++ b/indra/newview/llfloatertestinspectors.cpp
@@ -45,7 +45,7 @@ LLFloaterTestInspectors::LLFloaterTestInspectors(const LLSD& seed)
LLFloaterTestInspectors::~LLFloaterTestInspectors()
{}
-BOOL LLFloaterTestInspectors::postBuild()
+bool LLFloaterTestInspectors::postBuild()
{
// Test the dummy widget construction code
getChild<LLUICtrl>("intentionally-not-found")->setEnabled(true);
diff --git a/indra/newview/llfloatertestinspectors.h b/indra/newview/llfloatertestinspectors.h
index 1724a2e076..621094f7fe 100644
--- a/indra/newview/llfloatertestinspectors.h
+++ b/indra/newview/llfloatertestinspectors.h
@@ -40,7 +40,7 @@ private:
LLFloaterTestInspectors(const LLSD& seed);
~LLFloaterTestInspectors();
- /*virtual*/ BOOL postBuild();
+ bool postBuild() override;
// Button callback to show
void showAvatarInspector(LLUICtrl*, const LLSD& avatar_id);
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index 5fb4fb9b07..31d9ada678 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -217,10 +217,10 @@ LLPCode toolData[]={
LL_PCODE_LEGACY_TREE,
LL_PCODE_LEGACY_GRASS};
-BOOL LLFloaterTools::postBuild()
+bool LLFloaterTools::postBuild()
{
// Hide until tool selected
- setVisible(FALSE);
+ setVisible(false);
// Since we constantly show and hide this during drags, don't
// make sounds on visibility changes.
@@ -243,13 +243,13 @@ BOOL LLFloaterTools::postBuild()
mBtnUnlink = getChild<LLButton>("unlink_btn");
mCheckSelectIndividual = getChild<LLCheckBoxCtrl>("checkbox edit linked parts");
- getChild<LLUICtrl>("checkbox edit linked parts")->setValue((BOOL)gSavedSettings.getBOOL("EditLinkedParts"));
+ getChild<LLUICtrl>("checkbox edit linked parts")->setValue((bool)gSavedSettings.getBOOL("EditLinkedParts"));
mCheckSnapToGrid = getChild<LLCheckBoxCtrl>("checkbox snap to grid");
- getChild<LLUICtrl>("checkbox snap to grid")->setValue((BOOL)gSavedSettings.getBOOL("SnapEnabled"));
+ getChild<LLUICtrl>("checkbox snap to grid")->setValue((bool)gSavedSettings.getBOOL("SnapEnabled"));
mCheckStretchUniform = getChild<LLCheckBoxCtrl>("checkbox uniform");
- getChild<LLUICtrl>("checkbox uniform")->setValue((BOOL)gSavedSettings.getBOOL("ScaleUniform"));
+ getChild<LLUICtrl>("checkbox uniform")->setValue((bool)gSavedSettings.getBOOL("ScaleUniform"));
mCheckStretchTexture = getChild<LLCheckBoxCtrl>("checkbox stretch textures");
- getChild<LLUICtrl>("checkbox stretch textures")->setValue((BOOL)gSavedSettings.getBOOL("ScaleStretchTextures"));
+ getChild<LLUICtrl>("checkbox stretch textures")->setValue((bool)gSavedSettings.getBOOL("ScaleStretchTextures"));
mComboGridMode = getChild<LLComboBox>("combobox grid mode");
//
@@ -268,13 +268,13 @@ BOOL LLFloaterTools::postBuild()
}
}
mCheckCopySelection = getChild<LLCheckBoxCtrl>("checkbox copy selection");
- getChild<LLUICtrl>("checkbox copy selection")->setValue((BOOL)gSavedSettings.getBOOL("CreateToolCopySelection"));
+ getChild<LLUICtrl>("checkbox copy selection")->setValue((bool)gSavedSettings.getBOOL("CreateToolCopySelection"));
mCheckSticky = getChild<LLCheckBoxCtrl>("checkbox sticky");
- getChild<LLUICtrl>("checkbox sticky")->setValue((BOOL)gSavedSettings.getBOOL("CreateToolKeepSelected"));
+ getChild<LLUICtrl>("checkbox sticky")->setValue((bool)gSavedSettings.getBOOL("CreateToolKeepSelected"));
mCheckCopyCenters = getChild<LLCheckBoxCtrl>("checkbox copy centers");
- getChild<LLUICtrl>("checkbox copy centers")->setValue((BOOL)gSavedSettings.getBOOL("CreateToolCopyCenters"));
+ getChild<LLUICtrl>("checkbox copy centers")->setValue((bool)gSavedSettings.getBOOL("CreateToolCopyCenters"));
mCheckCopyRotates = getChild<LLCheckBoxCtrl>("checkbox copy rotates");
- getChild<LLUICtrl>("checkbox copy rotates")->setValue((BOOL)gSavedSettings.getBOOL("CreateToolCopyRotates"));
+ getChild<LLUICtrl>("checkbox copy rotates")->setValue((bool)gSavedSettings.getBOOL("CreateToolCopyRotates"));
mRadioGroupLand = getChild<LLRadioGroup>("land_radio_group");
mBtnApplyToSelection = getChild<LLButton>("button apply to selection");
@@ -290,7 +290,7 @@ BOOL LLFloaterTools::postBuild()
if(mTab)
{
mTab->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT);
- mTab->setBorderVisible(FALSE);
+ mTab->setBorderVisible(false);
mTab->selectFirstTab();
}
@@ -305,7 +305,7 @@ BOOL LLFloaterTools::postBuild()
sShowObjectCost = gSavedSettings.getBOOL("ShowObjectRenderingCost");
- return TRUE;
+ return true;
}
// Create the popupview with a dummy center. It will be moved into place
@@ -365,12 +365,12 @@ LLFloaterTools::LLFloaterTools(const LLSD& key)
mLandImpactsObserver(NULL),
- mDirty(TRUE),
- mHasSelection(TRUE)
+ mDirty(true),
+ mHasSelection(true)
{
gFloaterTools = this;
- setAutoFocus(FALSE);
+ setAutoFocus(false);
mFactoryMap["General"] = LLCallbackMap(createPanelPermissions, this);//LLPanelPermissions
mFactoryMap["Object"] = LLCallbackMap(createPanelObject, this);//LLPanelObject
mFactoryMap["Features"] = LLCallbackMap(createPanelVolume, this);//LLPanelVolume
@@ -425,7 +425,7 @@ void LLFloaterTools::refresh()
const S32 INFO_WIDTH = getRect().getWidth();
const S32 INFO_HEIGHT = 384;
LLRect object_info_rect(0, 0, INFO_WIDTH, -INFO_HEIGHT);
- BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME );
+ bool all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME );
S32 idx_features = mTab->getPanelIndexByTitle(PANEL_NAMES[PANEL_FEATURES]);
S32 idx_face = mTab->getPanelIndexByTitle(PANEL_NAMES[PANEL_FACE]);
@@ -560,17 +560,17 @@ void LLFloaterTools::refresh()
void LLFloaterTools::draw()
{
- BOOL has_selection = !LLSelectMgr::getInstance()->getSelection()->isEmpty();
+ bool has_selection = !LLSelectMgr::getInstance()->getSelection()->isEmpty();
if(!has_selection && (mHasSelection != has_selection))
{
- mDirty = TRUE;
+ mDirty = true;
}
mHasSelection = has_selection;
if (mDirty)
{
refresh();
- mDirty = FALSE;
+ mDirty = false;
}
// mCheckSelectIndividual->set(gSavedSettings.getBOOL("EditLinkedParts"));
@@ -579,7 +579,7 @@ void LLFloaterTools::draw()
void LLFloaterTools::dirty()
{
- mDirty = TRUE;
+ mDirty = true;
LLFloaterOpenObject* instance = LLFloaterReg::findTypedInstance<LLFloaterOpenObject>("openobject");
if (instance) instance->dirty();
}
@@ -588,12 +588,12 @@ void LLFloaterTools::dirty()
// floater is closed.
void LLFloaterTools::resetToolState()
{
- gCameraBtnZoom = TRUE;
- gCameraBtnOrbit = FALSE;
- gCameraBtnPan = FALSE;
+ gCameraBtnZoom = true;
+ gCameraBtnOrbit = false;
+ gCameraBtnPan = false;
- gGrabBtnSpin = FALSE;
- gGrabBtnVertical = FALSE;
+ gGrabBtnSpin = false;
+ gGrabBtnVertical = false;
}
void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
@@ -613,7 +613,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
}
// Focus buttons
- BOOL focus_visible = ( tool == LLToolCamera::getInstance() );
+ bool focus_visible = ( tool == LLToolCamera::getInstance() );
mBtnFocus ->setToggleState( focus_visible );
@@ -647,7 +647,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
getChild<LLUICtrl>("slider zoom")->setValue(gAgentCamera.getCameraZoomFraction() * 0.5f);
// Move buttons
- BOOL move_visible = (tool == LLToolGrab::getInstance());
+ bool move_visible = (tool == LLToolGrab::getInstance());
if (mBtnMove) mBtnMove ->setToggleState( move_visible );
@@ -672,7 +672,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
}
// Edit buttons
- BOOL edit_visible = tool == LLToolCompTranslate::getInstance() ||
+ bool edit_visible = tool == LLToolCompTranslate::getInstance() ||
tool == LLToolCompRotate::getInstance() ||
tool == LLToolCompScale::getInstance() ||
tool == LLToolFace::getInstance() ||
@@ -750,7 +750,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
if (mCheckStretchUniformLabel) mCheckStretchUniformLabel->setVisible( edit_visible );
// Create buttons
- BOOL create_visible = (tool == LLToolCompCreate::getInstance());
+ bool create_visible = (tool == LLToolCompCreate::getInstance());
mBtnCreate ->setToggleState( tool == LLToolCompCreate::getInstance() );
@@ -760,7 +760,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
// don't highlight any placer button
for (std::vector<LLButton*>::size_type i = 0; i < mButtons.size(); i++)
{
- mButtons[i]->setToggleState(FALSE);
+ mButtons[i]->setToggleState(false);
mButtons[i]->setVisible( create_visible );
}
}
@@ -771,7 +771,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
{
LLPCode pcode = LLToolPlacer::getObjectType();
LLPCode button_pcode = toolData[t];
- BOOL state = (pcode == button_pcode);
+ bool state = (pcode == button_pcode);
mButtons[t]->setToggleState( state );
mButtons[t]->setVisible( create_visible );
}
@@ -786,7 +786,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
if (mCheckCopyRotates && mCheckCopySelection) mCheckCopyRotates->setEnabled( mCheckCopySelection->get() );
// Land buttons
- BOOL land_visible = (tool == LLToolBrushLand::getInstance() || tool == LLToolSelectLand::getInstance() );
+ bool land_visible = (tool == LLToolBrushLand::getInstance() || tool == LLToolSelectLand::getInstance() );
mCostTextBorder->setVisible(!land_visible);
@@ -855,7 +855,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
// virtual
-BOOL LLFloaterTools::canClose()
+bool LLFloaterTools::canClose()
{
// don't close when quitting, so camera will stay put
return !LLApp::isExiting();
@@ -881,17 +881,17 @@ void LLFloaterTools::onOpen(const LLSD& key)
// so it won't be getting any layout or visibility updates, update once
// further updates will come from updateLayout()
LLCoordGL select_center_screen;
- MASK mask = gKeyboard->currentMask(TRUE);
+ MASK mask = gKeyboard->currentMask(true);
updatePopup(select_center_screen, mask);
}
- //gMenuBarView->setItemVisible("BuildTools", TRUE);
+ //gMenuBarView->setItemVisible("BuildTools", true);
}
// virtual
void LLFloaterTools::onClose(bool app_quitting)
{
- mTab->setVisible(FALSE);
+ mTab->setVisible(false);
LLViewerJoystick::getInstance()->moveAvatar(false);
@@ -904,7 +904,7 @@ void LLFloaterTools::onClose(bool app_quitting)
// exit component selection mode
LLSelectMgr::getInstance()->promoteSelectionToRoot();
- gSavedSettings.setBOOL("EditLinkedParts", FALSE);
+ gSavedSettings.setBOOL("EditLinkedParts", false);
gViewerWindow->showCursor();
@@ -919,7 +919,7 @@ void LLFloaterTools::onClose(bool app_quitting)
// so manually reset tool to default (pie menu tool)
LLToolMgr::getInstance()->getCurrentToolset()->selectFirstTool();
- //gMenuBarView->setItemVisible("BuildTools", FALSE);
+ //gMenuBarView->setItemVisible("BuildTools", false);
LLFloaterReg::hideInstance("media_settings");
// hide the advanced object weights floater
@@ -934,7 +934,7 @@ void LLFloaterTools::onClose(bool app_quitting)
if(sPreviousFocusOnAvatar)
{
sPreviousFocusOnAvatar = false;
- gAgentCamera.setAllowChangeToFollow(TRUE);
+ gAgentCamera.setAllowChangeToFollow(true);
}
}
@@ -953,18 +953,18 @@ void commit_radio_group_move(LLUICtrl* ctrl)
std::string selected = group->getValue().asString();
if (selected == "radio move")
{
- gGrabBtnVertical = FALSE;
- gGrabBtnSpin = FALSE;
+ gGrabBtnVertical = false;
+ gGrabBtnSpin = false;
}
else if (selected == "radio lift")
{
- gGrabBtnVertical = TRUE;
- gGrabBtnSpin = FALSE;
+ gGrabBtnVertical = true;
+ gGrabBtnSpin = false;
}
else if (selected == "radio spin")
{
- gGrabBtnVertical = FALSE;
- gGrabBtnSpin = TRUE;
+ gGrabBtnVertical = false;
+ gGrabBtnSpin = true;
}
}
@@ -974,21 +974,21 @@ void commit_radio_group_focus(LLUICtrl* ctrl)
std::string selected = group->getValue().asString();
if (selected == "radio zoom")
{
- gCameraBtnZoom = TRUE;
- gCameraBtnOrbit = FALSE;
- gCameraBtnPan = FALSE;
+ gCameraBtnZoom = true;
+ gCameraBtnOrbit = false;
+ gCameraBtnPan = false;
}
else if (selected == "radio orbit")
{
- gCameraBtnZoom = FALSE;
- gCameraBtnOrbit = TRUE;
- gCameraBtnPan = FALSE;
+ gCameraBtnZoom = false;
+ gCameraBtnOrbit = true;
+ gCameraBtnPan = false;
}
else if (selected == "radio pan")
{
- gCameraBtnZoom = FALSE;
- gCameraBtnOrbit = FALSE;
- gCameraBtnPan = TRUE;
+ gCameraBtnZoom = false;
+ gCameraBtnOrbit = false;
+ gCameraBtnPan = true;
}
}
@@ -1074,7 +1074,7 @@ void commit_select_component(void *data)
gFocusMgr.setKeyboardFocus(NULL);
}
- BOOL select_individuals = floaterp->mCheckSelectIndividual->get();
+ bool select_individuals = floaterp->mCheckSelectIndividual->get();
gSavedSettings.setBOOL("EditLinkedParts", select_individuals);
floaterp->dirty();
@@ -1092,7 +1092,7 @@ void commit_select_component(void *data)
void LLFloaterTools::setObjectType( LLPCode pcode )
{
LLToolPlacer::setObjectType( pcode );
- gSavedSettings.setBOOL("CreateToolCopySelection", FALSE);
+ gSavedSettings.setBOOL("CreateToolCopySelection", false);
gFocusMgr.setMouseCapture(NULL);
}
diff --git a/indra/newview/llfloatertools.h b/indra/newview/llfloatertools.h
index 3bb6492a6e..34df7b593d 100644
--- a/indra/newview/llfloatertools.h
+++ b/indra/newview/llfloatertools.h
@@ -55,7 +55,7 @@ class LLFloaterTools
: public LLFloater
{
public:
- virtual BOOL postBuild();
+ virtual bool postBuild();
static void* createPanelPermissions(void* vdata);
static void* createPanelObject(void* vdata);
static void* createPanelVolume(void* vdata);
@@ -67,7 +67,7 @@ public:
virtual ~LLFloaterTools();
/*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ BOOL canClose();
+ /*virtual*/ bool canClose();
/*virtual*/ void onClose(bool app_quitting);
/*virtual*/ void draw();
/*virtual*/ void onFocusReceived();
@@ -181,8 +181,8 @@ public:
LLObjectSelectionHandle mObjectSelection;
private:
- BOOL mDirty;
- BOOL mHasSelection;
+ bool mDirty;
+ bool mHasSelection;
std::map<std::string, std::string> mStatusText;
diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp
index 9f277021c8..5192e62fe5 100644
--- a/indra/newview/llfloatertopobjects.cpp
+++ b/indra/newview/llfloatertopobjects.cpp
@@ -73,7 +73,7 @@ void LLFloaterTopObjects::show()
*/
LLFloaterTopObjects::LLFloaterTopObjects(const LLSD& key)
: LLFloater(key),
- mInitialized(FALSE),
+ mInitialized(false),
mtotalScore(0.f)
{
mCommitCallbackRegistrar.add("TopObjects.ShowBeacon", boost::bind(&LLFloaterTopObjects::onClickShowBeacon, this));
@@ -93,12 +93,12 @@ LLFloaterTopObjects::~LLFloaterTopObjects()
}
// virtual
-BOOL LLFloaterTopObjects::postBuild()
+bool LLFloaterTopObjects::postBuild()
{
mObjectsScrollList = getChild<LLScrollListCtrl>("objects_list");
- mObjectsScrollList->setFocus(TRUE);
+ mObjectsScrollList->setFocus(true);
mObjectsScrollList->setDoubleClickCallback(onDoubleClickObjectsList, this);
- mObjectsScrollList->setCommitOnSelectionChange(TRUE);
+ mObjectsScrollList->setCommitOnSelectionChange(true);
mObjectsScrollList->setCommitCallback(boost::bind(&LLFloaterTopObjects::onSelectionChanged, this));
setDefaultBtn("show_beacon_btn");
@@ -107,7 +107,7 @@ BOOL LLFloaterTopObjects::postBuild()
mFlags = 0;
mFilter.clear();
- return TRUE;
+ return true;
}
// static
void LLFloaterTopObjects::setMode(U32 mode)
@@ -129,7 +129,7 @@ void LLFloaterTopObjects::handle_land_reply(LLMessageSystem* msg, void** data)
if (!instance->mObjectListIDs.size() && !instance->mInitialized)
{
instance->onRefresh();
- instance->mInitialized = TRUE;
+ instance->mInitialized = true;
}
}
else
diff --git a/indra/newview/llfloatertopobjects.h b/indra/newview/llfloatertopobjects.h
index b73401e50d..35801060ed 100644
--- a/indra/newview/llfloatertopobjects.h
+++ b/indra/newview/llfloatertopobjects.h
@@ -62,7 +62,7 @@ public:
void clearList();
void updateSelectionInfo();
- virtual BOOL postBuild();
+ virtual bool postBuild();
void onRefresh();
@@ -104,7 +104,7 @@ private:
U32 mFlags;
std::string mFilter;
- BOOL mInitialized;
+ bool mInitialized;
F32 mtotalScore;
diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp
index 1aeb727172..db5b25a8f7 100644
--- a/indra/newview/llfloatertos.cpp
+++ b/indra/newview/llfloatertos.cpp
@@ -56,7 +56,7 @@ LLFloaterTOS::LLFloaterTOS(const LLSD& data)
{
}
-BOOL LLFloaterTOS::postBuild()
+bool LLFloaterTOS::postBuild()
{
childSetAction("Continue", onContinue, this);
childSetAction("Cancel", onCancel, this);
@@ -66,11 +66,11 @@ BOOL LLFloaterTOS::postBuild()
{
// this displays the critical message
LLUICtrl *tos_text = getChild<LLUICtrl>("tos_text");
- tos_text->setEnabled( FALSE );
- tos_text->setFocus(TRUE);
+ tos_text->setEnabled(false);
+ tos_text->setFocus(true);
tos_text->setValue(LLSD(mMessage));
- return TRUE;
+ return true;
}
// disable Agree to TOS radio button until the page has fully loaded
@@ -78,7 +78,7 @@ BOOL LLFloaterTOS::postBuild()
// hide the SL text widget if we're displaying TOS with using a browser widget.
LLUICtrl *editor = getChild<LLUICtrl>("tos_text");
- editor->setVisible( FALSE );
+ editor->setVisible(false);
LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("tos_html");
if ( web_browser )
@@ -111,7 +111,7 @@ BOOL LLFloaterTOS::postBuild()
#endif
}
- return TRUE;
+ return true;
}
void LLFloaterTOS::setSiteIsAlive( bool alive )
diff --git a/indra/newview/llfloatertos.h b/indra/newview/llfloatertos.h
index 7c2f0705b7..8e2cff02cc 100644
--- a/indra/newview/llfloatertos.h
+++ b/indra/newview/llfloatertos.h
@@ -47,9 +47,9 @@ public:
LLFloaterTOS(const LLSD& data);
virtual ~LLFloaterTOS();
- BOOL postBuild();
-
- virtual void draw();
+ bool postBuild() override;
+
+ void draw() override;
static void updateAgree( LLUICtrl *, void* userdata );
static void onContinue( void* userdata );
@@ -60,7 +60,7 @@ public:
void updateAgreeEnabled(bool enabled);
// inherited from LLViewerMediaObserver
- /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
+ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) override;
private:
static void testSiteIsAliveCoro(LLHandle<LLFloater> handle, std::string url);
@@ -70,8 +70,6 @@ private:
bool mSiteAlive;
bool mRealNavigateBegun;
std::string mReplyPumpName;
-
-
};
#endif // LL_LLFLOATERTOS_H
diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp
index a025a859e7..6cfc1828dc 100644
--- a/indra/newview/llfloatertoybox.cpp
+++ b/indra/newview/llfloatertoybox.cpp
@@ -57,7 +57,7 @@ bool compare_localized_command_labels(LLCommand * cmd1, LLCommand * cmd2)
return (lab1 < lab2);
}
-BOOL LLFloaterToybox::postBuild()
+bool LLFloaterToybox::postBuild()
{
mToolBar = getChild<LLToolBar>("toybox_toolbar");
@@ -94,7 +94,7 @@ BOOL LLFloaterToybox::postBuild()
mToolBar->addCommand((*it)->id());
}
- return TRUE;
+ return true;
}
void LLFloaterToybox::draw()
@@ -151,7 +151,7 @@ void LLFloaterToybox::onBtnClearAll()
LLNotificationsUtil::add("ConfirmClearAllToybox");
}
-BOOL LLFloaterToybox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+bool LLFloaterToybox::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
diff --git a/indra/newview/llfloatertoybox.h b/indra/newview/llfloatertoybox.h
index 10aee0e6f5..d180cc4337 100644
--- a/indra/newview/llfloatertoybox.h
+++ b/indra/newview/llfloatertoybox.h
@@ -41,13 +41,13 @@ public:
virtual ~LLFloaterToybox();
// virtuals
- BOOL postBuild();
- void draw();
- /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ bool postBuild() override;
+ void draw() override;
+ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
- std::string& tooltip_msg);
+ std::string& tooltip_msg) override;
protected:
void onBtnClearAll();
diff --git a/indra/newview/llfloatertranslationsettings.cpp b/indra/newview/llfloatertranslationsettings.cpp
index d29ecbbf95..b9b845fde5 100644
--- a/indra/newview/llfloatertranslationsettings.cpp
+++ b/indra/newview/llfloatertranslationsettings.cpp
@@ -52,7 +52,7 @@ LLFloaterTranslationSettings::LLFloaterTranslationSettings(const LLSD& key)
}
// virtual
-BOOL LLFloaterTranslationSettings::postBuild()
+bool LLFloaterTranslationSettings::postBuild()
{
mMachineTranslationCB = getChild<LLCheckBoxCtrl>("translate_chat_checkbox");
mLanguageCombo = getChild<LLComboBox>("translate_language_combo");
@@ -106,15 +106,15 @@ BOOL LLFloaterTranslationSettings::postBuild()
});
center();
- return TRUE;
+ return true;
}
// virtual
void LLFloaterTranslationSettings::onOpen(const LLSD& key)
{
mMachineTranslationCB->setValue(gSavedSettings.getBOOL("TranslateChat"));
- mLanguageCombo->setSelectedByValue(gSavedSettings.getString("TranslateLanguage"), TRUE);
- mTranslationServiceRadioGroup->setSelectedByValue(gSavedSettings.getString("TranslationService"), TRUE);
+ mLanguageCombo->setSelectedByValue(gSavedSettings.getString("TranslateLanguage"), true);
+ mTranslationServiceRadioGroup->setSelectedByValue(gSavedSettings.getString("TranslationService"), true);
LLSD azure_key = gSavedSettings.getLLSD("AzureTranslateAPIKey");
if (azure_key.isMap() && !azure_key["id"].asString().empty())
@@ -135,22 +135,22 @@ void LLFloaterTranslationSettings::onOpen(const LLSD& key)
}
else
{
- mAzureAPIKeyEditor->setTentative(TRUE);
+ mAzureAPIKeyEditor->setTentative(true);
mAzureAPIRegionEditor->setTentative(true);
- mAzureKeyVerified = FALSE;
+ mAzureKeyVerified = false;
}
std::string google_key = gSavedSettings.getString("GoogleTranslateAPIKey");
if (!google_key.empty())
{
mGoogleAPIKeyEditor->setText(google_key);
- mGoogleAPIKeyEditor->setTentative(FALSE);
+ mGoogleAPIKeyEditor->setTentative(false);
verifyKey(LLTranslate::SERVICE_GOOGLE, google_key, false);
}
else
{
- mGoogleAPIKeyEditor->setTentative(TRUE);
- mGoogleKeyVerified = FALSE;
+ mGoogleAPIKeyEditor->setTentative(true);
+ mGoogleKeyVerified = false;
}
LLSD deepl_key = gSavedSettings.getLLSD("DeepLTranslateAPIKey");
@@ -163,8 +163,8 @@ void LLFloaterTranslationSettings::onOpen(const LLSD& key)
}
else
{
- mDeepLAPIKeyEditor->setTentative(TRUE);
- mDeepLKeyVerified = FALSE;
+ mDeepLAPIKeyEditor->setTentative(true);
+ mDeepLKeyVerified = false;
}
updateControlsEnabledState();
@@ -340,7 +340,7 @@ void LLFloaterTranslationSettings::onEditorFocused(LLFocusableElement* control)
if (editor->getTentative())
{
editor->setText(LLStringUtil::null);
- editor->setTentative(FALSE);
+ editor->setTentative(false);
}
}
}
diff --git a/indra/newview/llfloatertranslationsettings.h b/indra/newview/llfloatertranslationsettings.h
index eff0803fdd..a111d531da 100644
--- a/indra/newview/llfloatertranslationsettings.h
+++ b/indra/newview/llfloatertranslationsettings.h
@@ -39,13 +39,13 @@ class LLFloaterTranslationSettings : public LLFloater
{
public:
LLFloaterTranslationSettings(const LLSD& key);
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void onOpen(const LLSD& key);
+ bool postBuild() override;
+ void onOpen(const LLSD& key) override;
void setAzureVerified(bool ok, bool alert, S32 status);
void setGoogleVerified(bool ok, bool alert, S32 status);
void setDeepLVerified(bool ok, bool alert, S32 status);
- void onClose(bool app_quitting);
+ void onClose(bool app_quitting) override;
private:
std::string getSelectedService() const;
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp
index 553d09bec2..70504944b1 100644
--- a/indra/newview/llfloateruipreview.cpp
+++ b/indra/newview/llfloateruipreview.cpp
@@ -138,23 +138,23 @@ public:
virtual ~LLFloaterUIPreview();
std::string getLocStr(S32 ID); // fetches the localization string based on what is selected in the drop-down menu
- void displayFloater(BOOL click, S32 ID); // needs to be public so live file can call it when it finds an update
+ void displayFloater(bool click, S32 ID); // needs to be public so live file can call it when it finds an update
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onClose(bool app_quitting);
void refreshList(); // refresh list (empty it out and fill it up from scratch)
void addFloaterEntry(const std::string& path); // add a single file's entry to the list of floaters
- static BOOL containerType(LLView* viewp); // check if the element is a container type and tree traverses need to look at its children
+ static bool containerType(LLView* viewp); // check if the element is a container type and tree traverses need to look at its children
public:
LLPreviewedFloater* mDisplayedFloater; // the floater which is currently being displayed
LLPreviewedFloater* mDisplayedFloater_2; // the floater which is currently being displayed
LLGUIPreviewLiveFile* mLiveFile; // live file for checking for updates to the currently-displayed XML file
LLOverlapPanel* mOverlapPanel; // custom overlapping elements panel
- // BOOL mHighlightingDiffs; // bool for whether localization diffs are being highlighted or not
- BOOL mHighlightingOverlaps; // bool for whether overlapping elements are being highlighted
+ // bool mHighlightingDiffs; // bool for whether localization diffs are being highlighted or not
+ bool mHighlightingOverlaps; // bool for whether overlapping elements are being highlighted
// typedef std::map<std::string,std::pair<std::list<std::string>,std::list<std::string> > > DiffMap; // this version copies the lists etc., and thus is bad memory-wise
typedef std::list<std::string> StringList;
@@ -195,11 +195,11 @@ private:
void highlightChangedElements(); // look up the list of elements to highlight and highlight them in the current floater
void highlightChangedFiles(); // look up the list of changed files to highlight and highlight them in the scroll list
void findOverlapsInChildren(LLView* parent); // fill the map below with element overlap information
- static BOOL overlapIgnorable(LLView* viewp); // check it the element can be ignored for overlap/localization purposes
+ static bool overlapIgnorable(LLView* viewp); // check it the element can be ignored for overlap/localization purposes
// check if two elements overlap using their rectangles
// used instead of llrect functions because by adding a few pixels of leeway I can cut down drastically on the number of overlaps
- BOOL elementOverlap(LLView* view1, LLView* view2);
+ bool elementOverlap(LLView* view1, LLView* view2);
// Button/drop-down action listeners (self explanatory)
void onClickDisplayFloater(S32 id);
@@ -243,7 +243,7 @@ public:
virtual ~LLGUIPreviewLiveFile();
LLFloaterUIPreview* mParent;
LLFadeEventTimer* mFadeTimer; // timer for fade-to-yellow-and-back effect to warn that file has been reloaded
- BOOL mFirstFade; // setting this avoids showing the fade reload warning on first load
+ bool mFirstFade; // setting this avoids showing the fade reload warning on first load
std::string mFileName;
protected:
bool loadFile();
@@ -254,10 +254,10 @@ class LLFadeEventTimer : public LLEventTimer
{
public:
LLFadeEventTimer(F32 refresh, LLGUIPreviewLiveFile* parent);
- BOOL tick();
+ bool tick();
LLGUIPreviewLiveFile* mParent;
private:
- BOOL mFadingOut; // fades in then out; this is toggled in between
+ bool mFadingOut; // fades in then out; this is toggled in between
LLColor4 mOriginalColor; // original color; color is reset to this after fade is coimplete
};
@@ -273,9 +273,9 @@ public:
}
virtual void draw();
- BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
- BOOL handleToolTip(S32 x, S32 y, MASK mask);
- BOOL selectElement(LLView* parent, int x, int y, int depth); // select element to display its overlappers
+ bool handleRightMouseDown(S32 x, S32 y, MASK mask);
+ bool handleToolTip(S32 x, S32 y, MASK mask);
+ bool selectElement(LLView* parent, int x, int y, int depth); // select element to display its overlappers
LLFloaterUIPreview* mFloaterUIPreview;
@@ -311,7 +311,7 @@ LLLocalizationResetForcer::~LLLocalizationResetForcer()
LLGUIPreviewLiveFile::LLGUIPreviewLiveFile(std::string path, std::string name, LLFloaterUIPreview* parent)
: mFileName(name),
mParent(parent),
- mFirstFade(TRUE),
+ mFirstFade(true),
mFadeTimer(NULL),
LLLiveFile(path, 1.0)
{}
@@ -329,10 +329,10 @@ LLGUIPreviewLiveFile::~LLGUIPreviewLiveFile()
// Live file load
bool LLGUIPreviewLiveFile::loadFile()
{
- mParent->displayFloater(FALSE,1); // redisplay the floater
- if(mFirstFade) // only fade if it wasn't just clicked on; can't use "clicked" BOOL below because of an oddity with setting LLLiveFile initial state
+ mParent->displayFloater(false,1); // redisplay the floater
+ if(mFirstFade) // only fade if it wasn't just clicked on; can't use "clicked" bool below because of an oddity with setting LLLiveFile initial state
{
- mFirstFade = FALSE;
+ mFirstFade = false;
}
else
{
@@ -348,24 +348,24 @@ bool LLGUIPreviewLiveFile::loadFile()
// Initialize fade event timer
LLFadeEventTimer::LLFadeEventTimer(F32 refresh, LLGUIPreviewLiveFile* parent)
: mParent(parent),
- mFadingOut(TRUE),
+ mFadingOut(true),
LLEventTimer(refresh)
{
mOriginalColor = mParent->mParent->mDisplayedFloater->getBackgroundColor();
}
// Single tick of fade event timer: increment the color
-BOOL LLFadeEventTimer::tick()
+bool LLFadeEventTimer::tick()
{
float diff = 0.04f;
- if(TRUE == mFadingOut) // set fade for in/out color direction
+ if(true == mFadingOut) // set fade for in/out color direction
{
diff = -diff;
}
if(NULL == mParent) // no more need to tick, so suicide
{
- return TRUE;
+ return true;
}
// Set up colors
@@ -385,10 +385,10 @@ BOOL LLFadeEventTimer::tick()
if(bg_color[2] <= 0.0f) // end of fade out, start fading in
{
- mFadingOut = FALSE;
+ mFadingOut = false;
}
- return FALSE;
+ return false;
}
// Constructor
@@ -397,8 +397,8 @@ LLFloaterUIPreview::LLFloaterUIPreview(const LLSD& key)
mDisplayedFloater(NULL),
mDisplayedFloater_2(NULL),
mLiveFile(NULL),
- // sHighlightingDiffs(FALSE),
- mHighlightingOverlaps(FALSE),
+ // sHighlightingDiffs(false),
+ mHighlightingOverlaps(false),
mLastDisplayedX(0),
mLastDisplayedY(0)
{
@@ -423,7 +423,7 @@ LLFloaterUIPreview::~LLFloaterUIPreview()
}
// Perform post-build setup (defined in superclass)
-BOOL LLFloaterUIPreview::postBuild()
+bool LLFloaterUIPreview::postBuild()
{
LLPanel* main_panel_tmp = getChild<LLPanel>("main_panel"); // get a pointer to the main panel in order to...
mFileList = main_panel_tmp->getChild<LLScrollListCtrl>("name_list"); // save pointer to file list
@@ -481,8 +481,8 @@ BOOL LLFloaterUIPreview::postBuild()
mDelim = gDirUtilp->getDirDelimiter(); // initialize delimiter to dir sep slash
// refresh list of available languages (EN will still be default)
- BOOL found = TRUE;
- BOOL found_en_us = FALSE;
+ bool found = true;
+ bool found_en_us = false;
std::string language_directory;
std::string xui_dir = get_xui_dir(); // directory containing localizations -- don't forget trailing delim
mLanguageSelection->removeall(); // clear out anything temporarily in list from XML
@@ -502,7 +502,7 @@ BOOL LLFloaterUIPreview::postBuild()
{
if(!strncmp("en",language_directory.c_str(),5)) // remember if we've seen en, so we can make it default
{
- found_en_us = TRUE;
+ found_en_us = true;
}
else
{
@@ -527,7 +527,7 @@ BOOL LLFloaterUIPreview::postBuild()
refreshList(); // refresh the list of available floaters
- return TRUE;
+ return true;
}
// Callback for language combo box selection: refresh current floater when you change languages
@@ -541,7 +541,7 @@ void LLFloaterUIPreview::onLanguageComboSelect(LLUICtrl* ctrl)
if(mDisplayedFloater)
{
onClickCloseDisplayedFloater(PRIMARY_FLOATER);
- displayFloater(TRUE,1);
+ displayFloater(true,1);
}
}
else
@@ -549,7 +549,7 @@ void LLFloaterUIPreview::onLanguageComboSelect(LLUICtrl* ctrl)
if(mDisplayedFloater_2)
{
onClickCloseDisplayedFloater(PRIMARY_FLOATER);
- displayFloater(TRUE,2); // *TODO: make take an arg
+ displayFloater(true,2); // *TODO: make take an arg
}
}
@@ -641,7 +641,7 @@ void LLFloaterUIPreview::refreshList()
// Note: the mask doesn't seem to accept regular expressions, so there need to be two directory searches here
mFileList->clearRows(); // empty list
std::string name;
- BOOL found = TRUE;
+ bool found = true;
LLDirIterator floater_iter(getLocalizedDirectory(), "floater_*.xml");
while(found) // for every floater file that matches the pattern
@@ -651,7 +651,7 @@ void LLFloaterUIPreview::refreshList()
addFloaterEntry(name.c_str()); // and add it to the list (file name only; localization code takes care of rest of path)
}
}
- found = TRUE;
+ found = true;
LLDirIterator inspect_iter(getLocalizedDirectory(), "inspect_*.xml");
while(found) // for every inspector file that matches the pattern
@@ -661,7 +661,7 @@ void LLFloaterUIPreview::refreshList()
addFloaterEntry(name.c_str()); // and add it to the list (file name only; localization code takes care of rest of path)
}
}
- found = TRUE;
+ found = true;
LLDirIterator menu_iter(getLocalizedDirectory(), "menu_*.xml");
while(found) // for every menu file that matches the pattern
@@ -671,7 +671,7 @@ void LLFloaterUIPreview::refreshList()
addFloaterEntry(name.c_str()); // and add it to the list (file name only; localization code takes care of rest of path)
}
}
- found = TRUE;
+ found = true;
LLDirIterator panel_iter(getLocalizedDirectory(), "panel_*.xml");
while(found) // for every panel file that matches the pattern
@@ -681,7 +681,7 @@ void LLFloaterUIPreview::refreshList()
addFloaterEntry(name.c_str()); // and add it to the list (file name only; localization code takes care of rest of path)
}
}
- found = TRUE;
+ found = true;
LLDirIterator sidepanel_iter(getLocalizedDirectory(), "sidepanel_*.xml");
while(found) // for every sidepanel file that matches the pattern
@@ -714,7 +714,7 @@ void LLFloaterUIPreview::addFloaterEntry(const std::string& path)
// Get name of floater:
LLXmlTree xml_tree;
std::string full_path = getLocalizedDirectory() + path; // get full path
- BOOL success = xml_tree.parseFile(full_path.c_str(), TRUE); // parse xml
+ bool success = xml_tree.parseFile(full_path.c_str(), true); // parse xml
std::string entry_name;
std::string entry_title;
if(success)
@@ -771,13 +771,13 @@ void LLFloaterUIPreview::addFloaterEntry(const std::string& path)
// Respond to button click to display/refresh currently-selected floater
void LLFloaterUIPreview::onClickDisplayFloater(S32 caller_id)
{
- displayFloater(TRUE, caller_id);
+ displayFloater(true, caller_id);
}
// Saves the current floater/panel
void LLFloaterUIPreview::onClickSaveFloater(S32 caller_id)
{
- displayFloater(TRUE, caller_id);
+ displayFloater(true, caller_id);
popupAndPrintWarning("Save-floater functionality removed, use XML schema to clean up XUI files");
}
@@ -789,7 +789,7 @@ void LLFloaterUIPreview::onClickSaveAll(S32 caller_id)
for (int index = 0; index < listSize; index++)
{
mFileList->selectNthItem(index);
- displayFloater(TRUE, caller_id);
+ displayFloater(true, caller_id);
}
popupAndPrintWarning("Save-floater functionality removed, use XML schema to clean up XUI files");
}
@@ -797,7 +797,7 @@ void LLFloaterUIPreview::onClickSaveAll(S32 caller_id)
// Actually display the floater
// Only set up a new live file if this came from a click (at which point there should be no existing live file), rather than from the live file's update itself;
// otherwise, we get an infinite loop as the live file keeps recreating itself. That means this function is generally called twice.
-void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID)
+void LLFloaterUIPreview::displayFloater(bool click, S32 ID)
{
// Convince UI that we're in a different language (the one selected on the drop-down menu)
LLLocalizationResetForcer reset_forcer(this, ID); // save old language in reset forcer object (to be reset upon destruction when it falls out of scope)
@@ -805,7 +805,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID)
LLPreviewedFloater** floaterp = (ID == 1 ? &(mDisplayedFloater) : &(mDisplayedFloater_2));
if(ID == 1)
{
- BOOL floater_already_open = mDisplayedFloater != NULL;
+ bool floater_already_open = mDisplayedFloater != NULL;
if(floater_already_open) // if we are already displaying a floater
{
mLastDisplayedX = mDisplayedFloater->calcScreenRect().mLeft; // save floater's last known position to put the new one there
@@ -859,7 +859,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID)
panel->buildFromFile(path); // build it
panel->setOrigin(2,2); // reset its origin point so it's not offset by -left or other XUI attributes
(*floaterp)->setTitle(path); // use the file name as its title, since panels have no guaranteed meaningful name attribute
- panel->setUseBoundingRect(TRUE); // enable the use of its outer bounding rect (normally disabled because it's O(n) on the number of sub-elements)
+ panel->setUseBoundingRect(true); // enable the use of its outer bounding rect (normally disabled because it's O(n) on the number of sub-elements)
panel->updateBoundingRect(); // update bounding rect
LLRect bounding_rect = panel->getBoundingRect(); // get the bounding rect
LLRect new_rect = panel->getRect(); // get the panel's rect
@@ -879,15 +879,15 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID)
// *HACK: Remove ability to close it; if you close it, its destructor gets called, but we don't know it's null and try to delete it again,
// resulting in a double free
- (*floaterp)->setCanClose(FALSE);
+ (*floaterp)->setCanClose(false);
if(ID == 1)
{
- mCloseOtherButton->setEnabled(TRUE); // enable my floater's close button
+ mCloseOtherButton->setEnabled(true); // enable my floater's close button
}
else
{
- mCloseOtherButton_2->setEnabled(TRUE);
+ mCloseOtherButton_2->setEnabled(true);
}
// Add localization to title so user knows whether it's localized or defaulted to en
@@ -920,7 +920,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID)
if(ID == 1)
{
- mToggleOverlapButton->setEnabled(TRUE);
+ mToggleOverlapButton->setEnabled(true);
}
if(LLView::sHighlightingDiffs && click && ID == 1)
@@ -1034,7 +1034,7 @@ void LLFloaterUIPreview::getExecutablePath(const std::vector<std::string>& filen
#if LL_DARWIN
// on Mac, if it's an application bundle, figure out the actual path from the Info.plist file
CFStringRef path_cfstr = CFStringCreateWithCString(kCFAllocatorDefault, chosen_path.c_str(), kCFStringEncodingMacRoman); // get path as a CFStringRef
- CFURLRef path_url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, path_cfstr, kCFURLPOSIXPathStyle, TRUE); // turn it into a CFURLRef
+ CFURLRef path_url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, path_cfstr, kCFURLPOSIXPathStyle, true); // turn it into a CFURLRef
CFBundleRef chosen_bundle = CFBundleCreate(kCFAllocatorDefault, path_url); // get a handle for the bundle
if(NULL != chosen_bundle)
{
@@ -1113,13 +1113,13 @@ void LLFloaterUIPreview::onClickToggleDiffHighlighting()
{
// Get the file and make sure it exists
std::string path_in_textfield = mDiffPathTextBox->getText(); // get file path
- BOOL error = FALSE;
+ bool error = false;
if(std::string("") == path_in_textfield) // check for blank file
{
std::string warning = "Unable to highlight differences because no file was provided; fill in the relevant text field";
popupAndPrintWarning(warning);
- error = TRUE;
+ error = true;
}
llstat dummy;
@@ -1127,13 +1127,13 @@ void LLFloaterUIPreview::onClickToggleDiffHighlighting()
{
std::string warning = std::string("Unable to highlight differences because an invalid path to a difference file was provided:\"") + path_in_textfield + "\"";
popupAndPrintWarning(warning);
- error = TRUE;
+ error = true;
}
// Build a list of changed elements as given by the XML
std::list<std::string> changed_element_names;
LLXmlTree xml_tree;
- BOOL success = xml_tree.parseFile(path_in_textfield.c_str(), TRUE);
+ bool success = xml_tree.parseFile(path_in_textfield.c_str(), true);
if(success && !error)
{
@@ -1163,7 +1163,7 @@ void LLFloaterUIPreview::onClickToggleDiffHighlighting()
{
std::string warning = std::string("Child was neither a file or an error, but rather the following:\"") + std::string(child->getName()) + "\"";
popupAndPrintWarning(warning);
- error = TRUE;
+ error = true;
break;
}
}
@@ -1172,19 +1172,19 @@ void LLFloaterUIPreview::onClickToggleDiffHighlighting()
{
std::string warning = std::string("Root node not named XuiDelta:\"") + path_in_textfield + "\"";
popupAndPrintWarning(warning);
- error = TRUE;
+ error = true;
}
}
else if(!error)
{
std::string warning = std::string("Unable to create tree from XML:\"") + path_in_textfield + "\"";
popupAndPrintWarning(warning);
- error = TRUE;
+ error = true;
}
if(error) // if we encountered an error, reset the button to off
{
- mToggleHighlightButton->setToggleState(FALSE);
+ mToggleHighlightButton->setToggleState(false);
}
else // only toggle if we didn't encounter an error
{
@@ -1258,17 +1258,17 @@ void LLFloaterUIPreview::highlightChangedElements()
boost::char_separator<char> sep(".");
tokenizer tokens(*iter, sep);
tokenizer::iterator token_iter;
- BOOL failed = FALSE;
+ bool failed = false;
for(token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter)
{
- element = element->findChild<LLView>(*token_iter,FALSE); // try to find element: don't recur, and don't create if missing
+ element = element->findChild<LLView>(*token_iter,false); // try to find element: don't recur, and don't create if missing
// if we still didn't find it...
if(NULL == element)
{
LL_INFOS() << "Unable to find element in XuiDelta file named \"" << *iter << "\" in file \"" << mLiveFile->mFileName <<
"\". The element may no longer exist, the path may be incorrect, or it may not be a non-displayable element (not an LLView) such as a \"string\" type." << LL_ENDL;
- failed = TRUE;
+ failed = true;
break;
}
}
@@ -1301,10 +1301,10 @@ void LLFloaterUIPreview::highlightChangedFiles()
{
for(DiffMap::iterator iter = mDiffsMap.begin(); iter != mDiffsMap.end(); ++iter) // for every file listed in diffs
{
- LLScrollListItem* item = mFileList->getItemByLabel(std::string(iter->first), FALSE, 1);
+ LLScrollListItem* item = mFileList->getItemByLabel(std::string(iter->first), false, 1);
if(item)
{
- item->setHighlighted(TRUE);
+ item->setHighlighted(true);
}
}
}
@@ -1314,8 +1314,8 @@ void LLFloaterUIPreview::onClickCloseDisplayedFloater(S32 caller_id)
{
if(caller_id == PRIMARY_FLOATER)
{
- mCloseOtherButton->setEnabled(FALSE);
- mToggleOverlapButton->setEnabled(FALSE);
+ mCloseOtherButton->setEnabled(false);
+ mToggleOverlapButton->setEnabled(false);
if(mDisplayedFloater)
{
@@ -1342,7 +1342,7 @@ void LLFloaterUIPreview::onClickCloseDisplayedFloater(S32 caller_id)
}
else
{
- mCloseOtherButton_2->setEnabled(FALSE);
+ mCloseOtherButton_2->setEnabled(false);
delete mDisplayedFloater_2;
mDisplayedFloater_2 = NULL;
}
@@ -1369,7 +1369,7 @@ void append_view_tooltip(LLView* tooltip_view, std::string *tooltip_msg)
tooltip_msg->append( msg );
}
-BOOL LLPreviewedFloater::handleToolTip(S32 x, S32 y, MASK mask)
+bool LLPreviewedFloater::handleToolTip(S32 x, S32 y, MASK mask)
{
if (!sShowRectangles)
{
@@ -1413,13 +1413,13 @@ BOOL LLPreviewedFloater::handleToolTip(S32 x, S32 y, MASK mask)
LLToolTipMgr::instance().show(LLToolTip::Params()
.message(tooltip_msg)
.max_width(400));
- return TRUE;
+ return true;
}
-BOOL LLPreviewedFloater::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLPreviewedFloater::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
selectElement(this,x,y,0);
- return TRUE;
+ return true;
}
// *NOTE: In order to hide all of the overlapping elements of the selected element so as to see it in context, here is what you would need to do:
@@ -1427,15 +1427,15 @@ BOOL LLPreviewedFloater::handleRightMouseDown(S32 x, S32 y, MASK mask)
// what you've really selected is a list of elements: the one you clicked on and everything that overlaps it.
// -The user then selects one of the elements from this list the overlap panel (click handling to the overlap panel would have to be added).
// This becomes the final selection (as opposed to the intermediate selection that was just made).
-// -Everything else that is currently displayed on the overlap panel should be hidden from view in the previewed floater itself (setVisible(FALSE)).
+// -Everything else that is currently displayed on the overlap panel should be hidden from view in the previewed floater itself (setVisible(false)).
// -Subsequent clicks on other elements in the overlap panel (they should still be there) should make other elements the final selection.
// -On close or on the click of a new button, everything should be shown again and all selection state should be cleared.
// ~Jacob, 8/08
-BOOL LLPreviewedFloater::selectElement(LLView* parent, int x, int y, int depth)
+bool LLPreviewedFloater::selectElement(LLView* parent, int x, int y, int depth)
{
if(getVisible())
{
- BOOL handled = FALSE;
+ bool handled = false;
if(LLFloaterUIPreview::containerType(parent))
{
for(child_list_const_iter_t child_it = parent->getChildList()->begin(); child_it != parent->getChildList()->end(); ++child_it)
@@ -1447,7 +1447,7 @@ BOOL LLPreviewedFloater::selectElement(LLView* parent, int x, int y, int depth)
child->getVisible() &&
selectElement(child, x, y, ++depth))
{
- handled = TRUE;
+ handled = true;
break;
}
}
@@ -1457,11 +1457,11 @@ BOOL LLPreviewedFloater::selectElement(LLView* parent, int x, int y, int depth)
{
LLView::sPreviewClickedElement = parent;
}
- return TRUE;
+ return true;
}
else
{
- return FALSE;
+ return false;
}
}
@@ -1472,7 +1472,7 @@ void LLPreviewedFloater::draw()
// Set and unset sDrawPreviewHighlights flag so as to avoid using two flags
if(mFloaterUIPreview->mHighlightingOverlaps)
{
- LLView::sDrawPreviewHighlights = TRUE;
+ LLView::sDrawPreviewHighlights = true;
}
// If we're looking for truncations, draw debug rects for the displayed
@@ -1492,7 +1492,7 @@ void LLPreviewedFloater::draw()
if(mFloaterUIPreview->mHighlightingOverlaps)
{
- LLView::sDrawPreviewHighlights = FALSE;
+ LLView::sDrawPreviewHighlights = false;
}
}
}
@@ -1518,7 +1518,7 @@ void LLFloaterUIPreview::onClickToggleOverlapping()
else
{
mHighlightingOverlaps = !mHighlightingOverlaps;
- displayFloater(FALSE,1);
+ displayFloater(false,1);
setRect(LLRect(getRect().mLeft,getRect().mTop,getRect().mRight + mOverlapPanel->getRect().getWidth(),getRect().mBottom));
setResizeLimits(width + mOverlapPanel->getRect().getWidth(), height);
}
@@ -1563,7 +1563,7 @@ void LLFloaterUIPreview::findOverlapsInChildren(LLView* parent)
// *HACK: don't overlap with the drag handle and various other elements
// This is using dynamic casts because there is no object-oriented way to tell which elements contain localizable text. These are a few that are ignorable.
// *NOTE: If a list of elements which have localizable content were created, this function should return false if viewp's class is in that list.
-BOOL LLFloaterUIPreview::overlapIgnorable(LLView* viewp)
+bool LLFloaterUIPreview::overlapIgnorable(LLView* viewp)
{
return NULL != dynamic_cast<LLDragHandle*>(viewp) ||
NULL != dynamic_cast<LLViewBorder*>(viewp) ||
@@ -1572,13 +1572,13 @@ BOOL LLFloaterUIPreview::overlapIgnorable(LLView* viewp)
// *HACK: these are the only two container types as of 8/08, per Richard
// This is using dynamic casts because there is no object-oriented way to tell which elements are containers.
-BOOL LLFloaterUIPreview::containerType(LLView* viewp)
+bool LLFloaterUIPreview::containerType(LLView* viewp)
{
return NULL != dynamic_cast<LLPanel*>(viewp) || NULL != dynamic_cast<LLLayoutStack*>(viewp);
}
// Check if two llview's rectangles overlap, with some tolerance
-BOOL LLFloaterUIPreview::elementOverlap(LLView* view1, LLView* view2)
+bool LLFloaterUIPreview::elementOverlap(LLView* view1, LLView* view2)
{
LLSD rec1 = view1->getRect().getValue();
LLSD rec2 = view2->getRect().getValue();
@@ -1599,7 +1599,7 @@ void LLOverlapPanel::draw()
if(!LLView::sPreviewClickedElement)
{
LLUI::translate(5,getRect().getHeight()-20); // translate to top-5,left-5
- LLView::sDrawPreviewHighlights = FALSE;
+ LLView::sDrawPreviewHighlights = false;
LLFontGL::getFontSansSerifSmall()->renderUTF8(current_selection_text, 0, 0, 0, text_color,
LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::NO_SHADOW);
}
@@ -1615,7 +1615,7 @@ void LLOverlapPanel::draw()
if(overlappers.size() == 0)
{
LLUI::translate(5,getRect().getHeight()-20); // translate to top-5,left-5
- LLView::sDrawPreviewHighlights = FALSE;
+ LLView::sDrawPreviewHighlights = false;
std::string current_selection = std::string(current_selection_text + LLView::sPreviewClickedElement->getName() + " (no elements overlap)");
S32 text_width = LLFontGL::getFontSansSerifSmall()->getWidth(current_selection) + 10;
LLFontGL::getFontSansSerifSmall()->renderUTF8(current_selection, 0, 0, 0, text_color,
@@ -1627,10 +1627,10 @@ void LLOverlapPanel::draw()
}
// recalculate required with and height; otherwise use cached
- BOOL need_to_recalculate_bounds = FALSE;
+ bool need_to_recalculate_bounds = false;
if(mLastClickedElement == NULL)
{
- need_to_recalculate_bounds = TRUE;
+ need_to_recalculate_bounds = true;
}
if(NULL == mLastClickedElement)
@@ -1680,7 +1680,7 @@ void LLOverlapPanel::draw()
}
LLUI::translate(5,getRect().getHeight()-10); // translate to top left
- LLView::sDrawPreviewHighlights = FALSE;
+ LLView::sDrawPreviewHighlights = false;
// draw currently-selected element at top of overlappers
LLUI::translate(0,-mSpacing);
diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp
index 48d6e01d32..de37c92326 100644
--- a/indra/newview/llfloaterurlentry.cpp
+++ b/indra/newview/llfloaterurlentry.cpp
@@ -60,7 +60,7 @@ LLFloaterURLEntry::~LLFloaterURLEntry()
sInstance = NULL;
}
-BOOL LLFloaterURLEntry::postBuild()
+bool LLFloaterURLEntry::postBuild()
{
mMediaURLEdit = getChild<LLComboBox>("media_entry");
@@ -80,7 +80,7 @@ BOOL LLFloaterURLEntry::postBuild()
setDefaultBtn("ok_btn");
buildURLHistory();
- return TRUE;
+ return true;
}
void LLFloaterURLEntry::buildURLHistory()
{
diff --git a/indra/newview/llfloaterurlentry.h b/indra/newview/llfloaterurlentry.h
index 04a8eca069..e991b96383 100644
--- a/indra/newview/llfloaterurlentry.h
+++ b/indra/newview/llfloaterurlentry.h
@@ -41,8 +41,8 @@ public:
// Can only be shown by LLPanelLandMedia, and pushes data back into
// that panel via the handle.
static LLHandle<LLFloater> show(LLHandle<LLPanel> panel_land_media_handle, const std::string media_url);
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void onClose( bool app_quitting );
+ bool postBuild() override;
+ void onClose( bool app_quitting ) override;
void headerFetchComplete(S32 status, const std::string& mime_type);
bool addURLToCombobox(const std::string& media_url);
diff --git a/indra/newview/llfloatervoiceeffect.cpp b/indra/newview/llfloatervoiceeffect.cpp
index 227720bee3..8b824cb63e 100644
--- a/indra/newview/llfloatervoiceeffect.cpp
+++ b/indra/newview/llfloatervoiceeffect.cpp
@@ -56,7 +56,7 @@ LLFloaterVoiceEffect::~LLFloaterVoiceEffect()
}
// virtual
-BOOL LLFloaterVoiceEffect::postBuild()
+bool LLFloaterVoiceEffect::postBuild()
{
setDefaultBtn("record_btn");
getChild<LLButton>("record_btn")->setFocus(true);
@@ -81,7 +81,7 @@ BOOL LLFloaterVoiceEffect::postBuild()
refreshEffectList();
updateControls();
- return TRUE;
+ return true;
}
// virtual
diff --git a/indra/newview/llfloatervoiceeffect.h b/indra/newview/llfloatervoiceeffect.h
index 4d432c46cc..3ef210a9c6 100644
--- a/indra/newview/llfloatervoiceeffect.h
+++ b/indra/newview/llfloatervoiceeffect.h
@@ -44,8 +44,8 @@ public:
LLFloaterVoiceEffect(const LLSD& key);
virtual ~LLFloaterVoiceEffect();
- virtual BOOL postBuild();
- virtual void onClose(bool app_quitting);
+ bool postBuild() override;
+ void onClose(bool app_quitting) override;
private:
enum ColumnIndex
@@ -58,7 +58,7 @@ private:
void updateControls();
/// Called by voice effect provider when voice effect list is changed.
- virtual void onVoiceEffectChanged(bool effect_list_updated);
+ virtual void onVoiceEffectChanged(bool effect_list_updated) override;
void onClickRecord();
void onClickPlay();
diff --git a/indra/newview/llfloatervoicevolume.cpp b/indra/newview/llfloatervoicevolume.cpp
index 23f19dd5aa..0cde73f0ab 100644
--- a/indra/newview/llfloatervoicevolume.cpp
+++ b/indra/newview/llfloatervoicevolume.cpp
@@ -60,7 +60,7 @@ public:
LLFloaterVoiceVolume(const LLSD& avatar_id);
virtual ~LLFloaterVoiceVolume();
- /*virtual*/ BOOL postBuild(void);
+ /*virtual*/ bool postBuild(void);
// Because floater is single instance, need to re-parse data on each spawn
// (for example, inspector about same avatar but in different position)
@@ -104,7 +104,7 @@ LLFloaterVoiceVolume::~LLFloaterVoiceVolume()
}
/*virtual*/
-BOOL LLFloaterVoiceVolume::postBuild(void)
+bool LLFloaterVoiceVolume::postBuild(void)
{
getChild<LLUICtrl>("mute_btn")->setCommitCallback(
boost::bind(&LLFloaterVoiceVolume::onClickMuteVolume, this) );
@@ -112,7 +112,7 @@ BOOL LLFloaterVoiceVolume::postBuild(void)
getChild<LLUICtrl>("volume_slider")->setCommitCallback(
boost::bind(&LLFloaterVoiceVolume::onVolumeChange, this, _2));
- return TRUE;
+ return true;
}
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index ceab472c55..b3a9e5c8e3 100644
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -84,7 +84,7 @@ LLFloaterWebContent::LLFloaterWebContent( const Params& params )
mCommitCallbackRegistrar.add( "WebContent.TestURL", boost::bind(&LLFloaterWebContent::onTestURL, this, _2));
}
-BOOL LLFloaterWebContent::postBuild()
+bool LLFloaterWebContent::postBuild()
{
// these are used in a bunch of places so cache them
mWebBrowser = getChild< LLMediaCtrl >( "webbrowser" );
@@ -111,7 +111,7 @@ BOOL LLFloaterWebContent::postBuild()
// initialize the URL history using the system URL History manager
initializeURLHistory();
- return TRUE;
+ return true;
}
void LLFloaterWebContent::initializeURLHistory()
diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h
index 0bf93504c2..3a1d019186 100644
--- a/indra/newview/llfloaterwebcontent.h
+++ b/indra/newview/llfloaterwebcontent.h
@@ -77,7 +77,7 @@ public:
static void geometryChanged(const std::string &uuid, S32 x, S32 y, S32 width, S32 height);
void geometryChanged(S32 x, S32 y, S32 width, S32 height);
- /* virtual */ BOOL postBuild();
+ /* virtual */ bool postBuild();
/* virtual */ void onOpen(const LLSD& key);
/* virtual */ bool matchesKey(const LLSD& key);
/* virtual */ void onClose(bool app_quitting);
diff --git a/indra/newview/llfloaterwhitelistentry.cpp b/indra/newview/llfloaterwhitelistentry.cpp
index 2a499f681b..4bc6aa2953 100644
--- a/indra/newview/llfloaterwhitelistentry.cpp
+++ b/indra/newview/llfloaterwhitelistentry.cpp
@@ -51,7 +51,7 @@ LLFloaterWhiteListEntry::~LLFloaterWhiteListEntry()
///////////////////////////////////////////////////////////////////////////////
//
-BOOL LLFloaterWhiteListEntry::postBuild()
+bool LLFloaterWhiteListEntry::postBuild()
{
mWhiteListEdit = getChild<LLLineEditor>("whitelist_entry");
@@ -60,7 +60,7 @@ BOOL LLFloaterWhiteListEntry::postBuild()
setDefaultBtn("ok_btn");
- return TRUE;
+ return true;
}
///////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llfloaterwhitelistentry.h b/indra/newview/llfloaterwhitelistentry.h
index deab49c523..650195b076 100644
--- a/indra/newview/llfloaterwhitelistentry.h
+++ b/indra/newview/llfloaterwhitelistentry.h
@@ -38,7 +38,7 @@ class LLFloaterWhiteListEntry :
LLFloaterWhiteListEntry(const LLSD& key);
~LLFloaterWhiteListEntry();
- BOOL postBuild();
+ bool postBuild() override;
private:
LLLineEditor* mWhiteListEdit;
diff --git a/indra/newview/llfloaterwindowsize.cpp b/indra/newview/llfloaterwindowsize.cpp
index 863b7cbb12..1d17654c53 100644
--- a/indra/newview/llfloaterwindowsize.cpp
+++ b/indra/newview/llfloaterwindowsize.cpp
@@ -63,7 +63,7 @@ LLFloaterWindowSize::LLFloaterWindowSize(const LLSD& key)
LLFloaterWindowSize::~LLFloaterWindowSize()
{}
-BOOL LLFloaterWindowSize::postBuild()
+bool LLFloaterWindowSize::postBuild()
{
center();
initWindowSizeControls();
@@ -72,7 +72,7 @@ BOOL LLFloaterWindowSize::postBuild()
getChild<LLUICtrl>("cancel_btn")->setCommitCallback(
boost::bind(&LLFloaterWindowSize::onClickCancel, this));
setDefaultBtn("set_btn");
- return TRUE;
+ return true;
}
void LLFloaterWindowSize::initWindowSizeControls()
diff --git a/indra/newview/llfloaterwindowsize.h b/indra/newview/llfloaterwindowsize.h
index a71e5e273c..a2eab5b822 100644
--- a/indra/newview/llfloaterwindowsize.h
+++ b/indra/newview/llfloaterwindowsize.h
@@ -40,7 +40,7 @@ private:
virtual ~LLFloaterWindowSize();
public:
- /*virtual*/ BOOL postBuild();
+ bool postBuild() override;
void initWindowSizeControls();
void onClickSet();
void onClickCancel();
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index 62e4022ddb..8fb6710161 100755
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -221,7 +221,7 @@ public:
//Get the ID
LLUUID id;
- if (!id.set( params[0], FALSE ))
+ if (!id.set( params[0], false ))
{
return false;
}
@@ -290,9 +290,9 @@ LLFloaterWorldMap::LLFloaterWorldMap(const LLSD& key)
mFriendObserver(NULL),
mCompletingRegionName(),
mCompletingRegionPos(),
- mWaitingForTracker(FALSE),
- mIsClosing(FALSE),
- mSetToUserPosition(TRUE),
+ mWaitingForTracker(false),
+ mIsClosing(false),
+ mSetToUserPosition(true),
mTrackedLocation(0,0,0),
mTrackedStatus(LLTracker::TRACKING_NOTHING),
mListFriendCombo(NULL),
@@ -324,7 +324,7 @@ void* LLFloaterWorldMap::createWorldMapView(void* data)
return new LLWorldMapView();
}
-BOOL LLFloaterWorldMap::postBuild()
+bool LLFloaterWorldMap::postBuild()
{
mMapView = dynamic_cast<LLWorldMapView*>(getChild<LLPanel>("objects_mapview"));
mMapView->setPan(0, 0, true);
@@ -357,7 +357,7 @@ BOOL LLFloaterWorldMap::postBuild()
onChangeMaturity();
- return TRUE;
+ return true;
}
// virtual
@@ -400,7 +400,7 @@ void LLFloaterWorldMap::onOpen(const LLSD& key)
bool center_on_target = (key.asString() == "center");
- mIsClosing = FALSE;
+ mIsClosing = false;
mMapView->clearLastClick();
@@ -426,7 +426,7 @@ void LLFloaterWorldMap::onOpen(const LLSD& key)
const LLUUID landmark_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK);
LLInventoryModelBackgroundFetch::instance().start(landmark_folder_id);
- getChild<LLUICtrl>("location")->setFocus( TRUE);
+ getChild<LLUICtrl>("location")->setFocus( true);
gFocusMgr.triggerFocusFlash();
buildAvatarIDList();
@@ -438,7 +438,7 @@ void LLFloaterWorldMap::onOpen(const LLSD& key)
if (center_on_target)
{
- centerOnTarget(FALSE);
+ centerOnTarget(false);
}
}
@@ -449,14 +449,14 @@ void LLFloaterWorldMap::reloadIcons(void*)
}
// virtual
-BOOL LLFloaterWorldMap::handleHover(S32 x, S32 y, MASK mask)
+bool LLFloaterWorldMap::handleHover(S32 x, S32 y, MASK mask)
{
- BOOL handled;
+ bool handled;
handled = LLFloater::handleHover(x, y, mask);
return handled;
}
-BOOL LLFloaterWorldMap::handleScrollWheel(S32 x, S32 y, S32 clicks)
+bool LLFloaterWorldMap::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
if (!isMinimized() && isFrontmost())
{
@@ -477,7 +477,7 @@ BOOL LLFloaterWorldMap::handleScrollWheel(S32 x, S32 y, S32 clicks)
// virtual
-void LLFloaterWorldMap::reshape( S32 width, S32 height, BOOL called_from_parent )
+void LLFloaterWorldMap::reshape( S32 width, S32 height, bool called_from_parent )
{
LLFloater::reshape( width, height, called_from_parent );
}
@@ -541,16 +541,16 @@ void LLFloaterWorldMap::draw()
// check for completion of tracking data
if (mWaitingForTracker)
{
- centerOnTarget(TRUE);
+ centerOnTarget(true);
}
- getChildView("Teleport")->setEnabled((BOOL)tracking_status);
- // getChildView("Clear")->setEnabled((BOOL)tracking_status);
- getChildView("Show Destination")->setEnabled((BOOL)tracking_status || LLWorldMap::getInstance()->isTracking());
+ getChildView("Teleport")->setEnabled((bool)tracking_status);
+ // getChildView("Clear")->setEnabled((bool)tracking_status);
+ getChildView("Show Destination")->setEnabled((bool)tracking_status || LLWorldMap::getInstance()->isTracking());
getChildView("copy_slurl")->setEnabled((mSLURL.isValid()) );
- setMouseOpaque(TRUE);
- getDragHandle()->setMouseOpaque(TRUE);
+ setMouseOpaque(true);
+ getDragHandle()->setMouseOpaque(true);
mMapView->zoom((F32)getChild<LLUICtrl>("zoom slider")->getValue().asReal());
@@ -611,13 +611,13 @@ void LLFloaterWorldMap::trackLandmark( const LLUUID& landmark_item_id )
if (!iface) return;
buildLandmarkIDLists();
- BOOL found = FALSE;
+ bool found = false;
S32 idx;
for (idx = 0; idx < mLandmarkItemIDList.size(); idx++)
{
if ( mLandmarkItemIDList.at(idx) == landmark_item_id)
{
- found = TRUE;
+ found = true;
break;
}
}
@@ -766,7 +766,7 @@ void LLFloaterWorldMap::updateLocation()
gotSimName = LLWorldMap::getInstance()->simNameFromPosGlobal( agentPos, agent_sim_name );
if ( gotSimName )
{
- mSetToUserPosition = FALSE;
+ mSetToUserPosition = false;
// Fill out the location field
getChild<LLUICtrl>("location")->setValue(agent_sim_name);
@@ -1005,7 +1005,7 @@ F32 LLFloaterWorldMap::getDistanceToDestination(const LLVector3d &destination,
}
-void LLFloaterWorldMap::clearLocationSelection(BOOL clear_ui, BOOL dest_reached)
+void LLFloaterWorldMap::clearLocationSelection(bool clear_ui, bool dest_reached)
{
LLCtrlListInterface *list = mListSearchResults;
if (list && (!dest_reached || (list->getItemCount() == 1)))
@@ -1017,7 +1017,7 @@ void LLFloaterWorldMap::clearLocationSelection(BOOL clear_ui, BOOL dest_reached)
}
-void LLFloaterWorldMap::clearLandmarkSelection(BOOL clear_ui)
+void LLFloaterWorldMap::clearLandmarkSelection(bool clear_ui)
{
if (clear_ui || !childHasKeyboardFocus("landmark combo"))
{
@@ -1030,7 +1030,7 @@ void LLFloaterWorldMap::clearLandmarkSelection(BOOL clear_ui)
}
-void LLFloaterWorldMap::clearAvatarSelection(BOOL clear_ui)
+void LLFloaterWorldMap::clearAvatarSelection(bool clear_ui)
{
if (clear_ui || !childHasKeyboardFocus("friend combo"))
{
@@ -1258,7 +1258,7 @@ void LLFloaterWorldMap::onLocationCommit()
return;
}
- clearLocationSelection(FALSE);
+ clearLocationSelection(false);
mCompletingRegionName = "";
mLastRegionName = "";
@@ -1314,12 +1314,12 @@ void LLFloaterWorldMap::onClearBtn()
LLTracker::stopTracking(true);
LLWorldMap::getInstance()->cancelTracking();
mSLURL = LLSLURL(); // Clear the SLURL since it's invalid
- mSetToUserPosition = TRUE; // Revert back to the current user position
+ mSetToUserPosition = true; // Revert back to the current user position
}
void LLFloaterWorldMap::onShowTargetBtn()
{
- centerOnTarget(TRUE);
+ centerOnTarget(true);
}
void LLFloaterWorldMap::onShowAgentBtn()
@@ -1361,7 +1361,7 @@ void LLFloaterWorldMap::onExpandCollapseBtn()
}
// protected
-void LLFloaterWorldMap::centerOnTarget(BOOL animate)
+void LLFloaterWorldMap::centerOnTarget(bool animate)
{
LLVector3d pos_global;
if(LLTracker::getTrackingStatus() != LLTracker::TRACKING_NOTHING)
@@ -1371,7 +1371,7 @@ void LLFloaterWorldMap::centerOnTarget(BOOL animate)
// absolute zero, and keep trying in the draw loop
if (tracked_position.isExactlyZero())
{
- mWaitingForTracker = TRUE;
+ mWaitingForTracker = true;
return;
}
else
@@ -1398,7 +1398,7 @@ void LLFloaterWorldMap::centerOnTarget(BOOL animate)
mMapView->setPanWithInterpTime(-llfloor((F32)(pos_global.mdV[VX] * map_scale / REGION_WIDTH_METERS)),
-llfloor((F32)(pos_global.mdV[VY] * map_scale / REGION_WIDTH_METERS)),
!animate, 0.1f);
- mWaitingForTracker = FALSE;
+ mWaitingForTracker = false;
}
// protected
@@ -1423,7 +1423,7 @@ void LLFloaterWorldMap::fly()
// protected
void LLFloaterWorldMap::teleport()
{
- BOOL teleport_home = FALSE;
+ bool teleport_home = false;
LLVector3d pos_global;
LLAvatarTracker& av_tracker = LLAvatarTracker::instance();
@@ -1438,7 +1438,7 @@ void LLFloaterWorldMap::teleport()
{
if( LLTracker::getTrackedLandmarkAssetID() == sHomeID )
{
- teleport_home = TRUE;
+ teleport_home = true;
}
else
{
@@ -1497,12 +1497,12 @@ void LLFloaterWorldMap::flyToLandmark()
void LLFloaterWorldMap::teleportToLandmark()
{
- BOOL has_destination = FALSE;
+ bool has_destination = false;
LLUUID destination_id; // Null means "home"
if( LLTracker::getTrackedLandmarkAssetID() == sHomeID )
{
- has_destination = TRUE;
+ has_destination = true;
}
else
{
@@ -1511,7 +1511,7 @@ void LLFloaterWorldMap::teleportToLandmark()
if(landmark && landmark->getGlobalPos(global_pos))
{
destination_id = LLTracker::getTrackedLandmarkAssetID();
- has_destination = TRUE;
+ has_destination = true;
}
else if(landmark)
{
@@ -1612,7 +1612,7 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim)
{
list->selectFirstItem();
}
- getChild<LLUICtrl>("search_results")->setFocus(TRUE);
+ getChild<LLUICtrl>("search_results")->setFocus(true);
onCommitSearchResult();
}
else
@@ -1627,7 +1627,7 @@ void LLFloaterWorldMap::onTeleportFinished()
{
if(isInVisibleChain())
{
- mMapView->setPan(0, 0, TRUE);
+ mMapView->setPan(0, 0, true);
}
}
@@ -1692,11 +1692,11 @@ void LLFloaterWorldMap::onChangeMaturity()
// disable mature / adult events.
if (!can_access_mature)
{
- gSavedSettings.setBOOL("ShowMatureEvents", FALSE);
+ gSavedSettings.setBOOL("ShowMatureEvents", false);
}
if (!can_access_adult)
{
- gSavedSettings.setBOOL("ShowAdultEvents", FALSE);
+ gSavedSettings.setBOOL("ShowAdultEvents", false);
}
}
@@ -1719,14 +1719,14 @@ LLPanelHideBeacon* LLPanelHideBeacon::getInstance()
}
-BOOL LLPanelHideBeacon::postBuild()
+bool LLPanelHideBeacon::postBuild()
{
mHideButton = getChild<LLButton>("hide_beacon_btn");
mHideButton->setCommitCallback(boost::bind(&LLPanelHideBeacon::onHideButtonClick, this));
gViewerWindow->setOnWorldViewRectUpdated(boost::bind(&LLPanelHideBeacon::updatePosition, this));
- return TRUE;
+ return true;
}
//virtual
@@ -1743,7 +1743,7 @@ void LLPanelHideBeacon::draw()
}
//virtual
-void LLPanelHideBeacon::setVisible(BOOL visible)
+void LLPanelHideBeacon::setVisible(bool visible)
{
if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) visible = false;
diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h
index 3702226d23..27235f4435 100644
--- a/indra/newview/llfloaterworldmap.h
+++ b/indra/newview/llfloaterworldmap.h
@@ -56,16 +56,16 @@ public:
static LLFloaterWorldMap* getInstance();
static void *createWorldMapView(void* data);
- BOOL postBuild();
+ bool postBuild();
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ void onClose(bool app_quitting);
static void reloadIcons(void*);
- /*virtual*/ void reshape( S32 width, S32 height, BOOL called_from_parent = TRUE );
- /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
+ /*virtual*/ void reshape( S32 width, S32 height, bool called_from_parent = true );
+ /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleScrollWheel(S32 x, S32 y, S32 clicks);
/*virtual*/ void draw();
/*virtual*/ void onFocusLost();
@@ -94,9 +94,9 @@ public:
// A z_attenuation of 0.0f collapses the distance into the X-Y plane
F32 getDistanceToDestination(const LLVector3d& pos_global, F32 z_attenuation = 0.5f) const;
- void clearLocationSelection(BOOL clear_ui = FALSE, BOOL dest_reached = FALSE);
- void clearAvatarSelection(BOOL clear_ui = FALSE);
- void clearLandmarkSelection(BOOL clear_ui = FALSE);
+ void clearLocationSelection(bool clear_ui = false, bool dest_reached = false);
+ void clearAvatarSelection(bool clear_ui = false);
+ void clearLandmarkSelection(bool clear_ui = false);
// Adjust the maximally zoomed out limit of the zoom slider so you can
// see the whole world, plus a little.
@@ -133,7 +133,7 @@ protected:
void onExpandCollapseBtn();
- void centerOnTarget(BOOL animate);
+ void centerOnTarget(bool animate);
void updateLocation();
// fly to the tracked item, if there is one
@@ -180,10 +180,10 @@ private:
LLVector3 mCompletingRegionPos;
std::string mLastRegionName;
- BOOL mWaitingForTracker;
+ bool mWaitingForTracker;
- BOOL mIsClosing;
- BOOL mSetToUserPosition;
+ bool mIsClosing;
+ bool mSetToUserPosition;
LLVector3d mTrackedLocation;
LLTracker::ETrackingStatus mTrackedStatus;
@@ -207,8 +207,8 @@ public:
static LLPanelHideBeacon* getInstance();
LLPanelHideBeacon();
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void setVisible(BOOL visible);
+ /*virtual*/ bool postBuild();
+ /*virtual*/ void setVisible(bool visible);
/*virtual*/ void draw();
private:
diff --git a/indra/newview/llfolderviewmodelinventory.h b/indra/newview/llfolderviewmodelinventory.h
index 1649b2eed7..1ee8d3bb3b 100644
--- a/indra/newview/llfolderviewmodelinventory.h
+++ b/indra/newview/llfolderviewmodelinventory.h
@@ -45,10 +45,10 @@ public:
virtual PermissionMask getPermissionMask() const = 0;
virtual LLFolderType::EType getPreferredType() const = 0;
virtual void showProperties(void) = 0;
- virtual BOOL isItemInTrash( void) const { return FALSE; } // TODO: make into pure virtual.
+ virtual bool isItemInTrash( void) const { return false; } // TODO: make into pure virtual.
virtual bool isItemInOutfits() const { return false; }
- virtual BOOL isAgentInventory() const { return FALSE; }
- virtual BOOL isUpToDate() const = 0;
+ virtual bool isAgentInventory() const { return false; }
+ virtual bool isUpToDate() const = 0;
virtual void addChild(LLFolderViewModelItem* child);
virtual bool hasChildren() const = 0;
virtual LLInventoryType::EType getInventoryType() const = 0;
@@ -62,7 +62,7 @@ public:
virtual bool filter( LLFolderViewFilter& filter);
virtual bool filterChildItem( LLFolderViewModelItem* item, LLFolderViewFilter& filter);
- virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const = 0;
+ virtual bool startDrag(EDragAndDropType* type, LLUUID* id) const = 0;
virtual LLToolDragAndDrop::ESource getDragSource() const = 0;
protected:
bool mPrevPassedAllFilters;
diff --git a/indra/newview/llfollowcam.cpp b/indra/newview/llfollowcam.cpp
index c2ea3b07c1..96cd8a05ff 100644
--- a/indra/newview/llfollowcam.cpp
+++ b/indra/newview/llfollowcam.cpp
@@ -443,9 +443,9 @@ void LLFollowCam::update()
//-------------------------------------------------------------------------------------
-BOOL LLFollowCam::updateBehindnessConstraint(LLVector3 focus, LLVector3& cam_position)
+bool LLFollowCam::updateBehindnessConstraint(LLVector3 focus, LLVector3& cam_position)
{
- BOOL constraint_active = FALSE;
+ bool constraint_active = false;
// only apply this stuff if the behindness angle is something other than opened up all the way
if ( mBehindnessMaxAngle < FOLLOW_CAM_MAX_BEHINDNESS_ANGLE - FOLLOW_CAM_BEHINDNESS_EPSILON )
{
@@ -486,7 +486,7 @@ BOOL LLFollowCam::updateBehindnessConstraint(LLVector3 focus, LLVector3& cam_pos
F32 fraction = ((cameraOffsetAngle - mBehindnessMaxAngle) / cameraOffsetAngle) * LLSmoothInterpolation::getInterpolant(mBehindnessLag);
cam_position = focus + horizontalSubjectBack * (slerp(fraction, camera_offset_rotation, LLQuaternion::DEFAULT));
cam_position.mV[VZ] = cameraZ; // clamp z value back to what it was before we started messing with it
- constraint_active = TRUE;
+ constraint_active = true;
}
}
return constraint_active;
@@ -839,7 +839,7 @@ void LLFollowCamMgr::setCameraActive( const LLUUID& source, bool active )
void LLFollowCamMgr::removeFollowCamParams(const LLUUID& source)
{
- setCameraActive(source, FALSE);
+ setCameraActive(source, false);
LLFollowCamParams* params = getParamsForID(source);
mParamMap.erase(source);
delete params;
diff --git a/indra/newview/llfollowcam.h b/indra/newview/llfollowcam.h
index 7995848160..fa1740741d 100644
--- a/indra/newview/llfollowcam.h
+++ b/indra/newview/llfollowcam.h
@@ -188,7 +188,7 @@ protected:
//------------------------------------------
protected:
void calculatePitchSineAndCosine();
- BOOL updateBehindnessConstraint(LLVector3 focus, LLVector3& cam_position);
+ bool updateBehindnessConstraint(LLVector3 focus, LLVector3& cam_position);
};// end of FollowCam class
diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp
index 142177010f..ca3f670518 100644
--- a/indra/newview/llfriendcard.cpp
+++ b/indra/newview/llfriendcard.cpp
@@ -303,7 +303,7 @@ bool LLFriendCardsManager::isCategoryInFriendFolder(const LLViewerInventoryCateg
{
if (NULL == cat)
return false;
- return TRUE == gInventory.isObjectDescendentOf(cat->getUUID(), findFriendFolderUUIDImpl());
+ return true == gInventory.isObjectDescendentOf(cat->getUUID(), findFriendFolderUUIDImpl());
}
bool LLFriendCardsManager::isAnyFriendCategory(const LLUUID& catID) const
@@ -312,7 +312,7 @@ bool LLFriendCardsManager::isAnyFriendCategory(const LLUUID& catID) const
if (catID == friendFolderID)
return true;
- return TRUE == gInventory.isObjectDescendentOf(catID, friendFolderID);
+ return true == gInventory.isObjectDescendentOf(catID, friendFolderID);
}
void LLFriendCardsManager::syncFriendCardsFolders()
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index c0f773968d..20b3c94232 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -62,7 +62,7 @@ const F32 MAX_WAIT_ANIM_SECS = 30.f;
// Lightweight constructor.
// init() does the heavy lifting.
LLGestureMgr::LLGestureMgr()
-: mValid(FALSE),
+: mValid(false),
mPlaying(),
mActive(),
mLoadingCount(0)
@@ -142,8 +142,8 @@ void LLGestureMgr::activateGesture(const LLUUID& item_id)
mLoadingCount = 1;
mDeactivateSimilarNames.clear();
- const BOOL inform_server = TRUE;
- const BOOL deactivate_similar = FALSE;
+ const bool inform_server = true;
+ const bool deactivate_similar = false;
activateGestureWithAsset(item_id, asset_id, inform_server, deactivate_similar);
}
@@ -182,8 +182,8 @@ void LLGestureMgr::activateGestures(LLViewerInventoryItem::item_array_t& items)
}
// Don't inform server, we'll do that in bulk
- const BOOL no_inform_server = FALSE;
- const BOOL deactivate_similar = TRUE;
+ const bool no_inform_server = false;
+ const bool deactivate_similar = true;
activateGestureWithAsset(item->getUUID(), item->getAssetUUID(),
no_inform_server,
deactivate_similar);
@@ -192,7 +192,7 @@ void LLGestureMgr::activateGestures(LLViewerInventoryItem::item_array_t& items)
// Inform the database of this change
LLMessageSystem* msg = gMessageSystem;
- BOOL start_message = TRUE;
+ bool start_message = true;
for (it = items.begin(); it != items.end(); ++it)
{
@@ -210,7 +210,7 @@ void LLGestureMgr::activateGestures(LLViewerInventoryItem::item_array_t& items)
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->addU32("Flags", 0x0);
- start_message = FALSE;
+ start_message = false;
}
msg->nextBlock("Data");
@@ -221,7 +221,7 @@ void LLGestureMgr::activateGestures(LLViewerInventoryItem::item_array_t& items)
if (msg->getCurrentSendTotal() > MTUBYTES)
{
gAgent.sendReliableMessage();
- start_message = TRUE;
+ start_message = true;
}
}
@@ -235,8 +235,8 @@ void LLGestureMgr::activateGestures(LLViewerInventoryItem::item_array_t& items)
struct LLLoadInfo
{
LLUUID mItemID;
- BOOL mInformServer;
- BOOL mDeactivateSimilar;
+ bool mInformServer;
+ bool mDeactivateSimilar;
};
// If inform_server is true, will send a message upstream to update
@@ -246,8 +246,8 @@ struct LLLoadInfo
*/
void LLGestureMgr::activateGestureWithAsset(const LLUUID& item_id,
const LLUUID& asset_id,
- BOOL inform_server,
- BOOL deactivate_similar)
+ bool inform_server,
+ bool deactivate_similar)
{
const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id);
@@ -281,7 +281,7 @@ void LLGestureMgr::activateGestureWithAsset(const LLUUID& item_id,
info->mInformServer = inform_server;
info->mDeactivateSimilar = deactivate_similar;
- const BOOL high_priority = TRUE;
+ const bool high_priority = true;
gAssetStorage->getAssetData(asset_id,
LLAssetType::AT_GESTURE,
onLoadComplete,
@@ -388,7 +388,7 @@ void LLGestureMgr::deactivateSimilarGestures(LLMultiGesture* in, const LLUUID& i
// Inform database of the change
LLMessageSystem* msg = gMessageSystem;
- BOOL start_message = TRUE;
+ bool start_message = true;
uuid_vec_t::const_iterator vit = gest_item_ids.begin();
while (vit != gest_item_ids.end())
{
@@ -399,7 +399,7 @@ void LLGestureMgr::deactivateSimilarGestures(LLMultiGesture* in, const LLUUID& i
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->addU32("Flags", 0x0);
- start_message = FALSE;
+ start_message = false;
}
msg->nextBlock("Data");
@@ -409,7 +409,7 @@ void LLGestureMgr::deactivateSimilarGestures(LLMultiGesture* in, const LLUUID& i
if (msg->getCurrentSendTotal() > MTUBYTES)
{
gAgent.sendReliableMessage();
- start_message = TRUE;
+ start_message = true;
}
++vit;
@@ -434,7 +434,7 @@ void LLGestureMgr::deactivateSimilarGestures(LLMultiGesture* in, const LLUUID& i
}
-BOOL LLGestureMgr::isGestureActive(const LLUUID& item_id)
+bool LLGestureMgr::isGestureActive(const LLUUID& item_id)
{
const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id);
item_map_t::iterator it = mActive.find(base_item_id);
@@ -442,24 +442,24 @@ BOOL LLGestureMgr::isGestureActive(const LLUUID& item_id)
}
-BOOL LLGestureMgr::isGesturePlaying(const LLUUID& item_id)
+bool LLGestureMgr::isGesturePlaying(const LLUUID& item_id)
{
const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id);
item_map_t::iterator it = mActive.find(base_item_id);
- if (it == mActive.end()) return FALSE;
+ if (it == mActive.end()) return false;
LLMultiGesture* gesture = (*it).second;
- if (!gesture) return FALSE;
+ if (!gesture) return false;
return gesture->mPlaying;
}
-BOOL LLGestureMgr::isGesturePlaying(LLMultiGesture* gesture)
+bool LLGestureMgr::isGesturePlaying(LLMultiGesture* gesture)
{
if(!gesture)
{
- return FALSE;
+ return false;
}
return gesture->mPlaying;
@@ -498,10 +498,10 @@ void LLGestureMgr::replaceGesture(const LLUUID& item_id, LLMultiGesture* new_ges
LLLoadInfo* info = new LLLoadInfo;
info->mItemID = base_item_id;
- info->mInformServer = TRUE;
- info->mDeactivateSimilar = FALSE;
+ info->mInformServer = true;
+ info->mDeactivateSimilar = false;
- const BOOL high_priority = TRUE;
+ const bool high_priority = true;
gAssetStorage->getAssetData(asset_id,
LLAssetType::AT_GESTURE,
onLoadComplete,
@@ -536,7 +536,7 @@ void LLGestureMgr::playGesture(LLMultiGesture* gesture)
gesture->mCurrentStep = 0;
// Add to list of playing
- gesture->mPlaying = TRUE;
+ gesture->mPlaying = true;
mPlaying.push_back(gesture);
// Load all needed assets to minimize the delays
@@ -565,7 +565,7 @@ void LLGestureMgr::playGesture(LLMultiGesture* gesture)
LLAssetType::AT_ANIMATION,
onAssetLoadComplete,
(void *)id,
- TRUE);
+ true);
}
break;
}
@@ -582,7 +582,7 @@ void LLGestureMgr::playGesture(LLMultiGesture* gesture)
LLAssetType::AT_SOUND,
onAssetLoadComplete,
NULL,
- TRUE);
+ true);
}
break;
}
@@ -624,12 +624,12 @@ void LLGestureMgr::playGesture(const LLUUID& item_id)
// Iterates through space delimited tokens in string, triggering any gestures found.
// Generates a revised string that has the found tokens replaced by their replacement strings
// and (as a minor side effect) has multiple spaces in a row replaced by single spaces.
-BOOL LLGestureMgr::triggerAndReviseString(const std::string &utf8str, std::string* revised_string)
+bool LLGestureMgr::triggerAndReviseString(const std::string &utf8str, std::string* revised_string)
{
std::string tokenized = utf8str;
- BOOL found_gestures = FALSE;
- BOOL first_token = TRUE;
+ bool found_gestures = false;
+ bool first_token = true;
typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
boost::char_separator<char> sep(" ");
@@ -693,7 +693,7 @@ BOOL LLGestureMgr::triggerAndReviseString(const std::string &utf8str, std::strin
revised_string->append( gesture->mReplaceText );
}
}
- found_gestures = TRUE;
+ found_gestures = true;
}
}
}
@@ -710,14 +710,14 @@ BOOL LLGestureMgr::triggerAndReviseString(const std::string &utf8str, std::strin
revised_string->append( cur_token );
}
- first_token = FALSE;
+ first_token = false;
gesture = NULL;
}
return found_gestures;
}
-BOOL LLGestureMgr::triggerGesture(KEY key, MASK mask)
+bool LLGestureMgr::triggerGesture(KEY key, MASK mask)
{
std::vector <LLMultiGesture *> matching;
item_map_t::iterator it;
@@ -745,9 +745,9 @@ BOOL LLGestureMgr::triggerGesture(KEY key, MASK mask)
LLMultiGesture* gesture = matching[random];
playGesture(gesture);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -860,7 +860,7 @@ void LLGestureMgr::stepGesture(LLMultiGesture* gesture)
}
// Run the current steps
- BOOL waiting = FALSE;
+ bool waiting = false;
while (!waiting && gesture->mPlaying)
{
// Get the current step, if there is one.
@@ -874,7 +874,7 @@ void LLGestureMgr::stepGesture(LLMultiGesture* gesture)
else
{
// step stays null, we're off the end
- gesture->mWaitingAtEnd = TRUE;
+ gesture->mWaitingAtEnd = true;
}
@@ -889,12 +889,12 @@ void LLGestureMgr::stepGesture(LLMultiGesture* gesture)
&& gesture->mPlayingAnimIDs.empty()))
{
// all animations are done playing
- gesture->mWaitingAtEnd = FALSE;
- gesture->mPlaying = FALSE;
+ gesture->mWaitingAtEnd = false;
+ gesture->mPlaying = false;
}
else
{
- waiting = TRUE;
+ waiting = true;
}
continue;
}
@@ -909,7 +909,7 @@ void LLGestureMgr::stepGesture(LLMultiGesture* gesture)
&& gesture->mPlayingAnimIDs.empty()))
{
// all animations are done playing
- gesture->mWaitingAnimations = FALSE;
+ gesture->mWaitingAnimations = false;
gesture->mCurrentStep++;
}
else if (gesture->mWaitTimer.getElapsedTimeF32() > MAX_WAIT_ANIM_SECS)
@@ -917,12 +917,12 @@ void LLGestureMgr::stepGesture(LLMultiGesture* gesture)
// we've waited too long for an animation
LL_INFOS("GestureMgr") << "Waited too long for animations to stop, continuing gesture."
<< LL_ENDL;
- gesture->mWaitingAnimations = FALSE;
+ gesture->mWaitingAnimations = false;
gesture->mCurrentStep++;
}
else
{
- waiting = TRUE;
+ waiting = true;
}
continue;
}
@@ -938,13 +938,13 @@ void LLGestureMgr::stepGesture(LLMultiGesture* gesture)
if (elapsed > wait_step->mWaitSeconds)
{
// wait is done, continue execution
- gesture->mWaitingTimer = FALSE;
+ gesture->mWaitingTimer = false;
gesture->mCurrentStep++;
}
else
{
// we're waiting, so execution is done for now
- waiting = TRUE;
+ waiting = true;
}
continue;
}
@@ -1004,7 +1004,7 @@ void LLGestureMgr::runStep(LLMultiGesture* gesture, LLGestureStep* step)
// Don't animate the nodding, as this might not blend with
// other playing animations.
- const BOOL animate = FALSE;
+ const bool animate = false;
(LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"))->
sendChatFromViewer(chat_text, CHAT_TYPE_NORMAL, animate);
@@ -1017,12 +1017,12 @@ void LLGestureMgr::runStep(LLMultiGesture* gesture, LLGestureStep* step)
LLGestureStepWait* wait_step = (LLGestureStepWait*)step;
if (wait_step->mFlags & WAIT_FLAG_TIME)
{
- gesture->mWaitingTimer = TRUE;
+ gesture->mWaitingTimer = true;
gesture->mWaitTimer.reset();
}
else if (wait_step->mFlags & WAIT_FLAG_ALL_ANIM)
{
- gesture->mWaitingAnimations = TRUE;
+ gesture->mWaitingAnimations = true;
// Use the wait timer as a deadlock breaker for animation
// waits.
gesture->mWaitTimer.reset();
@@ -1050,8 +1050,8 @@ void LLGestureMgr::onLoadComplete(const LLUUID& asset_uuid,
LLLoadInfo* info = (LLLoadInfo*)user_data;
LLUUID item_id = info->mItemID;
- BOOL inform_server = info->mInformServer;
- BOOL deactivate_similar = info->mDeactivateSimilar;
+ bool inform_server = info->mInformServer;
+ bool deactivate_similar = info->mDeactivateSimilar;
delete info;
info = NULL;
@@ -1072,7 +1072,7 @@ void LLGestureMgr::onLoadComplete(const LLUUID& asset_uuid,
LLMultiGesture* gesture = new LLMultiGesture();
LLDataPackerAsciiBuffer dp(&buffer[0], size+1);
- BOOL ok = gesture->deserialize(dp);
+ bool ok = gesture->deserialize(dp);
if (ok)
{
@@ -1395,7 +1395,7 @@ void LLGestureMgr::notifyObservers()
}
}
-BOOL LLGestureMgr::matchPrefix(const std::string& in_str, std::string* out_str)
+bool LLGestureMgr::matchPrefix(const std::string& in_str, std::string* out_str)
{
S32 in_len = in_str.length();
@@ -1410,7 +1410,7 @@ BOOL LLGestureMgr::matchPrefix(const std::string& in_str, std::string* out_str)
if (!LLStringUtil::compareInsensitive(in_str, trigger))
{
*out_str = trigger;
- return TRUE;
+ return true;
}
}
}
@@ -1461,7 +1461,7 @@ BOOL LLGestureMgr::matchPrefix(const std::string& in_str, std::string* out_str)
}
if (rest_of_match.compare("") == 0)
{
- return TRUE;
+ return true;
}
if (buf.compare("") != 0)
{
@@ -1475,10 +1475,10 @@ BOOL LLGestureMgr::matchPrefix(const std::string& in_str, std::string* out_str)
if (rest_of_match.compare("") != 0)
{
*out_str = in_str+rest_of_match;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
diff --git a/indra/newview/llgesturemgr.h b/indra/newview/llgesturemgr.h
index 7bb60f00e2..7a7bc2938f 100644
--- a/indra/newview/llgesturemgr.h
+++ b/indra/newview/llgesturemgr.h
@@ -80,11 +80,11 @@ public:
// Load gesture into in-memory active form.
// Can be called even if the inventory item isn't loaded yet.
- // inform_server TRUE will send message upstream to update database
+ // inform_server true will send message upstream to update database
// user_gesture_active table, which isn't necessary on login.
// deactivate_similar will cause other gestures with the same trigger phrase
// or keybinding to be deactivated.
- void activateGestureWithAsset(const LLUUID& item_id, const LLUUID& asset_id, BOOL inform_server, BOOL deactivate_similar);
+ void activateGestureWithAsset(const LLUUID& item_id, const LLUUID& asset_id, bool inform_server, bool deactivate_similar);
// Takes gesture out of active list and deletes it.
void deactivateGesture(const LLUUID& item_id);
@@ -93,11 +93,11 @@ public:
// or this hot key.
void deactivateSimilarGestures(LLMultiGesture* gesture, const LLUUID& in_item_id);
- BOOL isGestureActive(const LLUUID& item_id);
+ bool isGestureActive(const LLUUID& item_id);
- BOOL isGesturePlaying(const LLUUID& item_id);
+ bool isGesturePlaying(const LLUUID& item_id);
- BOOL isGesturePlaying(LLMultiGesture* gesture);
+ bool isGesturePlaying(LLMultiGesture* gesture);
const item_map_t& getActiveGestures() const { return mActive; }
// Force a gesture to be played, for example, if it is being
@@ -119,14 +119,14 @@ public:
mCallbackMap[inv_item_id] = cb;
}
// Trigger the first gesture that matches this key.
- // Returns TRUE if it finds a gesture bound to that key.
- BOOL triggerGesture(KEY key, MASK mask);
+ // Returns true if it finds a gesture bound to that key.
+ bool triggerGesture(KEY key, MASK mask);
// Trigger all gestures referenced as substrings in this string
- BOOL triggerAndReviseString(const std::string &str, std::string *revised_string = NULL);
+ bool triggerAndReviseString(const std::string &str, std::string *revised_string = NULL);
// Does some gesture have this key bound?
- BOOL isKeyBound(KEY key, MASK mask);
+ bool isKeyBound(KEY key, MASK mask);
S32 getPlayingCount() const;
@@ -137,7 +137,7 @@ public:
// Overriding so we can update active gesture names and notify observers
void changed(U32 mask) override;
- BOOL matchPrefix(const std::string& in_str, std::string* out_str);
+ bool matchPrefix(const std::string& in_str, std::string* out_str);
// Copy item ids into the vector
void getItemIDs(uuid_vec_t* ids);
@@ -180,7 +180,7 @@ private:
std::vector<LLGestureManagerObserver*> mObservers;
callback_map_t mCallbackMap;
std::vector<LLMultiGesture*> mPlaying;
- BOOL mValid;
+ bool mValid;
std::set<LLUUID> mLoadingAssets;
diff --git a/indra/newview/llgiveinventory.cpp b/indra/newview/llgiveinventory.cpp
index 127055459d..a13cfa4960 100644
--- a/indra/newview/llgiveinventory.cpp
+++ b/indra/newview/llgiveinventory.cpp
@@ -79,7 +79,7 @@ bool LLGiveable::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
!item->getPermissions().allowOperationBy(PERM_TRANSFER,
gAgent.getID()))
{
- allowed = FALSE;
+ allowed = false;
}
if (allowed &&
!item->getPermissions().allowCopyBy(gAgent.getID()))
@@ -392,7 +392,7 @@ void LLGiveInventory::commitGiveInventoryItem(const LLUUID& to_agent,
pack_instant_message(
gMessageSystem,
gAgentID,
- FALSE,
+ false,
gAgentSessionID,
to_agent,
name,
@@ -409,7 +409,7 @@ void LLGiveInventory::commitGiveInventoryItem(const LLUUID& to_agent,
gAgent.sendReliableMessage();
// VEFFECT: giveInventory
- LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
+ LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, true);
effectp->setSourceObject(gAgentAvatarp);
effectp->setTargetObject(gObjectList.findObject(to_agent));
effectp->setDuration(LL_HUD_DUR_SHORT);
@@ -549,7 +549,7 @@ bool LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent,
pack_instant_message(
gMessageSystem,
gAgent.getID(),
- FALSE,
+ false,
gAgent.getSessionID(),
to_agent,
name,
@@ -567,7 +567,7 @@ bool LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent,
delete[] bucket;
// VEFFECT: giveInventoryCategory
- LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
+ LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, true);
effectp->setSourceObject(gAgentAvatarp);
effectp->setTargetObject(gObjectList.findObject(to_agent));
effectp->setDuration(LL_HUD_DUR_SHORT);
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index 1b22b903fc..d58fb4e39b 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -77,7 +77,7 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
F32 select_dist_squared = gSavedSettings.getF32("MaxSelectDistance");
select_dist_squared = select_dist_squared * select_dist_squared;
- BOOL deselect = (mask == MASK_CONTROL);
+ bool deselect = (mask == MASK_CONTROL);
S32 left = llmin(x, mDragStartX);
S32 right = llmax(x, mDragStartX);
S32 top = llmax(y, mDragStartY);
@@ -94,16 +94,16 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
S32 width = right - left + 1;
S32 height = top - bottom + 1;
- BOOL grow_selection = FALSE;
- BOOL shrink_selection = FALSE;
+ bool grow_selection = false;
+ bool shrink_selection = false;
if (height > mDragLastHeight || width > mDragLastWidth)
{
- grow_selection = TRUE;
+ grow_selection = true;
}
if (height < mDragLastHeight || width < mDragLastWidth)
{
- shrink_selection = TRUE;
+ shrink_selection = true;
}
if (!grow_selection && !shrink_selection)
@@ -122,7 +122,7 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
gGL.matrixMode(LLRender::MM_PROJECTION);
gGL.pushMatrix();
- BOOL limit_select_distance = gSavedSettings.getBOOL("LimitSelectDistance");
+ bool limit_select_distance = gSavedSettings.getBOOL("LimitSelectDistance");
if (limit_select_distance)
{
// ...select distance from control
@@ -187,7 +187,7 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
LLSpatialPartition* part = region->getSpatialPartition(i);
if (part)
{
- part->cull(*LLViewerCamera::getInstance(), &potentials, TRUE);
+ part->cull(*LLViewerCamera::getInstance(), &potentials, true);
}
}
}
@@ -605,7 +605,7 @@ void LLViewerParcelMgr::renderHighlightSegments(const U8* segments, LLViewerRegi
}
-void LLViewerParcelMgr::renderCollisionSegments(U8* segments, BOOL use_pass, LLViewerRegion* regionp)
+void LLViewerParcelMgr::renderCollisionSegments(U8* segments, bool use_pass, LLViewerRegion* regionp)
{
S32 x, y;
@@ -744,7 +744,7 @@ void LLViewerParcelMgr::renderCollisionSegments(U8* segments, BOOL use_pass, LLV
void LLViewerParcelMgr::resetCollisionTimer()
{
mCollisionTimer.reset();
- mRenderCollision = TRUE;
+ mRenderCollision = true;
}
void draw_line_cube(F32 width, const LLVector3& center)
@@ -869,7 +869,7 @@ void LLViewerObjectList::renderObjectBeacons()
}
LLHUDText *hud_textp = (LLHUDText *)LLHUDObject::addHUDObject(LLHUDObject::LL_HUD_TEXT);
- hud_textp->setZCompare(FALSE);
+ hud_textp->setZCompare(false);
LLColor4 color;
color = debug_beacon.mTextColor;
color.mV[3] *= 1.f;
diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp
index 92c58a2dbc..133e8e8599 100644
--- a/indra/newview/llgltfmateriallist.cpp
+++ b/indra/newview/llgltfmateriallist.cpp
@@ -47,9 +47,6 @@
#include "tinygltf/tiny_gltf.h"
#include <strstream>
-#include "json/reader.h"
-#include "json/value.h"
-
#include <unordered_set>
LLGLTFMaterialList gGLTFMaterialList;
@@ -58,8 +55,6 @@ LLGLTFMaterialList::modify_queue_t LLGLTFMaterialList::sModifyQueue;
LLGLTFMaterialList::apply_queue_t LLGLTFMaterialList::sApplyQueue;
LLSD LLGLTFMaterialList::sUpdates;
-const LLUUID LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID("968cbad0-4dad-d64e-71b5-72bf13ad051a");
-
#ifdef SHOW_ASSERT
// return true if given data is (probably) valid update message for ModifyMaterialParams capability
static bool is_valid_update(const LLSD& data)
@@ -247,6 +242,7 @@ void LLGLTFMaterialList::applyOverrideMessage(LLMessageSystem* msg, const std::s
}
region->cacheFullUpdateGLTFOverride(cache);
+ LL_DEBUGS("GLTF") << "GLTF Material Override: " << cache.mObjectId << " " << cache.mLocalId << " " << cache.mRegionHandle << " (sides:" << (cache.mSides.size()) << ")" << LL_ENDL;
}
}
@@ -471,7 +467,7 @@ void LLGLTFMaterialList::onAssetLoadComplete(const LLUUID& id, LLAssetType::ETyp
if (status != LL_ERR_NOERR)
{
LL_WARNS("GLTF") << "Error getting material asset data: " << LLAssetStorage::getErrorString(status) << " (" << status << ")" << LL_ENDL;
- asset_data->mMaterial->materialComplete();
+ asset_data->mMaterial->materialComplete(false);
delete asset_data;
}
else
@@ -556,7 +552,7 @@ void LLGLTFMaterialList::onAssetLoadComplete(const LLUUID& id, LLAssetType::ETyp
LL_DEBUGS("GLTF") << "Failed to get material " << id << LL_ENDL;
}
- asset_data->mMaterial->materialComplete();
+ asset_data->mMaterial->materialComplete(true);
delete asset_data;
});
diff --git a/indra/newview/llgltfmateriallist.h b/indra/newview/llgltfmateriallist.h
index f1c4ce20f9..6eab86ff0a 100644
--- a/indra/newview/llgltfmateriallist.h
+++ b/indra/newview/llgltfmateriallist.h
@@ -40,8 +40,6 @@ class LLGLTFOverrideCacheEntry;
class LLGLTFMaterialList
{
public:
- static const LLUUID BLANK_MATERIAL_ASSET_ID;
-
LLGLTFMaterialList() {}
diff --git a/indra/newview/llgltfmaterialpreviewmgr.cpp b/indra/newview/llgltfmaterialpreviewmgr.cpp
new file mode 100644
index 0000000000..84dd081a0a
--- /dev/null
+++ b/indra/newview/llgltfmaterialpreviewmgr.cpp
@@ -0,0 +1,590 @@
+/**
+ * @file llgltfmaterialpreviewmgr.cpp
+ *
+ * $LicenseInfo:firstyear=2023&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2023, 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 "llgltfmaterialpreviewmgr.h"
+
+#include <memory>
+#include <vector>
+
+#include "llavatarappearancedefines.h"
+#include "llenvironment.h"
+#include "llselectmgr.h"
+#include "llviewercamera.h"
+#include "llviewercontrol.h"
+#include "llviewerobject.h"
+#include "llviewershadermgr.h"
+#include "llviewertexturelist.h"
+#include "llviewerwindow.h"
+#include "llvolumemgr.h"
+#include "pipeline.h"
+
+LLGLTFMaterialPreviewMgr gGLTFMaterialPreviewMgr;
+
+namespace
+{
+ constexpr S32 FULLY_LOADED = 0;
+ constexpr S32 NOT_LOADED = 99;
+};
+
+LLGLTFPreviewTexture::MaterialLoadLevels::MaterialLoadLevels()
+{
+ for (U32 i = 0; i < LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT; ++i)
+ {
+ levels[i] = NOT_LOADED;
+ }
+}
+
+bool LLGLTFPreviewTexture::MaterialLoadLevels::isFullyLoaded()
+{
+ for (U32 i = 0; i < LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT; ++i)
+ {
+ if (levels[i] != FULLY_LOADED) { return false; }
+ }
+ return true;
+}
+
+S32& LLGLTFPreviewTexture::MaterialLoadLevels::operator[](size_t i)
+{
+ llassert(i >= 0 && i < LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT);
+ return levels[i];
+}
+
+const S32& LLGLTFPreviewTexture::MaterialLoadLevels::operator[](size_t i) const
+{
+ llassert(i >= 0 && i < LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT);
+ return levels[i];
+}
+
+bool LLGLTFPreviewTexture::MaterialLoadLevels::operator<(const MaterialLoadLevels& other) const
+{
+ bool less = false;
+ for (U32 i = 0; i < LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT; ++i)
+ {
+ if (((*this)[i] > other[i])) { return false; }
+ less = less || ((*this)[i] < other[i]);
+ }
+ return less;
+}
+
+bool LLGLTFPreviewTexture::MaterialLoadLevels::operator>(const MaterialLoadLevels& other) const
+{
+ bool great = false;
+ for (U32 i = 0; i < LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT; ++i)
+ {
+ if (((*this)[i] < other[i])) { return false; }
+ great = great || ((*this)[i] > other[i]);
+ }
+ return great;
+}
+
+namespace
+{
+ void fetch_texture_for_ui(LLPointer<LLViewerFetchedTexture>& img, const LLUUID& id)
+ {
+ if (!img && id.notNull())
+ {
+ if (LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::isBakedImageId(id))
+ {
+ LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getFirstObject();
+ if (obj)
+ {
+ LLViewerTexture* viewerTexture = obj->getBakedTextureForMagicId(id);
+ img = viewerTexture ? dynamic_cast<LLViewerFetchedTexture*>(viewerTexture) : NULL;
+ }
+ }
+ else
+ {
+ img = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+ }
+ }
+ if (img)
+ {
+ img->setBoostLevel(LLGLTexture::BOOST_PREVIEW);
+ img->forceToSaveRawImage(0);
+ }
+ };
+
+ // *NOTE: Does not use the same conventions as texture discard level. Lower is better.
+ S32 get_texture_load_level(const LLPointer<LLViewerFetchedTexture>& texture)
+ {
+ if (!texture) { return FULLY_LOADED; }
+ const S32 raw_level = texture->getDiscardLevel();
+ if (raw_level < 0) { return NOT_LOADED; }
+ return raw_level;
+ }
+
+ LLGLTFPreviewTexture::MaterialLoadLevels get_material_load_levels(LLFetchedGLTFMaterial& material)
+ {
+ llassert(!material.isFetching());
+
+ using MaterialTextures = LLPointer<LLViewerFetchedTexture>*[LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT];
+
+ MaterialTextures textures;
+
+ textures[LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR] = &material.mBaseColorTexture;
+ textures[LLGLTFMaterial::GLTF_TEXTURE_INFO_NORMAL] = &material.mNormalTexture;
+ textures[LLGLTFMaterial::GLTF_TEXTURE_INFO_METALLIC_ROUGHNESS] = &material.mMetallicRoughnessTexture;
+ textures[LLGLTFMaterial::GLTF_TEXTURE_INFO_EMISSIVE] = &material.mEmissiveTexture;
+
+ LLGLTFPreviewTexture::MaterialLoadLevels levels;
+
+ for (U32 i = 0; i < LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT; ++i)
+ {
+ fetch_texture_for_ui(*textures[i], material.mTextureId[i]);
+ levels[i] = get_texture_load_level(*textures[i]);
+ }
+
+ return levels;
+ }
+
+ // Is the material loaded enough to start rendering a preview?
+ bool is_material_loaded_enough_for_ui(LLFetchedGLTFMaterial& material)
+ {
+ if (material.isFetching())
+ {
+ return false;
+ }
+
+ LLGLTFPreviewTexture::MaterialLoadLevels levels = get_material_load_levels(material);
+
+ for (U32 i = 0; i < LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT; ++i)
+ {
+ if (levels[i] == NOT_LOADED)
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+}; // namespace
+
+LLGLTFPreviewTexture::LLGLTFPreviewTexture(LLPointer<LLFetchedGLTFMaterial> material, S32 width)
+ : LLViewerDynamicTexture(width, width, 4, EOrder::ORDER_MIDDLE, FALSE)
+ , mGLTFMaterial(material)
+{
+}
+
+// static
+LLPointer<LLGLTFPreviewTexture> LLGLTFPreviewTexture::create(LLPointer<LLFetchedGLTFMaterial> material)
+{
+ return new LLGLTFPreviewTexture(material, LLPipeline::MAX_BAKE_WIDTH);
+}
+
+bool LLGLTFPreviewTexture::needsRender()
+{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
+
+ if (!mShouldRender && mBestLoad.isFullyLoaded()) { return false; }
+ MaterialLoadLevels current_load = get_material_load_levels(*mGLTFMaterial.get());
+ if (current_load < mBestLoad)
+ {
+ mShouldRender = true;
+ mBestLoad = current_load;
+ return true;
+ }
+ return false;
+}
+
+void LLGLTFPreviewTexture::preRender(bool clear_depth)
+{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
+
+ llassert(mShouldRender);
+ if (!mShouldRender) { return; }
+
+ LLViewerDynamicTexture::preRender(clear_depth);
+}
+
+
+namespace {
+
+struct GLTFPreviewModel
+{
+ GLTFPreviewModel(LLPointer<LLDrawInfo>& info, const LLMatrix4& mat)
+ : mDrawInfo(info)
+ , mModelMatrix(mat)
+ {
+ mDrawInfo->mModelMatrix = &mModelMatrix;
+ }
+ GLTFPreviewModel(GLTFPreviewModel&) = delete;
+ ~GLTFPreviewModel()
+ {
+ // No model matrix necromancy
+ llassert(gGLLastMatrix != &mModelMatrix);
+ gGLLastMatrix = nullptr;
+ }
+ LLPointer<LLDrawInfo> mDrawInfo;
+ LLMatrix4 mModelMatrix; // Referenced by mDrawInfo
+};
+
+using PreviewSpherePart = std::unique_ptr<GLTFPreviewModel>;
+using PreviewSphere = std::vector<PreviewSpherePart>;
+
+// Like LLVolumeGeometryManager::registerFace but without batching or too-many-indices/vertices checking.
+PreviewSphere create_preview_sphere(LLPointer<LLFetchedGLTFMaterial>& material, const LLMatrix4& model_matrix)
+{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
+
+ const LLColor4U vertex_color(material->mBaseColor);
+
+ LLPrimitive prim;
+ prim.init_primitive(LL_PCODE_VOLUME);
+ LLVolumeParams params;
+ params.setType(LL_PCODE_PROFILE_CIRCLE_HALF, LL_PCODE_PATH_CIRCLE);
+ params.setBeginAndEndS(0.f, 1.f);
+ params.setBeginAndEndT(0.f, 1.f);
+ params.setRatio(1, 1);
+ params.setShear(0, 0);
+ constexpr auto MAX_LOD = LLVolumeLODGroup::NUM_LODS - 1;
+ prim.setVolume(params, MAX_LOD);
+
+ LLVolume* volume = prim.getVolume();
+ llassert(volume);
+ for (LLVolumeFace& face : volume->getVolumeFaces())
+ {
+ face.createTangents();
+ }
+
+ PreviewSphere preview_sphere;
+ preview_sphere.reserve(volume->getNumFaces());
+
+ LLPointer<LLVertexBuffer> buf = new LLVertexBuffer(
+ LLVertexBuffer::MAP_VERTEX |
+ LLVertexBuffer::MAP_NORMAL |
+ LLVertexBuffer::MAP_TEXCOORD0 |
+ LLVertexBuffer::MAP_COLOR |
+ LLVertexBuffer::MAP_TANGENT
+ );
+ U32 nv = 0;
+ U32 ni = 0;
+ for (LLVolumeFace& face : volume->getVolumeFaces())
+ {
+ nv += face.mNumVertices;
+ ni += face.mNumIndices;
+ }
+ buf->allocateBuffer(nv, ni);
+
+ // UV hacks
+ // Higher factor helps to see more details on the preview sphere
+ const LLVector2 uv_factor(2.0f, 2.0f);
+ // Offset places center of material in center of view
+ const LLVector2 uv_offset(-0.5f, -0.5f);
+
+ LLStrider<U16> indices;
+ LLStrider<LLVector4a> positions;
+ LLStrider<LLVector4a> normals;
+ LLStrider<LLVector2> texcoords;
+ LLStrider<LLColor4U> colors;
+ LLStrider<LLVector4a> tangents;
+ buf->getIndexStrider(indices);
+ buf->getVertexStrider(positions);
+ buf->getNormalStrider(normals);
+ buf->getTexCoord0Strider(texcoords);
+ buf->getColorStrider(colors);
+ buf->getTangentStrider(tangents);
+ U32 index_offset = 0;
+ U32 vertex_offset = 0;
+ for (const LLVolumeFace& face : volume->getVolumeFaces())
+ {
+ for (S32 i = 0; i < face.mNumIndices; ++i)
+ {
+ *indices++ = face.mIndices[i] + vertex_offset;
+ }
+ for (S32 v = 0; v < face.mNumVertices; ++v)
+ {
+ *positions++ = face.mPositions[v];
+ *normals++ = face.mNormals[v];
+ LLVector2 uv(face.mTexCoords[v]);
+ uv.scaleVec(uv_factor);
+ uv += uv_offset;
+ *texcoords++ = uv;
+ *colors++ = vertex_color;
+ *tangents++ = face.mTangents[v];
+ }
+
+ constexpr LLViewerTexture* no_media = nullptr;
+ LLPointer<LLDrawInfo> info = new LLDrawInfo(U16(vertex_offset), U16(vertex_offset + face.mNumVertices - 1), face.mNumIndices, index_offset, no_media, buf.get());
+ info->mGLTFMaterial = material;
+ preview_sphere.emplace_back(std::make_unique<GLTFPreviewModel>(info, model_matrix));
+ index_offset += face.mNumIndices;
+ vertex_offset += face.mNumVertices;
+ }
+
+ buf->unmapBuffer();
+
+ return preview_sphere;
+}
+
+void set_preview_sphere_material(PreviewSphere& preview_sphere, LLPointer<LLFetchedGLTFMaterial>& material)
+{
+ llassert(!preview_sphere.empty());
+ if (preview_sphere.empty()) { return; }
+
+ const LLColor4U vertex_color(material->mBaseColor);
+
+ // See comments about unmapBuffer in llvertexbuffer.h
+ for (PreviewSpherePart& part : preview_sphere)
+ {
+ LLDrawInfo* info = part->mDrawInfo.get();
+ info->mGLTFMaterial = material;
+ LLVertexBuffer* buf = info->mVertexBuffer.get();
+ LLStrider<LLColor4U> colors;
+ const S32 count = info->mEnd - info->mStart + 1;
+ buf->getColorStrider(colors, info->mStart, count);
+ for (S32 i = 0; i < count; ++i)
+ {
+ *colors++ = vertex_color;
+ }
+ buf->unmapBuffer();
+ }
+}
+
+PreviewSphere& get_preview_sphere(LLPointer<LLFetchedGLTFMaterial>& material, const LLMatrix4& model_matrix)
+{
+ static PreviewSphere preview_sphere;
+ if (preview_sphere.empty())
+ {
+ preview_sphere = create_preview_sphere(material, model_matrix);
+ }
+ else
+ {
+ set_preview_sphere_material(preview_sphere, material);
+ }
+ return preview_sphere;
+}
+
+// Final, direct modifications to shader constants, just before render
+void fixup_shader_constants(LLGLSLShader& shader)
+{
+ // Sunlight intensity of 0 no matter what
+ shader.uniform1i(LLShaderMgr::SUN_UP_FACTOR, 1);
+ shader.uniform3fv(LLShaderMgr::SUNLIGHT_COLOR, 1, LLColor3::white.mV);
+ shader.uniform1f(LLShaderMgr::DENSITY_MULTIPLIER, 0.0f);
+
+ // Ignore sun shadow (if enabled)
+ for (U32 i = 0; i < 6; i++)
+ {
+ const S32 channel = shader.getTextureChannel(LLShaderMgr::DEFERRED_SHADOW0+i);
+ if (channel != -1)
+ {
+ gGL.getTexUnit(channel)->bind(LLViewerFetchedTexture::sWhiteImagep, TRUE);
+ }
+ }
+}
+
+// Set a variable to a value temporarily, and restor the variable's old value
+// when this object leaves scope.
+template<typename T>
+struct SetTemporarily
+{
+ T* mRef;
+ T mOldVal;
+ SetTemporarily(T* var, T temp_val)
+ {
+ mRef = var;
+ mOldVal = *mRef;
+ *mRef = temp_val;
+ }
+ ~SetTemporarily()
+ {
+ *mRef = mOldVal;
+ }
+};
+
+}; // namespace
+
+bool LLGLTFPreviewTexture::render()
+{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
+
+ if (!mShouldRender) { return FALSE; }
+
+ glClearColor(0, 0, 0, 0);
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+ LLGLDepthTest(GL_FALSE);
+ LLGLDisable stencil(GL_STENCIL_TEST);
+ LLGLDisable scissor(GL_SCISSOR_TEST);
+ SetTemporarily<bool> no_dof(&LLPipeline::RenderDepthOfField, false);
+ SetTemporarily<bool> no_glow(&LLPipeline::sRenderGlow, false);
+ SetTemporarily<bool> no_ssr(&LLPipeline::RenderScreenSpaceReflections, false);
+ SetTemporarily<U32> no_fxaa(&LLPipeline::RenderFSAASamples, U32(0));
+ SetTemporarily<LLPipeline::RenderTargetPack*> use_auxiliary_render_target(&gPipeline.mRT, &gPipeline.mAuxillaryRT);
+
+ LLVector3 light_dir3(1.0f, 1.0f, 1.0f);
+ light_dir3.normalize();
+ const LLVector4 light_dir = LLVector4(light_dir3, 0);
+ const S32 old_local_light_count = gSavedSettings.get<S32>("RenderLocalLightCount");
+ gSavedSettings.set<S32>("RenderLocalLightCount", 0);
+
+ gPipeline.mReflectionMapManager.forceDefaultProbeAndUpdateUniforms();
+
+ LLViewerCamera camera;
+
+ // Calculate the object distance at which the object of a given radius will
+ // span the partial width of the screen given by fill_ratio.
+ // Assume the primitive has a scale of 1 (this is the default).
+ constexpr F32 fill_ratio = 0.8f;
+ constexpr F32 object_radius = 0.5f;
+ const F32 object_distance = (object_radius / fill_ratio) * tan(camera.getDefaultFOV());
+ // Negative coordinate shows the textures on the sphere right-side up, when
+ // combined with the UV hacks in create_preview_sphere
+ const LLVector3 object_position(0.0, -object_distance, 0.0);
+ LLMatrix4 object_transform;
+ object_transform.translate(object_position);
+
+ // Set up camera and viewport
+ const LLVector3 origin(0.0, 0.0, 0.0);
+ camera.lookAt(origin, object_position);
+ camera.setAspect(mFullHeight / mFullWidth);
+ const LLRect texture_rect(0, mFullHeight, mFullWidth, 0);
+ camera.setPerspective(NOT_FOR_SELECTION, texture_rect.mLeft, texture_rect.mBottom, texture_rect.getWidth(), texture_rect.getHeight(), FALSE, camera.getNear(), MAX_FAR_CLIP*2.f);
+
+ // Generate sphere object on-the-fly. Discard afterwards. (Vertex buffer is
+ // discarded, but the sphere should be cached in LLVolumeMgr.)
+ PreviewSphere& preview_sphere = get_preview_sphere(mGLTFMaterial, object_transform);
+
+ gPipeline.setupHWLights();
+ glh::matrix4f mat = copy_matrix(gGLModelView);
+ glh::vec4f transformed_light_dir(light_dir.mV);
+ mat.mult_matrix_vec(transformed_light_dir);
+ SetTemporarily<LLVector4> force_sun_direction_high_graphics(&gPipeline.mTransformedSunDir, LLVector4(transformed_light_dir.v));
+ // Override lights to ensure the sun is always shining from a certain direction (low graphics)
+ // See also force_sun_direction_high_graphics and fixup_shader_constants
+ {
+ LLLightState* light = gGL.getLight(0);
+ light->setPosition(light_dir);
+ constexpr bool sun_up = true;
+ light->setSunPrimary(sun_up);
+ }
+
+ LLRenderTarget& screen = gPipeline.mAuxillaryRT.screen;
+
+ // *HACK: Force reset of the model matrix
+ gGLLastMatrix = nullptr;
+
+#if 0
+ if (mGLTFMaterial->mAlphaMode == LLGLTFMaterial::ALPHA_MODE_OPAQUE || mGLTFMaterial->mAlphaMode == LLGLTFMaterial::ALPHA_MODE_MASK)
+ {
+ // *TODO: Opaque/alpha mask rendering
+ }
+ else
+#endif
+ {
+ // Alpha blend rendering
+
+ screen.bindTarget();
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+ LLGLSLShader& shader = gDeferredPBRAlphaProgram;
+
+ gPipeline.bindDeferredShader(shader);
+ fixup_shader_constants(shader);
+
+ for (PreviewSpherePart& part : preview_sphere)
+ {
+ LLRenderPass::pushGLTFBatch(*part->mDrawInfo);
+ }
+
+ gPipeline.unbindDeferredShader(shader);
+
+ screen.flush();
+ }
+
+ // *HACK: Hide mExposureMap from generateExposure
+ gPipeline.mExposureMap.swapFBORefs(gPipeline.mLastExposure);
+
+ gPipeline.copyScreenSpaceReflections(&screen, &gPipeline.mSceneMap);
+ gPipeline.generateLuminance(&screen, &gPipeline.mLuminanceMap);
+ gPipeline.generateExposure(&gPipeline.mLuminanceMap, &gPipeline.mExposureMap, /*use_history = */ false);
+ gPipeline.gammaCorrect(&screen, &gPipeline.mPostMap);
+ LLVertexBuffer::unbind();
+ gPipeline.generateGlow(&gPipeline.mPostMap);
+ gPipeline.combineGlow(&gPipeline.mPostMap, &screen);
+ gPipeline.renderDoF(&screen, &gPipeline.mPostMap);
+ gPipeline.applyFXAA(&gPipeline.mPostMap, &screen);
+
+ // *HACK: Restore mExposureMap (it will be consumed by generateExposure next frame)
+ gPipeline.mExposureMap.swapFBORefs(gPipeline.mLastExposure);
+
+ // Final render
+
+ gDeferredPostNoDoFProgram.bind();
+
+ // From LLPipeline::renderFinalize: "Whatever is last in the above post processing chain should _always_ be rendered directly here. If not, expect problems."
+ gDeferredPostNoDoFProgram.bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, &screen);
+ gDeferredPostNoDoFProgram.bindTexture(LLShaderMgr::DEFERRED_DEPTH, mBoundTarget, true);
+
+ {
+ LLGLDepthTest depth_test(GL_TRUE, GL_TRUE, GL_ALWAYS);
+ gPipeline.mScreenTriangleVB->setBuffer();
+ gPipeline.mScreenTriangleVB->drawArrays(LLRender::TRIANGLES, 0, 3);
+ }
+
+ gDeferredPostNoDoFProgram.unbind();
+
+ // Clean up
+ gPipeline.setupHWLights();
+ gPipeline.mReflectionMapManager.forceDefaultProbeAndUpdateUniforms(false);
+ gSavedSettings.set<S32>("RenderLocalLightCount", old_local_light_count);
+
+ return TRUE;
+}
+
+void LLGLTFPreviewTexture::postRender(bool success)
+{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
+
+ if (!mShouldRender) { return; }
+ mShouldRender = false;
+
+ LLViewerDynamicTexture::postRender(success);
+}
+
+LLPointer<LLViewerTexture> LLGLTFMaterialPreviewMgr::getPreview(LLPointer<LLFetchedGLTFMaterial> &material)
+{
+ if (!material)
+ {
+ return nullptr;
+ }
+
+ static LLCachedControl<bool> sUIPreviewMaterial(gSavedSettings, "UIPreviewMaterial", false);
+ if (!sUIPreviewMaterial)
+ {
+ fetch_texture_for_ui(material->mBaseColorTexture, material->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR]);
+ return material->mBaseColorTexture;
+ }
+
+ if (!is_material_loaded_enough_for_ui(*material))
+ {
+ return nullptr;
+ }
+
+ return LLGLTFPreviewTexture::create(material);
+}
diff --git a/indra/newview/llgltfmaterialpreviewmgr.h b/indra/newview/llgltfmaterialpreviewmgr.h
new file mode 100644
index 0000000000..80f09ece88
--- /dev/null
+++ b/indra/newview/llgltfmaterialpreviewmgr.h
@@ -0,0 +1,78 @@
+/**
+ * @file llgltfmaterialpreviewmgr.h
+ *
+ * $LicenseInfo:firstyear=2023&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2023, 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$
+ */
+
+#pragma once
+
+#include "lldrawpool.h"
+#include "lldynamictexture.h"
+#include "llfetchedgltfmaterial.h"
+#include "llsingleton.h"
+#include "lltexture.h"
+
+class LLGLTFPreviewTexture : public LLViewerDynamicTexture
+{
+protected:
+ LLGLTFPreviewTexture(LLPointer<LLFetchedGLTFMaterial> material, S32 width);
+
+public:
+ // Width scales with size of material's textures
+ static LLPointer<LLGLTFPreviewTexture> create(LLPointer<LLFetchedGLTFMaterial> material);
+
+ bool needsRender() override;
+ void preRender(bool clear_depth = TRUE) override;
+ bool render() override;
+ void postRender(bool success) override;
+
+ struct MaterialLoadLevels
+ {
+ S32 levels[LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT];
+
+ MaterialLoadLevels();
+ bool isFullyLoaded();
+ S32& operator[](size_t i);
+ const S32& operator[](size_t i) const;
+ // Less is better
+ // Returns false if lhs is not strictly less or equal for all levels
+ bool operator<(const MaterialLoadLevels& other) const;
+ // Less is better
+ // Returns false if lhs is not strictly greater or equal for all levels
+ bool operator>(const MaterialLoadLevels& other) const;
+ };
+
+private:
+ LLPointer<LLFetchedGLTFMaterial> mGLTFMaterial;
+ bool mShouldRender = true;
+ MaterialLoadLevels mBestLoad;
+};
+
+class LLGLTFMaterialPreviewMgr
+{
+ public:
+ // Returns null if the material is not loaded yet.
+ // *NOTE: User should cache the texture if the same material is being previewed
+ LLPointer<LLViewerTexture> getPreview(LLPointer<LLFetchedGLTFMaterial> &material);
+};
+
+extern LLGLTFMaterialPreviewMgr gGLTFMaterialPreviewMgr;
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index 380e49c320..1503392691 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -124,7 +124,7 @@ public:
}
LLUUID group_id;
- if (!group_id.set(tokens[0], FALSE))
+ if (!group_id.set(tokens[0], false))
{
return false;
}
@@ -192,7 +192,7 @@ public:
}
else if (!gdatap->isMemberDataComplete())
{
- LL_WARNS() << "LLGroupMgr::getInstance()->getGroupData()->isMemberDataComplete() was FALSE" << LL_ENDL;
+ LL_WARNS() << "LLGroupMgr::getInstance()->getGroupData()->isMemberDataComplete() was false" << LL_ENDL;
processGroupData();
mRequestProcessed = true;
}
@@ -418,7 +418,7 @@ void LLGroupActions::show(const LLUUID& group_id)
LLFloater *floater = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>("people");
if (!floater->isFrontmost())
{
- floater->setVisibleAndFrontmost(TRUE, params);
+ floater->setVisibleAndFrontmost(true, params);
}
}
diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp
index 32af2592d3..f060cdf906 100644
--- a/indra/newview/llgrouplist.cpp
+++ b/indra/newview/llgrouplist.cpp
@@ -163,9 +163,9 @@ void LLGroupList::draw()
}
// virtual
-BOOL LLGroupList::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLGroupList::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
- BOOL handled = LLUICtrl::handleRightMouseDown(x, y, mask);
+ bool handled = LLUICtrl::handleRightMouseDown(x, y, mask);
if (mForAgent)
{
@@ -182,9 +182,9 @@ BOOL LLGroupList::handleRightMouseDown(S32 x, S32 y, MASK mask)
}
// virtual
-BOOL LLGroupList::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLGroupList::handleDoubleClick(S32 x, S32 y, MASK mask)
{
- BOOL handled = LLView::handleDoubleClick(x, y, mask);
+ bool handled = LLView::handleDoubleClick(x, y, mask);
// Handle double click only for the selected item in the list, skip clicks on empty space.
if (handled)
{
@@ -424,7 +424,7 @@ LLGroupListItem::~LLGroupListItem()
}
//virtual
-BOOL LLGroupListItem::postBuild()
+bool LLGroupListItem::postBuild()
{
mGroupIcon = getChild<LLGroupIconCtrl>("group_icon");
mGroupNameBox = getChild<LLTextBox>("group_name");
@@ -452,7 +452,7 @@ BOOL LLGroupListItem::postBuild()
// have icons of different sizes so we need to figure it per file.
mIconWidth = mGroupNameBox->getRect().mLeft - mGroupIcon->getRect().mLeft;
- return TRUE;
+ return true;
}
//virtual
@@ -534,7 +534,7 @@ void LLGroupListItem::setGroupIconID(const LLUUID& group_icon_id)
void LLGroupListItem::setGroupIconVisible(bool visible)
{
// Already done? Then do nothing.
- if (mGroupIcon->getVisible() == (BOOL)visible)
+ if (mGroupIcon->getVisible() == (bool)visible)
return;
// Show/hide the group icon.
diff --git a/indra/newview/llgrouplist.h b/indra/newview/llgrouplist.h
index 5cbabb712f..6af073e364 100644
--- a/indra/newview/llgrouplist.h
+++ b/indra/newview/llgrouplist.h
@@ -60,8 +60,8 @@ public:
void enableForAgent(bool show_icons);
virtual void draw(); // from LLView
- /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); // from LLView
- /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask); // from LLView
+ /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask); // from LLView
+ /*virtual*/ bool handleDoubleClick(S32 x, S32 y, MASK mask); // from LLView
void setNameFilter(const std::string& filter);
void toggleIcons();
@@ -103,7 +103,7 @@ class LLGroupListItem : public LLPanel
public:
LLGroupListItem(bool for_agent, bool show_icons);
~LLGroupListItem();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void setValue(const LLSD& value);
void onMouseEnter(S32 x, S32 y, MASK mask);
void onMouseLeave(S32 x, S32 y, MASK mask);
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index a9e5e55451..6aba2ca0da 100644
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -93,7 +93,7 @@ LLGroupMemberData::LLGroupMemberData(const LLUUID& id,
U64 agent_powers,
const std::string& title,
const std::string& online_status,
- BOOL is_owner) :
+ bool is_owner) :
mID(id),
mContribution(contribution),
mAgentPowers(agent_powers),
@@ -137,7 +137,7 @@ LLGroupRoleData::LLGroupRoleData(const LLUUID& role_id,
const S32 member_count) :
mRoleID(role_id),
mMemberCount(member_count),
- mMembersNeedsSort(FALSE)
+ mMembersNeedsSort(false)
{
mRoleData.mRoleName = role_name;
mRoleData.mRoleTitle = role_title;
@@ -152,7 +152,7 @@ LLGroupRoleData::LLGroupRoleData(const LLUUID& role_id,
mRoleID(role_id),
mRoleData(role_data),
mMemberCount(member_count),
- mMembersNeedsSort(FALSE)
+ mMembersNeedsSort(false)
{
}
@@ -162,7 +162,7 @@ LLGroupRoleData::~LLGroupRoleData()
}
S32 LLGroupRoleData::getMembersInRole(uuid_vec_t members,
- BOOL needs_sort)
+ bool needs_sort)
{
if (mRoleID.isNull())
{
@@ -175,7 +175,7 @@ S32 LLGroupRoleData::getMembersInRole(uuid_vec_t members,
if (mMembersNeedsSort)
{
std::sort(mMemberIDs.begin(), mMemberIDs.end());
- mMembersNeedsSort = FALSE;
+ mMembersNeedsSort = false;
}
if (needs_sort)
{
@@ -195,7 +195,7 @@ S32 LLGroupRoleData::getMembersInRole(uuid_vec_t members,
void LLGroupRoleData::addMember(const LLUUID& member)
{
- mMembersNeedsSort = TRUE;
+ mMembersNeedsSort = true;
mMemberIDs.push_back(member);
}
@@ -205,7 +205,7 @@ bool LLGroupRoleData::removeMember(const LLUUID& member)
if (it != mMemberIDs.end())
{
- mMembersNeedsSort = TRUE;
+ mMembersNeedsSort = true;
mMemberIDs.erase(it);
return true;
}
@@ -215,7 +215,7 @@ bool LLGroupRoleData::removeMember(const LLUUID& member)
void LLGroupRoleData::clearMembers()
{
- mMembersNeedsSort = FALSE;
+ mMembersNeedsSort = false;
mMemberIDs.clear();
}
@@ -226,13 +226,13 @@ void LLGroupRoleData::clearMembers()
LLGroupMgrGroupData::LLGroupMgrGroupData(const LLUUID& id) :
mID(id),
- mShowInList(TRUE),
- mOpenEnrollment(FALSE),
+ mShowInList(true),
+ mOpenEnrollment(false),
mMembershipFee(0),
- mAllowPublish(FALSE),
- mListInProfile(FALSE),
- mMaturePublish(FALSE),
- mChanged(FALSE),
+ mAllowPublish(false),
+ mListInProfile(false),
+ mMaturePublish(false),
+ mChanged(false),
mMemberCount(0),
mRoleCount(0),
mReceivedRoleMemberPairs(0),
@@ -252,7 +252,7 @@ void LLGroupMgrGroupData::setAccessed()
mAccessTime = (F32)LLFrameTimer::getTotalSeconds();
}
-BOOL LLGroupMgrGroupData::getRoleData(const LLUUID& role_id, LLRoleData& role_data)
+bool LLGroupMgrGroupData::getRoleData(const LLUUID& role_id, LLRoleData& role_data)
{
role_data_map_t::const_iterator it;
@@ -260,10 +260,10 @@ BOOL LLGroupMgrGroupData::getRoleData(const LLUUID& role_id, LLRoleData& role_da
it = mRoleChanges.find(role_id);
if (it != mRoleChanges.end())
{
- if ((*it).second.mChangeType == RC_DELETE) return FALSE;
+ if ((*it).second.mChangeType == RC_DELETE) return false;
role_data = (*it).second;
- return TRUE;
+ return true;
}
// Ok, no changes, hasn't been deleted, isn't a new role, just find the role.
@@ -271,11 +271,11 @@ BOOL LLGroupMgrGroupData::getRoleData(const LLUUID& role_id, LLRoleData& role_da
if (rit != mRoles.end())
{
role_data = (*rit).second->getRoleData();
- return TRUE;
+ return true;
}
// This role must not exist.
- return FALSE;
+ return false;
}
@@ -337,7 +337,7 @@ void LLGroupMgrGroupData::setRoleData(const LLUUID& role_id, LLRoleData role_dat
}
}
-BOOL LLGroupMgrGroupData::pendingRoleChanges()
+bool LLGroupMgrGroupData::pendingRoleChanges()
{
return (!mRoleChanges.empty());
}
@@ -517,7 +517,7 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id,
//TODO move this into addrole function
//see if they added someone to the owner role and update isOwner
- gmd->mIsOwner = (role_id == mOwnerRole) ? TRUE : gmd->mIsOwner;
+ gmd->mIsOwner = (role_id == mOwnerRole) ? true : gmd->mIsOwner;
}
else if (RMC_REMOVE == rmc)
{
@@ -526,7 +526,7 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id,
gmd->removeRole(role_id);
//see if they removed someone from the owner role and update isOwner
- gmd->mIsOwner = (role_id == mOwnerRole) ? FALSE : gmd->mIsOwner;
+ gmd->mIsOwner = (role_id == mOwnerRole) ? false : gmd->mIsOwner;
}
lluuid_pair role_member;
@@ -568,7 +568,7 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id,
recalcAgentPowers(member_id);
- mChanged = TRUE;
+ mChanged = true;
return true;
}
@@ -980,7 +980,7 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
std::string online_status;
std::string title;
U64 agent_powers = 0;
- BOOL is_owner = FALSE;
+ bool is_owner = false;
S32 num_members = msg->getNumberOfBlocksFast(_PREHASH_MemberData);
for (S32 i = 0; i < num_members; i++)
@@ -1049,7 +1049,7 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
}
}
- group_datap->mChanged = TRUE;
+ group_datap->mChanged = true;
LLGroupMgr::getInstance()->notifyObservers(GC_MEMBER_DATA);
}
@@ -1075,7 +1075,7 @@ void LLGroupMgr::processGroupPropertiesReply(LLMessageSystem* msg, void** data)
LLUUID group_id;
std::string name;
std::string charter;
- BOOL show_in_list = FALSE;
+ bool show_in_list = false;
LLUUID founder_id;
U64 powers_mask = GP_NO_POWERS;
S32 money = 0;
@@ -1083,11 +1083,11 @@ void LLGroupMgr::processGroupPropertiesReply(LLMessageSystem* msg, void** data)
LLUUID insignia_id;
LLUUID owner_role;
U32 membership_fee = 0;
- BOOL open_enrollment = FALSE;
+ bool open_enrollment = false;
S32 num_group_members = 0;
S32 num_group_roles = 0;
- BOOL allow_publish = FALSE;
- BOOL mature = FALSE;
+ bool allow_publish = false;
+ bool mature = false;
msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id );
msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_FounderID, founder_id);
@@ -1122,7 +1122,7 @@ void LLGroupMgr::processGroupPropertiesReply(LLMessageSystem* msg, void** data)
group_datap->mRoleCount = num_group_roles + 1; // Add the everyone role.
group_datap->mGroupPropertiesDataComplete = true;
- group_datap->mChanged = TRUE;
+ group_datap->mChanged = true;
properties_request_map_t::iterator request = LLGroupMgr::getInstance()->mPropRequests.find(group_id);
if (request != LLGroupMgr::getInstance()->mPropRequests.end())
@@ -1219,7 +1219,7 @@ void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data)
}
}
- group_datap->mChanged = TRUE;
+ group_datap->mChanged = true;
LLGroupMgr::getInstance()->notifyObservers(GC_ROLE_DATA);
}
@@ -1329,7 +1329,7 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data)
group_datap->mRoleMembersRequestID.setNull();
}
- group_datap->mChanged = TRUE;
+ group_datap->mChanged = true;
LLGroupMgr::getInstance()->notifyObservers(GC_ROLE_MEMBER_DATA);
if (group_datap->mPendingBanRequest)
@@ -1379,7 +1379,7 @@ void LLGroupMgr::processGroupTitlesReply(LLMessageSystem* msg, void** data)
}
}
- group_datap->mChanged = TRUE;
+ group_datap->mChanged = true;
LLGroupMgr::getInstance()->notifyObservers(GC_TITLES);
}
@@ -1389,7 +1389,7 @@ void LLGroupMgr::processEjectGroupMemberReply(LLMessageSystem* msg, void ** data
LL_DEBUGS("GrpMgr") << "processEjectGroupMemberReply" << LL_ENDL;
LLUUID group_id;
msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id);
- BOOL success;
+ bool success;
msg->getBOOLFast(_PREHASH_EjectData, _PREHASH_Success, success);
// If we had a failure, the group panel needs to be updated.
@@ -1404,7 +1404,7 @@ void LLGroupMgr::processJoinGroupReply(LLMessageSystem* msg, void ** data)
{
LL_DEBUGS("GrpMgr") << "processJoinGroupReply" << LL_ENDL;
LLUUID group_id;
- BOOL success;
+ bool success;
msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id);
msg->getBOOLFast(_PREHASH_GroupData, _PREHASH_Success, success);
@@ -1424,7 +1424,7 @@ void LLGroupMgr::processLeaveGroupReply(LLMessageSystem* msg, void ** data)
{
LL_DEBUGS("GrpMgr") << "processLeaveGroupReply" << LL_ENDL;
LLUUID group_id;
- BOOL success;
+ bool success;
msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id);
msg->getBOOLFast(_PREHASH_GroupData, _PREHASH_Success, success);
@@ -1443,7 +1443,7 @@ void LLGroupMgr::processLeaveGroupReply(LLMessageSystem* msg, void ** data)
void LLGroupMgr::processCreateGroupReply(LLMessageSystem* msg, void ** data)
{
LLUUID group_id;
- BOOL success;
+ bool success;
std::string message;
msg->getUUIDFast(_PREHASH_ReplyData, _PREHASH_GroupID, group_id );
@@ -1460,8 +1460,8 @@ void LLGroupMgr::processCreateGroupReply(LLMessageSystem* msg, void ** data)
// This is so when we go to modify the group we will be able to do so.
// This isn't actually too bad because real data will come down in 2 or 3 miliseconds and replace this.
LLGroupData gd;
- gd.mAcceptNotices = TRUE;
- gd.mListInProfile = TRUE;
+ gd.mAcceptNotices = true;
+ gd.mListInProfile = true;
gd.mContribution = 0;
gd.mID = group_id;
gd.mName = "new group";
@@ -1546,7 +1546,7 @@ void LLGroupMgr::notifyObservers(LLGroupChange gc)
{
oi->second->changed(gc);
}
- gi->second->mChanged = FALSE;
+ gi->second->mChanged = false;
// notify LLParticularGroupObserver
@@ -1685,7 +1685,7 @@ void LLGroupMgr::sendGroupRoleMembersRequest(const LLUUID& group_id)
LL_INFOS("GrpMgr") << " Pending: " << (group_datap->mPendingRoleMemberRequest ? "Y" : "N")
<< " MemberDataComplete: " << (group_datap->mMemberDataComplete ? "Y" : "N")
<< " RoleDataComplete: " << (group_datap->mRoleDataComplete ? "Y" : "N") << LL_ENDL;
- group_datap->mPendingRoleMemberRequest = TRUE;
+ group_datap->mPendingRoleMemberRequest = true;
return;
}
@@ -1744,11 +1744,11 @@ void LLGroupMgr::sendGroupTitleUpdate(const LLUUID& group_id, const LLUUID& titl
{
if (iter->mRoleID == title_role_id)
{
- iter->mSelected = TRUE;
+ iter->mSelected = true;
}
else if (iter->mSelected)
{
- iter->mSelected = FALSE;
+ iter->mSelected = false;
}
}
}
@@ -1759,9 +1759,9 @@ void LLGroupMgr::sendCreateGroupRequest(const std::string& name,
U8 show_in_list,
const LLUUID& insignia,
S32 membership_fee,
- BOOL open_enrollment,
- BOOL allow_publish,
- BOOL mature_publish)
+ bool open_enrollment,
+ bool allow_publish,
+ bool mature_publish)
{
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("CreateGroupRequest");
@@ -1807,7 +1807,7 @@ void LLGroupMgr::sendUpdateGroupInfo(const LLUUID& group_id)
gAgent.sendReliableMessage();
// Not expecting a response, so let anyone else watching know the data has changed.
- group_datap->mChanged = TRUE;
+ group_datap->mChanged = true;
notifyObservers(GC_PROPERTIES);
}
@@ -1853,7 +1853,7 @@ void LLGroupMgr::sendGroupRoleMemberChanges(const LLUUID& group_id)
group_datap->mRoleMemberChanges.clear();
// Not expecting a response, so let anyone else watching know the data has changed.
- group_datap->mChanged = TRUE;
+ group_datap->mChanged = true;
notifyObservers(GC_ROLE_MEMBER_DATA);
}
@@ -2147,7 +2147,7 @@ void LLGroupMgr::processGroupBanRequest(const LLSD& content)
gdatap->createBanEntry(ban_id, ban_data);
}
- gdatap->mChanged = TRUE;
+ gdatap->mChanged = true;
LLGroupMgr::getInstance()->notifyObservers(GC_BANLIST);
}
@@ -2251,7 +2251,7 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content)
LL_INFOS("GrpMgr") << "Received empty group members list for group id: " << group_id.asString() << LL_ENDL;
// Set mMemberDataComplete for correct handling of empty responses. See MAINT-5237
group_datap->mMemberDataComplete = true;
- group_datap->mChanged = TRUE;
+ group_datap->mChanged = true;
LLGroupMgr::getInstance()->notifyObservers(GC_MEMBER_DATA);
return;
}
@@ -2267,7 +2267,7 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content)
S32 contribution;
U64 member_powers;
// If this is changed to a bool, make sure to change the LLGroupMemberData constructor
- BOOL is_owner;
+ bool is_owner;
// Compute this once, rather than every time.
U64 default_powers = llstrtou64(defaults["default_powers"].asString().c_str(), NULL, 16);
@@ -2355,7 +2355,7 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content)
sendGroupRoleMembersRequest(group_id);
}
- group_datap->mChanged = TRUE;
+ group_datap->mChanged = true;
notifyObservers(GC_MEMBER_DATA);
}
@@ -2371,7 +2371,7 @@ void LLGroupMgr::sendGroupRoleChanges(const LLUUID& group_id)
group_datap->sendRoleChanges();
// Not expecting a response, so let anyone else watching know the data has changed.
- group_datap->mChanged = TRUE;
+ group_datap->mChanged = true;
notifyObservers(GC_ROLE_DATA);
}
}
@@ -2389,7 +2389,7 @@ bool LLGroupMgr::parseRoleActions(const std::string& xml_filename)
{
LLXMLNodePtr root;
- BOOL success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root);
+ bool success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root);
if (!success || !root || !root->hasName( "role_actions" ))
{
diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h
index 0d25e8fb22..3d0f67c6f3 100644
--- a/indra/newview/llgroupmgr.h
+++ b/indra/newview/llgroupmgr.h
@@ -84,14 +84,14 @@ public:
U64 agent_powers,
const std::string& title,
const std::string& online_status,
- BOOL is_owner);
+ bool is_owner);
~LLGroupMemberData();
const LLUUID& getID() const { return mID; }
S32 getContribution() const { return mContribution; }
U64 getAgentPowers() const { return mAgentPowers; }
- BOOL isOwner() const { return mIsOwner; }
+ bool isOwner() const { return mIsOwner; }
const std::string& getTitle() const { return mTitle; }
const std::string& getOnlineStatus() const { return mOnlineStatus; }
void addRole(const LLUUID& role, LLGroupRoleData* rd);
@@ -100,7 +100,7 @@ public:
role_list_t::iterator roleBegin() { return mRolesList.begin(); }
role_list_t::iterator roleEnd() { return mRolesList.end(); }
- BOOL isInRole(const LLUUID& role_id) { return (mRolesList.find(role_id) != mRolesList.end()); }
+ bool isInRole(const LLUUID& role_id) { return (mRolesList.find(role_id) != mRolesList.end()); }
private:
LLUUID mID;
@@ -108,7 +108,7 @@ private:
U64 mAgentPowers;
std::string mTitle;
std::string mOnlineStatus;
- BOOL mIsOwner;
+ bool mIsOwner;
role_list_t mRolesList;
};
@@ -150,7 +150,7 @@ public:
const LLUUID& getID() const { return mRoleID; }
const uuid_vec_t& getRoleMembers() const { return mMemberIDs; }
- S32 getMembersInRole(uuid_vec_t members, BOOL needs_sort = TRUE);
+ S32 getMembersInRole(uuid_vec_t members, bool needs_sort = true);
S32 getTotalMembersInRole() { return mMemberCount ? mMemberCount : mMemberIDs.size(); } //FIXME: Returns 0 for Everyone role when Member list isn't yet loaded, see MAINT-5225
LLRoleData getRoleData() const { return mRoleData; }
@@ -169,7 +169,7 @@ public:
protected:
LLGroupRoleData()
- : mMemberCount(0), mMembersNeedsSort(FALSE) {}
+ : mMemberCount(0), mMembersNeedsSort(false) {}
LLUUID mRoleID;
LLRoleData mRoleData;
@@ -178,7 +178,7 @@ protected:
S32 mMemberCount;
private:
- BOOL mMembersNeedsSort;
+ bool mMembersNeedsSort;
};
struct LLRoleMemberChange
@@ -221,7 +221,7 @@ struct LLGroupTitle
{
std::string mTitle;
LLUUID mRoleID;
- BOOL mSelected;
+ bool mSelected;
};
class LLGroupMgrGroupData
@@ -234,11 +234,11 @@ public:
const LLUUID& getID() { return mID; }
- BOOL getRoleData(const LLUUID& role_id, LLRoleData& role_data);
+ bool getRoleData(const LLUUID& role_id, LLRoleData& role_data);
void setRoleData(const LLUUID& role_id, LLRoleData role_data);
void createRole(const LLUUID& role_id, LLRoleData role_data);
void deleteRole(const LLUUID& role_id);
- BOOL pendingRoleChanges();
+ bool pendingRoleChanges();
void addRolePower(const LLUUID& role_id, U64 power);
void removeRolePower(const LLUUID& role_id, U64 power);
@@ -297,15 +297,15 @@ public:
LLUUID mOwnerRole;
std::string mName;
std::string mCharter;
- BOOL mShowInList;
+ bool mShowInList;
LLUUID mInsigniaID;
LLUUID mFounderID;
- BOOL mOpenEnrollment;
+ bool mOpenEnrollment;
S32 mMembershipFee;
- BOOL mAllowPublish;
- BOOL mListInProfile;
- BOOL mMaturePublish;
- BOOL mChanged;
+ bool mAllowPublish;
+ bool mListInProfile;
+ bool mMaturePublish;
+ bool mChanged;
S32 mMemberCount;
S32 mRoleCount;
@@ -398,9 +398,9 @@ public:
U8 show_in_list,
const LLUUID& insignia,
S32 membership_fee,
- BOOL open_enrollment,
- BOOL allow_publish,
- BOOL mature_publish);
+ bool open_enrollment,
+ bool allow_publish,
+ bool mature_publish);
static void sendGroupMemberJoin(const LLUUID& group_id);
static void sendGroupMemberInvites(const LLUUID& group_id, std::map<LLUUID,LLUUID>& role_member_pairs);
diff --git a/indra/newview/llheroprobemanager.cpp b/indra/newview/llheroprobemanager.cpp
new file mode 100644
index 0000000000..cd7ee4736a
--- /dev/null
+++ b/indra/newview/llheroprobemanager.cpp
@@ -0,0 +1,607 @@
+/**
+ * @file LLHeroProbeManager.cpp
+ * @brief LLHeroProbeManager class implementation
+ *
+ * $LicenseInfo:firstyear=2022&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2022, 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 "llheroprobemanager.h"
+#include "llreflectionmapmanager.h"
+#include "llviewercamera.h"
+#include "llspatialpartition.h"
+#include "llviewerregion.h"
+#include "pipeline.h"
+#include "llviewershadermgr.h"
+#include "llviewercontrol.h"
+#include "llenvironment.h"
+#include "llstartup.h"
+#include "llagent.h"
+#include "llagentcamera.h"
+#include "llviewerwindow.h"
+#include "llviewerjoystick.h"
+#include "llviewermediafocus.h"
+
+extern bool gCubeSnapshot;
+extern bool gTeleportDisplay;
+
+// get the next highest power of two of v (or v if v is already a power of two)
+//defined in llvertexbuffer.cpp
+extern U32 nhpo2(U32 v);
+
+static void touch_default_probe(LLReflectionMap* probe)
+{
+ if (LLViewerCamera::getInstance())
+ {
+ LLVector3 origin = LLViewerCamera::getInstance()->getOrigin();
+ origin.mV[2] += 64.f;
+
+ probe->mOrigin.load3(origin.mV);
+ }
+}
+
+LLHeroProbeManager::LLHeroProbeManager()
+{
+}
+
+LLHeroProbeManager::~LLHeroProbeManager()
+{
+ cleanup();
+
+ mHeroVOList.clear();
+ mNearestHero = nullptr;
+}
+
+// helper class to seed octree with probes
+void LLHeroProbeManager::update()
+{
+ if (!LLPipeline::RenderMirrors || gTeleportDisplay || LLStartUp::getStartupState() < STATE_PRECACHE)
+ {
+ return;
+ }
+
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
+ llassert(!gCubeSnapshot); // assert a snapshot is not in progress
+ if (LLAppViewer::instance()->logoutRequestSent())
+ {
+ return;
+ }
+
+ initReflectionMaps();
+
+ if (!mRenderTarget.isComplete())
+ {
+ U32 color_fmt = GL_RGBA16F;
+ mRenderTarget.allocate(mProbeResolution, mProbeResolution, color_fmt, true);
+ }
+
+ if (mMipChain.empty())
+ {
+ U32 res = mProbeResolution;
+ U32 count = log2((F32)res) + 0.5f;
+
+ mMipChain.resize(count);
+ for (int i = 0; i < count; ++i)
+ {
+ mMipChain[i].allocate(res, res, GL_RGBA16F);
+ res /= 2;
+ }
+ }
+
+ llassert(mProbes[0] == mDefaultProbe);
+
+ LLVector4a probe_pos;
+ LLVector3 camera_pos = LLViewerCamera::instance().mOrigin;
+ F32 near_clip = 0.1f;
+ if (mHeroVOList.size() > 0)
+ {
+ // Find our nearest hero candidate.
+
+ float last_distance = 99999.f;
+
+ for (auto vo : mHeroVOList)
+ {
+ if (vo && !vo->isDead() && vo->mDrawable.notNull())
+ {
+ float distance = (LLViewerCamera::instance().getOrigin() - vo->getPositionAgent()).magVec();
+ if (distance < last_distance)
+ {
+ mNearestHero = vo;
+ last_distance = distance;
+ }
+ }
+ else
+ {
+ unregisterViewerObject(vo);
+ }
+ }
+
+ if (mNearestHero != nullptr && !mNearestHero->isDead() && mNearestHero->mDrawable.notNull())
+ {
+ LLVector3 hero_pos = mNearestHero->getPositionAgent();
+ LLVector3 face_normal = LLVector3(0, 0, 1);
+
+ face_normal *= mNearestHero->mDrawable->getWorldRotation();
+ face_normal.normalize();
+
+ LLVector3 offset = camera_pos - hero_pos;
+ LLVector3 project = face_normal * (offset * face_normal);
+ LLVector3 reject = offset - project;
+ LLVector3 point = (reject - project) + hero_pos;
+
+ mCurrentClipPlane.setVec(hero_pos, face_normal);
+ mMirrorPosition = hero_pos;
+ mMirrorNormal = face_normal;
+
+
+ probe_pos.load3(point.mV);
+
+ // Collect the list of faces that need updating based upon the camera's rotation.
+ LLVector3 cam_direction = LLVector3(0, 0, 1) * LLViewerCamera::instance().getQuaternion();
+ cam_direction.normalize();
+
+ static LLVector3 cubeFaces[6] = {
+ LLVector3(1, 0, 0),
+ LLVector3(-1, 0, 0),
+ LLVector3(0, 1, 0),
+ LLVector3(0, -1, 0),
+ LLVector3(0, 0, 1),
+ LLVector3(0, 0, -1)
+ };
+
+ for (int i = 0; i < 6; i++)
+ {
+ float shouldUpdate = fminf(1, (fmaxf(-1, cam_direction * cubeFaces[i]) * 0.5 + 0.5));
+
+ int updateRate = ceilf((1 - shouldUpdate) * gPipeline.RenderHeroProbeConservativeUpdateMultiplier);
+
+ // Chances are this is a face that's non-visible to the camera when it's being reflected.
+ // Set it to 0. It will be skipped below.
+ if (updateRate == gPipeline.RenderHeroProbeConservativeUpdateMultiplier)
+ updateRate = 0;
+
+ mFaceUpdateList[i] = updateRate;
+ }
+ }
+ else
+ {
+ mNearestHero = nullptr;
+ }
+
+ mHeroProbeStrength = 1;
+ }
+ else
+ {
+ probe_pos.load3(camera_pos.mV);
+ }
+
+
+ static LLCachedControl<S32> sDetail(gSavedSettings, "RenderHeroReflectionProbeDetail", -1);
+ static LLCachedControl<S32> sLevel(gSavedSettings, "RenderHeroReflectionProbeLevel", 3);
+
+ {
+ LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("hpmu - realtime");
+ // Probe 0 is always our mirror probe.
+ mProbes[0]->mOrigin = probe_pos;
+
+ bool radiance_pass = gPipeline.mReflectionMapManager.isRadiancePass();
+
+ gPipeline.mReflectionMapManager.mRadiancePass = true;
+ mRenderingMirror = true;
+ for (U32 j = 0; j < mProbes.size(); j++)
+ {
+ for (U32 i = 0; i < 6; ++i)
+ {
+ if (mFaceUpdateList[i] > 0 && mCurrentProbeUpdateFrame % mFaceUpdateList[i] == 0)
+ {
+ updateProbeFace(mProbes[j], i, near_clip);
+ mCurrentProbeUpdateFrame = 0;
+ }
+ }
+ generateRadiance(mProbes[j]);
+ }
+ mRenderingMirror = false;
+
+ gPipeline.mReflectionMapManager.mRadiancePass = radiance_pass;
+
+ mProbes[0]->mViewerObject = mNearestHero;
+ mProbes[0]->autoAdjustOrigin();
+ }
+
+ mCurrentProbeUpdateFrame++;
+}
+
+// Do the reflection map update render passes.
+// For every 12 calls of this function, one complete reflection probe radiance map and irradiance map is generated
+// First six passes render the scene with direct lighting only into a scratch space cube map at the end of the cube map array and generate
+// a simple mip chain (not convolution filter).
+// At the end of these passes, an irradiance map is generated for this probe and placed into the irradiance cube map array at the index for this probe
+// The next six passes render the scene with both radiance and irradiance into the same scratch space cube map and generate a simple mip chain.
+// At the end of these passes, a radiance map is generated for this probe and placed into the radiance cube map array at the index for this probe.
+// In effect this simulates single-bounce lighting.
+void LLHeroProbeManager::updateProbeFace(LLReflectionMap* probe, U32 face, F32 near_clip)
+{
+ // hacky hot-swap of camera specific render targets
+ gPipeline.mRT = &gPipeline.mHeroProbeRT;
+
+ probe->update(mRenderTarget.getWidth(), face, true, near_clip);
+
+ gPipeline.mRT = &gPipeline.mMainRT;
+
+ S32 sourceIdx = mReflectionProbeCount;
+
+
+ // Unlike the reflectionmap manager, all probes are considered "realtime" for hero probes.
+ sourceIdx += 1;
+
+ gGL.setColorMask(true, true);
+ LLGLDepthTest depth(GL_FALSE, GL_FALSE);
+ LLGLDisable cull(GL_CULL_FACE);
+ LLGLDisable blend(GL_BLEND);
+
+ // downsample to placeholder map
+ {
+ gGL.matrixMode(gGL.MM_MODELVIEW);
+ gGL.pushMatrix();
+ gGL.loadIdentity();
+
+ gGL.matrixMode(gGL.MM_PROJECTION);
+ gGL.pushMatrix();
+ gGL.loadIdentity();
+
+ gGL.flush();
+ U32 res = mProbeResolution * 2;
+
+ static LLStaticHashedString resScale("resScale");
+ static LLStaticHashedString direction("direction");
+ static LLStaticHashedString znear("znear");
+ static LLStaticHashedString zfar("zfar");
+
+ LLRenderTarget *screen_rt = &gPipeline.mHeroProbeRT.screen;
+ LLRenderTarget *depth_rt = &gPipeline.mHeroProbeRT.deferredScreen;
+
+ // perform a gaussian blur on the super sampled render before downsampling
+ {
+ gGaussianProgram.bind();
+ gGaussianProgram.uniform1f(resScale, 1.f / (mProbeResolution * 2));
+ S32 diffuseChannel = gGaussianProgram.enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, LLTexUnit::TT_TEXTURE);
+
+ // horizontal
+ gGaussianProgram.uniform2f(direction, 1.f, 0.f);
+ gGL.getTexUnit(diffuseChannel)->bind(screen_rt);
+ mRenderTarget.bindTarget();
+ gPipeline.mScreenTriangleVB->setBuffer();
+ gPipeline.mScreenTriangleVB->drawArrays(LLRender::TRIANGLES, 0, 3);
+ mRenderTarget.flush();
+
+ // vertical
+ gGaussianProgram.uniform2f(direction, 0.f, 1.f);
+ gGL.getTexUnit(diffuseChannel)->bind(&mRenderTarget);
+ screen_rt->bindTarget();
+ gPipeline.mScreenTriangleVB->setBuffer();
+ gPipeline.mScreenTriangleVB->drawArrays(LLRender::TRIANGLES, 0, 3);
+ screen_rt->flush();
+ gGaussianProgram.unbind();
+ }
+
+ S32 mips = log2((F32)mProbeResolution) + 0.5f;
+
+ gReflectionMipProgram.bind();
+ S32 diffuseChannel = gReflectionMipProgram.enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, LLTexUnit::TT_TEXTURE);
+ S32 depthChannel = gReflectionMipProgram.enableTexture(LLShaderMgr::DEFERRED_DEPTH, LLTexUnit::TT_TEXTURE);
+
+ for (int i = 0; i < mMipChain.size(); ++i)
+ {
+ LL_PROFILE_GPU_ZONE("probe mip");
+ mMipChain[i].bindTarget();
+ if (i == 0)
+ {
+ gGL.getTexUnit(diffuseChannel)->bind(screen_rt);
+ }
+ else
+ {
+ gGL.getTexUnit(diffuseChannel)->bind(&(mMipChain[i - 1]));
+ }
+
+ gGL.getTexUnit(depthChannel)->bind(depth_rt, true);
+
+ gReflectionMipProgram.uniform1f(resScale, 1.f / (mProbeResolution * 2));
+ gReflectionMipProgram.uniform1f(znear, probe->getNearClip());
+ gReflectionMipProgram.uniform1f(zfar, MAX_FAR_CLIP);
+
+ gPipeline.mScreenTriangleVB->setBuffer();
+ gPipeline.mScreenTriangleVB->drawArrays(LLRender::TRIANGLES, 0, 3);
+
+ res /= 2;
+
+ S32 mip = i - (mMipChain.size() - mips);
+
+ if (mip >= 0)
+ {
+ LL_PROFILE_GPU_ZONE("probe mip copy");
+ mTexture->bind(0);
+
+ glCopyTexSubImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, mip, 0, 0, sourceIdx * 6 + face, 0, 0, res, res);
+
+ mTexture->unbind();
+ }
+ mMipChain[i].flush();
+ }
+
+ gGL.popMatrix();
+ gGL.matrixMode(gGL.MM_MODELVIEW);
+ gGL.popMatrix();
+
+ gGL.getTexUnit(diffuseChannel)->unbind(LLTexUnit::TT_TEXTURE);
+ gReflectionMipProgram.unbind();
+ }
+}
+
+// Separate out radiance generation as a separate stage.
+// This is to better enable independent control over how we generate radiance vs. having it coupled with processing the final face of the probe.
+// Useful when we may not always be rendering a full set of faces of the probe.
+void LLHeroProbeManager::generateRadiance(LLReflectionMap* probe)
+{
+ S32 sourceIdx = mReflectionProbeCount;
+
+ // Unlike the reflectionmap manager, all probes are considered "realtime" for hero probes.
+ sourceIdx += 1;
+ {
+ mMipChain[0].bindTarget();
+ static LLStaticHashedString sSourceIdx("sourceIdx");
+
+ {
+
+
+ // generate radiance map (even if this is not the irradiance map, we need the mip chain for the irradiance map)
+ gHeroRadianceGenProgram.bind();
+ mVertexBuffer->setBuffer();
+
+ S32 channel = gHeroRadianceGenProgram.enableTexture(LLShaderMgr::REFLECTION_PROBES, LLTexUnit::TT_CUBE_MAP_ARRAY);
+ mTexture->bind(channel);
+ gHeroRadianceGenProgram.uniform1i(sSourceIdx, sourceIdx);
+ gHeroRadianceGenProgram.uniform1f(LLShaderMgr::REFLECTION_PROBE_MAX_LOD, mMaxProbeLOD);
+ gHeroRadianceGenProgram.uniform1f(LLShaderMgr::REFLECTION_PROBE_STRENGTH, mHeroProbeStrength);
+
+ U32 res = mMipChain[0].getWidth();
+
+ for (int i = 0; i < mMipChain.size() / 4; ++i)
+ {
+ LL_PROFILE_GPU_ZONE("probe radiance gen");
+ static LLStaticHashedString sMipLevel("mipLevel");
+ static LLStaticHashedString sRoughness("roughness");
+ static LLStaticHashedString sWidth("u_width");
+ static LLStaticHashedString sStrength("probe_strength");
+
+ gHeroRadianceGenProgram.uniform1f(sRoughness, (F32) i / (F32) (mMipChain.size() - 1));
+ gHeroRadianceGenProgram.uniform1f(sMipLevel, i);
+ gHeroRadianceGenProgram.uniform1i(sWidth, mProbeResolution);
+ gHeroRadianceGenProgram.uniform1f(sStrength, 1);
+
+ for (int cf = 0; cf < 6; ++cf)
+ { // for each cube face
+ LLCoordFrame frame;
+ frame.lookAt(LLVector3(0, 0, 0), LLCubeMapArray::sClipToCubeLookVecs[cf], LLCubeMapArray::sClipToCubeUpVecs[cf]);
+
+ F32 mat[16];
+ frame.getOpenGLRotation(mat);
+ gGL.loadMatrix(mat);
+
+ mVertexBuffer->drawArrays(gGL.TRIANGLE_STRIP, 0, 4);
+
+ glCopyTexSubImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, i, 0, 0, probe->mCubeIndex * 6 + cf, 0, 0, res, res);
+ }
+
+ if (i != mMipChain.size() - 1)
+ {
+ res /= 2;
+ glViewport(0, 0, res, res);
+ }
+ }
+
+ gHeroRadianceGenProgram.unbind();
+ }
+
+ mMipChain[0].flush();
+ }
+}
+
+void LLHeroProbeManager::updateUniforms()
+{
+ if (!gPipeline.RenderMirrors)
+ {
+ return;
+ }
+
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
+
+ LLMatrix4a modelview;
+ modelview.loadu(gGLModelView);
+ LLVector4a oa; // scratch space for transformed origin
+ oa.set(0, 0, 0, 0);
+ mHeroData.heroProbeCount = 1;
+
+ if (mNearestHero != nullptr && !mNearestHero->isDead())
+ {
+ if (mNearestHero->getReflectionProbeIsBox())
+ {
+ LLVector3 s = mNearestHero->getScale().scaledVec(LLVector3(0.5f, 0.5f, 0.5f));
+ mProbes[0]->mRadius = s.magVec();
+ }
+ else
+ {
+ mProbes[0]->mRadius = mNearestHero->getScale().mV[0] * 0.5f;
+ }
+
+ modelview.affineTransform(mProbes[0]->mOrigin, oa);
+ mHeroData.heroShape = 0;
+ if (!mProbes[0]->getBox(mHeroData.heroBox))
+ {
+ mHeroData.heroShape = 1;
+ }
+
+ mHeroData.heroSphere.set(oa.getF32ptr());
+ mHeroData.heroSphere.mV[3] = mProbes[0]->mRadius;
+ }
+
+ mHeroData.heroMipCount = mMipChain.size();
+}
+
+void LLHeroProbeManager::renderDebug()
+{
+ gDebugProgram.bind();
+
+ for (auto& probe : mProbes)
+ {
+ renderReflectionProbe(probe);
+ }
+
+ gDebugProgram.unbind();
+}
+
+
+void LLHeroProbeManager::initReflectionMaps()
+{
+ U32 count = LL_MAX_HERO_PROBE_COUNT;
+
+ if ((mTexture.isNull() || mReflectionProbeCount != count || mReset) && LLPipeline::RenderMirrors)
+ {
+
+ if (mReset)
+ {
+ cleanup();
+ }
+
+ mReset = false;
+ mReflectionProbeCount = count;
+ mProbeResolution = gSavedSettings.getS32("RenderHeroProbeResolution");
+ mMaxProbeLOD = log2f(mProbeResolution) - 1.f; // number of mips - 1
+
+ mTexture = new LLCubeMapArray();
+
+ // store mReflectionProbeCount+2 cube maps, final two cube maps are used for render target and radiance map generation source)
+ mTexture->allocate(mProbeResolution, 3, mReflectionProbeCount + 2);
+
+ if (mDefaultProbe.isNull())
+ {
+ llassert(mProbes.empty()); // default probe MUST be the first probe created
+ mDefaultProbe = new LLReflectionMap();
+ mProbes.push_back(mDefaultProbe);
+ }
+
+ llassert(mProbes[0] == mDefaultProbe);
+
+ // For hero probes, we treat this as the main mirror probe.
+
+ mDefaultProbe->mCubeIndex = 0;
+ mDefaultProbe->mCubeArray = mTexture;
+ mDefaultProbe->mDistance = gSavedSettings.getF32("RenderHeroProbeDistance");
+ mDefaultProbe->mRadius = 4096.f;
+ mDefaultProbe->mProbeIndex = 0;
+ touch_default_probe(mDefaultProbe);
+
+ mProbes.push_back(mDefaultProbe);
+ }
+
+ if (mVertexBuffer.isNull())
+ {
+ U32 mask = LLVertexBuffer::MAP_VERTEX;
+ LLPointer<LLVertexBuffer> buff = new LLVertexBuffer(mask);
+ buff->allocateBuffer(4, 0);
+
+ LLStrider<LLVector3> v;
+
+ buff->getVertexStrider(v);
+
+ v[0] = LLVector3(-1, -1, -1);
+ v[1] = LLVector3(1, -1, -1);
+ v[2] = LLVector3(-1, 1, -1);
+ v[3] = LLVector3(1, 1, -1);
+
+ buff->unmapBuffer();
+
+ mVertexBuffer = buff;
+ }
+}
+
+void LLHeroProbeManager::cleanup()
+{
+ mVertexBuffer = nullptr;
+ mRenderTarget.release();
+ mHeroRenderTarget.release();
+
+ mMipChain.clear();
+
+ mTexture = nullptr;
+
+ mProbes.clear();
+
+ mReflectionMaps.clear();
+
+ mDefaultProbe = nullptr;
+ mUpdatingProbe = nullptr;
+ /*
+ */
+}
+
+void LLHeroProbeManager::doOcclusion()
+{
+ LLVector4a eye;
+ eye.load3(LLViewerCamera::instance().getOrigin().mV);
+
+ for (auto& probe : mProbes)
+ {
+ if (probe != nullptr && probe != mDefaultProbe)
+ {
+ probe->doOcclusion(eye);
+ }
+ }
+}
+
+void LLHeroProbeManager::reset()
+{
+ mReset = true;
+}
+
+bool LLHeroProbeManager::registerViewerObject(LLVOVolume* drawablep)
+{
+ llassert(drawablep != nullptr);
+
+ if (std::find(mHeroVOList.begin(), mHeroVOList.end(), drawablep) == mHeroVOList.end())
+ {
+ // Probe isn't in our list for consideration. Add it.
+ mHeroVOList.push_back(drawablep);
+ return true;
+ }
+
+ return false;
+}
+
+void LLHeroProbeManager::unregisterViewerObject(LLVOVolume* drawablep)
+{
+ std::vector<LLPointer<LLVOVolume>>::iterator found_itr = std::find(mHeroVOList.begin(), mHeroVOList.end(), drawablep);
+ if (found_itr != mHeroVOList.end())
+ {
+ mHeroVOList.erase(found_itr);
+ }
+}
diff --git a/indra/newview/llheroprobemanager.h b/indra/newview/llheroprobemanager.h
new file mode 100644
index 0000000000..d5e720e8e8
--- /dev/null
+++ b/indra/newview/llheroprobemanager.h
@@ -0,0 +1,156 @@
+/**
+ * @file llheroprobemanager.h
+ * @brief LLHeroProbeManager class declaration
+ *
+ * $LicenseInfo:firstyear=2022&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2022, 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$
+ */
+
+#pragma once
+
+#include "llreflectionmap.h"
+#include "llrendertarget.h"
+#include "llcubemaparray.h"
+#include "llcubemap.h"
+#include "lldrawable.h"
+
+class LLSpatialGroup;
+class LLViewerObject;
+
+// number of reflection probes to keep in vram
+#define LL_MAX_HERO_PROBE_COUNT 2
+
+struct HeroProbeData
+{
+ LLMatrix4 heroBox;
+ LLVector4 heroSphere;
+ GLint heroShape;
+ GLint heroMipCount;
+ GLint heroProbeCount;
+};
+
+class alignas(16) LLHeroProbeManager
+{
+ LL_ALIGN_NEW
+public:
+ enum class DetailLevel
+ {
+ STATIC_ONLY = 0,
+ STATIC_AND_DYNAMIC,
+ REALTIME = 2
+ };
+
+ // allocate an environment map of the given resolution
+ LLHeroProbeManager();
+ ~LLHeroProbeManager();
+
+ // release any GL state
+ void cleanup();
+
+ // maintain reflection probes
+ void update();
+
+ // debug display, called from llspatialpartition if reflection
+ // probe debug display is active
+ void renderDebug();
+
+ // call once at startup to allocate cubemap arrays
+ void initReflectionMaps();
+
+ // perform occlusion culling on all active reflection probes
+ void doOcclusion();
+
+ void reset();
+
+ bool registerViewerObject(LLVOVolume *drawablep);
+ void unregisterViewerObject(LLVOVolume* drawablep);
+
+ bool isMirrorPass() const { return mRenderingMirror; }
+
+ LLVector3 mMirrorPosition;
+ LLVector3 mMirrorNormal;
+ HeroProbeData mHeroData;
+
+private:
+ friend class LLPipeline;
+ friend class LLReflectionMapManager;
+
+ // update UBO used for rendering (call only once per render pipe flush)
+ void updateUniforms();
+
+ // bind UBO used for rendering
+
+ // render target for cube snapshots
+ // used to generate mipmaps without doing a copy-to-texture
+ LLRenderTarget mRenderTarget;
+
+ LLRenderTarget mHeroRenderTarget;
+
+ std::vector<LLRenderTarget> mMipChain;
+
+ // storage for reflection probe radiance maps (plus two scratch space cubemaps)
+ LLPointer<LLCubeMapArray> mTexture;
+
+ // vertex buffer for pushing verts to filter shaders
+ LLPointer<LLVertexBuffer> mVertexBuffer;
+
+ LLPlane mCurrentClipPlane;
+
+
+ // update the specified face of the specified probe
+ void updateProbeFace(LLReflectionMap* probe, U32 face, F32 near_clip);
+ void generateRadiance(LLReflectionMap *probe);
+
+ // list of active reflection maps
+ std::vector<LLPointer<LLReflectionMap>> mProbes;
+
+ // list of maps being used for rendering
+ std::vector<LLReflectionMap*> mReflectionMaps;
+
+ LLReflectionMap* mUpdatingProbe = nullptr;
+
+ LLPointer<LLReflectionMap> mDefaultProbe; // default reflection probe to fall back to for pixels with no probe influences (should always be at cube index 0)
+
+ // number of reflection probes to use for rendering
+ U32 mReflectionProbeCount;
+
+ // resolution of reflection probes
+ U32 mProbeResolution = 1024;
+
+ // maximum LoD of reflection probes (mip levels - 1)
+ F32 mMaxProbeLOD = 6.f;
+
+ F32 mHeroProbeStrength = 1.f;
+ bool mIsInTransition = false;
+
+ // if true, reset all probe render state on the next update (for teleports and sky changes)
+ bool mReset = false;
+
+ bool mRenderingMirror = false;
+ std::map<int, int> mFaceUpdateList;
+
+ U32 mCurrentProbeUpdateFrame = 0;
+
+ std::vector<LLPointer<LLVOVolume>> mHeroVOList;
+ LLPointer<LLVOVolume> mNearestHero;
+
+};
+
diff --git a/indra/newview/llhints.cpp b/indra/newview/llhints.cpp
index 7271376a3c..090222cf47 100644
--- a/indra/newview/llhints.cpp
+++ b/indra/newview/llhints.cpp
@@ -110,7 +110,7 @@ public:
LLHintPopup(const Params&);
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
void onClickClose()
{
@@ -180,7 +180,7 @@ LLHintPopup::LLHintPopup(const LLHintPopup::Params& p)
}
}
-BOOL LLHintPopup::postBuild()
+bool LLHintPopup::postBuild()
{
LLTextBox& hint_text = getChildRef<LLTextBox>("hint_text");
hint_text.setText(mNotification->getMessage());
@@ -193,7 +193,7 @@ BOOL LLHintPopup::postBuild()
reshape(getRect().getWidth(), getRect().getHeight() + delta_height);
hint_text.reshape(hint_text.getRect().getWidth(), hint_text.getRect().getHeight() + delta_height);
// hint_text.translate(0, -delta_height);
- return TRUE;
+ return true;
}
void LLHintPopup::draw()
diff --git a/indra/newview/llhudeffect.cpp b/indra/newview/llhudeffect.cpp
index eff5587610..eb57cc0d24 100644
--- a/indra/newview/llhudeffect.cpp
+++ b/indra/newview/llhudeffect.cpp
@@ -42,9 +42,9 @@ LLHUDEffect::LLHUDEffect(const U8 type)
mDuration(1.f),
mColor()
{
- mNeedsSendToSim = FALSE;
- mOriginatedHere = FALSE;
- mDead = FALSE;
+ mNeedsSendToSim = false;
+ mOriginatedHere = false;
+ mDead = false;
}
LLHUDEffect::~LLHUDEffect()
@@ -94,23 +94,23 @@ void LLHUDEffect::setDuration(const F32 duration)
mDuration = duration;
}
-void LLHUDEffect::setNeedsSendToSim(const BOOL send_to_sim)
+void LLHUDEffect::setNeedsSendToSim(const bool send_to_sim)
{
mNeedsSendToSim = send_to_sim;
}
-BOOL LLHUDEffect::getNeedsSendToSim() const
+bool LLHUDEffect::getNeedsSendToSim() const
{
return mNeedsSendToSim;
}
-void LLHUDEffect::setOriginatedHere(const BOOL orig_here)
+void LLHUDEffect::setOriginatedHere(const bool orig_here)
{
mOriginatedHere = orig_here;
}
-BOOL LLHUDEffect::getOriginatedHere() const
+bool LLHUDEffect::getOriginatedHere() const
{
return mOriginatedHere;
}
@@ -122,7 +122,7 @@ void LLHUDEffect::getIDType(LLMessageSystem *mesgsys, S32 blocknum, LLUUID &id,
mesgsys->getU8Fast(_PREHASH_Effect, _PREHASH_Type, type, blocknum);
}
-BOOL LLHUDEffect::isDead() const
+bool LLHUDEffect::isDead() const
{
return mDead;
}
diff --git a/indra/newview/llhudeffect.h b/indra/newview/llhudeffect.h
index 7c825e3f3d..809ccbcfc7 100644
--- a/indra/newview/llhudeffect.h
+++ b/indra/newview/llhudeffect.h
@@ -40,17 +40,17 @@ class LLMessageSystem;
class LLHUDEffect : public LLHUDObject
{
public:
- void setNeedsSendToSim(const BOOL send_to_sim);
- BOOL getNeedsSendToSim() const;
- void setOriginatedHere(const BOOL orig_here);
- BOOL getOriginatedHere() const;
+ void setNeedsSendToSim(const bool send_to_sim);
+ bool getNeedsSendToSim() const;
+ void setOriginatedHere(const bool orig_here);
+ bool getOriginatedHere() const;
void setDuration(const F32 duration);
void setColor(const LLColor4U &color);
void setID(const LLUUID &id);
const LLUUID &getID() const;
- BOOL isDead() const;
+ bool isDead() const;
friend class LLHUDManager;
protected:
@@ -70,8 +70,8 @@ protected:
F32 mDuration;
LLColor4U mColor;
- BOOL mNeedsSendToSim;
- BOOL mOriginatedHere;
+ bool mNeedsSendToSim;
+ bool mOriginatedHere;
};
#endif // LL_LLHUDEFFECT_H
diff --git a/indra/newview/llhudeffectbeam.cpp b/indra/newview/llhudeffectbeam.cpp
index d1d83e6e03..c42719b827 100644
--- a/indra/newview/llhudeffectbeam.cpp
+++ b/indra/newview/llhudeffectbeam.cpp
@@ -116,7 +116,7 @@ void LLHUDEffectBeam::packData(LLMessageSystem *mesgsys)
void LLHUDEffectBeam::unpackData(LLMessageSystem *mesgsys, S32 blocknum)
{
LL_ERRS() << "Got beam!" << LL_ENDL;
- BOOL use_target_object;
+ bool use_target_object;
LLVector3d new_target;
U8 packed_data[41];
diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp
index 0f230067bc..10ac42a7a0 100644
--- a/indra/newview/llhudeffectlookat.cpp
+++ b/indra/newview/llhudeffectlookat.cpp
@@ -42,7 +42,7 @@
#include "llxmltree.h"
-BOOL LLHUDEffectLookAt::sDebugLookAt = FALSE;
+bool LLHUDEffectLookAt::sDebugLookAt = false;
// packet layout
const S32 SOURCE_AVATAR = 0;
@@ -138,11 +138,11 @@ static LLAttentionSet
gGirlAttentions(GIRL_ATTS);
-static BOOL loadGender(LLXmlTreeNode* gender)
+static bool loadGender(LLXmlTreeNode* gender)
{
if( !gender)
{
- return FALSE;
+ return false;
}
std::string str;
gender->getAttributeString("name", str);
@@ -162,7 +162,7 @@ static BOOL loadGender(LLXmlTreeNode* gender)
else if(str == "select") attention = &attentions[LOOKAT_TARGET_SELECT];
else if(str == "focus") attention = &attentions[LOOKAT_TARGET_FOCUS];
else if(str == "mouselook") attention = &attentions[LOOKAT_TARGET_MOUSELOOK];
- else return FALSE;
+ else return false;
F32 priority, timeout;
attention_node->getAttributeF32("priority", priority);
@@ -171,30 +171,30 @@ static BOOL loadGender(LLXmlTreeNode* gender)
attention->mPriority = priority;
attention->mTimeout = timeout;
}
- return TRUE;
+ return true;
}
-static BOOL loadAttentions()
+static bool loadAttentions()
{
- static BOOL first_time = TRUE;
+ static bool first_time = true;
if( ! first_time)
{
- return TRUE; // maybe not ideal but otherwise it can continue to fail forever.
+ return true; // maybe not ideal but otherwise it can continue to fail forever.
}
- first_time = FALSE;
+ first_time = false;
std::string filename;
filename = gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,"attentions.xml");
LLXmlTree xml_tree;
- BOOL success = xml_tree.parseFile( filename, FALSE );
+ bool success = xml_tree.parseFile( filename, false );
if( !success )
{
- return FALSE;
+ return false;
}
LLXmlTreeNode* root = xml_tree.getRoot();
if( !root )
{
- return FALSE;
+ return false;
}
//-------------------------------------------------------------------------
@@ -203,7 +203,7 @@ static BOOL loadAttentions()
if( !root->hasName( "linden_attentions" ) )
{
LL_WARNS() << "Invalid linden_attentions file header: " << filename << LL_ENDL;
- return FALSE;
+ return false;
}
std::string version;
@@ -211,7 +211,7 @@ static BOOL loadAttentions()
if( !root->getFastAttributeString( version_string, version ) || (version != "1.0") )
{
LL_WARNS() << "Invalid linden_attentions file version: " << version << LL_ENDL;
- return FALSE;
+ return false;
}
//-------------------------------------------------------------------------
@@ -223,11 +223,11 @@ static BOOL loadAttentions()
{
if( !loadGender( child ) )
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
@@ -389,29 +389,29 @@ void LLHUDEffectLookAt::setTargetPosGlobal(const LLVector3d &target_pos_global)
// setLookAt()
// called by agent logic to set look at behavior locally, and propagate to sim
//-----------------------------------------------------------------------------
-BOOL LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *object, LLVector3 position)
+bool LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *object, LLVector3 position)
{
if (!mSourceObject)
{
- return FALSE;
+ return false;
}
if (target_type >= LOOKAT_NUM_TARGETS)
{
LL_WARNS() << "Bad target_type " << (int)target_type << " - ignoring." << LL_ENDL;
- return FALSE;
+ return false;
}
// must be same or higher priority than existing effect
if ((*mAttentions)[target_type].mPriority < (*mAttentions)[mTargetType].mPriority)
{
- return FALSE;
+ return false;
}
F32 current_time = mTimer.getElapsedTimeF32();
// type of lookat behavior or target object has changed
- BOOL lookAtChanged = (target_type != mTargetType) || (object != mTargetObject);
+ bool lookAtChanged = (target_type != mTargetType) || (object != mTargetObject);
// lookat position has moved a certain amount and we haven't just sent an update
lookAtChanged = lookAtChanged || ((dist_vec_squared(position, mLastSentOffsetGlobal) > MIN_DELTAPOS_FOR_UPDATE_SQUARED) &&
@@ -422,7 +422,7 @@ BOOL LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec
mLastSentOffsetGlobal = position;
F32 timeout = (*mAttentions)[target_type].mTimeout;
setDuration(timeout);
- setNeedsSendToSim(TRUE);
+ setNeedsSendToSim(true);
}
if (target_type == LOOKAT_TARGET_CLEAR)
@@ -445,7 +445,7 @@ BOOL LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec
update();
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
@@ -553,7 +553,7 @@ void LLHUDEffectLookAt::update()
{
clearLookAtTarget();
// look at timed out (only happens on own avatar), so tell everyone
- setNeedsSendToSim(TRUE);
+ setNeedsSendToSim(true);
}
}
@@ -610,7 +610,7 @@ bool LLHUDEffectLookAt::calcTargetPosition()
{
LLVOAvatar *target_av = (LLVOAvatar *)target_obj;
- BOOL looking_at_self = source_avatar->isSelf() && target_av->isSelf();
+ bool looking_at_self = source_avatar->isSelf() && target_av->isSelf();
// if selecting self, stare forward
if (looking_at_self && mTargetOffsetGlobal.magVecSquared() < MIN_TARGET_OFFSET_SQUARED)
diff --git a/indra/newview/llhudeffectlookat.h b/indra/newview/llhudeffectlookat.h
index fd057715b6..6d928213a4 100644
--- a/indra/newview/llhudeffectlookat.h
+++ b/indra/newview/llhudeffectlookat.h
@@ -57,7 +57,7 @@ public:
/*virtual*/ void markDead();
/*virtual*/ void setSourceObject(LLViewerObject* objectp);
- BOOL setLookAt(ELookAtType target_type, LLViewerObject *object, LLVector3 position);
+ bool setLookAt(ELookAtType target_type, LLViewerObject *object, LLVector3 position);
void clearLookAtTarget();
ELookAtType getLookAtType() { return mTargetType; }
@@ -79,7 +79,7 @@ protected:
void setTargetPosGlobal(const LLVector3d &target_pos_global);
public:
- static BOOL sDebugLookAt;
+ static bool sDebugLookAt;
private:
ELookAtType mTargetType;
diff --git a/indra/newview/llhudeffectpointat.cpp b/indra/newview/llhudeffectpointat.cpp
index dfa299528a..fa5e27a197 100644
--- a/indra/newview/llhudeffectpointat.cpp
+++ b/indra/newview/llhudeffectpointat.cpp
@@ -72,7 +72,7 @@ const S32 POINTAT_PRIORITIES[POINTAT_NUM_TARGETS] =
// statics
-BOOL LLHUDEffectPointAt::sDebugPointAt;
+bool LLHUDEffectPointAt::sDebugPointAt;
//-----------------------------------------------------------------------------
@@ -219,39 +219,39 @@ void LLHUDEffectPointAt::setTargetPosGlobal(const LLVector3d &target_pos_global)
// setPointAt()
// called by agent logic to set look at behavior locally, and propagate to sim
//-----------------------------------------------------------------------------
-BOOL LLHUDEffectPointAt::setPointAt(EPointAtType target_type, LLViewerObject *object, LLVector3 position)
+bool LLHUDEffectPointAt::setPointAt(EPointAtType target_type, LLViewerObject *object, LLVector3 position)
{
if (!mSourceObject)
{
- return FALSE;
+ return false;
}
if (target_type >= POINTAT_NUM_TARGETS)
{
LL_WARNS() << "Bad target_type " << (int)target_type << " - ignoring." << LL_ENDL;
- return FALSE;
+ return false;
}
// must be same or higher priority than existing effect
if (POINTAT_PRIORITIES[target_type] < POINTAT_PRIORITIES[mTargetType])
{
- return FALSE;
+ return false;
}
F32 current_time = mTimer.getElapsedTimeF32();
// type of pointat behavior or target object has changed
- BOOL targetTypeChanged = (target_type != mTargetType) ||
+ bool targetTypeChanged = (target_type != mTargetType) ||
(object != mTargetObject);
- BOOL targetPosChanged = (dist_vec_squared(position, mLastSentOffsetGlobal) > MIN_DELTAPOS_FOR_UPDATE_SQUARED) &&
+ bool targetPosChanged = (dist_vec_squared(position, mLastSentOffsetGlobal) > MIN_DELTAPOS_FOR_UPDATE_SQUARED) &&
((current_time - mLastSendTime) > (1.f / MAX_SENDS_PER_SEC));
if (targetTypeChanged || targetPosChanged)
{
mLastSentOffsetGlobal = position;
setDuration(POINTAT_TIMEOUTS[target_type]);
- setNeedsSendToSim(TRUE);
+ setNeedsSendToSim(true);
// LL_INFOS() << "Sending pointat data" << LL_ENDL;
}
@@ -278,7 +278,7 @@ BOOL LLHUDEffectPointAt::setPointAt(EPointAtType target_type, LLViewerObject *ob
update();
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
diff --git a/indra/newview/llhudeffectpointat.h b/indra/newview/llhudeffectpointat.h
index 6200b68cbc..8ce7b33c6f 100644
--- a/indra/newview/llhudeffectpointat.h
+++ b/indra/newview/llhudeffectpointat.h
@@ -50,7 +50,7 @@ public:
/*virtual*/ void markDead();
/*virtual*/ void setSourceObject(LLViewerObject* objectp);
- BOOL setPointAt(EPointAtType target_type, LLViewerObject *object, LLVector3 position);
+ bool setPointAt(EPointAtType target_type, LLViewerObject *object, LLVector3 position);
void clearPointAtTarget();
EPointAtType getPointAtType() { return mTargetType; }
@@ -70,7 +70,7 @@ protected:
bool calcTargetPosition();
void update();
public:
- static BOOL sDebugPointAt;
+ static bool sDebugPointAt;
private:
EPointAtType mTargetType;
LLVector3d mTargetOffsetGlobal;
diff --git a/indra/newview/llhudeffecttrail.cpp b/indra/newview/llhudeffecttrail.cpp
index 2ba8aa422b..509f298a7e 100644
--- a/indra/newview/llhudeffecttrail.cpp
+++ b/indra/newview/llhudeffecttrail.cpp
@@ -42,7 +42,7 @@
#include "llvoavatar.h"
#include "llworld.h"
-LLHUDEffectSpiral::LLHUDEffectSpiral(const U8 type) : LLHUDEffect(type), mbInit(FALSE)
+LLHUDEffectSpiral::LLHUDEffectSpiral(const U8 type) : LLHUDEffect(type), mbInit(false)
{
mKillTime = 10.f;
mVMag = 1.f;
@@ -167,7 +167,7 @@ void LLHUDEffectSpiral::triggerLocal()
{
mKillTime = mTimer.getElapsedTimeF32() + mDuration;
- BOOL show_beam = gSavedSettings.getBOOL("ShowSelectionBeam");
+ bool show_beam = gSavedSettings.getBOOL("ShowSelectionBeam");
LLColor4 color;
color.setVec(mColor);
@@ -247,7 +247,7 @@ void LLHUDEffectSpiral::triggerLocal()
}
}
- mbInit = TRUE;
+ mbInit = true;
}
void LLHUDEffectSpiral::setTargetObject(LLViewerObject *objp)
diff --git a/indra/newview/llhudeffecttrail.h b/indra/newview/llhudeffecttrail.h
index 6f5a328c63..102e42c975 100644
--- a/indra/newview/llhudeffecttrail.h
+++ b/indra/newview/llhudeffecttrail.h
@@ -76,7 +76,7 @@ private:
F32 mOffset[NUM_TRAIL_POINTS];
*/
- BOOL mbInit;
+ bool mbInit;
LLPointer<LLViewerPartSource> mPartSourcep;
F32 mKillTime;
diff --git a/indra/newview/llhudicon.cpp b/indra/newview/llhudicon.cpp
index 38be2b69fd..4ed2cd7db4 100644
--- a/indra/newview/llhudicon.cpp
+++ b/indra/newview/llhudicon.cpp
@@ -65,7 +65,7 @@ LLHUDIcon::LLHUDIcon(const U8 type) :
LLHUDObject(type),
mImagep(NULL),
mScale(0.1f),
- mHidden(FALSE)
+ mHidden(false)
{
sIconInstances.push_back(this);
}
@@ -186,15 +186,15 @@ void LLHUDIcon::markDead()
LLHUDObject::markDead();
}
-BOOL LLHUDIcon::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, LLVector4a* intersection)
+bool LLHUDIcon::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, LLVector4a* intersection)
{
if (mHidden)
- return FALSE;
+ return false;
if (mSourceObject.isNull() || mImagep.isNull())
{
markDead();
- return FALSE;
+ return false;
}
LLVector3 obj_position = mSourceObject->getRenderPosition();
@@ -233,7 +233,7 @@ BOOL LLHUDIcon::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
if (time_elapsed > MAX_VISIBLE_TIME)
{
markDead();
- return FALSE;
+ return false;
}
F32 image_aspect = (F32)mImagep->getFullWidth() / (F32)mImagep->getFullHeight() ;
@@ -272,10 +272,10 @@ BOOL LLHUDIcon::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
dir.mul(t);
intersection->setAdd(start, dir);
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
//static
@@ -312,7 +312,7 @@ void LLHUDIcon::updateAll()
}
//static
-BOOL LLHUDIcon::iconsNearby()
+bool LLHUDIcon::iconsNearby()
{
return !sIconInstances.empty();
}
diff --git a/indra/newview/llhudicon.h b/indra/newview/llhudicon.h
index 7f452b5c36..fa690668d5 100644
--- a/indra/newview/llhudicon.h
+++ b/indra/newview/llhudicon.h
@@ -62,12 +62,12 @@ public:
static void cleanupDeadIcons();
static S32 getNumInstances();
- static BOOL iconsNearby();
+ static bool iconsNearby();
- BOOL getHidden() const { return mHidden; }
- void setHidden( BOOL hide ) { mHidden = hide; }
+ bool getHidden() const { return mHidden; }
+ void setHidden( bool hide ) { mHidden = hide; }
- BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, LLVector4a* intersection);
+ bool lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, LLVector4a* intersection);
protected:
LLHUDIcon(const U8 type);
@@ -79,7 +79,7 @@ private:
LLFrameTimer mLifeTimer;
F32 mDistance;
F32 mScale;
- BOOL mHidden;
+ bool mHidden;
typedef std::vector<LLPointer<LLHUDIcon> > icon_instance_t;
static icon_instance_t sIconInstances;
diff --git a/indra/newview/llhudmanager.cpp b/indra/newview/llhudmanager.cpp
index 1f9b0f47b1..5a071cacf7 100644
--- a/indra/newview/llhudmanager.cpp
+++ b/indra/newview/llhudmanager.cpp
@@ -96,7 +96,7 @@ void LLHUDManager::sendEffects()
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_Effect);
hep->packData(msg);
- hep->setNeedsSendToSim(FALSE);
+ hep->setNeedsSendToSim(false);
gAgent.sendMessage();
}
}
@@ -125,7 +125,7 @@ void LLHUDManager::cleanupEffects()
}
}
-LLHUDEffect *LLHUDManager::createViewerEffect(const U8 type, BOOL send_to_sim, BOOL originated_here)
+LLHUDEffect *LLHUDManager::createViewerEffect(const U8 type, bool send_to_sim, bool originated_here)
{
// SJB: DO NOT USE addHUDObject!!! Not all LLHUDObjects are LLHUDEffects!
LLHUDEffect *hep = LLHUDObject::addHUDEffect(type);
@@ -191,7 +191,7 @@ void LLHUDManager::processViewerEffect(LLMessageSystem *mesgsys, void **user_dat
{
if (!effectp)
{
- effectp = LLHUDManager::getInstance()->createViewerEffect(effect_type, FALSE, FALSE);
+ effectp = LLHUDManager::getInstance()->createViewerEffect(effect_type, false, false);
}
if (effectp)
diff --git a/indra/newview/llhudmanager.h b/indra/newview/llhudmanager.h
index 7782739690..0c454dc4b9 100644
--- a/indra/newview/llhudmanager.h
+++ b/indra/newview/llhudmanager.h
@@ -40,7 +40,7 @@ class LLHUDManager : public LLSingleton<LLHUDManager>
~LLHUDManager();
public:
- LLHUDEffect *createViewerEffect(const U8 type, BOOL send_to_sim = TRUE, BOOL originated_here = TRUE);
+ LLHUDEffect *createViewerEffect(const U8 type, bool send_to_sim = true, bool originated_here = true);
void updateEffects();
void sendEffects();
diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp
index 5524bb7f09..90575ccda6 100644
--- a/indra/newview/llhudnametag.cpp
+++ b/indra/newview/llhudnametag.cpp
@@ -65,7 +65,7 @@ const F32 LOD_2_SCREEN_COVERAGE = 0.40f;
std::set<LLPointer<LLHUDNameTag> > LLHUDNameTag::sTextObjects;
std::vector<LLPointer<LLHUDNameTag> > LLHUDNameTag::sVisibleTextObjects;
-BOOL LLHUDNameTag::sDisplayText = TRUE ;
+bool LLHUDNameTag::sDisplayText = true ;
const F32 LLHUDNameTag::NAMETAG_MAX_WIDTH = 298.f;
const F32 LLHUDNameTag::HUD_TEXT_MAX_WIDTH = 190.f;
@@ -77,13 +77,13 @@ bool llhudnametag_further_away::operator()(const LLPointer<LLHUDNameTag>& lhs, c
LLHUDNameTag::LLHUDNameTag(const U8 type)
: LLHUDObject(type),
- mDoFade(TRUE),
+ mDoFade(true),
mFadeDistance(8.f),
mFadeRange(4.f),
mLastDistance(0.f),
- mZCompare(TRUE),
- mVisibleOffScreen(FALSE),
- mOffscreen(FALSE),
+ mZCompare(true),
+ mVisibleOffScreen(false),
+ mOffscreen(false),
mColor(1.f, 1.f, 1.f, 1.f),
// mScale(),
mWidth(0.f),
@@ -102,7 +102,7 @@ LLHUDNameTag::LLHUDNameTag(const U8 type)
mTextAlignment(ALIGN_TEXT_CENTER),
mVertAlignment(ALIGN_VERT_CENTER),
mLOD(0),
- mHidden(FALSE)
+ mHidden(false)
{
LLPointer<LLHUDNameTag> ptr(this);
sTextObjects.insert(ptr);
@@ -116,17 +116,17 @@ LLHUDNameTag::~LLHUDNameTag()
}
-BOOL LLHUDNameTag::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, LLVector4a& intersection, BOOL debug_render)
+bool LLHUDNameTag::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, LLVector4a& intersection, bool debug_render)
{
if (!mVisible || mHidden)
{
- return FALSE;
+ return false;
}
// don't pick text that isn't bound to a viewerobject
if (!mSourceObject || mSourceObject->mDrawable.isNull())
{
- return FALSE;
+ return false;
}
F32 alpha_factor = 1.f;
@@ -141,7 +141,7 @@ BOOL LLHUDNameTag::lineSegmentIntersect(const LLVector4a& start, const LLVector4
}
if (text_color.mV[3] < 0.01f)
{
- return FALSE;
+ return false;
}
mOffsetY = lltrunc(mHeight * ((mVertAlignment == ALIGN_VERT_CENTER) ? 0.5f : 1.f));
@@ -176,7 +176,7 @@ BOOL LLHUDNameTag::lineSegmentIntersect(const LLVector4a& start, const LLVector4
LLVector3 height_vec = mHeight * y_pixel_vec;
LLCoordGL screen_pos;
- LLViewerCamera::getInstance()->projectPosAgentToScreen(position, screen_pos, FALSE);
+ LLViewerCamera::getInstance()->projectPosAgentToScreen(position, screen_pos, false);
LLVector2 screen_offset;
screen_offset = updateScreenPos(mPositionOffset);
@@ -216,11 +216,11 @@ BOOL LLHUDNameTag::lineSegmentIntersect(const LLVector4a& start, const LLVector4
{
dir.mul(t);
intersection.setAdd(start, dir);
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
void LLHUDNameTag::render()
@@ -230,11 +230,11 @@ void LLHUDNameTag::render()
{
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
//LLGLDisable gls_stencil(GL_STENCIL_TEST);
- renderText(FALSE);
+ renderText(false);
}
}
-void LLHUDNameTag::renderText(BOOL for_select)
+void LLHUDNameTag::renderText(bool for_select)
{
if (!mVisible || mHidden)
{
@@ -257,7 +257,7 @@ void LLHUDNameTag::renderText(BOOL for_select)
gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
}
- LLGLState gls_blend(GL_BLEND, for_select ? FALSE : TRUE);
+ LLGLState gls_blend(GL_BLEND, for_select ? false : true);
LLColor4 shadow_color(0.f, 0.f, 0.f, 1.f);
F32 alpha_factor = 1.f;
@@ -296,7 +296,7 @@ void LLHUDNameTag::renderText(BOOL for_select)
mRadius = (width_vec + height_vec).magVec() * 0.5f;
LLCoordGL screen_pos;
- LLViewerCamera::getInstance()->projectPosAgentToScreen(mPositionAgent, screen_pos, FALSE);
+ LLViewerCamera::getInstance()->projectPosAgentToScreen(mPositionAgent, screen_pos, false);
LLVector2 screen_offset = updateScreenPos(mPositionOffset);
@@ -342,7 +342,7 @@ void LLHUDNameTag::renderText(BOOL for_select)
LLColor4 label_color(0.f, 0.f, 0.f, 1.f);
label_color.mV[VALPHA] = alpha_factor;
- hud_render_text(segment_iter->getText(), render_position, *fontp, segment_iter->mStyle, LLFontGL::NO_SHADOW, x_offset, y_offset, label_color, FALSE);
+ hud_render_text(segment_iter->getText(), render_position, *fontp, segment_iter->mStyle, LLFontGL::NO_SHADOW, x_offset, y_offset, label_color, false);
}
}
@@ -387,7 +387,7 @@ void LLHUDNameTag::renderText(BOOL for_select)
text_color = segment_iter->mColor;
text_color.mV[VALPHA] *= alpha_factor;
- hud_render_text(segment_iter->getText(), render_position, *fontp, style, shadow, x_offset, y_offset, text_color, FALSE);
+ hud_render_text(segment_iter->getText(), render_position, *fontp, style, shadow, x_offset, y_offset, text_color, false);
}
}
/// Reset the default color to white. The renderer expects this to be the default.
@@ -522,7 +522,7 @@ void LLHUDNameTag::addLabel(const std::string& label_utf8, F32 max_pixels)
}
}
-void LLHUDNameTag::setZCompare(const BOOL zcompare)
+void LLHUDNameTag::setZCompare(const bool zcompare)
{
mZCompare = zcompare;
}
@@ -554,7 +554,7 @@ void LLHUDNameTag::setAlpha(F32 alpha)
}
-void LLHUDNameTag::setDoFade(const BOOL do_fade)
+void LLHUDNameTag::setDoFade(const bool do_fade)
{
mDoFade = do_fade;
}
@@ -571,7 +571,7 @@ void LLHUDNameTag::updateVisibility()
if (!mSourceObject)
{
//LL_WARNS() << "LLHUDNameTag::updateScreenPos -- mSourceObject is NULL!" << LL_ENDL;
- mVisible = TRUE;
+ mVisible = true;
sVisibleTextObjects.push_back(LLPointer<LLHUDNameTag> (this));
return;
}
@@ -579,7 +579,7 @@ void LLHUDNameTag::updateVisibility()
// Not visible if parent object is dead
if (mSourceObject->isDead())
{
- mVisible = FALSE;
+ mVisible = false;
return;
}
@@ -590,7 +590,7 @@ void LLHUDNameTag::updateVisibility()
if (dir_from_camera * LLViewerCamera::getInstance()->getAtAxis() <= 0.f)
{ //text is behind camera, don't render
- mVisible = FALSE;
+ mVisible = false;
return;
}
@@ -607,7 +607,7 @@ void LLHUDNameTag::updateVisibility()
if (mLOD >= 3 || !mTextSegments.size() || (mDoFade && (mLastDistance > mFadeDistance + mFadeRange)))
{
- mVisible = FALSE;
+ mVisible = false;
return;
}
@@ -620,21 +620,21 @@ void LLHUDNameTag::updateVisibility()
(x_pixel_vec * mPositionOffset.mV[VX]) +
(y_pixel_vec * mPositionOffset.mV[VY]);
- mOffscreen = FALSE;
+ mOffscreen = false;
if (!LLViewerCamera::getInstance()->sphereInFrustum(render_position, mRadius))
{
if (!mVisibleOffScreen)
{
- mVisible = FALSE;
+ mVisible = false;
return;
}
else
{
- mOffscreen = TRUE;
+ mOffscreen = true;
}
}
- mVisible = TRUE;
+ mVisible = true;
sVisibleTextObjects.push_back(LLPointer<LLHUDNameTag> (this));
}
@@ -646,7 +646,7 @@ LLVector2 LLHUDNameTag::updateScreenPos(LLVector2 &offset)
LLVector3 y_pixel_vec;
LLViewerCamera::getInstance()->getPixelVectors(mPositionAgent, y_pixel_vec, x_pixel_vec);
LLVector3 world_pos = mPositionAgent + (offset.mV[VX] * x_pixel_vec) + (offset.mV[VY] * y_pixel_vec);
- if (!LLViewerCamera::getInstance()->projectPosAgentToScreen(world_pos, screen_pos, FALSE) && mVisibleOffScreen)
+ if (!LLViewerCamera::getInstance()->projectPosAgentToScreen(world_pos, screen_pos, false) && mVisibleOffScreen)
{
// bubble off-screen, so find a spot for it along screen edge
LLViewerCamera::getInstance()->projectPosAgentToScreenEdge(world_pos, screen_pos);
diff --git a/indra/newview/llhudnametag.h b/indra/newview/llhudnametag.h
index 592ab5518f..00eda81b4c 100644
--- a/indra/newview/llhudnametag.h
+++ b/indra/newview/llhudnametag.h
@@ -111,9 +111,9 @@ public:
void setFont(const LLFontGL* font);
void setColor(const LLColor4 &color);
void setAlpha(F32 alpha);
- void setZCompare(const BOOL zcompare);
- void setDoFade(const BOOL do_fade);
- void setVisibleOffScreen(BOOL visible) { mVisibleOffScreen = visible; }
+ void setZCompare(const bool zcompare);
+ void setDoFade(const bool do_fade);
+ void setVisibleOffScreen(bool visible) { mVisibleOffScreen = visible; }
// mMaxLines of -1 means unlimited lines.
void setMaxLines(S32 max_lines) { mMaxLines = max_lines; }
@@ -128,37 +128,37 @@ public:
friend class LLHUDObject;
/*virtual*/ F32 getDistance() const { return mLastDistance; }
S32 getLOD() const { return mLOD; }
- BOOL getVisible() const { return mVisible; }
- BOOL getHidden() const { return mHidden; }
- void setHidden( BOOL hide ) { mHidden = hide; }
+ bool getVisible() const { return mVisible; }
+ bool getHidden() const { return mHidden; }
+ void setHidden( bool hide ) { mHidden = hide; }
void shift(const LLVector3& offset);
F32 getWorldHeight() const;
- BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, LLVector4a& intersection, BOOL debug_render = FALSE);
+ bool lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, LLVector4a& intersection, bool debug_render = false);
static void shiftAll(const LLVector3& offset);
static void addPickable(std::set<LLViewerObject*> &pick_list);
static void reshape();
- static void setDisplayText(BOOL flag) { sDisplayText = flag ; }
+ static void setDisplayText(bool flag) { sDisplayText = flag ; }
protected:
LLHUDNameTag(const U8 type);
/*virtual*/ void render();
- void renderText(BOOL for_select);
+ void renderText(bool for_select);
static void updateAll();
void setLOD(S32 lod);
S32 getMaxLines();
private:
~LLHUDNameTag();
- BOOL mDoFade;
+ bool mDoFade;
F32 mFadeRange;
F32 mFadeDistance;
F32 mLastDistance;
- BOOL mZCompare;
- BOOL mVisibleOffScreen;
- BOOL mOffscreen;
+ bool mZCompare;
+ bool mVisibleOffScreen;
+ bool mOffscreen;
LLColor4 mColor;
// LLVector3 mScale;
F32 mWidth;
@@ -180,11 +180,11 @@ private:
ETextAlignment mTextAlignment;
EVertAlignment mVertAlignment;
S32 mLOD;
- BOOL mHidden;
+ bool mHidden;
LLPointer<LLUIImage> mRoundedRectImgp;
LLPointer<LLUIImage> mRoundedRectTopImgp;
- static BOOL sDisplayText ;
+ static bool sDisplayText ;
static std::set<LLPointer<LLHUDNameTag> > sTextObjects;
static std::vector<LLPointer<LLHUDNameTag> > sVisibleTextObjects;
// static std::vector<LLPointer<LLHUDNameTag> > sVisibleHUDTextObjects;
diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp
index 292045f25d..08a763bcec 100644
--- a/indra/newview/llhudobject.cpp
+++ b/indra/newview/llhudobject.cpp
@@ -61,9 +61,9 @@ LLHUDObject::LLHUDObject(const U8 type) :
mSourceObject(NULL),
mTargetObject(NULL)
{
- mVisible = TRUE;
+ mVisible = true;
mType = type;
- mDead = FALSE;
+ mDead = false;
}
LLHUDObject::~LLHUDObject()
@@ -72,8 +72,8 @@ LLHUDObject::~LLHUDObject()
void LLHUDObject::markDead()
{
- mVisible = FALSE;
- mDead = TRUE;
+ mVisible = false;
+ mDead = true;
mSourceObject = NULL;
mTargetObject = NULL;
}
diff --git a/indra/newview/llhudobject.h b/indra/newview/llhudobject.h
index ce128519ea..d6b355e336 100644
--- a/indra/newview/llhudobject.h
+++ b/indra/newview/llhudobject.h
@@ -58,7 +58,7 @@ public:
void setPositionGlobal(const LLVector3d &position_global);
void setPositionAgent(const LLVector3 &position_agent);
- BOOL isVisible() const { return mVisible; }
+ bool isVisible() const { return mVisible; }
U8 getType() const { return mType; }
@@ -109,8 +109,8 @@ protected:
protected:
U8 mType;
- BOOL mDead;
- BOOL mVisible;
+ bool mDead;
+ bool mVisible;
LLVector3d mPositionGlobal;
LLPointer<LLViewerObject> mSourceObject;
LLPointer<LLViewerObject> mTargetObject;
diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp
index c1f17c9d33..a1e8560a6e 100644
--- a/indra/newview/llhudrender.cpp
+++ b/indra/newview/llhudrender.cpp
@@ -44,7 +44,7 @@ void hud_render_utf8text(const std::string &str, const LLVector3 &pos_agent,
const LLFontGL::ShadowType shadow,
const F32 x_offset, const F32 y_offset,
const LLColor4& color,
- const BOOL orthographic)
+ const bool orthographic)
{
LLWString wstr(utf8str_to_wstring(str));
hud_render_text(wstr, pos_agent, font, style, shadow, x_offset, y_offset, color, orthographic);
@@ -56,7 +56,7 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent,
const LLFontGL::ShadowType shadow,
const F32 x_offset, const F32 y_offset,
const LLColor4& color,
- const BOOL orthographic)
+ const bool orthographic)
{
LLViewerCamera* camera = LLViewerCamera::getInstance();
// Do cheap plane culling
diff --git a/indra/newview/llhudrender.h b/indra/newview/llhudrender.h
index b541cd5036..4d8f36c25c 100644
--- a/indra/newview/llhudrender.h
+++ b/indra/newview/llhudrender.h
@@ -41,7 +41,7 @@ void hud_render_text(const LLWString &wstr,
const F32 x_offset,
const F32 y_offset,
const LLColor4& color,
- const BOOL orthographic);
+ const bool orthographic);
// Legacy, slower
void hud_render_utf8text(const std::string &str,
@@ -52,7 +52,7 @@ void hud_render_utf8text(const std::string &str,
const F32 x_offset,
const F32 y_offset,
const LLColor4& color,
- const BOOL orthographic);
+ const bool orthographic);
#endif //LL_LLHUDRENDER_H
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp
index 0b0de18534..8bbed4fc6d 100644
--- a/indra/newview/llhudtext.cpp
+++ b/indra/newview/llhudtext.cpp
@@ -58,7 +58,7 @@ const F32 MAX_DRAW_DISTANCE = 300.f;
std::set<LLPointer<LLHUDText> > LLHUDText::sTextObjects;
std::vector<LLPointer<LLHUDText> > LLHUDText::sVisibleTextObjects;
std::vector<LLPointer<LLHUDText> > LLHUDText::sVisibleHUDTextObjects;
-BOOL LLHUDText::sDisplayText = TRUE ;
+bool LLHUDText::sDisplayText = true ;
bool lltextobject_further_away::operator()(const LLPointer<LLHUDText>& lhs, const LLPointer<LLHUDText>& rhs) const
{
@@ -68,8 +68,8 @@ bool lltextobject_further_away::operator()(const LLPointer<LLHUDText>& lhs, cons
LLHUDText::LLHUDText(const U8 type) :
LLHUDObject(type),
- mOnHUDAttachment(FALSE),
-// mVisibleOffScreen(FALSE),
+ mOnHUDAttachment(false),
+// mVisibleOffScreen(false),
mWidth(0.f),
mHeight(0.f),
mFontp(LLFontGL::getFontSansSerifSmall()),
@@ -80,14 +80,14 @@ LLHUDText::LLHUDText(const U8 type) :
mTextAlignment(ALIGN_TEXT_CENTER),
mVertAlignment(ALIGN_VERT_CENTER),
// mLOD(0),
- mHidden(FALSE)
+ mHidden(false)
{
mColor = LLColor4(1.f, 1.f, 1.f, 1.f);
- mDoFade = TRUE;
+ mDoFade = true;
mFadeDistance = 8.f;
mFadeRange = 4.f;
- mZCompare = TRUE;
- mOffscreen = FALSE;
+ mZCompare = true;
+ mOffscreen = false;
mRadius = 0.1f;
LLPointer<LLHUDText> ptr(this);
sTextObjects.insert(ptr);
@@ -116,7 +116,7 @@ void LLHUDText::renderText()
gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
- LLGLState gls_blend(GL_BLEND, TRUE);
+ LLGLState gls_blend(GL_BLEND, true);
LLColor4 shadow_color(0.f, 0.f, 0.f, 1.f);
F32 alpha_factor = 1.f;
@@ -285,7 +285,7 @@ void LLHUDText::addLine(const std::string &text_utf8,
}
}
-void LLHUDText::setZCompare(const BOOL zcompare)
+void LLHUDText::setZCompare(const bool zcompare)
{
mZCompare = zcompare;
}
@@ -317,7 +317,7 @@ void LLHUDText::setAlpha(F32 alpha)
}
-void LLHUDText::setDoFade(const BOOL do_fade)
+void LLHUDText::setDoFade(const bool do_fade)
{
mDoFade = do_fade;
}
@@ -334,7 +334,7 @@ void LLHUDText::updateVisibility()
if (!mSourceObject)
{
// Beacons
- mVisible = TRUE;
+ mVisible = true;
if (mOnHUDAttachment)
{
sVisibleHUDTextObjects.push_back(LLPointer<LLHUDText> (this));
@@ -349,14 +349,14 @@ void LLHUDText::updateVisibility()
// Not visible if parent object is dead
if (mSourceObject->isDead())
{
- mVisible = FALSE;
+ mVisible = false;
return;
}
// for now, all text on hud objects is visible
if (mOnHUDAttachment)
{
- mVisible = TRUE;
+ mVisible = true;
sVisibleHUDTextObjects.push_back(LLPointer<LLHUDText> (this));
mLastDistance = mPositionAgent.mV[VX];
return;
@@ -369,7 +369,7 @@ void LLHUDText::updateVisibility()
if (dir_from_camera * LLViewerCamera::getInstance()->getAtAxis() <= 0.f)
{ //text is behind camera, don't render
- mVisible = FALSE;
+ mVisible = false;
return;
}
@@ -386,7 +386,7 @@ void LLHUDText::updateVisibility()
if (!mTextSegments.size() || (mDoFade && (mLastDistance > mFadeDistance + mFadeRange)))
{
- mVisible = FALSE;
+ mVisible = false;
return;
}
@@ -407,7 +407,7 @@ void LLHUDText::updateVisibility()
if(last_distance_center > max_draw_distance)
{
- mVisible = FALSE;
+ mVisible = false;
return;
}
@@ -421,21 +421,21 @@ void LLHUDText::updateVisibility()
(x_pixel_vec * mPositionOffset.mV[VX]) +
(y_pixel_vec * mPositionOffset.mV[VY]);
- mOffscreen = FALSE;
+ mOffscreen = false;
if (!LLViewerCamera::getInstance()->sphereInFrustum(render_position, mRadius))
{
// if (!mVisibleOffScreen)
// {
- mVisible = FALSE;
+ mVisible = false;
return;
// }
// else
// {
-// mOffscreen = TRUE;
+// mOffscreen = true;
// }
}
- mVisible = TRUE;
+ mVisible = true;
sVisibleTextObjects.push_back(LLPointer<LLHUDText> (this));
}
@@ -447,7 +447,7 @@ LLVector2 LLHUDText::updateScreenPos(LLVector2 &offset)
LLVector3 y_pixel_vec;
LLViewerCamera::getInstance()->getPixelVectors(mPositionAgent, y_pixel_vec, x_pixel_vec);
// LLVector3 world_pos = mPositionAgent + (offset.mV[VX] * x_pixel_vec) + (offset.mV[VY] * y_pixel_vec);
-// if (!LLViewerCamera::getInstance()->projectPosAgentToScreen(world_pos, screen_pos, FALSE) && mVisibleOffScreen)
+// if (!LLViewerCamera::getInstance()->projectPosAgentToScreen(world_pos, screen_pos, false) && mVisibleOffScreen)
// {
// // bubble off-screen, so find a spot for it along screen edge
// LLViewerCamera::getInstance()->projectPosAgentToScreenEdge(world_pos, screen_pos);
diff --git a/indra/newview/llhudtext.h b/indra/newview/llhudtext.h
index 36015d51f0..116d2e50fd 100644
--- a/indra/newview/llhudtext.h
+++ b/indra/newview/llhudtext.h
@@ -97,9 +97,9 @@ public:
void setFont(const LLFontGL* font);
void setColor(const LLColor4 &color);
void setAlpha(F32 alpha);
- void setZCompare(const BOOL zcompare);
- void setDoFade(const BOOL do_fade);
-// void setVisibleOffScreen(BOOL visible) { mVisibleOffScreen = visible; }
+ void setZCompare(const bool zcompare);
+ void setDoFade(const bool do_fade);
+// void setVisibleOffScreen(bool visible) { mVisibleOffScreen = visible; }
// mMaxLines of -1 means unlimited lines.
void setMaxLines(S32 max_lines) { mMaxLines = max_lines; }
@@ -113,16 +113,16 @@ public:
/*virtual*/ void markDead();
friend class LLHUDObject;
/*virtual*/ F32 getDistance() const { return mLastDistance; }
- BOOL getVisible() { return mVisible; }
- BOOL getHidden() const { return mHidden; }
- void setHidden( BOOL hide ) { mHidden = hide; }
- void setOnHUDAttachment(BOOL on_hud) { mOnHUDAttachment = on_hud; }
+ bool getVisible() { return mVisible; }
+ bool getHidden() const { return mHidden; }
+ void setHidden( bool hide ) { mHidden = hide; }
+ void setOnHUDAttachment(bool on_hud) { mOnHUDAttachment = on_hud; }
void shift(const LLVector3& offset);
static void shiftAll(const LLVector3& offset);
static void renderAllHUD();
static void reshape();
- static void setDisplayText(BOOL flag) { sDisplayText = flag ; }
+ static void setDisplayText(bool flag) { sDisplayText = flag ; }
protected:
LLHUDText(const U8 type);
@@ -134,14 +134,14 @@ protected:
private:
~LLHUDText();
- BOOL mOnHUDAttachment;
- BOOL mDoFade;
+ bool mOnHUDAttachment;
+ bool mDoFade;
F32 mFadeRange;
F32 mFadeDistance;
F32 mLastDistance;
- BOOL mZCompare;
-// BOOL mVisibleOffScreen;
- BOOL mOffscreen;
+ bool mZCompare;
+// bool mVisibleOffScreen;
+ bool mOffscreen;
LLColor4 mColor;
LLVector3 mScale;
F32 mWidth;
@@ -160,9 +160,9 @@ private:
std::vector<LLHUDTextSegment> mTextSegments;
ETextAlignment mTextAlignment;
EVertAlignment mVertAlignment;
- BOOL mHidden;
+ bool mHidden;
- static BOOL sDisplayText ;
+ static bool sDisplayText ;
static std::set<LLPointer<LLHUDText> > sTextObjects;
static std::vector<LLPointer<LLHUDText> > sVisibleTextObjects;
static std::vector<LLPointer<LLHUDText> > sVisibleHUDTextObjects;
diff --git a/indra/newview/llhudview.cpp b/indra/newview/llhudview.cpp
index cead4dbce6..e30d5e8759 100644
--- a/indra/newview/llhudview.cpp
+++ b/indra/newview/llhudview.cpp
@@ -62,11 +62,11 @@ void LLHUDView::draw()
}
/*virtual*/
-BOOL LLHUDView::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLHUDView::handleMouseDown(S32 x, S32 y, MASK mask)
{
if (LLTracker::handleMouseDown(x, y))
{
- return TRUE;
+ return true;
}
return LLView::handleMouseDown(x, y, mask);
}
diff --git a/indra/newview/llhudview.h b/indra/newview/llhudview.h
index 6689554706..24662bbd17 100644
--- a/indra/newview/llhudview.h
+++ b/indra/newview/llhudview.h
@@ -42,7 +42,7 @@ public:
virtual void draw();
protected:
- /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask);
};
extern LLHUDView *gHUDView;
diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp
deleted file mode 100644
index c194dc05b0..0000000000
--- a/indra/newview/llimpanel.cpp
+++ /dev/null
@@ -1,978 +0,0 @@
-/**
- * @file llimpanel.cpp
- * @brief LLIMPanel class definition
- *
- * $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 "llimpanel.h"
-
-#include "indra_constants.h"
-#include "llfloaterreg.h"
-#include "llfocusmgr.h"
-#include "llfontgl.h"
-#include "llrect.h"
-#include "llerror.h"
-#include "llmultifloater.h"
-#include "llstring.h"
-#include "message.h"
-#include "lltextbox.h"
-
-#include "llagent.h"
-#include "llbutton.h"
-#include "llcallingcard.h"
-#include "llchannelmanager.h"
-#include "llchat.h"
-#include "llchiclet.h"
-#include "llconsole.h"
-#include "llgroupactions.h"
-#include "llfloater.h"
-#include "llfloateractivespeakers.h"
-#include "llavataractions.h"
-#include "llinventory.h"
-#include "llinventorymodel.h"
-#include "llfloaterinventory.h"
-#include "lliconctrl.h"
-#include "llkeyboard.h"
-#include "lllineeditor.h"
-#include "llpanelimcontrolpanel.h"
-#include "llrecentpeople.h"
-#include "llresmgr.h"
-#include "lltooldraganddrop.h"
-#include "lltrans.h"
-#include "lltabcontainer.h"
-#include "llviewertexteditor.h"
-#include "llviewermessage.h"
-#include "llviewerstats.h"
-#include "llviewercontrol.h"
-#include "lluictrlfactory.h"
-#include "llviewerwindow.h"
-#include "llvoicechannel.h"
-#include "lllogchat.h"
-#include "llweb.h"
-#include "llhttpclient.h"
-#include "llmutelist.h"
-#include "llstylemap.h"
-#include "llappviewer.h"
-
-//
-// Constants
-//
-const S32 LINE_HEIGHT = 16;
-const S32 MIN_WIDTH = 200;
-const S32 MIN_HEIGHT = 130;
-
-//
-// Statics
-//
-//
-static std::string sTitleString = "Instant Message with [NAME]";
-static std::string sTypingStartString = "[NAME]: ...";
-static std::string sSessionStartString = "Starting session with [NAME] please wait.";
-
-
-//
-// LLFloaterIMPanel
-//
-
-LLFloaterIMPanel::LLFloaterIMPanel(const std::string& session_label,
- const LLUUID& session_id,
- const LLUUID& other_participant_id,
- const std::vector<LLUUID>& ids,
- EInstantMessage dialog)
-: LLFloater(session_id),
- mInputEditor(NULL),
- mHistoryEditor(NULL),
- mSessionUUID(session_id),
- mSessionLabel(session_label),
- mSessionInitialized(FALSE),
- mSessionStartMsgPos(0),
- mOtherParticipantUUID(other_participant_id),
- mDialog(dialog),
- mSessionInitialTargetIDs(ids),
- mTyping(FALSE),
- mOtherTyping(FALSE),
- mTypingLineStartIndex(0),
- mSentTypingState(TRUE),
- mNumUnreadMessages(0),
- mShowSpeakersOnConnect(TRUE),
- mTextIMPossible(TRUE),
- mProfileButtonEnabled(TRUE),
- mCallBackEnabled(TRUE),
- mSpeakerPanel(NULL),
- mFirstKeystrokeTimer(),
- mLastKeystrokeTimer()
-{
- std::string xml_filename;
- switch(mDialog)
- {
- case IM_SESSION_GROUP_START:
- mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, this);
- xml_filename = "floater_instant_message_group.xml";
- break;
- case IM_SESSION_INVITE:
- mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, this);
- if (gAgent.isInGroup(mSessionUUID))
- {
- xml_filename = "floater_instant_message_group.xml";
- }
- else // must be invite to ad hoc IM
- {
- xml_filename = "floater_instant_message_ad_hoc.xml";
- }
- break;
- case IM_SESSION_P2P_INVITE:
- xml_filename = "floater_instant_message.xml";
- break;
- case IM_SESSION_CONFERENCE_START:
- mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, this);
- xml_filename = "floater_instant_message_ad_hoc.xml";
- break;
- // just received text from another user
- case IM_NOTHING_SPECIAL:
-
- xml_filename = "floater_instant_message.xml";
-
- mTextIMPossible = LLVoiceClient::getInstance()->isSessionTextIMPossible(mSessionUUID);
- mProfileButtonEnabled = LLVoiceClient::getInstance()->isParticipantAvatar(mSessionUUID);
- mCallBackEnabled = LLVoiceClient::getInstance()->isSessionCallBackPossible(mSessionUUID);
- break;
- default:
- LL_WARNS() << "Unknown session type" << LL_ENDL;
- xml_filename = "floater_instant_message.xml";
- break;
- }
-
- LLUICtrlFactory::getInstance()->buildFloater(this, xml_filename, NULL);
-
- setTitle(mSessionLabel);
- mInputEditor->setMaxTextLength(DB_IM_MSG_STR_LEN);
- // enable line history support for instant message bar
- mInputEditor->setEnableLineHistory(TRUE);
-
- //*TODO we probably need the same "awaiting message" thing in LLFloaterIMSession
- LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(mSessionUUID);
- if (!im_session)
- {
- llerror("im session with id " + mSessionUUID.asString() + " does not exist!", 0);
- return;
- }
-
- mSessionInitialized = im_session->mSessionInitialized;
- if (!mSessionInitialized)
- {
- //locally echo a little "starting session" message
- LLUIString session_start = sSessionStartString;
-
- session_start.setArg("[NAME]", getTitle());
- mSessionStartMsgPos =
- mHistoryEditor->getWText().length();
-
- addHistoryLine(
- session_start,
- LLUIColorTable::instance().getColor("SystemChatColor"),
- false);
- }
-}
-
-
-LLFloaterIMPanel::~LLFloaterIMPanel()
-{
- //delete focus lost callback
- mFocusCallbackConnection.disconnect();
-}
-
-BOOL LLFloaterIMPanel::postBuild()
-{
- setVisibleCallback(boost::bind(&LLFloaterIMPanel::onVisibilityChange, this, _2));
-
- mInputEditor = getChild<LLLineEditor>("chat_editor");
- mInputEditor->setFocusReceivedCallback( boost::bind(onInputEditorFocusReceived, _1, this) );
- mFocusCallbackConnection = mInputEditor->setFocusLostCallback( boost::bind(onInputEditorFocusLost, _1, this));
- mInputEditor->setKeystrokeCallback( onInputEditorKeystroke, this );
- mInputEditor->setCommitCallback( onCommitChat, this );
- mInputEditor->setCommitOnFocusLost( FALSE );
- mInputEditor->setRevertOnEsc( FALSE );
- mInputEditor->setReplaceNewlinesWithSpaces( FALSE );
-
- childSetAction("profile_callee_btn", onClickProfile, this);
- childSetAction("group_info_btn", onClickGroupInfo, this);
-
- childSetAction("start_call_btn", onClickStartCall, this);
- childSetAction("end_call_btn", onClickEndCall, this);
- childSetAction("send_btn", onClickSend, this);
- childSetAction("toggle_active_speakers_btn", onClickToggleActiveSpeakers, this);
-
- childSetAction("moderator_kick_speaker", onKickSpeaker, this);
- //LLButton* close_btn = getChild<LLButton>("close_btn");
- //close_btn->setClickedCallback(&LLFloaterIMPanel::onClickClose, this);
-
- mHistoryEditor = getChild<LLViewerTextEditor>("im_history");
-
- if ( IM_SESSION_GROUP_START == mDialog )
- {
- childSetEnabled("profile_btn", FALSE);
- }
-
- if(!mProfileButtonEnabled)
- {
- childSetEnabled("profile_callee_btn", FALSE);
- }
-
- sTitleString = getString("title_string");
- sTypingStartString = getString("typing_start_string");
- sSessionStartString = getString("session_start_string");
-
- if (mSpeakerPanel)
- {
- mSpeakerPanel->refreshSpeakers();
- }
-
- if (mDialog == IM_NOTHING_SPECIAL)
- {
- childSetAction("mute_btn", onClickMuteVoice, this);
- childSetCommitCallback("speaker_volume", onVolumeChange, this);
- }
-
- setDefaultBtn("send_btn");
- return TRUE;
-}
-
-void* LLFloaterIMPanel::createSpeakersPanel(void* data)
-{
- LLFloaterIMPanel* floaterp = (LLFloaterIMPanel*)data;
- LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(floaterp->mSessionUUID);
- floaterp->mSpeakerPanel = new LLPanelActiveSpeakers(speaker_mgr, TRUE);
- return floaterp->mSpeakerPanel;
-}
-
-//static
-void LLFloaterIMPanel::onClickMuteVoice(void* user_data)
-{
- LLFloaterIMPanel* floaterp = (LLFloaterIMPanel*)user_data;
- if (floaterp)
- {
- BOOL is_muted = LLMuteList::getInstance()->isMuted(floaterp->mOtherParticipantUUID, LLMute::flagVoiceChat);
-
- LLMute mute(floaterp->mOtherParticipantUUID, floaterp->getTitle(), LLMute::AGENT);
- if (!is_muted)
- {
- LLMuteList::getInstance()->add(mute, LLMute::flagVoiceChat);
- }
- else
- {
- LLMuteList::getInstance()->remove(mute, LLMute::flagVoiceChat);
- }
- }
-}
-
-//static
-void LLFloaterIMPanel::onVolumeChange(LLUICtrl* source, void* user_data)
-{
- LLFloaterIMPanel* floaterp = (LLFloaterIMPanel*)user_data;
- if (floaterp)
- {
- LLVoiceClient::getInstance()->setUserVolume(floaterp->mOtherParticipantUUID, (F32)source->getValue().asReal());
- }
-}
-
-
-// virtual
-void LLFloaterIMPanel::draw()
-{
- LLViewerRegion* region = gAgent.getRegion();
-
- BOOL enable_connect = (region && region->getCapability("ChatSessionRequest") != "")
- && mSessionInitialized
- && LLVoiceClient::getInstance()->voiceEnabled()
- && mCallBackEnabled;
-
- // hide/show start call and end call buttons
- LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionUUID);
- if (!voice_channel)
- return;
-
- childSetVisible("end_call_btn", LLVoiceClient::getInstance()->voiceEnabled() && voice_channel->getState() >= LLVoiceChannel::STATE_CALL_STARTED);
- childSetVisible("start_call_btn", LLVoiceClient::getInstance()->voiceEnabled() && voice_channel->getState() < LLVoiceChannel::STATE_CALL_STARTED);
- childSetEnabled("start_call_btn", enable_connect);
- childSetEnabled("send_btn", !childGetValue("chat_editor").asString().empty());
-
- LLPointer<LLSpeaker> self_speaker;
- LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionUUID);
- if (speaker_mgr)
- {
- self_speaker = speaker_mgr->findSpeaker(gAgent.getID());
- }
- if(!mTextIMPossible)
- {
- mInputEditor->setEnabled(FALSE);
- mInputEditor->setLabel(getString("unavailable_text_label"));
- }
- else if (self_speaker.notNull() && self_speaker->mModeratorMutedText)
- {
- mInputEditor->setEnabled(FALSE);
- mInputEditor->setLabel(getString("muted_text_label"));
- }
- else
- {
- mInputEditor->setEnabled(TRUE);
- mInputEditor->setLabel(getString("default_text_label"));
- }
-
- // show speakers window when voice first connects
- if (mShowSpeakersOnConnect && voice_channel->isActive())
- {
- childSetVisible("active_speakers_panel", TRUE);
- mShowSpeakersOnConnect = FALSE;
- }
- childSetValue("toggle_active_speakers_btn", childIsVisible("active_speakers_panel"));
-
- if (mTyping)
- {
- // Time out if user hasn't typed for a while.
- if (mLastKeystrokeTimer.getElapsedTimeF32() > LLAgent::TYPING_TIMEOUT_SECS)
- {
- setTyping(FALSE);
- }
-
- // If we are typing, and it's been a little while, send the
- // typing indicator
- if (!mSentTypingState
- && mFirstKeystrokeTimer.getElapsedTimeF32() > 1.f)
- {
- sendTypingState(TRUE);
- mSentTypingState = TRUE;
- }
- }
-
- // use embedded panel if available
- if (mSpeakerPanel)
- {
- if (mSpeakerPanel->getVisible())
- {
- mSpeakerPanel->refreshSpeakers();
- }
- }
- else
- {
- // refresh volume and mute checkbox
- childSetVisible("speaker_volume", LLVoiceClient::getInstance()->voiceEnabled() && voice_channel->isActive());
- childSetValue("speaker_volume", LLVoiceClient::getInstance()->getUserVolume(mOtherParticipantUUID));
-
- childSetValue("mute_btn", LLMuteList::getInstance()->isMuted(mOtherParticipantUUID, LLMute::flagVoiceChat));
- childSetVisible("mute_btn", LLVoiceClient::getInstance()->voiceEnabled() && voice_channel->isActive());
- }
- LLFloater::draw();
-}
-
-class LLSessionInviteResponder : public LLHTTPClient::Responder
-{
- LOG_CLASS(LLSessionInviteResponder);
-public:
- LLSessionInviteResponder(const LLUUID& session_id)
- {
- mSessionID = session_id;
- }
-
-protected:
- void httpFailure()
- {
- LL_WARNS() << "Error inviting all agents to session " << dumpResponse() << LL_ENDL;
- //throw something back to the viewer here?
- }
-
-private:
- LLUUID mSessionID;
-};
-
-BOOL LLFloaterIMPanel::inviteToSession(const std::vector<LLUUID>& ids)
-{
- LLViewerRegion* region = gAgent.getRegion();
- if (!region)
- {
- return FALSE;
- }
-
- S32 count = ids.size();
-
- if( isInviteAllowed() && (count > 0) )
- {
- LL_INFOS() << "LLFloaterIMPanel::inviteToSession() - inviting participants" << LL_ENDL;
-
- std::string url = region->getCapability("ChatSessionRequest");
-
- LLSD data;
-
- data["params"] = LLSD::emptyArray();
- for (int i = 0; i < count; i++)
- {
- data["params"].append(ids[i]);
- }
-
- data["method"] = "invite";
- data["session-id"] = mSessionUUID;
- LLHTTPClient::post(
- url,
- data,
- new LLSessionInviteResponder(
- mSessionUUID));
- }
- else
- {
- LL_INFOS() << "LLFloaterIMPanel::inviteToSession -"
- << " no need to invite agents for "
- << mDialog << LL_ENDL;
- // successful add, because everyone that needed to get added
- // was added.
- }
-
- return TRUE;
-}
-
-void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, const LLColor4& color, bool log_to_file, const LLUUID& source, const std::string& name)
-{
- // start tab flashing when receiving im for background session from user
- if (source != LLUUID::null)
- {
- LLMultiFloater* hostp = getHost();
- if( !isInVisibleChain()
- && hostp
- && source != gAgent.getID())
- {
- hostp->setFloaterFlashing(this, TRUE);
- }
- }
-
- // Now we're adding the actual line of text, so erase the
- // "Foo is typing..." text segment, and the optional timestamp
- // if it was present. JC
- removeTypingIndicator(NULL);
-
- // Actually add the line
- std::string timestring;
- bool prepend_newline = true;
- if (gSavedSettings.getBOOL("IMShowTimestamps"))
- {
- timestring = mHistoryEditor->appendTime(prepend_newline);
- prepend_newline = false;
- }
-
- std::string separator_string(": ");
-
- // 'name' is a sender name that we want to hotlink so that clicking on it opens a profile.
- if (!name.empty()) // If name exists, then add it to the front of the message.
- {
- // Don't hotlink any messages from the system (e.g. "Second Life:"), so just add those in plain text.
- if (name == SYSTEM_FROM)
- {
- mHistoryEditor->appendText(name + separator_string, prepend_newline, LLStyle::Params().color(color));
- }
- else
- {
- // Convert the name to a hotlink and add to message.
- mHistoryEditor->appendText(name + separator_string, prepend_newline, LLStyleMap::instance().lookupAgent(source));
- }
- prepend_newline = false;
- }
- mHistoryEditor->appendText(utf8msg, prepend_newline, LLStyle::Params().color(color));
- mHistoryEditor->blockUndo();
-
- if (!isInVisibleChain())
- {
- mNumUnreadMessages++;
- }
-}
-
-
-void LLFloaterIMPanel::setInputFocus( BOOL b )
-{
- mInputEditor->setFocus( b );
-}
-
-
-void LLFloaterIMPanel::selectAll()
-{
- mInputEditor->selectAll();
-}
-
-
-void LLFloaterIMPanel::selectNone()
-{
- mInputEditor->deselect();
-}
-
-BOOL LLFloaterIMPanel::handleKeyHere( KEY key, MASK mask )
-{
- BOOL handled = FALSE;
- if( KEY_RETURN == key && mask == MASK_NONE)
- {
- sendMsg();
- handled = TRUE;
- }
- else if ( KEY_ESCAPE == key )
- {
- handled = TRUE;
- gFocusMgr.setKeyboardFocus(NULL);
- }
-
- // May need to call base class LLPanel::handleKeyHere if not handled
- // in order to tab between buttons. JNC 1.2.2002
- return handled;
-}
-
-BOOL LLFloaterIMPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
- EDragAndDropType cargo_type,
- void* cargo_data,
- EAcceptance* accept,
- std::string& tooltip_msg)
-{
-
- if (mDialog == IM_NOTHING_SPECIAL)
- {
- LLToolDragAndDrop::handleGiveDragAndDrop(mOtherParticipantUUID, mSessionUUID, drop,
- cargo_type, cargo_data, accept);
- }
-
- // handle case for dropping calling cards (and folders of calling cards) onto invitation panel for invites
- else if (isInviteAllowed())
- {
- *accept = ACCEPT_NO;
-
- if (cargo_type == DAD_CALLINGCARD)
- {
- if (dropCallingCard((LLInventoryItem*)cargo_data, drop))
- {
- *accept = ACCEPT_YES_MULTI;
- }
- }
- else if (cargo_type == DAD_CATEGORY)
- {
- if (dropCategory((LLInventoryCategory*)cargo_data, drop))
- {
- *accept = ACCEPT_YES_MULTI;
- }
- }
- }
- return TRUE;
-}
-
-BOOL LLFloaterIMPanel::dropCallingCard(LLInventoryItem* item, BOOL drop)
-{
- BOOL rv = isInviteAllowed();
- if(rv && item && item->getCreatorUUID().notNull())
- {
- if(drop)
- {
- std::vector<LLUUID> ids;
- ids.push_back(item->getCreatorUUID());
- inviteToSession(ids);
- }
- }
- else
- {
- // set to false if creator uuid is null.
- rv = FALSE;
- }
- return rv;
-}
-
-BOOL LLFloaterIMPanel::dropCategory(LLInventoryCategory* category, BOOL drop)
-{
- BOOL rv = isInviteAllowed();
- if(rv && category)
- {
- LLInventoryModel::cat_array_t cats;
- LLInventoryModel::item_array_t items;
- LLUniqueBuddyCollector buddies;
- gInventory.collectDescendentsIf(category->getUUID(),
- cats,
- items,
- LLInventoryModel::EXCLUDE_TRASH,
- buddies);
- S32 count = items.count();
- if(count == 0)
- {
- rv = FALSE;
- }
- else if(drop)
- {
- std::vector<LLUUID> ids;
- ids.reserve(count);
- for(S32 i = 0; i < count; ++i)
- {
- ids.push_back(items.get(i)->getCreatorUUID());
- }
- inviteToSession(ids);
- }
- }
- return rv;
-}
-
-BOOL LLFloaterIMPanel::isInviteAllowed() const
-{
-
- return ( (IM_SESSION_CONFERENCE_START == mDialog)
- || (IM_SESSION_INVITE == mDialog) );
-}
-
-
-// static
-void LLFloaterIMPanel::onTabClick(void* userdata)
-{
- LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata;
- self->setInputFocus(TRUE);
-}
-
-
-// static
-void LLFloaterIMPanel::onClickProfile( void* userdata )
-{
- // Bring up the Profile window
- LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata;
-
- if (self->getOtherParticipantID().notNull())
- {
- LLAvatarActions::showProfile(self->getOtherParticipantID());
- }
-}
-
-// static
-void LLFloaterIMPanel::onClickGroupInfo( void* userdata )
-{
- // Bring up the Profile window
- LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata;
-
- LLGroupActions::show(self->mSessionUUID);
-
-}
-
-// static
-void LLFloaterIMPanel::onClickClose( void* userdata )
-{
- LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata;
- if(self)
- {
- self->closeFloater();
- }
-}
-
-// static
-void LLFloaterIMPanel::onClickStartCall(void* userdata)
-{
- LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata;
-
- gIMMgr->startCall(self->mSessionUUID);
-}
-
-// static
-void LLFloaterIMPanel::onClickEndCall(void* userdata)
-{
- LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata;
-
- gIMMgr->endCall(self->mSessionUUID);
-}
-
-// static
-void LLFloaterIMPanel::onClickSend(void* userdata)
-{
- LLFloaterIMPanel* self = (LLFloaterIMPanel*)userdata;
- self->sendMsg();
-}
-
-// static
-void LLFloaterIMPanel::onClickToggleActiveSpeakers(void* userdata)
-{
- LLFloaterIMPanel* self = (LLFloaterIMPanel*)userdata;
-
- self->childSetVisible("active_speakers_panel", !self->childIsVisible("active_speakers_panel"));
-}
-
-// static
-void LLFloaterIMPanel::onCommitChat(LLUICtrl* caller, void* userdata)
-{
- LLFloaterIMPanel* self= (LLFloaterIMPanel*) userdata;
- self->sendMsg();
-}
-
-// static
-void LLFloaterIMPanel::onInputEditorFocusReceived( LLFocusableElement* caller, void* userdata )
-{
- LLFloaterIMPanel* self= (LLFloaterIMPanel*) userdata;
- self->mHistoryEditor->setCursorAndScrollToEnd();
-}
-
-// static
-void LLFloaterIMPanel::onInputEditorFocusLost(LLFocusableElement* caller, void* userdata)
-{
- LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata;
- self->setTyping(FALSE);
-}
-
-// static
-void LLFloaterIMPanel::onInputEditorKeystroke(LLLineEditor* caller, void* userdata)
-{
- LLFloaterIMPanel* self = (LLFloaterIMPanel*)userdata;
- std::string text = self->mInputEditor->getText();
- if (!text.empty())
- {
- self->setTyping(TRUE);
- }
- else
- {
- // Deleting all text counts as stopping typing.
- self->setTyping(FALSE);
- }
-}
-
-// virtual
-void LLFloaterIMPanel::onClose(bool app_quitting)
-{
- setTyping(FALSE);
-
- gIMMgr->leaveSession(mSessionUUID);
-
- // *HACK hide the voice floater
- LLFloaterReg::hideInstance("voice_call", mSessionUUID);
-}
-
-void LLFloaterIMPanel::onVisibilityChange(const LLSD& new_visibility)
-{
- if (new_visibility.asBoolean())
- {
- mNumUnreadMessages = 0;
- }
-
- LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionUUID);
- if (voice_channel && voice_channel->getState() == LLVoiceChannel::STATE_CONNECTED)
- {
- if (new_visibility.asBoolean())
- LLFloaterReg::showInstance("voice_call", mSessionUUID);
- else
- LLFloaterReg::hideInstance("voice_call", mSessionUUID);
- }
-}
-
-void LLFloaterIMPanel::sendMsg()
-{
- if (!gAgent.isGodlike()
- && (mDialog == IM_NOTHING_SPECIAL)
- && mOtherParticipantUUID.isNull())
- {
- LL_INFOS() << "Cannot send IM to everyone unless you're a god." << LL_ENDL;
- return;
- }
-
- if (mInputEditor)
- {
- LLWString text = mInputEditor->getConvertedText();
- if(!text.empty())
- {
- // store sent line in history, duplicates will get filtered
- if (mInputEditor) mInputEditor->updateHistory();
- // Truncate and convert to UTF8 for transport
- std::string utf8_text = wstring_to_utf8str(text);
- utf8_text = utf8str_truncate(utf8_text, MAX_MSG_BUF_SIZE - 1);
-
- if ( mSessionInitialized )
- {
- LLIMModel::sendMessage(utf8_text,
- mSessionUUID,
- mOtherParticipantUUID,
- mDialog);
-
- }
- else
- {
- //queue up the message to send once the session is
- //initialized
- mQueuedMsgsForInit.append(utf8_text);
- }
- }
-
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_IM_COUNT);
-
- mInputEditor->setText(LLStringUtil::null);
- }
-
- // Don't need to actually send the typing stop message, the other
- // client will infer it from receiving the message.
- mTyping = FALSE;
- mSentTypingState = TRUE;
-}
-
-void LLFloaterIMPanel::processSessionUpdate(const LLSD& session_update)
-{
- if (
- session_update.has("moderated_mode") &&
- session_update["moderated_mode"].has("voice") )
- {
- BOOL voice_moderated = session_update["moderated_mode"]["voice"];
-
- if (voice_moderated)
- {
- setTitle(mSessionLabel + std::string(" ") + getString("moderated_chat_label"));
- }
- else
- {
- setTitle(mSessionLabel);
- }
-
-
- //update the speakers dropdown too, if it's available
- if (mSpeakerPanel)
- {
- mSpeakerPanel->setVoiceModerationCtrlMode(voice_moderated);
- }
- }
-}
-
-void LLFloaterIMPanel::sessionInitReplyReceived(const LLUUID& session_id)
-{
- mSessionUUID = session_id;
- mSessionInitialized = TRUE;
-
- //we assume the history editor hasn't moved at all since
- //we added the starting session message
- //so, we count how many characters to remove
- S32 chars_to_remove = mHistoryEditor->getWText().length() -
- mSessionStartMsgPos;
- mHistoryEditor->removeTextFromEnd(chars_to_remove);
-
- //and now, send the queued msg
- LLSD::array_iterator iter;
- for ( iter = mQueuedMsgsForInit.beginArray();
- iter != mQueuedMsgsForInit.endArray();
- ++iter)
- {
- LLIMModel::sendMessage(
- iter->asString(),
- mSessionUUID,
- mOtherParticipantUUID,
- mDialog);
- }
-}
-
-void LLFloaterIMPanel::setTyping(BOOL typing)
-{
- LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionUUID);
- if (typing)
- {
- // Every time you type something, reset this timer
- mLastKeystrokeTimer.reset();
-
- if (!mTyping)
- {
- // You just started typing.
- mFirstKeystrokeTimer.reset();
-
- // Will send typing state after a short delay.
- mSentTypingState = FALSE;
- }
-
- if (speaker_mgr)
- speaker_mgr->setSpeakerTyping(gAgent.getID(), TRUE);
- }
- else
- {
- if (mTyping)
- {
- // you just stopped typing, send state immediately
- sendTypingState(FALSE);
- mSentTypingState = TRUE;
- }
- if (speaker_mgr)
- speaker_mgr->setSpeakerTyping(gAgent.getID(), FALSE);
- }
-
- mTyping = typing;
-}
-
-void LLFloaterIMPanel::sendTypingState(BOOL typing)
-{
- // Don't want to send typing indicators to multiple people, potentially too
- // much network traffic. Only send in person-to-person IMs.
- if (mDialog != IM_NOTHING_SPECIAL) return;
-
- LLIMModel::instance().sendTypingState(mSessionUUID, mOtherParticipantUUID, typing);
-}
-
-
-void LLFloaterIMPanel::processIMTyping(const LLIMInfo* im_info, BOOL typing)
-{
- if (typing)
- {
- // other user started typing
- addTypingIndicator(im_info->mName);
- }
- else
- {
- // other user stopped typing
- removeTypingIndicator(im_info);
- }
-}
-
-
-void LLFloaterIMPanel::addTypingIndicator(const std::string &name)
-{
- // we may have lost a "stop-typing" packet, don't add it twice
- if (!mOtherTyping)
- {
- mTypingLineStartIndex = mHistoryEditor->getWText().length();
- LLUIString typing_start = sTypingStartString;
- typing_start.setArg("[NAME]", name);
- addHistoryLine(typing_start, LLUIColorTable::instance().getColor("SystemChatColor"), false);
- mOtherTypingName = name;
- mOtherTyping = TRUE;
- }
- // MBW -- XXX -- merge from release broke this (argument to this function changed from an LLIMInfo to a name)
- // Richard will fix.
-// mSpeakers->setSpeakerTyping(im_info->mFromID, TRUE);
-}
-
-
-void LLFloaterIMPanel::removeTypingIndicator(const LLIMInfo* im_info)
-{
- if (mOtherTyping)
- {
- // Must do this first, otherwise addHistoryLine calls us again.
- mOtherTyping = FALSE;
-
- S32 chars_to_remove = mHistoryEditor->getWText().length() - mTypingLineStartIndex;
- mHistoryEditor->removeTextFromEnd(chars_to_remove);
- if (im_info)
- {
- LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionUUID);
- if (speaker_mgr)
- {
- speaker_mgr->setSpeakerTyping(im_info->mFromID, FALSE);
- }
- }
- }
-}
-
-//static
-void LLFloaterIMPanel::onKickSpeaker(void* user_data)
-{
-
-}
diff --git a/indra/newview/llimpanel.h b/indra/newview/llimpanel.h
deleted file mode 100644
index c5930b56f7..0000000000
--- a/indra/newview/llimpanel.h
+++ /dev/null
@@ -1,212 +0,0 @@
-/**
- * @file llimpanel.h
- * @brief LLIMPanel class definition
- *
- * $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_IMPANEL_H
-#define LL_IMPANEL_H
-
-#include "lldockablefloater.h"
-#include "lllogchat.h"
-#include "lluuid.h"
-#include "lldarray.h"
-#include "llinstantmessage.h"
-#include "llvoiceclient.h"
-#include "llstyle.h"
-
-class LLLineEditor;
-class LLViewerTextEditor;
-class LLInventoryItem;
-class LLInventoryCategory;
-class LLIMSpeakerMgr;
-class LLPanelActiveSpeakers;
-class LLPanelChatControlPanel;
-
-class LLFloaterIMPanel : public LLFloater
-{
-public:
-
- // The session id is the id of the session this is for. The target
- // refers to the user (or group) that where this session serves as
- // the default. For example, if you open a session though a
- // calling card, a new session id will be generated, but the
- // target_id will be the agent referenced by the calling card.
- LLFloaterIMPanel(const std::string& session_label,
- const LLUUID& session_id,
- const LLUUID& target_id,
- const std::vector<LLUUID>& ids,
- EInstantMessage dialog);
- virtual ~LLFloaterIMPanel();
-
- /*virtual*/ BOOL postBuild();
-
- // Check typing timeout timer.
- /*virtual*/ void draw();
-
- /*virtual*/ void onClose(bool app_quitting);
- void onVisibilityChange(const LLSD& new_visibility);
-
- // add target ids to the session.
- // Return TRUE if successful, otherwise FALSE.
- BOOL inviteToSession(const std::vector<LLUUID>& agent_ids);
-
- void addHistoryLine(const std::string &utf8msg,
- const LLColor4& color = LLColor4::white,
- bool log_to_file = true,
- const LLUUID& source = LLUUID::null,
- const std::string& name = LLStringUtil::null);
-
- void setInputFocus( BOOL b );
-
- void selectAll();
- void selectNone();
-
- S32 getNumUnreadMessages() { return mNumUnreadMessages; }
-
- BOOL handleKeyHere(KEY key, MASK mask);
- BOOL handleDragAndDrop(S32 x, S32 y, MASK mask,
- BOOL drop, EDragAndDropType cargo_type,
- void *cargo_data, EAcceptance *accept,
- std::string& tooltip_msg);
-
- static void onInputEditorFocusReceived( LLFocusableElement* caller, void* userdata );
- static void onInputEditorFocusLost(LLFocusableElement* caller, void* userdata);
- static void onInputEditorKeystroke(LLLineEditor* caller, void* userdata);
- static void onCommitChat(LLUICtrl* caller, void* userdata);
- static void onTabClick( void* userdata );
-
- static void onClickProfile( void* userdata );
- static void onClickGroupInfo( void* userdata );
- static void onClickClose( void* userdata );
- static void onClickStartCall( void* userdata );
- static void onClickEndCall( void* userdata );
- static void onClickSend( void* userdata );
- static void onClickToggleActiveSpeakers( void* userdata );
- static void* createSpeakersPanel(void* data);
- static void onKickSpeaker(void* user_data);
-
- //callbacks for P2P muting and volume control
- static void onClickMuteVoice(void* user_data);
- static void onVolumeChange(LLUICtrl* source, void* user_data);
-
- const LLUUID& getSessionID() const { return mSessionUUID; }
- const LLUUID& getOtherParticipantID() const { return mOtherParticipantUUID; }
- void processSessionUpdate(const LLSD& update);
- EInstantMessage getDialogType() const { return mDialog; }
- void setDialogType(EInstantMessage dialog) { mDialog = dialog; }
-
- void sessionInitReplyReceived(const LLUUID& im_session_id);
-
- // Handle other participant in the session typing.
- void processIMTyping(const LLIMInfo* im_info, BOOL typing);
-
-private:
- // Called by UI methods.
- void sendMsg();
-
- // for adding agents via the UI. Return TRUE if possible, do it if
- BOOL dropCallingCard(LLInventoryItem* item, BOOL drop);
- BOOL dropCategory(LLInventoryCategory* category, BOOL drop);
-
- // test if local agent can add agents.
- BOOL isInviteAllowed() const;
-
- // Called whenever the user starts or stops typing.
- // Sends the typing state to the other user if necessary.
- void setTyping(BOOL typing);
-
- // Add the "User is typing..." indicator.
- void addTypingIndicator(const std::string &name);
-
- // Remove the "User is typing..." indicator.
- void removeTypingIndicator(const LLIMInfo* im_info);
-
- void sendTypingState(BOOL typing);
-
-private:
- LLLineEditor* mInputEditor;
- LLViewerTextEditor* mHistoryEditor;
-
- // The value of the mSessionUUID depends on how the IM session was started:
- // one-on-one ==> random id
- // group ==> group_id
- // inventory folder ==> folder item_id
- // 911 ==> Gaurdian_Angel_Group_ID ^ gAgent.getID()
- LLUUID mSessionUUID;
-
- std::string mSessionLabel;
-
- BOOL mSessionInitialized;
- LLSD mQueuedMsgsForInit;
-
- // The value mOtherParticipantUUID depends on how the IM session was started:
- // one-on-one = recipient's id
- // group ==> group_id
- // inventory folder ==> first target id in list
- // 911 ==> sender
- LLUUID mOtherParticipantUUID;
- std::vector<LLUUID> mSessionInitialTargetIDs;
-
- EInstantMessage mDialog;
-
- // Are you currently typing?
- BOOL mTyping;
-
- // Is other user currently typing?
- BOOL mOtherTyping;
-
- // name of other user who is currently typing
- std::string mOtherTypingName;
-
- // Where does the "User is typing..." line start?
- S32 mTypingLineStartIndex;
- // Where does the "Starting session..." line start?
- S32 mSessionStartMsgPos;
-
- S32 mNumUnreadMessages;
-
- BOOL mSentTypingState;
-
- BOOL mShowSpeakersOnConnect;
-
- BOOL mTextIMPossible;
- BOOL mProfileButtonEnabled;
- BOOL mCallBackEnabled;
-
- LLPanelActiveSpeakers* mSpeakerPanel;
-
- // Optimization: Don't send "User is typing..." until the
- // user has actually been typing for a little while. Prevents
- // extra IMs for brief "lol" type utterences.
- LLFrameTimer mFirstKeystrokeTimer;
-
- // Timer to detect when user has stopped typing.
- LLFrameTimer mLastKeystrokeTimer;
-
- boost::signals2::connection mFocusCallbackConnection;
-
- void disableWhileSessionStarting();
-};
-
-#endif // LL_IMPANEL_H
diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp
index 948793681d..5516a8fc61 100644
--- a/indra/newview/llimprocessing.cpp
+++ b/indra/newview/llimprocessing.cpp
@@ -118,7 +118,7 @@ static std::string clean_name_from_im(const std::string& name, EInstantMessage t
}
static std::string clean_name_from_task_im(const std::string& msg,
- BOOL from_group)
+ bool from_group)
{
boost::smatch match;
static const boost::regex returned_exp(
@@ -249,7 +249,7 @@ void inventory_offer_handler(LLOfferInfo* info)
// faked for toast one.
payload["object_id"] = object_id;
// Flag indicating that this notification is faked for toast.
- payload["give_inventory_notification"] = FALSE;
+ payload["give_inventory_notification"] = false;
args["OBJECTFROMNAME"] = info->mFromName;
args["NAME"] = info->mFromName;
if (info->mFromGroup)
@@ -278,7 +278,7 @@ void inventory_offer_handler(LLOfferInfo* info)
p.name = info->mFromID == gAgentID ? "OwnObjectGiveItem" : "ObjectGiveItem";
// Pop up inv offer chiclet and let the user accept (keep), or reject (and silently delete) the inventory.
- LLPostponedNotification::add<LLPostponedOfferNotification>(p, info->mFromID, info->mFromGroup == TRUE);
+ LLPostponedNotification::add<LLPostponedOfferNotification>(p, info->mFromID, info->mFromGroup == true);
}
else // Agent -> Agent Inventory Offer
{
@@ -315,7 +315,7 @@ void inventory_offer_handler(LLOfferInfo* info)
if (!bAutoAccept) // if we auto accept, do not pester the user
{
// Inform user that there is a script floater via toast system
- payload["give_inventory_notification"] = TRUE;
+ payload["give_inventory_notification"] = true;
p.payload = payload;
LLPostponedNotification::add<LLPostponedOfferNotification>(p, info->mFromID, false);
}
@@ -412,7 +412,7 @@ static void notification_display_name_callback(const LLUUID& id,
}
void LLIMProcessing::processNewMessage(LLUUID from_id,
- BOOL from_group,
+ bool from_group,
LLUUID to_id,
U8 offline,
EInstantMessage dialog, // U8
@@ -445,14 +445,14 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
// IDEVO convert new-style "Resident" names for display
name = clean_name_from_im(name, dialog);
- BOOL is_do_not_disturb = gAgent.isDoNotDisturb();
- BOOL is_muted = LLMuteList::getInstance()->isMuted(from_id, name, LLMute::flagTextChat)
+ bool is_do_not_disturb = gAgent.isDoNotDisturb();
+ bool is_muted = LLMuteList::getInstance()->isMuted(from_id, name, LLMute::flagTextChat)
// object IMs contain sender object id in session_id (STORM-1209)
|| (dialog == IM_FROM_TASK && LLMuteList::getInstance()->isMuted(session_id));
- BOOL is_owned_by_me = FALSE;
- BOOL is_friend = (LLAvatarTracker::instance().getBuddyInfo(from_id) == NULL) ? false : true;
- BOOL accept_im_from_only_friend = gSavedPerAccountSettings.getBOOL("VoiceCallsFriendsOnly");
- BOOL is_linden = chat.mSourceType != CHAT_SOURCE_OBJECT &&
+ bool is_owned_by_me = false;
+ bool is_friend = (LLAvatarTracker::instance().getBuddyInfo(from_id) == NULL) ? false : true;
+ bool accept_im_from_only_friend = gSavedPerAccountSettings.getBOOL("VoiceCallsFriendsOnly");
+ bool is_linden = chat.mSourceType != CHAT_SOURCE_OBJECT &&
LLMuteList::isLinden(name);
chat.mMuted = is_muted;
@@ -640,8 +640,8 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
{
// aux_id contains group id, binary bucket contains name and asset type
group_id = aux_id;
- has_inventory = binary_bucket_size > 1 ? TRUE : FALSE;
- from_group = TRUE; // inaccurate value correction
+ has_inventory = binary_bucket_size > 1 ? true : false;
+ from_group = true; // inaccurate value correction
if (has_inventory)
{
std::string str_bucket = ll_safe_string((char*)binary_bucket, binary_bucket_size);
@@ -865,7 +865,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
bucketp = (struct offer_agent_bucket_t*) &binary_bucket[0];
info->mType = (LLAssetType::EType) bucketp->asset_type;
info->mObjectID = bucketp->object_id;
- info->mFromObject = FALSE;
+ info->mFromObject = false;
}
else // IM_TASK_INVENTORY_OFFERED
{
@@ -894,7 +894,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
LL_WARNS("Messaging") << "Malformed inventory offer from object, type might be " << info->mType << LL_ENDL;
}
info->mObjectID = LLUUID::null;
- info->mFromObject = TRUE;
+ info->mFromObject = true;
}
info->mIM = dialog;
@@ -1252,7 +1252,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
LLSD payload;
payload["from_id"] = from_id;
payload["lure_id"] = session_id;
- payload["godlike"] = FALSE;
+ payload["godlike"] = false;
payload["region_maturity"] = region_access;
if (!canUserAccessDstRegion)
@@ -1357,7 +1357,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
LLSD payload;
payload["from_id"] = from_id;
payload["lure_id"] = session_id;
- payload["godlike"] = TRUE;
+ payload["godlike"] = true;
payload["region_maturity"] = region_access;
if (!canUserAccessDstRegion)
@@ -1494,7 +1494,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
void LLIMProcessing::requestOfflineMessages()
{
- static BOOL requested = FALSE;
+ static bool requested = false;
if (!requested
&& gMessageSystem
&& !gDisconnected
@@ -1521,7 +1521,7 @@ void LLIMProcessing::requestOfflineMessages()
LLCoros::instance().launch("LLIMProcessing::requestOfflineMessagesCoro",
boost::bind(&LLIMProcessing::requestOfflineMessagesCoro, cap_url));
}
- requested = TRUE;
+ requested = true;
}
}
@@ -1621,7 +1621,7 @@ void LLIMProcessing::requestOfflineMessagesCoro(std::string url)
}
// Todo: once drtsim-451 releases, remove the string option
- BOOL from_group;
+ bool from_group;
if (message_data["from_group"].isInteger())
{
from_group = message_data["from_group"].asInteger();
diff --git a/indra/newview/llimprocessing.h b/indra/newview/llimprocessing.h
index 4d20b963a4..030d28b198 100644
--- a/indra/newview/llimprocessing.h
+++ b/indra/newview/llimprocessing.h
@@ -34,7 +34,7 @@ class LLIMProcessing
public:
// Pre-process message for IM manager
static void processNewMessage(LLUUID from_id,
- BOOL from_group,
+ bool from_group,
LLUUID to_id,
U8 offline,
EInstantMessage dialog, // U8
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index ce4a032b27..808b9511e0 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -99,16 +99,16 @@ const LLUUID LLOutgoingCallDialog::OCD_KEY = LLUUID("7CF78E11-0CFE-498D-ADB9-141
LLIMMgr* gIMMgr = NULL;
-BOOL LLSessionTimeoutTimer::tick()
+bool LLSessionTimeoutTimer::tick()
{
- if (mSessionId.isNull()) return TRUE;
+ if (mSessionId.isNull()) return true;
LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(mSessionId);
if (session && !session->mSessionInitialized)
{
gIMMgr->showSessionStartError("session_initialization_timed_out_error", mSessionId);
}
- return TRUE;
+ return true;
}
@@ -206,7 +206,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
if (msg["source_type"].asInteger() == CHAT_SOURCE_OBJECT)
{
user_preferences = gSavedSettings.getString("NotificationObjectIMOptions");
- if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundObjectIM") == TRUE))
+ if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundObjectIM") == true))
{
make_ui_sound("UISndNewIncomingIMSession");
}
@@ -214,7 +214,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
else
{
user_preferences = gSavedSettings.getString("NotificationNearbyChatOptions");
- if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNearbyChatIM") == TRUE))
+ if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNearbyChatIM") == true))
{
make_ui_sound("UISndNewIncomingIMSession");
}
@@ -225,7 +225,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
if (LLAvatarTracker::instance().isBuddy(participant_id))
{
user_preferences = gSavedSettings.getString("NotificationFriendIMOptions");
- if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundFriendIM") == TRUE))
+ if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundFriendIM") == true))
{
make_ui_sound("UISndNewIncomingIMSession");
}
@@ -233,7 +233,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
else
{
user_preferences = gSavedSettings.getString("NotificationNonFriendIMOptions");
- if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNonFriendIM") == TRUE))
+ if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNonFriendIM") == true))
{
make_ui_sound("UISndNewIncomingIMSession");
}
@@ -242,7 +242,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
else if(session->isAdHocSessionType())
{
user_preferences = gSavedSettings.getString("NotificationConferenceIMOptions");
- if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundConferenceIM") == TRUE))
+ if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundConferenceIM") == true))
{
make_ui_sound("UISndNewIncomingIMSession");
}
@@ -250,7 +250,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
else if(session->isGroupSessionType())
{
user_preferences = gSavedSettings.getString("NotificationGroupChatOptions");
- if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundGroupChatIM") == TRUE))
+ if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundGroupChatIM") == true))
{
make_ui_sound("UISndNewIncomingIMSession");
}
@@ -708,7 +708,7 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string&
}
else
{
- //tick returns TRUE - timer will be deleted after the tick
+ //tick returns true - timer will be deleted after the tick
new LLSessionTimeoutTimer(mSessionID, SESSION_INITIALIZATION_TIMEOUT);
}
@@ -925,7 +925,7 @@ void LLIMModel::LLIMSession::addMessage(const std::string& from,
if (mSpeakers && from_id.notNull())
{
mSpeakers->speakerChatted(from_id);
- mSpeakers->setSpeakerTyping(from_id, FALSE);
+ mSpeakers->setSpeakerTyping(from_id, false);
}
}
@@ -1288,7 +1288,7 @@ bool LLIMModel::LLIMSession::isOutgoingAdHoc() const
bool LLIMModel::LLIMSession::isAdHoc()
{
- return IM_SESSION_CONFERENCE_START == mType || (IM_SESSION_INVITE == mType && !gAgent.isInGroup(mSessionID, TRUE));
+ return IM_SESSION_CONFERENCE_START == mType || (IM_SESSION_INVITE == mType && !gAgent.isInGroup(mSessionID, true));
}
bool LLIMModel::LLIMSession::isP2P()
@@ -1298,7 +1298,7 @@ bool LLIMModel::LLIMSession::isP2P()
bool LLIMModel::LLIMSession::isGroupChat()
{
- return IM_SESSION_GROUP_START == mType || (IM_SESSION_INVITE == mType && gAgent.isInGroup(mSessionID, TRUE));
+ return IM_SESSION_GROUP_START == mType || (IM_SESSION_INVITE == mType && gAgent.isInGroup(mSessionID, true));
}
LLUUID LLIMModel::LLIMSession::generateOutgoingAdHocHash() const
@@ -1755,7 +1755,7 @@ const std::string& LLIMModel::getHistoryFileName(const LLUUID& session_id) const
// TODO get rid of other participant ID
-void LLIMModel::sendTypingState(LLUUID session_id, LLUUID other_participant_id, BOOL typing)
+void LLIMModel::sendTypingState(LLUUID session_id, LLUUID other_participant_id, bool typing)
{
std::string name;
LLAgentUI::buildFullname(name);
@@ -1763,7 +1763,7 @@ void LLIMModel::sendTypingState(LLUUID session_id, LLUUID other_participant_id,
pack_instant_message(
gMessageSystem,
gAgent.getID(),
- FALSE,
+ false,
gAgent.getSessionID(),
other_participant_id,
name,
@@ -1783,7 +1783,7 @@ void LLIMModel::sendLeaveSession(const LLUUID& session_id, const LLUUID& other_p
pack_instant_message(
gMessageSystem,
gAgent.getID(),
- FALSE,
+ false,
gAgent.getSessionID(),
other_participant_id,
name,
@@ -1831,7 +1831,7 @@ void LLIMModel::sendMessage(const std::string& utf8_text,
pack_instant_message(
gMessageSystem,
gAgent.getID(),
- FALSE,
+ false,
gAgent.getSessionID(),
other_participant_id,
name.c_str(),
@@ -1890,7 +1890,7 @@ void LLIMModel::sendMessage(const std::string& utf8_text,
if (speaker_mgr)
{
speaker_mgr->speakerChatted(gAgentID);
- speaker_mgr->setSpeakerTyping(gAgentID, FALSE);
+ speaker_mgr->setSpeakerTyping(gAgentID, false);
}
}
@@ -1955,7 +1955,7 @@ void session_starter_helper(
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_MessageBlock);
- msg->addBOOLFast(_PREHASH_FromGroup, FALSE);
+ msg->addBOOLFast(_PREHASH_FromGroup, false);
msg->addUUIDFast(_PREHASH_ToAgentID, other_participant_id);
msg->addU8Fast(_PREHASH_Offline, IM_ONLINE);
msg->addU8Fast(_PREHASH_Dialog, im_type);
@@ -2109,7 +2109,7 @@ LLUUID LLIMMgr::computeSessionID(
}
}
- if (gAgent.isInGroup(session_id, TRUE) && (session_id != other_participant_id))
+ if (gAgent.isInGroup(session_id, true) && (session_id != other_participant_id))
{
LL_WARNS() << "Group session id different from group id: IM type = " << dialog << ", session id = " << session_id << ", group id = " << other_participant_id << LL_ENDL;
}
@@ -2192,7 +2192,7 @@ LLIMMgr::onConfirmForceCloseError(
LLFloater* floater = LLFloaterIMSession::findInstance(session_id);
if ( floater )
{
- floater->closeFloater(FALSE);
+ floater->closeFloater(false);
}
return false;
}
@@ -2341,7 +2341,7 @@ LLCallDialog::LLCallDialog(const LLSD& payload)
mPayload(payload),
mLifetime(DEFAULT_LIFETIME)
{
- setAutoFocus(FALSE);
+ setAutoFocus(false);
// force docked state since this floater doesn't save it between recreations
setDocked(true);
}
@@ -2351,14 +2351,14 @@ LLCallDialog::~LLCallDialog()
LLUI::getInstance()->removePopup(this);
}
-BOOL LLCallDialog::postBuild()
+bool LLCallDialog::postBuild()
{
if (!LLDockableFloater::postBuild() || !gToolBarView)
- return FALSE;
+ return false;
dockToToolbarButton("speak");
- return TRUE;
+ return true;
}
void LLCallDialog::dockToToolbarButton(const std::string& toolbarButtonName)
@@ -2432,7 +2432,7 @@ void LLCallDialog::setIcon(const LLSD& session_id, const LLSD& participant_id)
{
bool participant_is_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(session_id);
- bool is_group = participant_is_avatar && gAgent.isInGroup(session_id, TRUE);
+ bool is_group = participant_is_avatar && gAgent.isInGroup(session_id, true);
LLAvatarIconCtrl* avatar_icon = getChild<LLAvatarIconCtrl>("avatar_icon");
LLGroupIconCtrl* group_icon = getChild<LLGroupIconCtrl>("group_icon");
@@ -2621,13 +2621,13 @@ void LLOutgoingCallDialog::onCancel(void* user_data)
}
-BOOL LLOutgoingCallDialog::postBuild()
+bool LLOutgoingCallDialog::postBuild()
{
- BOOL success = LLCallDialog::postBuild();
+ bool success = LLCallDialog::postBuild();
childSetAction("Cancel", onCancel, this);
- setCanDrag(FALSE);
+ setCanDrag(false);
return success;
}
@@ -2675,14 +2675,14 @@ void LLIncomingCallDialog::onLifetimeExpired()
}
}
-BOOL LLIncomingCallDialog::postBuild()
+bool LLIncomingCallDialog::postBuild()
{
LLCallDialog::postBuild();
if (!mPayload.isMap() || mPayload.size() == 0)
{
LL_INFOS("IMVIEW") << "IncomingCall: invalid argument" << LL_ENDL;
- return TRUE;
+ return true;
}
LLUUID session_id = mPayload["session_id"].asUUID();
@@ -2692,14 +2692,14 @@ BOOL LLIncomingCallDialog::postBuild()
if (session_id.isNull() && caller_id.asUUID().isNull())
{
LL_INFOS("IMVIEW") << "IncomingCall: invalid ids" << LL_ENDL;
- return TRUE;
+ return true;
}
std::string notify_box_type = mPayload["notify_box_type"].asString();
if (!is_voice_call_type(notify_box_type))
{
LL_INFOS("IMVIEW") << "IncomingCall: notify_box_type was not provided" << LL_ENDL;
- return TRUE;
+ return true;
}
// init notification's lifetime
@@ -2710,7 +2710,7 @@ BOOL LLIncomingCallDialog::postBuild()
}
std::string call_type;
- if (gAgent.isInGroup(session_id, TRUE))
+ if (gAgent.isInGroup(session_id, true))
{
LLStringUtil::format_map_t args;
LLGroupData data;
@@ -2761,8 +2761,8 @@ BOOL LLIncomingCallDialog::postBuild()
bool is_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(session_id);
getChildView("Start IM")->setVisible( is_avatar && notify_box_type != "VoiceInviteAdHoc" && notify_box_type != "VoiceInviteGroup");
- setCanDrag(FALSE);
- return TRUE;
+ setCanDrag(false);
+ return true;
}
void LLIncomingCallDialog::setCallerName(const std::string& ui_title,
@@ -2881,7 +2881,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload
case IM_SESSION_CONFERENCE_START:
case IM_SESSION_GROUP_START:
case IM_SESSION_INVITE:
- if (gAgent.isInGroup(session_id, TRUE))
+ if (gAgent.isInGroup(session_id, true))
{
LLGroupData data;
if (!gAgent.getGroupData(session_id, data)) break;
@@ -3056,7 +3056,7 @@ LLIMMgr::LLIMMgr()
LLIMModel::getInstance()->addNewMsgCallback(boost::bind(&LLFloaterIMSession::sRemoveTypingIndicator, _1));
- gSavedPerAccountSettings.declareBOOL("FetchGroupChatHistory", TRUE, "Fetch recent messages from group chat servers when a group window opens", LLControlVariable::PERSIST_ALWAYS);
+ gSavedPerAccountSettings.declareBOOL("FetchGroupChatHistory", true, "Fetch recent messages from group chat servers when a group window opens", LLControlVariable::PERSIST_ALWAYS);
}
// Add a message to a session.
@@ -3170,7 +3170,7 @@ void LLIMMgr::addMessage(
}
//Play sound for new conversations
- if (!skip_message & !gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNewConversation") == TRUE))
+ if (!skip_message & !gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNewConversation") == true))
{
make_ui_sound("UISndNewIncomingIMSession");
}
@@ -3431,7 +3431,7 @@ void LLIMMgr::inviteToSession(
// voice invite question is different from default only for group call (EXT-7118)
std::string question_type = "VoiceInviteQuestionDefault";
- BOOL voice_invite = FALSE;
+ bool voice_invite = false;
bool is_linden = LLMuteList::isLinden(caller_name);
@@ -3439,21 +3439,21 @@ void LLIMMgr::inviteToSession(
{
//P2P is different...they only have voice invitations
notify_box_type = "VoiceInviteP2P";
- voice_invite = TRUE;
+ voice_invite = true;
}
- else if ( gAgent.isInGroup(session_id, TRUE) )
+ else if ( gAgent.isInGroup(session_id, true) )
{
//only really old school groups have voice invitations
notify_box_type = "VoiceInviteGroup";
question_type = "VoiceInviteQuestionGroup";
- voice_invite = TRUE;
+ voice_invite = true;
}
else if ( inv_type == INVITATION_TYPE_VOICE )
{
//else it's an ad-hoc
//and a voice ad-hoc
notify_box_type = "VoiceInviteAdHoc";
- voice_invite = TRUE;
+ voice_invite = true;
}
else if ( inv_type == INVITATION_TYPE_IMMEDIATE )
{
@@ -3542,7 +3542,7 @@ void LLIMMgr::inviteToSession(
}
else
{
- LLFloaterReg::showInstance("incoming_call", payload, FALSE);
+ LLFloaterReg::showInstance("incoming_call", payload, false);
}
// Add the caller to the Recent List here (at this point
@@ -3564,7 +3564,7 @@ void LLIMMgr::onInviteNameLookup(LLSD payload, const LLUUID& id, const LLAvatarN
std::string notify_box_type = payload["notify_box_type"].asString();
- LLFloaterReg::showInstance("incoming_call", payload, FALSE);
+ LLFloaterReg::showInstance("incoming_call", payload, false);
}
//*TODO disconnects all sessions
@@ -3573,7 +3573,7 @@ void LLIMMgr::disconnectAllSessions()
//*TODO disconnects all IM sessions
}
-BOOL LLIMMgr::hasSession(const LLUUID& session_id)
+bool LLIMMgr::hasSession(const LLUUID& session_id)
{
return LLIMModel::getInstance()->findIMSession(session_id) != NULL;
}
@@ -3765,7 +3765,7 @@ bool LLIMMgr::endCall(const LLUUID& session_id)
if (im_session)
{
// need to update speakers' state
- im_session->mSpeakers->update(FALSE);
+ im_session->mSpeakers->update(false);
}
return true;
}
@@ -3883,15 +3883,15 @@ void LLIMMgr::noteMutedUsers(const LLUUID& session_id,
void LLIMMgr::processIMTypingStart(const LLUUID& from_id, const EInstantMessage im_type)
{
- processIMTypingCore(from_id, im_type, TRUE);
+ processIMTypingCore(from_id, im_type, true);
}
void LLIMMgr::processIMTypingStop(const LLUUID& from_id, const EInstantMessage im_type)
{
- processIMTypingCore(from_id, im_type, FALSE);
+ processIMTypingCore(from_id, im_type, false);
}
-void LLIMMgr::processIMTypingCore(const LLUUID& from_id, const EInstantMessage im_type, BOOL typing)
+void LLIMMgr::processIMTypingCore(const LLUUID& from_id, const EInstantMessage im_type, bool typing)
{
LLUUID session_id = computeSessionID(im_type, from_id);
LLFloaterIMSession* im_floater = LLFloaterIMSession::findInstance(session_id);
@@ -4086,7 +4086,7 @@ public:
time_t timestamp =
(time_t) message_params["timestamp"].asInteger();
- BOOL is_do_not_disturb = gAgent.isDoNotDisturb();
+ bool is_do_not_disturb = gAgent.isDoNotDisturb();
//don't return if user is muted b/c proper way to ignore a muted user who
//initiated an adhoc/group conference is to create then leave the session (see STORM-1731)
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index bace97d37a..7763e79ecf 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -51,7 +51,7 @@ class LLSessionTimeoutTimer : public LLEventTimer
public:
LLSessionTimeoutTimer(const LLUUID& session_id, F32 period) : LLEventTimer(period), mSessionId(session_id) {}
virtual ~LLSessionTimeoutTimer() {};
- /* virtual */ BOOL tick();
+ /* virtual */ bool tick();
private:
LLUUID mSessionId;
@@ -297,7 +297,7 @@ public:
static void sendLeaveSession(const LLUUID& session_id, const LLUUID& other_participant_id);
static bool sendStartSession(const LLUUID& temp_session_id, const LLUUID& other_participant_id,
const uuid_vec_t& ids, EInstantMessage dialog);
- static void sendTypingState(LLUUID session_id, LLUUID other_participant_id, BOOL typing);
+ static void sendTypingState(LLUUID session_id, LLUUID other_participant_id, bool typing);
static void sendMessage(const std::string& utf8_text, const LLUUID& im_session_id,
const LLUUID& other_participant_id, EInstantMessage dialog);
@@ -330,7 +330,7 @@ class LLIMSessionObserver
{
public:
virtual ~LLIMSessionObserver() {}
- virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg) = 0;
+ virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, bool has_offline_msg) = 0;
virtual void sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) = 0;
virtual void sessionVoiceOrIMStarted(const LLUUID& session_id) = 0;
virtual void sessionRemoved(const LLUUID& session_id) = 0;
@@ -439,7 +439,7 @@ public:
// good connection.
void disconnectAllSessions();
- BOOL hasSession(const LLUUID& session_id);
+ bool hasSession(const LLUUID& session_id);
static LLUUID computeSessionID(EInstantMessage dialog, const LLUUID& other_participant_id);
@@ -499,7 +499,7 @@ private:
void noteOfflineUsers(const LLUUID& session_id, const std::vector<LLUUID>& ids);
void noteMutedUsers(const LLUUID& session_id, const std::vector<LLUUID>& ids);
- void processIMTypingCore(const LLUUID& from_id, const EInstantMessage im_type, BOOL typing);
+ void processIMTypingCore(const LLUUID& from_id, const EInstantMessage im_type, bool typing);
static void onInviteNameLookup(LLSD payload, const LLUUID& id, const LLAvatarName& name);
@@ -554,7 +554,7 @@ public:
LLCallDialog(const LLSD& payload);
virtual ~LLCallDialog();
- virtual BOOL postBuild();
+ virtual bool postBuild();
void dockToToolbarButton(const std::string& toolbarButtonName);
@@ -599,7 +599,7 @@ public:
}
}
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onOpen(const LLSD& key);
static void onAccept(void* user_data);
@@ -625,7 +625,7 @@ class LLOutgoingCallDialog : public LLCallDialog
public:
LLOutgoingCallDialog(const LLSD& payload);
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
void show(const LLSD& key);
static void onCancel(void* user_data);
diff --git a/indra/newview/llinspect.cpp b/indra/newview/llinspect.cpp
index f382b5985f..e48f5f7854 100644
--- a/indra/newview/llinspect.cpp
+++ b/indra/newview/llinspect.cpp
@@ -93,15 +93,15 @@ void LLInspect::onFocusLost()
}
// virtual
-BOOL LLInspect::handleHover(S32 x, S32 y, MASK mask)
+bool LLInspect::handleHover(S32 x, S32 y, MASK mask)
{
mOpenTimer.pause();
return LLView::handleHover(x, y, mask);
}
-BOOL LLInspect::handleToolTip(S32 x, S32 y, MASK mask)
+bool LLInspect::handleToolTip(S32 x, S32 y, MASK mask)
{
- BOOL handled = FALSE;
+ bool handled = false;
//delegate handling of tooltip to the hovered child
@@ -115,7 +115,7 @@ BOOL LLInspect::handleToolTip(S32 x, S32 y, MASK mask)
//set up delay if there is no visible tooltip at this moment
params.delay_time = LLToolTipMgr::instance().toolTipVisible() ? 0.f : LLUI::getInstance()->mSettingGroups["config"]->getF32( "ToolTipDelay" );
LLToolTipMgr::instance().show(params);
- handled = TRUE;
+ handled = true;
}
return handled;
}
diff --git a/indra/newview/llinspect.h b/indra/newview/llinspect.h
index 6909aa3f16..54ada996f3 100644
--- a/indra/newview/llinspect.h
+++ b/indra/newview/llinspect.h
@@ -40,8 +40,8 @@ public:
/// Inspectors have a custom fade-in/fade-out animation
/*virtual*/ void draw();
- /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleToolTip(S32 x, S32 y, MASK mask);
/*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask);
/// Start open animation
diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp
index b11c440015..e883abf5c2 100644
--- a/indra/newview/llinspectavatar.cpp
+++ b/indra/newview/llinspectavatar.cpp
@@ -67,7 +67,7 @@ public:
LLInspectAvatar(const LLSD& avatar_id);
virtual ~LLInspectAvatar();
- /*virtual*/ BOOL postBuild(void);
+ /*virtual*/ bool postBuild(void);
// Because floater is single instance, need to re-parse data on each spawn
// (for example, inspector about same avatar but in different position)
@@ -179,7 +179,7 @@ LLInspectAvatar::~LLInspectAvatar()
}
/*virtual*/
-BOOL LLInspectAvatar::postBuild(void)
+bool LLInspectAvatar::postBuild(void)
{
getChild<LLUICtrl>("mute_btn")->setCommitCallback(
boost::bind(&LLInspectAvatar::onClickMuteVolume, this) );
@@ -187,7 +187,7 @@ BOOL LLInspectAvatar::postBuild(void)
getChild<LLUICtrl>("volume_slider")->setCommitCallback(
boost::bind(&LLInspectAvatar::onVolumeChange, this, _2));
- return TRUE;
+ return true;
}
// Multiple calls to showInstance("inspect_avatar", foo) will provide different
diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp
index 491c90c571..1f77068694 100644
--- a/indra/newview/llinspectobject.cpp
+++ b/indra/newview/llinspectobject.cpp
@@ -70,7 +70,7 @@ public:
LLInspectObject(const LLSD& object_id);
virtual ~LLInspectObject();
- /*virtual*/ BOOL postBuild(void);
+ /*virtual*/ bool postBuild(void);
// Because floater is single instance, need to re-parse data on each spawn
// (for example, inspector about same avatar but in different position)
@@ -149,7 +149,7 @@ LLInspectObject::~LLInspectObject()
}
/*virtual*/
-BOOL LLInspectObject::postBuild(void)
+bool LLInspectObject::postBuild(void)
{
// The XML file has sample data in it. Clear that out so we don't
// flicker when data arrives off network.
@@ -187,7 +187,7 @@ BOOL LLInspectObject::postBuild(void)
boost::bind(&LLInspectObject::update, this));
}
- return TRUE;
+ return true;
}
// Multiple calls to showInstance("inspect_avatar", foo) will provide different
@@ -218,14 +218,14 @@ void LLInspectObject::onOpen(const LLSD& data)
LLViewerMediaFocus::getInstance()->clearFocus();
LLSelectMgr::instance().deselectAll();
- mObjectSelection = LLSelectMgr::instance().selectObjectAndFamily(obj,FALSE,TRUE);
+ mObjectSelection = LLSelectMgr::instance().selectObjectAndFamily(obj,false,true);
// Mark this as a transient selection
struct SetTransient : public LLSelectedNodeFunctor
{
bool apply(LLSelectNode* node)
{
- node->setTransient(TRUE);
+ node->setTransient(true);
return true;
}
} functor;
@@ -372,7 +372,7 @@ void LLInspectObject::updateButtons(LLSelectNode* nodep)
}
// No flash
- focusFirstItem(FALSE, FALSE);
+ focusFirstItem(false, false);
}
void LLInspectObject::updateSitLabel(LLSelectNode* nodep)
diff --git a/indra/newview/llinspectremoteobject.cpp b/indra/newview/llinspectremoteobject.cpp
index 77320510a6..5b63eb045d 100644
--- a/indra/newview/llinspectremoteobject.cpp
+++ b/indra/newview/llinspectremoteobject.cpp
@@ -51,7 +51,7 @@ public:
LLInspectRemoteObject(const LLSD& object_id);
virtual ~LLInspectRemoteObject() {};
- /*virtual*/ BOOL postBuild(void);
+ /*virtual*/ bool postBuild(void);
/*virtual*/ void onOpen(const LLSD& avatar_id);
void onClickMap();
@@ -80,7 +80,7 @@ LLInspectRemoteObject::LLInspectRemoteObject(const LLSD& sd) :
}
/*virtual*/
-BOOL LLInspectRemoteObject::postBuild(void)
+bool LLInspectRemoteObject::postBuild(void)
{
// hook up the inspector's buttons
getChild<LLUICtrl>("map_btn")->setCommitCallback(
@@ -90,7 +90,7 @@ BOOL LLInspectRemoteObject::postBuild(void)
getChild<LLUICtrl>("close_btn")->setCommitCallback(
boost::bind(&LLInspectRemoteObject::onClickClose, this));
- return TRUE;
+ return true;
}
/*virtual*/
diff --git a/indra/newview/llinspecttexture.cpp b/indra/newview/llinspecttexture.cpp
index 76e428b7d0..c8a2bdda7f 100644
--- a/indra/newview/llinspecttexture.cpp
+++ b/indra/newview/llinspecttexture.cpp
@@ -146,7 +146,7 @@ void LLTexturePreviewView::draw()
if (4 == m_Image->getComponents())
{
const LLColor4 color(.098f, .098f, .098f);
- gl_rect_2d(rctClient, color, TRUE);
+ gl_rect_2d(rctClient, color, true);
}
gl_draw_scaled_image(rctClient.mLeft, rctClient.mBottom, rctClient.getWidth(), rctClient.getHeight(), m_Image);
diff --git a/indra/newview/llinspecttoast.cpp b/indra/newview/llinspecttoast.cpp
index 6f93a78ca6..38272098a3 100644
--- a/indra/newview/llinspecttoast.cpp
+++ b/indra/newview/llinspecttoast.cpp
@@ -46,7 +46,7 @@ public:
virtual ~LLInspectToast();
/*virtual*/ void onOpen(const LLSD& notification_id);
- /*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleToolTip(S32 x, S32 y, MASK mask);
/*virtual*/ void deleteAllChildren();
/*virtual*/ void removeChild(LLView* child);
private:
@@ -96,14 +96,14 @@ void LLInspectToast::onOpen(const LLSD& notification_id)
LL_WARNS() << "Could not get toast's panel." << LL_ENDL;
return;
}
- panel->setVisible(TRUE);
- panel->setMouseOpaque(FALSE);
+ panel->setVisible(true);
+ panel->setMouseOpaque(false);
if(mPanel != NULL && mPanel->getParent() == this)
{
LLInspect::removeChild(mPanel);
}
addChild(panel);
- panel->setFocus(TRUE);
+ panel->setFocus(true);
mPanel = panel;
@@ -115,7 +115,7 @@ void LLInspectToast::onOpen(const LLSD& notification_id)
}
// virtual
-BOOL LLInspectToast::handleToolTip(S32 x, S32 y, MASK mask)
+bool LLInspectToast::handleToolTip(S32 x, S32 y, MASK mask)
{
// We don't like the way LLInspect handles tooltips
// (black tooltips look weird),
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index ddb69cdfb3..f865f9e29b 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -123,7 +123,7 @@ bool isMarketplaceSendAction(const std::string& action)
bool isPanelActive(const std::string& panel_name)
{
- LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
+ LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(false);
return (active_panel && (active_panel->getName() == panel_name));
}
@@ -206,7 +206,7 @@ public:
panel->getRootFolder()->update();
has_elements = true;
}
- panel->getRootFolder()->changeSelection(item, TRUE);
+ panel->getRootFolder()->changeSelection(item, true);
}
}
}
@@ -231,7 +231,7 @@ LLInvFVBridge::LLInvFVBridge(LLInventoryPanel* inventory,
mUUID(uuid),
mRoot(root),
mInvType(LLInventoryType::IT_NONE),
- mIsLink(FALSE),
+ mIsLink(false),
LLFolderViewModelItemInventory(inventory->getRootViewModel())
{
mInventoryPanel = inventory->getInventoryPanelHandle();
@@ -308,23 +308,23 @@ void LLInvFVBridge::setCreationDate(time_t creation_date_utc)
// Can be destroyed (or moved to trash)
-BOOL LLInvFVBridge::isItemRemovable() const
+bool LLInvFVBridge::isItemRemovable() const
{
return get_is_item_removable(getInventoryModel(), mUUID);
}
// Can be moved to another folder
-BOOL LLInvFVBridge::isItemMovable() const
+bool LLInvFVBridge::isItemMovable() const
{
- return TRUE;
+ return true;
}
-BOOL LLInvFVBridge::isLink() const
+bool LLInvFVBridge::isLink() const
{
return mIsLink;
}
-BOOL LLInvFVBridge::isLibraryItem() const
+bool LLInvFVBridge::isLibraryItem() const
{
return gInventory.isObjectDescendentOf(getUUID(),gInventory.getLibraryRootFolderID());
}
@@ -333,19 +333,19 @@ BOOL LLInvFVBridge::isLibraryItem() const
/**
* @brief Adds this item into clipboard storage
*/
-BOOL LLInvFVBridge::cutToClipboard()
+bool LLInvFVBridge::cutToClipboard()
{
const LLInventoryObject* obj = gInventory.getObject(mUUID);
if (obj && isItemMovable() && isItemRemovable())
{
const LLUUID &marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS);
- const BOOL cut_from_marketplacelistings = gInventory.isObjectDescendentOf(mUUID, marketplacelistings_id);
+ const bool cut_from_marketplacelistings = gInventory.isObjectDescendentOf(mUUID, marketplacelistings_id);
if (cut_from_marketplacelistings && (LLMarketplaceData::instance().isInActiveFolder(mUUID) ||
LLMarketplaceData::instance().isListedAndActive(mUUID)))
{
LLUUID parent_uuid = obj->getParentUUID();
- BOOL result = perform_cutToClipboard();
+ bool result = perform_cutToClipboard();
gInventory.addChangedMask(LLInventoryObserver::STRUCTURE, parent_uuid);
return result;
}
@@ -355,7 +355,7 @@ BOOL LLInvFVBridge::cutToClipboard()
return perform_cutToClipboard();
}
}
- return FALSE;
+ return false;
}
// virtual
@@ -369,17 +369,17 @@ bool LLInvFVBridge::isCutToClipboard()
}
// Callback for cutToClipboard if DAMA required...
-BOOL LLInvFVBridge::callback_cutToClipboard(const LLSD& notification, const LLSD& response)
+bool LLInvFVBridge::callback_cutToClipboard(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0) // YES
{
return perform_cutToClipboard();
}
- return FALSE;
+ return false;
}
-BOOL LLInvFVBridge::perform_cutToClipboard()
+bool LLInvFVBridge::perform_cutToClipboard()
{
const LLInventoryObject* obj = gInventory.getObject(mUUID);
if (obj && isItemMovable() && isItemRemovable())
@@ -387,24 +387,24 @@ BOOL LLInvFVBridge::perform_cutToClipboard()
LLClipboard::instance().setCutMode(true);
return LLClipboard::instance().addToClipboard(mUUID);
}
- return FALSE;
+ return false;
}
-BOOL LLInvFVBridge::copyToClipboard() const
+bool LLInvFVBridge::copyToClipboard() const
{
const LLInventoryObject* obj = gInventory.getObject(mUUID);
if (obj && isItemCopyable())
{
return LLClipboard::instance().addToClipboard(mUUID);
}
- return FALSE;
+ return false;
}
void LLInvFVBridge::showProperties()
{
if (isMarketplaceListingsFolder())
{
- LLFloaterReg::showInstance("item_properties", LLSD().with("id",mUUID),TRUE);
+ LLFloaterReg::showInstance("item_properties", LLSD().with("id",mUUID),true);
// Force it to show on top as this floater has a tendency to hide when confirmation dialog shows up
LLFloater* floater_properties = LLFloaterReg::findInstance("item_properties", LLSD().with("id",mUUID));
if (floater_properties)
@@ -475,7 +475,7 @@ void LLInvFVBridge::removeBatch(std::vector<LLFolderViewModelItem*>& batch)
cat = (LLViewerInventoryCategory*)model->getCategory(bridge->getUUID());
if (cat)
{
- gInventory.collectDescendents( cat->getUUID(), descendent_categories, descendent_items, FALSE );
+ gInventory.collectDescendents( cat->getUUID(), descendent_categories, descendent_items, false );
for (j=0; j<descendent_items.size(); j++)
{
if(LLAssetType::AT_GESTURE == descendent_items[j]->getType())
@@ -541,7 +541,7 @@ void LLInvFVBridge::removeBatchNoCheck(std::vector<LLFolderViewModelItem*>& ba
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- msg->addBOOLFast(_PREHASH_Stamp, TRUE);
+ msg->addBOOLFast(_PREHASH_Stamp, true);
}
msg->nextBlockFast(_PREHASH_InventoryData);
msg->addUUIDFast(_PREHASH_ItemID, item->getUUID());
@@ -582,7 +582,7 @@ void LLInvFVBridge::removeBatchNoCheck(std::vector<LLFolderViewModelItem*>& ba
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- msg->addBOOL("Stamp", TRUE);
+ msg->addBOOL("Stamp", true);
}
msg->nextBlockFast(_PREHASH_InventoryData);
msg->addUUIDFast(_PREHASH_FolderID, cat->getUUID());
@@ -619,23 +619,23 @@ void LLInvFVBridge::removeBatchNoCheck(std::vector<LLFolderViewModelItem*>& ba
model->notifyObservers();
}
-BOOL LLInvFVBridge::isClipboardPasteable() const
+bool LLInvFVBridge::isClipboardPasteable() const
{
- // Return FALSE on degenerated cases: empty clipboard, no inventory, no agent
+ // Return false on degenerated cases: empty clipboard, no inventory, no agent
if (!LLClipboard::instance().hasContents() || !isAgentInventory())
{
- return FALSE;
+ return false;
}
LLInventoryModel* model = getInventoryModel();
if (!model)
{
- return FALSE;
+ return false;
}
// In cut mode, whatever is on the clipboard is always pastable
if (LLClipboard::instance().isCutMode())
{
- return TRUE;
+ return true;
}
// In normal mode, we need to check each element of the clipboard to know if we can paste or not
@@ -652,7 +652,7 @@ BOOL LLInvFVBridge::isClipboardPasteable() const
{
LLFolderBridge cat_br(mInventoryPanel.get(), mRoot, item_id);
if (!cat_br.isItemCopyable(false))
- return FALSE;
+ return false;
// Skip to the next item in the clipboard
continue;
}
@@ -661,22 +661,22 @@ BOOL LLInvFVBridge::isClipboardPasteable() const
LLItemBridge item_br(mInventoryPanel.get(), mRoot, item_id);
if (!item_br.isItemCopyable(false))
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
-BOOL LLInvFVBridge::isClipboardPasteableAsLink() const
+bool LLInvFVBridge::isClipboardPasteableAsLink() const
{
if (!LLClipboard::instance().hasContents() || !isAgentInventory())
{
- return FALSE;
+ return false;
}
const LLInventoryModel* model = getInventoryModel();
if (!model)
{
- return FALSE;
+ return false;
}
std::vector<LLUUID> objects;
@@ -689,21 +689,21 @@ BOOL LLInvFVBridge::isClipboardPasteableAsLink() const
{
if (!LLAssetType::lookupCanLink(item->getActualType()))
{
- return FALSE;
+ return false;
}
if (gInventory.isObjectDescendentOf(item->getUUID(), gInventory.getLibraryRootFolderID()))
{
- return FALSE;
+ return false;
}
}
const LLViewerInventoryCategory *cat = model->getCategory(objects.at(i));
if (cat && LLFolderType::lookupIsProtectedType(cat->getPreferredType()))
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
void disable_context_entries_if_present(LLMenuGL& menu,
@@ -737,12 +737,12 @@ void disable_context_entries_if_present(LLMenuGL& menu,
if (found)
{
- menu_item->setVisible(TRUE);
+ menu_item->setVisible(true);
// A bit of a hack so we can remember that some UI element explicitly set this to be visible
// so that some other UI element from multi-select doesn't later set this invisible.
- menu_item->pushVisible(TRUE);
+ menu_item->pushVisible(true);
- menu_item->setEnabled(FALSE);
+ menu_item->setEnabled(false);
}
}
}
@@ -794,7 +794,7 @@ void hide_context_entries(LLMenuGL& menu,
{
if (!menu_item->getLastVisible())
{
- menu_item->setVisible(FALSE);
+ menu_item->setVisible(false);
}
if (menu_item->getEnabled())
@@ -809,16 +809,16 @@ void hide_context_entries(LLMenuGL& menu,
menuentry_vec_t::const_iterator itor2 = std::find(exceptions.begin(), exceptions.end(), name);
if (itor2 == exceptions.end())
{
- menu_item->setEnabled(FALSE);
+ menu_item->setEnabled(false);
}
}
}
else
{
- menu_item->setVisible(TRUE);
+ menu_item->setVisible(true);
// A bit of a hack so we can remember that some UI element explicitly set this to be visible
// so that some other UI element from multi-select doesn't later set this invisible.
- menu_item->pushVisible(TRUE);
+ menu_item->pushVisible(true);
bool enabled = true;
for (itor2 = disabled_entries.begin(); enabled && (itor2 != disabled_entries.end()); ++itor2)
@@ -1077,7 +1077,7 @@ void LLInvFVBridge::addDeleteContextMenuOptions(menuentry_vec_t &items,
void LLInvFVBridge::addOpenRightClickMenuOption(menuentry_vec_t &items)
{
const LLInventoryObject *obj = getInventoryObject();
- const BOOL is_link = (obj && obj->getIsLinkType());
+ const bool is_link = (obj && obj->getIsLinkType());
if (is_link)
items.push_back(std::string("Open Original"));
@@ -1189,7 +1189,7 @@ void LLInvFVBridge::addMarketplaceContextMenuOptions(U32 flags,
LLUUID local_version_folder_id = nested_parent_id(mUUID,depth-1);
LLInventoryModel::cat_array_t categories;
LLInventoryModel::item_array_t items;
- gInventory.collectDescendents(local_version_folder_id, categories, items, FALSE);
+ gInventory.collectDescendents(local_version_folder_id, categories, items, false);
LLCachedControl<U32> max_depth(gSavedSettings, "InventoryOutboxMaxFolderDepth", 4);
LLCachedControl<U32> max_count(gSavedSettings, "InventoryOutboxMaxFolderCount", 20);
if (categories.size() >= max_count
@@ -1225,9 +1225,9 @@ void LLInvFVBridge::addLinkReplaceMenuOption(menuentry_vec_t& items, menuentry_v
}
// *TODO: remove this
-BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
+bool LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
{
- BOOL rv = FALSE;
+ bool rv = false;
const LLInventoryObject* obj = getInventoryObject();
@@ -1236,7 +1236,7 @@ BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
*type = LLViewerAssetType::lookupDragAndDropType(obj->getActualType());
if(*type == DAD_NONE)
{
- return FALSE;
+ return false;
}
*id = obj->getUUID();
@@ -1247,7 +1247,7 @@ BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
LLInventoryModelBackgroundFetch::instance().start(obj->getUUID());
}
- rv = TRUE;
+ rv = true;
}
return rv;
@@ -1276,27 +1276,27 @@ LLInventoryFilter* LLInvFVBridge::getInventoryFilter() const
return panel ? &(panel->getFilter()) : NULL;
}
-BOOL LLInvFVBridge::isItemInTrash() const
+bool LLInvFVBridge::isItemInTrash() const
{
LLInventoryModel* model = getInventoryModel();
- if(!model) return FALSE;
+ if(!model) return false;
const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
return model->isObjectDescendentOf(mUUID, trash_id);
}
-BOOL LLInvFVBridge::isLinkedObjectInTrash() const
+bool LLInvFVBridge::isLinkedObjectInTrash() const
{
- if (isItemInTrash()) return TRUE;
+ if (isItemInTrash()) return true;
const LLInventoryObject *obj = getInventoryObject();
if (obj && obj->getIsLinkType())
{
LLInventoryModel* model = getInventoryModel();
- if(!model) return FALSE;
+ if(!model) return false;
const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
return model->isObjectDescendentOf(obj->getLinkedUUID(), trash_id);
}
- return FALSE;
+ return false;
}
bool LLInvFVBridge::isItemInOutfits() const
@@ -1309,68 +1309,68 @@ bool LLInvFVBridge::isItemInOutfits() const
return isCOFFolder() || (my_outfits_cat == mUUID) || model->isObjectDescendentOf(mUUID, my_outfits_cat);
}
-BOOL LLInvFVBridge::isLinkedObjectMissing() const
+bool LLInvFVBridge::isLinkedObjectMissing() const
{
const LLInventoryObject *obj = getInventoryObject();
if (!obj)
{
- return TRUE;
+ return true;
}
if (obj->getIsLinkType() && LLAssetType::lookupIsLinkType(obj->getType()))
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-BOOL LLInvFVBridge::isAgentInventory() const
+bool LLInvFVBridge::isAgentInventory() const
{
const LLInventoryModel* model = getInventoryModel();
- if(!model) return FALSE;
- if(gInventory.getRootFolderID() == mUUID) return TRUE;
+ if(!model) return false;
+ if(gInventory.getRootFolderID() == mUUID) return true;
return model->isObjectDescendentOf(mUUID, gInventory.getRootFolderID());
}
-BOOL LLInvFVBridge::isCOFFolder() const
+bool LLInvFVBridge::isCOFFolder() const
{
return LLAppearanceMgr::instance().getIsInCOF(mUUID);
}
// *TODO : Suppress isInboxFolder() once Merchant Outbox is fully deprecated
-BOOL LLInvFVBridge::isInboxFolder() const
+bool LLInvFVBridge::isInboxFolder() const
{
const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX);
if (inbox_id.isNull())
{
- return FALSE;
+ return false;
}
return gInventory.isObjectDescendentOf(mUUID, inbox_id);
}
-BOOL LLInvFVBridge::isMarketplaceListingsFolder() const
+bool LLInvFVBridge::isMarketplaceListingsFolder() const
{
const LLUUID folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS);
if (folder_id.isNull())
{
- return FALSE;
+ return false;
}
return gInventory.isObjectDescendentOf(mUUID, folder_id);
}
-BOOL LLInvFVBridge::isItemPermissive() const
+bool LLInvFVBridge::isItemPermissive() const
{
- return FALSE;
+ return false;
}
// static
void LLInvFVBridge::changeItemParent(LLInventoryModel* model,
LLViewerInventoryItem* item,
const LLUUID& new_parent_id,
- BOOL restamp)
+ bool restamp)
{
model->changeItemParent(item, new_parent_id, restamp);
}
@@ -1379,7 +1379,7 @@ void LLInvFVBridge::changeItemParent(LLInventoryModel* model,
void LLInvFVBridge::changeCategoryParent(LLInventoryModel* model,
LLViewerInventoryCategory* cat,
const LLUUID& new_parent_id,
- BOOL restamp)
+ bool restamp)
{
model->changeCategoryParent(cat, new_parent_id, restamp);
}
@@ -1904,7 +1904,7 @@ void LLItemBridge::restoreItem()
const LLUUID new_parent = model->findCategoryUUIDForType(is_snapshot? LLFolderType::FT_SNAPSHOT_CATEGORY : LLFolderType::assetTypeToFolderType(item->getType()));
// do not restamp on restore.
- LLInvFVBridge::changeItemParent(model, item, new_parent, FALSE);
+ LLInvFVBridge::changeItemParent(model, item, new_parent, false);
}
}
@@ -2042,29 +2042,29 @@ std::string LLItemBridge::getLabelSuffix() const
if(item)
{
// Any type can have the link suffix...
- BOOL broken_link = LLAssetType::lookupIsLinkType(item->getType());
+ bool broken_link = LLAssetType::lookupIsLinkType(item->getType());
if (broken_link) return BROKEN_LINK;
- BOOL link = item->getIsLinkType();
+ bool link = item->getIsLinkType();
if (link) return LINK;
// ...but it's a bit confusing to put nocopy/nomod/etc suffixes on calling cards.
if(LLAssetType::AT_CALLINGCARD != item->getType()
&& item->getPermissions().getOwner() == gAgent.getID())
{
- BOOL copy = item->getPermissions().allowCopyBy(gAgent.getID());
+ bool copy = item->getPermissions().allowCopyBy(gAgent.getID());
if (!copy)
{
suffix += " ";
suffix += NO_COPY;
}
- BOOL mod = item->getPermissions().allowModifyBy(gAgent.getID());
+ bool mod = item->getPermissions().allowModifyBy(gAgent.getID());
if (!mod)
{
suffix += suffix.empty() ? " " : ",";
suffix += NO_MOD;
}
- BOOL xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER,
+ bool xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER,
gAgent.getID());
if (!xfer)
{
@@ -2087,7 +2087,7 @@ time_t LLItemBridge::getCreationDate() const
}
-BOOL LLItemBridge::isItemRenameable() const
+bool LLItemBridge::isItemRenameable() const
{
LLViewerInventoryItem* item = getItem();
if(item)
@@ -2096,32 +2096,32 @@ BOOL LLItemBridge::isItemRenameable() const
// what the calling card points to.
if (item->getInventoryType() == LLInventoryType::IT_CALLINGCARD)
{
- return FALSE;
+ return false;
}
if (!item->isFinished()) // EXT-8662
{
- return FALSE;
+ return false;
}
if (isInboxFolder())
{
- return FALSE;
+ return false;
}
return (item->getPermissions().allowModifyBy(gAgent.getID()));
}
- return FALSE;
+ return false;
}
-BOOL LLItemBridge::renameItem(const std::string& new_name)
+bool LLItemBridge::renameItem(const std::string& new_name)
{
if(!isItemRenameable())
- return FALSE;
+ return false;
LLPreview::dirty(mUUID);
LLInventoryModel* model = getInventoryModel();
if(!model)
- return FALSE;
+ return false;
LLViewerInventoryItem* item = getItem();
if(item && (item->getName() != new_name))
{
@@ -2129,30 +2129,30 @@ BOOL LLItemBridge::renameItem(const std::string& new_name)
updates["name"] = new_name;
update_inventory_item(item->getUUID(),updates, NULL);
}
- // return FALSE because we either notified observers (& therefore
+ // return false because we either notified observers (& therefore
// rebuilt) or we didn't update.
- return FALSE;
+ return false;
}
-BOOL LLItemBridge::removeItem()
+bool LLItemBridge::removeItem()
{
if(!isItemRemovable())
{
- return FALSE;
+ return false;
}
// move it to the trash
LLInventoryModel* model = getInventoryModel();
- if(!model) return FALSE;
+ if(!model) return false;
const LLUUID& trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
LLViewerInventoryItem* item = getItem();
- if (!item) return FALSE;
+ if (!item) return false;
if (item->getType() != LLAssetType::AT_LSL_TEXT)
{
- LLPreview::hide(mUUID, TRUE);
+ LLPreview::hide(mUUID, true);
}
// Already in trash
- if (model->isObjectDescendentOf(mUUID, trash_id)) return FALSE;
+ if (model->isObjectDescendentOf(mUUID, trash_id)) return false;
LLNotification::Params params("ConfirmItemDeleteHasLinks");
params.functor.function(boost::bind(&LLItemBridge::confirmRemoveItem, this, _1, _2));
@@ -2172,37 +2172,37 @@ BOOL LLItemBridge::removeItem()
{
// Warn if the user is will break any links when deleting this item.
LLNotifications::instance().add(params);
- return FALSE;
+ return false;
}
}
}
LLNotifications::instance().forceResponse(params, 0);
model->checkTrashOverflow();
- return TRUE;
+ return true;
}
-BOOL LLItemBridge::confirmRemoveItem(const LLSD& notification, const LLSD& response)
+bool LLItemBridge::confirmRemoveItem(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- if (option != 0) return FALSE;
+ if (option != 0) return false;
LLInventoryModel* model = getInventoryModel();
- if (!model) return FALSE;
+ if (!model) return false;
LLViewerInventoryItem* item = getItem();
- if (!item) return FALSE;
+ if (!item) return false;
const LLUUID& trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
// if item is not already in trash
if(item && !model->isObjectDescendentOf(mUUID, trash_id))
{
// move to trash, and restamp
- LLInvFVBridge::changeItemParent(model, item, trash_id, TRUE);
+ LLInvFVBridge::changeItemParent(model, item, trash_id, true);
// delete was successful
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool LLItemBridge::isItemCopyable(bool can_copy_as_link) const
@@ -2252,14 +2252,14 @@ const LLUUID& LLItemBridge::getThumbnailUUID() const
return LLUUID::null;
}
-BOOL LLItemBridge::isItemPermissive() const
+bool LLItemBridge::isItemPermissive() const
{
LLViewerInventoryItem* item = getItem();
if(item)
{
return item->getIsFullPerm();
}
- return FALSE;
+ return false;
}
// +=================================================+
@@ -2269,17 +2269,17 @@ BOOL LLItemBridge::isItemPermissive() const
LLHandle<LLFolderBridge> LLFolderBridge::sSelf;
// Can be moved to another folder
-BOOL LLFolderBridge::isItemMovable() const
+bool LLFolderBridge::isItemMovable() const
{
LLInventoryObject* obj = getInventoryObject();
if(obj)
{
// If it's a protected type folder, we can't move it
if (LLFolderType::lookupIsProtectedType(((LLInventoryCategory*)obj)->getPreferredType()))
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
- return FALSE;
+ return false;
}
void LLFolderBridge::selectItem()
@@ -2367,7 +2367,7 @@ std::string LLFolderBridge::getLabelSuffix() const
{
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t item_array;
- gInventory.collectDescendents(getUUID(), cat_array, item_array, TRUE);
+ gInventory.collectDescendents(getUUID(), cat_array, item_array, true);
S32 count = item_array.size();
if(count > 0)
{
@@ -2421,7 +2421,7 @@ void LLFolderBridge::update()
class LLIsItemRemovable : public LLFolderViewFunctor
{
public:
- LLIsItemRemovable() : mPassed(TRUE) {}
+ LLIsItemRemovable() : mPassed(true) {}
virtual void doFolder(LLFolderViewFolder* folder)
{
mPassed &= folder->getViewModelItem()->isItemRemovable();
@@ -2430,15 +2430,15 @@ public:
{
mPassed &= item->getViewModelItem()->isItemRemovable();
}
- BOOL mPassed;
+ bool mPassed;
};
// Can be destroyed (or moved to trash)
-BOOL LLFolderBridge::isItemRemovable() const
+bool LLFolderBridge::isItemRemovable() const
{
if (!get_is_category_removable(getInventoryModel(), mUUID))
{
- return FALSE;
+ return false;
}
LLInventoryPanel* panel = mInventoryPanel.get();
@@ -2449,26 +2449,26 @@ BOOL LLFolderBridge::isItemRemovable() const
folderp->applyFunctorToChildren(folder_test);
if (!folder_test.mPassed)
{
- return FALSE;
+ return false;
}
}
if (isMarketplaceListingsFolder() && (!LLMarketplaceData::instance().isSLMDataFetched() || LLMarketplaceData::instance().getActivationState(mUUID)))
{
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
-BOOL LLFolderBridge::isUpToDate() const
+bool LLFolderBridge::isUpToDate() const
{
LLInventoryModel* model = getInventoryModel();
- if(!model) return FALSE;
+ if(!model) return false;
LLViewerInventoryCategory* category = (LLViewerInventoryCategory*)model->getCategory(mUUID);
if( !category )
{
- return FALSE;
+ return false;
}
return category->getVersion() != LLViewerInventoryCategory::VERSION_UNKNOWN;
@@ -2516,10 +2516,10 @@ bool LLFolderBridge::isItemCopyable(bool can_copy_as_link) const
return true;
}
-BOOL LLFolderBridge::isClipboardPasteable() const
+bool LLFolderBridge::isClipboardPasteable() const
{
if ( ! LLInvFVBridge::isClipboardPasteable() )
- return FALSE;
+ return false;
// Don't allow pasting duplicates to the Calling Card/Friends subfolders, see bug EXT-1599
if ( LLFriendCardsManager::instance().isCategoryInFriendFolder( getCategory() ) )
@@ -2527,7 +2527,7 @@ BOOL LLFolderBridge::isClipboardPasteable() const
LLInventoryModel* model = getInventoryModel();
if ( !model )
{
- return FALSE;
+ return false;
}
std::vector<LLUUID> objects;
@@ -2541,32 +2541,32 @@ BOOL LLFolderBridge::isClipboardPasteable() const
const LLUUID &obj_id = objects.at(i);
if ( LLFriendCardsManager::instance().isObjDirectDescendentOfCategory(model->getObject(obj_id), current_cat) )
{
- return FALSE;
+ return false;
}
}
}
- return TRUE;
+ return true;
}
-BOOL LLFolderBridge::isClipboardPasteableAsLink() const
+bool LLFolderBridge::isClipboardPasteableAsLink() const
{
// Check normal paste-as-link permissions
if (!LLInvFVBridge::isClipboardPasteableAsLink())
{
- return FALSE;
+ return false;
}
const LLInventoryModel* model = getInventoryModel();
if (!model)
{
- return FALSE;
+ return false;
}
const LLViewerInventoryCategory *current_cat = getCategory();
if (current_cat)
{
- const BOOL is_in_friend_folder = LLFriendCardsManager::instance().isCategoryInFriendFolder( current_cat );
+ const bool is_in_friend_folder = LLFriendCardsManager::instance().isCategoryInFriendFolder( current_cat );
const LLUUID &current_cat_id = current_cat->getUUID();
std::vector<LLUUID> objects;
LLClipboard::instance().pasteFromClipboard(objects);
@@ -2582,7 +2582,7 @@ BOOL LLFolderBridge::isClipboardPasteableAsLink() const
if ((cat_id == current_cat_id) ||
model->isObjectDescendentOf(current_cat_id, cat_id))
{
- return FALSE;
+ return false;
}
}
// Don't allow pasting duplicates to the Calling Card/Friends subfolders, see bug EXT-1599
@@ -2593,30 +2593,30 @@ BOOL LLFolderBridge::isClipboardPasteableAsLink() const
// in case type of obj_id is LLInventoryItem.
if ( LLFriendCardsManager::instance().isObjDirectDescendentOfCategory(model->getObject(obj_id), current_cat) )
{
- return FALSE;
+ return false;
}
}
}
}
- return TRUE;
+ return true;
}
-BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
- BOOL drop,
+bool LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
+ bool drop,
std::string& tooltip_msg,
- BOOL is_link,
- BOOL user_confirm,
+ bool is_link,
+ bool user_confirm,
LLPointer<LLInventoryCallback> cb)
{
LLInventoryModel* model = getInventoryModel();
- if (!inv_cat) return FALSE; // shouldn't happen, but in case item is incorrectly parented in which case inv_cat will be NULL
- if (!model) return FALSE;
- if (!isAgentAvatarValid()) return FALSE;
- if (!isAgentInventory()) return FALSE; // cannot drag categories into library
+ if (!inv_cat) return false; // shouldn't happen, but in case item is incorrectly parented in which case inv_cat will be NULL
+ if (!model) return false;
+ if (!isAgentAvatarValid()) return false;
+ if (!isAgentInventory()) return false; // cannot drag categories into library
LLInventoryPanel* destination_panel = mInventoryPanel.get();
if (!destination_panel) return false;
@@ -2629,18 +2629,18 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS);
const LLUUID from_folder_uuid = inv_cat->getParentUUID();
- const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
- const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id);
- const BOOL move_is_from_marketplacelistings = model->isObjectDescendentOf(cat_id, marketplacelistings_id);
+ const bool move_is_into_current_outfit = (mUUID == current_outfit_id);
+ const bool move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id);
+ const bool move_is_from_marketplacelistings = model->isObjectDescendentOf(cat_id, marketplacelistings_id);
// check to make sure source is agent inventory, and is represented there.
LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource();
- const BOOL is_agent_inventory = (model->getCategory(cat_id) != NULL)
+ const bool is_agent_inventory = (model->getCategory(cat_id) != NULL)
&& (LLToolDragAndDrop::SOURCE_AGENT == source);
- BOOL accept = FALSE;
+ bool accept = false;
U64 filter_types = filter->getFilterTypes();
- BOOL use_filter = filter_types && (filter_types&LLInventoryFilter::FILTERTYPE_DATE || (filter_types&LLInventoryFilter::FILTERTYPE_OBJECT)==0);
+ bool use_filter = filter_types && (filter_types&LLInventoryFilter::FILTERTYPE_DATE || (filter_types&LLInventoryFilter::FILTERTYPE_OBJECT)==0);
if (is_agent_inventory)
{
@@ -2649,44 +2649,44 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
const LLUUID &my_outifts_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
const LLUUID &lost_and_found_id = model->findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND);
- const BOOL move_is_into_trash = (mUUID == trash_id) || model->isObjectDescendentOf(mUUID, trash_id);
- const BOOL move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id);
- const BOOL move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
- const BOOL move_is_into_current_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_CURRENT_OUTFIT);
- const BOOL move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id);
- const BOOL move_is_into_lost_and_found = model->isObjectDescendentOf(mUUID, lost_and_found_id);
+ const bool move_is_into_trash = (mUUID == trash_id) || model->isObjectDescendentOf(mUUID, trash_id);
+ const bool move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id);
+ const bool move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
+ const bool move_is_into_current_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_CURRENT_OUTFIT);
+ const bool move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id);
+ const bool move_is_into_lost_and_found = model->isObjectDescendentOf(mUUID, lost_and_found_id);
//--------------------------------------------------------------------------------
// Determine if folder can be moved.
//
- BOOL is_movable = TRUE;
+ bool is_movable = true;
if (is_movable && (marketplacelistings_id == cat_id))
{
- is_movable = FALSE;
+ is_movable = false;
tooltip_msg = LLTrans::getString("TooltipOutboxCannotMoveRoot");
}
if (is_movable && move_is_from_marketplacelistings && LLMarketplaceData::instance().getActivationState(cat_id))
{
// If the incoming folder is listed and active (and is therefore either the listing or the version folder),
// then moving is *not* allowed
- is_movable = FALSE;
+ is_movable = false;
tooltip_msg = LLTrans::getString("TooltipOutboxDragActive");
}
if (is_movable && (mUUID == cat_id))
{
- is_movable = FALSE;
+ is_movable = false;
tooltip_msg = LLTrans::getString("TooltipDragOntoSelf");
}
if (is_movable && (model->isObjectDescendentOf(mUUID, cat_id)))
{
- is_movable = FALSE;
+ is_movable = false;
tooltip_msg = LLTrans::getString("TooltipDragOntoOwnChild");
}
if (is_movable && LLFolderType::lookupIsProtectedType(inv_cat->getPreferredType()))
{
- is_movable = FALSE;
+ is_movable = false;
// tooltip?
}
@@ -2721,21 +2721,21 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
}
if(is_movable && move_is_into_current_outfit && is_link)
{
- is_movable = FALSE;
+ is_movable = false;
}
if (is_movable && move_is_into_lost_and_found)
{
- is_movable = FALSE;
+ is_movable = false;
}
if (is_movable && (mUUID == model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE)))
{
- is_movable = FALSE;
+ is_movable = false;
// tooltip?
}
if (is_movable && (getPreferredType() == LLFolderType::FT_MARKETPLACE_STOCK))
{
// One cannot move a folder into a stock folder
- is_movable = FALSE;
+ is_movable = false;
// tooltip?
}
@@ -2743,14 +2743,14 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
LLInventoryModel::item_array_t descendent_items;
if (is_movable)
{
- model->collectDescendents(cat_id, descendent_categories, descendent_items, FALSE);
+ model->collectDescendents(cat_id, descendent_categories, descendent_items, false);
for (S32 i=0; i < descendent_categories.size(); ++i)
{
LLInventoryCategory* category = descendent_categories[i];
if(LLFolderType::lookupIsProtectedType(category->getPreferredType()))
{
// Can't move "special folders" (e.g. Textures Folder).
- is_movable = FALSE;
+ is_movable = false;
break;
}
}
@@ -2771,7 +2771,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
if (items.size() > max_items_to_wear)
{
// Can't move 'large' folders into current outfit: MAINT-4086
- is_movable = FALSE;
+ is_movable = false;
LLStringUtil::format_map_t args;
args["AMOUNT"] = llformat("%d", max_items_to_wear);
tooltip_msg = LLTrans::getString("TooltipTooManyWearables",args);
@@ -2784,7 +2784,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
LLInventoryItem* item = descendent_items[i];
if (get_is_item_worn(item->getUUID()))
{
- is_movable = FALSE;
+ is_movable = false;
break; // It's generally movable, but not into the trash.
}
}
@@ -2799,7 +2799,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
// We use getType() instead of getActua;Type() to allow links to landmarks and folders.
if (LLAssetType::AT_LANDMARK != item->getType() && LLAssetType::AT_CATEGORY != item->getType())
{
- is_movable = FALSE;
+ is_movable = false;
break; // It's generally movable, but not into Landmarks.
}
}
@@ -2815,7 +2815,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
if (is_movable && !move_is_into_landmarks)
{
- LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
+ LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(false);
is_movable = active_panel != NULL;
// For a folder to pass the filter all its descendants are required to pass.
@@ -2921,7 +2921,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
inv_cat->getPreferredType() == LLFolderType::FT_OUTFIT))
{
// traverse category and add all contents to currently worn.
- BOOL append = true;
+ bool append = true;
LLAppearanceMgr::instance().wearInventoryCategory(inv_cat, false, append);
if (cb) cb->fire(inv_cat->getUUID());
}
@@ -2986,7 +2986,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
if (move_is_into_marketplacelistings)
{
tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory");
- accept = FALSE;
+ accept = false;
}
else
{
@@ -3013,7 +3013,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
if (move_is_into_marketplacelistings)
{
tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory");
- accept = FALSE;
+ accept = false;
}
else
{
@@ -3073,9 +3073,9 @@ void warn_move_inventory(LLViewerObject* object, std::shared_ptr<LLMoveInv> move
// Move/copy all inventory items from the Contents folder of an in-world
// object to the agent's inventory, inside a given category.
-BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
+bool move_inv_category_world_to_agent(const LLUUID& object_id,
const LLUUID& category_id,
- BOOL drop,
+ bool drop,
std::function<void(S32, void*, const LLMoveInv*)> callback,
void* user_data,
LLInventoryFilter* filter)
@@ -3088,7 +3088,7 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
if(!object)
{
LL_INFOS() << "Object not found for drop." << LL_ENDL;
- return FALSE;
+ return false;
}
// this folder is coming from an object, as there is only one folder in an object, the root,
@@ -3099,12 +3099,12 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
if (inventory_objects.empty())
{
LL_INFOS() << "Object contents not found for drop." << LL_ENDL;
- return FALSE;
+ return false;
}
- BOOL accept = FALSE;
- BOOL is_move = FALSE;
- BOOL use_filter = FALSE;
+ bool accept = false;
+ bool is_move = false;
+ bool use_filter = false;
if (filter)
{
U64 filter_types = filter->getFilterTypes();
@@ -3131,15 +3131,15 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
&& perm.allowTransferTo(gAgent.getID())))
// || gAgent.isGodlike())
{
- accept = TRUE;
+ accept = true;
}
else if(object->permYouOwner())
{
// If the object cannot be copied, but the object the
// inventory is owned by the agent, then the item can be
// moved from the task to agent inventory.
- is_move = TRUE;
- accept = TRUE;
+ is_move = true;
+ accept = true;
}
if (accept && use_filter)
@@ -3336,7 +3336,7 @@ void LLInventoryCopyAndWearObserver::changed(U32 mask)
{
if ((*id_it) == mCatID)
{
- mFolderAdded = TRUE;
+ mFolderAdded = true;
break;
}
}
@@ -3356,7 +3356,7 @@ void LLInventoryCopyAndWearObserver::changed(U32 mask)
mContentsCount)
{
gInventory.removeObserver(this);
- LLAppearanceMgr::instance().wearInventoryCategory(category, FALSE, !mReplace);
+ LLAppearanceMgr::instance().wearInventoryCategory(category, false, !mReplace);
delete this;
}
}
@@ -3402,12 +3402,12 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action)
}
else if ("replaceoutfit" == action)
{
- modifyOutfit(FALSE);
+ modifyOutfit(false);
return;
}
else if ("addtooutfit" == action)
{
- modifyOutfit(TRUE);
+ modifyOutfit(true);
return;
}
else if ("show_in_main_panel" == action)
@@ -3708,7 +3708,7 @@ void LLFolderBridge::determineFolderType()
}
}
-BOOL LLFolderBridge::isItemRenameable() const
+bool LLFolderBridge::isItemRenameable() const
{
return get_is_category_renameable(getInventoryModel(), mUUID);
}
@@ -3722,7 +3722,7 @@ void LLFolderBridge::restoreItem()
LLInventoryModel* model = getInventoryModel();
const LLUUID new_parent = model->findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(cat->getType()));
// do not restamp children on restore
- LLInvFVBridge::changeCategoryParent(model, cat, new_parent, FALSE);
+ LLInvFVBridge::changeCategoryParent(model, cat, new_parent, false);
}
}
@@ -3741,15 +3741,15 @@ LLFolderType::EType LLFolderBridge::getPreferredType() const
// Icons for folders are based on the preferred type
LLUIImagePtr LLFolderBridge::getIcon() const
{
- return getFolderIcon(FALSE);
+ return getFolderIcon(false);
}
LLUIImagePtr LLFolderBridge::getIconOpen() const
{
- return getFolderIcon(TRUE);
+ return getFolderIcon(true);
}
-LLUIImagePtr LLFolderBridge::getFolderIcon(BOOL is_open) const
+LLUIImagePtr LLFolderBridge::getFolderIcon(bool is_open) const
{
LLFolderType::EType preferred_type = getPreferredType();
return LLUI::getUIImage(LLViewerFolderType::lookupIconName(preferred_type, is_open));
@@ -3758,7 +3758,7 @@ LLUIImagePtr LLFolderBridge::getFolderIcon(BOOL is_open) const
// static : use by LLLinkFolderBridge to get the closed type icons
LLUIImagePtr LLFolderBridge::getIcon(LLFolderType::EType preferred_type)
{
- return LLUI::getUIImage(LLViewerFolderType::lookupIconName(preferred_type, FALSE));
+ return LLUI::getUIImage(LLViewerFolderType::lookupIconName(preferred_type, false));
}
LLUIImagePtr LLFolderBridge::getIconOverlay() const
@@ -3770,7 +3770,7 @@ LLUIImagePtr LLFolderBridge::getIconOverlay() const
return NULL;
}
-BOOL LLFolderBridge::renameItem(const std::string& new_name)
+bool LLFolderBridge::renameItem(const std::string& new_name)
{
LLScrollOnRenameObserver *observer = new LLScrollOnRenameObserver(mUUID, mRoot);
@@ -3778,16 +3778,16 @@ BOOL LLFolderBridge::renameItem(const std::string& new_name)
rename_category(getInventoryModel(), mUUID, new_name);
- // return FALSE because we either notified observers (& therefore
+ // return false because we either notified observers (& therefore
// rebuilt) or we didn't update.
- return FALSE;
+ return false;
}
-BOOL LLFolderBridge::removeItem()
+bool LLFolderBridge::removeItem()
{
if(!isItemRemovable())
{
- return FALSE;
+ return false;
}
const LLViewerInventoryCategory *cat = getCategory();
@@ -3798,16 +3798,16 @@ BOOL LLFolderBridge::removeItem()
LLNotification::Params params("ConfirmDeleteProtectedCategory");
params.payload(payload).substitutions(args).functor.function(boost::bind(&LLFolderBridge::removeItemResponse, this, _1, _2));
LLNotifications::instance().forceResponse(params, 0);
- return TRUE;
+ return true;
}
-BOOL LLFolderBridge::removeSystemFolder()
+bool LLFolderBridge::removeSystemFolder()
{
const LLViewerInventoryCategory *cat = getCategory();
if (!LLFolderType::lookupIsProtectedType(cat->getPreferredType()))
{
- return FALSE;
+ return false;
}
LLSD payload;
@@ -3819,7 +3819,7 @@ BOOL LLFolderBridge::removeSystemFolder()
{
LLNotifications::instance().add(params);
}
- return TRUE;
+ return true;
}
bool LLFolderBridge::removeItemResponse(const LLSD& notification, const LLSD& response)
@@ -3832,9 +3832,9 @@ bool LLFolderBridge::removeItemResponse(const LLSD& notification, const LLSD& re
// move it to the trash
LLPreview::hide(mUUID);
getInventoryModel()->removeCategory(mUUID);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
//Recursively update the folder's creation date
@@ -3856,9 +3856,9 @@ void LLFolderBridge::pasteFromClipboard()
if (model && isClipboardPasteable())
{
const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS);
- const BOOL paste_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id);
+ const bool paste_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id);
- BOOL cut_from_marketplacelistings = FALSE;
+ bool cut_from_marketplacelistings = false;
if (LLClipboard::instance().isCutMode())
{
//Items are not removed from folder on "cut", so we need update listing folder on "paste" operation
@@ -3870,7 +3870,7 @@ void LLFolderBridge::pasteFromClipboard()
if(gInventory.isObjectDescendentOf(item_id, marketplacelistings_id) && (LLMarketplaceData::instance().isInActiveFolder(item_id) ||
LLMarketplaceData::instance().isListedAndActive(item_id)))
{
- cut_from_marketplacelistings = TRUE;
+ cut_from_marketplacelistings = true;
break;
}
}
@@ -3922,12 +3922,12 @@ void LLFolderBridge::perform_pasteFromClipboard()
const LLUUID &my_outifts_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
const LLUUID &lost_and_found_id = model->findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND);
- const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
- const BOOL move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id);
- const BOOL move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
- const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id);
- const BOOL move_is_into_favorites = (mUUID == favorites_id);
- const BOOL move_is_into_lost_and_found = model->isObjectDescendentOf(mUUID, lost_and_found_id);
+ const bool move_is_into_current_outfit = (mUUID == current_outfit_id);
+ const bool move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id);
+ const bool move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
+ const bool move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id);
+ const bool move_is_into_favorites = (mUUID == favorites_id);
+ const bool move_is_into_lost_and_found = model->isObjectDescendentOf(mUUID, lost_and_found_id);
std::vector<LLUUID> objects;
LLClipboard::instance().pasteFromClipboard(objects);
@@ -4055,7 +4055,7 @@ void LLFolderBridge::perform_pasteFromClipboard()
if (viitem)
{
//changeItemParent() implicity calls dirtyFilter
- changeItemParent(model, viitem, parent_id, FALSE);
+ changeItemParent(model, viitem, parent_id, false);
if (cb) cb->fire(item_id);
}
}
@@ -4087,7 +4087,7 @@ void LLFolderBridge::perform_pasteFromClipboard()
else
{
//changeCategoryParent() implicity calls dirtyFilter
- changeCategoryParent(model, vicat, parent_id, FALSE);
+ changeCategoryParent(model, vicat, parent_id, false);
}
if (cb) cb->fire(item_id);
}
@@ -4109,7 +4109,7 @@ void LLFolderBridge::perform_pasteFromClipboard()
else
{
//changeItemParent() implicity calls dirtyFilter
- changeItemParent(model, viitem, parent_id, FALSE);
+ changeItemParent(model, viitem, parent_id, false);
}
if (cb) cb->fire(item_id);
}
@@ -4185,10 +4185,10 @@ void LLFolderBridge::pasteLinkFromClipboard()
const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS);
const LLUUID &my_outifts_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
- const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
- const BOOL move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id);
- const BOOL move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
- const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id);
+ const bool move_is_into_current_outfit = (mUUID == current_outfit_id);
+ const bool move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id);
+ const bool move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
+ const bool move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id);
if (move_is_into_marketplacelistings)
{
@@ -4241,7 +4241,7 @@ void LLFolderBridge::staticFolderOptionsMenu()
}
}
-BOOL LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& is_type)
+bool LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& is_type)
{
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t item_array;
@@ -4250,7 +4250,7 @@ BOOL LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInv
item_array,
LLInventoryModel::EXCLUDE_TRASH,
is_type);
- return ((item_array.size() > 0) ? TRUE : FALSE );
+ return ((item_array.size() > 0) ? true : false );
}
void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items, menuentry_vec_t& disabled_items)
@@ -4363,12 +4363,10 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
if (!isInboxFolder() // don't allow creation in inbox
&& outfits_id != mUUID)
{
- bool menu_items_added = false;
// Do not allow to create 2-level subfolder in the Calling Card/Friends folder. EXT-694.
if (!LLFriendCardsManager::instance().isCategoryInFriendFolder(cat))
{
items.push_back(std::string("New Folder"));
- menu_items_added = true;
}
if (!isMarketplaceListingsFolder())
{
@@ -4386,10 +4384,6 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
disabled_items.push_back("New Settings");
}
}
- if (menu_items_added)
- {
- items.push_back(std::string("Create Separator"));
- }
}
getClipboardEntries(false, items, disabled_items, flags);
}
@@ -4418,12 +4412,12 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
}
//Added by aura to force inventory pull on right-click to display folder options correctly. 07-17-06
- mCallingCards = mWearables = FALSE;
+ mCallingCards = mWearables = false;
LLIsType is_callingcard(LLAssetType::AT_CALLINGCARD);
if (checkFolderForContentsOfType(model, is_callingcard))
{
- mCallingCards=TRUE;
+ mCallingCards=true;
}
LLFindWearables is_wearable;
@@ -4434,7 +4428,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
checkFolderForContentsOfType(model, is_object) ||
checkFolderForContentsOfType(model, is_gesture) )
{
- mWearables=TRUE;
+ mWearables=true;
}
}
else
@@ -4455,7 +4449,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
checkFolderForContentsOfType(model, is_object) ||
checkFolderForContentsOfType(model, is_gesture))
{
- mWearables = TRUE;
+ mWearables = true;
}
if (!is_system_folder)
@@ -4664,13 +4658,13 @@ void LLFolderBridge::addOpenFolderMenuOptions(U32 flags, menuentry_vec_t& items)
bool LLFolderBridge::hasChildren() const
{
LLInventoryModel* model = getInventoryModel();
- if(!model) return FALSE;
+ if(!model) return false;
LLInventoryModel::EHasChildren has_children;
has_children = gInventory.categoryHasChildren(mUUID);
return has_children != LLInventoryModel::CHILDREN_NO;
}
-BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop,
+bool LLFolderBridge::dragOrDrop(MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
std::string& tooltip_msg)
@@ -4690,7 +4684,7 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop,
//LL_INFOS() << "LLFolderBridge::dragOrDrop()" << LL_ENDL;
- BOOL accept = FALSE;
+ bool accept = false;
switch(cargo_type)
{
case DAD_TEXTURE:
@@ -4707,7 +4701,7 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop,
case DAD_MESH:
case DAD_SETTINGS:
case DAD_MATERIAL:
- accept = dragItemIntoFolder(inv_item, drop, tooltip_msg, TRUE, drop_cb);
+ accept = dragItemIntoFolder(inv_item, drop, tooltip_msg, true, drop_cb);
break;
case DAD_LINK:
// DAD_LINK type might mean one of two asset types: AT_LINK or AT_LINK_FOLDER.
@@ -4718,22 +4712,22 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop,
LLInventoryCategory* linked_category = gInventory.getCategory(inv_item->getLinkedUUID());
if (linked_category)
{
- accept = dragCategoryIntoFolder((LLInventoryCategory*)linked_category, drop, tooltip_msg, TRUE, TRUE, drop_cb);
+ accept = dragCategoryIntoFolder((LLInventoryCategory*)linked_category, drop, tooltip_msg, true, true, drop_cb);
}
}
else
{
- accept = dragItemIntoFolder(inv_item, drop, tooltip_msg, TRUE, drop_cb);
+ accept = dragItemIntoFolder(inv_item, drop, tooltip_msg, true, drop_cb);
}
break;
case DAD_CATEGORY:
if (LLFriendCardsManager::instance().isAnyFriendCategory(mUUID))
{
- accept = FALSE;
+ accept = false;
}
else
{
- accept = dragCategoryIntoFolder((LLInventoryCategory*)cargo_data, drop, tooltip_msg, FALSE, TRUE, drop_cb);
+ accept = dragCategoryIntoFolder((LLInventoryCategory*)cargo_data, drop, tooltip_msg, false, true, drop_cb);
}
break;
case DAD_ROOT_CATEGORY:
@@ -4861,7 +4855,7 @@ void LLFolderBridge::createWearable(LLFolderBridge* bridge, LLWearableType::ETyp
LLAgentWearables::createWearable(type, false, parent_id);
}
-void LLFolderBridge::modifyOutfit(BOOL append)
+void LLFolderBridge::modifyOutfit(bool append)
{
LLInventoryModel* model = getInventoryModel();
if(!model) return;
@@ -4889,12 +4883,12 @@ void LLFolderBridge::modifyOutfit(BOOL append)
if (isAgentInventory())
{
- LLAppearanceMgr::instance().wearInventoryCategory(cat, FALSE, append);
+ LLAppearanceMgr::instance().wearInventoryCategory(cat, false, append);
}
else
{
// Library, we need to copy content first
- LLAppearanceMgr::instance().wearInventoryCategory(cat, TRUE, append);
+ LLAppearanceMgr::instance().wearInventoryCategory(cat, true, append);
}
}
@@ -4915,15 +4909,15 @@ LLFolderBridge(inventory, root, uuid)
LLUIImagePtr LLMarketplaceFolderBridge::getIcon() const
{
- return getMarketplaceFolderIcon(FALSE);
+ return getMarketplaceFolderIcon(false);
}
LLUIImagePtr LLMarketplaceFolderBridge::getIconOpen() const
{
- return getMarketplaceFolderIcon(TRUE);
+ return getMarketplaceFolderIcon(true);
}
-LLUIImagePtr LLMarketplaceFolderBridge::getMarketplaceFolderIcon(BOOL is_open) const
+LLUIImagePtr LLMarketplaceFolderBridge::getMarketplaceFolderIcon(bool is_open) const
{
LLFolderType::EType preferred_type = getPreferredType();
if (!LLMarketplaceData::instance().isUpdating(getUUID()))
@@ -5089,7 +5083,7 @@ void LLFolderBridge::dropToFavorites(LLInventoryItem* inv_item, LLPointer<LLInve
callback);
}
-void LLFolderBridge::dropToOutfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit, LLPointer<LLInventoryCallback> cb)
+void LLFolderBridge::dropToOutfit(LLInventoryItem* inv_item, bool move_is_into_current_outfit, LLPointer<LLInventoryCallback> cb)
{
if((inv_item->getInventoryType() == LLInventoryType::IT_TEXTURE) || (inv_item->getInventoryType() == LLInventoryType::IT_SNAPSHOT))
{
@@ -5171,7 +5165,7 @@ void LLFolderBridge::callback_dropItemIntoFolder(const LLSD& notification, const
if (option == 0) // YES
{
std::string tooltip_msg;
- dragItemIntoFolder(inv_item, TRUE, tooltip_msg, FALSE);
+ dragItemIntoFolder(inv_item, true, tooltip_msg, false);
}
}
@@ -5182,24 +5176,24 @@ void LLFolderBridge::callback_dropCategoryIntoFolder(const LLSD& notification, c
if (option == 0) // YES
{
std::string tooltip_msg;
- dragCategoryIntoFolder(inv_category, TRUE, tooltip_msg, FALSE, FALSE);
+ dragCategoryIntoFolder(inv_category, true, tooltip_msg, false, false);
}
}
// This is used both for testing whether an item can be dropped
// into the folder, as well as performing the actual drop, depending
-// if drop == TRUE.
-BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
- BOOL drop,
+// if drop == true.
+bool LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
+ bool drop,
std::string& tooltip_msg,
- BOOL user_confirm,
+ bool user_confirm,
LLPointer<LLInventoryCallback> cb)
{
LLInventoryModel* model = getInventoryModel();
- if (!model || !inv_item) return FALSE;
- if (!isAgentInventory()) return FALSE; // cannot drag into library
- if (!isAgentAvatarValid()) return FALSE;
+ if (!model || !inv_item) return false;
+ if (!isAgentInventory()) return false; // cannot drag into library
+ if (!isAgentAvatarValid()) return false;
LLInventoryPanel* destination_panel = mInventoryPanel.get();
if (!destination_panel) return false;
@@ -5214,33 +5208,33 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
const LLUUID &my_outifts_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
const LLUUID from_folder_uuid = inv_item->getParentUUID();
- const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
- const BOOL move_is_into_favorites = (mUUID == favorites_id);
- const BOOL move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id);
- const BOOL move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
- const BOOL move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id);
- const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id);
- const BOOL move_is_from_marketplacelistings = model->isObjectDescendentOf(inv_item->getUUID(), marketplacelistings_id);
+ const bool move_is_into_current_outfit = (mUUID == current_outfit_id);
+ const bool move_is_into_favorites = (mUUID == favorites_id);
+ const bool move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id);
+ const bool move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
+ const bool move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id);
+ const bool move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id);
+ const bool move_is_from_marketplacelistings = model->isObjectDescendentOf(inv_item->getUUID(), marketplacelistings_id);
LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource();
- BOOL accept = FALSE;
+ bool accept = false;
U64 filter_types = filter->getFilterTypes();
// We shouldn't allow to drop non recent items into recent tab (or some similar transactions)
// while we are allowing to interact with regular filtered inventory
- BOOL use_filter = filter_types && (filter_types&LLInventoryFilter::FILTERTYPE_DATE || (filter_types&LLInventoryFilter::FILTERTYPE_OBJECT)==0);
+ bool use_filter = filter_types && (filter_types&LLInventoryFilter::FILTERTYPE_DATE || (filter_types&LLInventoryFilter::FILTERTYPE_OBJECT)==0);
LLViewerObject* object = NULL;
if(LLToolDragAndDrop::SOURCE_AGENT == source)
{
const LLUUID &trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
- const BOOL move_is_into_trash = (mUUID == trash_id) || model->isObjectDescendentOf(mUUID, trash_id);
- const BOOL move_is_outof_current_outfit = LLAppearanceMgr::instance().getIsInCOF(inv_item->getUUID());
+ const bool move_is_into_trash = (mUUID == trash_id) || model->isObjectDescendentOf(mUUID, trash_id);
+ const bool move_is_outof_current_outfit = LLAppearanceMgr::instance().getIsInCOF(inv_item->getUUID());
//--------------------------------------------------------------------------------
// Determine if item can be moved.
//
- BOOL is_movable = TRUE;
+ bool is_movable = true;
switch (inv_item->getActualType())
{
@@ -5253,7 +5247,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
// Can't explicitly drag things out of the COF.
if (move_is_outof_current_outfit)
{
- is_movable = FALSE;
+ is_movable = false;
}
if (move_is_into_trash)
{
@@ -5276,15 +5270,15 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
// Determine if item can be moved & dropped
// Note: if user_confirm is false, we already went through those accept logic test and can skip them
- accept = TRUE;
+ accept = true;
if (user_confirm && !is_movable)
{
- accept = FALSE;
+ accept = false;
}
else if (user_confirm && (mUUID == inv_item->getParentUUID()) && !move_is_into_favorites)
{
- accept = FALSE;
+ accept = false;
}
else if (user_confirm && (move_is_into_current_outfit || move_is_into_outfit))
{
@@ -5308,7 +5302,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
accept = dest_folder->acceptItem(inv_item);
}
- LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
+ LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(false);
// Check whether the item being dragged from active inventory panel
// passes the filter of the destination panel.
@@ -5437,26 +5431,26 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
if (!object)
{
LL_INFOS() << "Object not found for drop." << LL_ENDL;
- return FALSE;
+ return false;
}
// coming from a task. Need to figure out if the person can
// move/copy this item.
LLPermissions perm(inv_item->getPermissions());
- BOOL is_move = FALSE;
+ bool is_move = false;
if ((perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID())
&& perm.allowTransferTo(gAgent.getID())))
// || gAgent.isGodlike())
{
- accept = TRUE;
+ accept = true;
}
else if(object->permYouOwner())
{
// If the object cannot be copied, but the object the
// inventory is owned by the agent, then the item can be
// moved from the task to agent inventory.
- is_move = TRUE;
- accept = TRUE;
+ is_move = true;
+ accept = true;
}
// Don't allow placing an original item into Current Outfit or an outfit folder
@@ -5464,19 +5458,19 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
// *TODO: Probably we should create a link to an item if it was dragged to outfit or COF.
if (move_is_into_current_outfit || move_is_into_outfit)
{
- accept = FALSE;
+ accept = false;
}
// Don't allow to move a single item to Favorites or Landmarks
// if it is not a landmark or a link to a landmark.
else if ((move_is_into_favorites || move_is_into_landmarks)
&& !can_move_to_landmarks(inv_item))
{
- accept = FALSE;
+ accept = false;
}
else if (move_is_into_marketplacelistings)
{
tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory");
- accept = FALSE;
+ accept = false;
}
// Check whether the item being dragged from in world
@@ -5519,12 +5513,12 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
if (move_is_into_marketplacelistings)
{
tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory");
- accept = FALSE;
+ accept = false;
}
else if ((inv_item->getActualType() == LLAssetType::AT_SETTINGS) && !LLEnvironment::instance().isInventoryEnabled())
{
tooltip_msg = LLTrans::getString("NoEnvironmentSettings");
- accept = FALSE;
+ accept = false;
}
else
{
@@ -5553,12 +5547,12 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
LLViewerInventoryItem* item = (LLViewerInventoryItem*)inv_item;
if(item && item->isFinished())
{
- accept = TRUE;
+ accept = true;
if (move_is_into_marketplacelistings)
{
tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory");
- accept = FALSE;
+ accept = false;
}
else if (move_is_into_current_outfit || move_is_into_outfit)
{
@@ -5571,7 +5565,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
accept = can_move_to_landmarks(inv_item);
}
- LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
+ LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(false);
// Check whether the item being dragged from the library
// passes the filter of the destination panel.
@@ -5633,7 +5627,7 @@ bool check_category(LLInventoryModel* model,
LLInventoryModel::cat_array_t descendent_categories;
LLInventoryModel::item_array_t descendent_items;
- model->collectDescendents(cat_id, descendent_categories, descendent_items, TRUE);
+ model->collectDescendents(cat_id, descendent_categories, descendent_items, true);
S32 num_descendent_categories = descendent_categories.size();
S32 num_descendent_items = descendent_items.size();
@@ -5880,16 +5874,16 @@ LLLandmarkBridge::LLLandmarkBridge(LLInventoryPanel* inventory,
U32 flags/* = 0x00*/) :
LLItemBridge(inventory, root, uuid)
{
- mVisited = FALSE;
+ mVisited = false;
if (flags & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED)
{
- mVisited = TRUE;
+ mVisited = true;
}
}
LLUIImagePtr LLLandmarkBridge::getIcon() const
{
- return LLInventoryIcon::getIcon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, mVisited, FALSE);
+ return LLInventoryIcon::getIcon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, mVisited, false);
}
void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
@@ -6146,13 +6140,13 @@ void LLCallingCardBridge::performAction(LLInventoryModel* model, std::string act
LLUIImagePtr LLCallingCardBridge::getIcon() const
{
- BOOL online = FALSE;
+ bool online = false;
LLViewerInventoryItem* item = getItem();
if(item)
{
online = LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID());
}
- return LLInventoryIcon::getIcon(LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, online, FALSE);
+ return LLInventoryIcon::getIcon(LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, online, false);
}
std::string LLCallingCardBridge::getLabelSuffix() const
@@ -6218,10 +6212,10 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
getClipboardEntries(true, items, disabled_items, flags);
LLInventoryItem* item = getItem();
- BOOL good_card = (item
+ bool good_card = (item
&& (LLUUID::null != item->getCreatorUUID())
&& (item->getCreatorUUID() != gAgent.getID()));
- BOOL user_online = FALSE;
+ bool user_online = false;
if (item)
{
user_online = (LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID()));
@@ -6247,13 +6241,13 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
hide_context_entries(menu, items, disabled_items);
}
-BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop,
+bool LLCallingCardBridge::dragOrDrop(MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
std::string& tooltip_msg)
{
LLViewerInventoryItem* item = getItem();
- BOOL rv = FALSE;
+ bool rv = false;
if(item)
{
// check the type
@@ -6278,7 +6272,7 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop,
if(gInventory.getItem(inv_item->getUUID())
&& perm.allowOperationBy(PERM_TRANSFER, gAgent.getID()))
{
- rv = TRUE;
+ rv = true;
if(drop)
{
LLGiveInventory::doGiveInventoryItem(item->getCreatorUUID(),
@@ -6290,7 +6284,7 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop,
// It's not in the user's inventory (it's probably in
// an object's contents), so disallow dragging it here.
// You can't give something you don't yet have.
- rv = FALSE;
+ rv = false;
}
break;
}
@@ -6299,7 +6293,7 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop,
LLInventoryCategory* inv_cat = (LLInventoryCategory*)cargo_data;
if( gInventory.getCategory( inv_cat->getUUID() ) )
{
- rv = TRUE;
+ rv = true;
if(drop)
{
LLGiveInventory::doGiveInventoryCategory(
@@ -6312,7 +6306,7 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop,
// It's not in the user's inventory (it's probably in
// an object's contents), so disallow dragging it here.
// You can't give something you don't yet have.
- rv = FALSE;
+ rv = false;
}
break;
}
@@ -6417,8 +6411,8 @@ void LLGestureBridge::performAction(LLInventoryModel* model, std::string action)
if(!LLGestureMgr::instance().isGestureActive(mUUID))
{
// we need to inform server about gesture activating to be consistent with LLPreviewGesture and LLGestureComboList.
- BOOL inform_server = TRUE;
- BOOL deactivate_similar = FALSE;
+ bool inform_server = true;
+ bool deactivate_similar = false;
LLGestureMgr::instance().setGestureLoadedCallback(mUUID, boost::bind(&LLGestureBridge::playGesture, mUUID));
LLViewerInventoryItem* item = gInventory.getItem(mUUID);
llassert(item);
@@ -6448,19 +6442,19 @@ void LLGestureBridge::openItem()
if (item)
{
LLPreviewGesture* preview = LLPreviewGesture::show(mUUID, LLUUID::null);
- preview->setFocus(TRUE);
+ preview->setFocus(true);
}
*/
}
-BOOL LLGestureBridge::removeItem()
+bool LLGestureBridge::removeItem()
{
// Grab class information locally since *this may be deleted
// within this function. Not a great pattern...
const LLInventoryModel* model = getInventoryModel();
if(!model)
{
- return FALSE;
+ return false;
}
const LLUUID item_id = mUUID;
@@ -6471,7 +6465,7 @@ BOOL LLGestureBridge::removeItem()
// If deactivateGesture deleted *this, then return out immediately.
if (!model->getObject(item_id))
{
- return TRUE;
+ return true;
}
return LLItemBridge::removeItem();
@@ -6634,7 +6628,7 @@ LLObjectBridge::LLObjectBridge(LLInventoryPanel* inventory,
LLItemBridge(inventory, root, uuid)
{
mAttachPt = (flags & 0xff); // low bye of inventory flags
- mIsMultiObject = ( flags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) ? TRUE: FALSE;
+ mIsMultiObject = ( flags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) ? true: false;
mInvType = type;
}
@@ -6796,7 +6790,7 @@ bool confirm_attachment_rez(const LLSD& notification, const LLSD& response)
// attachments are batched up all into one message versus each attachment
// being sent in its own separate attachments message.
U8 attachment_pt = notification["payload"]["attachment_point"].asInteger();
- BOOL is_add = notification["payload"]["is_add"].asBoolean();
+ bool is_add = notification["payload"]["is_add"].asBoolean();
LL_DEBUGS("Avatar") << "ATT calling addAttachmentRequest " << (itemp ? itemp->getName() : "UNKNOWN") << " id " << item_id << LL_ENDL;
LLAttachmentsMgr::instance().addAttachmentRequest(item_id, attachment_pt, is_add);
@@ -6874,8 +6868,8 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
disabled_items.push_back(std::string("Attach To"));
disabled_items.push_back(std::string("Attach To HUD"));
}
- LLMenuGL* attach_menu = menu.findChildMenuByName("Attach To", TRUE);
- LLMenuGL* attach_hud_menu = menu.findChildMenuByName("Attach To HUD", TRUE);
+ LLMenuGL* attach_menu = menu.findChildMenuByName("Attach To", true);
+ LLMenuGL* attach_hud_menu = menu.findChildMenuByName("Attach To HUD", true);
if (attach_menu
&& (attach_menu->getChildCount() == 0)
&& attach_hud_menu
@@ -6916,20 +6910,20 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
hide_context_entries(menu, items, disabled_items);
}
-BOOL LLObjectBridge::renameItem(const std::string& new_name)
+bool LLObjectBridge::renameItem(const std::string& new_name)
{
if(!isItemRenameable())
- return FALSE;
+ return false;
LLPreview::dirty(mUUID);
LLInventoryModel* model = getInventoryModel();
if(!model)
- return FALSE;
+ return false;
LLViewerInventoryItem* item = getItem();
if(item && (item->getName() != new_name))
{
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
new_item->rename(new_name);
- new_item->updateServer(FALSE);
+ new_item->updateServer(false);
model->updateItem(new_item);
model->notifyObservers();
buildDisplayName();
@@ -6940,15 +6934,15 @@ BOOL LLObjectBridge::renameItem(const std::string& new_name)
if(obj)
{
LLSelectMgr::getInstance()->deselectAll();
- LLSelectMgr::getInstance()->addAsIndividual( obj, SELECT_ALL_TES, FALSE );
+ LLSelectMgr::getInstance()->addAsIndividual( obj, SELECT_ALL_TES, false );
LLSelectMgr::getInstance()->selectionSetObjectName( new_name );
LLSelectMgr::getInstance()->deselectAll();
}
}
}
- // return FALSE because we either notified observers (& therefore
+ // return false because we either notified observers (& therefore
// rebuilt) or we didn't update.
- return FALSE;
+ return false;
}
// +=================================================+
@@ -6982,7 +6976,7 @@ LLWearableBridge::LLWearableBridge(LLInventoryPanel* inventory,
mInvType = inv_type;
}
-BOOL LLWearableBridge::renameItem(const std::string& new_name)
+bool LLWearableBridge::renameItem(const std::string& new_name)
{
if (get_is_item_worn(mUUID))
{
@@ -7006,7 +7000,7 @@ std::string LLWearableBridge::getLabelSuffix() const
LLUIImagePtr LLWearableBridge::getIcon() const
{
- return LLInventoryIcon::getIcon(mAssetType, mInvType, mWearableType, FALSE);
+ return LLInventoryIcon::getIcon(mAssetType, mInvType, mWearableType, false);
}
// virtual
@@ -7056,7 +7050,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
}
else
{ // FWIW, it looks like SUPPRESS_OPEN_ITEM is not set anywhere
- BOOL can_open = ((flags & SUPPRESS_OPEN_ITEM) != SUPPRESS_OPEN_ITEM);
+ bool can_open = ((flags & SUPPRESS_OPEN_ITEM) != SUPPRESS_OPEN_ITEM);
// If we have clothing, don't add "Open" as it's the same action as "Wear" SL-18976
LLViewerInventoryItem* item = getItem();
@@ -7067,7 +7061,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
}
if (isLinkedObjectMissing())
{
- can_open = FALSE;
+ can_open = false;
}
items.push_back(std::string("Share"));
if (!canShare())
@@ -7145,14 +7139,14 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
// Called from menus
// static
-BOOL LLWearableBridge::canWearOnAvatar(void* user_data)
+bool LLWearableBridge::canWearOnAvatar(void* user_data)
{
LLWearableBridge* self = (LLWearableBridge*)user_data;
- if(!self) return FALSE;
+ if(!self) return false;
if(!self->isAgentInventory())
{
LLViewerInventoryItem* item = (LLViewerInventoryItem*)self->getItem();
- if(!item || !item->isFinished()) return FALSE;
+ if(!item || !item->isFinished()) return false;
}
return (!get_is_item_worn(self->mUUID));
}
@@ -7241,10 +7235,10 @@ void LLWearableBridge::onWearAddOnAvatarArrived( LLViewerWearable* wearable, voi
}
// static
-BOOL LLWearableBridge::canEditOnAvatar(void* user_data)
+bool LLWearableBridge::canEditOnAvatar(void* user_data)
{
LLWearableBridge* self = (LLWearableBridge*)user_data;
- if(!self) return FALSE;
+ if(!self) return false;
return (get_is_item_worn(self->mUUID));
}
@@ -7265,14 +7259,14 @@ void LLWearableBridge::editOnAvatar()
}
// static
-BOOL LLWearableBridge::canRemoveFromAvatar(void* user_data)
+bool LLWearableBridge::canRemoveFromAvatar(void* user_data)
{
LLWearableBridge* self = (LLWearableBridge*)user_data;
if( self && (LLAssetType::AT_BODYPART != self->mAssetType) )
{
return get_is_item_worn( self->mUUID );
}
- return FALSE;
+ return false;
}
void LLWearableBridge::removeFromAvatar()
@@ -7330,7 +7324,7 @@ LLSettingsBridge::LLSettingsBridge(LLInventoryPanel* inventory,
LLUIImagePtr LLSettingsBridge::getIcon() const
{
- return LLInventoryIcon::getIcon(LLAssetType::AT_SETTINGS, LLInventoryType::IT_SETTINGS, mSettingsType, FALSE);
+ return LLInventoryIcon::getIcon(LLAssetType::AT_SETTINGS, LLInventoryType::IT_SETTINGS, mSettingsType, false);
}
void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action)
@@ -7436,20 +7430,20 @@ void LLSettingsBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
hide_context_entries(menu, items, disabled_items);
}
-BOOL LLSettingsBridge::renameItem(const std::string& new_name)
+bool LLSettingsBridge::renameItem(const std::string& new_name)
{
/*TODO: change internal settings name? */
return LLItemBridge::renameItem(new_name);
}
-BOOL LLSettingsBridge::isItemRenameable() const
+bool LLSettingsBridge::isItemRenameable() const
{
LLViewerInventoryItem* item = getItem();
if (item)
{
return (item->getPermissions().allowModifyBy(gAgent.getID()));
}
- return FALSE;
+ return false;
}
bool LLSettingsBridge::canUpdateParcel() const
@@ -7558,7 +7552,7 @@ void LLLinkFolderBridge::gotoItem()
LLFolderViewItem *base_folder = LLInventoryPanel::getActiveInventoryPanel()->getItemByID(cat_uuid);
if (base_folder)
{
- base_folder->setOpen(TRUE);
+ base_folder->setOpen(true);
}
}
}
@@ -7745,7 +7739,7 @@ public:
if (item)
{
LLPreviewGesture* preview = LLPreviewGesture::show(mUUID, LLUUID::null);
- preview->setFocus(TRUE);
+ preview->setFocus(true);
}
LLInvFVBridgeAction::doIt();
}
@@ -7828,24 +7822,24 @@ public:
virtual ~LLWearableBridgeAction(){}
protected:
LLWearableBridgeAction(const LLUUID& id,LLInventoryModel* model) : LLInvFVBridgeAction(id,model) {}
- BOOL isItemInTrash() const;
+ bool isItemInTrash() const;
// return true if the item is in agent inventory. if false, it
// must be lost or in the inventory library.
- BOOL isAgentInventory() const;
+ bool isAgentInventory() const;
void wearOnAvatar();
};
-BOOL LLWearableBridgeAction::isItemInTrash() const
+bool LLWearableBridgeAction::isItemInTrash() const
{
- if(!mModel) return FALSE;
+ if(!mModel) return false;
const LLUUID trash_id = mModel->findCategoryUUIDForType(LLFolderType::FT_TRASH);
return mModel->isObjectDescendentOf(mUUID, trash_id);
}
-BOOL LLWearableBridgeAction::isAgentInventory() const
+bool LLWearableBridgeAction::isAgentInventory() const
{
- if(!mModel) return FALSE;
- if(gInventory.getRootFolderID() == mUUID) return TRUE;
+ if(!mModel) return false;
+ if(gInventory.getRootFolderID() == mUUID) return true;
return mModel->isObjectDescendentOf(mUUID, gInventory.getRootFolderID());
}
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index 6f06f3b36d..1c58c235b8 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -111,35 +111,35 @@ public:
virtual void closeItem() {}
virtual void navigateToFolder(bool new_window = false, bool change_mode = false);
virtual void showProperties();
- virtual BOOL isItemRenameable() const { return TRUE; }
- virtual BOOL isMultiPreviewAllowed() { return TRUE; }
- //virtual BOOL renameItem(const std::string& new_name) {}
- virtual BOOL isItemRemovable() const;
- virtual BOOL isItemMovable() const;
- virtual BOOL isItemInTrash() const;
+ virtual bool isItemRenameable() const { return true; }
+ virtual bool isMultiPreviewAllowed() { return true; }
+ //virtual bool renameItem(const std::string& new_name) {}
+ virtual bool isItemRemovable() const;
+ virtual bool isItemMovable() const;
+ virtual bool isItemInTrash() const;
virtual bool isItemInOutfits() const;
- virtual BOOL isLink() const;
- virtual BOOL isLibraryItem() const;
- //virtual BOOL removeItem() = 0;
+ virtual bool isLink() const;
+ virtual bool isLibraryItem() const;
+ //virtual bool removeItem() = 0;
virtual void removeBatch(std::vector<LLFolderViewModelItem*>& batch);
virtual void move(LLFolderViewModelItem* new_parent_bridge) {}
virtual bool isItemCopyable(bool can_copy_as_link = true) const { return false; }
- virtual BOOL copyToClipboard() const;
- virtual BOOL cutToClipboard();
+ virtual bool copyToClipboard() const;
+ virtual bool cutToClipboard();
virtual bool isCutToClipboard();
- virtual BOOL isClipboardPasteable() const;
- virtual BOOL isClipboardPasteableAsLink() const;
+ virtual bool isClipboardPasteable() const;
+ virtual bool isClipboardPasteableAsLink() const;
virtual void pasteFromClipboard() {}
virtual void pasteLinkFromClipboard() {}
void getClipboardEntries(bool show_asset_id, menuentry_vec_t &items,
menuentry_vec_t &disabled_items, U32 flags);
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
virtual LLToolDragAndDrop::ESource getDragSource() const;
- virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const;
- virtual BOOL dragOrDrop(MASK mask, BOOL drop,
+ virtual bool startDrag(EDragAndDropType* type, LLUUID* id) const;
+ virtual bool dragOrDrop(MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
- std::string& tooltip_msg) { return FALSE; }
+ std::string& tooltip_msg) { return false; }
virtual LLInventoryType::EType getInventoryType() const { return mInvType; }
virtual LLWearableType::EType getWearableType() const { return LLWearableType::WT_NONE; }
virtual LLSettingsType::type_e getSettingsType() const { return LLSettingsType::ST_NONE; }
@@ -168,28 +168,28 @@ protected:
LLInventoryModel* getInventoryModel() const;
LLInventoryFilter* getInventoryFilter() const;
- BOOL isLinkedObjectInTrash() const; // Is this obj or its baseobj in the trash?
- BOOL isLinkedObjectMissing() const; // Is this a linked obj whose baseobj is not in inventory?
+ bool isLinkedObjectInTrash() const; // Is this obj or its baseobj in the trash?
+ bool isLinkedObjectMissing() const; // Is this a linked obj whose baseobj is not in inventory?
- BOOL isAgentInventory() const; // false if lost or in the inventory library
- BOOL isCOFFolder() const; // true if COF or descendant of
- BOOL isInboxFolder() const; // true if COF or descendant of marketplace inbox
+ bool isAgentInventory() const; // false if lost or in the inventory library
+ bool isCOFFolder() const; // true if COF or descendant of
+ bool isInboxFolder() const; // true if COF or descendant of marketplace inbox
- BOOL isMarketplaceListingsFolder() const; // true if descendant of Marketplace listings folder
+ bool isMarketplaceListingsFolder() const; // true if descendant of Marketplace listings folder
- virtual BOOL isItemPermissive() const;
+ virtual bool isItemPermissive() const;
static void changeItemParent(LLInventoryModel* model,
LLViewerInventoryItem* item,
const LLUUID& new_parent,
- BOOL restamp);
+ bool restamp);
static void changeCategoryParent(LLInventoryModel* model,
LLViewerInventoryCategory* item,
const LLUUID& new_parent,
- BOOL restamp);
+ bool restamp);
void removeBatchNoCheck(std::vector<LLFolderViewModelItem*>& batch);
- BOOL callback_cutToClipboard(const LLSD& notification, const LLSD& response);
- BOOL perform_cutToClipboard();
+ bool callback_cutToClipboard(const LLSD& notification, const LLSD& response);
+ bool perform_cutToClipboard();
LLHandle<LLInventoryPanel> mInventoryPanel;
LLFolderView* mRoot;
@@ -246,20 +246,20 @@ public:
virtual LLFontGL::StyleFlags getLabelStyle() const;
virtual PermissionMask getPermissionMask() const;
virtual time_t getCreationDate() const;
- virtual BOOL isItemRenameable() const;
- virtual BOOL renameItem(const std::string& new_name);
- virtual BOOL removeItem();
+ virtual bool isItemRenameable() const;
+ virtual bool renameItem(const std::string& new_name);
+ virtual bool removeItem();
virtual bool isItemCopyable(bool can_copy_as_link = true) const;
- virtual bool hasChildren() const { return FALSE; }
- virtual BOOL isUpToDate() const { return TRUE; }
+ virtual bool hasChildren() const { return false; }
+ virtual bool isUpToDate() const { return true; }
virtual LLUIImagePtr getIconOverlay() const;
LLViewerInventoryItem* getItem() const;
virtual const LLUUID& getThumbnailUUID() const;
protected:
- BOOL confirmRemoveItem(const LLSD& notification, const LLSD& response);
- virtual BOOL isItemPermissive() const;
+ bool confirmRemoveItem(const LLSD& notification, const LLSD& response);
+ virtual bool isItemPermissive() const;
virtual void buildDisplayName() const;
void doActionOnCurSelectedLandmark(LLLandmarkList::loaded_callback_t cb);
@@ -274,14 +274,14 @@ public:
LLFolderView* root,
const LLUUID& uuid)
: LLInvFVBridge(inventory, root, uuid),
- mCallingCards(FALSE),
- mWearables(FALSE),
+ mCallingCards(false),
+ mWearables(false),
mIsLoading(false),
mShowDescendantsCount(false)
{}
- BOOL dragItemIntoFolder(LLInventoryItem* inv_item, BOOL drop, std::string& tooltip_msg, BOOL user_confirm = TRUE, LLPointer<LLInventoryCallback> cb = NULL);
- BOOL dragCategoryIntoFolder(LLInventoryCategory* inv_category, BOOL drop, std::string& tooltip_msg, BOOL is_link = FALSE, BOOL user_confirm = TRUE, LLPointer<LLInventoryCallback> cb = NULL);
+ bool dragItemIntoFolder(LLInventoryItem* inv_item, bool drop, std::string& tooltip_msg, bool user_confirm = true, LLPointer<LLInventoryCallback> cb = NULL);
+ bool dragCategoryIntoFolder(LLInventoryCategory* inv_category, bool drop, std::string& tooltip_msg, bool is_link = false, bool user_confirm = true, LLPointer<LLInventoryCallback> cb = NULL);
void callback_dropItemIntoFolder(const LLSD& notification, const LLSD& response, LLInventoryItem* inv_item);
void callback_dropCategoryIntoFolder(const LLSD& notification, const LLSD& response, LLInventoryCategory* inv_category);
@@ -290,7 +290,7 @@ public:
virtual void performAction(LLInventoryModel* model, std::string action);
virtual void openItem();
virtual void closeItem();
- virtual BOOL isItemRenameable() const;
+ virtual bool isItemRenameable() const;
virtual void selectItem();
virtual void restoreItem();
@@ -305,10 +305,10 @@ public:
void setShowDescendantsCount(bool show_count) {mShowDescendantsCount = show_count;}
- virtual BOOL renameItem(const std::string& new_name);
+ virtual bool renameItem(const std::string& new_name);
- virtual BOOL removeItem();
- BOOL removeSystemFolder();
+ virtual bool removeItem();
+ bool removeSystemFolder();
bool removeItemResponse(const LLSD& notification, const LLSD& response);
void updateHierarchyCreationDate(time_t date);
@@ -316,17 +316,17 @@ public:
virtual void pasteLinkFromClipboard();
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
virtual bool hasChildren() const;
- virtual BOOL dragOrDrop(MASK mask, BOOL drop,
+ virtual bool dragOrDrop(MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
std::string& tooltip_msg);
- virtual BOOL isItemRemovable() const;
- virtual BOOL isItemMovable() const ;
- virtual BOOL isUpToDate() const;
+ virtual bool isItemRemovable() const;
+ virtual bool isItemMovable() const ;
+ virtual bool isUpToDate() const;
virtual bool isItemCopyable(bool can_copy_as_link = true) const;
- virtual BOOL isClipboardPasteable() const;
- virtual BOOL isClipboardPasteableAsLink() const;
+ virtual bool isClipboardPasteable() const;
+ virtual bool isClipboardPasteableAsLink() const;
EInventorySortGroup getSortGroup() const;
virtual void update();
@@ -361,14 +361,14 @@ protected:
static void createNewHair(void* user_data);
static void createNewEyes(void* user_data);
- BOOL checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& typeToCheck);
+ bool checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& typeToCheck);
- void modifyOutfit(BOOL append);
+ void modifyOutfit(bool append);
void copyOutfitToClipboard();
void determineFolderType();
void dropToFavorites(LLInventoryItem* inv_item, LLPointer<LLInventoryCallback> cb = NULL);
- void dropToOutfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit, LLPointer<LLInventoryCallback> cb = NULL);
+ void dropToOutfit(LLInventoryItem* inv_item, bool move_is_into_current_outfit, LLPointer<LLInventoryCallback> cb = NULL);
void dropToMyOutfits(LLInventoryCategory* inv_cat, LLPointer<LLInventoryCallback> cb = NULL);
//--------------------------------------------------------------------
@@ -383,7 +383,7 @@ protected:
void callback_pasteFromClipboard(const LLSD& notification, const LLSD& response);
void perform_pasteFromClipboard();
void gatherMessage(std::string& message, S32 depth, LLError::ELevel log_level);
- LLUIImagePtr getFolderIcon(BOOL is_open) const;
+ LLUIImagePtr getFolderIcon(bool is_open) const;
bool mCallingCards;
bool mWearables;
@@ -440,7 +440,7 @@ public:
virtual LLUIImagePtr getIcon() const;
virtual void openItem();
protected:
- BOOL mVisited;
+ bool mVisited;
};
class LLCallingCardBridge : public LLItemBridge
@@ -456,7 +456,7 @@ public:
virtual void performAction(LLInventoryModel* model, std::string action);
virtual void openItem();
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
- virtual BOOL dragOrDrop(MASK mask, BOOL drop,
+ virtual bool dragOrDrop(MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
std::string& tooltip_msg);
@@ -491,7 +491,7 @@ public:
virtual std::string getLabelSuffix() const;
virtual void performAction(LLInventoryModel* model, std::string action);
virtual void openItem();
- virtual BOOL removeItem();
+ virtual bool removeItem();
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
static void playGesture(const LLUUID& item_id);
};
@@ -519,15 +519,15 @@ public:
virtual LLUIImagePtr getIcon() const;
virtual void performAction(LLInventoryModel* model, std::string action);
virtual void openItem();
- virtual BOOL isItemWearable() const { return TRUE; }
+ virtual bool isItemWearable() const { return true; }
virtual std::string getLabelSuffix() const;
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
- virtual BOOL renameItem(const std::string& new_name);
+ virtual bool renameItem(const std::string& new_name);
LLInventoryObject* getObject() const;
protected:
static LLUUID sContextMenuItemID; // Only valid while the context menu is open.
U32 mAttachPt;
- BOOL mIsMultiObject;
+ bool mIsMultiObject;
};
class LLLSLTextBridge : public LLItemBridge
@@ -552,26 +552,25 @@ public:
virtual LLUIImagePtr getIcon() const;
virtual void performAction(LLInventoryModel* model, std::string action);
virtual void openItem();
- virtual BOOL isItemWearable() const { return TRUE; }
+ virtual bool isItemWearable() const { return true; }
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
virtual std::string getLabelSuffix() const;
- virtual BOOL renameItem(const std::string& new_name);
+ virtual bool renameItem(const std::string& new_name);
virtual LLWearableType::EType getWearableType() const { return mWearableType; }
static void onWearOnAvatar( void* userdata ); // Access to wearOnAvatar() from menu
- static BOOL canWearOnAvatar( void* userdata );
+ static bool canWearOnAvatar( void* userdata );
static void onWearOnAvatarArrived( LLViewerWearable* wearable, void* userdata );
void wearOnAvatar();
static void onWearAddOnAvatarArrived( LLViewerWearable* wearable, void* userdata );
void wearAddOnAvatar();
- static BOOL canEditOnAvatar( void* userdata ); // Access to editOnAvatar() from menu
+ static bool canEditOnAvatar( void* userdata ); // Access to editOnAvatar() from menu
static void onEditOnAvatar( void* userdata );
void editOnAvatar();
- static BOOL canRemoveFromAvatar( void* userdata );
- static void removeAllClothesFromAvatar();
+ static bool canRemoveFromAvatar( void* userdata );
void removeFromAvatar();
protected:
LLAssetType::EType mAssetType;
@@ -630,10 +629,10 @@ public:
virtual LLUIImagePtr getIcon() const;
virtual void performAction(LLInventoryModel* model, std::string action);
virtual void openItem();
- virtual BOOL isMultiPreviewAllowed() { return FALSE; }
+ virtual bool isMultiPreviewAllowed() { return false; }
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
- virtual BOOL renameItem(const std::string& new_name);
- virtual BOOL isItemRenameable() const;
+ virtual bool renameItem(const std::string& new_name);
+ virtual bool isItemRenameable() const;
virtual LLSettingsType::type_e getSettingsType() const { return mSettingsType; }
protected:
@@ -743,7 +742,7 @@ public:
virtual LLFontGL::StyleFlags getLabelStyle() const;
private:
- LLUIImagePtr getMarketplaceFolderIcon(BOOL is_open) const;
+ LLUIImagePtr getMarketplaceFolderIcon(bool is_open) const;
// Those members are mutable because they are cached variablse to speed up display, not a state variables
mutable S32 m_depth;
mutable S32 m_stockCountCache;
@@ -756,9 +755,9 @@ void rez_attachment(LLViewerInventoryItem* item,
// Move items from an in-world object's "Contents" folder to a specified
// folder in agent inventory.
-BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
+bool move_inv_category_world_to_agent(const LLUUID& object_id,
const LLUUID& category_id,
- BOOL drop,
+ bool drop,
std::function<void(S32, void*, const LLMoveInv *)> callback = NULL,
void* user_data = NULL,
LLInventoryFilter* filter = NULL);
diff --git a/indra/newview/llinventoryclipboard.cpp b/indra/newview/llinventoryclipboard.cpp
deleted file mode 100644
index 53da34f448..0000000000
--- a/indra/newview/llinventoryclipboard.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * @file llinventoryclipboard.cpp
- * @brief LLInventoryClipboard class implementation
- *
- * $LicenseInfo:firstyear=2002&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 "llinventoryclipboard.h"
-
-
-LLInventoryClipboard LLInventoryClipboard::sInstance;
-
-///----------------------------------------------------------------------------
-/// Local function declarations, constants, enums, and typedefs
-///----------------------------------------------------------------------------
-
-
-///----------------------------------------------------------------------------
-/// Class LLInventoryClipboard
-///----------------------------------------------------------------------------
-
-LLInventoryClipboard::LLInventoryClipboard()
-: mCutMode(false)
-{
-}
-
-LLInventoryClipboard::~LLInventoryClipboard()
-{
- reset();
-}
-
-void LLInventoryClipboard::add(const LLUUID& object)
-{
- mObjects.put(object);
-}
-
-// this stores a single inventory object
-void LLInventoryClipboard::store(const LLUUID& object)
-{
- reset();
- mObjects.put(object);
-}
-
-void LLInventoryClipboard::store(const LLDynamicArray<LLUUID>& inv_objects)
-{
- reset();
- S32 count = inv_objects.count();
- for(S32 i = 0; i < count; i++)
- {
- mObjects.put(inv_objects[i]);
- }
-}
-
-void LLInventoryClipboard::cut(const LLUUID& object)
-{
- if(!mCutMode && !mObjects.empty())
- {
- //looks like there are some stored items, reset clipboard state
- reset();
- }
- mCutMode = true;
- add(object);
-}
-void LLInventoryClipboard::retrieve(LLDynamicArray<LLUUID>& inv_objects) const
-{
- inv_objects.reset();
- S32 count = mObjects.count();
- for(S32 i = 0; i < count; i++)
- {
- inv_objects.put(mObjects[i]);
- }
-}
-
-void LLInventoryClipboard::reset()
-{
- mObjects.reset();
- mCutMode = false;
-}
-
-// returns true if the clipboard has something pasteable in it.
-BOOL LLInventoryClipboard::hasContents() const
-{
- return (mObjects.count() > 0);
-}
-
-
-///----------------------------------------------------------------------------
-/// Local function definitions
-///----------------------------------------------------------------------------
diff --git a/indra/newview/llinventoryclipboard.h b/indra/newview/llinventoryclipboard.h
deleted file mode 100644
index b9f1451e5c..0000000000
--- a/indra/newview/llinventoryclipboard.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * @file llinventoryclipboard.h
- * @brief LLInventoryClipboard class header file
- *
- * $LicenseInfo:firstyear=2002&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_LLINVENTORYCLIPBOARD_H
-#define LL_LLINVENTORYCLIPBOARD_H
-
-#include "lldarray.h"
-#include "lluuid.h"
-
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// Class LLInventoryClipboard
-//
-// This class is used to cut/copy/paste inventory items around the
-// world. This class is accessed through a singleton (only one
-// inventory clipboard for now) which can be referenced using the
-// instance() method.
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-class LLInventoryClipboard
-{
-public:
- // calling this before main() is undefined
- static LLInventoryClipboard& instance() { return sInstance; }
-
- // this method adds to the current list.
- void add(const LLUUID& object);
-
- // this stores a single inventory object
- void store(const LLUUID& object);
-
- // this method stores an array of objects
- void store(const LLDynamicArray<LLUUID>& inventory_objects);
-
- void cut(const LLUUID& object);
- // this method gets the objects in the clipboard by copying them
- // into the array provided.
- void retrieve(LLDynamicArray<LLUUID>& inventory_objects) const;
-
- // this method empties out the clipboard
- void reset();
-
- // returns true if the clipboard has something pasteable in it.
- BOOL hasContents() const;
- bool isCutMode() const { return mCutMode; }
-
-protected:
- static LLInventoryClipboard sInstance;
-
- LLDynamicArray<LLUUID> mObjects;
- bool mCutMode;
-
-public:
- // please don't actually call these
- LLInventoryClipboard();
- ~LLInventoryClipboard();
-private:
- // please don't implement these
- LLInventoryClipboard(const LLInventoryClipboard&);
- LLInventoryClipboard& operator=(const LLInventoryClipboard&);
-};
-
-
-#endif // LL_LLINVENTORYCLIPBOARD_H
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 332c6d3085..83770e28b6 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -96,7 +96,7 @@ bool LLInventoryFilter::check(const LLFolderViewModelItem* item)
const LLFolderViewModelItemInventory* listener = dynamic_cast<const LLFolderViewModelItemInventory*>(item);
// If it's a folder and we're showing all folders, return automatically.
- const BOOL is_folder = listener->getInventoryType() == LLInventoryType::IT_CATEGORY;
+ const bool is_folder = listener->getInventoryType() == LLInventoryType::IT_CATEGORY;
if (is_folder && (mFilterOps.mShowFolderState == LLInventoryFilter::SHOW_ALL_FOLDERS))
{
return true;
@@ -297,7 +297,7 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const
bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInventory* listener) const
{
- if (!listener) return FALSE;
+ if (!listener) return false;
LLInventoryType::EType object_type = listener->getInventoryType();
const LLUUID object_id = listener->getUUID();
@@ -316,7 +316,7 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
// If it has no type, pass it, unless it's a link.
if (object && object->getIsLinkType())
{
- return FALSE;
+ return false;
}
break;
case LLInventoryType::IT_UNKNOWN:
@@ -325,14 +325,14 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
// Unknows are 255 and won't fit in 64 bits.
if (mFilterOps.mFilterObjectTypes != 0xffffffffffffffffULL)
{
- return FALSE;
+ return false;
}
break;
}
default:
if ((1LL << object_type & mFilterOps.mFilterObjectTypes) == U64(0))
{
- return FALSE;
+ return false;
}
break;
}
@@ -342,7 +342,7 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
{
if (!get_is_item_worn(object_id))
{
- return FALSE;
+ return false;
}
}
@@ -351,10 +351,10 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
// Pass if this item is the target UUID or if it links to the target UUID
if (filterTypes & FILTERTYPE_UUID)
{
- if (!object) return FALSE;
+ if (!object) return false;
if (object->getLinkedUUID() != mFilterOps.mFilterUUID)
- return FALSE;
+ return false;
}
////////////////////////////////////////////////////////////////////////////////
@@ -378,13 +378,13 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
{
if (listener->getCreationDate() < earliest ||
listener->getCreationDate() > mFilterOps.mMaxDate)
- return FALSE;
+ return false;
}
else
{
if (listener->getCreationDate() > earliest ||
listener->getCreationDate() > mFilterOps.mMaxDate)
- return FALSE;
+ return false;
}
}
@@ -397,7 +397,7 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
if ((object_type == LLInventoryType::IT_WEARABLE) &&
(((0x1LL << type) & mFilterOps.mFilterWearableTypes) == 0))
{
- return FALSE;
+ return false;
}
}
@@ -410,7 +410,7 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
if ((object_type == LLInventoryType::IT_SETTINGS) &&
(((0x1LL << type) & mFilterOps.mFilterSettingsTypes) == 0))
{
- return FALSE;
+ return false;
}
}
@@ -441,13 +441,13 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
}
if (descendents_actual == 0)
{
- return FALSE;
+ return false;
}
}
}
}
- return TRUE;
+ return true;
}
bool LLInventoryFilter::checkAgainstFilterType(const LLInventoryItem* item) const
@@ -467,7 +467,7 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLInventoryItem* item) cons
// If it has no type, pass it, unless it's a link.
if (item && item->getIsLinkType())
{
- return FALSE;
+ return false;
}
break;
case LLInventoryType::IT_UNKNOWN:
@@ -476,14 +476,14 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLInventoryItem* item) cons
// Unknows are 255 and won't fit in 64 bits.
if (mFilterOps.mFilterObjectTypes != 0xffffffffffffffffULL)
{
- return FALSE;
+ return false;
}
break;
}
default:
if ((1LL << object_type & mFilterOps.mFilterObjectTypes) == U64(0))
{
- return FALSE;
+ return false;
}
break;
}
@@ -540,7 +540,7 @@ bool LLInventoryFilter::checkAgainstClipboard(const LLUUID& object_id) const
bool LLInventoryFilter::checkAgainstPermissions(const LLFolderViewModelItemInventory* listener) const
{
- if (!listener) return FALSE;
+ if (!listener) return false;
PermissionMask perm = listener->getPermissionMask();
const LLInvFVBridge *bridge = dynamic_cast<const LLInvFVBridge *>(listener);
@@ -567,18 +567,18 @@ bool LLInventoryFilter::checkAgainstPermissions(const LLInventoryItem* item) con
bool LLInventoryFilter::checkAgainstFilterLinks(const LLFolderViewModelItemInventory* listener) const
{
- if (!listener) return TRUE;
+ if (!listener) return true;
const LLUUID object_id = listener->getUUID();
const LLInventoryObject *object = gInventory.getObject(object_id);
- if (!object) return TRUE;
+ if (!object) return true;
- const BOOL is_link = object->getIsLinkType();
+ const bool is_link = object->getIsLinkType();
if (is_link && (mFilterOps.mFilterLinks == FILTERLINK_EXCLUDE_LINKS))
- return FALSE;
+ return false;
if (!is_link && (mFilterOps.mFilterLinks == FILTERLINK_ONLY_LINKS))
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
bool LLInventoryFilter::checkAgainstFilterThumbnails(const LLUUID& object_id) const
@@ -596,47 +596,47 @@ bool LLInventoryFilter::checkAgainstFilterThumbnails(const LLUUID& object_id) co
bool LLInventoryFilter::checkAgainstCreator(const LLFolderViewModelItemInventory* listener) const
{
- if (!listener) return TRUE;
- const BOOL is_folder = listener->getInventoryType() == LLInventoryType::IT_CATEGORY;
+ if (!listener) return true;
+ const bool is_folder = listener->getInventoryType() == LLInventoryType::IT_CATEGORY;
switch (mFilterOps.mFilterCreatorType)
{
case FILTERCREATOR_SELF:
- if(is_folder) return FALSE;
+ if(is_folder) return false;
return (listener->getSearchableCreatorName() == mUsername);
case FILTERCREATOR_OTHERS:
- if(is_folder) return FALSE;
+ if(is_folder) return false;
return (listener->getSearchableCreatorName() != mUsername);
case FILTERCREATOR_ALL:
default:
- return TRUE;
+ return true;
}
}
bool LLInventoryFilter::checkAgainstSearchVisibility(const LLFolderViewModelItemInventory* listener) const
{
- if (!listener || !hasFilterString()) return TRUE;
+ if (!listener || !hasFilterString()) return true;
const LLUUID object_id = listener->getUUID();
const LLInventoryObject *object = gInventory.getObject(object_id);
- if (!object) return TRUE;
+ if (!object) return true;
- const BOOL is_link = object->getIsLinkType();
+ const bool is_link = object->getIsLinkType();
if (is_link && ((mFilterOps.mSearchVisibility & VISIBILITY_LINKS) == 0))
- return FALSE;
+ return false;
if (listener->isItemInOutfits() && ((mFilterOps.mSearchVisibility & VISIBILITY_OUTFITS) == 0))
- return FALSE;
+ return false;
if (listener->isItemInTrash() && ((mFilterOps.mSearchVisibility & VISIBILITY_TRASH) == 0))
- return FALSE;
+ return false;
if (!listener->isAgentInventory() && ((mFilterOps.mSearchVisibility & VISIBILITY_LIBRARY) == 0))
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
-const std::string& LLInventoryFilter::getFilterSubString(BOOL trim) const
+const std::string& LLInventoryFilter::getFilterSubString(bool trim) const
{
return mFilterSubString;
}
@@ -964,11 +964,11 @@ void LLInventoryFilter::setFilterSubString(const std::string& string)
}
// hitting BACKSPACE, for example
- const BOOL less_restrictive = mFilterSubString.size() >= filter_sub_string_new.size()
+ const bool less_restrictive = mFilterSubString.size() >= filter_sub_string_new.size()
&& !mFilterSubString.substr(0, filter_sub_string_new.size()).compare(filter_sub_string_new);
// appending new characters
- const BOOL more_restrictive = mFilterSubString.size() < filter_sub_string_new.size()
+ const bool more_restrictive = mFilterSubString.size() < filter_sub_string_new.size()
&& !filter_sub_string_new.substr(0, mFilterSubString.size()).compare(mFilterSubString);
mFilterSubString = filter_sub_string_new;
@@ -1019,8 +1019,8 @@ void LLInventoryFilter::setSearchVisibilityTypes(U32 types)
if (mFilterOps.mSearchVisibility != types)
{
// keep current items only if no perm bits getting turned off
- BOOL fewer_bits_set = (mFilterOps.mSearchVisibility & ~types);
- BOOL more_bits_set = (~mFilterOps.mSearchVisibility & types);
+ bool fewer_bits_set = (mFilterOps.mSearchVisibility & ~types);
+ bool more_bits_set = (~mFilterOps.mSearchVisibility & types);
mFilterOps.mSearchVisibility = types;
if (more_bits_set && fewer_bits_set)
@@ -1057,8 +1057,8 @@ void LLInventoryFilter::setFilterPermissions(PermissionMask perms)
if (mFilterOps.mPermissions != perms)
{
// keep current items only if no perm bits getting turned off
- BOOL fewer_bits_set = (mFilterOps.mPermissions & ~perms);
- BOOL more_bits_set = (~mFilterOps.mPermissions & perms);
+ bool fewer_bits_set = (mFilterOps.mPermissions & ~perms);
+ bool more_bits_set = (~mFilterOps.mPermissions & perms);
mFilterOps.mPermissions = perms;
if (more_bits_set && fewer_bits_set)
@@ -1101,7 +1101,7 @@ void LLInventoryFilter::setDateRange(time_t min_date, time_t max_date)
}
}
-void LLInventoryFilter::setDateRangeLastLogoff(BOOL sl)
+void LLInventoryFilter::setDateRangeLastLogoff(bool sl)
{
static LLCachedControl<U32> s_last_logoff(gSavedPerAccountSettings, "LastLogoff", 0);
if (sl && !isSinceLogoff())
@@ -1150,8 +1150,8 @@ void LLInventoryFilter::setHoursAgo(U32 hours)
bool is_increasing_from_zero = is_increasing && !mFilterOps.mHoursAgo && !isSinceLogoff();
// *NOTE: need to cache last filter time, in case filter goes stale
- BOOL less_restrictive;
- BOOL more_restrictive;
+ bool less_restrictive;
+ bool more_restrictive;
if (FILTERDATEDIRECTION_NEWER == mFilterOps.mDateSearchDirection)
{
less_restrictive = ((are_date_limits_valid && ((is_increasing && mFilterOps.mHoursAgo))) || !hours);
@@ -1314,8 +1314,8 @@ const std::string& LLInventoryFilter::getFilterText()
std::string filtered_types;
std::string not_filtered_types;
- BOOL filtered_by_type = FALSE;
- BOOL filtered_by_all_types = TRUE;
+ bool filtered_by_type = false;
+ bool filtered_by_all_types = true;
S32 num_filter_types = 0;
mFilterText.clear();
@@ -1323,158 +1323,158 @@ const std::string& LLInventoryFilter::getFilterText()
if (isFilterObjectTypesWith(LLInventoryType::IT_ANIMATION))
{
filtered_types += LLTrans::getString("Animations");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Animations");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (isFilterObjectTypesWith(LLInventoryType::IT_CALLINGCARD))
{
filtered_types += LLTrans::getString("Calling Cards");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Calling Cards");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (isFilterObjectTypesWith(LLInventoryType::IT_WEARABLE))
{
filtered_types += LLTrans::getString("Clothing");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Clothing");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (isFilterObjectTypesWith(LLInventoryType::IT_GESTURE))
{
filtered_types += LLTrans::getString("Gestures");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Gestures");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (isFilterObjectTypesWith(LLInventoryType::IT_LANDMARK))
{
filtered_types += LLTrans::getString("Landmarks");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Landmarks");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (isFilterObjectTypesWith(LLInventoryType::IT_MATERIAL))
{
filtered_types += LLTrans::getString("Materials");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Materials");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (isFilterObjectTypesWith(LLInventoryType::IT_NOTECARD))
{
filtered_types += LLTrans::getString("Notecards");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Notecards");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (isFilterObjectTypesWith(LLInventoryType::IT_OBJECT) && isFilterObjectTypesWith(LLInventoryType::IT_ATTACHMENT))
{
filtered_types += LLTrans::getString("Objects");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Objects");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (isFilterObjectTypesWith(LLInventoryType::IT_LSL))
{
filtered_types += LLTrans::getString("Scripts");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Scripts");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (isFilterObjectTypesWith(LLInventoryType::IT_SOUND))
{
filtered_types += LLTrans::getString("Sounds");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Sounds");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (isFilterObjectTypesWith(LLInventoryType::IT_TEXTURE))
{
filtered_types += LLTrans::getString("Textures");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Textures");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (isFilterObjectTypesWith(LLInventoryType::IT_SNAPSHOT))
{
filtered_types += LLTrans::getString("Snapshots");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Snapshots");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (isFilterObjectTypesWith(LLInventoryType::IT_SETTINGS))
{
filtered_types += LLTrans::getString("Settings");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Settings");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!LLInventoryModelBackgroundFetch::instance().folderFetchActive()
diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h
index ada1d0f4b4..4c5bad97c4 100644
--- a/indra/newview/llinventoryfilter.h
+++ b/indra/newview/llinventoryfilter.h
@@ -247,7 +247,7 @@ public:
void setSearchVisibilityTypes(const Params& params);
void setFilterSubString(const std::string& string);
- const std::string& getFilterSubString(BOOL trim = FALSE) const;
+ const std::string& getFilterSubString(bool trim = false) const;
const std::string& getFilterSubStringOrig() const { return mFilterSubStringOrig; }
bool hasFilterString() const;
@@ -257,7 +257,7 @@ public:
PermissionMask getFilterPermissions() const;
void setDateRange(time_t min_date, time_t max_date);
- void setDateRangeLastLogoff(BOOL sl);
+ void setDateRangeLastLogoff(bool sl);
time_t getMinDate() const;
time_t getMaxDate() const;
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index ea0566f5c4..c7e4926220 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -91,7 +91,7 @@
#include "llvoavatarself.h"
#include "llwearablelist.h"
-BOOL LLInventoryState::sWearNewClothing = FALSE;
+bool LLInventoryState::sWearNewClothing = false;
LLUUID LLInventoryState::sWearNewClothingTransactionID;
std::list<LLUUID> LLInventoryAction::sMarketplaceFolders;
bool LLInventoryAction::sDeleteConfirmationDisplayed = false;
@@ -553,12 +553,12 @@ public:
}
};
-BOOL get_is_parent_to_worn_item(const LLUUID& id)
+bool get_is_parent_to_worn_item(const LLUUID& id)
{
const LLViewerInventoryCategory* cat = gInventory.getCategory(id);
if (!cat)
{
- return FALSE;
+ return false;
}
LLInventoryModel::cat_array_t cats;
@@ -585,7 +585,7 @@ BOOL get_is_parent_to_worn_item(const LLUUID& id)
if (cat == parent_cat)
{
- return TRUE;
+ return true;
}
parent_id = parent_cat->getParentUUID();
@@ -593,24 +593,24 @@ BOOL get_is_parent_to_worn_item(const LLUUID& id)
}
}
- return FALSE;
+ return false;
}
-BOOL get_is_item_worn(const LLUUID& id)
+bool get_is_item_worn(const LLUUID& id)
{
const LLViewerInventoryItem* item = gInventory.getItem(id);
if (!item)
- return FALSE;
+ return false;
if (item->getIsLinkType() && !gInventory.getItem(item->getLinkedUUID()))
{
- return FALSE;
+ return false;
}
// Consider the item as worn if it has links in COF.
if (LLAppearanceMgr::instance().isLinkedInCOF(id))
{
- return TRUE;
+ return true;
}
switch(item->getType())
@@ -618,40 +618,40 @@ BOOL get_is_item_worn(const LLUUID& id)
case LLAssetType::AT_OBJECT:
{
if (isAgentAvatarValid() && gAgentAvatarp->isWearingAttachment(item->getLinkedUUID()))
- return TRUE;
+ return true;
break;
}
case LLAssetType::AT_BODYPART:
case LLAssetType::AT_CLOTHING:
if(gAgentWearables.isWearingItem(item->getLinkedUUID()))
- return TRUE;
+ return true;
break;
case LLAssetType::AT_GESTURE:
if (LLGestureMgr::instance().isGestureActive(item->getLinkedUUID()))
- return TRUE;
+ return true;
break;
default:
break;
}
- return FALSE;
+ return false;
}
-BOOL get_can_item_be_worn(const LLUUID& id)
+bool get_can_item_be_worn(const LLUUID& id)
{
const LLViewerInventoryItem* item = gInventory.getItem(id);
if (!item)
- return FALSE;
+ return false;
if (LLAppearanceMgr::instance().isLinkedInCOF(item->getLinkedUUID()))
{
// an item having links in COF (i.e. a worn item)
- return FALSE;
+ return false;
}
if (gInventory.isObjectDescendentOf(id, LLAppearanceMgr::instance().getCOF()))
{
// a non-link object in COF (should not normally happen)
- return FALSE;
+ return false;
}
const LLUUID trash_id = gInventory.findCategoryUUIDForType(
@@ -671,12 +671,12 @@ BOOL get_can_item_be_worn(const LLUUID& id)
if (isAgentAvatarValid() && gAgentAvatarp->isWearingAttachment(item->getLinkedUUID()))
{
// Already being worn
- return FALSE;
+ return false;
}
else
{
// Not being worn yet.
- return TRUE;
+ return true;
}
break;
}
@@ -685,31 +685,31 @@ BOOL get_can_item_be_worn(const LLUUID& id)
if(gAgentWearables.isWearingItem(item->getLinkedUUID()))
{
// Already being worn
- return FALSE;
+ return false;
}
else
{
// Not being worn yet.
- return TRUE;
+ return true;
}
break;
default:
break;
}
- return FALSE;
+ return false;
}
-BOOL get_is_item_removable(const LLInventoryModel* model, const LLUUID& id)
+bool get_is_item_removable(const LLInventoryModel* model, const LLUUID& id)
{
if (!model)
{
- return FALSE;
+ return false;
}
// Can't delete an item that's in the library.
if (!model->isObjectDescendentOf(id, gInventory.getRootFolderID()))
{
- return FALSE;
+ return false;
}
// Disable delete from COF folder; have users explicitly choose "detach/take off",
@@ -718,20 +718,20 @@ BOOL get_is_item_removable(const LLInventoryModel* model, const LLUUID& id)
{
if (get_is_item_worn(id))
{
- return FALSE;
+ return false;
}
}
const LLInventoryObject *obj = model->getItem(id);
if (obj && obj->getIsLinkType())
{
- return TRUE;
+ return true;
}
if (get_is_item_worn(id))
{
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
bool get_is_item_editable(const LLUUID& inv_item_id)
@@ -778,7 +778,7 @@ void handle_item_edit(const LLUUID& inv_item_id)
}
}
-BOOL get_is_category_removable(const LLInventoryModel* model, const LLUUID& id)
+bool get_is_category_removable(const LLInventoryModel* model, const LLUUID& id)
{
// NOTE: This function doesn't check the folder's children.
// See LLFolderBridge::isItemRemovable for a function that does
@@ -786,27 +786,27 @@ BOOL get_is_category_removable(const LLInventoryModel* model, const LLUUID& id)
if (!model)
{
- return FALSE;
+ return false;
}
if (!model->isObjectDescendentOf(id, gInventory.getRootFolderID()))
{
- return FALSE;
+ return false;
}
- if (!isAgentAvatarValid()) return FALSE;
+ if (!isAgentAvatarValid()) return false;
const LLInventoryCategory* category = model->getCategory(id);
if (!category)
{
- return FALSE;
+ return false;
}
const LLFolderType::EType folder_type = category->getPreferredType();
if (LLFolderType::lookupIsProtectedType(folder_type))
{
- return FALSE;
+ return false;
}
// Can't delete the outfit that is currently being worn.
@@ -815,18 +815,18 @@ BOOL get_is_category_removable(const LLInventoryModel* model, const LLUUID& id)
const LLViewerInventoryItem *base_outfit_link = LLAppearanceMgr::instance().getBaseOutfitLink();
if (base_outfit_link && (category == base_outfit_link->getLinkedCategory()))
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
-BOOL get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id)
+bool get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id)
{
if (!model)
{
- return FALSE;
+ return false;
}
LLViewerInventoryCategory* cat = model->getCategory(id);
@@ -834,9 +834,9 @@ BOOL get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id)
if (cat && !LLFolderType::lookupIsProtectedType(cat->getPreferredType()) &&
cat->getOwnerID() == gAgent.getID())
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void show_task_item_profile(const LLUUID& item_uuid, const LLUUID& object_id)
@@ -1272,7 +1272,7 @@ bool can_move_item_to_marketplace(const LLInventoryCategory* root_folder, LLInve
LLInventoryModel::cat_array_t existing_categories;
LLInventoryModel::item_array_t existing_items;
- gInventory.collectDescendents(version_folder->getUUID(), existing_categories, existing_items, FALSE);
+ gInventory.collectDescendents(version_folder->getUUID(), existing_categories, existing_items, false);
existing_item_count += count_copyable_items(existing_items) + count_stock_folders(existing_categories);
existing_stock_count += count_stock_items(existing_items);
@@ -1346,7 +1346,7 @@ bool can_move_folder_to_marketplace(const LLInventoryCategory* root_folder, LLIn
{
LLInventoryModel::cat_array_t descendent_categories;
LLInventoryModel::item_array_t descendent_items;
- gInventory.collectDescendents(inv_cat->getUUID(), descendent_categories, descendent_items, FALSE);
+ gInventory.collectDescendents(inv_cat->getUUID(), descendent_categories, descendent_items, false);
int dragged_folder_count = descendent_categories.size() + bundle_size; // Note: We assume that we're moving a bunch of folders in. That might be wrong...
int dragged_item_count = count_copyable_items(descendent_items) + count_stock_folders(descendent_categories);
@@ -1368,7 +1368,7 @@ bool can_move_folder_to_marketplace(const LLInventoryCategory* root_folder, LLIn
// Tally the total number of categories and items inside the root folder
LLInventoryModel::cat_array_t existing_categories;
LLInventoryModel::item_array_t existing_items;
- gInventory.collectDescendents(version_folder->getUUID(), existing_categories, existing_items, FALSE);
+ gInventory.collectDescendents(version_folder->getUUID(), existing_categories, existing_items, false);
existing_folder_count += existing_categories.size();
existing_item_count += count_copyable_items(existing_items) + count_stock_folders(existing_categories);
@@ -2083,7 +2083,7 @@ void change_item_parent(const LLUUID& item_id, const LLUUID& new_parent_id)
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(inv_item);
new_item->setParent(new_parent_id);
- new_item->updateParentOnServer(FALSE);
+ new_item->updateParentOnServer(false);
gInventory.updateItem(new_item);
gInventory.notifyObservers();
}
@@ -2123,7 +2123,7 @@ void move_items_to_folder(const LLUUID& new_cat_uuid, const uuid_vec_t& selected
LLFolderViewItem* fv_folder = sidepanel_inventory->getActivePanel()->getItemByID(new_cat_uuid);
if (fv_folder)
{
- fv_folder->setOpen(TRUE);
+ fv_folder->setOpen(true);
}
}
}
@@ -2187,7 +2187,7 @@ std::string get_category_path(LLUUID cat_id)
}
}
// Returns true if the item can be moved to Current Outfit or any outfit folder.
-bool can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit)
+bool can_move_to_outfit(LLInventoryItem* inv_item, bool move_is_into_current_outfit)
{
LLInventoryType::EType inv_type = inv_item->getInventoryType();
if ((inv_type != LLInventoryType::IT_WEARABLE) &&
@@ -2219,7 +2219,7 @@ bool can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_out
return true;
}
-// Returns TRUE if item is a landmark or a link to a landmark
+// Returns true if item is a landmark or a link to a landmark
// and can be moved to Favorites or Landmarks folder.
bool can_move_to_landmarks(LLInventoryItem* inv_item)
{
@@ -2553,40 +2553,40 @@ bool LLIsType::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
{
if(mType == LLAssetType::AT_CATEGORY)
{
- if(cat) return TRUE;
+ if(cat) return true;
}
if(item)
{
- if(item->getType() == mType) return TRUE;
+ if(item->getType() == mType) return true;
}
- return FALSE;
+ return false;
}
bool LLIsNotType::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
{
if(mType == LLAssetType::AT_CATEGORY)
{
- if(cat) return FALSE;
+ if(cat) return false;
}
if(item)
{
- if(item->getType() == mType) return FALSE;
- else return TRUE;
+ if(item->getType() == mType) return false;
+ else return true;
}
- return TRUE;
+ return true;
}
bool LLIsOfAssetType::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
{
if(mType == LLAssetType::AT_CATEGORY)
{
- if(cat) return TRUE;
+ if(cat) return true;
}
if(item)
{
- if(item->getActualType() == mType) return TRUE;
+ if(item->getActualType() == mType) return true;
}
- return FALSE;
+ return false;
}
bool LLAssetIDAndTypeMatches::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
@@ -2608,7 +2608,7 @@ bool LLIsTypeWithPermissions::operator()(LLInventoryCategory* cat, LLInventoryIt
{
if(cat)
{
- return TRUE;
+ return true;
}
}
if(item)
@@ -2618,11 +2618,11 @@ bool LLIsTypeWithPermissions::operator()(LLInventoryCategory* cat, LLInventoryIt
LLPermissions perm = item->getPermissions();
if ((perm.getMaskBase() & mPerm) == mPerm)
{
- return TRUE;
+ return true;
}
}
}
- return FALSE;
+ return false;
}
bool LLBuddyCollector::operator()(LLInventoryCategory* cat,
@@ -2666,10 +2666,10 @@ bool LLParticularBuddyCollector::operator()(LLInventoryCategory* cat,
if((LLAssetType::AT_CALLINGCARD == item->getType())
&& (item->getCreatorUUID() == mBuddyID))
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
@@ -2721,9 +2721,9 @@ bool LLFindBrokenLinks::operator()(LLInventoryCategory* cat,
// it is linked too
if (item && LLAssetType::lookupIsLinkType(item->getType()))
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool LLFindWearables::operator()(LLInventoryCategory* cat,
@@ -2734,10 +2734,10 @@ bool LLFindWearables::operator()(LLInventoryCategory* cat,
if((item->getType() == LLAssetType::AT_CLOTHING)
|| (item->getType() == LLAssetType::AT_BODYPART))
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
LLFindWearablesEx::LLFindWearablesEx(bool is_worn, bool include_body_parts)
@@ -2829,7 +2829,7 @@ bool LLLinkedItemIDMatches::operator()(LLInventoryCategory* cat, LLInventoryItem
(item->getLinkedUUID() == mBaseItemID)); // A linked item's assetID will be the compared-to item's itemID.
}
-void LLSaveFolderState::setApply(BOOL apply)
+void LLSaveFolderState::setApply(bool apply)
{
mApply = apply;
// before generating new list of open folders, clear the old one
@@ -2852,7 +2852,7 @@ void LLSaveFolderState::doFolder(LLFolderViewFolder* folder)
{
if (!folder->isOpen())
{
- folder->setOpen(TRUE);
+ folder->setOpen(true);
}
}
else
@@ -2860,7 +2860,7 @@ void LLSaveFolderState::doFolder(LLFolderViewFolder* folder)
// keep selected filter in its current state, this is less jarring to user
if (!folder->isSelected() && folder->isOpen())
{
- folder->setOpen(FALSE);
+ folder->setOpen(false);
}
}
}
@@ -2878,7 +2878,7 @@ void LLOpenFilteredFolders::doItem(LLFolderViewItem *item)
{
if (item->passedFilter())
{
- item->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP);
+ item->getParentFolder()->setOpenArrangeRecursively(true, LLFolderViewFolder::RECURSE_UP);
}
}
@@ -2886,12 +2886,12 @@ void LLOpenFilteredFolders::doFolder(LLFolderViewFolder* folder)
{
if (folder->LLFolderViewItem::passedFilter() && folder->getParentFolder())
{
- folder->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP);
+ folder->getParentFolder()->setOpenArrangeRecursively(true, LLFolderViewFolder::RECURSE_UP);
}
// if this folder didn't pass the filter, and none of its descendants did
else if (!folder->getViewModelItem()->passedFilter() && !folder->getViewModelItem()->descendantsPassedFilter())
{
- folder->setOpenArrangeRecursively(FALSE, LLFolderViewFolder::RECURSE_NO);
+ folder->setOpenArrangeRecursively(false, LLFolderViewFolder::RECURSE_NO);
}
}
@@ -2899,12 +2899,12 @@ void LLSelectFirstFilteredItem::doItem(LLFolderViewItem *item)
{
if (item->passedFilter() && !mItemSelected)
{
- item->getRoot()->setSelection(item, FALSE, FALSE);
+ item->getRoot()->setSelection(item, false, false);
if (item->getParentFolder())
{
- item->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP);
+ item->getParentFolder()->setOpenArrangeRecursively(true, LLFolderViewFolder::RECURSE_UP);
}
- mItemSelected = TRUE;
+ mItemSelected = true;
}
}
@@ -2913,9 +2913,9 @@ void LLSelectFirstFilteredItem::doFolder(LLFolderViewFolder* folder)
// Skip if folder or item already found, if not filtered or if no parent (root folder is not selectable)
if (!mFolderSelected && !mItemSelected && folder->LLFolderViewItem::passedFilter() && folder->getParentFolder())
{
- folder->getRoot()->setSelection(folder, FALSE, FALSE);
- folder->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP);
- mFolderSelected = TRUE;
+ folder->getRoot()->setSelection(folder, false, false);
+ folder->getParentFolder()->setOpenArrangeRecursively(true, LLFolderViewFolder::RECURSE_UP);
+ mFolderSelected = true;
}
}
@@ -2923,7 +2923,7 @@ void LLOpenFoldersWithSelection::doItem(LLFolderViewItem *item)
{
if (item->getParentFolder() && item->isSelected())
{
- item->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP);
+ item->getParentFolder()->setOpenArrangeRecursively(true, LLFolderViewFolder::RECURSE_UP);
}
}
@@ -2931,7 +2931,7 @@ void LLOpenFoldersWithSelection::doFolder(LLFolderViewFolder* folder)
{
if (folder->getParentFolder() && folder->isSelected())
{
- folder->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP);
+ folder->getParentFolder()->setOpenArrangeRecursively(true, LLFolderViewFolder::RECURSE_UP);
}
}
@@ -2941,7 +2941,7 @@ void LLInventoryAction::callback_doToSelected(const LLSD& notification, const LL
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0) // YES
{
- doToSelected(model, root, action, FALSE);
+ doToSelected(model, root, action, false);
}
}
@@ -2950,11 +2950,11 @@ void LLInventoryAction::callback_copySelected(const LLSD& notification, const LL
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0) // YES, Move no copy item(s)
{
- doToSelected(model, root, "copy_or_move_to_marketplace_listings", FALSE);
+ doToSelected(model, root, "copy_or_move_to_marketplace_listings", false);
}
else if (option == 1) // NO, Don't move no copy item(s) (leave them behind)
{
- doToSelected(model, root, "copy_to_marketplace_listings", FALSE);
+ doToSelected(model, root, "copy_to_marketplace_listings", false);
}
}
@@ -2987,7 +2987,7 @@ bool get_selection_object_uuids(LLFolderView *root, uuid_vec_t& ids)
}
-void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root, const std::string& action, BOOL user_confirm)
+void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root, const std::string& action, bool user_confirm)
{
std::set<LLFolderViewItem*> selected_items = root->getSelectionList();
if (selected_items.empty()
@@ -3322,6 +3322,23 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
ungroup_folder_items(*ids.begin());
}
}
+ else if ("thumbnail" == action)
+ {
+ if (selected_items.size() > 0)
+ {
+ LLSD data;
+ std::set<LLFolderViewItem*>::iterator set_iter;
+ for (set_iter = selected_items.begin(); set_iter != selected_items.end(); ++set_iter)
+ {
+ LLFolderViewItem* folder_item = *set_iter;
+ if (!folder_item) continue;
+ LLInvFVBridge* bridge = (LLInvFVBridge*)folder_item->getViewModelItem();
+ if (!bridge) continue;
+ data.append(bridge->getUUID());
+ }
+ LLFloaterReg::showInstance("change_item_thumbnail", data);
+ }
+ }
else
{
std::set<LLFolderViewItem*>::iterator set_iter;
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h
index 5a833eab8c..0b77238bb2 100644
--- a/indra/newview/llinventoryfunctions.h
+++ b/indra/newview/llinventoryfunctions.h
@@ -43,23 +43,23 @@ const S32 COMPUTE_STOCK_NOT_EVALUATED = -2;
**/
// Is this a parent folder to a worn item
-BOOL get_is_parent_to_worn_item(const LLUUID& id);
+bool get_is_parent_to_worn_item(const LLUUID& id);
// Is this item or its baseitem is worn, attached, etc...
-BOOL get_is_item_worn(const LLUUID& id);
+bool get_is_item_worn(const LLUUID& id);
// Could this item be worn (correct type + not already being worn)
-BOOL get_can_item_be_worn(const LLUUID& id);
+bool get_can_item_be_worn(const LLUUID& id);
-BOOL get_is_item_removable(const LLInventoryModel* model, const LLUUID& id);
+bool get_is_item_removable(const LLInventoryModel* model, const LLUUID& id);
// Performs the appropiate edit action (if one exists) for this item
bool get_is_item_editable(const LLUUID& inv_item_id);
void handle_item_edit(const LLUUID& inv_item_id);
-BOOL get_is_category_removable(const LLInventoryModel* model, const LLUUID& id);
+bool get_is_category_removable(const LLInventoryModel* model, const LLUUID& id);
-BOOL get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id);
+bool get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id);
void show_item_profile(const LLUUID& item_uuid);
void show_task_item_profile(const LLUUID& item_uuid, const LLUUID& object_id);
@@ -108,7 +108,7 @@ bool is_only_cats_selected(const uuid_vec_t& selected_uuids);
bool is_only_items_selected(const uuid_vec_t& selected_uuids);
std::string get_category_path(LLUUID cat_id);
-bool can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit);
+bool can_move_to_outfit(LLInventoryItem* inv_item, bool move_is_into_current_outfit);
bool can_move_to_landmarks(LLInventoryItem* inv_item);
bool can_move_to_my_outfits(LLInventoryModel* model, LLInventoryCategory* inv_cat, U32 wear_limit);
std::string get_localized_folder_name(LLUUID cat_uuid);
@@ -178,7 +178,7 @@ private:
// Base class for LLInventoryModel::collectDescendentsIf() method
// which accepts an instance of one of these objects to use as the
// function to determine if it should be added. Derive from this class
-// and override the () operator to return TRUE if you want to collect
+// and override the () operator to return true if you want to collect
// the category or item passed in.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLInventoryCollectFunctor
@@ -228,7 +228,7 @@ protected:
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLIsType
//
-// Implementation of a LLInventoryCollectFunctor which returns TRUE if
+// Implementation of a LLInventoryCollectFunctor which returns true if
// the type is the type passed in during construction.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -246,7 +246,7 @@ protected:
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLIsNotType
//
-// Implementation of a LLInventoryCollectFunctor which returns FALSE if the
+// Implementation of a LLInventoryCollectFunctor which returns false if the
// type is the type passed in during construction, otherwise false.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLIsNotType : public LLInventoryCollectFunctor
@@ -263,7 +263,7 @@ protected:
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLIsOfAssetType
//
-// Implementation of a LLInventoryCollectFunctor which returns TRUE if
+// Implementation of a LLInventoryCollectFunctor which returns true if
// the item or category is of asset type passed in during construction.
// Link types are treated as links, not as the types they point to.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -282,7 +282,7 @@ protected:
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLAssetIDAndTypeMatches
//
-// Implementation of a LLInventoryCollectFunctor which returns TRUE if
+// Implementation of a LLInventoryCollectFunctor which returns true if
// the item matches both asset type and asset id.
// This is needed in case you are looking for a specific type with default id
// (since null is default for multiple asset types)
@@ -570,13 +570,13 @@ class LLInventoryState
{
public:
// HACK: Until we can route this info through the instant message hierarchy
- static BOOL sWearNewClothing;
+ static bool sWearNewClothing;
static LLUUID sWearNewClothingTransactionID; // wear all clothing in this transaction
};
struct LLInventoryAction
{
- static void doToSelected(LLInventoryModel* model, LLFolderView* root, const std::string& action, BOOL user_confirm = TRUE);
+ static void doToSelected(LLInventoryModel* model, LLFolderView* root, const std::string& action, bool user_confirm = true);
static void callback_doToSelected(const LLSD& notification, const LLSD& response, class LLInventoryModel* model, class LLFolderView* root, const std::string& action);
static void callback_copySelected(const LLSD& notification, const LLSD& response, class LLInventoryModel* model, class LLFolderView* root, const std::string& action);
static void onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, LLHandle<LLFolderView> root);
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp
index 230ee86fb7..ca9d8ecaf4 100644
--- a/indra/newview/llinventorygallery.cpp
+++ b/indra/newview/llinventorygallery.cpp
@@ -61,18 +61,18 @@ const S32 GALLERY_ITEMS_PER_ROW_MIN = 2;
const S32 FAST_LOAD_THUMBNAIL_TRSHOLD = 50; // load folders below this value immediately
// Helper dnd functions
-BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat, BOOL drop, std::string& tooltip_msg, BOOL is_link);
-BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop, std::string& tooltip_msg, BOOL user_confirm);
+bool dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat, bool drop, std::string& tooltip_msg, bool is_link);
+bool dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, bool drop, std::string& tooltip_msg, bool user_confirm);
void dropToMyOutfits(LLInventoryCategory* inv_cat);
class LLGalleryPanel: public LLPanel
{
public:
- BOOL canFocusChildren() const override
+ bool canFocusChildren() const override
{
// Tell Tab to not focus children
- return FALSE;
+ return false;
}
protected:
@@ -144,7 +144,7 @@ const LLInventoryGallery::Params& LLInventoryGallery::getDefaultParams()
return LLUICtrlFactory::getDefaultParams<LLInventoryGallery>();
}
-BOOL LLInventoryGallery::postBuild()
+bool LLInventoryGallery::postBuild()
{
mScrollPanel = getChild<LLScrollContainer>("gallery_scroll_panel");
LLPanel::Params params = LLPanel::getDefaultParams();
@@ -153,7 +153,7 @@ BOOL LLInventoryGallery::postBuild()
mInventoryGalleryMenu = new LLInventoryGalleryContextMenu(this);
mRootGalleryMenu = new LLInventoryGalleryContextMenu(this);
mRootGalleryMenu->setRootFolder(true);
- return TRUE;
+ return true;
}
LLInventoryGallery::~LLInventoryGallery()
@@ -223,7 +223,7 @@ void LLInventoryGallery::setRootFolder(const LLUUID cat_id)
{
if (mItemMap[id])
{
- mItemMap[id]->setSelected(FALSE);
+ mItemMap[id]->setSelected(false);
}
}
@@ -367,7 +367,7 @@ void LLInventoryGallery::draw()
}
}
-void LLInventoryGallery::onVisibilityChange(BOOL new_visibility)
+void LLInventoryGallery::onVisibilityChange(bool new_visibility)
{
if (new_visibility)
{
@@ -1020,7 +1020,7 @@ void LLInventoryGallery::updateItemThumbnail(LLUUID item_id)
}
}
-BOOL LLInventoryGallery::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLInventoryGallery::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
if (mSelectedItemIDs.size() > 0)
{
@@ -1029,7 +1029,7 @@ BOOL LLInventoryGallery::handleRightMouseDown(S32 x, S32 y, MASK mask)
mLastInteractedUUID = LLUUID::null;
// Scroll is going to always return true
- BOOL res = LLPanel::handleRightMouseDown(x, y, mask);
+ bool res = LLPanel::handleRightMouseDown(x, y, mask);
if (mLastInteractedUUID.isNull()) // no child were hit
{
@@ -1039,16 +1039,16 @@ BOOL LLInventoryGallery::handleRightMouseDown(S32 x, S32 y, MASK mask)
uuid_vec_t selected_uuids;
selected_uuids.push_back(mFolderID);
mRootGalleryMenu->show(this, selected_uuids, x, y);
- return TRUE;
+ return true;
}
}
return res;
}
-BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask)
+bool LLInventoryGallery::handleKeyHere(KEY key, MASK mask)
{
- BOOL handled = FALSE;
+ bool handled = false;
switch (key)
{
case KEY_RETURN:
@@ -1060,7 +1060,7 @@ BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask)
if (category)
{
setRootFolder(*iter);
- handled = TRUE;
+ handled = true;
}
else
{
@@ -1071,7 +1071,7 @@ BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask)
}
}
}
- handled = TRUE;
+ handled = true;
break;
case KEY_DELETE:
#if LL_DARWIN
@@ -1083,7 +1083,7 @@ BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask)
{
deleteSelection();
}
- handled = TRUE;
+ handled = true;
break;
case KEY_F2:
@@ -1092,7 +1092,7 @@ BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask)
{
mInventoryGalleryMenu->rename(mSelectedItemIDs.front());
}
- handled = TRUE;
+ handled = true;
break;
case KEY_PAGE_UP:
@@ -1101,7 +1101,7 @@ BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask)
{
mScrollPanel->pageUp(30);
}
- handled = TRUE;
+ handled = true;
break;
case KEY_PAGE_DOWN:
@@ -1110,7 +1110,7 @@ BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask)
{
mScrollPanel->pageDown(30);
}
- handled = TRUE;
+ handled = true;
break;
case KEY_HOME:
@@ -1119,7 +1119,7 @@ BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask)
{
mScrollPanel->goToTop();
}
- handled = TRUE;
+ handled = true;
break;
case KEY_END:
@@ -1128,27 +1128,27 @@ BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask)
{
mScrollPanel->goToBottom();
}
- handled = TRUE;
+ handled = true;
break;
case KEY_LEFT:
moveLeft(mask);
- handled = TRUE;
+ handled = true;
break;
case KEY_RIGHT:
moveRight(mask);
- handled = TRUE;
+ handled = true;
break;
case KEY_UP:
moveUp(mask);
- handled = TRUE;
+ handled = true;
break;
case KEY_DOWN:
moveDown(mask);
- handled = TRUE;
+ handled = true;
break;
default:
@@ -1188,7 +1188,7 @@ void LLInventoryGallery::moveUp(MASK mask)
{
changeItemSelection(item_id, true);
}
- item->setFocus(TRUE);
+ item->setFocus(true);
claimEditHandler();
}
}
@@ -1200,7 +1200,7 @@ void LLInventoryGallery::moveUp(MASK mask)
{
item = mIndexToItemMap[target];
toggleSelectionRangeFromLast(item->getUUID());
- item->setFocus(TRUE);
+ item->setFocus(true);
claimEditHandler();
}
}
@@ -1233,7 +1233,7 @@ void LLInventoryGallery::moveDown(MASK mask)
{
changeItemSelection(item_id, true);
}
- item->setFocus(TRUE);
+ item->setFocus(true);
claimEditHandler();
}
}
@@ -1245,7 +1245,7 @@ void LLInventoryGallery::moveDown(MASK mask)
{
item = mIndexToItemMap[target];
toggleSelectionRangeFromLast(item->getUUID());
- item->setFocus(TRUE);
+ item->setFocus(true);
claimEditHandler();
}
}
@@ -1295,7 +1295,7 @@ void LLInventoryGallery::moveLeft(MASK mask)
{
changeItemSelection(item_id, true);
}
- item->setFocus(TRUE);
+ item->setFocus(true);
claimEditHandler();
}
}
@@ -1338,7 +1338,7 @@ void LLInventoryGallery::moveRight(MASK mask)
{
changeItemSelection(item_id, true);
}
- item->setFocus(TRUE);
+ item->setFocus(true);
claimEditHandler();
}
}
@@ -1443,7 +1443,7 @@ void LLInventoryGallery::onFocusReceived()
}
if (focus_item)
{
- focus_item->setFocus(TRUE);
+ focus_item->setFocus(true);
}
}
else if (mIndexToItemMap.size() > 0 && mItemsToSelect.empty())
@@ -1455,7 +1455,7 @@ void LLInventoryGallery::onFocusReceived()
LLInventoryGalleryItem* focus_item = mIndexToItemMap[n];
changeItemSelection(focus_item->getUUID(), true);
- focus_item->setFocus(TRUE);
+ focus_item->setFocus(true);
}
LLPanel::onFocusReceived();
@@ -1480,7 +1480,7 @@ void LLInventoryGallery::changeItemSelection(const LLUUID& item_id, bool scroll_
{
if (mItemMap[id])
{
- mItemMap[id]->setSelected(FALSE);
+ mItemMap[id]->setSelected(false);
}
}
mSelectedItemIDs.clear();
@@ -1501,7 +1501,7 @@ void LLInventoryGallery::changeItemSelection(const LLUUID& item_id, bool scroll_
if (mItemMap[item_id])
{
- mItemMap[item_id]->setSelected(TRUE);
+ mItemMap[item_id]->setSelected(true);
}
mSelectedItemIDs.push_back(item_id);
signalSelectionItemID(item_id);
@@ -1529,7 +1529,7 @@ void LLInventoryGallery::addItemSelection(const LLUUID& item_id, bool scroll_to_
if (mItemMap[item_id])
{
- mItemMap[item_id]->setSelected(TRUE);
+ mItemMap[item_id]->setSelected(true);
}
mSelectedItemIDs.push_back(item_id);
signalSelectionItemID(item_id);
@@ -1554,7 +1554,7 @@ bool LLInventoryGallery::toggleItemSelection(const LLUUID& item_id, bool scroll_
{
if (mItemMap[item_id])
{
- mItemMap[item_id]->setSelected(FALSE);
+ mItemMap[item_id]->setSelected(false);
}
mSelectedItemIDs.erase(found);
result = false;
@@ -1563,7 +1563,7 @@ bool LLInventoryGallery::toggleItemSelection(const LLUUID& item_id, bool scroll_
{
if (mItemMap[item_id])
{
- mItemMap[item_id]->setSelected(TRUE);
+ mItemMap[item_id]->setSelected(true);
}
mSelectedItemIDs.push_back(item_id);
signalSelectionItemID(item_id);
@@ -1631,22 +1631,22 @@ void LLInventoryGallery::copy()
mFilterSubString.clear();
}
-BOOL LLInventoryGallery::canCopy() const
+bool LLInventoryGallery::canCopy() const
{
if (!getVisible() || !getEnabled() || mSelectedItemIDs.empty())
{
- return FALSE;
+ return false;
}
for (const LLUUID& id : mSelectedItemIDs)
{
if (!isItemCopyable(id))
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
void LLInventoryGallery::cut()
@@ -1668,11 +1668,11 @@ void LLInventoryGallery::cut()
mFilterSubString.clear();
}
-BOOL LLInventoryGallery::canCut() const
+bool LLInventoryGallery::canCut() const
{
if (!getVisible() || !getEnabled() || mSelectedItemIDs.empty())
{
- return FALSE;
+ return false;
}
for (const LLUUID& id : mSelectedItemIDs)
@@ -1682,16 +1682,16 @@ BOOL LLInventoryGallery::canCut() const
{
if (!get_is_category_removable(&gInventory, id))
{
- return FALSE;
+ return false;
}
}
else if (!get_is_item_removable(&gInventory, id))
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
void LLInventoryGallery::paste()
@@ -1731,7 +1731,7 @@ void LLInventoryGallery::paste()
{
if (mItemMap[id])
{
- mItemMap[id]->setSelected(FALSE);
+ mItemMap[id]->setSelected(false);
}
}
mSelectedItemIDs.clear();
@@ -1828,18 +1828,18 @@ void LLInventoryGallery::paste(const LLUUID& dest,
LLClipboard::instance().setCutMode(false);
}
-BOOL LLInventoryGallery::canPaste() const
+bool LLInventoryGallery::canPaste() const
{
- // Return FALSE on degenerated cases: empty clipboard, no inventory, no agent
+ // Return false on degenerated cases: empty clipboard, no inventory, no agent
if (!LLClipboard::instance().hasContents())
{
- return FALSE;
+ return false;
}
// In cut mode, whatever is on the clipboard is always pastable
if (LLClipboard::instance().isCutMode())
{
- return TRUE;
+ return true;
}
// In normal mode, we need to check each element of the clipboard to know if we can paste or not
@@ -1853,10 +1853,10 @@ BOOL LLInventoryGallery::canPaste() const
// Each item must be copyable to be pastable
if (!isItemCopyable(item_id))
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
void LLInventoryGallery::onDelete(const LLSD& notification, const LLSD& response, const selection_deque selected_ids)
@@ -1967,7 +1967,7 @@ void LLInventoryGallery::pasteAsLink()
{
if (mItemMap[id])
{
- mItemMap[id]->setSelected(FALSE);
+ mItemMap[id]->setSelected(false);
}
}
mSelectedItemIDs.clear();
@@ -1984,9 +1984,9 @@ void LLInventoryGallery::pasteAsLink(const LLUUID& dest,
const LLUUID& marketplacelistings_id,
const LLUUID& my_outifts_id)
{
- const BOOL move_is_into_current_outfit = (dest == current_outfit_id);
- const BOOL move_is_into_my_outfits = (dest == my_outifts_id) || gInventory.isObjectDescendentOf(dest, my_outifts_id);
- const BOOL move_is_into_marketplacelistings = gInventory.isObjectDescendentOf(dest, marketplacelistings_id);
+ const bool move_is_into_current_outfit = (dest == current_outfit_id);
+ const bool move_is_into_my_outfits = (dest == my_outifts_id) || gInventory.isObjectDescendentOf(dest, my_outifts_id);
+ const bool move_is_into_marketplacelistings = gInventory.isObjectDescendentOf(dest, marketplacelistings_id);
if (move_is_into_marketplacelistings || move_is_into_current_outfit || move_is_into_my_outfits)
{
@@ -2022,6 +2022,39 @@ void LLInventoryGallery::pasteAsLink(const LLUUID& dest,
}
}
+void LLInventoryGallery::doCreate(const LLUUID& dest, const LLSD& userdata)
+{
+
+ LLViewerInventoryCategory* cat = gInventory.getCategory(dest);
+ if (cat && mFolderID != dest)
+ {
+ menu_create_inventory_item(NULL, dest, userdata, LLUUID::null);
+ }
+ else
+ {
+ // todo: needs to reset current floater's filter,
+ // like reset_inventory_filter()
+
+ LLHandle<LLPanel> handle = getHandle();
+ std::function<void(const LLUUID&)> callback_cat_created =
+ [handle](const LLUUID& new_id)
+ {
+ gInventory.notifyObservers();
+ LLInventoryGallery* panel = static_cast<LLInventoryGallery*>(handle.get());
+ if (panel && new_id.notNull())
+ {
+ panel->clearSelection();
+ if (panel->mItemMap.count(new_id) != 0)
+ {
+ panel->addItemSelection(new_id, true);
+ }
+ }
+ };
+
+ menu_create_inventory_item(NULL, mFolderID, userdata, LLUUID::null, callback_cat_created);
+ }
+}
+
void LLInventoryGallery::claimEditHandler()
{
gEditMenuHandler = this;
@@ -2260,7 +2293,7 @@ void LLInventoryGallery::deselectItem(const LLUUID& category_id)
LLInventoryGalleryItem* item = mItemMap[category_id];
if (item && item->isSelected())
{
- mItemMap[category_id]->setSelected(FALSE);
+ mItemMap[category_id]->setSelected(false);
setFocus(true);
// Todo: support multiselect
// signalSelectionItemID(LLUUID::null);
@@ -2279,7 +2312,7 @@ void LLInventoryGallery::clearSelection()
{
if (mItemMap[id])
{
- mItemMap[id]->setSelected(FALSE);
+ mItemMap[id]->setSelected(false);
}
}
if (!mSelectedItemIDs.empty())
@@ -2381,12 +2414,12 @@ bool LLInventoryGallery::isForwardAvailable()
return (!mForwardFolders.empty() && (mFolderID != mForwardFolders.back()));
}
-BOOL LLInventoryGallery::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+bool LLInventoryGallery::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type, void* cargo_data,
EAcceptance* accept, std::string& tooltip_msg)
{
// have children handle it first
- BOOL handled = LLView::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data,
+ bool handled = LLView::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data,
accept, tooltip_msg);
// when drop is not handled by child, it should be handled by the root folder .
@@ -2581,13 +2614,13 @@ LLInventoryGalleryItem::~LLInventoryGalleryItem()
{
}
-BOOL LLInventoryGalleryItem::postBuild()
+bool LLInventoryGalleryItem::postBuild()
{
mNameText = getChild<LLTextBox>("item_name");
mTextBgPanel = getChild<LLPanel>("text_bg_panel");
mThumbnailCtrl = getChild<LLThumbnailCtrl>("preview_thumbnail");
- return TRUE;
+ return true;
}
void LLInventoryGalleryItem::setType(LLAssetType::EType type, LLInventoryType::EType inventory_type, U32 flags, bool is_link)
@@ -2691,7 +2724,7 @@ void LLInventoryGalleryItem::draw()
LLRect border = mThumbnailCtrl->getRect();
border.mRight = border.mRight + 1;
border.mTop = border.mTop + 1;
- gl_rect_2d(border, border_color.get(), FALSE);
+ gl_rect_2d(border, border_color.get(), false);
}
}
@@ -2716,7 +2749,7 @@ void LLInventoryGalleryItem::setSelected(bool value)
}
}
-BOOL LLInventoryGalleryItem::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLInventoryGalleryItem::handleMouseDown(S32 x, S32 y, MASK mask)
{
// call changeItemSelection directly, before setFocus
// to avoid autoscroll from LLInventoryGallery::onFocusReceived()
@@ -2732,7 +2765,7 @@ BOOL LLInventoryGalleryItem::handleMouseDown(S32 x, S32 y, MASK mask)
{
mGallery->changeItemSelection(mUUID, false);
}
- setFocus(TRUE);
+ setFocus(true);
mGallery->claimEditHandler();
gFocusMgr.setMouseCapture(this);
@@ -2740,10 +2773,10 @@ BOOL LLInventoryGalleryItem::handleMouseDown(S32 x, S32 y, MASK mask)
S32 screen_y;
localPointToScreen(x, y, &screen_x, &screen_y );
LLToolDragAndDrop::getInstance()->setDragStart(screen_x, screen_y);
- return TRUE;
+ return true;
}
-BOOL LLInventoryGalleryItem::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLInventoryGalleryItem::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
if (!isSelected())
{
@@ -2754,25 +2787,25 @@ BOOL LLInventoryGalleryItem::handleRightMouseDown(S32 x, S32 y, MASK mask)
// refresh last interacted
mGallery->addItemSelection(mUUID, false);
}
- setFocus(TRUE);
+ setFocus(true);
mGallery->claimEditHandler();
mGallery->showContextMenu(this, x, y, mUUID);
LLUICtrl::handleRightMouseDown(x, y, mask);
- return TRUE;
+ return true;
}
-BOOL LLInventoryGalleryItem::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLInventoryGalleryItem::handleMouseUp(S32 x, S32 y, MASK mask)
{
if(hasMouseCapture())
{
gFocusMgr.setMouseCapture(NULL);
- return TRUE;
+ return true;
}
return LLPanel::handleMouseUp(x, y, mask);
}
-BOOL LLInventoryGalleryItem::handleHover(S32 x, S32 y, MASK mask)
+bool LLInventoryGalleryItem::handleHover(S32 x, S32 y, MASK mask)
{
if(hasMouseCapture())
{
@@ -2789,7 +2822,7 @@ BOOL LLInventoryGalleryItem::handleHover(S32 x, S32 y, MASK mask)
return LLUICtrl::handleHover(x,y,mask);
}
-BOOL LLInventoryGalleryItem::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLInventoryGalleryItem::handleDoubleClick(S32 x, S32 y, MASK mask)
{
if (mIsFolder && mGallery)
{
@@ -2812,10 +2845,10 @@ BOOL LLInventoryGalleryItem::handleDoubleClick(S32 x, S32 y, MASK mask)
LLInvFVBridgeAction::doAction(mUUID, &gInventory);
}
- return TRUE;
+ return true;
}
-BOOL LLInventoryGalleryItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+bool LLInventoryGalleryItem::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
@@ -2823,19 +2856,19 @@ BOOL LLInventoryGalleryItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL dro
{
if (!mIsFolder)
{
- return FALSE;
+ return false;
}
return mGallery->baseHandleDragAndDrop(mUUID, drop, cargo_type, cargo_data, accept, tooltip_msg);
}
-BOOL LLInventoryGalleryItem::handleKeyHere(KEY key, MASK mask)
+bool LLInventoryGalleryItem::handleKeyHere(KEY key, MASK mask)
{
if (!mGallery)
{
- return FALSE;
+ return false;
}
- BOOL handled = FALSE;
+ bool handled = false;
switch (key)
{
case KEY_LEFT:
@@ -2982,7 +3015,7 @@ void LLThumbnailsObserver::removeItem(const LLUUID& obj_id)
// Helper drag&drop functions
//-----------------------------
-BOOL LLInventoryGallery::baseHandleDragAndDrop(LLUUID dest_id, BOOL drop,
+bool LLInventoryGallery::baseHandleDragAndDrop(LLUUID dest_id, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
@@ -2995,7 +3028,7 @@ BOOL LLInventoryGallery::baseHandleDragAndDrop(LLUUID dest_id, BOOL drop,
clearSelection();
}
- BOOL accepted = FALSE;
+ bool accepted = false;
switch(cargo_type)
{
case DAD_TEXTURE:
@@ -3027,12 +3060,12 @@ BOOL LLInventoryGallery::baseHandleDragAndDrop(LLUUID dest_id, BOOL drop,
LLInventoryCategory* linked_category = gInventory.getCategory(inv_item->getLinkedUUID());
if (linked_category)
{
- accepted = dragCategoryIntoFolder(dest_id, (LLInventoryCategory*)linked_category, drop, tooltip_msg, TRUE);
+ accepted = dragCategoryIntoFolder(dest_id, (LLInventoryCategory*)linked_category, drop, tooltip_msg, true);
}
}
else
{
- accepted = dragItemIntoFolder(dest_id, inv_item, drop, tooltip_msg, TRUE);
+ accepted = dragItemIntoFolder(dest_id, inv_item, drop, tooltip_msg, true);
}
if (accepted && drop && inv_item)
{
@@ -3042,12 +3075,12 @@ BOOL LLInventoryGallery::baseHandleDragAndDrop(LLUUID dest_id, BOOL drop,
case DAD_CATEGORY:
if (LLFriendCardsManager::instance().isAnyFriendCategory(dest_id))
{
- accepted = FALSE;
+ accepted = false;
}
else
{
LLInventoryCategory* cat_ptr = (LLInventoryCategory*)cargo_data;
- accepted = dragCategoryIntoFolder(dest_id, cat_ptr, drop, tooltip_msg, FALSE);
+ accepted = dragCategoryIntoFolder(dest_id, cat_ptr, drop, tooltip_msg, false);
if (accepted && drop)
{
mItemsToSelect.push_back(cat_ptr->getUUID());
@@ -3073,23 +3106,23 @@ BOOL LLInventoryGallery::baseHandleDragAndDrop(LLUUID dest_id, BOOL drop,
}
// copy of LLFolderBridge::dragItemIntoFolder
-BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop, std::string& tooltip_msg, BOOL user_confirm)
+bool dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, bool drop, std::string& tooltip_msg, bool user_confirm)
{
LLViewerInventoryCategory * cat = gInventory.getCategory(folder_id);
if (!cat)
{
- return FALSE;
+ return false;
}
LLInventoryModel* model = &gInventory;
- if (!model || !inv_item) return FALSE;
+ if (!model || !inv_item) return false;
// cannot drag into library
if((gInventory.getRootFolderID() != folder_id) && !model->isObjectDescendentOf(folder_id, gInventory.getRootFolderID()))
{
- return FALSE;
+ return false;
}
- if (!isAgentAvatarValid()) return FALSE;
+ if (!isAgentAvatarValid()) return false;
const LLUUID &current_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
const LLUUID &favorites_id = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE);
@@ -3097,29 +3130,29 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS);
const LLUUID &my_outifts_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
- const BOOL move_is_into_current_outfit = (folder_id == current_outfit_id);
- const BOOL move_is_into_favorites = (folder_id == favorites_id);
- const BOOL move_is_into_my_outfits = (folder_id == my_outifts_id) || model->isObjectDescendentOf(folder_id, my_outifts_id);
- const BOOL move_is_into_outfit = move_is_into_my_outfits || (cat && cat->getPreferredType()==LLFolderType::FT_OUTFIT);
- const BOOL move_is_into_landmarks = (folder_id == landmarks_id) || model->isObjectDescendentOf(folder_id, landmarks_id);
- const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(folder_id, marketplacelistings_id);
- const BOOL move_is_from_marketplacelistings = model->isObjectDescendentOf(inv_item->getUUID(), marketplacelistings_id);
+ const bool move_is_into_current_outfit = (folder_id == current_outfit_id);
+ const bool move_is_into_favorites = (folder_id == favorites_id);
+ const bool move_is_into_my_outfits = (folder_id == my_outifts_id) || model->isObjectDescendentOf(folder_id, my_outifts_id);
+ const bool move_is_into_outfit = move_is_into_my_outfits || (cat && cat->getPreferredType()==LLFolderType::FT_OUTFIT);
+ const bool move_is_into_landmarks = (folder_id == landmarks_id) || model->isObjectDescendentOf(folder_id, landmarks_id);
+ const bool move_is_into_marketplacelistings = model->isObjectDescendentOf(folder_id, marketplacelistings_id);
+ const bool move_is_from_marketplacelistings = model->isObjectDescendentOf(inv_item->getUUID(), marketplacelistings_id);
LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource();
- BOOL accept = FALSE;
+ bool accept = false;
LLViewerObject* object = NULL;
if(LLToolDragAndDrop::SOURCE_AGENT == source)
{
const LLUUID &trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
- const BOOL move_is_into_trash = (folder_id == trash_id) || model->isObjectDescendentOf(folder_id, trash_id);
- const BOOL move_is_outof_current_outfit = LLAppearanceMgr::instance().getIsInCOF(inv_item->getUUID());
+ const bool move_is_into_trash = (folder_id == trash_id) || model->isObjectDescendentOf(folder_id, trash_id);
+ const bool move_is_outof_current_outfit = LLAppearanceMgr::instance().getIsInCOF(inv_item->getUUID());
//--------------------------------------------------------------------------------
// Determine if item can be moved.
//
- BOOL is_movable = TRUE;
+ bool is_movable = true;
switch (inv_item->getActualType())
{
@@ -3132,7 +3165,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
// Can't explicitly drag things out of the COF.
if (move_is_outof_current_outfit)
{
- is_movable = FALSE;
+ is_movable = false;
}
if (move_is_into_trash)
{
@@ -3155,15 +3188,15 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
// Determine if item can be moved & dropped
// Note: if user_confirm is false, we already went through those accept logic test and can skip them
- accept = TRUE;
+ accept = true;
if (user_confirm && !is_movable)
{
- accept = FALSE;
+ accept = false;
}
else if (user_confirm && (folder_id == inv_item->getParentUUID()) && !move_is_into_favorites)
{
- accept = FALSE;
+ accept = false;
}
else if (user_confirm && (move_is_into_current_outfit || move_is_into_outfit))
{
@@ -3176,7 +3209,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
else if (user_confirm && move_is_into_marketplacelistings)
{
//disable dropping in or out of marketplace for now
- return FALSE;
+ return false;
/*const LLViewerInventoryCategory * master_folder = model->getFirstDescendantOf(marketplacelistings_id, folder_id);
LLViewerInventoryCategory * dest_folder = cat;
@@ -3190,7 +3223,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
accept = dest_folder->acceptItem(inv_item);
}
- LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
+ LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(false);
if (accept && drop)
{
@@ -3211,7 +3244,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
if (user_confirm && (move_is_from_marketplacelistings || move_is_into_marketplacelistings))
{
//disable dropping in or out of marketplace for now
- return FALSE;
+ return false;
}
//--------------------------------------------------------------------------------
@@ -3249,7 +3282,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
else if (move_is_into_marketplacelistings)
{
//move_item_to_marketplacelistings(inv_item, mUUID);
- return FALSE;
+ return false;
}
// NORMAL or TRASH folder
// (move the item, restamp if into trash)
@@ -3280,7 +3313,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
}
});
}*/
- return FALSE;
+ return false;
}
//
@@ -3296,7 +3329,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
if (!object)
{
LL_INFOS() << "Object not found for drop." << LL_ENDL;
- return FALSE;
+ return false;
}
// coming from a task. Need to figure out if the person can
@@ -3307,7 +3340,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
&& perm.allowTransferTo(gAgent.getID())))
// || gAgent.isGodlike())
{
- accept = TRUE;
+ accept = true;
}
else if(object->permYouOwner())
{
@@ -3315,26 +3348,26 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
// inventory is owned by the agent, then the item can be
// moved from the task to agent inventory.
is_move = true;
- accept = TRUE;
+ accept = true;
}
// Don't allow placing an original item into Current Outfit or an outfit folder
// because they must contain only links to wearable items.
if (move_is_into_current_outfit || move_is_into_outfit)
{
- accept = FALSE;
+ accept = false;
}
// Don't allow to move a single item to Favorites or Landmarks
// if it is not a landmark or a link to a landmark.
else if ((move_is_into_favorites || move_is_into_landmarks)
&& !can_move_to_landmarks(inv_item))
{
- accept = FALSE;
+ accept = false;
}
else if (move_is_into_marketplacelistings)
{
tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory");
- accept = FALSE;
+ accept = false;
}
if (accept && drop)
@@ -3365,12 +3398,12 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
if (move_is_into_marketplacelistings)
{
tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory");
- accept = FALSE;
+ accept = false;
}
else if ((inv_item->getActualType() == LLAssetType::AT_SETTINGS) && !LLEnvironment::instance().isInventoryEnabled())
{
tooltip_msg = LLTrans::getString("NoEnvironmentSettings");
- accept = FALSE;
+ accept = false;
}
else
{
@@ -3392,12 +3425,12 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
LLViewerInventoryItem* item = (LLViewerInventoryItem*)inv_item;
if(item && item->isFinished())
{
- accept = TRUE;
+ accept = true;
if (move_is_into_marketplacelistings)
{
tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory");
- accept = FALSE;
+ accept = false;
}
else if (move_is_into_current_outfit || move_is_into_outfit)
{
@@ -3459,24 +3492,24 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
}
// copy of LLFolderBridge::dragCategoryIntoFolder
-BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat,
- BOOL drop, std::string& tooltip_msg, BOOL is_link)
+bool dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat,
+ bool drop, std::string& tooltip_msg, bool is_link)
{
- BOOL user_confirm = TRUE;
+ bool user_confirm = true;
LLInventoryModel* model = &gInventory;
LLViewerInventoryCategory * dest_cat = gInventory.getCategory(dest_id);
if (!dest_cat)
{
- return FALSE;
+ return false;
}
- if (!inv_cat) return FALSE; // shouldn't happen, but in case item is incorrectly parented in which case inv_cat will be NULL
+ if (!inv_cat) return false; // shouldn't happen, but in case item is incorrectly parented in which case inv_cat will be NULL
- if (!isAgentAvatarValid()) return FALSE;
+ if (!isAgentAvatarValid()) return false;
// cannot drag into library
if((gInventory.getRootFolderID() != dest_id) && !model->isObjectDescendentOf(dest_id, gInventory.getRootFolderID()))
{
- return FALSE;
+ return false;
}
const LLUUID &cat_id = inv_cat->getUUID();
@@ -3484,16 +3517,16 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat,
const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS);
//const LLUUID from_folder_uuid = inv_cat->getParentUUID();
- const BOOL move_is_into_current_outfit = (dest_id == current_outfit_id);
- const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(dest_id, marketplacelistings_id);
- const BOOL move_is_from_marketplacelistings = model->isObjectDescendentOf(cat_id, marketplacelistings_id);
+ const bool move_is_into_current_outfit = (dest_id == current_outfit_id);
+ const bool move_is_into_marketplacelistings = model->isObjectDescendentOf(dest_id, marketplacelistings_id);
+ const bool move_is_from_marketplacelistings = model->isObjectDescendentOf(cat_id, marketplacelistings_id);
// check to make sure source is agent inventory, and is represented there.
LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource();
- const BOOL is_agent_inventory = (model->getCategory(cat_id) != NULL)
+ const bool is_agent_inventory = (model->getCategory(cat_id) != NULL)
&& (LLToolDragAndDrop::SOURCE_AGENT == source);
- BOOL accept = FALSE;
+ bool accept = false;
if (is_agent_inventory)
{
@@ -3502,22 +3535,22 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat,
const LLUUID &my_outifts_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
const LLUUID &lost_and_found_id = model->findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND);
- const BOOL move_is_into_trash = (dest_id == trash_id) || model->isObjectDescendentOf(dest_id, trash_id);
- const BOOL move_is_into_my_outfits = (dest_id == my_outifts_id) || model->isObjectDescendentOf(dest_id, my_outifts_id);
- const BOOL move_is_into_outfit = move_is_into_my_outfits || (dest_cat && dest_cat->getPreferredType()==LLFolderType::FT_OUTFIT);
- const BOOL move_is_into_current_outfit = (dest_cat && dest_cat->getPreferredType()==LLFolderType::FT_CURRENT_OUTFIT);
- const BOOL move_is_into_landmarks = (dest_id == landmarks_id) || model->isObjectDescendentOf(dest_id, landmarks_id);
- const BOOL move_is_into_lost_and_found = model->isObjectDescendentOf(dest_id, lost_and_found_id);
+ const bool move_is_into_trash = (dest_id == trash_id) || model->isObjectDescendentOf(dest_id, trash_id);
+ const bool move_is_into_my_outfits = (dest_id == my_outifts_id) || model->isObjectDescendentOf(dest_id, my_outifts_id);
+ const bool move_is_into_outfit = move_is_into_my_outfits || (dest_cat && dest_cat->getPreferredType()==LLFolderType::FT_OUTFIT);
+ const bool move_is_into_current_outfit = (dest_cat && dest_cat->getPreferredType()==LLFolderType::FT_CURRENT_OUTFIT);
+ const bool move_is_into_landmarks = (dest_id == landmarks_id) || model->isObjectDescendentOf(dest_id, landmarks_id);
+ const bool move_is_into_lost_and_found = model->isObjectDescendentOf(dest_id, lost_and_found_id);
//--------------------------------------------------------------------------------
// Determine if folder can be moved.
//
- BOOL is_movable = TRUE;
+ bool is_movable = true;
if (is_movable && (marketplacelistings_id == cat_id))
{
- is_movable = FALSE;
+ is_movable = false;
tooltip_msg = LLTrans::getString("TooltipOutboxCannotMoveRoot");
}
if (is_movable && move_is_from_marketplacelistings)
@@ -3525,22 +3558,22 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat,
{
// If the incoming folder is listed and active (and is therefore either the listing or the version folder),
// then moving is *not* allowed
- is_movable = FALSE;
+ is_movable = false;
tooltip_msg = LLTrans::getString("TooltipOutboxDragActive");
}
if (is_movable && (dest_id == cat_id))
{
- is_movable = FALSE;
+ is_movable = false;
tooltip_msg = LLTrans::getString("TooltipDragOntoSelf");
}
if (is_movable && (model->isObjectDescendentOf(dest_id, cat_id)))
{
- is_movable = FALSE;
+ is_movable = false;
tooltip_msg = LLTrans::getString("TooltipDragOntoOwnChild");
}
if (is_movable && LLFolderType::lookupIsProtectedType(inv_cat->getPreferredType()))
{
- is_movable = FALSE;
+ is_movable = false;
// tooltip?
}
@@ -3575,21 +3608,21 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat,
}
if(is_movable && move_is_into_current_outfit && is_link)
{
- is_movable = FALSE;
+ is_movable = false;
}
if (is_movable && move_is_into_lost_and_found)
{
- is_movable = FALSE;
+ is_movable = false;
}
if (is_movable && (dest_id == model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE)))
{
- is_movable = FALSE;
+ is_movable = false;
// tooltip?
}
if (is_movable && (dest_cat->getPreferredType() == LLFolderType::FT_MARKETPLACE_STOCK))
{
// One cannot move a folder into a stock folder
- is_movable = FALSE;
+ is_movable = false;
// tooltip?
}
@@ -3597,14 +3630,14 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat,
LLInventoryModel::item_array_t descendent_items;
if (is_movable)
{
- model->collectDescendents(cat_id, descendent_categories, descendent_items, FALSE);
+ model->collectDescendents(cat_id, descendent_categories, descendent_items, false);
for (S32 i=0; i < descendent_categories.size(); ++i)
{
LLInventoryCategory* category = descendent_categories[i];
if(LLFolderType::lookupIsProtectedType(category->getPreferredType()))
{
// Can't move "special folders" (e.g. Textures Folder).
- is_movable = FALSE;
+ is_movable = false;
break;
}
}
@@ -3625,7 +3658,7 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat,
if (items.size() > max_items_to_wear)
{
// Can't move 'large' folders into current outfit: MAINT-4086
- is_movable = FALSE;
+ is_movable = false;
LLStringUtil::format_map_t args;
args["AMOUNT"] = llformat("%d", max_items_to_wear);
tooltip_msg = LLTrans::getString("TooltipTooManyWearables",args);
@@ -3638,7 +3671,7 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat,
LLInventoryItem* item = descendent_items[i];
if (get_is_item_worn(item->getUUID()))
{
- is_movable = FALSE;
+ is_movable = false;
break; // It's generally movable, but not into the trash.
}
}
@@ -3653,7 +3686,7 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat,
// We use getType() instead of getActua;Type() to allow links to landmarks and folders.
if (LLAssetType::AT_LANDMARK != item->getType() && LLAssetType::AT_CATEGORY != item->getType())
{
- is_movable = FALSE;
+ is_movable = false;
break; // It's generally movable, but not into Landmarks.
}
}
@@ -3678,7 +3711,7 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat,
if (user_confirm && (move_is_from_marketplacelistings || move_is_into_marketplacelistings))
{
//disable dropping in or out of marketplace for now
- return FALSE;
+ return false;
}
// Look for any gestures and deactivate them
if (move_is_into_trash)
@@ -3706,7 +3739,7 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat,
inv_cat->getPreferredType() == LLFolderType::FT_OUTFIT))
{
// traverse category and add all contents to currently worn.
- BOOL append = true;
+ bool append = true;
LLAppearanceMgr::instance().wearInventoryCategory(inv_cat, false, append);
}
else if (move_is_into_marketplacelistings)
@@ -3730,7 +3763,7 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat,
if (move_is_from_marketplacelistings)
{
//disable dropping in or out of marketplace for now
- return FALSE;
+ return false;
// If we are moving a folder at the listing folder level (i.e. its parent is the marketplace listings folder)
/*if (from_folder_uuid == marketplacelistings_id)
@@ -3769,7 +3802,7 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat,
if (move_is_into_marketplacelistings)
{
tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory");
- accept = FALSE;
+ accept = false;
}
else
{
@@ -3781,7 +3814,7 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat,
if (move_is_into_marketplacelistings)
{
tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory");
- accept = FALSE;
+ accept = false;
}
else
{
diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h
index 0c52e7b713..fac1c1f6ae 100644
--- a/indra/newview/llinventorygallery.h
+++ b/indra/newview/llinventorygallery.h
@@ -75,15 +75,15 @@ public:
LLInventoryGallery(const LLInventoryGallery::Params& params = getDefaultParams());
~LLInventoryGallery();
- BOOL postBuild() override;
+ bool postBuild() override;
void initGallery();
void draw() override;
- void onVisibilityChange(BOOL new_visibility) override;
- BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type,
+ void onVisibilityChange(bool new_visibility) override;
+ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type,
void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) override;
void startDrag();
- BOOL handleRightMouseDown(S32 x, S32 y, MASK mask) override;
- BOOL handleKeyHere(KEY key, MASK mask) override;
+ bool handleRightMouseDown(S32 x, S32 y, MASK mask) override;
+ bool handleKeyHere(KEY key, MASK mask) override;
void moveUp(MASK mask);
void moveDown(MASK mask);
void moveLeft(MASK mask);
@@ -153,19 +153,20 @@ public:
// Copy & paste (LLEditMenuHandler)
void copy() override;
- BOOL canCopy() const override;
+ bool canCopy() const override;
void cut() override;
- BOOL canCut() const override;
+ bool canCut() const override;
void paste() override;
- BOOL canPaste() const override;
+ bool canPaste() const override;
// Copy & paste & delete
static void onDelete(const LLSD& notification, const LLSD& response, const selection_deque selected_ids);
void deleteSelection();
bool canDeleteSelection();
void pasteAsLink();
+ void doCreate(const LLUUID& dest, const LLSD& userdata);
void setSortOrder(U32 order, bool update = false);
U32 getSortOrder() { return mSortOrder; };
@@ -174,7 +175,7 @@ public:
void resetEditHandler();
static bool isItemCopyable(const LLUUID & item_id);
- BOOL baseHandleDragAndDrop(LLUUID dest_id, BOOL drop, EDragAndDropType cargo_type,
+ bool baseHandleDragAndDrop(LLUUID dest_id, bool drop, EDragAndDropType cargo_type,
void* cargo_data, EAcceptance* accept, std::string& tooltip_msg);
void showContextMenu(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& item_id);
@@ -298,19 +299,19 @@ public:
LLInventoryGalleryItem(const Params& p);
virtual ~LLInventoryGalleryItem();
- BOOL postBuild();
+ bool postBuild();
void draw();
- BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
- BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
- BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- BOOL handleHover(S32 x, S32 y, MASK mask);
- BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ bool handleMouseDown(S32 x, S32 y, MASK mask);
+ bool handleRightMouseDown(S32 x, S32 y, MASK mask);
+ bool handleDoubleClick(S32 x, S32 y, MASK mask);
+ bool handleMouseUp(S32 x, S32 y, MASK mask);
+ bool handleHover(S32 x, S32 y, MASK mask);
+ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
std::string& tooltip_msg);
- BOOL handleKeyHere(KEY key, MASK mask);
+ bool handleKeyHere(KEY key, MASK mask);
void onFocusLost();
void onFocusReceived();
diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp
index 5f4b816b99..50a544db88 100644
--- a/indra/newview/llinventorygallerymenu.cpp
+++ b/indra/newview/llinventorygallerymenu.cpp
@@ -32,9 +32,11 @@
#include "llappearancemgr.h"
#include "llavataractions.h"
#include "llclipboard.h"
+#include "llenvironment.h"
#include "llfloaterreg.h"
#include "llfloatersidepanelcontainer.h"
#include "llfloaterworldmap.h"
+#include "llfriendcard.h"
#include "llinventorybridge.h"
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
@@ -48,6 +50,41 @@
#include "llviewerwindow.h"
#include "llvoavatarself.h"
+
+void modify_outfit(bool append, const LLUUID& cat_id, LLInventoryModel* model)
+{
+ LLViewerInventoryCategory* cat = model->getCategory(cat_id);
+ if (!cat) return;
+
+ // checking amount of items to wear
+ static LLCachedControl<U32> max_items(gSavedSettings, "WearFolderLimit", 125);
+ LLInventoryModel::cat_array_t cats;
+ LLInventoryModel::item_array_t items;
+ LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false);
+ model->collectDescendentsIf(cat_id,
+ cats,
+ items,
+ LLInventoryModel::EXCLUDE_TRASH,
+ not_worn);
+
+ if (items.size() > max_items())
+ {
+ LLSD args;
+ args["AMOUNT"] = llformat("%u", max_items());
+ LLNotificationsUtil::add("TooManyWearables", args);
+ return;
+ }
+ if (model->isObjectDescendentOf(cat_id, gInventory.getRootFolderID()))
+ {
+ LLAppearanceMgr::instance().wearInventoryCategory(cat, false, append);
+ }
+ else
+ {
+ // Library, we need to copy content first
+ LLAppearanceMgr::instance().wearInventoryCategory(cat, true, append);
+ }
+}
+
LLContextMenu* LLInventoryGalleryContextMenu::createMenu()
{
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
@@ -57,11 +94,33 @@ LLContextMenu* LLInventoryGalleryContextMenu::createMenu()
registrar.add("Inventory.FileUploadLocation", boost::bind(&LLInventoryGalleryContextMenu::fileUploadLocation, this, _2));
registrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLFolderType::FT_TRASH));
registrar.add("Inventory.EmptyLostAndFound", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyLostAndFound", LLFolderType::FT_LOST_AND_FOUND));
+ registrar.add("Inventory.DoCreate", [this](LLUICtrl*, const LLSD& data)
+ {
+ if (mRootFolder)
+ {
+ mGallery->doCreate(mGallery->getRootFolder(), data);
+ }
+ else
+ {
+ mGallery->doCreate(mUUIDs.front(), data);
+ }
+ });
std::set<LLUUID> uuids(mUUIDs.begin(), mUUIDs.end());
registrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, uuids, gFloaterView->getParentFloater(mGallery)));
enable_registrar.add("Inventory.CanSetUploadLocation", boost::bind(&LLInventoryGalleryContextMenu::canSetUploadLocation, this, _2));
+ enable_registrar.add("Inventory.EnvironmentEnabled", [](LLUICtrl*, const LLSD&)
+ {
+ return LLEnvironment::instance().isInventoryEnabled();
+ });
+ enable_registrar.add("Inventory.MaterialsEnabled", [](LLUICtrl*, const LLSD&)
+ {
+ std::string agent_url = gAgent.getRegionCapability("UpdateMaterialAgentInventory");
+ std::string task_url = gAgent.getRegionCapability("UpdateMaterialTaskInventory");
+
+ return (!agent_url.empty() && !task_url.empty());
+ });
LLContextMenu* menu = createFromFile("menu_gallery_inventory.xml");
@@ -138,7 +197,11 @@ void LLInventoryGalleryContextMenu::doToSelected(const LLSD& userdata)
}
else if ("thumbnail" == action)
{
- LLSD data(mUUIDs.front());
+ LLSD data;
+ for (const LLUUID& id : mUUIDs)
+ {
+ data.append(id);
+ }
LLFloaterReg::showInstance("change_item_thumbnail", data);
}
else if ("cut" == action)
@@ -186,6 +249,22 @@ void LLInventoryGalleryContextMenu::doToSelected(const LLSD& userdata)
{
ungroup_folder_items(mUUIDs.front());
}
+ else if ("replaceoutfit" == action)
+ {
+ modify_outfit(false, mUUIDs.front(), &gInventory);
+ }
+ else if ("addtooutfit" == action)
+ {
+ modify_outfit(true, mUUIDs.front(), &gInventory);
+ }
+ else if ("removefromoutfit" == action)
+ {
+ LLViewerInventoryCategory* cat = gInventory.getCategory(mUUIDs.front());
+ if (cat)
+ {
+ LLAppearanceMgr::instance().takeOffOutfit(cat->getLinkedUUID());
+ }
+ }
else if ("take_off" == action || "detach" == action)
{
for (LLUUID& selected_id : mUUIDs)
@@ -295,6 +374,54 @@ void LLInventoryGalleryContextMenu::doToSelected(const LLSD& userdata)
preview_texture->saveAs();
}
}
+ else if (("copy_to_marketplace_listings" == action)
+ || ("move_to_marketplace_listings" == action))
+ {
+ LLViewerInventoryItem* itemp = gInventory.getItem(mUUIDs.front());
+ bool copy_operation = "copy_to_marketplace_listings" == action;
+ bool can_copy = itemp ? itemp->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID(), gAgent.getGroupID()) : false;
+
+
+ if (can_copy)
+ {
+ const LLUUID& marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS);
+ if (itemp)
+ {
+ move_item_to_marketplacelistings(itemp, marketplacelistings_id, copy_operation);
+ }
+ }
+ else
+ {
+ uuid_vec_t lamdba_list = mUUIDs;
+ LLNotificationsUtil::add(
+ "ConfirmCopyToMarketplace",
+ LLSD(),
+ LLSD(),
+ [lamdba_list](const LLSD& notification, const LLSD& response)
+ {
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ // option == 0 Move no copy item(s)
+ // option == 1 Don't move no copy item(s) (leave them behind)
+ bool copy_and_move = option == 0;
+ const LLUUID& marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS);
+
+ // main inventory only allows one item?
+ LLViewerInventoryItem* itemp = gInventory.getItem(lamdba_list.front());
+ if (itemp)
+ {
+ if (itemp->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID(), gAgent.getGroupID()))
+ {
+ move_item_to_marketplacelistings(itemp, marketplacelistings_id, true);
+ }
+ else if (copy_and_move)
+ {
+ move_item_to_marketplacelistings(itemp, marketplacelistings_id, false);
+ }
+ }
+ }
+ );
+ }
+ }
}
void LLInventoryGalleryContextMenu::rename(const LLUUID& item_id)
@@ -388,6 +515,56 @@ bool is_inbox_folder(LLUUID item_id)
return gInventory.isObjectDescendentOf(item_id, inbox_id);
}
+bool can_list_on_marketplace(const LLUUID &id)
+{
+ const LLInventoryObject* obj = gInventory.getObject(id);
+ bool can_list = (obj != NULL);
+
+ if (can_list)
+ {
+ const LLUUID& object_id = obj->getLinkedUUID();
+ can_list = object_id.notNull();
+
+ if (can_list)
+ {
+ std::string error_msg;
+ const LLUUID& marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS);
+ if (marketplacelistings_id.notNull())
+ {
+ LLViewerInventoryCategory* master_folder = gInventory.getCategory(marketplacelistings_id);
+ LLInventoryCategory* cat = gInventory.getCategory(id);
+ if (cat)
+ {
+ can_list = can_move_folder_to_marketplace(master_folder, master_folder, cat, error_msg);
+ }
+ else
+ {
+ LLInventoryItem* item = gInventory.getItem(id);
+ can_list = (item ? can_move_item_to_marketplace(master_folder, master_folder, item, error_msg) : false);
+ }
+ }
+ else
+ {
+ can_list = false;
+ }
+ }
+ }
+
+ return can_list;
+}
+
+bool check_folder_for_contents_of_type(const LLUUID &id, LLInventoryModel* model, LLInventoryCollectFunctor& is_type)
+{
+ LLInventoryModel::cat_array_t cat_array;
+ LLInventoryModel::item_array_t item_array;
+ model->collectDescendentsIf(id,
+ cat_array,
+ item_array,
+ LLInventoryModel::EXCLUDE_TRASH,
+ is_type);
+ return item_array.size() > 0;
+}
+
void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* menu)
{
LLUUID selected_id = mUUIDs.front();
@@ -409,6 +586,7 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
bool is_in_trash = gInventory.isObjectDescendentOf(selected_id, gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH));
bool is_lost_and_found = (selected_id == gInventory.findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND));
bool is_outfits= (selected_id == gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS));
+ bool is_in_favorites = gInventory.isObjectDescendentOf(selected_id, gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE));
//bool is_favorites= (selected_id == gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE));
bool is_system_folder = false;
@@ -456,6 +634,49 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
items.push_back(std::string("open_in_new_window"));
items.push_back(std::string("Open Folder Separator"));
}
+
+ // wearables related functionality for folders.
+ LLFindWearables is_wearable;
+ LLIsType is_object(LLAssetType::AT_OBJECT);
+ LLIsType is_gesture(LLAssetType::AT_GESTURE);
+
+ if (check_folder_for_contents_of_type(selected_id, &gInventory, is_wearable)
+ || check_folder_for_contents_of_type(selected_id, &gInventory, is_object)
+ || check_folder_for_contents_of_type(selected_id, &gInventory, is_gesture))
+ {
+ // Only enable add/replace outfit for non-system folders.
+ if (!is_system_folder)
+ {
+ // Adding an outfit onto another (versus replacing) doesn't make sense.
+ if (folder_type != LLFolderType::FT_OUTFIT)
+ {
+ items.push_back(std::string("Add To Outfit"));
+ if (!LLAppearanceMgr::instance().getCanAddToCOF(selected_id))
+ {
+ disabled_items.push_back(std::string("Add To Outfit"));
+ }
+ }
+
+ items.push_back(std::string("Replace Outfit"));
+ if (!LLAppearanceMgr::instance().getCanReplaceCOF(selected_id))
+ {
+ disabled_items.push_back(std::string("Replace Outfit"));
+ }
+ }
+ if (is_agent_inventory)
+ {
+ items.push_back(std::string("Folder Wearables Separator"));
+ // Note: If user tries to unwear "My Inventory", it's going to deactivate everything including gestures
+ // Might be safer to disable this for "My Inventory"
+ items.push_back(std::string("Remove From Outfit"));
+ if (folder_type != LLFolderType::FT_ROOT_INVENTORY // Unless COF is empty, whih shouldn't be, warrantied to have worn items
+ && !LLAppearanceMgr::getCanRemoveFromCOF(selected_id)) // expensive from root!
+ {
+ disabled_items.push_back(std::string("Remove From Outfit"));
+ }
+ }
+ items.push_back(std::string("Outfit Separator"));
+ }
}
else
{
@@ -503,11 +724,30 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
}
else
{
+ if (is_agent_inventory && !is_inbox && !is_cof && !is_in_favorites && !is_outfits)
+ {
+ LLViewerInventoryCategory* category = gInventory.getCategory(selected_id);
+ if (!category || !LLFriendCardsManager::instance().isCategoryInFriendFolder(category))
+ {
+ items.push_back(std::string("New Folder"));
+ }
+
+ items.push_back(std::string("create_new"));
+ items.push_back(std::string("New Script"));
+ items.push_back(std::string("New Note"));
+ items.push_back(std::string("New Gesture"));
+ items.push_back(std::string("New Material"));
+ items.push_back(std::string("New Clothes"));
+ items.push_back(std::string("New Body Parts"));
+ items.push_back(std::string("New Settings"));
+ }
+
if(can_share_item(selected_id))
{
items.push_back(std::string("Share"));
}
- if (LLClipboard::instance().hasContents() && is_agent_inventory && !is_cof && !is_inbox_folder(selected_id))
+
+ if (LLClipboard::instance().hasContents() && is_agent_inventory && !is_cof && !is_inbox)
{
items.push_back(std::string("Paste"));
@@ -519,7 +759,7 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
}
if (is_folder && is_agent_inventory)
{
- if (!is_cof && (folder_type != LLFolderType::FT_OUTFIT) && !is_outfits && !is_inbox_folder(selected_id))
+ if (!is_cof && (folder_type != LLFolderType::FT_OUTFIT) && !is_outfits && !is_inbox)
{
if (!gInventory.isObjectDescendentOf(selected_id, gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD)) && !isRootFolder())
{
@@ -706,6 +946,54 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
disabled_items.push_back(std::string("New Folder"));
disabled_items.push_back(std::string("upload_def"));
+ disabled_items.push_back(std::string("create_new"));
+ }
+
+ if (is_agent_inventory && !mRootFolder)
+ {
+ items.push_back(std::string("New folder from selected"));
+ items.push_back(std::string("Subfolder Separator"));
+ if (!is_only_items_selected(mUUIDs) && !is_only_cats_selected(mUUIDs))
+ {
+ disabled_items.push_back(std::string("New folder from selected"));
+ }
+ }
+
+ // Marketplace
+ bool can_list = false;
+ const LLUUID marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS);
+ if (marketplacelistings_id.notNull() && !is_inbox && !obj->getIsLinkType())
+ {
+ if (is_folder)
+ {
+ LLViewerInventoryCategory* cat = gInventory.getCategory(selected_id);
+ if (cat
+ && !LLFolderType::lookupIsProtectedType(cat->getPreferredType())
+ && gInventory.isObjectDescendentOf(selected_id, gInventory.getRootFolderID()))
+ {
+ can_list = true;
+ }
+ }
+ else if (selected_item
+ && selected_item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())
+ && selected_item->getPermissions().getOwner() != ALEXANDRIA_LINDEN_ID
+ && LLAssetType::AT_CALLINGCARD != selected_item->getType())
+ {
+ can_list = true;
+ }
+ }
+
+ if (can_list)
+ {
+ items.push_back(std::string("Marketplace Separator"));
+ items.push_back(std::string("Marketplace Copy"));
+ items.push_back(std::string("Marketplace Move"));
+
+ if (!can_list_on_marketplace(selected_id))
+ {
+ disabled_items.push_back(std::string("Marketplace Copy"));
+ disabled_items.push_back(std::string("Marketplace Move"));
+ }
}
}
diff --git a/indra/newview/llinventoryicon.cpp b/indra/newview/llinventoryicon.cpp
index e9b0e8404a..df2dc0334e 100644
--- a/indra/newview/llinventoryicon.cpp
+++ b/indra/newview/llinventoryicon.cpp
@@ -110,7 +110,7 @@ LLIconDictionary::LLIconDictionary()
LLUIImagePtr LLInventoryIcon::getIcon(LLAssetType::EType asset_type,
LLInventoryType::EType inventory_type,
U32 misc_flag,
- BOOL item_is_multi)
+ bool item_is_multi)
{
const std::string& icon_name = getIconName(asset_type, inventory_type, misc_flag, item_is_multi);
return LLUI::getUIImage(icon_name);
@@ -124,7 +124,7 @@ LLUIImagePtr LLInventoryIcon::getIcon(LLInventoryType::EIconName idx)
const std::string& LLInventoryIcon::getIconName(LLAssetType::EType asset_type,
LLInventoryType::EType inventory_type,
U32 misc_flag,
- BOOL item_is_multi)
+ bool item_is_multi)
{
LLInventoryType::EIconName idx = LLInventoryType::ICONNAME_OBJECT;
if (item_is_multi)
diff --git a/indra/newview/llinventoryicon.h b/indra/newview/llinventoryicon.h
index b8637c4e33..6ead98d7de 100644
--- a/indra/newview/llinventoryicon.h
+++ b/indra/newview/llinventoryicon.h
@@ -37,13 +37,13 @@ public:
static const std::string& getIconName(LLAssetType::EType asset_type,
LLInventoryType::EType inventory_type = LLInventoryType::IT_NONE,
U32 misc_flag = 0, // different meanings depending on item type
- BOOL item_is_multi = FALSE);
+ bool item_is_multi = false);
static const std::string& getIconName(LLInventoryType::EIconName idx);
static LLPointer<class LLUIImage> getIcon(LLAssetType::EType asset_type,
LLInventoryType::EType inventory_type = LLInventoryType::IT_NONE,
U32 misc_flag = 0, // different meanings depending on item type
- BOOL item_is_multi = FALSE);
+ bool item_is_multi = false);
static LLPointer<class LLUIImage> getIcon(LLInventoryType::EIconName idx);
protected:
diff --git a/indra/newview/llinventorylistitem.cpp b/indra/newview/llinventorylistitem.cpp
index de6a850b57..be34f96e65 100644
--- a/indra/newview/llinventorylistitem.cpp
+++ b/indra/newview/llinventorylistitem.cpp
@@ -158,12 +158,12 @@ void LLPanelInventoryListItemBase::setShowWidget(LLUICtrl* ctrl, bool show)
ctrl->setEnabled(show);
}
-BOOL LLPanelInventoryListItemBase::postBuild()
+bool LLPanelInventoryListItemBase::postBuild()
{
LLViewerInventoryItem* inv_item = getItem();
if (inv_item)
{
- mIconImage = LLInventoryIcon::getIcon(inv_item->getType(), inv_item->getInventoryType(), inv_item->getFlags(), FALSE);
+ mIconImage = LLInventoryIcon::getIcon(inv_item->getType(), inv_item->getInventoryType(), inv_item->getFlags(), false);
updateItem(inv_item->getName());
}
@@ -172,7 +172,7 @@ BOOL LLPanelInventoryListItemBase::postBuild()
setWidgetsVisible(false);
reshapeWidgets();
- return TRUE;
+ return true;
}
void LLPanelInventoryListItemBase::setValue(const LLSD& value)
@@ -182,7 +182,7 @@ void LLPanelInventoryListItemBase::setValue(const LLSD& value)
mSelected = value["selected"];
}
-BOOL LLPanelInventoryListItemBase::handleHover(S32 x, S32 y, MASK mask)
+bool LLPanelInventoryListItemBase::handleHover(S32 x, S32 y, MASK mask)
{
mHovered = true;
return LLPanel::handleHover(x, y, mask);
@@ -399,13 +399,13 @@ void LLPanelInventoryListItemBase::setTitle(const std::string& title,
highlit_text);
}
-BOOL LLPanelInventoryListItemBase::handleToolTip( S32 x, S32 y, MASK mask)
+bool LLPanelInventoryListItemBase::handleToolTip( S32 x, S32 y, MASK mask)
{
LLRect text_box_rect = mTitleCtrl->getRect();
if (text_box_rect.pointInRect(x, y) &&
mTitleCtrl->getTextPixelWidth() <= text_box_rect.getWidth())
{
- return FALSE;
+ return false;
}
return LLPanel::handleToolTip(x, y, mask);
}
diff --git a/indra/newview/llinventorylistitem.h b/indra/newview/llinventorylistitem.h
index cf713a6930..5dd8496d40 100644
--- a/indra/newview/llinventorylistitem.h
+++ b/indra/newview/llinventorylistitem.h
@@ -117,7 +117,7 @@ public:
/**
* Inheritors need to call base implementation of postBuild()
*/
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/**
* Handles item selection
@@ -130,7 +130,7 @@ public:
/*virtual*/ S32 notify(const LLSD& info);
/* Highlights item */
- /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask);
/* Removes item highlight */
/*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask);
@@ -153,7 +153,7 @@ public:
LLViewerInventoryItem* getItem() const;
void setSeparatorVisible(bool visible) { mSeparatorVisible = visible; }
- void resetHighlight() { mHovered = FALSE; }
+ void resetHighlight() { mHovered = false; }
virtual ~LLPanelInventoryListItemBase(){}
@@ -194,7 +194,7 @@ protected:
/**
* Show tool tip if item name text size > panel size
*/
- virtual BOOL handleToolTip( S32 x, S32 y, MASK mask);
+ virtual bool handleToolTip( S32 x, S32 y, MASK mask);
const LLUUID mInventoryItemUUID;
bool mHovered;
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 205e5f3489..591e8c8dc4 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -79,7 +79,7 @@
// Increment this if the inventory contents change in a non-backwards-compatible way.
// For viewer 2, the addition of link items makes a pre-viewer-2 cache incorrect.
const S32 LLInventoryModel::sCurrentInvCacheVersion = 3;
-BOOL LLInventoryModel::sFirstTimeInViewer2 = TRUE;
+bool LLInventoryModel::sFirstTimeInViewer2 = true;
S32 LLInventoryModel::sPendingSystemFolders = 0;
@@ -87,7 +87,7 @@ S32 LLInventoryModel::sPendingSystemFolders = 0;
/// Local function declarations, constants, enums, and typedefs
///----------------------------------------------------------------------------
-//BOOL decompress_file(const char* src_filename, const char* dst_filename);
+//bool decompress_file(const char* src_filename, const char* dst_filename);
static const char PRODUCTION_CACHE_FORMAT_STRING[] = "%s.inv.llsd";
static const char GRID_CACHE_FORMAT_STRING[] = "%s.%s.inv.llsd";
static const char * const LOG_INV("Inventory");
@@ -316,7 +316,7 @@ public:
if (LLInventoryState::sWearNewClothing)
{
LLInventoryState::sWearNewClothingTransactionID = tid;
- LLInventoryState::sWearNewClothing = FALSE;
+ LLInventoryState::sWearNewClothing = false;
}
if (tid.notNull() && tid == LLInventoryState::sWearNewClothingTransactionID)
@@ -333,7 +333,7 @@ public:
if (LLInventoryState::sWearNewClothing && wearable_ids.size() > 0)
{
- LLInventoryState::sWearNewClothing = FALSE;
+ LLInventoryState::sWearNewClothing = false;
size_t count = wearable_ids.size();
for (S32 i = 0; i < count; ++i)
@@ -441,7 +441,7 @@ LLInventoryModel::LLInventoryModel()
mParentChildCategoryTree(),
mParentChildItemTree(),
mLastItem(NULL),
- mIsNotifyObservers(FALSE),
+ mIsNotifyObservers(false),
mModifyMask(LLInventoryObserver::ALL),
mChangedItemIDs(),
mBulkFecthCallbackSlot(),
@@ -493,10 +493,10 @@ void LLInventoryModel::cleanupInventory()
// This is a convenience function to check if one object has a parent
// chain up to the category specified by UUID.
-BOOL LLInventoryModel::isObjectDescendentOf(const LLUUID& obj_id,
+bool LLInventoryModel::isObjectDescendentOf(const LLUUID& obj_id,
const LLUUID& cat_id) const
{
- if (obj_id == cat_id) return TRUE;
+ if (obj_id == cat_id) return true;
const LLInventoryObject* obj = getObject(obj_id);
while(obj)
@@ -504,17 +504,17 @@ BOOL LLInventoryModel::isObjectDescendentOf(const LLUUID& obj_id,
const LLUUID& parent_id = obj->getParentUUID();
if( parent_id.isNull() )
{
- return FALSE;
+ return false;
}
if(parent_id == cat_id)
{
- return TRUE;
+ return true;
}
// Since we're scanning up the parents, we only need to check
// in the category list.
obj = getCategory(parent_id);
}
- return FALSE;
+ return false;
}
const LLViewerInventoryCategory *LLInventoryModel::getFirstNondefaultParent(const LLUUID& obj_id) const
@@ -782,7 +782,7 @@ void LLInventoryModel::consolidateForType(const LLUUID& main_id, LLFolderType::E
for (std::vector<LLUUID>::const_iterator it = list_uuids.begin(); it != list_uuids.end(); ++it)
{
LLViewerInventoryItem* item = getItem(*it);
- changeItemParent(item, main_id, TRUE);
+ changeItemParent(item, main_id, true);
}
// Move all folders to the main folder
@@ -794,7 +794,7 @@ void LLInventoryModel::consolidateForType(const LLUUID& main_id, LLFolderType::E
for (std::vector<LLUUID>::const_iterator it = list_uuids.begin(); it != list_uuids.end(); ++it)
{
LLViewerInventoryCategory* cat = getCategory(*it);
- changeCategoryParent(cat, main_id, TRUE);
+ changeCategoryParent(cat, main_id, true);
}
// Purge the emptied folder
@@ -805,7 +805,7 @@ void LLInventoryModel::consolidateForType(const LLUUID& main_id, LLFolderType::E
const LLUUID trash_id = findCategoryUUIDForType(LLFolderType::FT_TRASH);
if (trash_id.notNull())
{
- changeCategoryParent(cat, trash_id, TRUE);
+ changeCategoryParent(cat, trash_id, true);
}
}
remove_inventory_category(folder_id, NULL);
@@ -1257,14 +1257,14 @@ public:
virtual bool operator()(LLInventoryCategory* cat,
LLInventoryItem* item)
{
- return TRUE;
+ return true;
}
};
void LLInventoryModel::collectDescendents(const LLUUID& id,
cat_array_t& cats,
item_array_t& items,
- BOOL include_trash)
+ bool include_trash)
{
LLAlwaysCollect always;
collectDescendentsIf(id, cats, items, include_trash, always);
@@ -1273,7 +1273,7 @@ void LLInventoryModel::collectDescendents(const LLUUID& id,
void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
cat_array_t& cats,
item_array_t& items,
- BOOL include_trash,
+ bool include_trash,
LLInventoryCollectFunctor& add)
{
// Start with categories
@@ -1474,7 +1474,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item, U32 mask)
{
// Parent id at server is null, so update server even if item already is in the same folder
old_item->setParent(new_parent_id);
- new_item->updateParentOnServer(FALSE);
+ new_item->updateParentOnServer(false);
}
mask |= LLInventoryObserver::INTERNAL;
}
@@ -1495,7 +1495,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item, U32 mask)
gInventory.accountForUpdate(update);
// *FIX: bit of a hack to call update server from here...
- new_item->updateParentOnServer(FALSE);
+ new_item->updateParentOnServer(false);
item_array->push_back(new_item);
}
else
@@ -1540,7 +1540,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item, U32 mask)
gInventory.accountForUpdate(update);
// *FIX: bit of a hack to call update server from
// here...
- new_item->updateParentOnServer(FALSE);
+ new_item->updateParentOnServer(false);
item_array->push_back(new_item);
}
else
@@ -1558,7 +1558,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item, U32 mask)
// Target ID is stored in the description field of the card.
LLUUID id;
std::string desc = new_item->getDescription();
- BOOL isId = desc.empty() ? FALSE : id.set(desc, FALSE);
+ bool isId = desc.empty() ? false : id.set(desc, false);
if (isId)
{
// Valid UUID; set the item UUID and rename it
@@ -1732,7 +1732,7 @@ void LLInventoryModel::moveObject(const LLUUID& object_id, const LLUUID& cat_id)
// Migrated from llinventoryfunctions
void LLInventoryModel::changeItemParent(LLViewerInventoryItem* item,
const LLUUID& new_parent_id,
- BOOL restamp)
+ bool restamp)
{
if (item->getParentUUID() == new_parent_id)
{
@@ -1762,7 +1762,7 @@ void LLInventoryModel::changeItemParent(LLViewerInventoryItem* item,
// Migrated from llinventoryfunctions
void LLInventoryModel::changeCategoryParent(LLViewerInventoryCategory* cat,
const LLUUID& new_parent_id,
- BOOL restamp)
+ bool restamp)
{
if (!cat)
{
@@ -1989,7 +1989,7 @@ void LLInventoryModel::onObjectDeletedFromServer(const LLUUID& object_id, bool f
LLViewerInventoryItem *item = getItem(object_id);
if (item && (item->getType() != LLAssetType::AT_LSL_TEXT))
{
- LLPreview::hide(object_id, TRUE);
+ LLPreview::hide(object_id, true);
}
deleteObject(object_id, fix_broken_links, do_notify_observers);
}
@@ -2108,7 +2108,7 @@ void LLInventoryModel::removeObserver(LLInventoryObserver* observer)
mObservers.erase(observer);
}
-BOOL LLInventoryModel::containsObserver(LLInventoryObserver* observer) const
+bool LLInventoryModel::containsObserver(LLInventoryObserver* observer) const
{
return mObservers.find(observer) != mObservers.end();
}
@@ -2151,7 +2151,7 @@ void LLInventoryModel::notifyObservers()
return;
}
- mIsNotifyObservers = TRUE;
+ mIsNotifyObservers = true;
for (observer_list_t::iterator iter = mObservers.begin();
iter != mObservers.end(); )
{
@@ -2174,7 +2174,7 @@ void LLInventoryModel::notifyObservers()
mChangedItemIDsBacklog.clear();
mAddedItemIDsBacklog.clear();
- mIsNotifyObservers = FALSE;
+ mIsNotifyObservers = false;
}
// store flag for change
@@ -3040,10 +3040,10 @@ void LLInventoryModel::buildParentChildMap()
// FIXME note that updateServer() fails with protected
// types, so this will not work as intended in that case.
// UpdateServer uses AIS, AIS cat move is not implemented yet
- // cat->updateServer(TRUE);
+ // cat->updateServer(true);
// MoveInventoryFolder message, intentionally per item
- cat->updateParentOnServer(FALSE);
+ cat->updateParentOnServer(false);
catsp = getUnlockedCatArray(cat->getParentUUID());
if(catsp)
{
@@ -3055,7 +3055,7 @@ void LLInventoryModel::buildParentChildMap()
}
}
- const BOOL COF_exists = (findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT) != LLUUID::null);
+ const bool COF_exists = (findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT) != LLUUID::null);
sFirstTimeInViewer2 = !COF_exists || gAgent.isFirstLogin();
@@ -3111,18 +3111,18 @@ void LLInventoryModel::buildParentChildMap()
{
LL_WARNS(LOG_INV) << "Found " << lost << " lost items." << LL_ENDL;
LLMessageSystem* msg = gMessageSystem;
- BOOL start_new_message = TRUE;
+ bool start_new_message = true;
const LLUUID lnf = findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND);
for(uuid_vec_t::iterator it = lost_item_ids.begin() ; it < lost_item_ids.end(); ++it)
{
if(start_new_message)
{
- start_new_message = FALSE;
+ start_new_message = false;
msg->newMessageFast(_PREHASH_MoveInventoryItem);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- msg->addBOOLFast(_PREHASH_Stamp, FALSE);
+ msg->addBOOLFast(_PREHASH_Stamp, false);
}
msg->nextBlockFast(_PREHASH_InventoryData);
msg->addUUIDFast(_PREHASH_ItemID, (*it));
@@ -3130,7 +3130,7 @@ void LLInventoryModel::buildParentChildMap()
msg->addString("NewName", NULL);
if(msg->isSendFull(NULL))
{
- start_new_message = TRUE;
+ start_new_message = true;
gAgent.sendReliableMessage();
}
}
@@ -3942,7 +3942,7 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
if (LLInventoryState::sWearNewClothing)
{
LLInventoryState::sWearNewClothingTransactionID = tid;
- LLInventoryState::sWearNewClothing = FALSE;
+ LLInventoryState::sWearNewClothing = false;
}
if (tid.notNull() && tid == LLInventoryState::sWearNewClothingTransactionID)
@@ -4074,7 +4074,7 @@ void LLInventoryModel::removeItem(const LLUUID& item_id)
if (new_parent.notNull())
{
LL_INFOS("Inventory") << "Moving to Trash (" << new_parent << "):" << LL_ENDL;
- changeItemParent(item, new_parent, TRUE);
+ changeItemParent(item, new_parent, true);
}
}
}
@@ -4089,7 +4089,7 @@ void LLInventoryModel::removeCategory(const LLUUID& category_id)
// Look for any gestures and deactivate them
LLInventoryModel::cat_array_t descendent_categories;
LLInventoryModel::item_array_t descendent_items;
- collectDescendents(category_id, descendent_categories, descendent_items, FALSE);
+ collectDescendents(category_id, descendent_categories, descendent_items, false);
for (LLInventoryModel::item_array_t::const_iterator iter = descendent_items.begin();
iter != descendent_items.end();
@@ -4110,7 +4110,7 @@ void LLInventoryModel::removeCategory(const LLUUID& category_id)
const LLUUID trash_id = findCategoryUUIDForType(LLFolderType::FT_TRASH);
if (trash_id.notNull())
{
- changeCategoryParent(cat, trash_id, TRUE);
+ changeCategoryParent(cat, trash_id, true);
}
}
@@ -4216,13 +4216,13 @@ void LLInventoryModel::setLibraryOwnerID(const LLUUID& val)
}
// static
-BOOL LLInventoryModel::getIsFirstTimeInViewer2()
+bool LLInventoryModel::getIsFirstTimeInViewer2()
{
// Do not call this before parentchild map is built.
if (!gInventory.mIsAgentInvUsable)
{
LL_WARNS() << "Parent Child Map not yet built; guessing as first time in viewer2." << LL_ENDL;
- return TRUE;
+ return true;
}
return sFirstTimeInViewer2;
@@ -4841,9 +4841,9 @@ std::string LLInventoryModel::getFullPath(const LLInventoryObject *obj) const
#if 0
-BOOL decompress_file(const char* src_filename, const char* dst_filename)
+bool decompress_file(const char* src_filename, const char* dst_filename)
{
- BOOL rv = FALSE;
+ bool rv = false;
gzFile src = NULL;
U8* buffer = NULL;
LLFILE* dst = NULL;
@@ -4871,7 +4871,7 @@ BOOL decompress_file(const char* src_filename, const char* dst_filename)
} while(gzeof(src) == 0);
// success
- rv = TRUE;
+ rv = true;
err_decompress:
if(src != NULL) gzclose(src);
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index 69d987cabd..47fd5ce783 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -225,11 +225,11 @@ private:
// Login
//--------------------------------------------------------------------
public:
- static BOOL getIsFirstTimeInViewer2();
+ static bool getIsFirstTimeInViewer2();
static bool isSysFoldersReady() { return (sPendingSystemFolders == 0); }
private:
- static BOOL sFirstTimeInViewer2;
+ static bool sFirstTimeInViewer2;
const static S32 sCurrentInvCacheVersion; // expected inventory cache version
static S32 sPendingSystemFolders;
@@ -272,8 +272,8 @@ public:
// Do not store a copy of the pointers collected - use them, and
// collect them again later if you need to reference the same objects.
enum {
- EXCLUDE_TRASH = FALSE,
- INCLUDE_TRASH = TRUE
+ EXCLUDE_TRASH = false,
+ INCLUDE_TRASH = true
};
// Simpler existence test if matches don't actually need to be collected.
bool hasMatchingDirectDescendent(const LLUUID& cat_id,
@@ -281,11 +281,11 @@ public:
void collectDescendents(const LLUUID& id,
cat_array_t& categories,
item_array_t& items,
- BOOL include_trash);
+ bool include_trash);
void collectDescendentsIf(const LLUUID& id,
cat_array_t& categories,
item_array_t& items,
- BOOL include_trash,
+ bool include_trash,
LLInventoryCollectFunctor& add);
// Collect all items in inventory that are linked to item_id.
@@ -293,7 +293,7 @@ public:
item_array_t collectLinksTo(const LLUUID& item_id);
// Check if one object has a parent chain up to the category specified by UUID.
- BOOL isObjectDescendentOf(const LLUUID& obj_id, const LLUUID& cat_id) const;
+ bool isObjectDescendentOf(const LLUUID& obj_id, const LLUUID& cat_id) const;
enum EAncestorResult{
ANCESTOR_OK = 0,
@@ -404,12 +404,12 @@ public:
// Migrated from llinventoryfunctions
void changeItemParent(LLViewerInventoryItem* item,
const LLUUID& new_parent_id,
- BOOL restamp);
+ bool restamp);
// Migrated from llinventoryfunctions
void changeCategoryParent(LLViewerInventoryCategory* cat,
const LLUUID& new_parent_id,
- BOOL restamp);
+ bool restamp);
// Marks links from a "possibly" broken list for a rebuild
// clears the list
@@ -575,7 +575,7 @@ protected:
private:
// Flag set when notifyObservers is being called, to look for bugs
// where it's called recursively.
- BOOL mIsNotifyObservers;
+ bool mIsNotifyObservers;
// Variables used to track what has changed since the last notify.
U32 mModifyMask;
changed_items_t mChangedItemIDs;
@@ -597,7 +597,7 @@ public:
// If the observer is destroyed, be sure to remove it.
void addObserver(LLInventoryObserver* observer);
void removeObserver(LLInventoryObserver* observer);
- BOOL containsObserver(LLInventoryObserver* observer) const;
+ bool containsObserver(LLInventoryObserver* observer) const;
private:
typedef std::set<LLInventoryObserver*> observer_list_t;
observer_list_t mObservers;
diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp
index 722447b5d7..486b71120c 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.cpp
+++ b/indra/newview/llinventorymodelbackgroundfetch.cpp
@@ -249,7 +249,7 @@ bool LLInventoryModelBackgroundFetch::isEverythingFetched() const
return mAllRecursiveFoldersFetched;
}
-BOOL LLInventoryModelBackgroundFetch::folderFetchActive() const
+bool LLInventoryModelBackgroundFetch::folderFetchActive() const
{
return mFolderFetchActive;
}
@@ -1109,8 +1109,8 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
folder_sd["folder_id"] = cat->getUUID();
folder_sd["owner_id"] = cat->getOwnerID();
folder_sd["sort_order"] = LLSD::Integer(sort_order);
- folder_sd["fetch_folders"] = LLSD::Boolean(TRUE); //(LLSD::Boolean)sFullFetchStarted;
- folder_sd["fetch_items"] = LLSD::Boolean(TRUE);
+ folder_sd["fetch_folders"] = LLSD::Boolean(true); //(LLSD::Boolean)sFullFetchStarted;
+ folder_sd["fetch_items"] = LLSD::Boolean(true);
if (ALEXANDRIA_LINDEN_ID == cat->getOwnerID())
{
@@ -1392,7 +1392,7 @@ void BGFolderHttpHandler::processData(LLSD & content, LLCore::HttpResponse * res
gInventory.accountForUpdate(update);
titem->setParent(lost_uuid);
- titem->updateParentOnServer(FALSE);
+ titem->updateParentOnServer(false);
gInventory.updateItem(titem);
}
}
@@ -1554,7 +1554,7 @@ void BGFolderHttpHandler::processFailure(LLCore::HttpStatus status, LLCore::Http
{
LLSD folder_sd(*folder_it);
LLUUID folder_id(folder_sd["folder_id"].asUUID());
- const BOOL recursive = getIsRecursive(folder_id);
+ const bool recursive = getIsRecursive(folder_id);
fetcher->addRequestAtFront(folder_id, recursive, true);
}
}
@@ -1591,7 +1591,7 @@ void BGFolderHttpHandler::processFailure(const char * const reason, LLCore::Http
{
LLSD folder_sd(*folder_it);
LLUUID folder_id(folder_sd["folder_id"].asUUID());
- const BOOL recursive = getIsRecursive(folder_id);
+ const bool recursive = getIsRecursive(folder_id);
fetcher->addRequestAtFront(folder_id, recursive, true);
}
}
diff --git a/indra/newview/llinventorymodelbackgroundfetch.h b/indra/newview/llinventorymodelbackgroundfetch.h
index 989968be53..831ab80dba 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.h
+++ b/indra/newview/llinventorymodelbackgroundfetch.h
@@ -60,7 +60,7 @@ public:
// AIS3 only
void fetchCOF(nullary_func_t callback);
- BOOL folderFetchActive() const;
+ bool folderFetchActive() const;
bool isEverythingFetched() const; // completing the fetch once per session should be sufficient
bool libraryFetchStarted() const;
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 15cd7957a2..d80574d14c 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -85,7 +85,7 @@ LLInventoryFetchObserver::LLInventoryFetchObserver(const uuid_vec_t& ids)
setFetchIDs(ids);
}
-BOOL LLInventoryFetchObserver::isFinished() const
+bool LLInventoryFetchObserver::isFinished() const
{
return mIncomplete.empty();
}
@@ -454,14 +454,14 @@ void LLInventoryFetchDescendentsObserver::startFetch()
}
}
-BOOL LLInventoryFetchDescendentsObserver::isCategoryComplete(const LLViewerInventoryCategory* cat) const
+bool LLInventoryFetchDescendentsObserver::isCategoryComplete(const LLViewerInventoryCategory* cat) const
{
const S32 version = cat->getVersion();
const S32 expected_num_descendents = cat->getDescendentCount();
if ((version == LLViewerInventoryCategory::VERSION_UNKNOWN) ||
(expected_num_descendents == LLViewerInventoryCategory::DESCENDENT_COUNT_UNKNOWN))
{
- return FALSE;
+ return false;
}
// it might be complete - check known descendents against
// currently available.
@@ -475,14 +475,14 @@ BOOL LLInventoryFetchDescendentsObserver::isCategoryComplete(const LLViewerInven
// that the cat just doesn't have any items or subfolders).
// Unrecoverable, so just return done so that this observer can be cleared
// from memory.
- return TRUE;
+ return true;
}
const S32 current_num_known_descendents = cats->size() + items->size();
// Got the number of descendents that we were expecting, so we're done.
if (current_num_known_descendents == expected_num_descendents)
{
- return TRUE;
+ return true;
}
// Error condition, but recoverable. This happens if something was added to the
@@ -492,9 +492,9 @@ BOOL LLInventoryFetchDescendentsObserver::isCategoryComplete(const LLViewerInven
{
LL_WARNS() << "Category '" << cat->getName() << "' expected descendentcount:" << expected_num_descendents << " descendents but got descendentcount:" << current_num_known_descendents << LL_ENDL;
const_cast<LLViewerInventoryCategory *>(cat)->setDescendentCount(current_num_known_descendents);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
LLInventoryFetchComboObserver::LLInventoryFetchComboObserver(const uuid_vec_t& folder_ids,
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h
index bec08d2cdf..8088ff0bb3 100644
--- a/indra/newview/llinventoryobserver.h
+++ b/indra/newview/llinventoryobserver.h
@@ -80,7 +80,7 @@ public:
void setFetchID(const LLUUID& id);
void setFetchIDs(const uuid_vec_t& ids);
- BOOL isFinished() const;
+ bool isFinished() const;
virtual void startFetch() = 0;
virtual void changed(U32 mask) = 0;
@@ -131,7 +131,7 @@ public:
virtual void startFetch();
/*virtual*/ void changed(U32 mask);
protected:
- BOOL isCategoryComplete(const LLViewerInventoryCategory* cat) const;
+ bool isCategoryComplete(const LLViewerInventoryCategory* cat) const;
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index ab04a8589a..462b4929a2 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -377,7 +377,7 @@ void LLInventoryPanel::initializeViewBuilding()
}
/*virtual*/
-void LLInventoryPanel::onVisibilityChange(BOOL new_visibility)
+void LLInventoryPanel::onVisibilityChange(bool new_visibility)
{
if (new_visibility && mViewsInitialized == VIEWS_UNINITIALIZED)
{
@@ -476,7 +476,7 @@ U32 LLInventoryPanel::getSortOrder() const
return getFolderViewModel()->getSorter().getSortOrder();
}
-void LLInventoryPanel::setSinceLogoff(BOOL sl)
+void LLInventoryPanel::setSinceLogoff(bool sl)
{
getFilter().setDateRangeLastLogoff(sl);
}
@@ -645,7 +645,7 @@ void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInve
// Select any newly created object that has the auto rename at top of folder root set.
if(mFolderRoot.get()->getRoot()->needsAutoRename())
{
- setSelection(item_id, FALSE);
+ setSelection(item_id, false);
}
updateFolderLabel(model_item->getParentUUID());
}
@@ -674,7 +674,7 @@ void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInve
const LLUUID trash_id = mInventory->findCategoryUUIDForType(LLFolderType::FT_TRASH);
if (trash_id != model_item->getParentUUID() && (mask & LLInventoryObserver::INTERNAL) && new_parent->isOpen())
{
- setSelection(item_id, FALSE);
+ setSelection(item_id, false);
}
}
updateFolderLabel(model_item->getParentUUID());
@@ -883,16 +883,16 @@ void LLInventoryPanel::idle(void* user_data)
EAcceptance last_accept = LLToolDragAndDrop::getInstance()->getLastAccept();
if (last_accept == ACCEPT_YES_SINGLE || last_accept == ACCEPT_YES_COPY_SINGLE)
{
- panel->mFolderRoot.get()->setShowSingleSelection(TRUE);
+ panel->mFolderRoot.get()->setShowSingleSelection(true);
}
else
{
- panel->mFolderRoot.get()->setShowSingleSelection(FALSE);
+ panel->mFolderRoot.get()->setShowSingleSelection(false);
}
}
else
{
- panel->mFolderRoot.get()->setShowSingleSelection(FALSE);
+ panel->mFolderRoot.get()->setShowSingleSelection(false);
}
}
else
@@ -946,14 +946,14 @@ void LLInventoryPanel::initializeViews(F64 max_time)
LLFolderViewFolder* lib_folder = getFolderByID(gInventory.getLibraryRootFolderID());
if (lib_folder)
{
- lib_folder->setOpen(TRUE);
+ lib_folder->setOpen(true);
}
// Auto close the user's my inventory folder
LLFolderViewFolder* my_inv_folder = getFolderByID(gInventory.getRootFolderID());
if (my_inv_folder)
{
- my_inv_folder->setOpenArrangeRecursively(FALSE, LLFolderViewFolder::RECURSE_DOWN);
+ my_inv_folder->setOpenArrangeRecursively(false, LLFolderViewFolder::RECURSE_DOWN);
}
}
}
@@ -1142,7 +1142,7 @@ LLFolderViewItem* LLInventoryPanel::buildViewsTree(const LLUUID& id,
// In the case of the root folder been shown, open that folder by default once the widget is created
if (create_root)
{
- folder_view_item->setOpen(TRUE);
+ folder_view_item->setOpen(true);
}
}
}
@@ -1326,7 +1326,7 @@ void LLInventoryPanel::openStartFolderOrMyInventory()
&& fchild->getViewModelItem()
&& fchild->getViewModelItem()->getName() == "My Inventory")
{
- fchild->setOpen(TRUE);
+ fchild->setOpen(true);
break;
}
}
@@ -1348,13 +1348,13 @@ void LLInventoryPanel::openSelected()
void LLInventoryPanel::unSelectAll()
{
- mFolderRoot.get()->setSelection(NULL, FALSE, FALSE);
+ mFolderRoot.get()->setSelection(NULL, false, false);
}
-BOOL LLInventoryPanel::handleHover(S32 x, S32 y, MASK mask)
+bool LLInventoryPanel::handleHover(S32 x, S32 y, MASK mask)
{
- BOOL handled = LLView::handleHover(x, y, mask);
+ bool handled = LLView::handleHover(x, y, mask);
if(handled)
{
// getCursor gets current cursor, setCursor sets next cursor
@@ -1370,10 +1370,10 @@ BOOL LLInventoryPanel::handleHover(S32 x, S32 y, MASK mask)
{
getWindow()->setCursor(UI_CURSOR_ARROW);
}
- return TRUE;
+ return true;
}
-BOOL LLInventoryPanel::handleToolTip(S32 x, S32 y, MASK mask)
+bool LLInventoryPanel::handleToolTip(S32 x, S32 y, MASK mask)
{
if (const LLFolderViewItem* hover_item_p = (!mFolderRoot.isDead()) ? mFolderRoot.get()->getHoveredItem() : nullptr)
{
@@ -1398,19 +1398,19 @@ BOOL LLInventoryPanel::handleToolTip(S32 x, S32 y, MASK mask)
.delay_time(LLView::getTooltipTimeout())
.create_callback(boost::bind(&LLInspectTextureUtil::createInventoryToolTip, _1))
.create_params(params));
- return TRUE;
+ return true;
}
}
return LLPanel::handleToolTip(x, y, mask);
}
-BOOL LLInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+bool LLInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
std::string& tooltip_msg)
{
- BOOL handled = FALSE;
+ bool handled = false;
if (mAcceptsDragAndDrop)
{
@@ -1478,11 +1478,11 @@ bool LLInventoryPanel::addBadge(LLBadge * badge)
void LLInventoryPanel::openAllFolders()
{
- mFolderRoot.get()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_DOWN);
+ mFolderRoot.get()->setOpenArrangeRecursively(true, LLFolderViewFolder::RECURSE_DOWN);
mFolderRoot.get()->arrangeAll();
}
-void LLInventoryPanel::setSelection(const LLUUID& obj_id, BOOL take_keyboard_focus)
+void LLInventoryPanel::setSelection(const LLUUID& obj_id, bool take_keyboard_focus)
{
// Don't select objects in COF (e.g. to prevent refocus when items are worn).
const LLInventoryObject *obj = mInventory->getObject(obj_id);
@@ -1493,7 +1493,7 @@ void LLInventoryPanel::setSelection(const LLUUID& obj_id, BOOL take_keyboard_foc
setSelectionByID(obj_id, take_keyboard_focus);
}
-void LLInventoryPanel::setSelectCallback(const boost::function<void (const std::deque<LLFolderViewItem*>& items, BOOL user_action)>& cb)
+void LLInventoryPanel::setSelectCallback(const boost::function<void (const std::deque<LLFolderViewItem*>& items, bool user_action)>& cb)
{
if (mFolderRoot.get())
{
@@ -1513,7 +1513,7 @@ LLInventoryPanel::selected_items_t LLInventoryPanel::getSelectedItems() const
return mFolderRoot.get()->getSelectionList();
}
-void LLInventoryPanel::onSelectionChange(const std::deque<LLFolderViewItem*>& items, BOOL user_action)
+void LLInventoryPanel::onSelectionChange(const std::deque<LLFolderViewItem*>& items, bool user_action)
{
// Schedule updating the folder view context menu when all selected items become complete (STORM-373).
mCompletionObserver->reset();
@@ -1541,7 +1541,7 @@ void LLInventoryPanel::onSelectionChange(const std::deque<LLFolderViewItem*>& it
LLFolderView* fv = mFolderRoot.get();
if (fv->needsAutoRename()) // auto-selecting a new user-created asset and preparing to rename
{
- fv->setNeedsAutoRename(FALSE);
+ fv->setNeedsAutoRename(false);
if (items.size()) // new asset is visible and selected
{
fv->startRenamingSelectedItem();
@@ -1813,7 +1813,7 @@ bool LLInventoryPanel::attachObject(const LLSD& userdata)
return true;
}
-BOOL LLInventoryPanel::getSinceLogoff()
+bool LLInventoryPanel::getSinceLogoff()
{
return getFilter().isSinceLogoff();
}
@@ -1826,15 +1826,15 @@ void LLInventoryPanel::dumpSelectionInformation(void* user_data)
iv->mFolderRoot.get()->dumpSelectionInformation();
}
-BOOL is_inventorysp_active()
+bool is_inventorysp_active()
{
LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
- if (!sidepanel_inventory || !sidepanel_inventory->isInVisibleChain()) return FALSE;
+ if (!sidepanel_inventory || !sidepanel_inventory->isInVisibleChain()) return false;
return sidepanel_inventory->isMainInventoryPanelActive();
}
// static
-LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
+LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(bool auto_open)
{
S32 z_min = S32_MAX;
LLInventoryPanel* res = NULL;
@@ -1844,7 +1844,7 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
if (!floater_inventory)
{
LL_WARNS() << "Could not find My Inventory floater" << LL_ENDL;
- return FALSE;
+ return nullptr;
}
LLSidepanelInventory *inventory_panel = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
@@ -1873,7 +1873,7 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
// Make sure the floater is not minimized (STORM-438).
if (active_inv_floaterp && active_inv_floaterp->isMinimized())
{
- active_inv_floaterp->setMinimized(FALSE);
+ active_inv_floaterp->setMinimized(false);
}
}
else if (auto_open)
@@ -1956,7 +1956,7 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(bool auto_open, const L
LLFloater* floater_inventory = LLFloaterReg::getInstance("inventory");
if (floater_inventory)
{
- floater_inventory->setFocus(TRUE);
+ floater_inventory->setFocus(true);
}
active_panel->setSelection(obj_id, take_keyboard_focus);
}
@@ -1991,7 +1991,7 @@ void LLInventoryPanel::addHideFolderType(LLFolderType::EType folder_type)
getFilter().setFilterCategoryTypes(getFilter().getFilterCategoryTypes() & ~(1ULL << folder_type));
}
-BOOL LLInventoryPanel::getIsHiddenFolderType(LLFolderType::EType folder_type) const
+bool LLInventoryPanel::getIsHiddenFolderType(LLFolderType::EType folder_type) const
{
return !(getFilter().getFilterCategoryTypes() & (1ULL << folder_type));
}
@@ -2005,7 +2005,7 @@ void LLInventoryPanel::removeItemID(const LLUUID& id)
{
LLInventoryModel::cat_array_t categories;
LLInventoryModel::item_array_t items;
- gInventory.collectDescendents(id, categories, items, TRUE);
+ gInventory.collectDescendents(id, categories, items, true);
mItemMap.erase(id);
@@ -2045,7 +2045,7 @@ LLFolderViewFolder* LLInventoryPanel::getFolderByID(const LLUUID& id)
}
-void LLInventoryPanel::setSelectionByID( const LLUUID& obj_id, BOOL take_keyboard_focus )
+void LLInventoryPanel::setSelectionByID( const LLUUID& obj_id, bool take_keyboard_focus )
{
LLFolderViewItem* itemp = getItemByID(obj_id);
@@ -2060,7 +2060,7 @@ void LLInventoryPanel::setSelectionByID( const LLUUID& obj_id, BOOL take_keyb
if(itemp && itemp->getViewModelItem())
{
- itemp->arrangeAndSet(TRUE, take_keyboard_focus);
+ itemp->arrangeAndSet(true, take_keyboard_focus);
mSelectThisID.setNull();
mFocusSelection = false;
return;
@@ -2093,9 +2093,9 @@ void LLInventoryPanel::doToSelected(const LLSD& userdata)
return;
}
-BOOL LLInventoryPanel::handleKeyHere( KEY key, MASK mask )
+bool LLInventoryPanel::handleKeyHere( KEY key, MASK mask )
{
- BOOL handled = FALSE;
+ bool handled = false;
switch (key)
{
case KEY_RETURN:
@@ -2115,7 +2115,7 @@ BOOL LLInventoryPanel::handleKeyHere( KEY key, MASK mask )
}
}
LLInventoryAction::doToSelected(mInventory, mFolderRoot.get(), "open");
- handled = TRUE;
+ handled = true;
}
break;
case KEY_DELETE:
@@ -2127,7 +2127,7 @@ BOOL LLInventoryPanel::handleKeyHere( KEY key, MASK mask )
if (isSelectionRemovable() && (mask == MASK_NONE))
{
LLInventoryAction::doToSelected(mInventory, mFolderRoot.get(), "delete");
- handled = TRUE;
+ handled = true;
}
break;
}
@@ -2238,7 +2238,7 @@ void LLInventorySingleFolderPanel::onFocusReceived()
if (folder_view->getVisible())
{
const LLFolderViewModelItemInventory* modelp = static_cast<const LLFolderViewModelItemInventory*>(folder_view->getViewModelItem());
- setSelectionByID(modelp->getUUID(), TRUE);
+ setSelectionByID(modelp->getUUID(), true);
// quick and dirty fix: don't scroll on switching focus
// todo: better 'tab' support, one that would work for LLInventoryPanel
mFolderRoot.get()->stopAutoScollining();
@@ -2259,7 +2259,7 @@ void LLInventorySingleFolderPanel::onFocusReceived()
if (item_view->getVisible())
{
const LLFolderViewModelItemInventory* modelp = static_cast<const LLFolderViewModelItemInventory*>(item_view->getViewModelItem());
- setSelectionByID(modelp->getUUID(), TRUE);
+ setSelectionByID(modelp->getUUID(), true);
mFolderRoot.get()->stopAutoScollining();
break;
}
@@ -2485,13 +2485,13 @@ void LLAssetFilteredInventoryPanel::initFromParams(const Params& p)
getFilter().setFilterNoMarketplaceFolder();
}
-BOOL LLAssetFilteredInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+bool LLAssetFilteredInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
std::string& tooltip_msg)
{
- BOOL result = FALSE;
+ bool result = false;
if (mAcceptsDragAndDrop)
{
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index 97300596f9..882e88760c 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -161,16 +161,16 @@ public:
LLFolderViewModelInventory& getRootViewModel() { return mInventoryViewModel; }
// LLView methods
- /*virtual*/ void onVisibilityChange(BOOL new_visibility) override;
+ /*virtual*/ void onVisibilityChange(bool new_visibility) override;
void draw() override;
- /*virtual*/ BOOL handleKeyHere( KEY key, MASK mask ) override;
- BOOL handleHover(S32 x, S32 y, MASK mask) override;
- /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ /*virtual*/ bool handleKeyHere( KEY key, MASK mask ) override;
+ bool handleHover(S32 x, S32 y, MASK mask) override;
+ /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
std::string& tooltip_msg) override;
- BOOL handleToolTip(S32 x, S32 y, MASK mask) override;
+ bool handleToolTip(S32 x, S32 y, MASK mask) override;
// LLUICtrl methods
/*virtual*/ void onFocusLost() override;
/*virtual*/ void onFocusReceived() override;
@@ -181,8 +181,8 @@ public:
// Call this method to set the selection.
void openAllFolders();
- void setSelection(const LLUUID& obj_id, BOOL take_keyboard_focus);
- void setSelectCallback(const boost::function<void (const std::deque<LLFolderViewItem*>& items, BOOL user_action)>& cb);
+ void setSelection(const LLUUID& obj_id, bool take_keyboard_focus);
+ void setSelectCallback(const boost::function<void (const std::deque<LLFolderViewItem*>& items, bool user_action)>& cb);
void clearSelection();
selected_items_t getSelectedItems() const;
@@ -198,10 +198,10 @@ public:
void setFilterSettingsTypes(U64 filter);
void setFilterSubString(const std::string& string);
const std::string getFilterSubString();
- void setSinceLogoff(BOOL sl);
+ void setSinceLogoff(bool sl);
void setHoursAgo(U32 hours);
void setDateSearchDirection(U32 direction);
- BOOL getSinceLogoff();
+ bool getSinceLogoff();
void setFilterLinks(U64 filter_links);
void setSearchType(LLInventoryFilter::ESearchType type);
LLInventoryFilter::ESearchType getSearchType();
@@ -216,7 +216,7 @@ public:
bool getAllowDropOnRoot() { return mParams.allow_drop_on_root; }
bool areViewsInitialized() { return mViewsInitialized == VIEWS_INITIALIZED && mFolderRoot.get() && !mFolderRoot.get()->needsArrange(); }
- void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action);
+ void onSelectionChange(const std::deque<LLFolderViewItem*> &items, bool user_action);
LLHandle<LLInventoryPanel> getInventoryPanelHandle() const { return getDerivedHandle<LLInventoryPanel>(); }
@@ -242,7 +242,7 @@ public:
// Find whichever inventory panel is active / on top.
// "Auto_open" determines if we open an inventory panel if none are open.
- static LLInventoryPanel *getActiveInventoryPanel(BOOL auto_open = TRUE);
+ static LLInventoryPanel *getActiveInventoryPanel(bool auto_open = true);
static void openInventoryPanelAndSetSelection(bool auto_open,
const LLUUID& obj_id,
@@ -254,7 +254,7 @@ public:
void removeItemID(const LLUUID& id);
LLFolderViewItem* getItemByID(const LLUUID& id);
LLFolderViewFolder* getFolderByID(const LLUUID& id);
- void setSelectionByID(const LLUUID& obj_id, BOOL take_keyboard_focus);
+ void setSelectionByID(const LLUUID& obj_id, bool take_keyboard_focus);
void updateSelection();
void setSuppressOpenItemAction(bool supress_open_item) { mSuppressOpenItemAction = supress_open_item; }
@@ -364,13 +364,13 @@ protected:
virtual bool typedViewsFilter(const LLUUID& id, LLInventoryObject const* objectp) { return true; }
virtual void itemChanged(const LLUUID& item_id, U32 mask, const LLInventoryObject* model_item);
- BOOL getIsHiddenFolderType(LLFolderType::EType folder_type) const;
+ bool getIsHiddenFolderType(LLFolderType::EType folder_type) const;
virtual LLFolderView * createFolderRoot(LLUUID root_id );
virtual LLFolderViewFolder* createFolderViewFolder(LLInvFVBridge * bridge, bool allow_drop);
virtual LLFolderViewItem* createFolderViewItem(LLInvFVBridge * bridge);
- boost::function<void(const std::deque<LLFolderViewItem*>& items, BOOL user_action)> mSelectionCallback;
+ boost::function<void(const std::deque<LLFolderViewItem*>& items, bool user_action)> mSelectionCallback;
private:
// buildViewsTree does not include some checks and is meant
// for recursive use, use buildNewViews() for first call
@@ -471,7 +471,7 @@ protected:
public:
~LLAssetFilteredInventoryPanel() {}
- /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
diff --git a/indra/newview/lljoystickbutton.cpp b/indra/newview/lljoystickbutton.cpp
index 79fafade2d..7aea9c36bc 100644
--- a/indra/newview/lljoystickbutton.cpp
+++ b/indra/newview/lljoystickbutton.cpp
@@ -79,7 +79,7 @@ LLJoystick::LLJoystick(const LLJoystick::Params& p)
mVertSlopFar(0),
mHorizSlopNear(0),
mHorizSlopFar(0),
- mHeldDown(FALSE),
+ mHeldDown(false),
mHeldDownTimer(),
mInitialQuadrant(p.quadrant)
{
@@ -160,7 +160,7 @@ bool LLJoystick::pointInCenterDot(S32 x, S32 y, S32 radius) const
return in_center_circle;
}
-BOOL LLJoystick::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLJoystick::handleMouseDown(S32 x, S32 y, MASK mask)
{
//LL_INFOS() << "joystick mouse down " << x << ", " << y << LL_ENDL;
bool handles = false;
@@ -177,14 +177,14 @@ BOOL LLJoystick::handleMouseDown(S32 x, S32 y, MASK mask)
}
-BOOL LLJoystick::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLJoystick::handleMouseUp(S32 x, S32 y, MASK mask)
{
// LL_INFOS() << "joystick mouse up " << x << ", " << y << LL_ENDL;
if( hasMouseCapture() )
{
mLastMouse.set(x, y);
- mHeldDown = FALSE;
+ mHeldDown = false;
onMouseUp();
}
@@ -192,7 +192,7 @@ BOOL LLJoystick::handleMouseUp(S32 x, S32 y, MASK mask)
}
-BOOL LLJoystick::handleHover(S32 x, S32 y, MASK mask)
+bool LLJoystick::handleHover(S32 x, S32 y, MASK mask)
{
if( hasMouseCapture() )
{
@@ -220,7 +220,7 @@ void LLJoystick::onBtnHeldDown(void *userdata)
LLJoystick *self = (LLJoystick *)userdata;
if (self)
{
- self->mHeldDown = TRUE;
+ self->mHeldDown = true;
self->onHeldDown();
}
}
@@ -419,11 +419,11 @@ void LLJoystickAgentSlide::onHeldDown()
LLJoystickCameraRotate::LLJoystickCameraRotate(const LLJoystickCameraRotate::Params& p)
: LLJoystick(p),
- mInLeft( FALSE ),
- mInTop( FALSE ),
- mInRight( FALSE ),
- mInBottom( FALSE ),
- mInCenter( FALSE )
+ mInLeft( false ),
+ mInTop( false ),
+ mInRight( false ),
+ mInBottom( false ),
+ mInCenter( false )
{
mCenterImageName = "Cam_Rotate_Center";
}
@@ -444,9 +444,9 @@ void LLJoystickCameraRotate::updateSlop()
}
-BOOL LLJoystickCameraRotate::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLJoystickCameraRotate::handleMouseDown(S32 x, S32 y, MASK mask)
{
- gAgent.setMovementLocked(TRUE);
+ gAgent.setMovementLocked(true);
updateSlop();
// Set initial offset based on initial click location
@@ -461,7 +461,7 @@ BOOL LLJoystickCameraRotate::handleMouseDown(S32 x, S32 y, MASK mask)
mInitialOffset.mX = 0;
mInitialOffset.mY = 0;
mInitialQuadrant = JQ_ORIGIN;
- mInCenter = TRUE;
+ mInCenter = true;
resetJoystickCamera();
}
@@ -497,18 +497,18 @@ BOOL LLJoystickCameraRotate::handleMouseDown(S32 x, S32 y, MASK mask)
return LLJoystick::handleMouseDown(x, y, mask);
}
-BOOL LLJoystickCameraRotate::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLJoystickCameraRotate::handleMouseUp(S32 x, S32 y, MASK mask)
{
- gAgent.setMovementLocked(FALSE);
- mInCenter = FALSE;
+ gAgent.setMovementLocked(false);
+ mInCenter = false;
return LLJoystick::handleMouseUp(x, y, mask);
}
-BOOL LLJoystickCameraRotate::handleHover(S32 x, S32 y, MASK mask)
+bool LLJoystickCameraRotate::handleHover(S32 x, S32 y, MASK mask)
{
if (!pointInCenterDot(x, y, CENTER_DOT_RADIUS))
{
- mInCenter = FALSE;
+ mInCenter = false;
}
return LLJoystick::handleHover(x, y, mask);
@@ -568,7 +568,7 @@ F32 LLJoystickCameraRotate::getOrbitRate()
// Only used for drawing
-void LLJoystickCameraRotate::setToggleState( BOOL left, BOOL top, BOOL right, BOOL bottom )
+void LLJoystickCameraRotate::setToggleState( bool left, bool top, bool right, bool bottom )
{
mInLeft = left;
mInTop = top;
@@ -737,7 +737,7 @@ LLJoystickQuaternion::LLJoystickQuaternion(const LLJoystickQuaternion::Params &p
}
}
-void LLJoystickQuaternion::setToggleState(BOOL left, BOOL top, BOOL right, BOOL bottom)
+void LLJoystickQuaternion::setToggleState(bool left, bool top, bool right, bool bottom)
{
mInLeft = left;
mInTop = top;
@@ -745,7 +745,7 @@ void LLJoystickQuaternion::setToggleState(BOOL left, BOOL top, BOOL right, BOOL
mInBottom = bottom;
}
-BOOL LLJoystickQuaternion::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLJoystickQuaternion::handleMouseDown(S32 x, S32 y, MASK mask)
{
updateSlop();
@@ -788,7 +788,7 @@ BOOL LLJoystickQuaternion::handleMouseDown(S32 x, S32 y, MASK mask)
return LLJoystick::handleMouseDown(x, y, mask);
}
-BOOL LLJoystickQuaternion::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLJoystickQuaternion::handleMouseUp(S32 x, S32 y, MASK mask)
{
return LLJoystick::handleMouseUp(x, y, mask);
}
diff --git a/indra/newview/lljoystickbutton.h b/indra/newview/lljoystickbutton.h
index b7fdf63e58..c359985fb7 100644
--- a/indra/newview/lljoystickbutton.h
+++ b/indra/newview/lljoystickbutton.h
@@ -63,9 +63,9 @@ public:
};
LLJoystick(const Params&);
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- virtual BOOL handleHover(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask);
+ virtual bool handleHover(S32 x, S32 y, MASK mask);
virtual void onMouseUp() {}
virtual void onHeldDown() = 0;
@@ -100,7 +100,7 @@ protected:
S32 mVertSlopFar; // where the slop regions end
S32 mHorizSlopNear; // where the slop regions end
S32 mHorizSlopFar; // where the slop regions end
- BOOL mHeldDown;
+ bool mHeldDown;
LLFrameTimer mHeldDownTimer;
};
@@ -145,11 +145,11 @@ public:
LLJoystickCameraRotate(const LLJoystickCameraRotate::Params&);
- virtual void setToggleState( BOOL left, BOOL top, BOOL right, BOOL bottom );
+ virtual void setToggleState( bool left, bool top, bool right, bool bottom );
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- virtual BOOL handleHover(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask);
+ virtual bool handleHover(S32 x, S32 y, MASK mask);
virtual void onHeldDown();
virtual void resetJoystickCamera();
virtual void draw();
@@ -160,11 +160,11 @@ protected:
void drawRotatedImage( LLPointer<LLUIImage> image, S32 rotations );
protected:
- BOOL mInLeft;
- BOOL mInTop;
- BOOL mInRight;
- BOOL mInBottom;
- BOOL mInCenter;
+ bool mInLeft;
+ bool mInTop;
+ bool mInRight;
+ bool mInBottom;
+ bool mInCenter;
std::string mCenterImageName;
};
@@ -199,10 +199,10 @@ public:
LLJoystickQuaternion(const LLJoystickQuaternion::Params &);
- virtual void setToggleState(BOOL left, BOOL top, BOOL right, BOOL bottom);
+ virtual void setToggleState(bool left, bool top, bool right, bool bottom);
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask);
virtual void onHeldDown();
virtual void draw();
@@ -214,10 +214,10 @@ protected:
virtual void updateSlop();
void drawRotatedImage(LLPointer<LLUIImage> image, S32 rotations);
- BOOL mInLeft;
- BOOL mInTop;
- BOOL mInRight;
- BOOL mInBottom;
+ bool mInLeft;
+ bool mInTop;
+ bool mInRight;
+ bool mInBottom;
S32 mXAxisIndex;
S32 mYAxisIndex;
diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp
index a17dc674ac..d1dc84650a 100644
--- a/indra/newview/lllandmarkactions.cpp
+++ b/indra/newview/lllandmarkactions.cpp
@@ -84,12 +84,12 @@ class LLFetchLandmarksByName : public LLInventoryCollectFunctor
{
private:
std::string name;
- BOOL use_substring;
+ bool use_substring;
//this member will be contain copy of founded items to keep the result unique
std::set<std::string> check_duplicate;
public:
-LLFetchLandmarksByName(std::string &landmark_name, BOOL if_use_substring)
+LLFetchLandmarksByName(std::string &landmark_name, bool if_use_substring)
:name(landmark_name),
use_substring(if_use_substring)
{
@@ -178,7 +178,7 @@ static void fetch_landmarks(LLInventoryModel::cat_array_t& cats,
add);
}
-LLInventoryModel::item_array_t LLLandmarkActions::fetchLandmarksByName(std::string& name, BOOL use_substring)
+LLInventoryModel::item_array_t LLLandmarkActions::fetchLandmarksByName(std::string& name, bool use_substring)
{
LLInventoryModel::cat_array_t cats;
LLInventoryModel::item_array_t items;
diff --git a/indra/newview/lllandmarkactions.h b/indra/newview/lllandmarkactions.h
index ae7b072fcb..f8b1f554f7 100644
--- a/indra/newview/lllandmarkactions.h
+++ b/indra/newview/lllandmarkactions.h
@@ -45,7 +45,7 @@ public:
/**
* @brief Fetches landmark LLViewerInventoryItems for the given landmark name.
*/
- static LLInventoryModel::item_array_t fetchLandmarksByName(std::string& name, BOOL if_use_substring);
+ static LLInventoryModel::item_array_t fetchLandmarksByName(std::string& name, bool if_use_substring);
/**
* @brief Checks whether landmark exists for current agent position.
*/
diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp
index d790c6f95e..11a6a755e4 100644
--- a/indra/newview/lllandmarklist.cpp
+++ b/indra/newview/lllandmarklist.cpp
@@ -176,12 +176,12 @@ void LLLandmarkList::processGetAssetReply(
}
}
-BOOL LLLandmarkList::isAssetInLoadedCallbackMap(const LLUUID& asset_uuid)
+bool LLLandmarkList::isAssetInLoadedCallbackMap(const LLUUID& asset_uuid)
{
return mLoadedCallbackMap.find(asset_uuid) != mLoadedCallbackMap.end();
}
-BOOL LLLandmarkList::assetExists(const LLUUID& asset_uuid)
+bool LLLandmarkList::assetExists(const LLUUID& asset_uuid)
{
return mList.count(asset_uuid) != 0 || mBadList.count(asset_uuid) != 0;
}
diff --git a/indra/newview/lllandmarklist.h b/indra/newview/lllandmarklist.h
index b50332b215..6ca5ee19a6 100644
--- a/indra/newview/lllandmarklist.h
+++ b/indra/newview/lllandmarklist.h
@@ -49,7 +49,7 @@ public:
//const LLLandmark* getFirst() { return mList.getFirstData(); }
//const LLLandmark* getNext() { return mList.getNextData(); }
- BOOL assetExists(const LLUUID& asset_uuid);
+ bool assetExists(const LLUUID& asset_uuid);
LLLandmark* getAsset(const LLUUID& asset_uuid, loaded_callback_t cb = NULL);
static void processGetAssetReply(
const LLUUID& uuid,
@@ -58,9 +58,9 @@ public:
S32 status,
LLExtStat ext_status );
- // Returns TRUE if loading the landmark with given asset_uuid has been requested
+ // Returns true if loading the landmark with given asset_uuid has been requested
// but is not complete yet.
- BOOL isAssetInLoadedCallbackMap(const LLUUID& asset_uuid);
+ bool isAssetInLoadedCallbackMap(const LLUUID& asset_uuid);
protected:
void onRegionHandle(const LLUUID& landmark_id);
diff --git a/indra/newview/lllegacyatmospherics.cpp b/indra/newview/lllegacyatmospherics.cpp
index a34dafb19a..32ca19ffd7 100644
--- a/indra/newview/lllegacyatmospherics.cpp
+++ b/indra/newview/lllegacyatmospherics.cpp
@@ -180,7 +180,7 @@ LLAtmospherics::LLAtmospherics()
mWorldScale(1.f)
{
/// WL PARAMS
- mInitialized = FALSE;
+ mInitialized = false;
mAmbientScale = gSavedSettings.getF32("SkyAmbientScale");
mNightColorShift = gSavedSettings.getColor3("SkyNightColorShift");
mFogColor.mV[VRED] = mFogColor.mV[VGREEN] = mFogColor.mV[VBLUE] = 0.5f;
@@ -505,7 +505,7 @@ void LLAtmospherics::updateFog(const F32 distance, const LLVector3& tosun_in)
}
// Functions used a lot.
-F32 color_norm_pow(LLColor3& col, F32 e, BOOL postmultiply)
+F32 color_norm_pow(LLColor3& col, F32 e, bool postmultiply)
{
F32 mv = color_max(col);
if (0 == mv)
diff --git a/indra/newview/lllegacyatmospherics.h b/indra/newview/lllegacyatmospherics.h
index d48f3040c3..9dec90f03d 100644
--- a/indra/newview/lllegacyatmospherics.h
+++ b/indra/newview/lllegacyatmospherics.h
@@ -267,7 +267,7 @@ protected:
F32 mHazeConcentration;
F32 mCloudDensity;
F32 mWind;
- BOOL mInitialized;
+ bool mInitialized;
LLVector3 mLastLightingDirection;
LLColor3 mLastTotalAmbient;
F32 mAmbientScale;
diff --git a/indra/newview/lllistbrowser.cpp b/indra/newview/lllistbrowser.cpp
deleted file mode 100644
index 956f457730..0000000000
--- a/indra/newview/lllistbrowser.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * @file lllistbrowser.cpp
- * @brief UI widget showing a search filter, list view, icon action buttons,
- * and verb action buttons, as usually embedded in the side tray.
- *
- * $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 "lllistbrowser.h"
-
-// TODO
diff --git a/indra/newview/lllistbrowser.h b/indra/newview/lllistbrowser.h
deleted file mode 100644
index 22e8755f08..0000000000
--- a/indra/newview/lllistbrowser.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * @file lllistbrowser.h
- * @brief UI widget showing a search filter, list view, icon action buttons,
- * and verb action buttons, as usually embedded in the side tray.
- *
- * $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 LLLISTBROWSER_H
-#define LLLISTBROWSER_H
-
-#endif // LLLISTBROWSER_H
diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp
index 1e42773777..2a5b118564 100644
--- a/indra/newview/lllocalbitmaps.cpp
+++ b/indra/newview/lllocalbitmaps.cpp
@@ -72,7 +72,7 @@
/*=======================================*/
static const F32 LL_LOCAL_TIMER_HEARTBEAT = 3.0;
-static const BOOL LL_LOCAL_USE_MIPMAPS = true;
+static const bool LL_LOCAL_USE_MIPMAPS = true;
static const S32 LL_LOCAL_DISCARD_LEVEL = 0;
static const bool LL_LOCAL_SLAM_FOR_DEBUG = true;
static const bool LL_LOCAL_REPLACE_ON_DEL = true;
@@ -579,7 +579,7 @@ void LLLocalBitmap::updateUserVolumes(LLUUID old_id, LLUUID new_id, U32 channel)
LLSculptParams* old_params = (LLSculptParams*)object->getParameterEntry(LLNetworkData::PARAMS_SCULPT);
LLSculptParams new_params(*old_params);
new_params.setSculptTexture(new_id, (*old_params).getSculptType());
- object->setParameterEntry(LLNetworkData::PARAMS_SCULPT, new_params, TRUE);
+ object->setParameterEntry(LLNetworkData::PARAMS_SCULPT, new_params, true);
}
}
}
@@ -613,7 +613,7 @@ void LLLocalBitmap::updateUserLayers(LLUUID old_id, LLUUID new_id, LLWearableTyp
U32 index;
if (gAgentWearables.getWearableIndex(wearable,index))
{
- gAgentAvatarp->setLocalTexture(reg_texind, gTextureList.getImage(new_id), FALSE, index);
+ gAgentAvatarp->setLocalTexture(reg_texind, gTextureList.getImage(new_id), false, index);
gAgentAvatarp->wearableUpdated(type);
/* telling the manager to rebake once update cycle is fully done */
LLLocalBitmapMgr::getInstance()->setNeedsRebake();
@@ -1009,10 +1009,10 @@ bool LLLocalBitmapTimer::isRunning()
return mEventTimer.getStarted();
}
-BOOL LLLocalBitmapTimer::tick()
+bool LLLocalBitmapTimer::tick()
{
LLLocalBitmapMgr::getInstance()->doUpdates();
- return FALSE;
+ return false;
}
/*=======================================*/
diff --git a/indra/newview/lllocalbitmaps.h b/indra/newview/lllocalbitmaps.h
index 1fdf9dccbf..da854d672d 100644
--- a/indra/newview/lllocalbitmaps.h
+++ b/indra/newview/lllocalbitmaps.h
@@ -121,7 +121,7 @@ class LLLocalBitmapTimer : public LLEventTimer
void startTimer();
void stopTimer();
bool isRunning();
- BOOL tick();
+ bool tick();
};
diff --git a/indra/newview/lllocalgltfmaterials.cpp b/indra/newview/lllocalgltfmaterials.cpp
index 61e0163798..cf0742299c 100644
--- a/indra/newview/lllocalgltfmaterials.cpp
+++ b/indra/newview/lllocalgltfmaterials.cpp
@@ -301,11 +301,11 @@ bool LLLocalGLTFMaterialTimer::isRunning()
return mEventTimer.getStarted();
}
-BOOL LLLocalGLTFMaterialTimer::tick()
+bool LLLocalGLTFMaterialTimer::tick()
{
// todo: do on idle? No point in timer
LLLocalGLTFMaterialMgr::getInstance()->doUpdates();
- return FALSE;
+ return false;
}
/*=======================================*/
diff --git a/indra/newview/lllocalgltfmaterials.h b/indra/newview/lllocalgltfmaterials.h
index 13b7577e96..46776430ff 100644
--- a/indra/newview/lllocalgltfmaterials.h
+++ b/indra/newview/lllocalgltfmaterials.h
@@ -90,7 +90,7 @@ public:
void startTimer();
void stopTimer();
bool isRunning();
- BOOL tick();
+ bool tick();
};
class LLLocalGLTFMaterialMgr : public LLSingleton<LLLocalGLTFMaterialMgr>
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index 9fa35e3bd9..a64ee6857d 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -455,7 +455,7 @@ LLLocationInputCtrl::~LLLocationInputCtrl()
mLocationHistoryConnection.disconnect();
}
-void LLLocationInputCtrl::setEnabled(BOOL enabled)
+void LLLocationInputCtrl::setEnabled(bool enabled)
{
LLComboBox::setEnabled(enabled);
mAddLandmarkBtn->setEnabled(enabled);
@@ -468,7 +468,7 @@ void LLLocationInputCtrl::hideList()
focusTextEntry();
}
-BOOL LLLocationInputCtrl::handleToolTip(S32 x, S32 y, MASK mask)
+bool LLLocationInputCtrl::handleToolTip(S32 x, S32 y, MASK mask)
{
if(mAddLandmarkBtn->parentPointInView(x,y))
@@ -496,15 +496,15 @@ BOOL LLLocationInputCtrl::handleToolTip(S32 x, S32 y, MASK mask)
}
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-BOOL LLLocationInputCtrl::handleKeyHere(KEY key, MASK mask)
+bool LLLocationInputCtrl::handleKeyHere(KEY key, MASK mask)
{
- BOOL result = LLComboBox::handleKeyHere(key, mask);
+ bool result = LLComboBox::handleKeyHere(key, mask);
if (key == KEY_DOWN && hasFocus() && mList->getItemCount() != 0 && !mList->getVisible())
{
@@ -517,7 +517,7 @@ BOOL LLLocationInputCtrl::handleKeyHere(KEY key, MASK mask)
void LLLocationInputCtrl::onTextEntry(LLLineEditor* line_editor)
{
KEY key = gKeyboard->currentKey();
- MASK mask = gKeyboard->currentMask(TRUE);
+ MASK mask = gKeyboard->currentMask(true);
// Typing? (moving cursor should not affect showing the list)
bool typing = mask != MASK_CONTROL && key != KEY_LEFT && key != KEY_RIGHT && key != KEY_HOME && key != KEY_END;
@@ -557,16 +557,16 @@ void LLLocationInputCtrl::setText(const LLStringExplicit& text)
{
mTextEntry->setText(text);
}
- mHasAutocompletedText = FALSE;
+ mHasAutocompletedText = false;
}
-void LLLocationInputCtrl::setFocus(BOOL b)
+void LLLocationInputCtrl::setFocus(bool b)
{
LLComboBox::setFocus(b);
if (mTextEntry && b && !mList->getVisible())
{
- mTextEntry->setFocus(TRUE);
+ mTextEntry->setFocus(true);
}
}
@@ -613,7 +613,7 @@ void LLLocationInputCtrl::draw()
LLComboBox::draw();
}
-void LLLocationInputCtrl::reshape(S32 width, S32 height, BOOL called_from_parent)
+void LLLocationInputCtrl::reshape(S32 width, S32 height, bool called_from_parent)
{
LLComboBox::reshape(width, height, called_from_parent);
@@ -699,7 +699,7 @@ void LLLocationInputCtrl::onLocationPrearrange(const LLSD& data)
//Let's add landmarks to the top of the list if any
if(!filter.empty() )
{
- LLInventoryModel::item_array_t landmark_items = LLLandmarkActions::fetchLandmarksByName(filter, TRUE);
+ LLInventoryModel::item_array_t landmark_items = LLLandmarkActions::fetchLandmarksByName(filter, true);
for(U32 i=0; i < landmark_items.size(); i++)
{
@@ -1016,7 +1016,7 @@ void LLLocationInputCtrl::rebuildLocationHistory(const std::string& filter)
void LLLocationInputCtrl::focusTextEntry()
{
- // We can't use "mTextEntry->setFocus(TRUE)" instead because
+ // We can't use "mTextEntry->setFocus(true)" instead because
// if the "select_on_focus" parameter is true it places the cursor
// at the beginning (after selecting text), thus screwing up updateSelection().
if (mTextEntry)
@@ -1104,7 +1104,7 @@ void LLLocationInputCtrl::changeLocationPresentation()
mTextEntry->setText(LLURI::unescape(slurl.getSLURLString()));
mTextEntry->selectAll();
- mMaturityButton->setVisible(FALSE);
+ mMaturityButton->setVisible(false);
isHumanReadableLocationVisible = false;
}
diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h
index af2a9f6afd..193b5b8258 100644
--- a/indra/newview/lllocationinputctrl.h
+++ b/indra/newview/lllocationinputctrl.h
@@ -88,17 +88,17 @@ public:
};
// LLView interface
- /*virtual*/ void setEnabled(BOOL enabled);
- /*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
+ /*virtual*/ void setEnabled(bool enabled);
+ /*virtual*/ bool handleToolTip(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleKeyHere(KEY key, MASK mask);
/*virtual*/ void onFocusReceived();
/*virtual*/ void onFocusLost();
/*virtual*/ void draw();
- /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+ /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true);
//========================================================================
// LLUICtrl interface
- /*virtual*/ void setFocus(BOOL b);
+ /*virtual*/ void setFocus(bool b);
//========================================================================
// LLComboBox interface
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index 55a947a09d..8940117f0d 100644
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -457,11 +457,11 @@ void LLLogChat::loadChatHistory(const std::string& file_name, std::list<LLSD>& m
char buffer[LOG_RECALL_SIZE]; /*Flawfinder: ignore*/
char *bptr;
S32 len;
- bool firstline = TRUE;
+ bool firstline = true;
if (load_all_history || fseek(fptr, (LOG_RECALL_SIZE - 1) * -1 , SEEK_END))
{ //We need to load the whole historyFile or it's smaller than recall size, so get it all.
- firstline = FALSE;
+ firstline = false;
if (fseek(fptr, 0, SEEK_SET))
{
fclose(fptr);
@@ -476,7 +476,7 @@ void LLLogChat::loadChatHistory(const std::string& file_name, std::list<LLSD>& m
if (firstline)
{
- firstline = FALSE;
+ firstline = false;
continue;
}
@@ -1169,11 +1169,11 @@ void LLLoadHistoryThread::loadHistory(const std::string& file_name, std::list<LL
char *bptr;
S32 len;
- bool firstline = TRUE;
+ bool firstline = true;
if (load_all_history || fseek(fptr, (LOG_RECALL_SIZE - 1) * -1 , SEEK_END))
{ //We need to load the whole historyFile or it's smaller than recall size, so get it all.
- firstline = FALSE;
+ firstline = false;
if (fseek(fptr, 0, SEEK_SET))
{
fclose(fptr);
@@ -1193,7 +1193,7 @@ void LLLoadHistoryThread::loadHistory(const std::string& file_name, std::list<LL
if (firstline)
{
- firstline = FALSE;
+ firstline = false;
continue;
}
std::string line(remove_utf8_bom(buffer));
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index 01496fa7ce..1c199fa305 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -198,7 +198,7 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
requested_options.append("global-textures");
if(gSavedSettings.getBOOL("ConnectAsGod"))
{
- gSavedSettings.setBOOL("UseDebugMenus", TRUE);
+ gSavedSettings.setBOOL("UseDebugMenus", true);
requested_options.append("god-connect");
}
@@ -345,7 +345,7 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
data["message"] = message_response;
data["reply_pump"] = TOS_REPLY_PUMP;
if (gViewerWindow)
- gViewerWindow->setShowProgress(FALSE);
+ gViewerWindow->setShowProgress(false);
LLFloaterReg::showInstance("message_tos", data);
LLEventPumps::instance().obtain(TOS_REPLY_PUMP)
.listen(TOS_LISTENER_NAME,
@@ -369,7 +369,7 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
}
if (gViewerWindow)
- gViewerWindow->setShowProgress(FALSE);
+ gViewerWindow->setShowProgress(false);
LLFloaterReg::showInstance("message_critical", data);
LLEventPumps::instance().obtain(TOS_REPLY_PUMP)
@@ -408,7 +408,7 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
}
if (gViewerWindow)
- gViewerWindow->setShowProgress(FALSE);
+ gViewerWindow->setShowProgress(false);
LLSD args;
args["VERSION"] = login_version;
@@ -447,7 +447,7 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
if (gViewerWindow)
{
- gViewerWindow->setShowProgress(FALSE);
+ gViewerWindow->setShowProgress(false);
}
showMFAChallange(LLTrans::getString(response["message_id"]));
@@ -467,7 +467,7 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
LL_WARNS("LLLogin") << "Login failed for an unknown reason: " << LLSDOStreamer<LLSDNotationFormatter>(response) << LL_ENDL;
if (gViewerWindow)
- gViewerWindow->setShowProgress(FALSE);
+ gViewerWindow->setShowProgress(false);
LLNotificationsUtil::add("LoginFailedUnknown", LLSD::emptyMap(), LLSD::emptyMap(), boost::bind(&LLLoginInstance::handleLoginDisallowed, this, _1, _2));
}
diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp
index feb691520f..6e389f95b1 100644
--- a/indra/newview/llmanip.cpp
+++ b/indra/newview/llmanip.cpp
@@ -99,7 +99,7 @@ void LLManip::rebuild(LLViewerObject* vobj)
LLManip::LLManip( const std::string& name, LLToolComposite* composite )
:
LLTool( name, composite ),
- mInSnapRegime(FALSE),
+ mInSnapRegime(false),
mHighlightedPart(LL_NO_PART),
mManipPart(LL_NO_PART)
{
@@ -147,7 +147,7 @@ void LLManip::getManipNormal(LLViewerObject* object, EManipPart manip, LLVector3
}
-BOOL LLManip::getManipAxis(LLViewerObject* object, EManipPart manip, LLVector3 &axis)
+bool LLManip::getManipAxis(LLViewerObject* object, EManipPart manip, LLVector3 &axis)
{
LLVector3 grid_origin;
LLVector3 grid_scale;
@@ -169,11 +169,11 @@ BOOL LLManip::getManipAxis(LLViewerObject* object, EManipPart manip, LLVector3 &
}
else
{
- return FALSE;
+ return false;
}
axis.rotVec( grid_rotation );
- return TRUE;
+ return true;
}
F32 LLManip::getSubdivisionLevel(const LLVector3 &reference_point, const LLVector3 &translate_axis, F32 grid_scale, S32 min_pixel_spacing, F32 min_subdivisions, F32 max_subdivisions)
@@ -215,7 +215,7 @@ LLObjectSelectionHandle LLManip::getSelection()
return mObjectSelection;
}
-BOOL LLManip::handleHover(S32 x, S32 y, MASK mask)
+bool LLManip::handleHover(S32 x, S32 y, MASK mask)
{
// We only handle the event if mousedown started with us
if( hasMouseCapture() )
@@ -224,7 +224,7 @@ BOOL LLManip::handleHover(S32 x, S32 y, MASK mask)
{
// Somehow the object got deselected while we were dragging it.
// Release the mouse
- setMouseCapture( FALSE );
+ setMouseCapture( false );
}
LL_DEBUGS("UserInput") << "hover handled by LLManip (active)" << LL_ENDL;
@@ -234,17 +234,17 @@ BOOL LLManip::handleHover(S32 x, S32 y, MASK mask)
LL_DEBUGS("UserInput") << "hover handled by LLManip (inactive)" << LL_ENDL;
}
gViewerWindow->setCursor(UI_CURSOR_ARROW);
- return TRUE;
+ return true;
}
-BOOL LLManip::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLManip::handleMouseUp(S32 x, S32 y, MASK mask)
{
- BOOL handled = FALSE;
+ bool handled = false;
if( hasMouseCapture() )
{
- handled = TRUE;
- setMouseCapture( FALSE );
+ handled = true;
+ setMouseCapture( false );
}
return handled;
}
@@ -254,20 +254,20 @@ void LLManip::updateGridSettings()
sGridMaxSubdivisionLevel = gSavedSettings.getBOOL("GridSubUnit") ? (F32)gSavedSettings.getS32("GridSubdivision") : 1.f;
}
-BOOL LLManip::getMousePointOnPlaneAgent(LLVector3& point, S32 x, S32 y, LLVector3 origin, LLVector3 normal)
+bool LLManip::getMousePointOnPlaneAgent(LLVector3& point, S32 x, S32 y, LLVector3 origin, LLVector3 normal)
{
LLVector3d origin_double = gAgent.getPosGlobalFromAgent(origin);
LLVector3d global_point;
- BOOL result = getMousePointOnPlaneGlobal(global_point, x, y, origin_double, normal);
+ bool result = getMousePointOnPlaneGlobal(global_point, x, y, origin_double, normal);
point = gAgent.getPosAgentFromGlobal(global_point);
return result;
}
-BOOL LLManip::getMousePointOnPlaneGlobal(LLVector3d& point, S32 x, S32 y, LLVector3d origin, LLVector3 normal) const
+bool LLManip::getMousePointOnPlaneGlobal(LLVector3d& point, S32 x, S32 y, LLVector3d origin, LLVector3 normal) const
{
if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
{
- BOOL result = FALSE;
+ bool result = false;
F32 mouse_x = ((F32)x / gViewerWindow->getWorldViewWidthScaled() - 0.5f) * LLViewerCamera::getInstance()->getAspect() / gAgentCamera.mHUDCurZoom;
F32 mouse_y = ((F32)y / gViewerWindow->getWorldViewHeightScaled() - 0.5f) / gAgentCamera.mHUDCurZoom;
@@ -282,7 +282,7 @@ BOOL LLManip::getMousePointOnPlaneGlobal(LLVector3d& point, S32 x, S32 y, LLVect
{
mouse_pos.mV[VX] = (normal * (origin_agent - mouse_pos))
/ (normal.mV[VX]);
- result = TRUE;
+ result = true;
}
point = gAgent.getPosGlobalFromAgent(mouse_pos);
@@ -294,13 +294,13 @@ BOOL LLManip::getMousePointOnPlaneGlobal(LLVector3d& point, S32 x, S32 y, LLVect
point, x, y, origin, normal );
}
- //return FALSE;
+ //return false;
}
// Given the line defined by mouse cursor (a1 + a_param*(a2-a1)) and the line defined by b1 + b_param*(b2-b1),
// returns a_param and b_param for the points where lines are closest to each other.
// Returns false if the two lines are parallel.
-BOOL LLManip::nearestPointOnLineFromMouse( S32 x, S32 y, const LLVector3& b1, const LLVector3& b2, F32 &a_param, F32 &b_param )
+bool LLManip::nearestPointOnLineFromMouse( S32 x, S32 y, const LLVector3& b1, const LLVector3& b2, F32 &a_param, F32 &b_param )
{
LLVector3 a1;
LLVector3 a2;
@@ -318,7 +318,7 @@ BOOL LLManip::nearestPointOnLineFromMouse( S32 x, S32 y, const LLVector3& b1, co
a2 = gAgentCamera.getCameraPositionAgent() + LLVector3(gViewerWindow->mouseDirectionGlobal(x, y));
}
- BOOL parallel = TRUE;
+ bool parallel = true;
LLVector3 a = a2 - a1;
LLVector3 b = b2 - b1;
@@ -332,7 +332,7 @@ BOOL LLManip::nearestPointOnLineFromMouse( S32 x, S32 y, const LLVector3& b1, co
if( (denom < -F_APPROXIMATELY_ZERO) || (F_APPROXIMATELY_ZERO < denom) )
{
a_param = (dist - normal * a1) / denom;
- parallel = FALSE;
+ parallel = false;
}
normal = (a % b) % a; // normal to plane (P) through a and (shortest line between a and b)
@@ -342,7 +342,7 @@ BOOL LLManip::nearestPointOnLineFromMouse( S32 x, S32 y, const LLVector3& b1, co
if( (denom < -F_APPROXIMATELY_ZERO) || (F_APPROXIMATELY_ZERO < denom) )
{
b_param = (dist - normal * b1) / denom;
- parallel = FALSE;
+ parallel = false;
}
return parallel;
@@ -355,22 +355,28 @@ LLVector3 LLManip::getSavedPivotPoint() const
LLVector3 LLManip::getPivotPoint()
{
- if (mObjectSelection->getFirstObject() && mObjectSelection->getObjectCount() == 1 && mObjectSelection->getSelectType() != SELECT_TYPE_HUD)
+ LLViewerObject* object = mObjectSelection->getFirstObject();
+ if (object && mObjectSelection->getObjectCount() == 1 && mObjectSelection->getSelectType() != SELECT_TYPE_HUD)
{
+ LLSelectNode* select_node = mObjectSelection->getFirstNode();
+ if (select_node->mSelectedGLTFNode != -1)
+ {
+ return object->getGLTFNodePositionAgent(select_node->mSelectedGLTFNode);
+ }
return mObjectSelection->getFirstObject()->getPivotPositionAgent();
}
return LLSelectMgr::getInstance()->getBBoxOfSelection().getCenterAgent();
}
-void LLManip::renderGuidelines(BOOL draw_x, BOOL draw_y, BOOL draw_z)
+void LLManip::renderGuidelines(bool draw_x, bool draw_y, bool draw_z)
{
LLVector3 grid_origin;
LLQuaternion grid_rot;
LLVector3 grid_scale;
LLSelectMgr::getInstance()->getGrid(grid_origin, grid_rot, grid_scale);
- const BOOL children_ok = TRUE;
+ const bool children_ok = true;
LLViewerObject* object = mObjectSelection->getFirstRootObject(children_ok);
if (!object)
{
@@ -496,7 +502,7 @@ void LLManip::renderTickText(const LLVector3& pos, const std::string& text, cons
{
const LLFontGL* big_fontp = LLFontGL::getFontSansSerif();
- BOOL hud_selection = mObjectSelection->getSelectType() == SELECT_TYPE_HUD;
+ bool hud_selection = mObjectSelection->getSelectType() == SELECT_TYPE_HUD;
gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
LLVector3 render_pos = pos;
@@ -554,7 +560,7 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string
}
}
- BOOL hud_selection = mObjectSelection->getSelectType() == SELECT_TYPE_HUD;
+ bool hud_selection = mObjectSelection->getSelectType() == SELECT_TYPE_HUD;
gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
{
diff --git a/indra/newview/llmanip.h b/indra/newview/llmanip.h
index 69881e8589..0d31d3af54 100644
--- a/indra/newview/llmanip.h
+++ b/indra/newview/llmanip.h
@@ -117,16 +117,16 @@ public:
LLManip( const std::string& name, LLToolComposite* composite );
- virtual BOOL handleMouseDownOnPart(S32 x, S32 y, MASK mask) = 0;
- void renderGuidelines(BOOL draw_x = TRUE, BOOL draw_y = TRUE, BOOL draw_z = TRUE);
+ virtual bool handleMouseDownOnPart(S32 x, S32 y, MASK mask) = 0;
+ void renderGuidelines(bool draw_x = true, bool draw_y = true, bool draw_z = true);
static void renderXYZ(const LLVector3 &vec);
- /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask);
virtual void highlightManipulators(S32 x, S32 y) = 0;
virtual void handleSelect();
virtual void handleDeselect();
- virtual BOOL canAffectSelection() = 0;
+ virtual bool canAffectSelection() = 0;
EManipPart getHighlightedPart() { return mHighlightedPart; }
@@ -136,18 +136,18 @@ protected:
LLVector3 getSavedPivotPoint() const;
LLVector3 getPivotPoint();
void getManipNormal(LLViewerObject* object, EManipPart manip, LLVector3 &normal);
- BOOL getManipAxis(LLViewerObject* object, EManipPart manip, LLVector3 &axis);
+ bool getManipAxis(LLViewerObject* object, EManipPart manip, LLVector3 &axis);
F32 getSubdivisionLevel(const LLVector3 &reference_point, const LLVector3 &translate_axis, F32 grid_scale, S32 min_pixel_spacing = MIN_DIVISION_PIXEL_WIDTH, F32 min_subdivisions = sGridMinSubdivisionLevel, F32 max_subdivisions = sGridMaxSubdivisionLevel);
void renderTickValue(const LLVector3& pos, F32 value, const std::string& suffix, const LLColor4 &color);
void renderTickText(const LLVector3& pos, const std::string& suffix, const LLColor4 &color);
void updateGridSettings();
- BOOL getMousePointOnPlaneGlobal(LLVector3d& point, S32 x, S32 y, LLVector3d origin, LLVector3 normal) const;
- BOOL getMousePointOnPlaneAgent(LLVector3& point, S32 x, S32 y, LLVector3 origin, LLVector3 normal);
- BOOL nearestPointOnLineFromMouse( S32 x, S32 y, const LLVector3& b1, const LLVector3& b2, F32 &a_param, F32 &b_param );
+ bool getMousePointOnPlaneGlobal(LLVector3d& point, S32 x, S32 y, LLVector3d origin, LLVector3 normal) const;
+ bool getMousePointOnPlaneAgent(LLVector3& point, S32 x, S32 y, LLVector3 origin, LLVector3 normal);
+ bool nearestPointOnLineFromMouse( S32 x, S32 y, const LLVector3& b1, const LLVector3& b2, F32 &a_param, F32 &b_param );
LLColor4 setupSnapGuideRenderPass(S32 pass);
protected:
LLFrameTimer mHelpTextTimer;
- BOOL mInSnapRegime;
+ bool mInSnapRegime;
LLSafeHandle<LLObjectSelection> mObjectSelection;
EManipPart mHighlightedPart;
EManipPart mManipPart;
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index 7f37f98568..f95eed44b6 100644
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -95,9 +95,9 @@ LLManipRotate::LLManipRotate( LLToolComposite* composite )
mCenterToCamMag(0.f),
mCenterToProfilePlane(),
mCenterToProfilePlaneMag(0.f),
- mSendUpdateOnMouseUp( FALSE ),
- mSmoothRotate( FALSE ),
- mCamEdgeOn(FALSE),
+ mSendUpdateOnMouseUp( false ),
+ mSmoothRotate( false ),
+ mCamEdgeOn(false),
mManipulatorScales(1.f, 1.f, 1.f, 1.f)
{ }
@@ -120,7 +120,7 @@ void LLManipRotate::render()
LLGLEnable gl_blend(GL_BLEND);
// You can rotate if you can move
- LLViewerObject* first_object = mObjectSelection->getFirstMoveableObject(TRUE);
+ LLViewerObject* first_object = mObjectSelection->getFirstMoveableObject(true);
if( !first_object )
{
return;
@@ -202,7 +202,7 @@ void LLManipRotate::render()
{
gGL.color4f( 0.7f, 0.7f, 0.7f, 0.3f );
gGL.diffuseColor4f(0.7f, 0.7f, 0.7f, 0.3f);
- gl_circle_2d( 0, 0, mRadiusMeters, CIRCLE_STEPS, TRUE );
+ gl_circle_2d( 0, 0, mRadiusMeters, CIRCLE_STEPS, true );
}
gGL.flush();
@@ -362,11 +362,11 @@ void LLManipRotate::render()
renderXYZ(euler_angles);
}
-BOOL LLManipRotate::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLManipRotate::handleMouseDown(S32 x, S32 y, MASK mask)
{
- BOOL handled = FALSE;
+ bool handled = false;
- LLViewerObject* first_object = mObjectSelection->getFirstMoveableObject(TRUE);
+ LLViewerObject* first_object = mObjectSelection->getFirstMoveableObject(true);
if( first_object )
{
if( mHighlightedPart != LL_NO_PART )
@@ -379,12 +379,12 @@ BOOL LLManipRotate::handleMouseDown(S32 x, S32 y, MASK mask)
}
// Assumes that one of the parts of the manipulator was hit.
-BOOL LLManipRotate::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
+bool LLManipRotate::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
{
- BOOL can_rotate = canAffectSelection();
+ bool can_rotate = canAffectSelection();
if (!can_rotate)
{
- return FALSE;
+ return false;
}
highlightManipulators(x, y);
@@ -439,12 +439,12 @@ BOOL LLManipRotate::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
mAgentSelfAtAxis = gAgent.getAtAxis(); // no point checking if avatar was selected, just save the value
// Route future Mouse messages here preemptively. (Release on mouse up.)
- setMouseCapture( TRUE );
- LLSelectMgr::getInstance()->enableSilhouette(FALSE);
+ setMouseCapture( true );
+ LLSelectMgr::getInstance()->enableSilhouette(false);
mHelpTextTimer.reset();
sNumTimesHelpTextShown++;
- return TRUE;
+ return true;
}
@@ -459,7 +459,7 @@ LLVector3 LLManipRotate::findNearestPointOnRing( S32 x, S32 y, const LLVector3&
return center + proj_onto_ring * mRadiusMeters;
}
-BOOL LLManipRotate::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLManipRotate::handleMouseUp(S32 x, S32 y, MASK mask)
{
// first, perform normal processing in case this was a quick-click
handleHover(x, y, mask);
@@ -486,7 +486,7 @@ BOOL LLManipRotate::handleMouseUp(S32 x, S32 y, MASK mask)
// Might have missed last update due to timing.
LLSelectMgr::getInstance()->sendMultipleUpdate( UPD_ROTATION | UPD_POSITION );
- LLSelectMgr::getInstance()->enableSilhouette(TRUE);
+ LLSelectMgr::getInstance()->enableSilhouette(true);
//gAgent.setObjectTracking(gSavedSettings.getBOOL("TrackFocusObject"));
LLSelectMgr::getInstance()->updateSelectionCenter();
@@ -497,14 +497,14 @@ BOOL LLManipRotate::handleMouseUp(S32 x, S32 y, MASK mask)
}
-BOOL LLManipRotate::handleHover(S32 x, S32 y, MASK mask)
+bool LLManipRotate::handleHover(S32 x, S32 y, MASK mask)
{
if( hasMouseCapture() )
{
if( mObjectSelection->isEmpty() )
{
// Somehow the object got deselected while we were dragging it.
- setMouseCapture( FALSE );
+ setMouseCapture( false );
}
else
{
@@ -520,11 +520,11 @@ BOOL LLManipRotate::handleHover(S32 x, S32 y, MASK mask)
}
gViewerWindow->setCursor(UI_CURSOR_TOOLROTATE);
- return TRUE;
+ return true;
}
-LLVector3 LLManipRotate::projectToSphere( F32 x, F32 y, BOOL* on_sphere )
+LLVector3 LLManipRotate::projectToSphere( F32 x, F32 y, bool* on_sphere )
{
F32 z = 0.f;
F32 dist_squared = x*x + y*y;
@@ -556,6 +556,7 @@ void LLManipRotate::drag( S32 x, S32 y )
BOOL damped = mSmoothRotate;
mSmoothRotate = FALSE;
+ bool gltf_mode = false;
for (LLObjectSelection::iterator iter = mObjectSelection->begin();
iter != mObjectSelection->end(); iter++)
@@ -569,154 +570,177 @@ void LLManipRotate::drag( S32 x, S32 y )
((root_object == NULL) || !root_object->isPermanentEnforced()) &&
(object->isRootEdit() || selectNode->mIndividualSelection))
{
- if (!object->isRootEdit())
- {
- // child objects should not update if parent is selected
- LLViewerObject* editable_root = (LLViewerObject*)object->getParent();
- if (editable_root->isSelected())
- {
- // we will be moved properly by our parent, so skip
- continue;
- }
- }
- LLQuaternion new_rot = selectNode->mSavedRotation * mRotation;
- std::vector<LLVector3>& child_positions = object->mUnselectedChildrenPositions ;
- std::vector<LLQuaternion> child_rotations;
- if (object->isRootEdit() && selectNode->mIndividualSelection)
- {
- object->saveUnselectedChildrenRotation(child_rotations) ;
- object->saveUnselectedChildrenPosition(child_positions) ;
- }
+ if (selectNode->mSelectedGLTFNode != -1)
+ {
+ LLQuaternion new_rot = selectNode->mSavedRotation * mRotation;
- if (object->getParent() && object->mDrawable.notNull())
- {
- LLQuaternion invParentRotation = object->mDrawable->mXform.getParent()->getWorldRotation();
- invParentRotation.transQuat();
+ object->setGLTFNodeRotationAgent(selectNode->mSelectedGLTFNode, new_rot);
- object->setRotation(new_rot * invParentRotation, damped);
- rebuild(object);
- }
- else
- {
- object->setRotation(new_rot, damped);
- LLVOAvatar* avatar = object->asAvatar();
- if (avatar && avatar->isSelf()
- && LLSelectMgr::getInstance()->mAllowSelectAvatar
- && !object->getParent())
+ gltf_mode = true;
+ }
+ else if (!gltf_mode)
+ {
+ if (!object->isRootEdit())
{
- // Normal avatars use object's orienttion, but self uses
- // separate LLCoordFrame
- // See LVOAvatar::updateOrientation()
- if (gAgentCamera.getFocusOnAvatar())
+ // child objects should not update if parent is selected
+ LLViewerObject* editable_root = (LLViewerObject*)object->getParent();
+ if (editable_root->isSelected())
{
- //Don't rotate camera with avatar
- gAgentCamera.setFocusOnAvatar(false, false, false);
+ // we will be moved properly by our parent, so skip
+ continue;
}
+ }
- LLVector3 at_axis = mAgentSelfAtAxis;
- at_axis *= mRotation;
- at_axis.mV[VZ] = 0.f;
- at_axis.normalize();
- gAgent.resetAxes(at_axis);
+ LLQuaternion new_rot = selectNode->mSavedRotation * mRotation;
+ std::vector<LLVector3>& child_positions = object->mUnselectedChildrenPositions;
+ std::vector<LLQuaternion> child_rotations;
+ if (object->isRootEdit() && selectNode->mIndividualSelection)
+ {
+ object->saveUnselectedChildrenRotation(child_rotations);
+ object->saveUnselectedChildrenPosition(child_positions);
}
- rebuild(object);
- }
- // for individually selected roots, we need to counterrotate all the children
- if (object->isRootEdit() && selectNode->mIndividualSelection)
- {
- //RN: must do non-damped updates on these objects so relative rotation appears constant
- // instead of having two competing slerps making the child objects appear to "wobble"
- object->resetChildrenRotationAndPosition(child_rotations, child_positions) ;
- }
+ if (object->getParent() && object->mDrawable.notNull())
+ {
+ LLQuaternion invParentRotation = object->mDrawable->mXform.getParent()->getWorldRotation();
+ invParentRotation.transQuat();
+
+ object->setRotation(new_rot * invParentRotation, damped);
+ rebuild(object);
+ }
+ else
+ {
+ object->setRotation(new_rot, damped);
+ LLVOAvatar* avatar = object->asAvatar();
+ if (avatar && avatar->isSelf()
+ && LLSelectMgr::getInstance()->mAllowSelectAvatar
+ && !object->getParent())
+ {
+ // Normal avatars use object's orienttion, but self uses
+ // separate LLCoordFrame
+ // See LVOAvatar::updateOrientation()
+ if (gAgentCamera.getFocusOnAvatar())
+ {
+ //Don't rotate camera with avatar
+ gAgentCamera.setFocusOnAvatar(false, false, false);
+ }
+
+ LLVector3 at_axis = mAgentSelfAtAxis;
+ at_axis *= mRotation;
+ at_axis.mV[VZ] = 0.f;
+ at_axis.normalize();
+ gAgent.resetAxes(at_axis);
+ }
+ rebuild(object);
+ }
+
+ // for individually selected roots, we need to counterrotate all the children
+ if (object->isRootEdit() && selectNode->mIndividualSelection)
+ {
+ //RN: must do non-damped updates on these objects so relative rotation appears constant
+ // instead of having two competing slerps making the child objects appear to "wobble"
+ object->resetChildrenRotationAndPosition(child_rotations, child_positions);
+ }
+ }
}
}
// update positions
- for (LLObjectSelection::iterator iter = mObjectSelection->begin();
- iter != mObjectSelection->end(); iter++)
- {
- LLSelectNode* selectNode = *iter;
- LLViewerObject* object = selectNode->getObject();
- LLViewerObject* root_object = (object == NULL) ? NULL : object->getRootEdit();
+ if (!gltf_mode)
+ {
+ for (LLObjectSelection::iterator iter = mObjectSelection->begin();
+ iter != mObjectSelection->end(); iter++)
+ {
+ LLSelectNode* selectNode = *iter;
+ LLViewerObject* object = selectNode->getObject();
+ LLViewerObject* root_object = (object == NULL) ? NULL : object->getRootEdit();
- // to avoid cumulative position changes we calculate the objects new position using its saved position
- if (object && object->permMove() && !object->isPermanentEnforced() &&
- ((root_object == NULL) || !root_object->isPermanentEnforced()))
- {
- LLVector3 center = gAgent.getPosAgentFromGlobal( mRotationCenter );
-
- LLVector3 old_position;
- LLVector3 new_position;
-
- if (object->isAttachment() && object->mDrawable.notNull())
- {
- // need to work in drawable space to handle selected items from multiple attachments
- // (which have no shared frame of reference other than their render positions)
- LLXform* parent_xform = object->mDrawable->getXform()->getParent();
- new_position = (selectNode->mSavedPositionLocal * parent_xform->getWorldRotation()) + parent_xform->getWorldPosition();
- old_position = (object->getPosition() * parent_xform->getWorldRotation()) + parent_xform->getWorldPosition();//object->getRenderPosition();
- }
- else
- {
- new_position = gAgent.getPosAgentFromGlobal( selectNode->mSavedPositionGlobal );
- old_position = object->getPositionAgent();
- }
- new_position = (new_position - center) * mRotation; // new relative rotated position
- new_position += center;
-
- if (object->isRootEdit() && !object->isAttachment())
- {
- LLVector3d new_pos_global = gAgent.getPosGlobalFromAgent(new_position);
- new_pos_global = LLWorld::getInstance()->clipToVisibleRegions(selectNode->mSavedPositionGlobal, new_pos_global);
- new_position = gAgent.getPosAgentFromGlobal(new_pos_global);
- }
+ // to avoid cumulative position changes we calculate the objects new position using its saved position
+ if (object && object->permMove() && !object->isPermanentEnforced() &&
+ ((root_object == NULL) || !root_object->isPermanentEnforced()))
+ {
+ LLVector3 center = gAgent.getPosAgentFromGlobal(mRotationCenter);
- // for individually selected child objects
- if (!object->isRootEdit() && selectNode->mIndividualSelection)
- {
- LLViewerObject* parentp = (LLViewerObject*)object->getParent();
- if (!parentp->isSelected())
- {
- if (object->isAttachment() && object->mDrawable.notNull())
- {
- // find position relative to render position of parent
- object->setPosition((new_position - parentp->getRenderPosition()) * ~parentp->getRenderRotation());
- rebuild(object);
- }
- else
- {
- object->setPositionParent((new_position - parentp->getPositionAgent()) * ~parentp->getRotationRegion());
- rebuild(object);
- }
- }
- }
- else if (object->isRootEdit())
- {
- if (object->isAttachment() && object->mDrawable.notNull())
- {
- LLXform* parent_xform = object->mDrawable->getXform()->getParent();
- object->setPosition((new_position - parent_xform->getWorldPosition()) * ~parent_xform->getWorldRotation());
- rebuild(object);
- }
- else
- {
- object->setPositionAgent(new_position);
- rebuild(object);
- }
- }
+ LLVector3 old_position;
+ LLVector3 new_position;
- // for individually selected roots, we need to counter-translate all unselected children
- if (object->isRootEdit() && selectNode->mIndividualSelection)
- {
- // only offset by parent's translation as we've already countered parent's rotation
- rebuild(object);
- object->resetChildrenPosition(old_position - new_position) ;
- }
- }
- }
+ if (selectNode->mSelectedGLTFNode != -1)
+ {
+
+ }
+ else
+ {
+ if (object->isAttachment() && object->mDrawable.notNull())
+ {
+ // need to work in drawable space to handle selected items from multiple attachments
+ // (which have no shared frame of reference other than their render positions)
+ LLXform* parent_xform = object->mDrawable->getXform()->getParent();
+ new_position = (selectNode->mSavedPositionLocal * parent_xform->getWorldRotation()) + parent_xform->getWorldPosition();
+ old_position = (object->getPosition() * parent_xform->getWorldRotation()) + parent_xform->getWorldPosition();//object->getRenderPosition();
+ }
+ else
+ {
+ new_position = gAgent.getPosAgentFromGlobal(selectNode->mSavedPositionGlobal);
+ old_position = object->getPositionAgent();
+ }
+
+ new_position = (new_position - center) * mRotation; // new relative rotated position
+ new_position += center;
+
+ if (object->isRootEdit() && !object->isAttachment())
+ {
+ LLVector3d new_pos_global = gAgent.getPosGlobalFromAgent(new_position);
+ new_pos_global = LLWorld::getInstance()->clipToVisibleRegions(selectNode->mSavedPositionGlobal, new_pos_global);
+ new_position = gAgent.getPosAgentFromGlobal(new_pos_global);
+ }
+
+ // for individually selected child objects
+ if (!object->isRootEdit() && selectNode->mIndividualSelection)
+ {
+ LLViewerObject* parentp = (LLViewerObject*)object->getParent();
+ if (!parentp->isSelected())
+ {
+ if (object->isAttachment() && object->mDrawable.notNull())
+ {
+ // find position relative to render position of parent
+ object->setPosition((new_position - parentp->getRenderPosition()) * ~parentp->getRenderRotation());
+ rebuild(object);
+ }
+ else
+ {
+ object->setPositionParent((new_position - parentp->getPositionAgent()) * ~parentp->getRotationRegion());
+ rebuild(object);
+ }
+ }
+ }
+ else if (object->isRootEdit())
+ {
+ if (object->isAttachment() && object->mDrawable.notNull())
+ {
+ LLXform* parent_xform = object->mDrawable->getXform()->getParent();
+ object->setPosition((new_position - parent_xform->getWorldPosition()) * ~parent_xform->getWorldRotation());
+ rebuild(object);
+ }
+ else
+ {
+ object->setPositionAgent(new_position);
+ rebuild(object);
+ }
+ }
+
+ // for individually selected roots, we need to counter-translate all unselected children
+ if (object->isRootEdit() && selectNode->mIndividualSelection)
+ {
+ // only offset by parent's translation as we've already countered parent's rotation
+ rebuild(object);
+ object->resetChildrenPosition(old_position - new_position);
+ }
+ }
+ }
+ }
+ }
// store changes to override updates
for (LLObjectSelection::iterator iter = LLSelectMgr::getInstance()->getSelection()->begin();
@@ -725,12 +749,13 @@ void LLManipRotate::drag( S32 x, S32 y )
LLSelectNode* selectNode = *iter;
LLViewerObject*cur = selectNode->getObject();
LLViewerObject *root_object = (cur == NULL) ? NULL : cur->getRootEdit();
- if( cur->permModify() && cur->permMove() && !cur->isPermanentEnforced() &&
+
+ if( cur->permModify() && cur->permMove() && !cur->isPermanentEnforced() &&
((root_object == NULL) || !root_object->isPermanentEnforced()) &&
(!cur->isAvatar() || LLSelectMgr::getInstance()->mAllowSelectAvatar))
{
- selectNode->mLastRotation = cur->getRotation();
- selectNode->mLastPositionLocal = cur->getPosition();
+ selectNode->mLastRotation = cur->getRotation();
+ selectNode->mLastPositionLocal = cur->getPosition();
}
}
@@ -745,13 +770,13 @@ void LLManipRotate::renderActiveRing( F32 radius, F32 width, const LLColor4& fro
{
LLGLEnable cull_face(GL_CULL_FACE);
{
- gl_ring(radius, width, back_color, back_color * 0.5f, CIRCLE_STEPS, FALSE);
- gl_ring(radius, width, back_color, back_color * 0.5f, CIRCLE_STEPS, TRUE);
+ gl_ring(radius, width, back_color, back_color * 0.5f, CIRCLE_STEPS, false);
+ gl_ring(radius, width, back_color, back_color * 0.5f, CIRCLE_STEPS, true);
}
{
LLGLDepthTest gls_depth(GL_FALSE);
- gl_ring(radius, width, front_color, front_color * 0.5f, CIRCLE_STEPS, FALSE);
- gl_ring(radius, width, front_color, front_color * 0.5f, CIRCLE_STEPS, TRUE);
+ gl_ring(radius, width, front_color, front_color * 0.5f, CIRCLE_STEPS, false);
+ gl_ring(radius, width, front_color, front_color * 0.5f, CIRCLE_STEPS, true);
}
}
@@ -786,7 +811,7 @@ void LLManipRotate::renderSnapGuides()
LLVector3 world_snap_axis;
LLVector3 test_axis = constraint_axis;
- BOOL constrain_to_ref_object = FALSE;
+ bool constrain_to_ref_object = false;
if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && isAgentAvatarValid())
{
test_axis = test_axis * ~grid_rotation;
@@ -794,7 +819,7 @@ void LLManipRotate::renderSnapGuides()
else if (LLSelectMgr::getInstance()->getGridMode() == GRID_MODE_REF_OBJECT)
{
test_axis = test_axis * ~grid_rotation;
- constrain_to_ref_object = TRUE;
+ constrain_to_ref_object = true;
}
test_axis.abs();
@@ -873,17 +898,17 @@ void LLManipRotate::renderSnapGuides()
F32 end_angle = atan2(y_axis_snap * edge_normal, x_axis_snap * edge_normal);
//F32 start_angle = angle_between((-1.f * LLVector3::x_axis) * snap_guide_rot, edge_normal);
F32 start_angle = end_angle - F_PI;
- gl_arc_2d(0.f, 0.f, mRadiusMeters * SNAP_GUIDE_INNER_RADIUS, CIRCLE_STEPS, FALSE, start_angle, end_angle);
+ gl_arc_2d(0.f, 0.f, mRadiusMeters * SNAP_GUIDE_INNER_RADIUS, CIRCLE_STEPS, false, start_angle, end_angle);
}
else
{
- gl_circle_2d(0.f, 0.f, mRadiusMeters * SNAP_GUIDE_INNER_RADIUS, CIRCLE_STEPS, FALSE);
+ gl_circle_2d(0.f, 0.f, mRadiusMeters * SNAP_GUIDE_INNER_RADIUS, CIRCLE_STEPS, false);
}
gGL.popMatrix();
for (S32 i = 0; i < 64; i++)
{
- BOOL render_text = TRUE;
+ bool render_text = true;
F32 deg = 5.625f * (F32)i;
LLVector3 inner_point;
LLVector3 outer_point;
@@ -921,7 +946,7 @@ void LLManipRotate::renderSnapGuides()
if (dot > 0.f)
{
outer_point = inner_point;
- render_text = FALSE;
+ render_text = false;
}
else
{
@@ -1060,7 +1085,7 @@ void LLManipRotate::renderSnapGuides()
getObjectAxisClosestToMouse(object_axis);
// project onto constraint plane
- LLSelectNode* first_node = mObjectSelection->getFirstMoveableNode(TRUE);
+ LLSelectNode* first_node = mObjectSelection->getFirstMoveableNode(true);
object_axis = object_axis * first_node->getObject()->getRenderRotation();
object_axis = object_axis - (object_axis * getConstraintAxis()) * getConstraintAxis();
object_axis.normVec();
@@ -1152,8 +1177,8 @@ void LLManipRotate::renderSnapGuides()
}
}
-// Returns TRUE if center of sphere is visible. Also sets a bunch of member variables that are used later (e.g. mCenterToCam)
-BOOL LLManipRotate::updateVisiblity()
+// Returns true if center of sphere is visible. Also sets a bunch of member variables that are used later (e.g. mCenterToCam)
+bool LLManipRotate::updateVisiblity()
{
// Don't want to recalculate the center of the selection during a drag.
// Due to packet delays, sometimes half the objects in the selection have their
@@ -1166,7 +1191,7 @@ BOOL LLManipRotate::updateVisiblity()
mRotationCenter = gAgent.getPosGlobalFromAgent( getPivotPoint() );//LLSelectMgr::getInstance()->getSelectionCenterGlobal();
}
- BOOL visible = FALSE;
+ bool visible = false;
//Assume that UI scale factor is equivalent for X and Y axis
F32 ui_scale_factor = LLUI::getScaleFactor().mV[VX];
@@ -1190,7 +1215,7 @@ BOOL LLManipRotate::updateVisiblity()
// so use getWorldViewHeightRaw as scale factor when converting to pixel coordinates
mCenterScreen.set((S32)((0.5f - center.mV[VY]) / gAgentCamera.mHUDCurZoom * gViewerWindow->getWorldViewHeightScaled()),
(S32)((center.mV[VZ] + 0.5f) / gAgentCamera.mHUDCurZoom * gViewerWindow->getWorldViewHeightScaled()));
- visible = TRUE;
+ visible = true;
}
else
{
@@ -1211,7 +1236,7 @@ BOOL LLManipRotate::updateVisiblity()
F32 max_select_distance = gSavedSettings.getF32("MaxSelectDistance");
if (dist_vec_squared(gAgent.getPositionAgent(), center) > (max_select_distance * max_select_distance))
{
- visible = FALSE;
+ visible = false;
}
}
@@ -1227,16 +1252,16 @@ BOOL LLManipRotate::updateVisiblity()
}
else
{
- visible = FALSE;
+ visible = false;
}
}
}
- mCamEdgeOn = FALSE;
+ mCamEdgeOn = false;
F32 axis_onto_cam = mManipPart >= LL_ROT_X ? llabs( getConstraintAxis() * mCenterToCamNorm ) : 0.f;
if( axis_onto_cam < AXIS_ONTO_CAM_TOLERANCE )
{
- mCamEdgeOn = TRUE;
+ mCamEdgeOn = true;
}
return visible;
@@ -1329,7 +1354,7 @@ LLVector3 LLManipRotate::getConstraintAxis()
LLSelectMgr::getInstance()->getGrid(grid_origin, grid_rotation, grid_scale);
- LLSelectNode* first_node = mObjectSelection->getFirstMoveableNode(TRUE);
+ LLSelectNode* first_node = mObjectSelection->getFirstMoveableNode(true);
if (first_node)
{
// *FIX: get agent local attachment grid working
@@ -1343,7 +1368,7 @@ LLVector3 LLManipRotate::getConstraintAxis()
LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y )
{
- LLSelectNode* first_object_node = mObjectSelection->getFirstMoveableNode(TRUE);
+ LLSelectNode* first_object_node = mObjectSelection->getFirstMoveableNode(true);
LLVector3 constraint_axis = getConstraintAxis();
LLVector3 center = gAgent.getPosAgentFromGlobal( mRotationCenter );
@@ -1417,7 +1442,7 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y )
}
LLVector3 projected_mouse;
- BOOL hit = getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, constraint_axis);
+ bool hit = getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, constraint_axis);
projected_mouse -= snap_plane_center;
if (gSavedSettings.getBOOL("SnapEnabled")) {
@@ -1532,9 +1557,9 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y )
if (!mInSnapRegime)
{
- mSmoothRotate = TRUE;
+ mSmoothRotate = true;
}
- mInSnapRegime = TRUE;
+ mInSnapRegime = true;
// 0 to 360 deg
F32 mouse_angle = fmodf(atan2(projected_mouse * axis1, projected_mouse * axis2) * RAD_TO_DEG + 360.f, 360.f);
@@ -1566,17 +1591,17 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y )
{
if (mInSnapRegime)
{
- mSmoothRotate = TRUE;
+ mSmoothRotate = true;
}
- mInSnapRegime = FALSE;
+ mInSnapRegime = false;
}
}
else {
if (mInSnapRegime)
{
- mSmoothRotate = TRUE;
+ mSmoothRotate = true;
}
- mInSnapRegime = FALSE;
+ mInSnapRegime = false;
}
if (!mInSnapRegime)
@@ -1618,9 +1643,9 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y )
{
if (!mInSnapRegime)
{
- mSmoothRotate = TRUE;
+ mSmoothRotate = true;
}
- mInSnapRegime = TRUE;
+ mInSnapRegime = true;
// 0 to 360 deg
F32 mouse_angle = fmodf(atan2(projected_mouse * axis1, projected_mouse * axis2) * RAD_TO_DEG + 360.f, 360.f);
@@ -1649,9 +1674,9 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y )
{
if (mInSnapRegime)
{
- mSmoothRotate = TRUE;
+ mSmoothRotate = true;
}
- mInSnapRegime = FALSE;
+ mInSnapRegime = false;
}
LLVector3 cross_product = mMouseDown % mMouseCur;
@@ -1738,7 +1763,7 @@ void LLManipRotate::highlightManipulators( S32 x, S32 y )
mHighlightedPart = LL_NO_PART;
//LLBBox bbox = LLSelectMgr::getInstance()->getBBoxOfSelection();
- LLViewerObject *first_object = mObjectSelection->getFirstMoveableObject(TRUE);
+ LLViewerObject *first_object = mObjectSelection->getFirstMoveableObject(true);
if (!first_object)
{
@@ -1873,7 +1898,7 @@ void LLManipRotate::highlightManipulators( S32 x, S32 y )
S32 LLManipRotate::getObjectAxisClosestToMouse(LLVector3& object_axis)
{
- LLSelectNode* first_object_node = mObjectSelection->getFirstMoveableNode(TRUE);
+ LLSelectNode* first_object_node = mObjectSelection->getFirstMoveableNode(true);
if (!first_object_node)
{
@@ -1928,9 +1953,9 @@ S32 LLManipRotate::getObjectAxisClosestToMouse(LLVector3& object_axis)
}
//virtual
-BOOL LLManipRotate::canAffectSelection()
+bool LLManipRotate::canAffectSelection()
{
- BOOL can_rotate = mObjectSelection->getObjectCount() != 0;
+ bool can_rotate = mObjectSelection->getObjectCount() != 0;
if (can_rotate)
{
struct f : public LLSelectedObjectFunctor
diff --git a/indra/newview/llmaniprotate.h b/indra/newview/llmaniprotate.h
index dc36ef796a..183d370f07 100644
--- a/indra/newview/llmaniprotate.h
+++ b/indra/newview/llmaniprotate.h
@@ -53,27 +53,27 @@ public:
LLManipRotate( LLToolComposite* composite );
- virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask );
- virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask );
- virtual BOOL handleHover( S32 x, S32 y, MASK mask );
+ virtual bool handleMouseDown( S32 x, S32 y, MASK mask );
+ virtual bool handleMouseUp( S32 x, S32 y, MASK mask );
+ virtual bool handleHover( S32 x, S32 y, MASK mask );
virtual void render();
virtual void handleSelect();
- virtual BOOL handleMouseDownOnPart(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseDownOnPart(S32 x, S32 y, MASK mask);
virtual void highlightManipulators(S32 x, S32 y);
- virtual BOOL canAffectSelection();
+ virtual bool canAffectSelection();
private:
void updateHoverView();
void drag( S32 x, S32 y );
- LLVector3 projectToSphere( F32 x, F32 y, BOOL* on_sphere );
+ LLVector3 projectToSphere( F32 x, F32 y, bool* on_sphere );
void renderSnapGuides();
void renderActiveRing(F32 radius, F32 width, const LLColor4& center_color, const LLColor4& side_color);
- BOOL updateVisiblity();
+ bool updateVisiblity();
LLVector3 findNearestPointOnRing( S32 x, S32 y, const LLVector3& center, const LLVector3& axis );
LLQuaternion dragUnconstrained( S32 x, S32 y );
@@ -104,10 +104,10 @@ private:
LLVector3 mCenterToProfilePlane;
F32 mCenterToProfilePlaneMag;
- BOOL mSendUpdateOnMouseUp;
+ bool mSendUpdateOnMouseUp;
- BOOL mSmoothRotate;
- BOOL mCamEdgeOn;
+ bool mSmoothRotate;
+ bool mCamEdgeOn;
LLVector4 mManipulatorVertices[6];
LLVector4 mManipulatorScales;
diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp
index 6f685d4e62..1f52b927dc 100644
--- a/indra/newview/llmanipscale.cpp
+++ b/indra/newview/llmanipscale.cpp
@@ -101,37 +101,37 @@ F32 get_default_max_prim_scale(bool is_flora)
}
// static
-void LLManipScale::setUniform(BOOL b)
+void LLManipScale::setUniform(bool b)
{
gSavedSettings.setBOOL("ScaleUniform", b);
}
// static
-void LLManipScale::setShowAxes(BOOL b)
+void LLManipScale::setShowAxes(bool b)
{
gSavedSettings.setBOOL("ScaleShowAxes", b);
}
// static
-void LLManipScale::setStretchTextures(BOOL b)
+void LLManipScale::setStretchTextures(bool b)
{
gSavedSettings.setBOOL("ScaleStretchTextures", b);
}
// static
-BOOL LLManipScale::getUniform()
+bool LLManipScale::getUniform()
{
return gSavedSettings.getBOOL("ScaleUniform");
}
// static
-BOOL LLManipScale::getShowAxes()
+bool LLManipScale::getShowAxes()
{
return gSavedSettings.getBOOL("ScaleShowAxes");
}
// static
-BOOL LLManipScale::getStretchTextures()
+bool LLManipScale::getStretchTextures()
{
return gSavedSettings.getBOOL("ScaleStretchTextures");
}
@@ -183,7 +183,7 @@ LLManipScale::LLManipScale( LLToolComposite* composite )
mScaledBoxHandleSize( 1.f ),
mLastMouseX( -1 ),
mLastMouseY( -1 ),
- mSendUpdateOnMouseUp( FALSE ),
+ mSendUpdateOnMouseUp( false ),
mLastUpdateFlags( 0 ),
mScaleSnapUnit1(1.f),
mScaleSnapUnit2(1.f),
@@ -319,9 +319,9 @@ void LLManipScale::render()
}
}
-BOOL LLManipScale::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLManipScale::handleMouseDown(S32 x, S32 y, MASK mask)
{
- BOOL handled = FALSE;
+ bool handled = false;
if(mHighlightedPart != LL_NO_PART)
{
@@ -332,18 +332,18 @@ BOOL LLManipScale::handleMouseDown(S32 x, S32 y, MASK mask)
}
// Assumes that one of the arrows on an object was hit.
-BOOL LLManipScale::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
+bool LLManipScale::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
{
- BOOL can_scale = canAffectSelection();
+ bool can_scale = canAffectSelection();
if (!can_scale)
{
- return FALSE;
+ return false;
}
highlightManipulators(x, y);
S32 hit_part = mHighlightedPart;
- LLSelectMgr::getInstance()->enableSilhouette(FALSE);
+ LLSelectMgr::getInstance()->enableSilhouette(false);
mManipPart = (EManipPart)hit_part;
LLBBox bbox = LLSelectMgr::getInstance()->getBBoxOfSelection();
@@ -365,15 +365,15 @@ BOOL LLManipScale::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
// we just started a drag, so save initial object positions, orientations, and scales
LLSelectMgr::getInstance()->saveSelectedObjectTransform(SELECT_ACTION_TYPE_SCALE);
// Route future Mouse messages here preemptively. (Release on mouse up.)
- setMouseCapture( TRUE );
+ setMouseCapture( true );
mHelpTextTimer.reset();
sNumTimesHelpTextShown++;
- return TRUE;
+ return true;
}
-BOOL LLManipScale::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLManipScale::handleMouseUp(S32 x, S32 y, MASK mask)
{
// first, perform normal processing in case this was a quick-click
handleHover(x, y, mask);
@@ -383,19 +383,19 @@ BOOL LLManipScale::handleMouseUp(S32 x, S32 y, MASK mask)
if( (LL_FACE_MIN <= (S32)mManipPart)
&& ((S32)mManipPart <= LL_FACE_MAX) )
{
- sendUpdates(TRUE,TRUE,FALSE);
+ sendUpdates(true,true,false);
}
else
if( (LL_CORNER_MIN <= (S32)mManipPart)
&& ((S32)mManipPart <= LL_CORNER_MAX) )
{
- sendUpdates(TRUE,TRUE,TRUE);
+ sendUpdates(true,true,true);
}
//send texture update
- LLSelectMgr::getInstance()->adjustTexturesByScale(TRUE, getStretchTextures());
+ LLSelectMgr::getInstance()->adjustTexturesByScale(true, getStretchTextures());
- LLSelectMgr::getInstance()->enableSilhouette(TRUE);
+ LLSelectMgr::getInstance()->enableSilhouette(true);
mManipPart = LL_NO_PART;
// Might have missed last update due to UPDATE_DELAY timing
@@ -408,14 +408,14 @@ BOOL LLManipScale::handleMouseUp(S32 x, S32 y, MASK mask)
}
-BOOL LLManipScale::handleHover(S32 x, S32 y, MASK mask)
+bool LLManipScale::handleHover(S32 x, S32 y, MASK mask)
{
if( hasMouseCapture() )
{
if( mObjectSelection->isEmpty() )
{
// Somehow the object got deselected while we were dragging it.
- setMouseCapture( FALSE );
+ setMouseCapture( false );
}
else
{
@@ -439,10 +439,10 @@ BOOL LLManipScale::handleHover(S32 x, S32 y, MASK mask)
}
// Patch up textures, if possible.
- LLSelectMgr::getInstance()->adjustTexturesByScale(FALSE, getStretchTextures());
+ LLSelectMgr::getInstance()->adjustTexturesByScale(false, getStretchTextures());
gViewerWindow->setCursor(UI_CURSOR_TOOLSCALE);
- return TRUE;
+ return true;
}
void LLManipScale::highlightManipulators(S32 x, S32 y)
@@ -865,7 +865,7 @@ void LLManipScale::dragCorner( S32 x, S32 y )
F32 scale_factor = 1.f;
F32 max_scale = partToMaxScale(mManipPart, bbox);
F32 min_scale = partToMinScale(mManipPart, bbox);
- BOOL uniform = LLManipScale::getUniform();
+ bool uniform = LLManipScale::getUniform();
// check for snapping
LLVector3 mouse_on_plane1;
@@ -879,7 +879,7 @@ void LLManipScale::dragCorner( S32 x, S32 y )
LLVector3 projected_drag_pos1 = inverse_projected_vec(mScaleDir, orthogonal_component(mouse_on_plane1, mSnapGuideDir1));
LLVector3 projected_drag_pos2 = inverse_projected_vec(mScaleDir, orthogonal_component(mouse_on_plane2, mSnapGuideDir2));
- BOOL snap_enabled = gSavedSettings.getBOOL("SnapEnabled");
+ bool snap_enabled = gSavedSettings.getBOOL("SnapEnabled");
if (snap_enabled && (mouse_on_plane1 - projected_drag_pos1) * mSnapGuideDir1 > mSnapRegimeOffset)
{
F32 drag_dist = mScaleDir * projected_drag_pos1; // Projecting the drag position allows for negative results, vs using the length which will result in a "reverse scaling" bug.
@@ -955,7 +955,7 @@ void LLManipScale::dragCorner( S32 x, S32 y )
LLVector3d drag_global = uniform ? mDragStartCenterGlobal : mDragFarHitGlobal;
- // do the root objects i.e. (TRUE == cur->isRootEdit())
+ // do the root objects i.e. (true == cur->isRootEdit())
for (LLObjectSelection::iterator iter = mObjectSelection->begin();
iter != mObjectSelection->end(); iter++)
{
@@ -1006,7 +1006,7 @@ void LLManipScale::dragCorner( S32 x, S32 y )
}
}
}
- // do the child objects i.e. (FALSE == cur->isRootEdit())
+ // do the child objects i.e. (false == cur->isRootEdit())
for (LLObjectSelection::iterator iter = mObjectSelection->begin();
iter != mObjectSelection->end(); iter++)
{
@@ -1018,7 +1018,7 @@ void LLManipScale::dragCorner( S32 x, S32 y )
!cur->isAvatar() && !cur->isRootEdit() )
{
const LLVector3& scale = selectNode->mSavedScale;
- cur->setScale( scale_factor * scale, FALSE );
+ cur->setScale( scale_factor * scale, false );
if (!selectNode->mIndividualSelection)
{
@@ -1080,7 +1080,7 @@ void LLManipScale::dragFace( S32 x, S32 y )
F32 max_drag_dist = partToMaxScale(mManipPart, bbox);
F32 min_drag_dist = partToMinScale(mManipPart, bbox);
- BOOL uniform = LLManipScale::getUniform();
+ bool uniform = LLManipScale::getUniform();
if( uniform )
{
drag_delta *= 2.f;
@@ -1090,7 +1090,7 @@ void LLManipScale::dragFace( S32 x, S32 y )
F32 dist_from_scale_line = dist_vec(scale_center_to_mouse, (mouse_on_scale_line - mScaleCenter));
F32 dist_along_scale_line = scale_center_to_mouse * mScaleDir;
- BOOL snap_enabled = gSavedSettings.getBOOL("SnapEnabled");
+ bool snap_enabled = gSavedSettings.getBOOL("SnapEnabled");
if (snap_enabled && dist_from_scale_line > mSnapRegimeOffset)
{
@@ -1166,7 +1166,7 @@ void LLManipScale::dragFace( S32 x, S32 y )
mDragPointGlobal = drag_point_global;
}
-void LLManipScale::sendUpdates( BOOL send_position_update, BOOL send_scale_update, BOOL corner )
+void LLManipScale::sendUpdates( bool send_position_update, bool send_scale_update, bool corner )
{
// Throttle updates to 10 per second.
static LLTimer update_timer;
@@ -1179,7 +1179,7 @@ void LLManipScale::sendUpdates( BOOL send_position_update, BOOL send_scale_updat
if (send_position_update) update_flags |= UPD_POSITION;
if (send_scale_update) update_flags |= UPD_SCALE;
-// BOOL send_type = SEND_INDIVIDUALS;
+// bool send_type = SEND_INDIVIDUALS;
if (corner)
{
update_flags |= UPD_UNIFORM;
@@ -1192,11 +1192,11 @@ void LLManipScale::sendUpdates( BOOL send_position_update, BOOL send_scale_updat
{
LLSelectMgr::getInstance()->sendMultipleUpdate( update_flags );
update_timer.reset();
- mSendUpdateOnMouseUp = FALSE;
+ mSendUpdateOnMouseUp = false;
}
else
{
- mSendUpdateOnMouseUp = TRUE;
+ mSendUpdateOnMouseUp = true;
}
dialog_refresh_all();
}
@@ -1245,7 +1245,7 @@ void LLManipScale::stretchFace( const LLVector3& drag_start_agent, const LLVecto
LLVector3 scale = cur->getScale();
scale.mV[axis_index] = desired_scale;
- cur->setScale(scale, FALSE);
+ cur->setScale(scale, false);
rebuild(cur);
LLVector3 delta_pos;
if( !getUniform() )
@@ -2076,11 +2076,11 @@ LLVector3 LLManipScale::nearestAxis( const LLVector3& v ) const
}
// virtual
-BOOL LLManipScale::canAffectSelection()
+bool LLManipScale::canAffectSelection()
{
// An selection is scalable if you are allowed to both edit and move
// everything in it, and it does not have any sitting agents
- BOOL can_scale = mObjectSelection->getObjectCount() != 0;
+ bool can_scale = mObjectSelection->getObjectCount() != 0;
if (can_scale)
{
struct f : public LLSelectedObjectFunctor
diff --git a/indra/newview/llmanipscale.h b/indra/newview/llmanipscale.h
index 11ade9b7d0..aa6648260e 100644
--- a/indra/newview/llmanipscale.h
+++ b/indra/newview/llmanipscale.h
@@ -76,22 +76,22 @@ public:
LLManipScale( LLToolComposite* composite );
~LLManipScale();
- virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask );
- virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask );
- virtual BOOL handleHover( S32 x, S32 y, MASK mask );
+ virtual bool handleMouseDown( S32 x, S32 y, MASK mask );
+ virtual bool handleMouseUp( S32 x, S32 y, MASK mask );
+ virtual bool handleHover( S32 x, S32 y, MASK mask );
virtual void render();
virtual void handleSelect();
- virtual BOOL handleMouseDownOnPart(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseDownOnPart(S32 x, S32 y, MASK mask);
virtual void highlightManipulators(S32 x, S32 y); // decided which manipulator, if any, should be highlighted by mouse hover
- virtual BOOL canAffectSelection();
+ virtual bool canAffectSelection();
- static void setUniform( BOOL b );
- static BOOL getUniform();
- static void setStretchTextures( BOOL b );
- static BOOL getStretchTextures();
- static void setShowAxes( BOOL b );
- static BOOL getShowAxes();
+ static void setUniform( bool b );
+ static bool getUniform();
+ static void setStretchTextures( bool b );
+ static bool getStretchTextures();
+ static void setShowAxes( bool b );
+ static bool getShowAxes();
private:
void renderCorners( const LLBBox& local_bbox );
@@ -109,7 +109,7 @@ private:
void dragFace( S32 x, S32 y );
void dragCorner( S32 x, S32 y );
- void sendUpdates( BOOL send_position_update, BOOL send_scale_update, BOOL corner = FALSE);
+ void sendUpdates( bool send_position_update, bool send_scale_update, bool corner = false);
LLVector3 faceToUnitVector( S32 part ) const;
LLVector3 cornerToUnitVector( S32 part ) const;
@@ -148,7 +148,7 @@ private:
LLVector3d mDragFarHitGlobal;
S32 mLastMouseX;
S32 mLastMouseY;
- BOOL mSendUpdateOnMouseUp;
+ bool mSendUpdateOnMouseUp;
U32 mLastUpdateFlags;
typedef std::set<ManipulatorHandle*, compare_manipulators> manipulator_list_t;
manipulator_list_t mProjectedManipulators;
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index cafb3fef67..9bfe48772a 100644
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -111,8 +111,8 @@ LLManipTranslate::LLManipTranslate( LLToolComposite* composite )
: LLManip( std::string("Move"), composite ),
mLastHoverMouseX(-1),
mLastHoverMouseY(-1),
- mMouseOutsideSlop(FALSE),
- mCopyMadeThisDrag(FALSE),
+ mMouseOutsideSlop(false),
+ mCopyMadeThisDrag(false),
mMouseDownX(-1),
mMouseDownY(-1),
mAxisArrowLength(50),
@@ -123,7 +123,7 @@ LLManipTranslate::LLManipTranslate( LLToolComposite* composite )
mUpdateTimer(),
mSnapOffsetMeters(0.f),
mSubdivisions(10.f),
- mInSnapRegime(FALSE),
+ mInSnapRegime(false),
mArrowScales(1.f, 1.f, 1.f),
mPlaneScales(1.f, 1.f, 1.f),
mPlaneManipPositions(1.f, 1.f, 1.f, 1.f)
@@ -290,9 +290,9 @@ void LLManipTranslate::handleSelect()
LLManip::handleSelect();
}
-BOOL LLManipTranslate::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLManipTranslate::handleMouseDown(S32 x, S32 y, MASK mask)
{
- BOOL handled = FALSE;
+ bool handled = false;
// didn't click in any UI object, so must have clicked in the world
if( (mHighlightedPart == LL_X_ARROW ||
@@ -309,12 +309,12 @@ BOOL LLManipTranslate::handleMouseDown(S32 x, S32 y, MASK mask)
}
// Assumes that one of the arrows on an object was hit.
-BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
+bool LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
{
- BOOL can_move = canAffectSelection();
+ bool can_move = canAffectSelection();
if (!can_move)
{
- return FALSE;
+ return false;
}
highlightManipulators(x, y);
@@ -327,7 +327,7 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
(hit_part != LL_XZ_PLANE) &&
(hit_part != LL_XY_PLANE) )
{
- return TRUE;
+ return true;
}
mHelpTextTimer.reset();
@@ -335,7 +335,7 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
LLSelectMgr::getInstance()->getGrid(mGridOrigin, mGridRotation, mGridScale);
- LLSelectMgr::getInstance()->enableSilhouette(FALSE);
+ LLSelectMgr::getInstance()->enableSilhouette(false);
// we just started a drag, so save initial object positions
LLSelectMgr::getInstance()->saveSelectedObjectTransform(SELECT_ACTION_TYPE_MOVE);
@@ -343,17 +343,17 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
mManipPart = (EManipPart)hit_part;
mMouseDownX = x;
mMouseDownY = y;
- mMouseOutsideSlop = FALSE;
+ mMouseOutsideSlop = false;
LLVector3 axis;
- LLSelectNode *selectNode = mObjectSelection->getFirstMoveableNode(TRUE);
+ LLSelectNode *selectNode = mObjectSelection->getFirstMoveableNode(true);
if (!selectNode)
{
// didn't find the object in our selection...oh well
LL_WARNS() << "Trying to translate an unselected object" << LL_ENDL;
- return TRUE;
+ return true;
}
LLViewerObject *selected_object = selectNode->getObject();
@@ -362,11 +362,11 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
// somehow we lost the object!
LL_WARNS() << "Translate manip lost the object, no selected object" << LL_ENDL;
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
- return TRUE;
+ return true;
}
// Compute unit vectors for arrow hit and a plane through that vector
- BOOL axis_exists = getManipAxis(selected_object, mManipPart, axis);
+ bool axis_exists = getManipAxis(selected_object, mManipPart, axis);
getManipNormal(selected_object, mManipPart, mManipNormal);
//LLVector3 select_center_agent = gAgent.getPosAgentFromGlobal(LLSelectMgr::getInstance()->getSelectionCenterGlobal());
@@ -395,15 +395,15 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
LLVector3d object_start_global = gAgent.getPosGlobalFromAgent(getPivotPoint());
getMousePointOnPlaneGlobal(mDragCursorStartGlobal, x, y, object_start_global, mManipNormal);
mDragSelectionStartGlobal = object_start_global;
- mCopyMadeThisDrag = FALSE;
+ mCopyMadeThisDrag = false;
// Route future Mouse messages here preemptively. (Release on mouse up.)
- setMouseCapture( TRUE );
+ setMouseCapture( true );
- return TRUE;
+ return true;
}
-BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
+bool LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
{
// Translation tool only works if mouse button is down.
// Bail out if mouse not down.
@@ -415,7 +415,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
highlightManipulators(x, y);
- return TRUE;
+ return true;
}
// Handle auto-rotation if necessary.
@@ -423,7 +423,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
const F32 ROTATE_ANGLE_PER_SECOND = 30.f * DEG_TO_RAD;
const S32 ROTATE_H_MARGIN = world_rect.getWidth() / 20;
const F32 rotate_angle = ROTATE_ANGLE_PER_SECOND / gFPSClamped;
- BOOL rotated = FALSE;
+ bool rotated = false;
// ...build mode moves camera about focus point
if (mObjectSelection->getSelectType() != SELECT_TYPE_HUD)
@@ -431,12 +431,12 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
if (x < ROTATE_H_MARGIN)
{
gAgentCamera.cameraOrbitAround(rotate_angle);
- rotated = TRUE;
+ rotated = true;
}
else if (x > world_rect.getWidth() - ROTATE_H_MARGIN)
{
gAgentCamera.cameraOrbitAround(-rotate_angle);
- rotated = TRUE;
+ rotated = true;
}
}
@@ -447,7 +447,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
{
LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (mouse unmoved)" << LL_ENDL;
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
- return TRUE;
+ return true;
}
mLastHoverMouseX = x;
mLastHoverMouseY = y;
@@ -460,18 +460,18 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
{
LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (mouse inside slop)" << LL_ENDL;
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
- return TRUE;
+ return true;
}
else
{
// ...just went outside the slop region
- mMouseOutsideSlop = TRUE;
+ mMouseOutsideSlop = true;
// If holding down shift, leave behind a copy.
if (mask == MASK_COPY)
{
// ...we're trying to make a copy
- LLSelectMgr::getInstance()->selectDuplicate(LLVector3::zero, FALSE);
- mCopyMadeThisDrag = TRUE;
+ LLSelectMgr::getInstance()->selectDuplicate(LLVector3::zero, false);
+ mCopyMadeThisDrag = true;
// When we make the copy, we don't want to do any other processing.
// If so, the object will also be moved, and the copy will be offset.
@@ -488,13 +488,13 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
// pick the first object to constrain to grid w/ common origin
// this is so we don't screw up groups
- LLSelectNode* selectNode = mObjectSelection->getFirstMoveableNode(TRUE);
+ LLSelectNode* selectNode = mObjectSelection->getFirstMoveableNode(true);
if (!selectNode)
{
// somehow we lost the object!
LL_WARNS() << "Translate manip lost the object, no selectNode" << LL_ENDL;
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
- return TRUE;
+ return true;
}
LLViewerObject* object = selectNode->getObject();
@@ -503,11 +503,11 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
// somehow we lost the object!
LL_WARNS() << "Translate manip lost the object, no object in selectNode" << LL_ENDL;
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
- return TRUE;
+ return true;
}
// Compute unit vectors for arrow hit and a plane through that vector
- BOOL axis_exists = getManipAxis(object, mManipPart, axis_f); // TODO: move this
+ bool axis_exists = getManipAxis(object, mManipPart, axis_f); // TODO: move this
axis_d.setVec(axis_f);
@@ -530,7 +530,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
{
LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (too far)" << LL_ENDL;
gViewerWindow->setCursor(UI_CURSOR_NOLOCKED);
- return TRUE;
+ return true;
}
}
@@ -546,7 +546,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
{
if (off_axis_magnitude > mSnapOffsetMeters)
{
- mInSnapRegime = TRUE;
+ mInSnapRegime = true;
LLVector3 cursor_snap_agent = gAgent.getPosAgentFromGlobal(cursor_point_snap_line);
F32 cursor_grid_dist = (cursor_snap_agent - mGridOrigin) * axis_f;
@@ -630,16 +630,16 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
}
cursor_point_agent = (cursor_point_grid * mGridRotation) + mGridOrigin;
relative_move.setVec(cursor_point_agent - gAgent.getPosAgentFromGlobal(mDragSelectionStartGlobal));
- mInSnapRegime = TRUE;
+ mInSnapRegime = true;
}
else
{
- mInSnapRegime = FALSE;
+ mInSnapRegime = false;
}
}
else
{
- mInSnapRegime = FALSE;
+ mInSnapRegime = false;
}
// Clamp to arrow direction
@@ -655,114 +655,125 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
LLVector3d clamped_relative_move = axis_magnitude * axis_d; // scalar multiply
LLVector3 clamped_relative_move_f = (F32)axis_magnitude * axis_f; // scalar multiply
- for (LLObjectSelection::iterator iter = mObjectSelection->begin();
- iter != mObjectSelection->end(); iter++)
- {
- LLSelectNode* selectNode = *iter;
- LLViewerObject* object = selectNode->getObject();
-
- // Only apply motion to root objects and objects selected
- // as "individual".
- if (!object->isRootEdit() && !selectNode->mIndividualSelection)
- {
- continue;
- }
-
- if (!object->isRootEdit())
- {
- // child objects should not update if parent is selected
- LLViewerObject* editable_root = (LLViewerObject*)object->getParent();
- if (editable_root->isSelected())
- {
- // we will be moved properly by our parent, so skip
- continue;
- }
- }
-
- LLViewerObject* root_object = (object == NULL) ? NULL : object->getRootEdit();
- if (object->permMove() && !object->isPermanentEnforced() &&
- ((root_object == NULL) || !root_object->isPermanentEnforced()))
- {
- // handle attachments in local space
- if (object->isAttachment() && object->mDrawable.notNull())
- {
- // calculate local version of relative move
- LLQuaternion objWorldRotation = object->mDrawable->mXform.getParent()->getWorldRotation();
- objWorldRotation.transQuat();
-
- LLVector3 old_position_local = object->getPosition();
- LLVector3 new_position_local = selectNode->mSavedPositionLocal + (clamped_relative_move_f * objWorldRotation);
-
- //RN: I forget, but we need to do this because of snapping which doesn't often result
- // in position changes even when the mouse moves
- object->setPosition(new_position_local);
- rebuild(object);
- gAgentAvatarp->clampAttachmentPositions();
- new_position_local = object->getPosition();
-
- if (selectNode->mIndividualSelection)
- {
- // counter-translate child objects if we are moving the root as an individual
- object->resetChildrenPosition(old_position_local - new_position_local, TRUE) ;
- }
- }
- else
- {
- // compute new position to send to simulators, but don't set it yet.
- // We need the old position to know which simulator to send the move message to.
- LLVector3d new_position_global = selectNode->mSavedPositionGlobal + clamped_relative_move;
-
- // Don't let object centers go too far underground
- F64 min_height = LLWorld::getInstance()->getMinAllowedZ(object, object->getPositionGlobal());
- if (new_position_global.mdV[VZ] < min_height)
- {
- new_position_global.mdV[VZ] = min_height;
- }
-
- // For safety, cap heights where objects can be dragged
- if (new_position_global.mdV[VZ] > MAX_OBJECT_Z)
- {
- new_position_global.mdV[VZ] = MAX_OBJECT_Z;
- }
-
- // Grass is always drawn on the ground, so clamp its position to the ground
- if (object->getPCode() == LL_PCODE_LEGACY_GRASS)
- {
- new_position_global.mdV[VZ] = LLWorld::getInstance()->resolveLandHeightGlobal(new_position_global) + 1.f;
- }
-
- if (object->isRootEdit())
- {
- new_position_global = LLWorld::getInstance()->clipToVisibleRegions(object->getPositionGlobal(), new_position_global);
- }
-
- // PR: Only update if changed
- LLVector3 old_position_agent = object->getPositionAgent();
- LLVector3 new_position_agent = gAgent.getPosAgentFromGlobal(new_position_global);
- if (object->isRootEdit())
- {
- // finally, move parent object after children have calculated new offsets
- object->setPositionAgent(new_position_agent);
- rebuild(object);
- }
- else
- {
- LLViewerObject* root_object = object->getRootEdit();
- new_position_agent -= root_object->getPositionAgent();
- new_position_agent = new_position_agent * ~root_object->getRotation();
- object->setPositionParent(new_position_agent, FALSE);
- rebuild(object);
- }
+ for (LLObjectSelection::iterator iter = mObjectSelection->begin();
+ iter != mObjectSelection->end(); iter++)
+ {
+ LLSelectNode* selectNode = *iter;
+ LLViewerObject* object = selectNode->getObject();
+
+ if (selectNode->mSelectedGLTFNode != -1)
+ {
+ // manipulating a GLTF node
+ clamped_relative_move_f -= selectNode->mLastMoveLocal;
+ object->moveGLTFNode(selectNode->mSelectedGLTFNode, clamped_relative_move_f);
+ selectNode->mLastMoveLocal += clamped_relative_move_f;
+ }
+ else
+ {
+ // Only apply motion to root objects and objects selected
+ // as "individual".
+ if (!object->isRootEdit() && !selectNode->mIndividualSelection)
+ {
+ continue;
+ }
+
+ if (!object->isRootEdit())
+ {
+ // child objects should not update if parent is selected
+ LLViewerObject* editable_root = (LLViewerObject*)object->getParent();
+ if (editable_root->isSelected())
+ {
+ // we will be moved properly by our parent, so skip
+ continue;
+ }
+ }
+
+ LLViewerObject* root_object = (object == NULL) ? NULL : object->getRootEdit();
+ if (object->permMove() && !object->isPermanentEnforced() &&
+ ((root_object == NULL) || !root_object->isPermanentEnforced()))
+ {
+ // handle attachments in local space
+ if (object->isAttachment() && object->mDrawable.notNull())
+ {
+ // calculate local version of relative move
+ LLQuaternion objWorldRotation = object->mDrawable->mXform.getParent()->getWorldRotation();
+ objWorldRotation.transQuat();
+
+ LLVector3 old_position_local = object->getPosition();
+ LLVector3 new_position_local = selectNode->mSavedPositionLocal + (clamped_relative_move_f * objWorldRotation);
+
+ //RN: I forget, but we need to do this because of snapping which doesn't often result
+ // in position changes even when the mouse moves
+ object->setPosition(new_position_local);
+ rebuild(object);
+ gAgentAvatarp->clampAttachmentPositions();
+ new_position_local = object->getPosition();
+
+ if (selectNode->mIndividualSelection)
+ {
+ // counter-translate child objects if we are moving the root as an individual
+ object->resetChildrenPosition(old_position_local - new_position_local, TRUE);
+ }
+ }
+ else
+ {
+ // compute new position to send to simulators, but don't set it yet.
+ // We need the old position to know which simulator to send the move message to.
+ LLVector3d new_position_global = selectNode->mSavedPositionGlobal + clamped_relative_move;
+
+ // Don't let object centers go too far underground
+ F64 min_height = LLWorld::getInstance()->getMinAllowedZ(object, object->getPositionGlobal());
+ if (new_position_global.mdV[VZ] < min_height)
+ {
+ new_position_global.mdV[VZ] = min_height;
+ }
+
+ // For safety, cap heights where objects can be dragged
+ if (new_position_global.mdV[VZ] > MAX_OBJECT_Z)
+ {
+ new_position_global.mdV[VZ] = MAX_OBJECT_Z;
+ }
+
+ // Grass is always drawn on the ground, so clamp its position to the ground
+ if (object->getPCode() == LL_PCODE_LEGACY_GRASS)
+ {
+ new_position_global.mdV[VZ] = LLWorld::getInstance()->resolveLandHeightGlobal(new_position_global) + 1.f;
+ }
+
+ if (object->isRootEdit())
+ {
+ new_position_global = LLWorld::getInstance()->clipToVisibleRegions(object->getPositionGlobal(), new_position_global);
+ }
+
+ // PR: Only update if changed
+ LLVector3 old_position_agent = object->getPositionAgent();
+ LLVector3 new_position_agent = gAgent.getPosAgentFromGlobal(new_position_global);
+ if (object->isRootEdit())
+ {
+ // finally, move parent object after children have calculated new offsets
+ object->setPositionAgent(new_position_agent);
+ rebuild(object);
+ }
+ else
+ {
+ LLViewerObject* root_object = object->getRootEdit();
+ new_position_agent -= root_object->getPositionAgent();
+ new_position_agent = new_position_agent * ~root_object->getRotation();
+ object->setPositionParent(new_position_agent, FALSE);
+ rebuild(object);
+ }
+
+ if (selectNode->mIndividualSelection)
+ {
+ // counter-translate child objects if we are moving the root as an individual
+ object->resetChildrenPosition(old_position_agent - new_position_agent, TRUE);
+ }
+ }
+ selectNode->mLastPositionLocal = object->getPosition();
+ }
+ }
+ }
- if (selectNode->mIndividualSelection)
- {
- // counter-translate child objects if we are moving the root as an individual
- object->resetChildrenPosition(old_position_agent - new_position_agent, TRUE) ;
- }
- }
- selectNode->mLastPositionLocal = object->getPosition();
- }
- }
LLSelectMgr::getInstance()->updateSelectionCenter();
gAgentCamera.clearFocusObject();
@@ -770,7 +781,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (active)" << LL_ENDL;
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
- return TRUE;
+ return true;
}
void LLManipTranslate::highlightManipulators(S32 x, S32 y)
@@ -846,9 +857,9 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y)
S32 num_arrow_manips = numManips;
// planar manipulators
- BOOL planar_manip_yz_visible = FALSE;
- BOOL planar_manip_xz_visible = FALSE;
- BOOL planar_manip_xy_visible = FALSE;
+ bool planar_manip_yz_visible = false;
+ bool planar_manip_xz_visible = false;
+ bool planar_manip_xy_visible = false;
mManipulatorVertices[numManips] = LLVector4(0.f, mPlaneManipOffsetMeters * (1.f - PLANE_TICK_SIZE * 0.5f), mPlaneManipOffsetMeters * (1.f - PLANE_TICK_SIZE * 0.5f), 1.f);
mManipulatorVertices[numManips++].scaleVec(mPlaneManipPositions);
@@ -856,7 +867,7 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y)
mManipulatorVertices[numManips++].scaleVec(mPlaneManipPositions);
if (llabs(relative_camera_dir.mV[VX]) > MIN_PLANE_MANIP_DOT_PRODUCT)
{
- planar_manip_yz_visible = TRUE;
+ planar_manip_yz_visible = true;
}
mManipulatorVertices[numManips] = LLVector4(mPlaneManipOffsetMeters * (1.f - PLANE_TICK_SIZE * 0.5f), 0.f, mPlaneManipOffsetMeters * (1.f - PLANE_TICK_SIZE * 0.5f), 1.f);
@@ -865,7 +876,7 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y)
mManipulatorVertices[numManips++].scaleVec(mPlaneManipPositions);
if (llabs(relative_camera_dir.mV[VY]) > MIN_PLANE_MANIP_DOT_PRODUCT)
{
- planar_manip_xz_visible = TRUE;
+ planar_manip_xz_visible = true;
}
mManipulatorVertices[numManips] = LLVector4(mPlaneManipOffsetMeters * (1.f - PLANE_TICK_SIZE * 0.5f), mPlaneManipOffsetMeters * (1.f - PLANE_TICK_SIZE * 0.5f), 0.f, 1.f);
@@ -874,7 +885,7 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y)
mManipulatorVertices[numManips++].scaleVec(mPlaneManipPositions);
if (llabs(relative_camera_dir.mV[VZ]) > MIN_PLANE_MANIP_DOT_PRODUCT)
{
- planar_manip_xy_visible = TRUE;
+ planar_manip_xy_visible = true;
}
// Project up to 9 manipulators to screen space 2*X, 2*Y, 2*Z, 3*planes
@@ -1022,7 +1033,7 @@ F32 LLManipTranslate::getMinGridScale()
}
-BOOL LLManipTranslate::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLManipTranslate::handleMouseUp(S32 x, S32 y, MASK mask)
{
// first, perform normal processing in case this was a quick-click
handleHover(x, y, mask);
@@ -1031,12 +1042,12 @@ BOOL LLManipTranslate::handleMouseUp(S32 x, S32 y, MASK mask)
{
// make sure arrow colors go back to normal
mManipPart = LL_NO_PART;
- LLSelectMgr::getInstance()->enableSilhouette(TRUE);
+ LLSelectMgr::getInstance()->enableSilhouette(true);
// Might have missed last update due to UPDATE_DELAY timing.
LLSelectMgr::getInstance()->sendMultipleUpdate( UPD_POSITION );
- mInSnapRegime = FALSE;
+ mInSnapRegime = false;
LLSelectMgr::getInstance()->saveSelectedObjectTransform(SELECT_ACTION_TYPE_PICK);
//gAgent.setObjectTracking(gSavedSettings.getBOOL("TrackFocusObject"));
}
@@ -1088,7 +1099,7 @@ void LLManipTranslate::renderSnapGuides()
return;
}
- LLSelectNode *first_node = mObjectSelection->getFirstMoveableNode(TRUE);
+ LLSelectNode *first_node = mObjectSelection->getFirstMoveableNode(true);
if (!first_node)
{
return;
@@ -1562,13 +1573,13 @@ void LLManipTranslate::renderSnapGuides()
switch (mManipPart)
{
case LL_YZ_PLANE:
- renderGuidelines(FALSE, TRUE, TRUE);
+ renderGuidelines(false, true, true);
break;
case LL_XZ_PLANE:
- renderGuidelines(TRUE, FALSE, TRUE);
+ renderGuidelines(true, false, true);
break;
case LL_XY_PLANE:
- renderGuidelines(TRUE, TRUE, FALSE);
+ renderGuidelines(true, true, false);
break;
default:
break;
@@ -1672,8 +1683,8 @@ void LLManipTranslate::highlightIntersection(LLVector3 normal,
static LLStaticHashedString sClipPlane("clip_plane");
gClipProgram.uniform4fv(sClipPlane, 1, plane.v);
- BOOL particles = gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_PARTICLES);
- BOOL clouds = gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS);
+ bool particles = gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_PARTICLES);
+ bool clouds = gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS);
if (particles)
{
@@ -1689,14 +1700,14 @@ void LLManipTranslate::highlightIntersection(LLVector3 normal,
glCullFace(GL_FRONT);
for (U32 i = 0; i < num_types; i++)
{
- gPipeline.renderObjects(types[i], LLVertexBuffer::MAP_VERTEX, FALSE);
+ gPipeline.renderObjects(types[i], LLVertexBuffer::MAP_VERTEX, false);
}
//glStencilOp(GL_DECR, GL_DECR, GL_DECR);
glCullFace(GL_BACK);
for (U32 i = 0; i < num_types; i++)
{
- gPipeline.renderObjects(types[i], LLVertexBuffer::MAP_VERTEX, FALSE);
+ gPipeline.renderObjects(types[i], LLVertexBuffer::MAP_VERTEX, false);
}
if (particles)
@@ -1759,7 +1770,7 @@ void LLManipTranslate::renderText()
}
else
{
- const BOOL children_ok = TRUE;
+ const bool children_ok = true;
LLViewerObject* objectp = mObjectSelection->getFirstRootObject(children_ok);
if (objectp)
{
@@ -1813,7 +1824,7 @@ void LLManipTranslate::renderTranslationHandles()
mPlaneManipPositions.mV[VZ] = -1.f;
}
- LLViewerObject *first_object = mObjectSelection->getFirstMoveableObject(TRUE);
+ LLViewerObject *first_object = mObjectSelection->getFirstMoveableObject(true);
if (!first_object) return;
LLVector3 selection_center = getPivotPoint();
@@ -2168,7 +2179,7 @@ void LLManipTranslate::renderTranslationHandles()
(face >= 3) ? -mConeSize : mConeSize,
(face >= 3) ? -mArrowLengthMeters : mArrowLengthMeters,
mConeSize,
- FALSE);
+ false);
}
}
}
@@ -2176,7 +2187,7 @@ void LLManipTranslate::renderTranslationHandles()
}
-void LLManipTranslate::renderArrow(S32 which_arrow, S32 selected_arrow, F32 box_size, F32 arrow_size, F32 handle_size, BOOL reverse_direction)
+void LLManipTranslate::renderArrow(S32 which_arrow, S32 selected_arrow, F32 box_size, F32 arrow_size, F32 handle_size, bool reverse_direction)
{
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
LLGLEnable gls_blend(GL_BLEND);
@@ -2278,9 +2289,9 @@ void LLManipTranslate::renderGridVert(F32 x_trans, F32 y_trans, F32 r, F32 g, F3
}
// virtual
-BOOL LLManipTranslate::canAffectSelection()
+bool LLManipTranslate::canAffectSelection()
{
- BOOL can_move = mObjectSelection->getObjectCount() != 0;
+ bool can_move = mObjectSelection->getObjectCount() != 0;
if (can_move)
{
struct f : public LLSelectedObjectFunctor
diff --git a/indra/newview/llmaniptranslate.h b/indra/newview/llmaniptranslate.h
index 3c37bbd698..c4c4669635 100644
--- a/indra/newview/llmaniptranslate.h
+++ b/indra/newview/llmaniptranslate.h
@@ -53,15 +53,15 @@ public:
static U32 getGridTexName() ;
static void destroyGL();
static void restoreGL();
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- virtual BOOL handleHover(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask);
+ virtual bool handleHover(S32 x, S32 y, MASK mask);
virtual void render();
virtual void handleSelect();
virtual void highlightManipulators(S32 x, S32 y);
- virtual BOOL handleMouseDownOnPart(S32 x, S32 y, MASK mask);
- virtual BOOL canAffectSelection();
+ virtual bool handleMouseDownOnPart(S32 x, S32 y, MASK mask);
+ virtual bool canAffectSelection();
protected:
enum EHandleType {
@@ -70,7 +70,7 @@ protected:
HANDLE_SPHERE
};
- void renderArrow(S32 which_arrow, S32 selected_arrow, F32 box_size, F32 arrow_size, F32 handle_size, BOOL reverse_direction);
+ void renderArrow(S32 which_arrow, S32 selected_arrow, F32 box_size, F32 arrow_size, F32 handle_size, bool reverse_direction);
void renderTranslationHandles();
void renderText();
void renderSnapGuides();
@@ -85,8 +85,8 @@ protected:
private:
S32 mLastHoverMouseX;
S32 mLastHoverMouseY;
- BOOL mMouseOutsideSlop; // true after mouse goes outside slop region
- BOOL mCopyMadeThisDrag;
+ bool mMouseOutsideSlop; // true after mouse goes outside slop region
+ bool mCopyMadeThisDrag;
S32 mMouseDownX;
S32 mMouseDownY;
F32 mAxisArrowLength; // pixels
@@ -105,7 +105,7 @@ private:
LLVector3 mGridOrigin;
LLVector3 mGridScale;
F32 mSubdivisions;
- BOOL mInSnapRegime;
+ bool mInSnapRegime;
LLVector3 mArrowScales;
LLVector3 mPlaneScales;
LLVector4 mPlaneManipPositions;
diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp
index d27ee941a6..1f29058474 100644
--- a/indra/newview/llmarketplacefunctions.cpp
+++ b/indra/newview/llmarketplacefunctions.cpp
@@ -42,8 +42,6 @@
#include "llviewermedia.h"
#include "llviewernetwork.h"
#include "llviewerregion.h"
-#include "json/reader.h" // JSON
-#include "json/writer.h" // JSON
#include "lleventcoro.h"
#include "llcoros.h"
#include "llcorehttputil.h"
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index b7828db3a9..0dbd3e2df2 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -104,17 +104,17 @@ LLFloaterComboOptions::~LLFloaterComboOptions()
}
-BOOL LLFloaterComboOptions::postBuild()
+bool LLFloaterComboOptions::postBuild()
{
- mConfirmButton = getChild<LLButton>("combo_ok", TRUE);
- mCancelButton = getChild<LLButton>("combo_cancel", TRUE);
- mComboOptions = getChild<LLComboBox>("combo_options", TRUE);
- mComboText = getChild<LLTextBox>("combo_text", TRUE);
+ mConfirmButton = getChild<LLButton>("combo_ok", true);
+ mCancelButton = getChild<LLButton>("combo_cancel", true);
+ mComboOptions = getChild<LLComboBox>("combo_options", true);
+ mComboText = getChild<LLTextBox>("combo_text", true);
mConfirmButton->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& param) {onConfirm(); });
mCancelButton->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& param) {onCancel(); });
- return TRUE;
+ return true;
}
LLFloaterComboOptions* LLFloaterComboOptions::showUI(
@@ -140,7 +140,7 @@ LLFloaterComboOptions* LLFloaterComboOptions::showUI(
combo_picker->mComboOptions->selectFirstItem();
combo_picker->openFloater(LLSD(title));
- combo_picker->setFocus(TRUE);
+ combo_picker->setFocus(true);
combo_picker->center();
}
return combo_picker;
@@ -421,7 +421,7 @@ void LLMaterialEditor::setAuxItem(const LLInventoryItem* item)
}
}
-BOOL LLMaterialEditor::postBuild()
+bool LLMaterialEditor::postBuild()
{
// if this is a 'live editor' instance, it is also
// single instance and uses live overrides
@@ -482,18 +482,17 @@ BOOL LLMaterialEditor::postBuild()
if (mIsOverride)
{
- childSetVisible("base_color_upload_fee", FALSE);
- childSetVisible("metallic_upload_fee", FALSE);
- childSetVisible("emissive_upload_fee", FALSE);
- childSetVisible("normal_upload_fee", FALSE);
+ childSetVisible("base_color_upload_fee", false);
+ childSetVisible("metallic_upload_fee", false);
+ childSetVisible("emissive_upload_fee", false);
+ childSetVisible("normal_upload_fee", false);
}
else
{
- S32 upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
- getChild<LLUICtrl>("base_color_upload_fee")->setTextArg("[FEE]", llformat("%d", upload_cost));
- getChild<LLUICtrl>("metallic_upload_fee")->setTextArg("[FEE]", llformat("%d", upload_cost));
- getChild<LLUICtrl>("emissive_upload_fee")->setTextArg("[FEE]", llformat("%d", upload_cost));
- getChild<LLUICtrl>("normal_upload_fee")->setTextArg("[FEE]", llformat("%d", upload_cost));
+ getChild<LLUICtrl>("base_color_upload_fee")->setTextArg("[FEE]", llformat("%d", LLAgentBenefitsMgr::current().getTextureUploadCost(mBaseColorFetched)));
+ getChild<LLUICtrl>("metallic_upload_fee")->setTextArg("[FEE]", llformat("%d", LLAgentBenefitsMgr::current().getTextureUploadCost(mMetallicRoughnessFetched)));
+ getChild<LLUICtrl>("emissive_upload_fee")->setTextArg("[FEE]", llformat("%d", LLAgentBenefitsMgr::current().getTextureUploadCost(mEmissiveFetched)));
+ getChild<LLUICtrl>("normal_upload_fee")->setTextArg("[FEE]", llformat("%d", LLAgentBenefitsMgr::current().getTextureUploadCost(mNormalFetched)));
}
boost::function<void(LLUICtrl*, void*)> changes_callback = [this](LLUICtrl * ctrl, void* userData)
@@ -619,7 +618,7 @@ void LLMaterialEditor::setBaseColorId(const LLUUID& id)
{
mBaseColorTextureCtrl->setValue(id);
mBaseColorTextureCtrl->setDefaultImageAssetID(id);
- mBaseColorTextureCtrl->setTentative(FALSE);
+ mBaseColorTextureCtrl->setTentative(false);
}
void LLMaterialEditor::setBaseColorUploadId(const LLUUID& id)
@@ -695,7 +694,7 @@ void LLMaterialEditor::setMetallicRoughnessId(const LLUUID& id)
{
mMetallicTextureCtrl->setValue(id);
mMetallicTextureCtrl->setDefaultImageAssetID(id);
- mMetallicTextureCtrl->setTentative(FALSE);
+ mMetallicTextureCtrl->setTentative(false);
}
void LLMaterialEditor::setMetallicRoughnessUploadId(const LLUUID& id)
@@ -739,7 +738,7 @@ void LLMaterialEditor::setEmissiveId(const LLUUID& id)
{
mEmissiveTextureCtrl->setValue(id);
mEmissiveTextureCtrl->setDefaultImageAssetID(id);
- mEmissiveTextureCtrl->setTentative(FALSE);
+ mEmissiveTextureCtrl->setTentative(false);
}
void LLMaterialEditor::setEmissiveUploadId(const LLUUID& id)
@@ -773,7 +772,7 @@ void LLMaterialEditor::setNormalId(const LLUUID& id)
{
mNormalTextureCtrl->setValue(id);
mNormalTextureCtrl->setDefaultImageAssetID(id);
- mNormalTextureCtrl->setTentative(FALSE);
+ mNormalTextureCtrl->setTentative(false);
}
void LLMaterialEditor::setNormalUploadId(const LLUUID& id)
@@ -842,25 +841,24 @@ void LLMaterialEditor::markChangesUnsaved(U32 dirty_flag)
setCanSave(false);
}
- S32 upload_texture_count = 0;
- if (mBaseColorTextureUploadId.notNull() && mBaseColorTextureUploadId == getBaseColorId())
+ mExpectedUploadCost = 0;
+ if (mBaseColorTextureUploadId.notNull() && mBaseColorTextureUploadId == getBaseColorId() && mBaseColorFetched)
{
- upload_texture_count++;
+ mExpectedUploadCost += LLAgentBenefitsMgr::current().getTextureUploadCost(mBaseColorFetched);
}
- if (mMetallicTextureUploadId.notNull() && mMetallicTextureUploadId == getMetallicRoughnessId())
+ if (mMetallicTextureUploadId.notNull() && mMetallicTextureUploadId == getMetallicRoughnessId() && mMetallicRoughnessFetched)
{
- upload_texture_count++;
+ mExpectedUploadCost += LLAgentBenefitsMgr::current().getTextureUploadCost(mMetallicRoughnessFetched);
}
- if (mEmissiveTextureUploadId.notNull() && mEmissiveTextureUploadId == getEmissiveId())
+ if (mEmissiveTextureUploadId.notNull() && mEmissiveTextureUploadId == getEmissiveId() && mEmissiveFetched)
{
- upload_texture_count++;
+ mExpectedUploadCost += LLAgentBenefitsMgr::current().getTextureUploadCost(mEmissiveFetched);
}
- if (mNormalTextureUploadId.notNull() && mNormalTextureUploadId == getNormalId())
+ if (mNormalTextureUploadId.notNull() && mNormalTextureUploadId == getNormalId() && mNormalFetched)
{
- upload_texture_count++;
+ mExpectedUploadCost += LLAgentBenefitsMgr::current().getTextureUploadCost(mNormalFetched);
}
- mExpectedUploadCost = upload_texture_count * LLAgentBenefitsMgr::current().getTextureUploadCost();
getChild<LLUICtrl>("total_upload_fee")->setTextArg("[FEE]", llformat("%d", mExpectedUploadCost));
}
@@ -1870,7 +1868,7 @@ static void pack_textures(
if (normal_img)
{
// create a losslessly compressed version of the normal map
- normal_j2c = LLViewerTextureList::convertToUploadFile(normal_img, 1024, false, true);
+ normal_j2c = LLViewerTextureList::convertToUploadFile(normal_img, 2048, false, true);
LL_DEBUGS("MaterialEditor") << "Normal: " << normal_j2c->getDataSize() << LL_ENDL;
}
@@ -2039,7 +2037,7 @@ void LLMaterialEditor::loadLive()
}
me->openFloater();
- me->setFocus(TRUE);
+ me->setFocus(true);
}
}
@@ -2124,7 +2122,7 @@ bool can_use_objects_material(LLSelectedTEGetMatData& func, const std::vector<Pe
// Look for the item to base permissions off of
item_out = nullptr;
- const bool blank_material = func.mMaterialId == LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
+ const bool blank_material = func.mMaterialId == BLANK_MATERIAL_ASSET_ID;
if (!blank_material)
{
LLAssetIDMatchesWithPerms item_has_perms(func.mMaterialId, ops);
@@ -2533,7 +2531,7 @@ void LLMaterialEditor::loadMaterial(const tinygltf::Model &model_in, const std::
if (open_floater)
{
openFloater(getKey());
- setFocus(TRUE);
+ setFocus(true);
setCanSave(true);
setCanSaveAs(true);
@@ -3371,7 +3369,7 @@ void LLMaterialEditor::loadAsset()
LLAssetType::AT_MATERIAL,
&onLoadComplete,
(void*)user_data,
- TRUE);
+ true);
}
}
}
@@ -3403,7 +3401,7 @@ void LLMaterialEditor::loadAsset()
{
/*editor->setText(LLStringUtil::null);
editor->makePristine();
- editor->setEnabled(TRUE);*/
+ editor->setEnabled(true);*/
// Don't set asset status here; we may not have set the item id yet
// (e.g. when this gets called initially)
//mAssetStatus = PREVIEW_ASSET_LOADED;
@@ -3435,8 +3433,8 @@ void LLMaterialEditor::onLoadComplete(const LLUUID& asset_uuid,
editor->decodeAsset(buffer);
- BOOL allow_modify = editor->canModify(editor->mObjectUUID, editor->getItem());
- BOOL source_library = editor->mObjectUUID.isNull() && gInventory.isObjectDescendentOf(editor->mItemUUID, gInventory.getLibraryRootFolderID());
+ bool allow_modify = editor->canModify(editor->mObjectUUID, editor->getItem());
+ bool source_library = editor->mObjectUUID.isNull() && gInventory.isObjectDescendentOf(editor->mItemUUID, gInventory.getLibraryRootFolderID());
editor->setEnableEditing(allow_modify && !source_library);
editor->resetUnsavedChanges();
editor->mAssetStatus = PREVIEW_ASSET_LOADED;
@@ -3484,6 +3482,8 @@ void LLMaterialEditor::inventoryChanged(LLViewerObject* object,
void LLMaterialEditor::saveTexture(LLImageJ2C* img, const std::string& name, const LLUUID& asset_id, upload_callback_f cb)
{
+ LLImageDataSharedLock lock(img);
+
if (asset_id.isNull()
|| img == nullptr
|| img->getDataSize() == 0)
@@ -3495,8 +3495,7 @@ void LLMaterialEditor::saveTexture(LLImageJ2C* img, const std::string& name, con
std::string buffer;
buffer.assign((const char*) img->getData(), img->getDataSize());
- U32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
-
+ U32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(img);
LLSD key = getKey();
std::function<bool(LLUUID itemId, LLSD response, std::string reason)> failed_upload([key](LLUUID assetId, LLSD response, std::string reason)
{
diff --git a/indra/newview/llmaterialeditor.h b/indra/newview/llmaterialeditor.h
index 4e0350b4cc..782b47bcc0 100644
--- a/indra/newview/llmaterialeditor.h
+++ b/indra/newview/llmaterialeditor.h
@@ -55,7 +55,7 @@ public:
LLFloaterComboOptions();
virtual ~LLFloaterComboOptions();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
static LLFloaterComboOptions* showUI(
combo_callback callback,
@@ -164,7 +164,7 @@ class LLMaterialEditor : public LLPreview, public LLVOInventoryListener
void setAuxItem(const LLInventoryItem* item) override;
// llpanel
- BOOL postBuild() override;
+ bool postBuild() override;
void onClickCloseBtn(bool app_quitting = false) override;
void onClose(bool app_quitting) override;
diff --git a/indra/newview/llmaterialmgr.h b/indra/newview/llmaterialmgr.h
index 6e574219ae..c8a4e006c8 100644
--- a/indra/newview/llmaterialmgr.h
+++ b/indra/newview/llmaterialmgr.h
@@ -102,7 +102,7 @@ private:
const LLMaterialMgr::TEMaterialPair& lhs,
const LLMaterialMgr::TEMaterialPair& rhs)
{
- return (lhs.te < rhs.te) ? TRUE :
+ return (lhs.te < rhs.te) ? true :
(lhs.materialID < rhs.materialID);
}
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 36ac1bdf97..72fbab406b 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -63,7 +63,7 @@
#include "llfloaterwebcontent.h"
#include "llwindowshade.h"
-extern BOOL gRestoreGL;
+extern bool gRestoreGL;
static LLDefaultChildRegistry::Register<LLMediaCtrl> r("web_browser");
@@ -166,7 +166,7 @@ LLMediaCtrl::~LLMediaCtrl()
////////////////////////////////////////////////////////////////////////////////
//
-void LLMediaCtrl::setBorderVisible( BOOL border_visible )
+void LLMediaCtrl::setBorderVisible( bool border_visible )
{
if ( mBorder )
{
@@ -183,9 +183,9 @@ void LLMediaCtrl::setTakeFocusOnClick( bool take_focus )
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLMediaCtrl::handleHover( S32 x, S32 y, MASK mask )
+bool LLMediaCtrl::handleHover( S32 x, S32 y, MASK mask )
{
- if (LLPanel::handleHover(x, y, mask)) return TRUE;
+ if (LLPanel::handleHover(x, y, mask)) return true;
convertInputCoords(x, y);
if (mMediaSource)
@@ -201,40 +201,40 @@ BOOL LLMediaCtrl::handleHover( S32 x, S32 y, MASK mask )
handleToolTip(x, y, mask);
}
- return TRUE;
+ return true;
}
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLMediaCtrl::handleScrollWheel( S32 x, S32 y, S32 clicks )
+bool LLMediaCtrl::handleScrollWheel( S32 x, S32 y, S32 clicks )
{
- if (LLPanel::handleScrollWheel(x, y, clicks)) return TRUE;
+ if (LLPanel::handleScrollWheel(x, y, clicks)) return true;
if (mMediaSource && mMediaSource->hasMedia())
{
convertInputCoords(x, y);
- mMediaSource->scrollWheel(x, y, 0, clicks, gKeyboard->currentMask(TRUE));
+ mMediaSource->scrollWheel(x, y, 0, clicks, gKeyboard->currentMask(true));
}
- return TRUE;
+ return true;
}
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLMediaCtrl::handleScrollHWheel(S32 x, S32 y, S32 clicks)
+bool LLMediaCtrl::handleScrollHWheel(S32 x, S32 y, S32 clicks)
{
- if (LLPanel::handleScrollHWheel(x, y, clicks)) return TRUE;
+ if (LLPanel::handleScrollHWheel(x, y, clicks)) return true;
if (mMediaSource && mMediaSource->hasMedia())
{
convertInputCoords(x, y);
- mMediaSource->scrollWheel(x, y, clicks, 0, gKeyboard->currentMask(TRUE));
+ mMediaSource->scrollWheel(x, y, clicks, 0, gKeyboard->currentMask(true));
}
- return TRUE;
+ return true;
}
////////////////////////////////////////////////////////////////////////////////
// virtual
-BOOL LLMediaCtrl::handleToolTip(S32 x, S32 y, MASK mask)
+bool LLMediaCtrl::handleToolTip(S32 x, S32 y, MASK mask)
{
std::string hover_text;
@@ -243,7 +243,7 @@ BOOL LLMediaCtrl::handleToolTip(S32 x, S32 y, MASK mask)
if(hover_text.empty())
{
- return FALSE;
+ return false;
}
else
{
@@ -258,14 +258,14 @@ BOOL LLMediaCtrl::handleToolTip(S32 x, S32 y, MASK mask)
.sticky_rect(sticky_rect_screen));
}
- return TRUE;
+ return true;
}
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLMediaCtrl::handleMouseUp( S32 x, S32 y, MASK mask )
+bool LLMediaCtrl::handleMouseUp( S32 x, S32 y, MASK mask )
{
- if (LLPanel::handleMouseUp(x, y, mask)) return TRUE;
+ if (LLPanel::handleMouseUp(x, y, mask)) return true;
convertInputCoords(x, y);
if (mMediaSource)
@@ -275,14 +275,14 @@ BOOL LLMediaCtrl::handleMouseUp( S32 x, S32 y, MASK mask )
gFocusMgr.setMouseCapture( NULL );
- return TRUE;
+ return true;
}
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLMediaCtrl::handleMouseDown( S32 x, S32 y, MASK mask )
+bool LLMediaCtrl::handleMouseDown( S32 x, S32 y, MASK mask )
{
- if (LLPanel::handleMouseDown(x, y, mask)) return TRUE;
+ if (LLPanel::handleMouseDown(x, y, mask)) return true;
convertInputCoords(x, y);
if (mMediaSource)
@@ -292,17 +292,17 @@ BOOL LLMediaCtrl::handleMouseDown( S32 x, S32 y, MASK mask )
if (mTakeFocusOnClick)
{
- setFocus( TRUE );
+ setFocus( true );
}
- return TRUE;
+ return true;
}
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLMediaCtrl::handleRightMouseUp( S32 x, S32 y, MASK mask )
+bool LLMediaCtrl::handleRightMouseUp( S32 x, S32 y, MASK mask )
{
- if (LLPanel::handleRightMouseUp(x, y, mask)) return TRUE;
+ if (LLPanel::handleRightMouseUp(x, y, mask)) return true;
convertInputCoords(x, y);
if (mMediaSource)
@@ -320,14 +320,14 @@ BOOL LLMediaCtrl::handleRightMouseUp( S32 x, S32 y, MASK mask )
gFocusMgr.setMouseCapture( NULL );
- return TRUE;
+ return true;
}
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask )
+bool LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask )
{
- if (LLPanel::handleRightMouseDown(x, y, mask)) return TRUE;
+ if (LLPanel::handleRightMouseDown(x, y, mask)) return true;
S32 media_x = x, media_y = y;
convertInputCoords(media_x, media_y);
@@ -339,7 +339,7 @@ BOOL LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask )
if (mTakeFocusOnClick)
{
- setFocus( TRUE );
+ setFocus( true );
}
auto menu = mContextMenuHandle.get();
@@ -371,14 +371,14 @@ BOOL LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask )
LLMenuGL::showPopup(this, menu, x, y);
}
- return TRUE;
+ return true;
}
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLMediaCtrl::handleDoubleClick( S32 x, S32 y, MASK mask )
+bool LLMediaCtrl::handleDoubleClick( S32 x, S32 y, MASK mask )
{
- if (LLPanel::handleDoubleClick(x, y, mask)) return TRUE;
+ if (LLPanel::handleDoubleClick(x, y, mask)) return true;
convertInputCoords(x, y);
if (mMediaSource)
@@ -388,10 +388,10 @@ BOOL LLMediaCtrl::handleDoubleClick( S32 x, S32 y, MASK mask )
if (mTakeFocusOnClick)
{
- setFocus( TRUE );
+ setFocus( true );
}
- return TRUE;
+ return true;
}
////////////////////////////////////////////////////////////////////////////////
@@ -431,11 +431,11 @@ void LLMediaCtrl::onFocusLost()
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLMediaCtrl::postBuild ()
+bool LLMediaCtrl::postBuild ()
{
setVisibleCallback(boost::bind(&LLMediaCtrl::onVisibilityChanged, this, _2));
- return TRUE;
+ return true;
}
void LLMediaCtrl::onOpenWebInspector()
@@ -446,9 +446,9 @@ void LLMediaCtrl::onOpenWebInspector()
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLMediaCtrl::handleKeyHere( KEY key, MASK mask )
+bool LLMediaCtrl::handleKeyHere( KEY key, MASK mask )
{
- BOOL result = FALSE;
+ bool result = false;
if (mMediaSource)
{
@@ -463,9 +463,9 @@ BOOL LLMediaCtrl::handleKeyHere( KEY key, MASK mask )
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLMediaCtrl::handleKeyUpHere(KEY key, MASK mask)
+bool LLMediaCtrl::handleKeyUpHere(KEY key, MASK mask)
{
- BOOL result = FALSE;
+ bool result = false;
if (mMediaSource)
{
@@ -480,7 +480,7 @@ BOOL LLMediaCtrl::handleKeyUpHere(KEY key, MASK mask)
////////////////////////////////////////////////////////////////////////////////
//
-void LLMediaCtrl::onVisibilityChange ( BOOL new_visibility )
+void LLMediaCtrl::onVisibilityChange ( bool new_visibility )
{
LL_INFOS() << "visibility changed to " << (new_visibility?"true":"false") << LL_ENDL;
if(mMediaSource)
@@ -491,9 +491,9 @@ void LLMediaCtrl::onVisibilityChange ( BOOL new_visibility )
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLMediaCtrl::handleUnicodeCharHere(llwchar uni_char)
+bool LLMediaCtrl::handleUnicodeCharHere(llwchar uni_char)
{
- BOOL result = FALSE;
+ bool result = false;
if (mMediaSource)
{
@@ -523,7 +523,7 @@ void LLMediaCtrl::onVisibilityChanged ( const LLSD& new_visibility )
////////////////////////////////////////////////////////////////////////////////
//
-void LLMediaCtrl::reshape( S32 width, S32 height, BOOL called_from_parent )
+void LLMediaCtrl::reshape( S32 width, S32 height, bool called_from_parent )
{
if(!getDecoupleTextureSize())
{
@@ -633,7 +633,7 @@ void LLMediaCtrl::navigateTo( std::string url_in, std::string mime_type, bool cl
void LLMediaCtrl::navigateToLocalPage( const std::string& subdir, const std::string& filename_in )
{
std::string filename(gDirUtilp->add(subdir, filename_in));
- std::string expanded_filename = gDirUtilp->findSkinnedFilename("html", filename);
+ std::string expanded_filename = gDirUtilp->findSkinnedFilename(LLDir::HTML, filename);
if (expanded_filename.empty())
{
@@ -782,7 +782,7 @@ void LLMediaCtrl::draw()
if ( gRestoreGL == 1 || mUpdateScrolls)
{
LLRect r = getRect();
- reshape( r.getWidth(), r.getHeight(), FALSE );
+ reshape( r.getWidth(), r.getHeight(), false );
mUpdateScrolls = false;
return;
}
@@ -990,7 +990,7 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
{
LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_SIZE_CHANGED " << LL_ENDL;
LLRect r = getRect();
- reshape( r.getWidth(), r.getHeight(), FALSE );
+ reshape( r.getWidth(), r.getHeight(), false );
};
break;
diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h
index 487c654adc..73c970dcc1 100644
--- a/indra/newview/llmediactrl.h
+++ b/indra/newview/llmediactrl.h
@@ -77,7 +77,7 @@ protected:
public:
virtual ~LLMediaCtrl();
- void setBorderVisible( BOOL border_visible );
+ void setBorderVisible( bool border_visible );
// For the tutorial window, we don't want to take focus on clicks,
// as the examples include how to move around with the arrow
@@ -86,15 +86,15 @@ public:
void setTakeFocusOnClick( bool take_focus );
// handle mouse related methods
- virtual BOOL handleHover( S32 x, S32 y, MASK mask );
- virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask );
- virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask );
- virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
- virtual BOOL handleRightMouseUp(S32 x, S32 y, MASK mask);
- virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask );
- virtual BOOL handleScrollWheel( S32 x, S32 y, S32 clicks );
- virtual BOOL handleScrollHWheel( S32 x, S32 y, S32 clicks );
- virtual BOOL handleToolTip(S32 x, S32 y, MASK mask);
+ virtual bool handleHover( S32 x, S32 y, MASK mask );
+ virtual bool handleMouseUp( S32 x, S32 y, MASK mask );
+ virtual bool handleMouseDown( S32 x, S32 y, MASK mask );
+ virtual bool handleRightMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleRightMouseUp(S32 x, S32 y, MASK mask);
+ virtual bool handleDoubleClick( S32 x, S32 y, MASK mask );
+ virtual bool handleScrollWheel( S32 x, S32 y, S32 clicks );
+ virtual bool handleScrollHWheel( S32 x, S32 y, S32 clicks );
+ virtual bool handleToolTip(S32 x, S32 y, MASK mask);
// navigation
void navigateTo( std::string url_in, std::string mime_type = "", bool clean_browser = false);
@@ -154,13 +154,13 @@ public:
void setAllowFileDownload(bool allow) { mAllowFileDownload = allow; }
// over-rides
- virtual BOOL handleKeyHere( KEY key, MASK mask);
- virtual BOOL handleKeyUpHere(KEY key, MASK mask);
- virtual void onVisibilityChange ( BOOL new_visibility );
- virtual BOOL handleUnicodeCharHere(llwchar uni_char);
- virtual void reshape( S32 width, S32 height, BOOL called_from_parent = TRUE);
+ virtual bool handleKeyHere( KEY key, MASK mask);
+ virtual bool handleKeyUpHere(KEY key, MASK mask);
+ virtual void onVisibilityChange ( bool new_visibility );
+ virtual bool handleUnicodeCharHere(llwchar uni_char);
+ virtual void reshape( S32 width, S32 height, bool called_from_parent = true);
virtual void draw();
- virtual BOOL postBuild();
+ virtual bool postBuild();
// focus overrides
void onFocusLost();
@@ -178,7 +178,7 @@ public:
virtual bool wantsKeyUpKeyDown() const;
virtual bool wantsReturnKey() const;
- virtual BOOL acceptsTextInput() const {return TRUE;}
+ virtual bool acceptsTextInput() const { return true; }
protected:
void convertInputCoords(S32& x, S32& y);
diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp
index d3b981e205..77c1927e61 100644
--- a/indra/newview/llmediadataclient.cpp
+++ b/indra/newview/llmediadataclient.cpp
@@ -418,9 +418,9 @@ LLMediaDataClient::QueueTimer::QueueTimer(F32 time, LLMediaDataClient *mdc)
}
// virtual
-BOOL LLMediaDataClient::QueueTimer::tick()
+bool LLMediaDataClient::QueueTimer::tick()
{
- BOOL result = TRUE;
+ bool result = true;
if (!mMDC.isNull())
{
@@ -451,7 +451,7 @@ LLMediaDataClient::RetryTimer::RetryTimer(F32 time, Request::ptr_t request)
}
// virtual
-BOOL LLMediaDataClient::RetryTimer::tick()
+bool LLMediaDataClient::RetryTimer::tick()
{
mRequest->stopTracking();
@@ -469,7 +469,7 @@ BOOL LLMediaDataClient::RetryTimer::tick()
mRequest.reset();
// Don't fire again
- return TRUE;
+ return true;
}
diff --git a/indra/newview/llmediadataclient.h b/indra/newview/llmediadataclient.h
index 8cd4793106..8c4b3cff90 100644
--- a/indra/newview/llmediadataclient.h
+++ b/indra/newview/llmediadataclient.h
@@ -219,7 +219,7 @@ protected:
{
public:
RetryTimer(F32 time, Request::ptr_t);
- virtual BOOL tick();
+ virtual bool tick();
private:
// back-pointer
Request::ptr_t mRequest;
@@ -286,7 +286,7 @@ private:
{
public:
QueueTimer(F32 time, LLMediaDataClient *mdc);
- virtual BOOL tick();
+ virtual bool tick();
private:
// back-pointer
LLPointer<LLMediaDataClient> mMDC;
diff --git a/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp b/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp
index 0663dd41ee..3753533f02 100644
--- a/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp
+++ b/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp
@@ -161,7 +161,7 @@ void LLMenuOptionPathfindingRebakeNavmesh::setMode(ERebakeNavMeshMode pRebakeNav
mRebakeNavMeshMode = pRebakeNavMeshMode;
}
-void LLMenuOptionPathfindingRebakeNavmesh::handleAgentState(BOOL pCanRebakeRegion)
+void LLMenuOptionPathfindingRebakeNavmesh::handleAgentState(bool pCanRebakeRegion)
{
llassert(mIsInitialized);
mCanRebakeRegion = pCanRebakeRegion;
@@ -221,7 +221,7 @@ void LLMenuOptionPathfindingRebakeNavmesh::handleRegionBoundaryCrossed()
if (mIsInitialized)
{
createNavMeshStatusListenerForCurrentRegion();
- mCanRebakeRegion = FALSE;
+ mCanRebakeRegion = false;
LLPathfindingManager::getInstance()->requestGetAgentState();
}
}
diff --git a/indra/newview/llmenuoptionpathfindingrebakenavmesh.h b/indra/newview/llmenuoptionpathfindingrebakenavmesh.h
index 649a387dd3..70ecbb4661 100644
--- a/indra/newview/llmenuoptionpathfindingrebakenavmesh.h
+++ b/indra/newview/llmenuoptionpathfindingrebakenavmesh.h
@@ -65,7 +65,7 @@ protected:
private:
void setMode(ERebakeNavMeshMode pRebakeNavMeshMode);
- void handleAgentState(BOOL pCanRebakeRegion);
+ void handleAgentState(bool pCanRebakeRegion);
void handleRebakeNavMeshResponse(bool pResponseStatus);
void handleNavMeshStatus(const LLPathfindingNavMeshStatus &pNavMeshStatus);
void handleRegionBoundaryCrossed();
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index a5601dafbe..20274888df 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -2293,8 +2293,8 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
mUploadSkin,
mUploadJoints,
mLockScaleIfJointPosition,
- FALSE,
- FALSE,
+ false,
+ false,
data.mBaseModel->mSubmodelID);
data.mAssetData = ostr.str();
@@ -2360,17 +2360,19 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
std::stringstream texture_str;
if (texture != NULL && include_textures && mUploadTextures)
{
- if(texture->hasSavedRawImage())
- {
+ if (texture->hasSavedRawImage())
+ {
+ LLImageDataLock lock(texture->getSavedRawImage());
+
LLPointer<LLImageJ2C> upload_file =
LLViewerTextureList::convertToUploadFile(texture->getSavedRawImage());
if (!upload_file.isNull() && upload_file->getDataSize())
{
- texture_str.write((const char*) upload_file->getData(), upload_file->getDataSize());
+ texture_str.write((const char*) upload_file->getData(), upload_file->getDataSize());
+ }
}
}
- }
if (texture != NULL &&
mUploadTextures &&
@@ -2448,8 +2450,8 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
mUploadSkin,
mUploadJoints,
mLockScaleIfJointPosition,
- FALSE,
- FALSE,
+ false,
+ false,
data.mBaseModel->mSubmodelID);
data.mAssetData = ostr.str();
@@ -2514,17 +2516,19 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
std::stringstream texture_str;
if (texture != NULL && include_textures && mUploadTextures)
{
- if(texture->hasSavedRawImage())
- {
+ if (texture->hasSavedRawImage())
+ {
+ LLImageDataLock lock(texture->getSavedRawImage());
+
LLPointer<LLImageJ2C> upload_file =
LLViewerTextureList::convertToUploadFile(texture->getSavedRawImage());
if (!upload_file.isNull() && upload_file->getDataSize())
{
- texture_str.write((const char*) upload_file->getData(), upload_file->getDataSize());
+ texture_str.write((const char*) upload_file->getData(), upload_file->getDataSize());
+ }
}
}
- }
if (texture != NULL &&
mUploadTextures &&
@@ -4378,7 +4382,7 @@ void LLMeshUploadThread::decomposeMeshMatrix(LLMatrix4& transformation,
LLVector3& result_scale)
{
// check for reflection
- BOOL reflected = (transformation.determinant() < 0);
+ bool reflected = (transformation.determinant() < 0);
// compute position
LLVector3 position = LLVector3(0, 0, 0) * transformation;
@@ -5493,7 +5497,7 @@ void on_new_single_inventory_upload_complete(
// Show the preview panel for textures and sounds to let
// user know that the image (or snapshot) arrived intact.
- LLInventoryPanel* panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
+ LLInventoryPanel* panel = LLInventoryPanel::getActiveInventoryPanel(false);
if (panel)
{
diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h
index 89cd2d867f..cd719f66a6 100644
--- a/indra/newview/llmeshrepository.h
+++ b/indra/newview/llmeshrepository.h
@@ -539,7 +539,7 @@ private:
LLHandle<LLWholeModelFeeObserver> mFeeObserverHandle;
LLHandle<LLWholeModelUploadObserver> mUploadObserverHandle;
- bool mDoUpload; // if FALSE only model data will be requested, otherwise the model will be uploaded
+ bool mDoUpload; // if false only model data will be requested, otherwise the model will be uploaded
LLSD mModelData;
// llcorehttp library interface objects.
diff --git a/indra/newview/llmimetypes.cpp b/indra/newview/llmimetypes.cpp
index 790a184068..d374263c49 100644
--- a/indra/newview/llmimetypes.cpp
+++ b/indra/newview/llmimetypes.cpp
@@ -131,15 +131,15 @@ bool LLMIMETypes::parseMIMETypes(const std::string& xml_filename)
}
if (child->hasName("allow_resize"))
{
- BOOL allow_resize = FALSE;
+ bool allow_resize = false;
child->getBoolValue( 1, &allow_resize );
- info.mAllowResize = (bool)allow_resize;
+ info.mAllowResize = allow_resize;
}
if (child->hasName("allow_looping"))
{
- BOOL allow_looping = FALSE;
+ bool allow_looping = false;
child->getBoolValue( 1, &allow_looping );
- info.mAllowLooping = (bool)allow_looping;
+ info.mAllowLooping = allow_looping;
}
}
sWidgetMap[set_name] = info;
diff --git a/indra/newview/llmimetypes.h b/indra/newview/llmimetypes.h
index ab629fd965..be0bdd810b 100644
--- a/indra/newview/llmimetypes.h
+++ b/indra/newview/llmimetypes.h
@@ -105,10 +105,10 @@ public:
std::string mPlayTip;
// custom tool tip to display for Play button
- BOOL mAllowResize;
+ bool mAllowResize;
// enable/disable media size edit fields
- BOOL mAllowLooping;
+ bool mAllowLooping;
// enable/disable media looping checkbox
};
typedef std::map< std::string, LLMIMEInfo > mime_info_map_t;
diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp
index a3eab3c26d..f6ec455ae1 100644
--- a/indra/newview/llmodelpreview.cpp
+++ b/indra/newview/llmodelpreview.cpp
@@ -93,7 +93,7 @@ const F32 SKIN_WEIGHT_CAMERA_DISTANCE = 16.f;
LLViewerFetchedTexture* bindMaterialDiffuseTexture(const LLImportMaterial& material)
{
- LLViewerFetchedTexture *texture = LLViewerTextureManager::getFetchedTexture(material.getDiffuseMap(), FTT_DEFAULT, TRUE, LLGLTexture::BOOST_PREVIEW);
+ LLViewerFetchedTexture *texture = LLViewerTextureManager::getFetchedTexture(material.getDiffuseMap(), FTT_DEFAULT, true, LLGLTexture::BOOST_PREVIEW);
if (texture)
{
@@ -159,7 +159,7 @@ void FindModel(LLModelLoader::scene& scene, const std::string& name_to_match, LL
//-----------------------------------------------------------------------------
LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp)
- : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE), LLMutex()
+ : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, false), LLMutex()
, mLodsQuery()
, mLodsWithParsingError()
, mPelvisZOffset(0.0f)
@@ -173,7 +173,7 @@ LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp)
, mHasDegenerate(false)
, mImporterDebug(LLCachedControl<bool>(gSavedSettings, "ImporterDebug", false))
{
- mNeedsUpdate = TRUE;
+ mNeedsUpdate = true;
mCameraDistance = 0.f;
mCameraYaw = 0.f;
mCameraPitch = 0.f;
@@ -298,7 +298,7 @@ void LLModelPreview::rebuildUploadData()
F32 max_scale = 0.f;
- BOOL legacyMatching = gSavedSettings.getBOOL("ImporterLegacyMatching");
+ bool legacyMatching = gSavedSettings.getBOOL("ImporterLegacyMatching");
U32 load_state = 0;
for (LLModelLoader::scene::iterator iter = mBaseScene.begin(); iter != mBaseScene.end(); ++iter)
@@ -667,7 +667,7 @@ void LLModelPreview::saveUploadData(const std::string& filename,
save_skinweights,
save_joint_positions,
lock_scale_if_joint_position,
- FALSE, TRUE, instance.mModel->mSubmodelID);
+ false, true, instance.mModel->mSubmodelID);
data["mesh"][instance.mModel->mLocalID] = str.str();
}
@@ -1092,18 +1092,18 @@ void LLModelPreview::loadModelCallback(S32 loaded_lod)
FindModel(mScene[loaded_lod], DEFAULT_PHYSICS_MESH_NAME + getLodSuffix(loaded_lod), mDefaultPhysicsShapeP, ignored_transform);
mWarnOfUnmatchedPhyicsMeshes = true;
}
- BOOL legacyMatching = gSavedSettings.getBOOL("ImporterLegacyMatching");
+ bool legacyMatching = gSavedSettings.getBOOL("ImporterLegacyMatching");
if (!legacyMatching)
{
if (!mBaseModel.empty())
{
- BOOL name_based = FALSE;
- BOOL has_submodels = FALSE;
+ bool name_based = false;
+ bool has_submodels = false;
for (U32 idx = 0; idx < mBaseModel.size(); ++idx)
{
if (mBaseModel[idx]->mSubmodelID)
{ // don't do index-based renaming when the base model has submodels
- has_submodels = TRUE;
+ has_submodels = true;
if (mImporterDebug)
{
std::ostringstream out;
@@ -1124,12 +1124,12 @@ void LLModelPreview::loadModelCallback(S32 loaded_lod)
FindModel(mBaseScene, loaded_name, found_model, transform);
if (found_model)
{ // don't rename correctly named models (even if they are placed in a wrong order)
- name_based = TRUE;
+ name_based = true;
}
if (mModel[loaded_lod][idx]->mSubmodelID)
{ // don't rename the models when loaded LOD model has submodels
- has_submodels = TRUE;
+ has_submodels = true;
}
}
@@ -2343,7 +2343,7 @@ void LLModelPreview::updateStatusMessages()
//warn if hulls have more than 256 points in them
- BOOL physExceededVertexLimit = FALSE;
+ bool physExceededVertexLimit = false;
for (U32 i = 0; mModelNoErrors && i < mModel[LLModel::LOD_PHYSICS].size(); ++i)
{
LLModel* mdl = mModel[LLModel::LOD_PHYSICS][i];
@@ -2354,7 +2354,7 @@ void LLModelPreview::updateStatusMessages()
{
if (mdl->mPhysics.mHull[j].size() > 256)
{
- physExceededVertexLimit = TRUE;
+ physExceededVertexLimit = true;
LL_INFOS() << "Physical model " << mdl->mLabel << " exceeds vertex per hull limitations." << LL_ENDL;
break;
}
@@ -3070,8 +3070,8 @@ U32 LLModelPreview::loadTextures(LLImportMaterial& material, void* opaque)
material.mOpaqueData = new LLPointer< LLViewerFetchedTexture >;
LLPointer< LLViewerFetchedTexture >& tex = (*reinterpret_cast< LLPointer< LLViewerFetchedTexture > * >(material.mOpaqueData));
- tex = LLViewerTextureManager::getFetchedTextureFromUrl("file://" + LLURI::unescape(material.mDiffuseMapFilename), FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_PREVIEW);
- tex->setLoadedCallback(LLModelPreview::textureLoadedCallback, 0, TRUE, FALSE, opaque, NULL, FALSE);
+ tex = LLViewerTextureManager::getFetchedTextureFromUrl("file://" + LLURI::unescape(material.mDiffuseMapFilename), FTT_LOCAL_FILE, true, LLGLTexture::BOOST_PREVIEW);
+ tex->setLoadedCallback(LLModelPreview::textureLoadedCallback, 0, true, false, opaque, NULL, false);
tex->forceToSaveRawImage(0, F32_MAX);
material.setDiffuseMap(tex->getID()); // record tex ID
return 1;
@@ -3123,12 +3123,12 @@ void LLModelPreview::addEmptyFace(LLModel* pTarget)
//-----------------------------------------------------------------------------
// Todo: we shouldn't be setting all those UI elements on render.
// Note: Render happens each frame with skinned avatars
-BOOL LLModelPreview::render()
+bool LLModelPreview::render()
{
assert_main_thread();
LLMutexLock lock(this);
- mNeedsUpdate = FALSE;
+ mNeedsUpdate = false;
bool edges = mViewOption["show_edges"];
bool joint_overrides = mViewOption["show_joint_overrides"];
@@ -3338,7 +3338,7 @@ BOOL LLModelPreview::render()
z_near = llclamp(z_far * 0.001f, 0.001f, 0.1f);
- LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, width, height, FALSE, z_near, z_far);
+ LLViewerCamera::getInstance()->setPerspective(false, mOrigin.mX, mOrigin.mY, width, height, false, z_near, z_far);
stop_glerror();
@@ -3367,7 +3367,7 @@ BOOL LLModelPreview::render()
else
{
LL_INFOS() << "Vertex Buffer[" << mPreviewLOD << "]" << " is EMPTY!!!" << LL_ENDL;
- regen = TRUE;
+ regen = true;
}
}
@@ -3811,7 +3811,7 @@ BOOL LLModelPreview::render()
gGL.popMatrix();
- return TRUE;
+ return true;
}
void LLModelPreview::renderGroundPlane(float z_offset)
@@ -3841,7 +3841,7 @@ void LLModelPreview::renderGroundPlane(float z_offset)
//-----------------------------------------------------------------------------
void LLModelPreview::refresh()
{
- mNeedsUpdate = TRUE;
+ mNeedsUpdate = true;
}
//-----------------------------------------------------------------------------
@@ -3910,12 +3910,12 @@ void LLModelPreview::setPreviewLOD(S32 lod)
//static
void LLModelPreview::textureLoadedCallback(
- BOOL success,
+ bool success,
LLViewerFetchedTexture *src_vi,
LLImageRaw* src,
LLImageRaw* src_aux,
S32 discard_level,
- BOOL final,
+ bool final,
void* userdata)
{
LLModelPreview* preview = (LLModelPreview*)userdata;
diff --git a/indra/newview/llmodelpreview.h b/indra/newview/llmodelpreview.h
index d4d5d087bd..c4876ba8c4 100644
--- a/indra/newview/llmodelpreview.h
+++ b/indra/newview/llmodelpreview.h
@@ -147,7 +147,7 @@ public:
void setTexture(U32 name) { mTextureName = name; }
void setPhysicsFromLOD(S32 lod);
- BOOL render();
+ bool render();
void update();
void genBuffers(S32 lod, bool skinned);
void clearBuffers();
@@ -155,7 +155,7 @@ public:
void rotate(F32 yaw_radians, F32 pitch_radians);
void zoom(F32 zoom_amt);
void pan(F32 right, F32 up);
- virtual BOOL needsRender() { return mNeedsUpdate; }
+ virtual bool needsRender() { return mNeedsUpdate; }
void setPreviewLOD(S32 lod);
void clearModel(S32 lod);
void getJointAliases(JointMap& joint_map);
@@ -190,7 +190,7 @@ public:
U32 getLegacyRigFlags() const { return mLegacyRigFlags; }
void setLegacyRigFlags(U32 rigFlags) { mLegacyRigFlags = rigFlags; }
- static void textureLoadedCallback(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata);
+ static void textureLoadedCallback(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, bool final, void* userdata);
static bool lodQueryCallback();
boost::signals2::connection setDetailsCallback(const details_signal_t::slot_type& cb){ return mDetailsSignal.connect(cb); }
@@ -266,7 +266,7 @@ protected:
LLFloater* mFMP;
- BOOL mNeedsUpdate;
+ bool mNeedsUpdate;
bool mDirty;
bool mGenLOD;
U32 mTextureName;
diff --git a/indra/newview/llmorphview.cpp b/indra/newview/llmorphview.cpp
index ff86400a56..445af8ae5c 100644
--- a/indra/newview/llmorphview.cpp
+++ b/indra/newview/llmorphview.cpp
@@ -47,7 +47,7 @@
LLMorphView *gMorphView = NULL;
-const F32 MORPH_NEAR_CLIP = 0.1f;
+constexpr F32 MORPH_NEAR_CLIP = 0.1f;
//-----------------------------------------------------------------------------
// LLMorphView()
@@ -60,7 +60,7 @@ LLMorphView::LLMorphView(const LLMorphView::Params& p)
mOldCameraNearClip( 0.f ),
mCameraPitch( 0.f ),
mCameraYaw( 0.f ),
- mCameraDrivenByKeys( FALSE )
+ mCameraDrivenByKeys( false )
{}
//-----------------------------------------------------------------------------
@@ -103,7 +103,7 @@ void LLMorphView::shutdown()
//-----------------------------------------------------------------------------
// setVisible()
//-----------------------------------------------------------------------------
-void LLMorphView::setVisible(BOOL visible)
+void LLMorphView::setVisible(bool visible)
{
if( visible != getVisible() )
{
@@ -152,7 +152,7 @@ void LLMorphView::updateCamera()
gAgentCamera.setCameraPosAndFocusGlobal( camera_pos, target_pos, gAgent.getID() );
}
-void LLMorphView::setCameraDrivenByKeys(BOOL b)
+void LLMorphView::setCameraDrivenByKeys(bool b)
{
if( mCameraDrivenByKeys != b )
{
diff --git a/indra/newview/llmorphview.h b/indra/newview/llmorphview.h
index 318d49bba5..bd1fbf4f8c 100644
--- a/indra/newview/llmorphview.h
+++ b/indra/newview/llmorphview.h
@@ -49,7 +49,7 @@ public:
void shutdown();
// inherited methods
- /*virtual*/ void setVisible(BOOL visible);
+ void setVisible(bool visible) override;
void setCameraTargetJoint(LLJoint *joint) {mCameraTargetJoint = joint;}
LLJoint* getCameraTargetJoint() {return mCameraTargetJoint;}
@@ -58,7 +58,7 @@ public:
void setCameraTargetOffset(const LLVector3d& camera_target_offset) {mCameraTargetOffset = camera_target_offset;}
void updateCamera();
- void setCameraDrivenByKeys( BOOL b );
+ void setCameraDrivenByKeys( bool b );
protected:
void initialize();
@@ -75,7 +75,7 @@ protected:
F32 mCameraPitch;
F32 mCameraYaw;
- BOOL mCameraDrivenByKeys;
+ bool mCameraDrivenByKeys;
};
//
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 54409a6994..b64caf630e 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -80,7 +80,7 @@ LLFloaterMove::LLFloaterMove(const LLSD& key)
LLFloaterMove::~LLFloaterMove()
{
// Ensure LLPanelStandStopFlying panel is not among floater's children. See EXT-8458.
- setVisible(FALSE);
+ setVisible(false);
// Otherwise it can be destroyed and static pointer in LLPanelStandStopFlying::getInstance() will become invalid.
// Such situation was possible when LLFloaterReg returns "dead" instance of floater.
@@ -88,7 +88,7 @@ LLFloaterMove::~LLFloaterMove()
}
// virtual
-BOOL LLFloaterMove::postBuild()
+bool LLFloaterMove::postBuild()
{
updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730)
@@ -142,12 +142,12 @@ BOOL LLFloaterMove::postBuild()
gAgent.addParcelChangedCallback(LLFloaterMove::sUpdateFlyingStatus);
- return TRUE;
+ return true;
}
// *NOTE: we assume that setVisible() is called on floater close.
// virtual
-void LLFloaterMove::setVisible(BOOL visible)
+void LLFloaterMove::setVisible(bool visible)
{
// Do nothing with Stand/Stop Flying panel in excessive calls of this method.
if (getVisible() == visible)
@@ -190,7 +190,7 @@ F32 LLFloaterMove::getYawRate( F32 time )
// static
-void LLFloaterMove::setFlyingMode(BOOL fly)
+void LLFloaterMove::setFlyingMode(bool fly)
{
LLFloaterMove* instance = LLFloaterReg::findTypedInstance<LLFloaterMove>("moveview");
if (instance)
@@ -222,7 +222,7 @@ void LLFloaterMove::setAlwaysRunMode(bool run)
}
}
-void LLFloaterMove::setFlyingModeImpl(BOOL fly)
+void LLFloaterMove::setFlyingModeImpl(bool fly)
{
updateButtonsWithMovementMode(fly ? MM_FLY : (gAgent.getAlwaysRun() ? MM_RUN : MM_WALK));
}
@@ -236,7 +236,7 @@ void LLFloaterMove::setAlwaysRunModeImpl(bool run)
}
//static
-void LLFloaterMove::setSittingMode(BOOL bSitting)
+void LLFloaterMove::setSittingMode(bool bSitting)
{
if (bSitting)
{
@@ -310,7 +310,7 @@ void LLFloaterMove::setMovementMode(const EMovementMode mode)
}
else
{
- gAgent.setFlying(FALSE);
+ gAgent.setFlying(false);
}
// attempts to set avatar flying can not set it real flying in some cases.
@@ -451,7 +451,7 @@ void LLFloaterMove::sUpdateFlyingStatus()
}
-void LLFloaterMove::showModeButtons(BOOL bShow)
+void LLFloaterMove::showModeButtons(bool bShow)
{
if (mModeActionsPanel->getVisible() == bShow)
return;
@@ -466,7 +466,7 @@ void LLFloaterMove::enableInstance()
{
if (gAgent.getFlying())
{
- instance->showModeButtons(FALSE);
+ instance->showModeButtons(false);
}
else
{
@@ -479,14 +479,14 @@ void LLFloaterMove::onOpen(const LLSD& key)
{
if (gAgent.getFlying())
{
- setFlyingMode(TRUE);
- showModeButtons(FALSE);
+ setFlyingMode(true);
+ showModeButtons(false);
}
if (isAgentAvatarValid() && gAgentAvatarp->isSitting())
{
- setSittingMode(TRUE);
- showModeButtons(FALSE);
+ setSittingMode(true);
+ showModeButtons(false);
}
sUpdateFlyingStatus();
@@ -499,10 +499,10 @@ void LLFloaterMove::setModeButtonToggleState(const EMovementMode mode)
mode_control_button_map_t::const_iterator it = mModeControlButtonMap.begin();
for (; it != mModeControlButtonMap.end(); ++it)
{
- it->second->setToggleState(FALSE);
+ it->second->setToggleState(false);
}
- mModeControlButtonMap[mode]->setToggleState(TRUE);
+ mModeControlButtonMap[mode]->setToggleState(true);
}
@@ -542,7 +542,7 @@ void LLPanelStandStopFlying::setStandStopFlyingMode(EStandStopFlyingMode mode)
panel->mStopFlyingButton->setVisible(SSFM_STOP_FLYING == mode);
//visibility of it should be updated after updating visibility of the buttons
- panel->setVisible(TRUE);
+ panel->setVisible(true);
}
//static
@@ -551,10 +551,10 @@ void LLPanelStandStopFlying::clearStandStopFlyingMode(EStandStopFlyingMode mode)
LLPanelStandStopFlying* panel = getInstance();
switch(mode) {
case SSFM_STAND:
- panel->mStandButton->setVisible(FALSE);
+ panel->mStandButton->setVisible(false);
break;
case SSFM_STOP_FLYING:
- panel->mStopFlyingButton->setVisible(FALSE);
+ panel->mStopFlyingButton->setVisible(false);
break;
default:
LL_ERRS() << "Unexpected EStandStopFlyingMode is passed: " << mode << LL_ENDL;
@@ -562,26 +562,26 @@ void LLPanelStandStopFlying::clearStandStopFlyingMode(EStandStopFlyingMode mode)
}
-BOOL LLPanelStandStopFlying::postBuild()
+bool LLPanelStandStopFlying::postBuild()
{
mStandButton = getChild<LLButton>("stand_btn");
mStandButton->setCommitCallback(boost::bind(&LLPanelStandStopFlying::onStandButtonClick, this));
mStandButton->setCommitCallback(boost::bind(&LLFloaterMove::enableInstance));
- mStandButton->setVisible(FALSE);
+ mStandButton->setVisible(false);
LLHints::getInstance()->registerHintTarget("stand_btn", mStandButton->getHandle());
mStopFlyingButton = getChild<LLButton>("stop_fly_btn");
- //mStopFlyingButton->setCommitCallback(boost::bind(&LLFloaterMove::setFlyingMode, FALSE));
+ //mStopFlyingButton->setCommitCallback(boost::bind(&LLFloaterMove::setFlyingMode, false));
mStopFlyingButton->setCommitCallback(boost::bind(&LLPanelStandStopFlying::onStopFlyingButtonClick, this));
- mStopFlyingButton->setVisible(FALSE);
+ mStopFlyingButton->setVisible(false);
gViewerWindow->setOnWorldViewRectUpdated(boost::bind(&LLPanelStandStopFlying::updatePosition, this));
- return TRUE;
+ return true;
}
//virtual
-void LLPanelStandStopFlying::setVisible(BOOL visible)
+void LLPanelStandStopFlying::setVisible(bool visible)
{
//we dont need to show the panel if these buttons are not activated
if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) visible = false;
@@ -603,7 +603,7 @@ void LLPanelStandStopFlying::setVisible(BOOL visible)
LLPanel::setVisible(visible);
}
-BOOL LLPanelStandStopFlying::handleToolTip(S32 x, S32 y, MASK mask)
+bool LLPanelStandStopFlying::handleToolTip(S32 x, S32 y, MASK mask)
{
LLToolTipMgr::instance().unblockToolTips();
@@ -671,7 +671,7 @@ LLPanelStandStopFlying* LLPanelStandStopFlying::getStandStopFlyingPanel()
LLPanelStandStopFlying* panel = new LLPanelStandStopFlying();
panel->buildFromFile("panel_stand_stop_flying.xml");
- panel->setVisible(FALSE);
+ panel->setVisible(false);
//LLUI::getInstance()->getRootView()->addChild(panel);
LL_INFOS() << "Build LLPanelStandStopFlying panel" << LL_ENDL;
@@ -687,14 +687,14 @@ void LLPanelStandStopFlying::onStandButtonClick()
LLSelectMgr::getInstance()->deselectAllForStandingUp();
gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
- setFocus(FALSE);
+ setFocus(false);
}
void LLPanelStandStopFlying::onStopFlyingButtonClick()
{
- gAgent.setFlying(FALSE);
+ gAgent.setFlying(false);
- setFocus(FALSE); // EXT-482
+ setFocus(false); // EXT-482
}
/**
diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h
index e8b9a6fdb2..f58596842d 100644
--- a/indra/newview/llmoveview.h
+++ b/indra/newview/llmoveview.h
@@ -48,14 +48,14 @@ private:
~LLFloaterMove();
public:
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void setVisible(BOOL visible);
+ /*virtual*/ bool postBuild();
+ /*virtual*/ void setVisible(bool visible);
static F32 getYawRate(F32 time);
- static void setFlyingMode(BOOL fly);
- void setFlyingModeImpl(BOOL fly);
+ static void setFlyingMode(bool fly);
+ void setFlyingModeImpl(bool fly);
static void setAlwaysRunMode(bool run);
void setAlwaysRunModeImpl(bool run);
- static void setSittingMode(BOOL bSitting);
+ static void setSittingMode(bool bSitting);
static void enableInstance();
/*virtual*/ void onOpen(const LLSD& key);
@@ -86,7 +86,7 @@ private:
void initModeButtonMap();
void setModeButtonToggleState(const EMovementMode mode);
void updateButtonsWithMovementMode(const EMovementMode newMode);
- void showModeButtons(BOOL bShow);
+ void showModeButtons(bool bShow);
public:
@@ -141,13 +141,13 @@ public:
static LLPanelStandStopFlying* getInstance();
static void setStandStopFlyingMode(EStandStopFlyingMode mode);
static void clearStandStopFlyingMode(EStandStopFlyingMode mode);
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void setVisible(BOOL visible);
+ /*virtual*/ bool postBuild();
+ /*virtual*/ void setVisible(bool visible);
// *HACK: due to hard enough to have this control aligned with "Move" button while resizing
// let update its position in each frame
/*virtual*/ void draw(){updatePosition(); LLPanel::draw();}
- /*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleToolTip(S32 x, S32 y, MASK mask);
protected:
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp
index a7a7ed1b70..f5646b09c5 100644
--- a/indra/newview/llmutelist.cpp
+++ b/indra/newview/llmutelist.cpp
@@ -154,7 +154,7 @@ std::string LLMute::getDisplayType() const
// LLMuteList()
//-----------------------------------------------------------------------------
LLMuteList::LLMuteList() :
- mIsLoaded(FALSE)
+ mIsLoaded(false)
{
gGenericDispatcher.addHandler("emptymutelist", &sDispatchEmptyMuteList);
@@ -227,7 +227,7 @@ static LLVOAvatar* find_avatar(const LLUUID& id)
}
}
-BOOL LLMuteList::add(const LLMute& mute, U32 flags)
+bool LLMuteList::add(const LLMute& mute, U32 flags)
{
// Can't mute text from Lindens
if ((mute.mType == LLMute::AGENT)
@@ -235,7 +235,7 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags)
{
LL_WARNS() << "Trying to mute a Linden; ignored" << LL_ENDL;
LLNotifications::instance().add("MuteLinden", LLSD(), LLSD());
- return FALSE;
+ return false;
}
// Can't mute self.
@@ -243,7 +243,7 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags)
&& mute.mID == gAgent.getID())
{
LL_WARNS() << "Trying to self; ignored" << LL_ENDL;
- return FALSE;
+ return false;
}
static LLCachedControl<S32> mute_list_limit(gSavedSettings, "MuteListLimit", 1000);
@@ -253,7 +253,7 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags)
LLSD args;
args["MUTE_LIMIT"] = mute_list_limit;
LLNotifications::instance().add(LLNotification::Params("MuteLimitReached").substitutions(args));
- return FALSE;
+ return false;
}
if (mute.mType == LLMute::BY_NAME)
@@ -262,14 +262,14 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags)
if (mute.mName.empty())
{
LL_WARNS() << "Trying to mute empty string by-name" << LL_ENDL;
- return FALSE;
+ return false;
}
// Null mutes must have uuid null
if (mute.mID.notNull())
{
LL_WARNS() << "Trying to add by-name mute with non-null id" << LL_ENDL;
- return FALSE;
+ return false;
}
std::pair<string_set_t::iterator, bool> result = mLegacyMutes.insert(mute.mName);
@@ -279,13 +279,13 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags)
updateAdd(mute);
notifyObservers();
notifyObserversDetailed(mute);
- return TRUE;
+ return true;
}
else
{
LL_INFOS() << "duplicate mute ignored" << LL_ENDL;
// was duplicate
- return FALSE;
+ return false;
}
}
else
@@ -341,13 +341,13 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags)
{
LLNotifications::instance().cancelByOwner(localmute.mID);
}
- return TRUE;
+ return true;
}
}
}
// If we were going to return success, we'd have done it by now.
- return FALSE;
+ return false;
}
void LLMuteList::updateAdd(const LLMute& mute)
@@ -375,13 +375,13 @@ void LLMuteList::updateAdd(const LLMute& mute)
{
LL_WARNS() << "Added elements to non-initialized block list" << LL_ENDL;
}
- mIsLoaded = TRUE; // why is this here? -MG
+ mIsLoaded = true; // why is this here? -MG
}
-BOOL LLMuteList::remove(const LLMute& mute, U32 flags)
+bool LLMuteList::remove(const LLMute& mute, U32 flags)
{
- BOOL found = FALSE;
+ bool found = false;
// First, remove from main list.
mute_set_t::iterator it = mMutes.find(mute);
@@ -505,14 +505,14 @@ void notify_automute_callback(const LLUUID& agent_id, const LLAvatarName& full_n
}
-BOOL LLMuteList::autoRemove(const LLUUID& agent_id, const EAutoReason reason)
+bool LLMuteList::autoRemove(const LLUUID& agent_id, const EAutoReason reason)
{
- BOOL removed = FALSE;
+ bool removed = false;
if (isMuted(agent_id))
{
LLMute automute(agent_id, LLStringUtil::null, LLMute::AGENT);
- removed = TRUE;
+ removed = true;
remove(automute);
LLAvatarName av_name;
@@ -559,19 +559,19 @@ std::vector<LLMute> LLMuteList::getMutes() const
//-----------------------------------------------------------------------------
// loadFromFile()
//-----------------------------------------------------------------------------
-BOOL LLMuteList::loadFromFile(const std::string& filename)
+bool LLMuteList::loadFromFile(const std::string& filename)
{
if(!filename.size())
{
LL_WARNS() << "Mute List Filename is Empty!" << LL_ENDL;
- return FALSE;
+ return false;
}
LLFILE* fp = LLFile::fopen(filename, "rb"); /*Flawfinder: ignore*/
if (!fp)
{
LL_WARNS() << "Couldn't open mute list " << filename << LL_ENDL;
- return FALSE;
+ return false;
}
// *NOTE: Changing the size of these buffers will require changes
@@ -616,25 +616,25 @@ BOOL LLMuteList::loadFromFile(const std::string& filename)
}
mPendingAgentNameUpdates.clear();
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// saveToFile()
//-----------------------------------------------------------------------------
-BOOL LLMuteList::saveToFile(const std::string& filename)
+bool LLMuteList::saveToFile(const std::string& filename)
{
if(!filename.size())
{
LL_WARNS() << "Mute List Filename is Empty!" << LL_ENDL;
- return FALSE;
+ return false;
}
LLFILE* fp = LLFile::fopen(filename, "wb"); /*Flawfinder: ignore*/
if (!fp)
{
LL_WARNS() << "Couldn't open mute list " << filename << LL_ENDL;
- return FALSE;
+ return false;
}
// legacy mutes have null uuid
std::string id_string;
@@ -659,11 +659,11 @@ BOOL LLMuteList::saveToFile(const std::string& filename)
}
}
fclose(fp);
- return TRUE;
+ return true;
}
-BOOL LLMuteList::isMuted(const LLUUID& id, const std::string& name, U32 flags) const
+bool LLMuteList::isMuted(const LLUUID& id, const std::string& name, U32 flags) const
{
// for objects, check for muting on their parent prim
LLViewerObject* mute_object = get_object_to_mute_from_id(id);
@@ -677,21 +677,21 @@ BOOL LLMuteList::isMuted(const LLUUID& id, const std::string& name, U32 flags) c
// If any of the flags the caller passed are set, this item isn't considered muted for this caller.
if(flags & mute_it->mFlags)
{
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
// empty names can't be legacy-muted
bool avatar = mute_object && mute_object->isAvatar();
- if (name.empty() || avatar) return FALSE;
+ if (name.empty() || avatar) return false;
// Look in legacy pile
string_set_t::const_iterator legacy_it = mLegacyMutes.find(name);
return legacy_it != mLegacyMutes.end();
}
-BOOL LLMuteList::isMuted(const std::string& username, U32 flags) const
+bool LLMuteList::isMuted(const std::string& username, U32 flags) const
{
mute_set_t::const_iterator mute_iter = mMutes.begin();
while(mute_iter != mMutes.end())
@@ -700,11 +700,11 @@ BOOL LLMuteList::isMuted(const std::string& username, U32 flags) const
if (mute_iter->mType == LLMute::AGENT
&& LLCacheName::buildUsername(mute_iter->mName) == username)
{
- return TRUE;
+ return true;
}
mute_iter++;
}
- return FALSE;
+ return false;
}
//-----------------------------------------------------------------------------
@@ -739,7 +739,7 @@ void LLMuteList::requestFromServer(const LLUUID& agent_id)
}
// Double amount of retries due to this request happening during busy stage
// Ideally this should be turned into a capability
- gMessageSystem->sendReliable(gAgent.getRegionHost(), LL_DEFAULT_RELIABLE_RETRIES * 2, TRUE, LL_PING_BASED_TIMEOUT_DUMMY, NULL, NULL);
+ gMessageSystem->sendReliable(gAgent.getRegionHost(), LL_DEFAULT_RELIABLE_RETRIES * 2, true, LL_PING_BASED_TIMEOUT_DUMMY, NULL, NULL);
}
//-----------------------------------------------------------------------------
@@ -782,7 +782,7 @@ void LLMuteList::processMuteListUpdate(LLMessageSystem* msg, void**)
filename,
LL_PATH_CACHE,
msg->getSender(),
- TRUE, // make the remote file temporary.
+ true, // make the remote file temporary.
onFileMuteList,
(void**)local_filename_and_path,
LLXferManager::HIGH_PRIORITY);
@@ -866,7 +866,7 @@ void LLMuteList::removeObserver(LLMuteListObserver* observer)
void LLMuteList::setLoaded()
{
- mIsLoaded = TRUE;
+ mIsLoaded = true;
notifyObservers();
}
diff --git a/indra/newview/llmutelist.h b/indra/newview/llmutelist.h
index dda407e708..2798bd78ba 100644
--- a/indra/newview/llmutelist.h
+++ b/indra/newview/llmutelist.h
@@ -89,25 +89,25 @@ public:
void removeObserver(LLMuteListObserver* observer);
// Add either a normal or a BY_NAME mute, for any or all properties.
- BOOL add(const LLMute& mute, U32 flags = 0);
+ bool add(const LLMute& mute, U32 flags = 0);
// Remove both normal and legacy mutes, for any or all properties.
- BOOL remove(const LLMute& mute, U32 flags = 0);
- BOOL autoRemove(const LLUUID& agent_id, const EAutoReason reason);
+ bool remove(const LLMute& mute, U32 flags = 0);
+ bool autoRemove(const LLUUID& agent_id, const EAutoReason reason);
// Name is required to test against legacy text-only mutes.
- BOOL isMuted(const LLUUID& id, const std::string& name = LLStringUtil::null, U32 flags = 0) const;
+ bool isMuted(const LLUUID& id, const std::string& name = LLStringUtil::null, U32 flags = 0) const;
// Workaround for username-based mute search, a lot of string conversions so use cautiously
// Expects lower case username
- BOOL isMuted(const std::string& username, U32 flags = 0) const;
+ bool isMuted(const std::string& username, U32 flags = 0) const;
// Alternate (convenience) form for places we don't need to pass the name, but do need flags
- BOOL isMuted(const LLUUID& id, U32 flags) const { return isMuted(id, LLStringUtil::null, flags); };
+ bool isMuted(const LLUUID& id, U32 flags) const { return isMuted(id, LLStringUtil::null, flags); };
static bool isLinden(const std::string& name);
- BOOL isLoaded() const { return mIsLoaded; }
+ bool isLoaded() const { return mIsLoaded; }
std::vector<LLMute> getMutes() const;
@@ -118,8 +118,8 @@ public:
void cache(const LLUUID& agent_id);
private:
- BOOL loadFromFile(const std::string& filename);
- BOOL saveToFile(const std::string& filename);
+ bool loadFromFile(const std::string& filename);
+ bool saveToFile(const std::string& filename);
void setLoaded();
void notifyObservers();
@@ -167,7 +167,7 @@ private:
typedef std::set<LLMuteListObserver*> observer_set_t;
observer_set_t mObservers;
- BOOL mIsLoaded;
+ bool mIsLoaded;
friend class LLDispatchEmptyMuteList;
};
diff --git a/indra/newview/llnamebox.cpp b/indra/newview/llnamebox.cpp
index 8d32fb1d5c..33eb20ae11 100644
--- a/indra/newview/llnamebox.cpp
+++ b/indra/newview/llnamebox.cpp
@@ -59,12 +59,12 @@ LLNameBox::~LLNameBox()
LLNameBox::sInstances.erase(this);
}
-void LLNameBox::setNameID(const LLUUID& name_id, BOOL is_group)
+void LLNameBox::setNameID(const LLUUID& name_id, bool is_group)
{
mNameID = name_id;
std::string name;
- BOOL got_name = FALSE;
+ bool got_name = false;
if (!is_group)
{
@@ -105,7 +105,7 @@ void LLNameBox::refreshAll(const LLUUID& id, const std::string& full_name, bool
}
}
-void LLNameBox::setName(const std::string& name, BOOL is_group)
+void LLNameBox::setName(const std::string& name, bool is_group)
{
if (mLink)
{
diff --git a/indra/newview/llnamebox.h b/indra/newview/llnamebox.h
index 76e8551268..a4ffe389ba 100644
--- a/indra/newview/llnamebox.h
+++ b/indra/newview/llnamebox.h
@@ -51,7 +51,7 @@ public:
virtual ~LLNameBox();
- void setNameID(const LLUUID& name_id, BOOL is_group);
+ void setNameID(const LLUUID& name_id, bool is_group);
void refresh(const LLUUID& id, const std::string& full_name, bool is_group);
@@ -62,13 +62,13 @@ protected:
friend class LLUICtrlFactory;
private:
- void setName(const std::string& name, BOOL is_group);
+ void setName(const std::string& name, bool is_group);
static std::set<LLNameBox*> sInstances;
private:
LLUUID mNameID;
- BOOL mLink;
+ bool mLink;
std::string mInitialValue;
};
diff --git a/indra/newview/llnameeditor.cpp b/indra/newview/llnameeditor.cpp
index 055754f270..93bdf2a715 100644
--- a/indra/newview/llnameeditor.cpp
+++ b/indra/newview/llnameeditor.cpp
@@ -58,7 +58,7 @@ LLNameEditor::~LLNameEditor()
LLNameEditor::sInstances.erase(this);
}
-void LLNameEditor::setNameID(const LLUUID& name_id, BOOL is_group)
+void LLNameEditor::setNameID(const LLUUID& name_id, bool is_group)
{
mNameID = name_id;
@@ -100,7 +100,7 @@ void LLNameEditor::refreshAll(const LLUUID& id, const std::string& full_name, bo
void LLNameEditor::setValue( const LLSD& value )
{
- setNameID(value.asUUID(), FALSE);
+ setNameID(value.asUUID(), false);
}
LLSD LLNameEditor::getValue() const
diff --git a/indra/newview/llnameeditor.h b/indra/newview/llnameeditor.h
index b8c4a6042e..d8bfcae105 100644
--- a/indra/newview/llnameeditor.h
+++ b/indra/newview/llnameeditor.h
@@ -57,7 +57,7 @@ protected:
public:
virtual ~LLNameEditor();
- void setNameID(const LLUUID& name_id, BOOL is_group);
+ void setNameID(const LLUUID& name_id, bool is_group);
void refresh(const LLUUID& id, const std::string& full_name, bool is_group);
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp
index d7d6fa1893..a76e267ac8 100644
--- a/indra/newview/llnamelistctrl.cpp
+++ b/indra/newview/llnamelistctrl.cpp
@@ -45,7 +45,7 @@
static LLDefaultChildRegistry::Register<LLNameListCtrl> r("name_list");
-static const S32 info_icon_size = 16;
+static constexpr S32 info_icon_size = 16;
void LLNameListCtrl::NameTypeNames::declareValues()
{
@@ -74,7 +74,7 @@ LLNameListCtrl::LLNameListCtrl(const LLNameListCtrl::Params& p)
// public
LLScrollListItem* LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPosition pos,
- BOOL enabled, const std::string& suffix, const std::string& prefix)
+ bool enabled, const std::string& suffix, const std::string& prefix)
{
//LL_INFOS() << "LLNameListCtrl::addNameItem " << agent_id << LL_ENDL;
@@ -87,19 +87,19 @@ LLScrollListItem* LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPositi
}
// virtual, public
-BOOL LLNameListCtrl::handleDragAndDrop(
+bool LLNameListCtrl::handleDragAndDrop(
S32 x, S32 y, MASK mask,
- BOOL drop,
+ bool drop,
EDragAndDropType cargo_type, void *cargo_data,
EAcceptance *accept,
std::string& tooltip_msg)
{
if (!mAllowCallingCardDrop)
{
- return FALSE;
+ return false;
}
- BOOL handled = FALSE;
+ bool handled = false;
if (cargo_type == DAD_CALLINGCARD)
{
@@ -128,7 +128,7 @@ BOOL LLNameListCtrl::handleDragAndDrop(
}
}
- handled = TRUE;
+ handled = true;
LL_DEBUGS("UserInput") << "dragAndDrop handled by LLNameListCtrl " << getName() << LL_ENDL;
return handled;
@@ -216,9 +216,9 @@ void LLNameListCtrl::mouseOverHighlightNthItem( S32 target_index )
}
//virtual
-BOOL LLNameListCtrl::handleToolTip(S32 x, S32 y, MASK mask)
+bool LLNameListCtrl::handleToolTip(S32 x, S32 y, MASK mask)
{
- BOOL handled = FALSE;
+ bool handled = false;
S32 column_index = getColumnIndexFromOffset(x);
LLNameListItem* hit_item = dynamic_cast<LLNameListItem*>(hitItem(x, y));
LLFloater* floater = gFloaterView->getParentFloater(this);
@@ -268,7 +268,7 @@ BOOL LLNameListCtrl::handleToolTip(S32 x, S32 y, MASK mask)
params.sticky_rect(sticky_rect);
LLToolTipMgr::getInstance()->show(params);
- handled = TRUE;
+ handled = true;
}
}
}
@@ -281,7 +281,7 @@ BOOL LLNameListCtrl::handleToolTip(S32 x, S32 y, MASK mask)
}
// virtual
-BOOL LLNameListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLNameListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
LLNameListItem* hit_item = dynamic_cast<LLNameListItem*>(hitItem(x, y));
LLFloater* floater = gFloaterView->getParentFloater(this);
@@ -291,7 +291,7 @@ BOOL LLNameListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
ContextMenuType prev_menu = getContextMenuType();
setContextMenu(MENU_GROUP);
- BOOL handled = LLScrollListCtrl::handleRightMouseDown(x, y, mask);
+ bool handled = LLScrollListCtrl::handleRightMouseDown(x, y, mask);
setContextMenu(prev_menu);
return handled;
}
@@ -301,7 +301,7 @@ BOOL LLNameListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
// public
void LLNameListCtrl::addGroupNameItem(const LLUUID& group_id, EAddPosition pos,
- BOOL enabled)
+ bool enabled)
{
NameItem item;
item.value = group_id;
@@ -438,7 +438,7 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow(
LLScrollListColumn* columnp = getColumn(mNameColumnIndex);
if (columnp && columnp->mHeader)
{
- columnp->mHeader->setHasResizableElement(TRUE);
+ columnp->mHeader->setHasResizableElement(true);
}
return item;
@@ -496,7 +496,7 @@ void LLNameListCtrl::selectItemBySpecialId(const LLUUID& special_id)
LLNameListItem* item = dynamic_cast<LLNameListItem*>(*it);
if (item && item->getSpecialID() == special_id)
{
- item->setSelected(TRUE);
+ item->setSelected(true);
break;
}
}
@@ -616,7 +616,7 @@ void LLNameListCtrl::updateColumns(bool force_update)
}
}
-void LLNameListCtrl::sortByName(BOOL ascending)
+void LLNameListCtrl::sortByName(bool ascending)
{
sortByColumnIndex(mNameColumnIndex,ascending);
}
diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h
index 4a4bd4ba09..46ed0aec4c 100644
--- a/indra/newview/llnamelistctrl.h
+++ b/indra/newview/llnamelistctrl.h
@@ -144,7 +144,7 @@ public:
// Add a user to the list by name. It will be added, the name
// requested from the cache, and updated as necessary.
LLScrollListItem* addNameItem(const LLUUID& agent_id, EAddPosition pos = ADD_BOTTOM,
- BOOL enabled = TRUE, const std::string& suffix = LLStringUtil::null, const std::string& prefix = LLStringUtil::null);
+ bool enabled = true, const std::string& suffix = LLStringUtil::null, const std::string& prefix = LLStringUtil::null);
LLScrollListItem* addNameItem(NameItem& item, EAddPosition pos = ADD_BOTTOM);
/*virtual*/ LLScrollListItem* addElement(const LLSD& element, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL);
@@ -154,7 +154,7 @@ public:
// Add a user to the list by name. It will be added, the name
// requested from the cache, and updated as necessary.
void addGroupNameItem(const LLUUID& group_id, EAddPosition pos = ADD_BOTTOM,
- BOOL enabled = TRUE);
+ bool enabled = true);
void addGroupNameItem(NameItem& item, EAddPosition pos = ADD_BOTTOM);
@@ -166,21 +166,21 @@ public:
LLUUID getSelectedSpecialId();
// LLView interface
- /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask,
- BOOL drop, EDragAndDropType cargo_type, void *cargo_data,
+ /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask,
+ bool drop, EDragAndDropType cargo_type, void *cargo_data,
EAcceptance *accept,
std::string& tooltip_msg);
- /*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleToolTip(S32 x, S32 y, MASK mask);
- void setAllowCallingCardDrop(BOOL b) { mAllowCallingCardDrop = b; }
+ void setAllowCallingCardDrop(bool b) { mAllowCallingCardDrop = b; }
- void sortByName(BOOL ascending);
+ void sortByName(bool ascending);
/*virtual*/ void updateColumns(bool force_update);
/*virtual*/ void mouseOverHighlightNthItem( S32 index );
- /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask);
bool isSpecialType() { return (mNameListType == SPECIAL); }
@@ -195,7 +195,7 @@ private:
private:
S32 mNameColumnIndex;
std::string mNameColumn;
- BOOL mAllowCallingCardDrop;
+ bool mAllowCallingCardDrop;
bool mShortNames; // display name only, no SLID
typedef std::map<LLUUID, boost::signals2::connection> avatar_name_cache_connection_map_t;
avatar_name_cache_connection_map_t mAvatarNameCacheConnections;
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index f5ee1171d9..6d311248f4 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -170,12 +170,12 @@ void LLTeleportHistoryMenuItem::draw()
void LLTeleportHistoryMenuItem::onMouseEnter(S32 x, S32 y, MASK mask)
{
- mArrowIcon->setVisible(TRUE);
+ mArrowIcon->setVisible(true);
}
void LLTeleportHistoryMenuItem::onMouseLeave(S32 x, S32 y, MASK mask)
{
- mArrowIcon->setVisible(FALSE);
+ mArrowIcon->setVisible(false);
}
static LLDefaultChildRegistry::Register<LLPullButton> menu_button("pull_button");
@@ -213,9 +213,9 @@ void LLPullButton::onMouseLeave(S32 x, S32 y, MASK mask)
}
/*virtual*/
-BOOL LLPullButton::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLPullButton::handleMouseDown(S32 x, S32 y, MASK mask)
{
- BOOL handled = LLButton::handleMouseDown(x, y, mask);
+ bool handled = LLButton::handleMouseDown(x, y, mask);
if (handled)
{
//if mouse down was handled by button,
@@ -226,7 +226,7 @@ BOOL LLPullButton::handleMouseDown(S32 x, S32 y, MASK mask)
}
/*virtual*/
-BOOL LLPullButton::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLPullButton::handleMouseUp(S32 x, S32 y, MASK mask)
{
// reset data to get ready for next circle
mLastMouseDown.clear();
@@ -286,7 +286,7 @@ LLNavigationBar::~LLNavigationBar()
mTeleportFailedConnection.disconnect();
}
-BOOL LLNavigationBar::postBuild()
+bool LLNavigationBar::postBuild()
{
mBtnBack = getChild<LLPullButton>("back_btn");
mBtnForward = getChild<LLPullButton>("forward_btn");
@@ -295,12 +295,12 @@ BOOL LLNavigationBar::postBuild()
mCmbLocation= getChild<LLLocationInputCtrl>("location_combo");
- mBtnBack->setEnabled(FALSE);
+ mBtnBack->setEnabled(false);
mBtnBack->setClickedCallback(boost::bind(&LLNavigationBar::onBackButtonClicked, this));
mBtnBack->setHeldDownCallback(boost::bind(&LLNavigationBar::onBackOrForwardButtonHeldDown, this,_1, _2));
mBtnBack->setClickDraggingCallback(boost::bind(&LLNavigationBar::showTeleportHistoryMenu, this,_1));
- mBtnForward->setEnabled(FALSE);
+ mBtnForward->setEnabled(false);
mBtnForward->setClickedCallback(boost::bind(&LLNavigationBar::onForwardButtonClicked, this));
mBtnForward->setHeldDownCallback(boost::bind(&LLNavigationBar::onBackOrForwardButtonHeldDown, this, _1, _2));
mBtnForward->setClickDraggingCallback(boost::bind(&LLNavigationBar::showTeleportHistoryMenu, this,_1));
@@ -331,10 +331,10 @@ BOOL LLNavigationBar::postBuild()
mNavigationPanel->getResizeBar()->setResizeListener(boost::bind(&LLNavigationBar::onNavbarResized, this));
mFavoritePanel->getResizeBar()->setResizeListener(boost::bind(&LLNavigationBar::onNavbarResized, this));
- return TRUE;
+ return true;
}
-void LLNavigationBar::setVisible(BOOL visible)
+void LLNavigationBar::setVisible(bool visible)
{
// change visibility of grandparent layout_panel to animate in and out
if (getParent())
@@ -361,9 +361,9 @@ void LLNavigationBar::draw()
LLPanel::draw();
}
-BOOL LLNavigationBar::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLNavigationBar::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
- BOOL handled = childrenHandleRightMouseDown( x, y, mask) != NULL;
+ bool handled = childrenHandleRightMouseDown( x, y, mask) != NULL;
if(!handled && !gMenuHolder->hasVisibleMenu())
{
show_navbar_context_menu(this,x,y);
@@ -460,7 +460,7 @@ void LLNavigationBar::onLocationSelection()
{
LLInventoryModel::item_array_t landmark_items =
LLLandmarkActions::fetchLandmarksByName(typed_location,
- FALSE);
+ false);
if (!landmark_items.empty())
{
gAgent.teleportViaLandmark( landmark_items[0]->getAssetUUID());
diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h
index 4649f5bcb0..d3f415c248 100755
--- a/indra/newview/llnavigationbar.h
+++ b/indra/newview/llnavigationbar.h
@@ -60,9 +60,9 @@ public:
}
};
- /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask);
/*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask);
@@ -93,9 +93,9 @@ class LLNavigationBar
public:
/*virtual*/ void draw() override;
- /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask) override;
- /*virtual*/ BOOL postBuild() override;
- /*virtual*/ void setVisible(BOOL visible) override;
+ /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask) override;
+ /*virtual*/ bool postBuild() override;
+ /*virtual*/ void setVisible(bool visible) override;
void handleLoginComplete();
void clearHistoryCache();
@@ -138,7 +138,7 @@ private:
{
if (LLNavigationBar::instanceExists())
{
- LLNavigationBar::getInstance()->setEnabled(FALSE);
+ LLNavigationBar::getInstance()->setEnabled(false);
}
}
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index 0ba3c3d691..671da07016 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -69,20 +69,20 @@
static LLDefaultChildRegistry::Register<LLNetMap> r1("net_map");
-const F32 LLNetMap::MAP_SCALE_MIN = 32;
-const F32 LLNetMap::MAP_SCALE_FAR = 32;
-const F32 LLNetMap::MAP_SCALE_MEDIUM = 128;
-const F32 LLNetMap::MAP_SCALE_CLOSE = 256;
-const F32 LLNetMap::MAP_SCALE_VERY_CLOSE = 1024;
-const F32 LLNetMap::MAP_SCALE_MAX = 4096;
+constexpr F32 LLNetMap::MAP_SCALE_MIN = 32;
+constexpr F32 LLNetMap::MAP_SCALE_FAR = 32;
+constexpr F32 LLNetMap::MAP_SCALE_MEDIUM = 128;
+constexpr F32 LLNetMap::MAP_SCALE_CLOSE = 256;
+constexpr F32 LLNetMap::MAP_SCALE_VERY_CLOSE = 1024;
+constexpr F32 LLNetMap::MAP_SCALE_MAX = 4096;
-const F32 MAP_SCALE_ZOOM_FACTOR = 1.04f; // Zoom in factor per click of scroll wheel (4%)
-const F32 MIN_DOT_RADIUS = 3.5f;
-const F32 DOT_SCALE = 0.75f;
-const F32 MIN_PICK_SCALE = 2.f;
-const S32 MOUSE_DRAG_SLOP = 2; // How far the mouse needs to move before we think it's a drag
+constexpr F32 MAP_SCALE_ZOOM_FACTOR = 1.04f; // Zoom in factor per click of scroll wheel (4%)
+constexpr F32 MIN_DOT_RADIUS = 3.5f;
+constexpr F32 DOT_SCALE = 0.75f;
+constexpr F32 MIN_PICK_SCALE = 2.f;
+constexpr S32 MOUSE_DRAG_SLOP = 2; // How far the mouse needs to move before we think it's a drag
-const F64 COARSEUPDATE_MAX_Z = 1020.0f;
+constexpr F64 COARSEUPDATE_MAX_Z = 1020.0f;
LLNetMap::LLNetMap (const Params & p)
: LLUICtrl (p),
@@ -126,7 +126,7 @@ LLNetMap::~LLNetMap()
}
}
-BOOL LLNetMap::postBuild()
+bool LLNetMap::postBuild()
{
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar commitRegistrar;
LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enableRegistrar;
@@ -142,7 +142,7 @@ BOOL LLNetMap::postBuild()
LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_mini_map.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
mPopupMenuHandle = menu->getHandle();
menu->setItemEnabled("Re-center map", false);
- return TRUE;
+ return true;
}
void LLNetMap::setScale( F32 scale )
@@ -345,6 +345,7 @@ void LLNetMap::draw()
mObjectImageCenterGlobal = viewPosToGlobal(llfloor(new_center.mV[VX]), llfloor(new_center.mV[VY]));
// Create the base texture.
+ LLImageDataLock lock(mObjectRawImagep);
U8 *default_texture = mObjectRawImagep->getData();
memset( default_texture, 0, mObjectImagep->getWidth() * mObjectImagep->getHeight() * mObjectImagep->getComponents() );
@@ -543,7 +544,7 @@ void LLNetMap::draw()
LLUICtrl::draw();
}
-void LLNetMap::reshape(S32 width, S32 height, BOOL called_from_parent)
+void LLNetMap::reshape(S32 width, S32 height, bool called_from_parent)
{
LLUICtrl::reshape(width, height, called_from_parent);
createObjectImage();
@@ -576,7 +577,7 @@ LLVector3 LLNetMap::globalPosToView(const LLVector3d& global_pos)
}
void LLNetMap::drawTracking(const LLVector3d& pos_global, const LLColor4& color,
- BOOL draw_arrow )
+ bool draw_arrow )
{
LLVector3 pos_local = globalPosToView(pos_global);
if( (pos_local.mV[VX] < 0) ||
@@ -687,7 +688,7 @@ LLVector3d LLNetMap::viewPosToGlobal( S32 x, S32 y )
return pos_global;
}
-BOOL LLNetMap::handleScrollWheel(S32 x, S32 y, S32 clicks)
+bool LLNetMap::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
// note that clicks are reversed from what you'd think: i.e. > 0 means zoom out, < 0 means zoom in
F32 new_scale = mScale * pow(MAP_SCALE_ZOOM_FACTOR, -clicks);
@@ -708,7 +709,7 @@ BOOL LLNetMap::handleScrollWheel(S32 x, S32 y, S32 clicks)
return true;
}
-BOOL LLNetMap::handleToolTip(S32 x, S32 y, MASK mask)
+bool LLNetMap::handleToolTip(S32 x, S32 y, MASK mask)
{
if (gDisconnected)
{
@@ -837,12 +838,12 @@ BOOL LLNetMap::handleToolTip(S32 x, S32 y, MASK mask)
return true;
}
-BOOL LLNetMap::handleToolTipAgent(const LLUUID& avatar_id)
+bool LLNetMap::handleToolTipAgent(const LLUUID& avatar_id)
{
LLAvatarName av_name;
if (avatar_id.isNull() || !LLAvatarNameCache::get(avatar_id, &av_name))
{
- return FALSE;
+ return false;
}
// only show tooltip if same inspector not already open
@@ -863,7 +864,7 @@ BOOL LLNetMap::handleToolTipAgent(const LLUUID& avatar_id)
LLToolTipMgr::instance().show(p);
}
- return TRUE;
+ return true;
}
// static
@@ -915,6 +916,7 @@ void LLNetMap::renderPoint(const LLVector3 &pos_local, const LLColor4U &color,
return;
}
+ LLImageDataLock lock(mObjectRawImagep);
U8 *datap = mObjectRawImagep->getData();
S32 neg_radius = diameter / 2;
@@ -1001,13 +1003,13 @@ void LLNetMap::createObjectImage()
mObjectRawImagep = new LLImageRaw(img_size, img_size, 4);
U8* data = mObjectRawImagep->getData();
memset( data, 0, img_size * img_size * 4 );
- mObjectImagep = LLViewerTextureManager::getLocalTexture( mObjectRawImagep.get(), FALSE);
+ mObjectImagep = LLViewerTextureManager::getLocalTexture( mObjectRawImagep.get(), false);
}
setScale(mScale);
mUpdateNow = true;
}
-BOOL LLNetMap::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLNetMap::handleMouseDown(S32 x, S32 y, MASK mask)
{
// Start panning
gFocusMgr.setMouseCapture(this);
@@ -1018,7 +1020,7 @@ BOOL LLNetMap::handleMouseDown(S32 x, S32 y, MASK mask)
return true;
}
-BOOL LLNetMap::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLNetMap::handleMouseUp(S32 x, S32 y, MASK mask)
{
if (abs(mMouseDown.mX - x) < 3 && abs(mMouseDown.mY - y) < 3)
{
@@ -1051,7 +1053,7 @@ BOOL LLNetMap::handleMouseUp(S32 x, S32 y, MASK mask)
return false;
}
-BOOL LLNetMap::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLNetMap::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
auto menu = static_cast<LLMenuGL*>(mPopupMenuHandle.get());
if (menu)
@@ -1062,20 +1064,20 @@ BOOL LLNetMap::handleRightMouseDown(S32 x, S32 y, MASK mask)
menu->setItemEnabled("Stop Tracking", LLTracker::isTracking(0));
LLMenuGL::showPopup(this, menu, x, y);
}
- return TRUE;
+ return true;
}
-BOOL LLNetMap::handleClick(S32 x, S32 y, MASK mask)
+bool LLNetMap::handleClick(S32 x, S32 y, MASK mask)
{
// TODO: allow clicking an avatar on minimap to select avatar in the nearby avatar list
// if(mClosestAgentToCursor.notNull())
// mNearbyList->selectUser(mClosestAgentToCursor);
// Needs a registered observer i guess to accomplish this without using
// globals to tell the mNearbyList in llpeoplepanel to select the user
- return TRUE;
+ return true;
}
-BOOL LLNetMap::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLNetMap::handleDoubleClick(S32 x, S32 y, MASK mask)
{
LLVector3d pos_global = viewPosToGlobal(x, y);
@@ -1104,7 +1106,7 @@ BOOL LLNetMap::handleDoubleClick(S32 x, S32 y, MASK mask)
{
LLFloaterReg::showInstance("world_map");
}
- return TRUE;
+ return true;
}
F32 LLNetMap::getScaleForName(std::string scale_name)
@@ -1137,7 +1139,7 @@ bool LLNetMap::outsideSlop( S32 x, S32 y, S32 start_x, S32 start_y, S32 slop )
return (dx <= -slop || slop <= dx || dy <= -slop || slop <= dy);
}
-BOOL LLNetMap::handleHover( S32 x, S32 y, MASK mask )
+bool LLNetMap::handleHover( S32 x, S32 y, MASK mask )
{
if (hasMouseCapture())
{
@@ -1171,7 +1173,7 @@ BOOL LLNetMap::handleHover( S32 x, S32 y, MASK mask )
gViewerWindow->setCursor( UI_CURSOR_CROSS );
}
- return TRUE;
+ return true;
}
bool LLNetMap::isZoomChecked(const LLSD &userdata)
diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h
index 75c1abc4ed..146f4e9546 100644
--- a/indra/newview/llnetmap.h
+++ b/indra/newview/llnetmap.h
@@ -70,17 +70,17 @@ public:
static const F32 MAP_SCALE_MAX;
/*virtual*/ void draw();
- /*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
- /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleHover( S32 x, S32 y, MASK mask );
- /*virtual*/ BOOL handleToolTip( S32 x, S32 y, MASK mask);
- /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
-
- /*virtual*/ BOOL postBuild();
- /*virtual*/ BOOL handleRightMouseDown( S32 x, S32 y, MASK mask );
- /*virtual*/ BOOL handleClick(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleDoubleClick( S32 x, S32 y, MASK mask );
+ /*virtual*/ bool handleScrollWheel(S32 x, S32 y, S32 clicks);
+ /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleHover( S32 x, S32 y, MASK mask );
+ /*virtual*/ bool handleToolTip( S32 x, S32 y, MASK mask);
+ /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true);
+
+ /*virtual*/ bool postBuild();
+ /*virtual*/ bool handleRightMouseDown( S32 x, S32 y, MASK mask );
+ /*virtual*/ bool handleClick(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleDoubleClick( S32 x, S32 y, MASK mask );
void setScale(F32 scale);
@@ -105,10 +105,10 @@ private:
void drawTracking( const LLVector3d& pos_global,
const LLColor4& color,
- BOOL draw_arrow = TRUE);
+ bool draw_arrow = true);
bool isMouseOnPopupMenu();
void updateAboutLandPopupButton();
- BOOL handleToolTipAgent(const LLUUID& avatar_id);
+ bool handleToolTipAgent(const LLUUID& avatar_id);
static void showAvatarInspector(const LLUUID& avatar_id);
void createObjectImage();
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp
index 85adfaab55..01a1361ceb 100644
--- a/indra/newview/llnotificationhandlerutil.cpp
+++ b/indra/newview/llnotificationhandlerutil.cpp
@@ -64,7 +64,7 @@ bool LLHandlerUtil::isIMFloaterOpened(const LLNotificationPtr& notification)
if (im_floater != NULL)
{
- res = im_floater->getVisible() == TRUE;
+ res = im_floater->getVisible() == true;
}
return res;
diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp
index f86edfd0cf..79a90c4f4c 100644
--- a/indra/newview/llnotificationlistitem.cpp
+++ b/indra/newview/llnotificationlistitem.cpp
@@ -56,9 +56,9 @@ LLNotificationListItem::LLNotificationListItem(const Params& p) : LLPanel(p),
mNotificationName = p.notification_name;
}
-BOOL LLNotificationListItem::postBuild()
+bool LLNotificationListItem::postBuild()
{
- BOOL rv = LLPanel::postBuild();
+ bool rv = LLPanel::postBuild();
mTitleBox = getChild<LLTextBox>("notification_title");
mTitleBoxExp = getChild<LLTextBox>("notification_title_exp");
mNoticeTextExp = getChild<LLChatEntry>("notification_text_exp");
@@ -73,7 +73,7 @@ BOOL LLNotificationListItem::postBuild()
mTitleBox->setValue(mParams.title);
mTitleBoxExp->setValue(mParams.title);
mNoticeTextExp->setValue(mParams.title);
- mNoticeTextExp->setEnabled(FALSE);
+ mNoticeTextExp->setEnabled(false);
mNoticeTextExp->setTextExpandedCallback(boost::bind(&LLNotificationListItem::reshapeNotification, this));
mTitleBox->setContentTrusted(false);
@@ -99,7 +99,7 @@ BOOL LLNotificationListItem::postBuild()
mExpandedHeight = (S32)atoi(expanded_height_str.c_str());
mCondensedHeight = (S32)atoi(condensed_height_str.c_str());
- setExpanded(FALSE);
+ setExpanded(false);
return rv;
}
@@ -151,9 +151,9 @@ void LLNotificationListItem::onClickCloseBtn()
close();
}
-BOOL LLNotificationListItem::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLNotificationListItem::handleMouseUp(S32 x, S32 y, MASK mask)
{
- BOOL res = LLPanel::handleMouseUp(x, y, mask);
+ bool res = LLPanel::handleMouseUp(x, y, mask);
mOnItemClick(this);
return res;
}
@@ -208,12 +208,12 @@ std::set<std::string> LLNotificationListItem::getTransactionTypes()
void LLNotificationListItem::onClickExpandBtn()
{
- setExpanded(TRUE);
+ setExpanded(true);
}
void LLNotificationListItem::onClickCondenseBtn()
{
- setExpanded(FALSE);
+ setExpanded(false);
}
void LLNotificationListItem::reshapeNotification()
@@ -221,11 +221,11 @@ void LLNotificationListItem::reshapeNotification()
if(mExpanded)
{
S32 width = this->getRect().getWidth();
- this->reshape(width, mNoticeTextExp->getRect().getHeight() + mExpandedHeight, FALSE);
+ this->reshape(width, mNoticeTextExp->getRect().getHeight() + mExpandedHeight, false);
}
}
-void LLNotificationListItem::setExpanded(BOOL value)
+void LLNotificationListItem::setExpanded(bool value)
{
mCondensedViewPanel->setVisible(!value);
mExpandedViewPanel->setVisible(value);
@@ -233,11 +233,11 @@ void LLNotificationListItem::setExpanded(BOOL value)
if (value)
{
- this->reshape(width, mNoticeTextExp->getRect().getHeight() + mExpandedHeight, FALSE);
+ this->reshape(width, mNoticeTextExp->getRect().getHeight() + mExpandedHeight, false);
}
else
{
- this->reshape(width, mCondensedHeight, FALSE);
+ this->reshape(width, mCondensedHeight, false);
}
mExpanded = value;
@@ -278,12 +278,12 @@ LLGroupInviteNotificationListItem::LLGroupInviteNotificationListItem(const Param
buildFromFile("panel_notification_list_item.xml");
}
-BOOL LLGroupInviteNotificationListItem::postBuild()
+bool LLGroupInviteNotificationListItem::postBuild()
{
- BOOL rv = LLGroupNotificationListItem::postBuild();
+ bool rv = LLGroupNotificationListItem::postBuild();
setFee(mParams.fee);
mInviteButtonPanel = getChild<LLPanel>("button_panel");
- mInviteButtonPanel->setVisible(TRUE);
+ mInviteButtonPanel->setVisible(true);
mJoinBtn = getChild<LLButton>("join_btn");
mDeclineBtn = getChild<LLButton>("decline_btn");
mInfoBtn = getChild<LLButton>("info_btn");
@@ -338,8 +338,8 @@ void LLGroupInviteNotificationListItem::setFee(S32 fee)
std::string fee_text = getString("group_fee_text", string_args);
mSenderOrFeeBox->setValue(fee_text);
mSenderOrFeeBoxExp->setValue(fee_text);
- mSenderOrFeeBox->setVisible(TRUE);
- mSenderOrFeeBoxExp->setVisible(TRUE);
+ mSenderOrFeeBox->setVisible(true);
+ mSenderOrFeeBoxExp->setVisible(true);
}
LLGroupNoticeNotificationListItem::LLGroupNoticeNotificationListItem(const Params& p)
@@ -363,15 +363,15 @@ LLGroupNotificationListItem::~LLGroupNotificationListItem()
LLGroupMgr::getInstance()->removeObserver(this);
}
-BOOL LLGroupNoticeNotificationListItem::postBuild()
+bool LLGroupNoticeNotificationListItem::postBuild()
{
- BOOL rv = LLGroupNotificationListItem::postBuild();
+ bool rv = LLGroupNotificationListItem::postBuild();
mAttachmentTextBox = getChild<LLTextBox>("attachment_text");
mAttachmentIcon = getChild<LLIconCtrl>("attachment_icon");
mAttachmentIconExp = getChild<LLIconCtrl>("attachment_icon_exp");
mAttachmentPanel = getChild<LLPanel>("attachment_panel");
- mAttachmentPanel->setVisible(FALSE);
+ mAttachmentPanel->setVisible(false);
mTitleBox->setValue(mParams.subject);
@@ -391,13 +391,13 @@ BOOL LLGroupNoticeNotificationListItem::postBuild()
if (mInventoryOffer != NULL)
{
mAttachmentTextBox->setValue(mInventoryOffer->mDesc);
- mAttachmentTextBox->setVisible(TRUE);
- mAttachmentIcon->setVisible(TRUE);
+ mAttachmentTextBox->setVisible(true);
+ mAttachmentIcon->setVisible(true);
std::string icon_name = LLInventoryIcon::getIconName(mInventoryOffer->mType,
LLInventoryType::IT_TEXTURE);
mAttachmentIconExp->setValue(icon_name);
- mAttachmentIconExp->setVisible(TRUE);
+ mAttachmentIconExp->setVisible(true);
mAttachmentTextBox->setClickedCallback(boost::bind(
&LLGroupNoticeNotificationListItem::onClickAttachment, this));
@@ -405,14 +405,14 @@ BOOL LLGroupNoticeNotificationListItem::postBuild()
std::string expanded_height_resize_str = getString("expanded_height_resize_for_attachment");
mExpandedHeightResize = (S32)atoi(expanded_height_resize_str.c_str());
- mAttachmentPanel->setVisible(TRUE);
+ mAttachmentPanel->setVisible(true);
}
return rv;
}
-BOOL LLGroupNotificationListItem::postBuild()
+bool LLGroupNotificationListItem::postBuild()
{
- BOOL rv = LLNotificationListItem::postBuild();
+ bool rv = LLNotificationListItem::postBuild();
mGroupIcon = getChild<LLGroupIconCtrl>("group_icon");
mGroupIconExp = getChild<LLGroupIconCtrl>("group_icon_exp");
@@ -421,8 +421,8 @@ BOOL LLGroupNotificationListItem::postBuild()
mGroupIcon->setValue(mParams.group_id);
mGroupIconExp->setValue(mParams.group_id);
- mGroupIcon->setVisible(TRUE);
- mGroupIconExp->setVisible(TRUE);
+ mGroupIcon->setVisible(true);
+ mGroupIconExp->setVisible(true);
mGroupId = mParams.group_id;
@@ -479,12 +479,12 @@ void LLGroupNotificationListItem::setGroupName(std::string name)
string_args["[GROUP_NAME]"] = llformat("%s", name.c_str());
std::string group_box_str = getString("group_name_text", string_args);
mGroupNameBoxExp->setValue(group_box_str);
- mGroupNameBoxExp->setVisible(TRUE);
+ mGroupNameBoxExp->setVisible(true);
}
else
{
mGroupNameBoxExp->setValue(LLStringUtil::null);
- mGroupNameBoxExp->setVisible(FALSE);
+ mGroupNameBoxExp->setVisible(false);
}
}
@@ -497,13 +497,13 @@ void LLGroupNoticeNotificationListItem::setSender(std::string sender)
std::string sender_text = getString("sender_resident_text", string_args);
mSenderOrFeeBox->setValue(sender_text);
mSenderOrFeeBoxExp->setValue(sender_text);
- mSenderOrFeeBox->setVisible(TRUE);
- mSenderOrFeeBoxExp->setVisible(TRUE);
+ mSenderOrFeeBox->setVisible(true);
+ mSenderOrFeeBoxExp->setVisible(true);
} else {
mSenderOrFeeBox->setValue(LLStringUtil::null);
mSenderOrFeeBoxExp->setValue(LLStringUtil::null);
- mSenderOrFeeBox->setVisible(FALSE);
- mSenderOrFeeBoxExp->setVisible(FALSE);
+ mSenderOrFeeBox->setVisible(false);
+ mSenderOrFeeBoxExp->setVisible(false);
}
}
void LLGroupNoticeNotificationListItem::close()
@@ -524,7 +524,7 @@ void LLGroupNoticeNotificationListItem::onClickAttachment()
static const LLUIColor textColor = LLUIColorTable::instance().getColor(
"GroupNotifyDimmedTextColor");
mAttachmentTextBox->setColor(textColor);
- mAttachmentIconExp->setEnabled(FALSE);
+ mAttachmentIconExp->setEnabled(false);
//if attachment isn't openable - notify about saving
if (!isAttachmentOpenable(mInventoryOffer->mType)) {
@@ -559,16 +559,16 @@ LLTransactionNotificationListItem::LLTransactionNotificationListItem(const Param
buildFromFile("panel_notification_list_item.xml");
}
-BOOL LLTransactionNotificationListItem::postBuild()
+bool LLTransactionNotificationListItem::postBuild()
{
- BOOL rv = LLNotificationListItem::postBuild();
+ bool rv = LLNotificationListItem::postBuild();
mAvatarIcon = getChild<LLAvatarIconCtrl>("avatar_icon");
mAvatarIconExp = getChild<LLAvatarIconCtrl>("avatar_icon_exp");
mAvatarIcon->setValue("System_Notification");
mAvatarIconExp->setValue("System_Notification");
- mAvatarIcon->setVisible(TRUE);
- mAvatarIconExp->setVisible(TRUE);
+ mAvatarIcon->setVisible(true);
+ mAvatarIconExp->setVisible(true);
if((GOVERNOR_LINDEN_ID == mParams.paid_to_id) ||
(GOVERNOR_LINDEN_ID == mParams.paid_from_id))
{
@@ -594,7 +594,7 @@ LLSystemNotificationListItem::LLSystemNotificationListItem(const Params& p)
mSystemNotificationIcon(NULL),
mIsCaution(false)
{
- buildFromFile("panel_notification_list_item.xml");
+ buildFromFile("panel_notification_list_item.xml", true);
mIsCaution = p.notification_priority >= NOTIFICATION_PRIORITY_HIGH;
if (mIsCaution)
{
@@ -606,14 +606,14 @@ LLSystemNotificationListItem::LLSystemNotificationListItem(const Params& p)
}
}
-BOOL LLSystemNotificationListItem::postBuild()
+bool LLSystemNotificationListItem::postBuild()
{
- BOOL rv = LLNotificationListItem::postBuild();
+ bool rv = LLNotificationListItem::postBuild();
mSystemNotificationIcon = getChild<LLIconCtrl>("system_notification_icon");
mSystemNotificationIconExp = getChild<LLIconCtrl>("system_notification_icon_exp");
if (mSystemNotificationIcon)
- mSystemNotificationIcon->setVisible(TRUE);
+ mSystemNotificationIcon->setVisible(true);
if (mSystemNotificationIconExp)
- mSystemNotificationIconExp->setVisible(TRUE);
+ mSystemNotificationIconExp->setVisible(true);
return rv;
}
diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h
index 3d564fed0e..d686fb5941 100644
--- a/indra/newview/llnotificationlistitem.h
+++ b/indra/newview/llnotificationlistitem.h
@@ -79,7 +79,7 @@ public:
std::string& getNotificationName() { return mNotificationName; }
// handlers
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask);
virtual void onMouseEnter(S32 x, S32 y, MASK mask);
virtual void onMouseLeave(S32 x, S32 y, MASK mask);
@@ -92,8 +92,8 @@ public:
boost::signals2::connection setOnItemClickCallback(item_callback_t cb) { return mOnItemClick.connect(cb); }
virtual bool showPopup() { return true; }
- void setExpanded(BOOL value);
- virtual BOOL postBuild();
+ void setExpanded(bool value);
+ virtual bool postBuild();
void reshapeNotification();
typedef enum e_time_type
@@ -138,7 +138,7 @@ class LLGroupNotificationListItem
{
public:
virtual ~LLGroupNotificationListItem();
- virtual BOOL postBuild();
+ virtual bool postBuild();
void setGroupId(const LLUUID& value);
// LLGroupMgrObserver observer trigger
@@ -168,7 +168,7 @@ class LLGroupInviteNotificationListItem
{
public:
static std::set<std::string> getTypes();
- virtual BOOL postBuild();
+ virtual bool postBuild();
/*virtual*/ bool showPopup() { return false; }
@@ -195,7 +195,7 @@ class LLGroupNoticeNotificationListItem
{
public:
static std::set<std::string> getTypes();
- virtual BOOL postBuild();
+ virtual bool postBuild();
/*virtual*/ bool showPopup() { return false; }
@@ -222,7 +222,7 @@ class LLTransactionNotificationListItem : public LLNotificationListItem
{
public:
static std::set<std::string> getTypes();
- virtual BOOL postBuild();
+ virtual bool postBuild();
private:
friend class LLNotificationListItem;
LLTransactionNotificationListItem(const Params& p);
@@ -235,7 +235,7 @@ private:
class LLSystemNotificationListItem : public LLNotificationListItem
{
public:
- virtual BOOL postBuild();
+ virtual bool postBuild();
private:
friend class LLNotificationListItem;
LLSystemNotificationListItem(const Params& p);
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index efffcefc4a..51ff664913 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -105,9 +105,9 @@ const LLOutfitGallery::Params& LLOutfitGallery::getDefaultParams()
return LLUICtrlFactory::getDefaultParams<LLOutfitGallery>();
}
-BOOL LLOutfitGallery::postBuild()
+bool LLOutfitGallery::postBuild()
{
- BOOL rv = LLOutfitListBase::postBuild();
+ bool rv = LLOutfitListBase::postBuild();
mScrollPanel = getChild<LLScrollContainer>("gallery_scroll_panel");
LLPanel::Params params = LLPanel::getDefaultParams(); // Don't parse XML when creating dummy LLPanel
mGalleryPanel = LLUICtrlFactory::create<LLPanel>(params);
@@ -144,9 +144,9 @@ void LLOutfitGallery::draw()
}
}
-BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask)
+bool LLOutfitGallery::handleKeyHere(KEY key, MASK mask)
{
- BOOL handled = FALSE;
+ bool handled = false;
switch (key)
{
case KEY_RETURN:
@@ -156,7 +156,7 @@ BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask)
// Or should it wearSelectedOutfit?
getSelectedItem()->openOutfitsContent();
}
- handled = TRUE;
+ handled = true;
break;
case KEY_DELETE:
#if LL_DARWIN
@@ -168,12 +168,12 @@ BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask)
{
onRemoveOutfit(mSelectedOutfitUUID);
}
- handled = TRUE;
+ handled = true;
break;
case KEY_F2:
LLAppearanceMgr::instance().renameOutfit(mSelectedOutfitUUID);
- handled = TRUE;
+ handled = true;
break;
case KEY_PAGE_UP:
@@ -181,7 +181,7 @@ BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask)
{
mScrollPanel->pageUp(30);
}
- handled = TRUE;
+ handled = true;
break;
case KEY_PAGE_DOWN:
@@ -189,7 +189,7 @@ BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask)
{
mScrollPanel->pageDown(30);
}
- handled = TRUE;
+ handled = true;
break;
case KEY_HOME:
@@ -197,7 +197,7 @@ BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask)
{
mScrollPanel->goToTop();
}
- handled = TRUE;
+ handled = true;
break;
case KEY_END:
@@ -205,27 +205,27 @@ BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask)
{
mScrollPanel->goToBottom();
}
- handled = TRUE;
+ handled = true;
break;
case KEY_LEFT:
moveLeft();
- handled = TRUE;
+ handled = true;
break;
case KEY_RIGHT:
moveRight();
- handled = TRUE;
+ handled = true;
break;
case KEY_UP:
moveUp();
- handled = TRUE;
+ handled = true;
break;
case KEY_DOWN:
moveDown();
- handled = TRUE;
+ handled = true;
break;
default:
@@ -254,7 +254,7 @@ void LLOutfitGallery::moveUp()
item = mIndexToItemMap[n];
LLUUID item_id = item->getUUID();
ChangeOutfitSelection(nullptr, item_id);
- item->setFocus(TRUE);
+ item->setFocus(true);
scrollToShowItem(mSelectedOutfitUUID);
}
@@ -276,7 +276,7 @@ void LLOutfitGallery::moveDown()
item = mIndexToItemMap[n];
LLUUID item_id = item->getUUID();
ChangeOutfitSelection(nullptr, item_id);
- item->setFocus(TRUE);
+ item->setFocus(true);
scrollToShowItem(mSelectedOutfitUUID);
}
@@ -301,7 +301,7 @@ void LLOutfitGallery::moveLeft()
item = mIndexToItemMap[n];
LLUUID item_id = item->getUUID();
ChangeOutfitSelection(nullptr, item_id);
- item->setFocus(TRUE);
+ item->setFocus(true);
scrollToShowItem(mSelectedOutfitUUID);
}
@@ -324,7 +324,7 @@ void LLOutfitGallery::moveRight()
item = mIndexToItemMap[n];
LLUUID item_id = item->getUUID();
ChangeOutfitSelection(nullptr, item_id);
- item->setFocus(TRUE);
+ item->setFocus(true);
scrollToShowItem(mSelectedOutfitUUID);
}
@@ -860,11 +860,11 @@ void LLOutfitGallery::onChangeOutfitSelection(LLWearableItemsList* list, const L
return;
if (mOutfitMap[mSelectedOutfitUUID])
{
- mOutfitMap[mSelectedOutfitUUID]->setSelected(FALSE);
+ mOutfitMap[mSelectedOutfitUUID]->setSelected(false);
}
if (mOutfitMap[category_id])
{
- mOutfitMap[category_id]->setSelected(TRUE);
+ mOutfitMap[category_id]->setSelected(true);
}
// mSelectedOutfitUUID will be set in LLOutfitListBase::ChangeOutfitSelection
}
@@ -897,15 +897,15 @@ void LLOutfitGallery::updateMessageVisibility()
{
if (mItems.empty())
{
- mMessageTextBox->setVisible(TRUE);
- mScrollPanel->setVisible(FALSE);
+ mMessageTextBox->setVisible(true);
+ mScrollPanel->setVisible(false);
std::string message = getString(getFilterSubString().empty() ? "no_outfits_msg" : "no_matched_outfits_msg");
mMessageTextBox->setValue(message);
}
else
{
- mScrollPanel->setVisible(TRUE);
- mMessageTextBox->setVisible(FALSE);
+ mScrollPanel->setVisible(true);
+ mMessageTextBox->setVisible(false);
}
}
@@ -934,7 +934,7 @@ LLOutfitGalleryItem::~LLOutfitGalleryItem()
}
-BOOL LLOutfitGalleryItem::postBuild()
+bool LLOutfitGalleryItem::postBuild()
{
setDefaultImage();
@@ -943,7 +943,7 @@ BOOL LLOutfitGalleryItem::postBuild()
mTextBgPanel = getChild<LLPanel>("text_bg_panel");
setOutfitWorn(false);
mHidden = false;
- return TRUE;
+ return true;
}
void LLOutfitGalleryItem::draw()
@@ -954,7 +954,7 @@ void LLOutfitGalleryItem::draw()
LLUIColor border_color = LLUIColorTable::instance().getColor(mSelected ? "OutfitGalleryItemSelected" : "OutfitGalleryItemUnselected", LLColor4::white);
LLRect border = getChildView("preview_outfit")->getRect();
border.mRight = border.mRight + 1;
- gl_rect_2d(border, border_color.get(), FALSE);
+ gl_rect_2d(border, border_color.get(), false);
// If the floater is focused, don't apply its alpha to the texture (STORM-677).
const F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency();
@@ -1010,31 +1010,31 @@ void LLOutfitGalleryItem::setSelected(bool value)
setOutfitWorn(mWorn);
}
-BOOL LLOutfitGalleryItem::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLOutfitGalleryItem::handleMouseDown(S32 x, S32 y, MASK mask)
{
- setFocus(TRUE);
+ setFocus(true);
return LLUICtrl::handleMouseDown(x, y, mask);
}
-BOOL LLOutfitGalleryItem::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLOutfitGalleryItem::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
- setFocus(TRUE);
+ setFocus(true);
return LLUICtrl::handleRightMouseDown(x, y, mask);
}
-BOOL LLOutfitGalleryItem::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLOutfitGalleryItem::handleDoubleClick(S32 x, S32 y, MASK mask)
{
return openOutfitsContent() || LLPanel::handleDoubleClick(x, y, mask);
}
-BOOL LLOutfitGalleryItem::handleKeyHere(KEY key, MASK mask)
+bool LLOutfitGalleryItem::handleKeyHere(KEY key, MASK mask)
{
if (!mGallery)
{
- return FALSE;
+ return false;
}
- BOOL handled = FALSE;
+ bool handled = false;
switch (key)
{
case KEY_LEFT:
@@ -1110,7 +1110,7 @@ bool LLOutfitGalleryItem::setImageAssetId(LLUUID image_asset_id)
{
mImageAssetId = image_asset_id;
mTexturep = texture;
- getChildView("preview_outfit")->setVisible(FALSE);
+ getChildView("preview_outfit")->setVisible(false);
mDefaultImage = false;
mImageUpdatePending = (texture->getDiscardLevel() == -1);
return true;
@@ -1127,7 +1127,7 @@ void LLOutfitGalleryItem::setDefaultImage()
{
mTexturep = NULL;
mImageAssetId.setNull();
- getChildView("preview_outfit")->setVisible(TRUE);
+ getChildView("preview_outfit")->setVisible(true);
mDefaultImage = true;
mImageUpdatePending = false;
}
@@ -1187,10 +1187,11 @@ void LLOutfitGalleryGearMenu::onUpdateItemsVisibility()
{
if (!mMenu) return;
bool have_selection = getSelectedOutfitID().notNull();
- mMenu->setItemVisible("expand", FALSE);
- mMenu->setItemVisible("collapse", FALSE);
+ mMenu->setItemVisible("expand", false);
+ mMenu->setItemVisible("collapse", false);
mMenu->setItemVisible("thumbnail", have_selection);
- mMenu->setItemVisible("sort_folders_by_name", TRUE);
+ mMenu->setItemVisible("sepatator3", true);
+ mMenu->setItemVisible("sort_folders_by_name", true);
LLOutfitListGearMenuBase::onUpdateItemsVisibility();
}
@@ -1278,7 +1279,7 @@ void LLOutfitGallery::refreshOutfit(const LLUUID& category_id)
LLFloater* appearance_floater = LLFloaterReg::getInstance("appearance");
if (appearance_floater)
{
- appearance_floater->setFocus(TRUE);
+ appearance_floater->setFocus(true);
}
}
if (item_name == LLAppearanceMgr::sExpectedTextureName)
diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h
index 99371b1cec..0b1eacd289 100644
--- a/indra/newview/lloutfitgallery.h
+++ b/indra/newview/lloutfitgallery.h
@@ -71,10 +71,10 @@ public:
LLOutfitGallery(const LLOutfitGallery::Params& params = getDefaultParams());
virtual ~LLOutfitGallery();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onOpen(const LLSD& info);
/*virtual*/ void draw();
- /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
+ /*virtual*/ bool handleKeyHere(KEY key, MASK mask);
void moveUp();
void moveDown();
void moveLeft();
@@ -100,7 +100,7 @@ public:
/*virtual*/ bool hasItemSelected();
/*virtual*/ bool canWearSelected();
- /*virtual*/ bool getHasExpandableFolders() { return FALSE; }
+ /*virtual*/ bool getHasExpandableFolders() { return false; }
void updateMessageVisibility();
bool hasDefaultImage(const LLUUID& outfit_cat_id);
@@ -226,12 +226,12 @@ public:
LLOutfitGalleryItem(const Params& p);
virtual ~LLOutfitGalleryItem();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void draw();
- /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
+ /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleDoubleClick(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleKeyHere(KEY key, MASK mask);
/*virtual*/ void onFocusLost();
/*virtual*/ void onFocusReceived();
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index 1a6c5db535..060f10d813 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -110,7 +110,7 @@ LLOutfitsList::~LLOutfitsList()
{
}
-BOOL LLOutfitsList::postBuild()
+bool LLOutfitsList::postBuild()
{
mAccordion = getChild<LLAccordionCtrl>("outfits_accordion");
mAccordion->setComparator(&OUTFIT_TAB_NAME_COMPARATOR);
@@ -279,11 +279,11 @@ void LLOutfitListBase::performAction(std::string action)
if ("replaceoutfit" == action)
{
- LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, FALSE );
+ LLAppearanceMgr::instance().wearInventoryCategory( cat, false, false );
}
else if ("addtooutfit" == action)
{
- LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, TRUE );
+ LLAppearanceMgr::instance().wearInventoryCategory( cat, false, true );
}
else if ("rename_outfit" == action)
{
@@ -305,7 +305,7 @@ void LLOutfitsList::onSetSelectedOutfitByUUID(const LLUUID& outfit_uuid)
LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView());
if (!list) continue;
- tab->setFocus(TRUE);
+ tab->setFocus(true);
ChangeOutfitSelection(list, outfit_uuid);
tab->changeOpenClose(false);
@@ -443,7 +443,7 @@ void LLOutfitsList::resetItemSelection(LLWearableItemsList* list, const LLUUID&
void LLOutfitsList::onChangeOutfitSelection(LLWearableItemsList* list, const LLUUID& category_id)
{
- MASK mask = gKeyboard->currentMask(TRUE);
+ MASK mask = gKeyboard->currentMask(true);
// Reset selection in all previously selected tabs except for the current
// if new selection is started.
@@ -536,7 +536,7 @@ void LLOutfitsList::onFilterSubStringChanged(const std::string& new_string, cons
}
else
{
- tab->setVisible(TRUE);
+ tab->setVisible(true);
// Restore tab title when filter is empty
tab->setTitle(tab->getTitle());
@@ -729,7 +729,7 @@ void LLOutfitsList::onOutfitRightClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUI
LLUICtrl* header = tab->findChild<LLUICtrl>("dd_header");
if (header)
{
- header->setFocus(TRUE);
+ header->setFocus(true);
}
uuid_vec_t selected_uuids;
@@ -1015,7 +1015,7 @@ void LLOutfitListBase::ChangeOutfitSelection(LLWearableItemsList* list, const LL
signalSelectionOutfitUUID(category_id);
}
-BOOL LLOutfitListBase::postBuild()
+bool LLOutfitListBase::postBuild()
{
mGearMenu = createGearMenu();
@@ -1023,7 +1023,7 @@ BOOL LLOutfitListBase::postBuild()
menu_gear_btn->setMouseDownCallback(boost::bind(&LLOutfitListGearMenuBase::updateItemsVisibility, mGearMenu));
menu_gear_btn->setMenu(mGearMenu->getMenu());
- return TRUE;
+ return true;
}
void LLOutfitListBase::collapseAllFolders()
@@ -1227,7 +1227,7 @@ void LLOutfitListGearMenuBase::onWear()
if (selected_outfit)
{
LLAppearanceMgr::instance().wearInventoryCategory(
- selected_outfit, /*copy=*/ FALSE, /*append=*/ FALSE);
+ selected_outfit, /*copy=*/ false, /*append=*/ false);
}
}
@@ -1333,14 +1333,15 @@ LLOutfitListGearMenu::~LLOutfitListGearMenu()
void LLOutfitListGearMenu::onUpdateItemsVisibility()
{
if (!mMenu) return;
- mMenu->setItemVisible("expand", TRUE);
- mMenu->setItemVisible("collapse", TRUE);
+ mMenu->setItemVisible("expand", true);
+ mMenu->setItemVisible("collapse", true);
mMenu->setItemVisible("thumbnail", getSelectedOutfitID().notNull());
- mMenu->setItemVisible("sort_folders_by_name", FALSE);
+ mMenu->setItemVisible("sepatator3", false);
+ mMenu->setItemVisible("sort_folders_by_name", false);
LLOutfitListGearMenuBase::onUpdateItemsVisibility();
}
-BOOL LLOutfitAccordionCtrlTab::handleToolTip(S32 x, S32 y, MASK mask)
+bool LLOutfitAccordionCtrlTab::handleToolTip(S32 x, S32 y, MASK mask)
{
if (y >= getLocalRect().getHeight() - getHeaderHeight())
{
@@ -1355,7 +1356,7 @@ BOOL LLOutfitAccordionCtrlTab::handleToolTip(S32 x, S32 y, MASK mask)
.delay_time(LLView::getTooltipTimeout())
.create_callback(boost::bind(&LLInspectTextureUtil::createInventoryToolTip, _1))
.create_params(params));
- return TRUE;
+ return true;
}
return LLAccordionCtrlTab::handleToolTip(x, y, mask);
diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h
index 89821f9333..30aa9d9cdf 100644
--- a/indra/newview/lloutfitslist.h
+++ b/indra/newview/lloutfitslist.h
@@ -70,7 +70,7 @@ public:
LLOutfitListBase();
virtual ~LLOutfitListBase();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onOpen(const LLSD& info);
void refreshList(const LLUUID& category_id);
@@ -219,7 +219,7 @@ public:
Params() : cat_id("cat_id") {}
};
- virtual BOOL handleToolTip(S32 x, S32 y, MASK mask);
+ virtual bool handleToolTip(S32 x, S32 y, MASK mask);
protected:
LLOutfitAccordionCtrlTab(const LLOutfitAccordionCtrlTab::Params &p)
@@ -246,7 +246,7 @@ public:
LLOutfitsList();
virtual ~LLOutfitsList();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onOpen(const LLSD& info);
@@ -283,7 +283,7 @@ public:
*/
void onExpandAllFolders();
- /*virtual*/ bool getHasExpandableFolders() { return TRUE; }
+ /*virtual*/ bool getHasExpandableFolders() { return true; }
protected:
LLOutfitListGearMenuBase* createGearMenu();
diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp
index 7129641c20..f171b48ba2 100644
--- a/indra/newview/lloutputmonitorctrl.cpp
+++ b/indra/newview/lloutputmonitorctrl.cpp
@@ -231,7 +231,7 @@ void LLOutputMonitorCtrl::draw()
// }
// // Draw rectangle filled with the color.
- // gl_rect_2d(xpos, recttop, xpos+rectw, rectbtm, rect_color, TRUE);
+ // gl_rect_2d(xpos, recttop, xpos+rectw, rectbtm, rect_color, true);
// xpos += period;
//}
@@ -239,11 +239,11 @@ void LLOutputMonitorCtrl::draw()
// Draw bounding box.
//
if(mBorder)
- gl_rect_2d(0, monh, monw, 0, sColorBound, FALSE);
+ gl_rect_2d(0, monh, monw, 0, sColorBound, false);
}
// virtual
-BOOL LLOutputMonitorCtrl::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLOutputMonitorCtrl::handleMouseUp(S32 x, S32 y, MASK mask)
{
if (mSpeakerId != gAgentID)
{
@@ -254,7 +254,7 @@ BOOL LLOutputMonitorCtrl::handleMouseUp(S32 x, S32 y, MASK mask)
LLFloaterReg::showInstance("chat_voice", LLSD());
}
- return TRUE;
+ return true;
}
void LLOutputMonitorCtrl::setIsActiveChannel(bool val)
@@ -267,8 +267,8 @@ void LLOutputMonitorCtrl::setChannelState(EChannelState state)
mChannelState = state;
if (state == INACTIVE_CHANNEL)
{
- // switchIndicator will set it to TRUE when channel becomes active
- setVisible(FALSE);
+ // switchIndicator will set it to true when channel becomes active
+ setVisible(false);
}
}
@@ -325,7 +325,7 @@ void LLOutputMonitorCtrl::onChangeDetailed(const LLMute& mute)
// virtual
void LLOutputMonitorCtrl::switchIndicator(bool switch_on)
{
- if ((mChannelState != INACTIVE_CHANNEL) && (getVisible() != (BOOL)switch_on))
+ if ((mChannelState != INACTIVE_CHANNEL) && (getVisible() != (bool)switch_on))
{
setVisible(switch_on);
diff --git a/indra/newview/lloutputmonitorctrl.h b/indra/newview/lloutputmonitorctrl.h
index e80745e1df..a752648b2a 100644
--- a/indra/newview/lloutputmonitorctrl.h
+++ b/indra/newview/lloutputmonitorctrl.h
@@ -68,7 +68,7 @@ public:
// llview overrides
virtual void draw();
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask);
void setPower(F32 val);
F32 getPower(F32 val) const { return mPower; }
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index ff33efe4aa..c50b5b8c10 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -39,12 +39,7 @@ LLProfileDropTarget::LLProfileDropTarget(const LLProfileDropTarget::Params& p)
mAgentID(p.agent_id)
{}
-void LLProfileDropTarget::doDrop(EDragAndDropType cargo_type, void* cargo_data)
-{
- LL_INFOS() << "LLProfileDropTarget::doDrop()" << LL_ENDL;
-}
-
-BOOL LLProfileDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+bool LLProfileDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
@@ -55,10 +50,10 @@ BOOL LLProfileDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
LLToolDragAndDrop::handleGiveDragAndDrop(mAgentID, LLUUID::null, drop,
cargo_type, cargo_data, accept);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
static LLDefaultChildRegistry::Register<LLProfileDropTarget> r("profile_drop_target");
diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h
index f182660c8e..c8f49ccf1f 100644
--- a/indra/newview/llpanelavatar.h
+++ b/indra/newview/llpanelavatar.h
@@ -59,11 +59,9 @@ public:
LLProfileDropTarget(const Params&);
~LLProfileDropTarget() {}
- void doDrop(EDragAndDropType cargo_type, void* cargo_data);
-
//
// LLView functionality
- virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
diff --git a/indra/newview/llpanelavatartag.cpp b/indra/newview/llpanelavatartag.cpp
index 4ac818eb26..10f9a3be34 100644
--- a/indra/newview/llpanelavatartag.cpp
+++ b/indra/newview/llpanelavatartag.cpp
@@ -48,12 +48,12 @@ LLPanelAvatarTag::~LLPanelAvatarTag()
// Name callbacks will be automatically disconnected since LLPanel is trackable
}
-BOOL LLPanelAvatarTag::postBuild()
+bool LLPanelAvatarTag::postBuild()
{
mIcon = getChild<LLAvatarIconCtrl>("avatar_tag_icon");
mName = getChild<LLTextBox>("sender_tag_name");
mTime = getChild<LLTextBox>("tag_time");
- return TRUE;
+ return true;
}
void LLPanelAvatarTag::draw()
@@ -89,10 +89,10 @@ boost::signals2::connection LLPanelAvatarTag::setLeftButtonClickCallback(
return setCommitCallback(cb);
}
-BOOL LLPanelAvatarTag::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLPanelAvatarTag::handleMouseDown(S32 x, S32 y, MASK mask)
{
onCommit();
- return TRUE;
+ return true;
}
void LLPanelAvatarTag::onClick()
diff --git a/indra/newview/llpanelavatartag.h b/indra/newview/llpanelavatartag.h
index 1068ae0b4f..1af34abb78 100644
--- a/indra/newview/llpanelavatartag.h
+++ b/indra/newview/llpanelavatartag.h
@@ -57,12 +57,12 @@ public:
const LLUUID& getAvatarId() const { return mAvatarId; }
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void draw();
virtual boost::signals2::connection setLeftButtonClickCallback(
const commit_callback_t& cb);
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask);
void onClick();
private:
@@ -75,7 +75,7 @@ private:
const LLUUID& id,
const std::string& first,
const std::string& last,
- BOOL is_group);
+ bool is_group);
LLAvatarIconCtrl* mIcon; /// status tracking avatar icon
LLTextBox* mName; /// displays avatar name
diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp
index 3a4fc613b7..1b481dde7d 100644
--- a/indra/newview/llpanelblockedlist.cpp
+++ b/indra/newview/llpanelblockedlist.cpp
@@ -74,10 +74,10 @@ void LLPanelBlockedList::removePicker()
}
}
-BOOL LLPanelBlockedList::postBuild()
+bool LLPanelBlockedList::postBuild()
{
mBlockedList = getChild<LLBlockList>("blocked");
- mBlockedList->setCommitOnSelectionChange(TRUE);
+ mBlockedList->setCommitOnSelectionChange(true);
this->setVisibleCallback(boost::bind(&LLPanelBlockedList::removePicker, this));
switch (gSavedSettings.getU32("BlockPeopleSortOrder"))
@@ -181,7 +181,7 @@ void LLPanelBlockedList::onCustomAction(const LLSD& userdata)
}
}
-BOOL LLPanelBlockedList::isActionChecked(const LLSD& userdata)
+bool LLPanelBlockedList::isActionChecked(const LLSD& userdata)
{
std::string item = userdata.asString();
U32 sort_order = gSavedSettings.getU32("BlockPeopleSortOrder");
@@ -200,13 +200,13 @@ BOOL LLPanelBlockedList::isActionChecked(const LLSD& userdata)
void LLPanelBlockedList::blockResidentByName()
{
- const BOOL allow_multiple = FALSE;
- const BOOL close_on_select = TRUE;
+ const bool allow_multiple = false;
+ const bool close_on_select = true;
- LLView * button = findChild<LLButton>("plus_btn", TRUE);
+ LLView * button = findChild<LLButton>("plus_btn", true);
LLFloater* root_floater = gFloaterView->getParentFloater(this);
LLFloaterAvatarPicker * picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelBlockedList::callbackBlockPicked, this, _1, _2),
- allow_multiple, close_on_select, FALSE, root_floater->getName(), button);
+ allow_multiple, close_on_select, false, root_floater->getName(), button);
if (root_floater)
{
@@ -243,7 +243,7 @@ void LLPanelBlockedList::callbackBlockByName(const std::string& text)
if (text.empty()) return;
LLMute mute(LLUUID::null, text, LLMute::BY_NAME);
- BOOL success = LLMuteList::getInstance()->add(mute);
+ bool success = LLMuteList::getInstance()->add(mute);
if (!success)
{
LLNotificationsUtil::add("MuteByNameFailed");
@@ -267,7 +267,7 @@ LLFloaterGetBlockedObjectName::~LLFloaterGetBlockedObjectName()
gFocusMgr.releaseFocusIfNeeded( this );
}
-BOOL LLFloaterGetBlockedObjectName::postBuild()
+bool LLFloaterGetBlockedObjectName::postBuild()
{
getChild<LLButton>("OK")-> setCommitCallback(boost::bind(&LLFloaterGetBlockedObjectName::applyBlocking, this));
getChild<LLButton>("Cancel")-> setCommitCallback(boost::bind(&LLFloaterGetBlockedObjectName::cancelBlocking, this));
@@ -276,17 +276,17 @@ BOOL LLFloaterGetBlockedObjectName::postBuild()
return LLFloater::postBuild();
}
-BOOL LLFloaterGetBlockedObjectName::handleKeyHere(KEY key, MASK mask)
+bool LLFloaterGetBlockedObjectName::handleKeyHere(KEY key, MASK mask)
{
if (key == KEY_RETURN && mask == MASK_NONE)
{
applyBlocking();
- return TRUE;
+ return true;
}
else if (key == KEY_ESCAPE && mask == MASK_NONE)
{
cancelBlocking();
- return TRUE;
+ return true;
}
return LLFloater::handleKeyHere(key, mask);
diff --git a/indra/newview/llpanelblockedlist.h b/indra/newview/llpanelblockedlist.h
index 07f0437656..f5790e08f9 100644
--- a/indra/newview/llpanelblockedlist.h
+++ b/indra/newview/llpanelblockedlist.h
@@ -40,9 +40,9 @@ public:
LLPanelBlockedList();
~LLPanelBlockedList(){};
- virtual BOOL postBuild();
- virtual void draw();
- virtual void onOpen(const LLSD& key);
+ bool postBuild() override;
+ void draw() override;
+ void onOpen(const LLSD& key) override;
void selectBlocked(const LLUUID& id);
@@ -72,7 +72,7 @@ private:
// List commnads
void onCustomAction(const LLSD& userdata);
- BOOL isActionChecked(const LLSD& userdata);
+ bool isActionChecked(const LLSD& userdata);
void callbackBlockPicked(const uuid_vec_t& ids, const std::vector<LLAvatarName> names);
static void callbackBlockByName(const std::string& text);
@@ -92,9 +92,9 @@ class LLFloaterGetBlockedObjectName : public LLFloater
public:
typedef boost::function<void (const std::string&)> get_object_name_callback_t;
- virtual BOOL postBuild();
+ bool postBuild() override;
- virtual BOOL handleKeyHere(KEY key, MASK mask);
+ bool handleKeyHere(KEY key, MASK mask) override;
static LLFloaterGetBlockedObjectName* show(get_object_name_callback_t callback);
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index 183000ceac..d7d1b1565b 100644
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -106,7 +106,7 @@ LLPanelClassifiedInfo::~LLPanelClassifiedInfo()
sAllPanels.remove(this);
}
-BOOL LLPanelClassifiedInfo::postBuild()
+bool LLPanelClassifiedInfo::postBuild()
{
childSetAction("show_on_map_btn", boost::bind(&LLPanelClassifiedInfo::onMapClick, this));
childSetAction("teleport_btn", boost::bind(&LLPanelClassifiedInfo::onTeleportClick, this));
@@ -120,10 +120,10 @@ BOOL LLPanelClassifiedInfo::postBuild()
mSnapshotCtrl = getChild<LLTextureCtrl>("classified_snapshot");
mSnapshotRect = getDefaultSnapshotRect();
- return TRUE;
+ return true;
}
-void LLPanelClassifiedInfo::reshape(S32 width, S32 height, BOOL called_from_parent /* = TRUE */)
+void LLPanelClassifiedInfo::reshape(S32 width, S32 height, bool called_from_parent /* = true */)
{
LLPanel::reshape(width, height, called_from_parent);
@@ -288,8 +288,8 @@ void LLPanelClassifiedInfo::resetData()
getChild<LLUICtrl>("auto_renew")->setValue(LLStringUtil::null);
getChild<LLUICtrl>("creation_date")->setValue(LLStringUtil::null);
getChild<LLUICtrl>("click_through_text")->setValue(LLStringUtil::null);
- getChild<LLIconCtrl>("content_type_moderate")->setVisible(FALSE);
- getChild<LLIconCtrl>("content_type_general")->setVisible(FALSE);
+ getChild<LLIconCtrl>("content_type_moderate")->setVisible(false);
+ getChild<LLIconCtrl>("content_type_general")->setVisible(false);
}
void LLPanelClassifiedInfo::resetControls()
diff --git a/indra/newview/llpanelclassified.h b/indra/newview/llpanelclassified.h
index 471becd0f7..1ddd53612f 100644
--- a/indra/newview/llpanelclassified.h
+++ b/indra/newview/llpanelclassified.h
@@ -49,7 +49,7 @@ public:
/*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
@@ -112,7 +112,7 @@ public:
const LLVector3d& global_pos,
const std::string& sim_name);
- /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+ /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true);
/*virtual*/ void draw();
diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp
index 3bae0cebfb..38c6e32e3b 100644
--- a/indra/newview/llpanelcontents.cpp
+++ b/indra/newview/llpanelcontents.cpp
@@ -76,16 +76,16 @@ const char* LLPanelContents::PERMS_GROUP_CONTROL_KEY = "perms_group_control";
const char* LLPanelContents::PERMS_ANYONE_INTERACT_KEY = "perms_anyone_interact";
const char* LLPanelContents::PERMS_ANYONE_CONTROL_KEY = "perms_anyone_control";
-BOOL LLPanelContents::postBuild()
+bool LLPanelContents::postBuild()
{
- setMouseOpaque(FALSE);
+ setMouseOpaque(false);
childSetAction("button new script",&LLPanelContents::onClickNewScript, this);
childSetAction("button permissions",&LLPanelContents::onClickPermissions, this);
mPanelInventoryObject = getChild<LLPanelObjectInventory>("contents_inventory");
- return TRUE;
+ return true;
}
LLPanelContents::LLPanelContents()
@@ -105,7 +105,7 @@ void LLPanelContents::getState(LLViewerObject *objectp )
{
if( !objectp )
{
- getChildView("button new script")->setEnabled(FALSE);
+ getChildView("button new script")->setEnabled(false);
return;
}
@@ -116,7 +116,7 @@ void LLPanelContents::getState(LLViewerObject *objectp )
bool editable = gAgent.isGodlike()
|| (objectp->permModify() && !objectp->isPermanentEnforced()
&& ( objectp->permYouOwner() || ( !group_id.isNull() && gAgent.isInGroup(group_id) ))); // solves SL-23488
- BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME );
+ bool all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME );
// Edit script button - ok if object is editable and there's an unambiguous destination for the object.
getChildView("button new script")->setEnabled(
@@ -131,7 +131,7 @@ void LLPanelContents::getState(LLViewerObject *objectp )
void LLPanelContents::refresh()
{
- const BOOL children_ok = TRUE;
+ const bool children_ok = true;
LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(children_ok);
getState(object);
@@ -157,7 +157,7 @@ void LLPanelContents::clearContents()
// static
void LLPanelContents::onClickNewScript(void *userdata)
{
- const BOOL children_ok = TRUE;
+ const bool children_ok = true;
LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(children_ok);
if(object)
{
@@ -186,7 +186,7 @@ void LLPanelContents::onClickNewScript(void *userdata)
LLSaleInfo::DEFAULT,
LLInventoryItemFlags::II_FLAGS_NONE,
time_corrected());
- object->saveScript(new_item, TRUE, true);
+ object->saveScript(new_item, true, true);
std::string name = new_item->getName();
diff --git a/indra/newview/llpanelcontents.h b/indra/newview/llpanelcontents.h
index 6ecc78afa0..da02353613 100644
--- a/indra/newview/llpanelcontents.h
+++ b/indra/newview/llpanelcontents.h
@@ -43,7 +43,7 @@ class LLSpinCtrl;
class LLPanelContents : public LLPanel
{
public:
- virtual BOOL postBuild();
+ virtual bool postBuild();
LLPanelContents();
virtual ~LLPanelContents();
diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp
index 839f25761a..d387bbce43 100644
--- a/indra/newview/llpaneleditsky.cpp
+++ b/indra/newview/llpaneleditsky.cpp
@@ -139,7 +139,7 @@ LLPanelSettingsSkyAtmosTab::LLPanelSettingsSkyAtmosTab() :
}
-BOOL LLPanelSettingsSkyAtmosTab::postBuild()
+bool LLPanelSettingsSkyAtmosTab::postBuild()
{
getChild<LLUICtrl>(FIELD_SKY_AMBIENT_LIGHT)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onAmbientLightChanged(); });
getChild<LLUICtrl>(FIELD_SKY_BLUE_HORIZON)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onBlueHorizonChanged(); });
@@ -156,11 +156,11 @@ BOOL LLPanelSettingsSkyAtmosTab::postBuild()
getChild<LLUICtrl>(FIELD_REFLECTION_PROBE_AMBIANCE)->setCommitCallback([this](LLUICtrl*, const LLSD&) { onReflectionProbeAmbianceChanged(); });
refresh();
- return TRUE;
+ return true;
}
//virtual
-void LLPanelSettingsSkyAtmosTab::setEnabled(BOOL enabled)
+void LLPanelSettingsSkyAtmosTab::setEnabled(bool enabled)
{
LLPanelSettingsSky::setEnabled(enabled);
@@ -184,8 +184,8 @@ void LLPanelSettingsSkyAtmosTab::refresh()
{
if (!mSkySettings)
{
- setAllChildrenEnabled(FALSE);
- setEnabled(FALSE);
+ setAllChildrenEnabled(false);
+ setEnabled(false);
return;
}
@@ -357,7 +357,7 @@ LLPanelSettingsSkyCloudTab::LLPanelSettingsSkyCloudTab() :
{
}
-BOOL LLPanelSettingsSkyCloudTab::postBuild()
+bool LLPanelSettingsSkyCloudTab::postBuild()
{
getChild<LLUICtrl>(FIELD_SKY_CLOUD_COLOR)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudColorChanged(); });
getChild<LLUICtrl>(FIELD_SKY_CLOUD_COVERAGE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudCoverageChanged(); });
@@ -367,7 +367,7 @@ BOOL LLPanelSettingsSkyCloudTab::postBuild()
getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCROLL_XY)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudScrollChanged(); });
getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudMapChanged(); });
getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setDefaultImageAssetID(LLSettingsSky::GetDefaultCloudNoiseTextureId());
- getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setAllowNoTexture(TRUE);
+ getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setAllowNoTexture(true);
getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_X)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudDensityChanged(); });
getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_Y)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudDensityChanged(); });
@@ -378,11 +378,11 @@ BOOL LLPanelSettingsSkyCloudTab::postBuild()
refresh();
- return TRUE;
+ return true;
}
//virtual
-void LLPanelSettingsSkyCloudTab::setEnabled(BOOL enabled)
+void LLPanelSettingsSkyCloudTab::setEnabled(bool enabled)
{
LLPanelSettingsSky::setEnabled(enabled);
@@ -405,8 +405,8 @@ void LLPanelSettingsSkyCloudTab::refresh()
{
if (!mSkySettings)
{
- setAllChildrenEnabled(FALSE);
- setEnabled(FALSE);
+ setAllChildrenEnabled(false);
+ setEnabled(false);
return;
}
@@ -510,7 +510,7 @@ LLPanelSettingsSkySunMoonTab::LLPanelSettingsSkySunMoonTab() :
}
-BOOL LLPanelSettingsSkySunMoonTab::postBuild()
+bool LLPanelSettingsSkySunMoonTab::postBuild()
{
getChild<LLUICtrl>(FIELD_SKY_SUN_MOON_COLOR)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSunMoonColorChanged(); });
getChild<LLUICtrl>(FIELD_SKY_GLOW_FOCUS)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onGlowChanged(); });
@@ -523,24 +523,24 @@ BOOL LLPanelSettingsSkySunMoonTab::postBuild()
getChild<LLUICtrl>(FIELD_SKY_SUN_SCALE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSunScaleChanged(); });
getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setBlankImageAssetID(LLSettingsSky::GetBlankSunTextureId());
getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setDefaultImageAssetID(LLSettingsSky::GetBlankSunTextureId());
- getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setAllowNoTexture(TRUE);
+ getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setAllowNoTexture(true);
getChild<LLUICtrl>(FIELD_SKY_MOON_ROTATION)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonRotationChanged(); });
getChild<LLUICtrl>(FIELD_SKY_MOON_AZIMUTH)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonAzimElevChanged(); });
getChild<LLUICtrl>(FIELD_SKY_MOON_ELEVATION)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonAzimElevChanged(); });
getChild<LLUICtrl>(FIELD_SKY_MOON_IMAGE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonImageChanged(); });
getChild<LLTextureCtrl>(FIELD_SKY_MOON_IMAGE)->setDefaultImageAssetID(LLSettingsSky::GetDefaultMoonTextureId());
getChild<LLTextureCtrl>(FIELD_SKY_MOON_IMAGE)->setBlankImageAssetID(LLSettingsSky::GetDefaultMoonTextureId());
- getChild<LLTextureCtrl>(FIELD_SKY_MOON_IMAGE)->setAllowNoTexture(TRUE);
+ getChild<LLTextureCtrl>(FIELD_SKY_MOON_IMAGE)->setAllowNoTexture(true);
getChild<LLUICtrl>(FIELD_SKY_MOON_SCALE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonScaleChanged(); });
getChild<LLUICtrl>(FIELD_SKY_MOON_BRIGHTNESS)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonBrightnessChanged(); });
refresh();
- return TRUE;
+ return true;
}
//virtual
-void LLPanelSettingsSkySunMoonTab::setEnabled(BOOL enabled)
+void LLPanelSettingsSkySunMoonTab::setEnabled(bool enabled)
{
LLPanelSettingsSky::setEnabled(enabled);
@@ -553,8 +553,8 @@ void LLPanelSettingsSkySunMoonTab::setEnabled(BOOL enabled)
getChild<LLUICtrl>(FIELD_SKY_SUN_SCALE)->setEnabled(enabled);
getChild<LLUICtrl>(FIELD_SKY_MOON_SCALE)->setEnabled(enabled);
getChild<LLUICtrl>(FIELD_SKY_MOON_BRIGHTNESS)->setEnabled(enabled);
- getChildView(PANEL_SKY_SUN_LAYOUT)->setAllChildrenEnabled(TRUE);
- getChildView(PANEL_SKY_MOON_LAYOUT)->setAllChildrenEnabled(TRUE);
+ getChildView(PANEL_SKY_SUN_LAYOUT)->setAllChildrenEnabled(true);
+ getChildView(PANEL_SKY_MOON_LAYOUT)->setAllChildrenEnabled(true);
}
}
@@ -562,18 +562,18 @@ void LLPanelSettingsSkySunMoonTab::refresh()
{
if (!mSkySettings || !getCanChangeSettings())
{
- getChildView(PANEL_SKY_SUN_LAYOUT)->setAllChildrenEnabled(FALSE);
- getChildView(PANEL_SKY_MOON_LAYOUT)->setAllChildrenEnabled(FALSE);
- getChildView(FIELD_SKY_SUN_BEACON)->setEnabled(TRUE);
- getChildView(FIELD_SKY_MOON_BEACON)->setEnabled(TRUE);
+ getChildView(PANEL_SKY_SUN_LAYOUT)->setAllChildrenEnabled(false);
+ getChildView(PANEL_SKY_MOON_LAYOUT)->setAllChildrenEnabled(false);
+ getChildView(FIELD_SKY_SUN_BEACON)->setEnabled(true);
+ getChildView(FIELD_SKY_MOON_BEACON)->setEnabled(true);
if (!mSkySettings)
return;
}
else
{
- setEnabled(TRUE);
- setAllChildrenEnabled(TRUE);
+ setEnabled(true);
+ setAllChildrenEnabled(true);
}
getChild<LLColorSwatchCtrl>(FIELD_SKY_SUN_MOON_COLOR)->set(mSkySettings->getSunlightColor() / SLIDER_SCALE_SUN_AMBIENT);
@@ -780,7 +780,7 @@ LLPanelSettingsSkyDensityTab::LLPanelSettingsSkyDensityTab()
{
}
-BOOL LLPanelSettingsSkyDensityTab::postBuild()
+bool LLPanelSettingsSkyDensityTab::postBuild()
{
getChild<LLUICtrl>(FIELD_SKY_DENSITY_RAYLEIGH_EXPONENTIAL)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onRayleighExponentialChanged(); });
getChild<LLUICtrl>(FIELD_SKY_DENSITY_RAYLEIGH_EXPONENTIAL_SCALE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onRayleighExponentialScaleChanged(); });
@@ -803,10 +803,10 @@ BOOL LLPanelSettingsSkyDensityTab::postBuild()
getChild<LLUICtrl>(FIELD_SKY_DENSITY_ABSORPTION_MAX_ALTITUDE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onAbsorptionMaxAltitudeChanged(); });
refresh();
- return TRUE;
+ return true;
}
-void LLPanelSettingsSkyDensityTab::setEnabled(BOOL enabled)
+void LLPanelSettingsSkyDensityTab::setEnabled(bool enabled)
{
LLPanelSettingsSky::setEnabled(enabled);
@@ -838,8 +838,8 @@ void LLPanelSettingsSkyDensityTab::refresh()
{
if (!mSkySettings)
{
- setAllChildrenEnabled(FALSE);
- setEnabled(FALSE);
+ setAllChildrenEnabled(false);
+ setEnabled(false);
return;
}
diff --git a/indra/newview/llpaneleditsky.h b/indra/newview/llpaneleditsky.h
index 523cc134a8..b0d8bc3ff5 100644
--- a/indra/newview/llpaneleditsky.h
+++ b/indra/newview/llpaneleditsky.h
@@ -60,8 +60,8 @@ class LLPanelSettingsSkyAtmosTab : public LLPanelSettingsSky
public:
LLPanelSettingsSkyAtmosTab();
- virtual BOOL postBuild() override;
- virtual void setEnabled(BOOL enabled) override;
+ virtual bool postBuild() override;
+ virtual void setEnabled(bool enabled) override;
protected:
virtual void refresh() override;
@@ -91,8 +91,8 @@ class LLPanelSettingsSkyCloudTab : public LLPanelSettingsSky
public:
LLPanelSettingsSkyCloudTab();
- virtual BOOL postBuild() override;
- void setEnabled(BOOL enabled) override;
+ virtual bool postBuild() override;
+ void setEnabled(bool enabled) override;
protected:
virtual void refresh() override;
@@ -115,8 +115,8 @@ class LLPanelSettingsSkySunMoonTab : public LLPanelSettingsSky
public:
LLPanelSettingsSkySunMoonTab();
- virtual BOOL postBuild() override;
- virtual void setEnabled(BOOL enabled) override;
+ virtual bool postBuild() override;
+ virtual void setEnabled(bool enabled) override;
protected:
virtual void refresh() override;
@@ -144,8 +144,8 @@ class LLPanelSettingsSkyDensityTab : public LLPanelSettingsSky
public:
LLPanelSettingsSkyDensityTab();
- virtual BOOL postBuild() override;
- virtual void setEnabled(BOOL enabled) override;
+ virtual bool postBuild() override;
+ virtual void setEnabled(bool enabled) override;
protected:
virtual void refresh() override;
diff --git a/indra/newview/llpaneleditwater.cpp b/indra/newview/llpaneleditwater.cpp
index cf536dd87e..236cb6b97c 100644
--- a/indra/newview/llpaneleditwater.cpp
+++ b/indra/newview/llpaneleditwater.cpp
@@ -76,7 +76,7 @@ LLPanelSettingsWaterMainTab::LLPanelSettingsWaterMainTab():
}
-BOOL LLPanelSettingsWaterMainTab::postBuild()
+bool LLPanelSettingsWaterMainTab::postBuild()
{
mClrFogColor = getChild<LLColorSwatchCtrl>(FIELD_WATER_FOG_COLOR);
mTxtNormalMap = getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP);
@@ -106,11 +106,11 @@ BOOL LLPanelSettingsWaterMainTab::postBuild()
refresh();
- return TRUE;
+ return true;
}
//virtual
-void LLPanelSettingsWaterMainTab::setEnabled(BOOL enabled)
+void LLPanelSettingsWaterMainTab::setEnabled(bool enabled)
{
LLPanelSettingsWater::setEnabled(enabled);
getChild<LLUICtrl>(FIELD_WATER_FOG_DENSITY)->setEnabled(enabled);
@@ -132,8 +132,8 @@ void LLPanelSettingsWaterMainTab::refresh()
{
if (!mWaterSettings)
{
- setAllChildrenEnabled(FALSE);
- setEnabled(FALSE);
+ setAllChildrenEnabled(false);
+ setEnabled(false);
return;
}
diff --git a/indra/newview/llpaneleditwater.h b/indra/newview/llpaneleditwater.h
index 4b7ec903c9..c617316463 100644
--- a/indra/newview/llpaneleditwater.h
+++ b/indra/newview/llpaneleditwater.h
@@ -65,8 +65,8 @@ class LLPanelSettingsWaterMainTab : public LLPanelSettingsWater
public:
LLPanelSettingsWaterMainTab();
- virtual BOOL postBuild() override;
- virtual void setEnabled(BOOL enabled) override;
+ virtual bool postBuild() override;
+ virtual void setEnabled(bool enabled) override;
protected:
virtual void refresh() override;
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index c06d17410e..5a4dfd5458 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -350,40 +350,40 @@ LLEditWearableDictionary::ColorSwatchCtrls::ColorSwatchCtrls()
LLEditWearableDictionary::TextureCtrls::TextureCtrls()
{
- addEntry(TEX_HEAD_BODYPAINT, new PickerControlEntry(TEX_HEAD_BODYPAINT, "Head", LLUUID::null, TRUE));
- addEntry(TEX_UPPER_BODYPAINT, new PickerControlEntry(TEX_UPPER_BODYPAINT, "Upper Body", LLUUID::null, TRUE));
- addEntry(TEX_LOWER_BODYPAINT, new PickerControlEntry(TEX_LOWER_BODYPAINT, "Lower Body", LLUUID::null, TRUE));
- addEntry(TEX_HAIR, new PickerControlEntry(TEX_HAIR, "Texture", LLUUID(gSavedSettings.getString("UIImgDefaultHairUUID")), FALSE));
- addEntry(TEX_EYES_IRIS, new PickerControlEntry(TEX_EYES_IRIS, "Iris", LLUUID(gSavedSettings.getString("UIImgDefaultEyesUUID")), FALSE));
- addEntry(TEX_UPPER_SHIRT, new PickerControlEntry(TEX_UPPER_SHIRT, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultShirtUUID")), FALSE));
- addEntry(TEX_LOWER_PANTS, new PickerControlEntry(TEX_LOWER_PANTS, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultPantsUUID")), FALSE));
- addEntry(TEX_LOWER_SHOES, new PickerControlEntry(TEX_LOWER_SHOES, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultShoesUUID")), FALSE));
- addEntry(TEX_LOWER_SOCKS, new PickerControlEntry(TEX_LOWER_SOCKS, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultSocksUUID")), FALSE));
- addEntry(TEX_UPPER_JACKET, new PickerControlEntry(TEX_UPPER_JACKET, "Upper Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultJacketUUID")), FALSE));
- addEntry(TEX_LOWER_JACKET, new PickerControlEntry(TEX_LOWER_JACKET, "Lower Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultJacketUUID")), FALSE));
- addEntry(TEX_SKIRT, new PickerControlEntry(TEX_SKIRT, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultSkirtUUID")), FALSE));
- addEntry(TEX_UPPER_GLOVES, new PickerControlEntry(TEX_UPPER_GLOVES, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultGlovesUUID")), FALSE));
- addEntry(TEX_UPPER_UNDERSHIRT, new PickerControlEntry(TEX_UPPER_UNDERSHIRT, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultUnderwearUUID")), FALSE));
- addEntry(TEX_LOWER_UNDERPANTS, new PickerControlEntry(TEX_LOWER_UNDERPANTS, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultUnderwearUUID")), FALSE));
- addEntry(TEX_LOWER_ALPHA, new PickerControlEntry(TEX_LOWER_ALPHA, "Lower Alpha", LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")), TRUE));
- addEntry(TEX_UPPER_ALPHA, new PickerControlEntry(TEX_UPPER_ALPHA, "Upper Alpha", LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")), TRUE));
- addEntry(TEX_HEAD_ALPHA, new PickerControlEntry(TEX_HEAD_ALPHA, "Head Alpha", LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")), TRUE));
- addEntry(TEX_EYES_ALPHA, new PickerControlEntry(TEX_EYES_ALPHA, "Eye Alpha", LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")), TRUE));
- addEntry(TEX_HAIR_ALPHA, new PickerControlEntry(TEX_HAIR_ALPHA, "Hair Alpha", LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")), TRUE));
- addEntry(TEX_LOWER_TATTOO, new PickerControlEntry(TEX_LOWER_TATTOO, "Lower Tattoo", LLUUID::null, TRUE));
- addEntry(TEX_UPPER_TATTOO, new PickerControlEntry(TEX_UPPER_TATTOO, "Upper Tattoo", LLUUID::null, TRUE));
- addEntry(TEX_HEAD_TATTOO, new PickerControlEntry(TEX_HEAD_TATTOO, "Head Tattoo", LLUUID::null, TRUE));
- addEntry(TEX_LOWER_UNIVERSAL_TATTOO, new PickerControlEntry(TEX_LOWER_UNIVERSAL_TATTOO, "Lower Universal Tattoo", LLUUID::null, TRUE));
- addEntry(TEX_UPPER_UNIVERSAL_TATTOO, new PickerControlEntry(TEX_UPPER_UNIVERSAL_TATTOO, "Upper Universal Tattoo", LLUUID::null, TRUE));
- addEntry(TEX_HEAD_UNIVERSAL_TATTOO, new PickerControlEntry(TEX_HEAD_UNIVERSAL_TATTOO, "Head Universal Tattoo", LLUUID::null, TRUE));
- addEntry(TEX_SKIRT_TATTOO, new PickerControlEntry(TEX_SKIRT_TATTOO, "Skirt Tattoo", LLUUID::null, TRUE));
- addEntry(TEX_HAIR_TATTOO, new PickerControlEntry(TEX_HAIR_TATTOO, "Hair Tattoo", LLUUID::null, TRUE));
- addEntry(TEX_EYES_TATTOO, new PickerControlEntry(TEX_EYES_TATTOO, "Eyes Tattoo", LLUUID::null, TRUE));
- addEntry(TEX_LEFT_ARM_TATTOO, new PickerControlEntry(TEX_LEFT_ARM_TATTOO, "Left Arm Tattoo", LLUUID::null, TRUE));
- addEntry(TEX_LEFT_LEG_TATTOO, new PickerControlEntry(TEX_LEFT_LEG_TATTOO, "Left Leg Tattoo", LLUUID::null, TRUE));
- addEntry(TEX_AUX1_TATTOO, new PickerControlEntry(TEX_AUX1_TATTOO, "Aux1 Tattoo", LLUUID::null, TRUE));
- addEntry(TEX_AUX2_TATTOO, new PickerControlEntry(TEX_AUX2_TATTOO, "Aux2 Tattoo", LLUUID::null, TRUE));
- addEntry(TEX_AUX3_TATTOO, new PickerControlEntry(TEX_AUX3_TATTOO, "Aux3 Tattoo", LLUUID::null, TRUE));
+ addEntry(TEX_HEAD_BODYPAINT, new PickerControlEntry(TEX_HEAD_BODYPAINT, "Head", LLUUID::null, true));
+ addEntry(TEX_UPPER_BODYPAINT, new PickerControlEntry(TEX_UPPER_BODYPAINT, "Upper Body", LLUUID::null, true));
+ addEntry(TEX_LOWER_BODYPAINT, new PickerControlEntry(TEX_LOWER_BODYPAINT, "Lower Body", LLUUID::null, true));
+ addEntry(TEX_HAIR, new PickerControlEntry(TEX_HAIR, "Texture", LLUUID(gSavedSettings.getString("UIImgDefaultHairUUID")), false));
+ addEntry(TEX_EYES_IRIS, new PickerControlEntry(TEX_EYES_IRIS, "Iris", LLUUID(gSavedSettings.getString("UIImgDefaultEyesUUID")), false));
+ addEntry(TEX_UPPER_SHIRT, new PickerControlEntry(TEX_UPPER_SHIRT, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultShirtUUID")), false));
+ addEntry(TEX_LOWER_PANTS, new PickerControlEntry(TEX_LOWER_PANTS, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultPantsUUID")), false));
+ addEntry(TEX_LOWER_SHOES, new PickerControlEntry(TEX_LOWER_SHOES, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultShoesUUID")), false));
+ addEntry(TEX_LOWER_SOCKS, new PickerControlEntry(TEX_LOWER_SOCKS, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultSocksUUID")), false));
+ addEntry(TEX_UPPER_JACKET, new PickerControlEntry(TEX_UPPER_JACKET, "Upper Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultJacketUUID")), false));
+ addEntry(TEX_LOWER_JACKET, new PickerControlEntry(TEX_LOWER_JACKET, "Lower Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultJacketUUID")), false));
+ addEntry(TEX_SKIRT, new PickerControlEntry(TEX_SKIRT, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultSkirtUUID")), false));
+ addEntry(TEX_UPPER_GLOVES, new PickerControlEntry(TEX_UPPER_GLOVES, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultGlovesUUID")), false));
+ addEntry(TEX_UPPER_UNDERSHIRT, new PickerControlEntry(TEX_UPPER_UNDERSHIRT, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultUnderwearUUID")), false));
+ addEntry(TEX_LOWER_UNDERPANTS, new PickerControlEntry(TEX_LOWER_UNDERPANTS, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultUnderwearUUID")), false));
+ addEntry(TEX_LOWER_ALPHA, new PickerControlEntry(TEX_LOWER_ALPHA, "Lower Alpha", LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")), true));
+ addEntry(TEX_UPPER_ALPHA, new PickerControlEntry(TEX_UPPER_ALPHA, "Upper Alpha", LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")), true));
+ addEntry(TEX_HEAD_ALPHA, new PickerControlEntry(TEX_HEAD_ALPHA, "Head Alpha", LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")), true));
+ addEntry(TEX_EYES_ALPHA, new PickerControlEntry(TEX_EYES_ALPHA, "Eye Alpha", LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")), true));
+ addEntry(TEX_HAIR_ALPHA, new PickerControlEntry(TEX_HAIR_ALPHA, "Hair Alpha", LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")), true));
+ addEntry(TEX_LOWER_TATTOO, new PickerControlEntry(TEX_LOWER_TATTOO, "Lower Tattoo", LLUUID::null, true));
+ addEntry(TEX_UPPER_TATTOO, new PickerControlEntry(TEX_UPPER_TATTOO, "Upper Tattoo", LLUUID::null, true));
+ addEntry(TEX_HEAD_TATTOO, new PickerControlEntry(TEX_HEAD_TATTOO, "Head Tattoo", LLUUID::null, true));
+ addEntry(TEX_LOWER_UNIVERSAL_TATTOO, new PickerControlEntry(TEX_LOWER_UNIVERSAL_TATTOO, "Lower Universal Tattoo", LLUUID::null, true));
+ addEntry(TEX_UPPER_UNIVERSAL_TATTOO, new PickerControlEntry(TEX_UPPER_UNIVERSAL_TATTOO, "Upper Universal Tattoo", LLUUID::null, true));
+ addEntry(TEX_HEAD_UNIVERSAL_TATTOO, new PickerControlEntry(TEX_HEAD_UNIVERSAL_TATTOO, "Head Universal Tattoo", LLUUID::null, true));
+ addEntry(TEX_SKIRT_TATTOO, new PickerControlEntry(TEX_SKIRT_TATTOO, "Skirt Tattoo", LLUUID::null, true));
+ addEntry(TEX_HAIR_TATTOO, new PickerControlEntry(TEX_HAIR_TATTOO, "Hair Tattoo", LLUUID::null, true));
+ addEntry(TEX_EYES_TATTOO, new PickerControlEntry(TEX_EYES_TATTOO, "Eyes Tattoo", LLUUID::null, true));
+ addEntry(TEX_LEFT_ARM_TATTOO, new PickerControlEntry(TEX_LEFT_ARM_TATTOO, "Left Arm Tattoo", LLUUID::null, true));
+ addEntry(TEX_LEFT_LEG_TATTOO, new PickerControlEntry(TEX_LEFT_LEG_TATTOO, "Left Leg Tattoo", LLUUID::null, true));
+ addEntry(TEX_AUX1_TATTOO, new PickerControlEntry(TEX_AUX1_TATTOO, "Aux1 Tattoo", LLUUID::null, true));
+ addEntry(TEX_AUX2_TATTOO, new PickerControlEntry(TEX_AUX2_TATTOO, "Aux2 Tattoo", LLUUID::null, true));
+ addEntry(TEX_AUX3_TATTOO, new PickerControlEntry(TEX_AUX3_TATTOO, "Aux3 Tattoo", LLUUID::null, true));
}
LLEditWearableDictionary::PickerControlEntry::PickerControlEntry(ETextureIndex tex_index,
@@ -657,7 +657,7 @@ bool LLPanelEditWearable::changeHeightUnits(const LLSD& new_value)
return true;
}
-void LLPanelEditWearable::updateMetricLayout(BOOL new_value)
+void LLPanelEditWearable::updateMetricLayout(bool new_value)
{
LLUIString current_metric, replacment_metric;
current_metric = new_value ? mMeters : mFeet;
@@ -710,7 +710,7 @@ void LLPanelEditWearable::setWearablePanelVisibilityChangeCallback(LLPanel* body
}
// virtual
-BOOL LLPanelEditWearable::postBuild()
+bool LLPanelEditWearable::postBuild()
{
// buttons
mBtnRevert = getChild<LLButton>("revert_button");
@@ -825,20 +825,20 @@ BOOL LLPanelEditWearable::postBuild()
gSavedSettings.getControl("HeightUnits")->getSignal()->connect(boost::bind(&LLPanelEditWearable::changeHeightUnits, this, _2));
updateMetricLayout(gSavedSettings.getBOOL("HeightUnits"));
- return TRUE;
+ return true;
}
// virtual
// LLUICtrl
-BOOL LLPanelEditWearable::isDirty() const
+bool LLPanelEditWearable::isDirty() const
{
- BOOL isDirty = FALSE;
+ bool isDirty = false;
if (mWearablePtr)
{
if (mWearablePtr->isDirty() ||
(mWearableItem && mNameEditor && mWearableItem->getName().compare(mNameEditor->getText()) != 0))
{
- isDirty = TRUE;
+ isDirty = true;
}
}
return isDirty;
@@ -864,20 +864,20 @@ void LLPanelEditWearable::onClose()
revertChanges();
}
-void LLPanelEditWearable::setVisible(BOOL visible)
+void LLPanelEditWearable::setVisible(bool visible)
{
if (!visible)
{
- showWearable(mWearablePtr, FALSE);
+ showWearable(mWearablePtr, false);
}
LLPanel::setVisible(visible);
}
-void LLPanelEditWearable::setWearable(LLViewerWearable *wearable, BOOL disable_camera_switch)
+void LLPanelEditWearable::setWearable(LLViewerWearable *wearable, bool disable_camera_switch)
{
- showWearable(mWearablePtr, FALSE, disable_camera_switch);
+ showWearable(mWearablePtr, false, disable_camera_switch);
mWearablePtr = wearable;
- showWearable(mWearablePtr, TRUE, disable_camera_switch);
+ showWearable(mWearablePtr, true, disable_camera_switch);
}
//static
@@ -952,7 +952,7 @@ void LLPanelEditWearable::onCommitSexChange()
gAgentAvatarp->updateSexDependentLayerSets();
gAgentAvatarp->updateVisualParams();
- showWearable(mWearablePtr, TRUE, TRUE);
+ showWearable(mWearablePtr, true, true);
updateScrollingPanelUI();
}
@@ -984,7 +984,7 @@ void LLPanelEditWearable::onTexturePickerCommit(const LLUICtrl* ctrl)
U32 index;
if (gAgentWearables.getWearableIndex(getWearable(), index))
{
- gAgentAvatarp->setLocalTexture(entry->mTextureIndex, image, FALSE, index);
+ gAgentAvatarp->setLocalTexture(entry->mTextureIndex, image, false, index);
LLVisualParamHint::requestHintUpdates();
gAgentAvatarp->wearableUpdated(type);
}
@@ -1096,7 +1096,7 @@ void LLPanelEditWearable::saveChanges(bool force_save_as)
{
// the name of the wearable has changed, re-save wearable with new name
LLAppearanceMgr::instance().removeCOFItemLinks(mWearablePtr->getItemID(), gAgentAvatarp->mEndCustomizeCallback);
- gAgentWearables.saveWearableAs(mWearablePtr->getType(), index, new_name, description, FALSE);
+ gAgentWearables.saveWearableAs(mWearablePtr->getType(), index, new_name, description, false);
mNameEditor->setText(mWearableItem->getName());
}
else
@@ -1138,7 +1138,7 @@ void LLPanelEditWearable::revertChanges()
gAgentAvatarp->wearableUpdated(mWearablePtr->getType());
}
-void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, BOOL show, BOOL disable_camera_switch)
+void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, bool show, bool disable_camera_switch)
{
if (!wearable)
{
@@ -1220,12 +1220,12 @@ void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, BOOL show, BO
// Don't show female subparts if you're not female, etc.
if (!(gAgentAvatarp->getSex() & subpart_entry->mSex))
{
- tab->setVisible(FALSE);
+ tab->setVisible(false);
continue;
}
else
{
- tab->setVisible(TRUE);
+ tab->setVisible(true);
}
// what edit group do we want to extract params for?
@@ -1314,7 +1314,7 @@ void LLPanelEditWearable::changeCamera(U8 subpart)
if (gSavedSettings.getBOOL("AppearanceCameraMovement"))
{
// Unlock focus from avatar but don't stop animation to not interrupt ANIM_AGENT_CUSTOMIZE
- gAgentCamera.setFocusOnAvatar(FALSE, gAgentCamera.getCameraAnimating());
+ gAgentCamera.setFocusOnAvatar(false, gAgentCamera.getCameraAnimating());
gMorphView->updateCamera();
}
}
@@ -1344,7 +1344,7 @@ void LLPanelEditWearable::updateTypeSpecificControls(LLWearableType::EType type)
{
// Update avatar height
F32 new_size = gAgentAvatarp->mBodySize.mV[VZ];
- if (gSavedSettings.getBOOL("HeightUnits") == FALSE)
+ if (gSavedSettings.getBOOL("HeightUnits") == false)
{
// convert meters to feet
new_size = new_size / ONE_FOOT;
@@ -1402,7 +1402,7 @@ void LLPanelEditWearable::updateScrollingPanelUI()
continue;
}
- panel_list->updatePanels(TRUE);
+ panel_list->updatePanels(true);
}
}
}
@@ -1511,11 +1511,11 @@ void LLPanelEditWearable::buildParamList(LLScrollingPanelList *panel_list, value
LLScrollingPanelParamBase *panel_param = NULL;
if (wearable && wearable->getType() == LLWearableType::WT_PHYSICS) // Hack to show a different panel for physics. Should generalize this later.
{
- panel_param = new LLScrollingPanelParamBase( p, NULL, (*it).second, TRUE, this->getWearable(), jointp);
+ panel_param = new LLScrollingPanelParamBase( p, NULL, (*it).second, true, this->getWearable(), jointp);
}
else
{
- panel_param = new LLScrollingPanelParam( p, NULL, (*it).second, TRUE, this->getWearable(), jointp);
+ panel_param = new LLScrollingPanelParam( p, NULL, (*it).second, true, this->getWearable(), jointp);
}
panel_list->addPanel( panel_param );
}
@@ -1531,7 +1531,7 @@ void LLPanelEditWearable::updateVerbs()
can_copy = mWearableItem->getPermissions().allowCopyBy(gAgentID);
}
- BOOL is_dirty = isDirty();
+ bool is_dirty = isDirty();
mBtnRevert->setEnabled(is_dirty);
getChildView("save_as_button")->setEnabled(is_dirty && can_copy);
@@ -1544,7 +1544,7 @@ void LLPanelEditWearable::updateVerbs()
}
// update back button and title according to dirty state.
- static BOOL was_dirty = FALSE;
+ static bool was_dirty = false;
if (was_dirty != is_dirty) // to avoid redundant changes because this method is called from draw
{
static S32 label_width = mBtnBack->getFont()->getWidth(mBackBtnLabel);
@@ -1598,7 +1598,7 @@ void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LL
mPreviousAlphaTexture[te] = lto->getID();
LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture( IMG_INVISIBLE );
- gAgentAvatarp->setLocalTexture(te, image, FALSE, index);
+ gAgentAvatarp->setLocalTexture(te, image, false, index);
gAgentAvatarp->wearableUpdated(getWearable()->getType());
}
else
@@ -1620,7 +1620,7 @@ void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LL
return;
}
- gAgentAvatarp->setLocalTexture(te, image, FALSE, index);
+ gAgentAvatarp->setLocalTexture(te, image, false, index);
gAgentAvatarp->wearableUpdated(getWearable()->getType());
}
@@ -1667,8 +1667,8 @@ public:
bool handle(const LLSD& params, const LLSD& query_map, const std::string& grid, LLMediaCtrl* web)
{
- // change height units TRUE for meters and FALSE for feet
- BOOL new_value = (gSavedSettings.getBOOL("HeightUnits") == FALSE) ? TRUE : FALSE;
+ // change height units true for meters and false for feet
+ bool new_value = (gSavedSettings.getBOOL("HeightUnits") == false) ? true : false;
gSavedSettings.setBOOL("HeightUnits", new_value);
return true;
}
diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h
index 5a40e945c2..77619b5987 100644
--- a/indra/newview/llpaneleditwearable.h
+++ b/indra/newview/llpaneleditwearable.h
@@ -51,8 +51,8 @@ public:
LLPanelEditWearable( );
virtual ~LLPanelEditWearable();
- /*virtual*/ BOOL postBuild();
- /*virtual*/ BOOL isDirty() const; // LLUICtrl
+ /*virtual*/ bool postBuild();
+ /*virtual*/ bool isDirty() const; // LLUICtrl
/*virtual*/ void draw();
void onClose();
@@ -60,7 +60,7 @@ public:
void changeCamera(U8 subpart);
LLViewerWearable* getWearable() { return mWearablePtr; }
- void setWearable(LLViewerWearable *wearable, BOOL disable_camera_switch = FALSE);
+ void setWearable(LLViewerWearable *wearable, bool disable_camera_switch = false);
void saveChanges(bool force_save_as = false);
void revertChanges();
@@ -76,12 +76,12 @@ public:
void onSaveAsButtonClicked();
void saveAsCallback(const LLSD& notification, const LLSD& response);
- virtual void setVisible(BOOL visible);
+ virtual void setVisible(bool visible);
private:
typedef std::map<F32, LLViewerVisualParam*> value_map_t;
- void showWearable(LLViewerWearable* wearable, BOOL show, BOOL disable_camera_switch = FALSE);
+ void showWearable(LLViewerWearable* wearable, bool show, bool disable_camera_switch = false);
void updateScrollingPanelUI();
LLPanel* getPanel(LLWearableType::EType type);
void getSortedParams(value_map_t &sorted_params, const std::string &edit_group);
@@ -106,7 +106,7 @@ private:
bool changeHeightUnits(const LLSD& new_value);
// updates current metric and replacement metric label text
- void updateMetricLayout(BOOL new_value);
+ void updateMetricLayout(bool new_value);
// updates avatar height label
void updateAvatarHeightLabel();
diff --git a/indra/newview/llpanelemojicomplete.cpp b/indra/newview/llpanelemojicomplete.cpp
index e6e3a10e13..c794ca44ec 100644
--- a/indra/newview/llpanelemojicomplete.cpp
+++ b/indra/newview/llpanelemojicomplete.cpp
@@ -158,10 +158,10 @@ void LLPanelEmojiComplete::draw()
}
}
-BOOL LLPanelEmojiComplete::handleHover(S32 x, S32 y, MASK mask)
+bool LLPanelEmojiComplete::handleHover(S32 x, S32 y, MASK mask)
{
if (mScrollbar && mScrollbar->getVisible() && childrenHandleHover(x, y, mask))
- return TRUE;
+ return true;
LLVector2 curHover(x, y);
if ((mLastHover - curHover).lengthSquared() > MIN_MOUSE_MOVE_DELTA)
@@ -172,10 +172,10 @@ BOOL LLPanelEmojiComplete::handleHover(S32 x, S32 y, MASK mask)
mLastHover = curHover;
}
- return TRUE;
+ return true;
}
-BOOL LLPanelEmojiComplete::handleKey(KEY key, MASK mask, BOOL called_from_parent)
+bool LLPanelEmojiComplete::handleKey(KEY key, MASK mask, bool called_from_parent)
{
bool handled = false;
if (mTotalEmojis && MASK_NONE == mask)
@@ -223,43 +223,43 @@ BOOL LLPanelEmojiComplete::handleKey(KEY key, MASK mask, BOOL called_from_parent
if (handled)
{
- return TRUE;
+ return true;
}
return LLUICtrl::handleKey(key, mask, called_from_parent);
}
-BOOL LLPanelEmojiComplete::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLPanelEmojiComplete::handleMouseDown(S32 x, S32 y, MASK mask)
{
if (mScrollbar && mScrollbar->getVisible() && childrenHandleMouseDown(x, y, mask))
- return TRUE;
+ return true;
mCurSelected = posToIndex(x, y);
mLastHover = LLVector2(x, y);
- return TRUE;
+ return true;
}
-BOOL LLPanelEmojiComplete::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLPanelEmojiComplete::handleMouseUp(S32 x, S32 y, MASK mask)
{
if (mScrollbar && mScrollbar->getVisible() && childrenHandleMouseUp(x, y, mask))
- return TRUE;
+ return true;
mCurSelected = posToIndex(x, y);
onCommit();
- return TRUE;
+ return true;
}
-BOOL LLPanelEmojiComplete::handleScrollWheel(S32 x, S32 y, S32 clicks)
+bool LLPanelEmojiComplete::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
if (mNoScroll)
- return FALSE;
+ return false;
if (mScrollbar && mScrollbar->getVisible() && mScrollbar->handleScrollWheel(x, y, clicks))
{
mCurSelected = posToIndex(x, y);
- return TRUE;
+ return true;
}
if (mTotalEmojis > mVisibleEmojis)
@@ -270,10 +270,10 @@ BOOL LLPanelEmojiComplete::handleScrollWheel(S32 x, S32 y, S32 clicks)
S32 newScrollPos = llmax(0, (S32)mScrollPos + clicks);
mScrollPos = llclamp<size_t>((size_t)newScrollPos, 0, mTotalEmojis - mVisibleEmojis);
mCurSelected = posToIndex(x, y);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void LLPanelEmojiComplete::onCommit()
@@ -286,7 +286,7 @@ void LLPanelEmojiComplete::onCommit()
}
}
-void LLPanelEmojiComplete::reshape(S32 width, S32 height, BOOL called_from_parent)
+void LLPanelEmojiComplete::reshape(S32 width, S32 height, bool called_from_parent)
{
LLUICtrl::reshape(width, height, called_from_parent);
if (mAutoSize)
@@ -448,12 +448,12 @@ void LLPanelEmojiComplete::updateConstraints()
mScrollbar->setDocSize(mTotalEmojis);
mScrollbar->setPageSize(mVisibleEmojis);
mScrollbar->setOrigin(mRenderRect.mRight, 0);
- mScrollbar->reshape(mScrollbar->getThickness(), mRenderRect.mTop, TRUE);
- mScrollbar->setVisible(TRUE);
+ mScrollbar->reshape(mScrollbar->getThickness(), mRenderRect.mTop, true);
+ mScrollbar->setVisible(true);
}
else
{
- mScrollbar->setVisible(FALSE);
+ mScrollbar->setVisible(false);
}
}
else
@@ -504,7 +504,7 @@ LLFloaterEmojiComplete::LLFloaterEmojiComplete(const LLSD& sdKey)
setIsChrome(true);
}
-BOOL LLFloaterEmojiComplete::handleKey(KEY key, MASK mask, BOOL called_from_parent)
+bool LLFloaterEmojiComplete::handleKey(KEY key, MASK mask, bool called_from_parent)
{
bool handled = false;
if (MASK_NONE == mask)
@@ -519,7 +519,7 @@ BOOL LLFloaterEmojiComplete::handleKey(KEY key, MASK mask, BOOL called_from_pare
}
if (handled)
- return TRUE;
+ return true;
return LLFloater::handleKey(key, mask, called_from_parent);
}
@@ -542,10 +542,10 @@ void LLFloaterEmojiComplete::onOpen(const LLSD& key)
setRect(outer_rect);
}
- gFloaterView->adjustToFitScreen(this, FALSE);
+ gFloaterView->adjustToFitScreen(this, false);
}
-BOOL LLFloaterEmojiComplete::postBuild()
+bool LLFloaterEmojiComplete::postBuild()
{
mEmojiCtrl = findChild<LLPanelEmojiComplete>("emoji_complete_ctrl");
mEmojiCtrl->setCommitCallback(
@@ -561,7 +561,7 @@ BOOL LLFloaterEmojiComplete::postBuild()
return LLFloater::postBuild();
}
-void LLFloaterEmojiComplete::reshape(S32 width, S32 height, BOOL called_from_parent)
+void LLFloaterEmojiComplete::reshape(S32 width, S32 height, bool called_from_parent)
{
if (called_from_parent)
{
diff --git a/indra/newview/llpanelemojicomplete.h b/indra/newview/llpanelemojicomplete.h
index 36a965202e..3dfcc98a39 100644
--- a/indra/newview/llpanelemojicomplete.h
+++ b/indra/newview/llpanelemojicomplete.h
@@ -60,13 +60,13 @@ public:
virtual ~LLPanelEmojiComplete();
void draw() override;
- BOOL handleHover(S32 x, S32 y, MASK mask) override;
- BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent) override;
- BOOL handleMouseDown(S32 x, S32 y, MASK mask) override;
- BOOL handleMouseUp(S32 x, S32 y, MASK mask) override;
- BOOL handleScrollWheel(S32 x, S32 y, S32 clicks) override;
+ bool handleHover(S32 x, S32 y, MASK mask) override;
+ bool handleKey(KEY key, MASK mask, bool called_from_parent) override;
+ bool handleMouseDown(S32 x, S32 y, MASK mask) override;
+ bool handleMouseUp(S32 x, S32 y, MASK mask) override;
+ bool handleScrollWheel(S32 x, S32 y, S32 clicks) override;
void onCommit() override;
- void reshape(S32 width, S32 height, BOOL called_from_parent) override;
+ void reshape(S32 width, S32 height, bool called_from_parent) override;
public:
size_t getEmojiCount() const { return mEmojis.size(); }
@@ -118,10 +118,10 @@ public:
LLFloaterEmojiComplete(const LLSD& sdKey);
public:
- BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent) override;
+ bool handleKey(KEY key, MASK mask, bool called_from_parent) override;
void onOpen(const LLSD& key) override;
- BOOL postBuild() override;
- void reshape(S32 width, S32 height, BOOL called_from_parent) override;
+ bool postBuild() override;
+ void reshape(S32 width, S32 height, bool called_from_parent) override;
protected:
LLPanelEmojiComplete* mEmojiCtrl = nullptr;
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp
index 2ad7a23278..209be11eff 100644
--- a/indra/newview/llpanelenvironment.cpp
+++ b/indra/newview/llpanelenvironment.cpp
@@ -165,7 +165,7 @@ LLPanelEnvironmentInfo::~LLPanelEnvironmentInfo()
mUpdateConnection.disconnect();
}
-BOOL LLPanelEnvironmentInfo::postBuild()
+bool LLPanelEnvironmentInfo::postBuild()
{
getChild<LLUICtrl>(BTN_USEDEFAULT)->setCommitCallback([this](LLUICtrl *, const LLSD &){ onBtnDefault(); });
@@ -198,7 +198,7 @@ BOOL LLPanelEnvironmentInfo::postBuild()
getChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[3])->setPanel(this, alt_prefixes[3]);
getChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[4])->setPanel(this, alt_prefixes[4]);
- return TRUE;
+ return true;
}
// virtual
@@ -208,7 +208,7 @@ void LLPanelEnvironmentInfo::onOpen(const LLSD& key)
}
// virtual
-void LLPanelEnvironmentInfo::onVisibilityChange(BOOL new_visibility)
+void LLPanelEnvironmentInfo::onVisibilityChange(bool new_visibility)
{
if (new_visibility)
{
@@ -871,7 +871,7 @@ void LLPanelEnvironmentInfo::onBtnSelect()
picker->setSettingsFilter(LLSettingsType::ST_NONE);
picker->setSettingsItemId(item_id);
picker->openFloater();
- picker->setFocus(TRUE);
+ picker->setFocus(true);
}
}
@@ -1133,17 +1133,17 @@ LLSettingsDropTarget::LLSettingsDropTarget(const LLSettingsDropTarget::Params& p
: LLView(p), mEnvironmentInfoPanel(NULL), mDndEnabled(false)
{}
-BOOL LLSettingsDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+bool LLSettingsDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
std::string& tooltip_msg)
{
- BOOL handled = FALSE;
+ bool handled = false;
if (getParent() && mDndEnabled)
{
- handled = TRUE;
+ handled = true;
switch (cargo_type)
{
diff --git a/indra/newview/llpanelenvironment.h b/indra/newview/llpanelenvironment.h
index 38e3f09e34..ff39714cea 100644
--- a/indra/newview/llpanelenvironment.h
+++ b/indra/newview/llpanelenvironment.h
@@ -47,11 +47,11 @@ public:
LLPanelEnvironmentInfo();
virtual ~LLPanelEnvironmentInfo();
- virtual BOOL postBuild() override;
+ virtual bool postBuild() override;
virtual void onOpen(const LLSD& key) override;
- virtual BOOL isDirty() const override { return getIsDirty(); }
- virtual void onVisibilityChange(BOOL new_visibility) override;
+ virtual bool isDirty() const override { return getIsDirty(); }
+ virtual void onVisibilityChange(bool new_visibility) override;
virtual void refresh() override;
@@ -206,7 +206,7 @@ public:
LLSettingsDropTarget(const Params&);
~LLSettingsDropTarget() {};
- virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
diff --git a/indra/newview/llpanelexperiencelisteditor.cpp b/indra/newview/llpanelexperiencelisteditor.cpp
index 854a32621a..4af30ef443 100644
--- a/indra/newview/llpanelexperiencelisteditor.cpp
+++ b/indra/newview/llpanelexperiencelisteditor.cpp
@@ -54,7 +54,7 @@ LLPanelExperienceListEditor::LLPanelExperienceListEditor()
{
}
-BOOL LLPanelExperienceListEditor::postBuild()
+bool LLPanelExperienceListEditor::postBuild()
{
mItems = getChild<LLNameListCtrl>("experience_list");
mAdd = getChild<LLButton>("btn_add");
@@ -68,7 +68,7 @@ BOOL LLPanelExperienceListEditor::postBuild()
mItems->setCommitCallback(boost::bind(&LLPanelExperienceListEditor::checkButtonsEnabled, this));
checkButtonsEnabled();
- return TRUE;
+ return true;
}
const uuid_list_t& LLPanelExperienceListEditor::getExperienceIds() const
@@ -118,7 +118,7 @@ void LLPanelExperienceListEditor::onAdd()
mKey.generateNewID();
- LLFloaterExperiencePicker* picker=LLFloaterExperiencePicker::show(boost::bind(&LLPanelExperienceListEditor::addExperienceIds, this, _1), mKey, FALSE, TRUE, mFilters, mAdd);
+ LLFloaterExperiencePicker* picker=LLFloaterExperiencePicker::show(boost::bind(&LLPanelExperienceListEditor::addExperienceIds, this, _1), mKey, false, true, mFilters, mAdd);
mPicker = picker->getDerivedHandle<LLFloaterExperiencePicker>();
}
diff --git a/indra/newview/llpanelexperiencelisteditor.h b/indra/newview/llpanelexperiencelisteditor.h
index bc9867752d..1579e14c29 100644
--- a/indra/newview/llpanelexperiencelisteditor.h
+++ b/indra/newview/llpanelexperiencelisteditor.h
@@ -47,7 +47,7 @@ public:
typedef LLHandle<LLFloaterExperiencePicker> PickerHandle;
LLPanelExperienceListEditor();
~LLPanelExperienceListEditor();
- BOOL postBuild();
+ bool postBuild();
void loading();
diff --git a/indra/newview/llpanelexperiencelog.cpp b/indra/newview/llpanelexperiencelog.cpp
index e5c637938f..c4a70b11a1 100644
--- a/indra/newview/llpanelexperiencelog.cpp
+++ b/indra/newview/llpanelexperiencelog.cpp
@@ -54,7 +54,7 @@ LLPanelExperienceLog::LLPanelExperienceLog( )
buildFromFile("panel_experience_log.xml");
}
-BOOL LLPanelExperienceLog::postBuild( void )
+bool LLPanelExperienceLog::postBuild()
{
LLExperienceLog* log = LLExperienceLog::getInstance();
mEventList = getChild<LLScrollListCtrl>("experience_log_list");
@@ -82,7 +82,7 @@ BOOL LLPanelExperienceLog::postBuild( void )
mPageSize = log->getPageSize();
refresh();
mNewEvent = LLExperienceLog::instance().addUpdateSignal(boost::bind(&LLPanelExperienceLog::refresh, this));
- return TRUE;
+ return true;
}
LLPanelExperienceLog* LLPanelExperienceLog::create()
@@ -102,7 +102,7 @@ void LLPanelExperienceLog::refresh()
return;
}
- setAllChildrenEnabled(FALSE);
+ setAllChildrenEnabled(false);
LLSD item;
bool waiting = false;
@@ -179,9 +179,9 @@ void LLPanelExperienceLog::refresh()
}
else
{
- setAllChildrenEnabled(TRUE);
+ setAllChildrenEnabled(true);
- mEventList->setEnabled(TRUE);
+ mEventList->setEnabled(true);
getChild<LLButton>("btn_next")->setEnabled(moreItems);
getChild<LLButton>("btn_prev")->setEnabled(mCurrentPage>0);
getChild<LLButton>("btn_clear")->setEnabled(mEventList->getItemCount()>0);
diff --git a/indra/newview/llpanelexperiencelog.h b/indra/newview/llpanelexperiencelog.h
index 4135d9cac9..1436bbad41 100644
--- a/indra/newview/llpanelexperiencelog.h
+++ b/indra/newview/llpanelexperiencelog.h
@@ -40,7 +40,7 @@ public:
static LLPanelExperienceLog* create();
- /*virtual*/ BOOL postBuild(void);
+ /*virtual*/ bool postBuild();
void refresh();
protected:
diff --git a/indra/newview/llpanelexperiencepicker.cpp b/indra/newview/llpanelexperiencepicker.cpp
index 6dfdbaf63f..b28df7c371 100644
--- a/indra/newview/llpanelexperiencepicker.cpp
+++ b/indra/newview/llpanelexperiencepicker.cpp
@@ -70,28 +70,28 @@ LLPanelExperiencePicker::~LLPanelExperiencePicker()
{
}
-BOOL LLPanelExperiencePicker::postBuild()
+bool LLPanelExperiencePicker::postBuild()
{
getChild<LLLineEditor>(TEXT_EDIT)->setKeystrokeCallback( boost::bind(&LLPanelExperiencePicker::editKeystroke, this, _1, _2),NULL);
childSetAction(BTN_FIND, boost::bind(&LLPanelExperiencePicker::onBtnFind, this));
- getChildView(BTN_FIND)->setEnabled(TRUE);
+ getChildView(BTN_FIND)->setEnabled(true);
LLScrollListCtrl* searchresults = getChild<LLScrollListCtrl>(LIST_RESULTS);
searchresults->setDoubleClickCallback( boost::bind(&LLPanelExperiencePicker::onBtnSelect, this));
searchresults->setCommitCallback(boost::bind(&LLPanelExperiencePicker::onList, this));
- getChildView(LIST_RESULTS)->setEnabled(FALSE);
+ getChildView(LIST_RESULTS)->setEnabled(false);
getChild<LLScrollListCtrl>(LIST_RESULTS)->setCommentText(getString("no_results"));
childSetAction(BTN_OK, boost::bind(&LLPanelExperiencePicker::onBtnSelect, this));
- getChildView(BTN_OK)->setEnabled(FALSE);
+ getChildView(BTN_OK)->setEnabled(false);
childSetAction(BTN_CANCEL, boost::bind(&LLPanelExperiencePicker::onBtnClose, this));
childSetAction(BTN_PROFILE, boost::bind(&LLPanelExperiencePicker::onBtnProfile, this));
- getChildView(BTN_PROFILE)->setEnabled(FALSE);
+ getChildView(BTN_PROFILE)->setEnabled(false);
getChild<LLComboBox>(TEXT_MATURITY)->setCurrentByIndex(gSavedPerAccountSettings.getU32("ExperienceSearchMaturity"));
getChild<LLComboBox>(TEXT_MATURITY)->setCommitCallback(boost::bind(&LLPanelExperiencePicker::onMaturity, this));
- getChild<LLUICtrl>(TEXT_EDIT)->setFocus(TRUE);
+ getChild<LLUICtrl>(TEXT_EDIT)->setFocus(true);
childSetAction(BTN_LEFT, boost::bind(&LLPanelExperiencePicker::onPage, this, -1));
childSetAction(BTN_RIGHT, boost::bind(&LLPanelExperiencePicker::onPage, this, 1));
@@ -102,7 +102,7 @@ BOOL LLPanelExperiencePicker::postBuild()
// Start searching when Return is pressed in the line editor.
search_panel->setDefaultBtn(BTN_FIND);
}
- return TRUE;
+ return true;
}
void LLPanelExperiencePicker::editKeystroke( class LLLineEditor* caller, void* user_data )
@@ -140,11 +140,11 @@ void LLPanelExperiencePicker::onBtnFind()
getChild<LLScrollListCtrl>(LIST_RESULTS)->deleteAllItems();
getChild<LLScrollListCtrl>(LIST_RESULTS)->setCommentText(getString("searching"));
- getChildView(BTN_OK)->setEnabled(FALSE);
- getChildView(BTN_PROFILE)->setEnabled(FALSE);
+ getChildView(BTN_OK)->setEnabled(false);
+ getChildView(BTN_PROFILE)->setEnabled(false);
- getChildView(BTN_RIGHT)->setEnabled(FALSE);
- getChildView(BTN_LEFT)->setEnabled(FALSE);
+ getChildView(BTN_RIGHT)->setEnabled(false);
+ getChildView(BTN_LEFT)->setEnabled(false);
LLExperienceCache::instance().get(experience_id, boost::bind(&LLPanelExperiencePicker::onBtnFind, this));
return;
}
@@ -176,11 +176,11 @@ void LLPanelExperiencePicker::find()
getChild<LLScrollListCtrl>(LIST_RESULTS)->deleteAllItems();
getChild<LLScrollListCtrl>(LIST_RESULTS)->setCommentText(getString("searching"));
- getChildView(BTN_OK)->setEnabled(FALSE);
- getChildView(BTN_PROFILE)->setEnabled(FALSE);
+ getChildView(BTN_OK)->setEnabled(false);
+ getChildView(BTN_PROFILE)->setEnabled(false);
- getChildView(BTN_RIGHT)->setEnabled(FALSE);
- getChildView(BTN_LEFT)->setEnabled(FALSE);
+ getChildView(BTN_RIGHT)->setEnabled(false);
+ getChildView(BTN_LEFT)->setEnabled(false);
}
/*static*/
@@ -266,10 +266,10 @@ void LLPanelExperiencePicker::onBtnSelect()
getSelectedExperienceIds(results, experience_ids);
mSelectionCallback(experience_ids);
- getChild<LLScrollListCtrl>(LIST_RESULTS)->deselectAllItems(TRUE);
+ getChild<LLScrollListCtrl>(LIST_RESULTS)->deselectAllItems(true);
if(mCloseOnSelect)
{
- mCloseOnSelect = FALSE;
+ mCloseOnSelect = false;
onBtnClose();
}
}
@@ -368,14 +368,14 @@ void LLPanelExperiencePicker::filterContent()
{
getChildView(BTN_OK)->setEnabled(true);
search_results->setEnabled(true);
- search_results->sortByColumnIndex(1, TRUE);
+ search_results->sortByColumnIndex(1, true);
std::string text = getChild<LLUICtrl>(TEXT_EDIT)->getValue().asString();
- if (!search_results->selectItemByLabel(text, TRUE, 1))
+ if (!search_results->selectItemByLabel(text, true, 1))
{
search_results->selectFirstItem();
}
onList();
- search_results->setFocus(TRUE);
+ search_results->setFocus(true);
}
}
diff --git a/indra/newview/llpanelexperiencepicker.h b/indra/newview/llpanelexperiencepicker.h
index 97aa04cf4c..c1b8c27b2c 100644
--- a/indra/newview/llpanelexperiencepicker.h
+++ b/indra/newview/llpanelexperiencepicker.h
@@ -47,7 +47,7 @@ public:
LLPanelExperiencePicker();
virtual ~LLPanelExperiencePicker();
- BOOL postBuild();
+ bool postBuild();
void addFilter(filter_function func){mFilters.push_back(func);}
template <class IT>
diff --git a/indra/newview/llpanelexperiences.cpp b/indra/newview/llpanelexperiences.cpp
index 91d3b523fb..8ae407f5c7 100644
--- a/indra/newview/llpanelexperiences.cpp
+++ b/indra/newview/llpanelexperiences.cpp
@@ -51,7 +51,7 @@ LLPanelExperiences::LLPanelExperiences( )
buildFromFile("panel_experiences.xml");
}
-BOOL LLPanelExperiences::postBuild( void )
+bool LLPanelExperiences::postBuild( void )
{
mExperiencesList = getChild<LLFlatListView>("experiences_list");
if (hasString("loading_experiences"))
@@ -64,7 +64,7 @@ BOOL LLPanelExperiences::postBuild( void )
}
mExperiencesList->setComparator(&NAME_COMPARATOR);
- return TRUE;
+ return true;
}
@@ -212,10 +212,10 @@ LLPanelSearchExperiences* LLPanelSearchExperiences::create( const std::string& n
return panel;
}
-BOOL LLPanelSearchExperiences::postBuild( void )
+bool LLPanelSearchExperiences::postBuild( void )
{
childSetAction("search_button", boost::bind(&LLPanelSearchExperiences::doSearch, this));
- return TRUE;
+ return true;
}
bool LLExperienceItemComparator::compare(const LLPanel* item1, const LLPanel* item2) const
diff --git a/indra/newview/llpanelexperiences.h b/indra/newview/llpanelexperiences.h
index 11111f2a2e..70b93fd25b 100644
--- a/indra/newview/llpanelexperiences.h
+++ b/indra/newview/llpanelexperiences.h
@@ -40,7 +40,7 @@ class LLPanelSearchExperiences
public:
LLPanelSearchExperiences(){}
static LLPanelSearchExperiences* create(const std::string& name);
- /*virtual*/ BOOL postBuild(void);
+ /*virtual*/ bool postBuild(void);
void doSearch();
};
@@ -53,8 +53,7 @@ public:
static LLPanelExperiences* create(const std::string& name);
- /*virtual*/ BOOL postBuild(void);
- /*virtual*/ void onClosePanel();
+ /*virtual*/ bool postBuild(void);
void setExperienceList(const LLSD& experiences);
void getExperienceIdsList(std::vector<LLUUID>& result);
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index a527ebe47f..c9db4ae998 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -263,7 +263,7 @@ F32 LLPanelFace::getCurrentShinyOffsetV() { return getChild<LLUICtrl>("shinyOf
// Methods
//
-BOOL LLPanelFace::postBuild()
+bool LLPanelFace::postBuild()
{
childSetCommitCallback("combobox shininess",&LLPanelFace::onCommitShiny,this);
childSetCommitCallback("combobox bumpiness",&LLPanelFace::onCommitBump,this);
@@ -322,13 +322,13 @@ BOOL LLPanelFace::postBuild()
LLSpinCtrl* mCtrlGlow;
- setMouseOpaque(FALSE);
+ setMouseOpaque(false);
LLTextureCtrl* pbr_ctrl = findChild<LLTextureCtrl>("pbr_control");
if (pbr_ctrl)
{
pbr_ctrl->setDefaultImageAssetID(LLUUID::null);
- pbr_ctrl->setBlankImageAssetID(LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID);
+ pbr_ctrl->setBlankImageAssetID(BLANK_MATERIAL_ASSET_ID);
pbr_ctrl->setCommitCallback(boost::bind(&LLPanelFace::onCommitPbr, this, _2));
pbr_ctrl->setOnCancelCallback(boost::bind(&LLPanelFace::onCancelPbr, this, _2));
pbr_ctrl->setOnSelectCallback(boost::bind(&LLPanelFace::onSelectPbr, this, _2));
@@ -404,7 +404,7 @@ BOOL LLPanelFace::postBuild()
mColorSwatch->setOnSelectCallback(boost::bind(&LLPanelFace::onSelectColor, this, _2));
mColorSwatch->setFollowsTop();
mColorSwatch->setFollowsLeft();
- mColorSwatch->setCanApplyImmediately(TRUE);
+ mColorSwatch->setCanApplyImmediately(true);
}
mShinyColorSwatch = getChild<LLColorSwatchCtrl>("shinycolorswatch");
@@ -415,7 +415,7 @@ BOOL LLPanelFace::postBuild()
mShinyColorSwatch->setOnSelectCallback(boost::bind(&LLPanelFace::onSelectShinyColor, this, _2));
mShinyColorSwatch->setFollowsTop();
mShinyColorSwatch->setFollowsLeft();
- mShinyColorSwatch->setCanApplyImmediately(TRUE);
+ mShinyColorSwatch->setCanApplyImmediately(true);
}
mLabelColorTransp = getChild<LLTextBox>("color trans");
@@ -482,7 +482,7 @@ BOOL LLPanelFace::postBuild()
clearCtrls();
- return TRUE;
+ return true;
}
LLPanelFace::LLPanelFace()
@@ -503,7 +503,7 @@ LLPanelFace::~LLPanelFace()
unloadMedia();
}
-void LLPanelFace::onVisibilityChange(BOOL new_visibility)
+void LLPanelFace::onVisibilityChange(bool new_visibility)
{
if (new_visibility)
{
@@ -655,7 +655,7 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor
LLPanelFaceSetTEFunctor(LLPanelFace* panel) : mPanel(panel) {}
virtual bool apply(LLViewerObject* object, S32 te)
{
- BOOL valid;
+ bool valid;
F32 value;
std::string prefix;
@@ -1021,8 +1021,8 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
&& objectp->getPCode() == LL_PCODE_VOLUME
&& objectp->permModify())
{
- BOOL editable = objectp->permModify() && !objectp->isPermanentEnforced();
- BOOL attachment = objectp->isAttachment();
+ bool editable = objectp->permModify() && !objectp->isPermanentEnforced();
+ bool attachment = objectp->isAttachment();
bool has_pbr_material;
bool has_faces_without_pbr;
@@ -1237,18 +1237,18 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
// Texture
{
- mIsAlpha = FALSE;
+ mIsAlpha = false;
LLGLenum image_format = GL_RGB;
bool identical_image_format = false;
LLSelectedTE::getImageFormat(image_format, identical_image_format);
- mIsAlpha = FALSE;
+ mIsAlpha = false;
switch (image_format)
{
case GL_RGBA:
case GL_ALPHA:
{
- mIsAlpha = TRUE;
+ mIsAlpha = true;
}
break;
@@ -1300,7 +1300,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
{
if (identical_diffuse)
{
- texture_ctrl->setTentative(FALSE);
+ texture_ctrl->setTentative(false);
texture_ctrl->setEnabled(editable && !has_pbr_material);
texture_ctrl->setImageAssetID(id);
getChildView("combobox alphamode")->setEnabled(editable && mIsAlpha && transparency <= 0.f && !has_pbr_material);
@@ -1308,25 +1308,25 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
getChildView("maskcutoff")->setEnabled(editable && mIsAlpha && !has_pbr_material);
getChildView("label maskcutoff")->setEnabled(editable && mIsAlpha && !has_pbr_material);
- texture_ctrl->setBakeTextureEnabled(TRUE);
+ texture_ctrl->setBakeTextureEnabled(true);
}
else if (id.isNull())
{
// None selected
- texture_ctrl->setTentative(FALSE);
- texture_ctrl->setEnabled(FALSE);
+ texture_ctrl->setTentative(false);
+ texture_ctrl->setEnabled(false);
texture_ctrl->setImageAssetID(LLUUID::null);
- getChildView("combobox alphamode")->setEnabled(FALSE);
- getChildView("label alphamode")->setEnabled(FALSE);
- getChildView("maskcutoff")->setEnabled(FALSE);
- getChildView("label maskcutoff")->setEnabled(FALSE);
+ getChildView("combobox alphamode")->setEnabled(false);
+ getChildView("label alphamode")->setEnabled(false);
+ getChildView("maskcutoff")->setEnabled(false);
+ getChildView("label maskcutoff")->setEnabled(false);
texture_ctrl->setBakeTextureEnabled(false);
}
else
{
// Tentative: multiple selected with different textures
- texture_ctrl->setTentative(TRUE);
+ texture_ctrl->setTentative(true);
texture_ctrl->setEnabled(editable && !has_pbr_material);
texture_ctrl->setImageAssetID(id);
getChildView("combobox alphamode")->setEnabled(editable && mIsAlpha && transparency <= 0.f && !has_pbr_material);
@@ -1334,7 +1334,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
getChildView("maskcutoff")->setEnabled(editable && mIsAlpha && !has_pbr_material);
getChildView("label maskcutoff")->setEnabled(editable && mIsAlpha && !has_pbr_material);
- texture_ctrl->setBakeTextureEnabled(TRUE);
+ texture_ctrl->setBakeTextureEnabled(true);
}
if (attachment)
@@ -1454,9 +1454,9 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
getChildView("shinyScaleU")->setEnabled(editable && has_material && specmap_id.notNull());
getChildView("bumpyScaleU")->setEnabled(editable && has_material && normmap_id.notNull());
- BOOL diff_scale_tentative = !(identical && identical_diff_scale_s);
- BOOL norm_scale_tentative = !(identical && identical_norm_scale_s);
- BOOL spec_scale_tentative = !(identical && identical_spec_scale_s);
+ bool diff_scale_tentative = !(identical && identical_diff_scale_s);
+ bool norm_scale_tentative = !(identical && identical_norm_scale_s);
+ bool spec_scale_tentative = !(identical && identical_spec_scale_s);
getChild<LLUICtrl>("TexScaleU")->setTentative( LLSD(diff_scale_tentative));
getChild<LLUICtrl>("shinyScaleU")->setTentative(LLSD(spec_scale_tentative));
@@ -1485,9 +1485,9 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
spec_scale_t = editable ? spec_scale_t : 1.0f;
spec_scale_t *= identical_planar_texgen ? 2.0f : 1.0f;
- BOOL diff_scale_tentative = !identical_diff_scale_t;
- BOOL norm_scale_tentative = !identical_norm_scale_t;
- BOOL spec_scale_tentative = !identical_spec_scale_t;
+ bool diff_scale_tentative = !identical_diff_scale_t;
+ bool norm_scale_tentative = !identical_norm_scale_t;
+ bool spec_scale_tentative = !identical_spec_scale_t;
getChildView("TexScaleV")->setEnabled(editable && has_material);
getChildView("shinyScaleV")->setEnabled(editable && has_material && specmap_id.notNull());
@@ -1523,9 +1523,9 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
LLSelectedTEMaterial::getNormalOffsetX(norm_offset_s, identical_norm_offset_s);
LLSelectedTEMaterial::getSpecularOffsetX(spec_offset_s, identical_spec_offset_s);
- BOOL diff_offset_u_tentative = !(align_planar ? identical_planar_aligned : identical_diff_offset_s);
- BOOL norm_offset_u_tentative = !(align_planar ? identical_planar_aligned : identical_norm_offset_s);
- BOOL spec_offset_u_tentative = !(align_planar ? identical_planar_aligned : identical_spec_offset_s);
+ bool diff_offset_u_tentative = !(align_planar ? identical_planar_aligned : identical_diff_offset_s);
+ bool norm_offset_u_tentative = !(align_planar ? identical_planar_aligned : identical_norm_offset_s);
+ bool spec_offset_u_tentative = !(align_planar ? identical_planar_aligned : identical_spec_offset_s);
getChild<LLUICtrl>("TexOffsetU")->setValue( editable ? diff_offset_s : 0.0f);
getChild<LLUICtrl>("bumpyOffsetU")->setValue(editable ? norm_offset_s : 0.0f);
@@ -1553,9 +1553,9 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
LLSelectedTEMaterial::getNormalOffsetY(norm_offset_t, identical_norm_offset_t);
LLSelectedTEMaterial::getSpecularOffsetY(spec_offset_t, identical_spec_offset_t);
- BOOL diff_offset_v_tentative = !(align_planar ? identical_planar_aligned : identical_diff_offset_t);
- BOOL norm_offset_v_tentative = !(align_planar ? identical_planar_aligned : identical_norm_offset_t);
- BOOL spec_offset_v_tentative = !(align_planar ? identical_planar_aligned : identical_spec_offset_t);
+ bool diff_offset_v_tentative = !(align_planar ? identical_planar_aligned : identical_diff_offset_t);
+ bool norm_offset_v_tentative = !(align_planar ? identical_planar_aligned : identical_norm_offset_t);
+ bool spec_offset_v_tentative = !(align_planar ? identical_planar_aligned : identical_spec_offset_t);
getChild<LLUICtrl>("TexOffsetV")->setValue( editable ? diff_offset_t : 0.0f);
getChild<LLUICtrl>("bumpyOffsetV")->setValue(editable ? norm_offset_t : 0.0f);
@@ -1584,9 +1584,9 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
LLSelectedTEMaterial::getSpecularRotation(spec_rotation,identical_spec_rotation);
LLSelectedTEMaterial::getNormalRotation(norm_rotation,identical_norm_rotation);
- BOOL diff_rot_tentative = !(align_planar ? identical_planar_aligned : identical_diff_rotation);
- BOOL norm_rot_tentative = !(align_planar ? identical_planar_aligned : identical_norm_rotation);
- BOOL spec_rot_tentative = !(align_planar ? identical_planar_aligned : identical_spec_rotation);
+ bool diff_rot_tentative = !(align_planar ? identical_planar_aligned : identical_diff_rotation);
+ bool norm_rot_tentative = !(align_planar ? identical_planar_aligned : identical_norm_rotation);
+ bool spec_rot_tentative = !(align_planar ? identical_planar_aligned : identical_spec_rotation);
F32 diff_rot_deg = diff_rotation * RAD_TO_DEG;
F32 norm_rot_deg = norm_rotation * RAD_TO_DEG;
@@ -1715,7 +1715,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
break;
}
- BOOL repeats_tentative = !identical_repeats;
+ bool repeats_tentative = !identical_repeats;
LLSpinCtrl* rpt_ctrl = getChild<LLSpinCtrl>("rptctrl");
if (force_set_values)
@@ -1793,6 +1793,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
getChild<LLUICtrl>("shinyOffsetV")->setValue(offset_y);
getChild<LLUICtrl>("glossiness")->setValue(material->getSpecularLightExponent());
getChild<LLUICtrl>("environment")->setValue(material->getEnvironmentIntensity());
+ getChild<LLUICtrl>("mirror")->setValue(material->getEnvironmentIntensity());
updateShinyControls(!material->getSpecularID().isNull(), true);
}
@@ -1837,7 +1838,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
}
}
S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
- BOOL single_volume = (selected_count == 1);
+ bool single_volume = (selected_count == 1);
mMenuClipboardColor->setEnabled(editable && single_volume);
// Set variable values for numeric expressions
@@ -1860,36 +1861,36 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
if (pbr_ctrl)
{
pbr_ctrl->setImageAssetID(LLUUID::null);
- pbr_ctrl->setEnabled(FALSE);
+ pbr_ctrl->setEnabled(false);
}
LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("texture control");
if (texture_ctrl)
{
texture_ctrl->setImageAssetID( LLUUID::null );
- texture_ctrl->setEnabled( FALSE ); // this is a LLUICtrl, but we don't want it to have keyboard focus so we add it as a child, not a ctrl.
-// texture_ctrl->setValid(FALSE);
+ texture_ctrl->setEnabled( false ); // this is a LLUICtrl, but we don't want it to have keyboard focus so we add it as a child, not a ctrl.
+// texture_ctrl->setValid(false);
}
LLColorSwatchCtrl* mColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
if (mColorSwatch)
{
- mColorSwatch->setEnabled( FALSE );
+ mColorSwatch->setEnabled( false );
mColorSwatch->setFallbackImage(LLUI::getUIImage("locked_image.j2c") );
- mColorSwatch->setValid(FALSE);
+ mColorSwatch->setValid(false);
}
LLRadioGroup* radio_mat_type = getChild<LLRadioGroup>("radio_material_type");
if (radio_mat_type)
{
radio_mat_type->setSelectedIndex(0);
}
- getChildView("color trans")->setEnabled(FALSE);
- getChildView("rptctrl")->setEnabled(FALSE);
- getChildView("tex gen")->setEnabled(FALSE);
- getChildView("label shininess")->setEnabled(FALSE);
- getChildView("label bumpiness")->setEnabled(FALSE);
- getChildView("button align")->setEnabled(FALSE);
- getChildView("pbr_from_inventory")->setEnabled(FALSE);
- getChildView("edit_selected_pbr")->setEnabled(FALSE);
- getChildView("save_selected_pbr")->setEnabled(FALSE);
+ getChildView("color trans")->setEnabled(false);
+ getChildView("rptctrl")->setEnabled(false);
+ getChildView("tex gen")->setEnabled(false);
+ getChildView("label shininess")->setEnabled(false);
+ getChildView("label bumpiness")->setEnabled(false);
+ getChildView("button align")->setEnabled(false);
+ getChildView("pbr_from_inventory")->setEnabled(false);
+ getChildView("edit_selected_pbr")->setEnabled(false);
+ getChildView("save_selected_pbr")->setEnabled(false);
updateVisibility();
@@ -1999,7 +2000,7 @@ void LLPanelFace::updateUIGLTF(LLViewerObject* objectp, bool& has_pbr_material,
{
LLSelectedTE::getPbrMaterialId(pbr_id, identical_pbr, has_pbr_material, has_faces_without_pbr);
- pbr_ctrl->setTentative(identical_pbr ? FALSE : TRUE);
+ pbr_ctrl->setTentative(identical_pbr ? false : true);
pbr_ctrl->setEnabled(settable);
pbr_ctrl->setImageAssetID(pbr_id);
@@ -2028,7 +2029,7 @@ void LLPanelFace::updateUIGLTF(LLViewerObject* objectp, bool& has_pbr_material,
{
mVOInventoryListener = nullptr;
}
- if (!identical_pbr || pbr_id.isNull() || pbr_id == LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID)
+ if (!identical_pbr || pbr_id.isNull() || pbr_id == BLANK_MATERIAL_ASSET_ID)
{
mAgentInventoryListener = nullptr;
}
@@ -2115,7 +2116,7 @@ void LLPanelFace::refreshMedia()
&& first_object->permModify()
))
{
- getChildView("add_media")->setEnabled(FALSE);
+ getChildView("add_media")->setEnabled(false);
mTitleMediaText->clear();
clearMediaSettings();
return;
@@ -2126,13 +2127,13 @@ void LLPanelFace::refreshMedia()
if (!has_media_capability)
{
- getChildView("add_media")->setEnabled(FALSE);
+ getChildView("add_media")->setEnabled(false);
LL_WARNS("LLFloaterToolsMedia") << "Media not enabled (no capability) in this region!" << LL_ENDL;
clearMediaSettings();
return;
}
- BOOL is_nonpermanent_enforced = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode()
+ bool is_nonpermanent_enforced = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode()
&& LLSelectMgr::getInstance()->selectGetRootsNonPermanentEnforced())
|| LLSelectMgr::getInstance()->selectGetNonPermanentEnforced();
bool editable = is_nonpermanent_enforced && (first_object->permModify() || selectedMediaEditable());
@@ -2252,7 +2253,7 @@ void LLPanelFace::refreshMedia()
}
}
- getChildView("delete_media")->setEnabled(TRUE);
+ getChildView("delete_media")->setEnabled(true);
}
U32 materials_media = mComboMatMedia->getCurrentIndex();
@@ -2496,7 +2497,7 @@ void LLPanelFace::updateMediaSettings()
// Auto play
//value_bool = default_media_data.getAutoPlay();
- // set default to auto play TRUE -- angela EXT-5172
+ // set default to auto play true -- angela EXT-5172
value_bool = true;
struct functor_getter_auto_play : public LLSelectedTEGetFunctor< bool >
{
@@ -2508,7 +2509,7 @@ void LLPanelFace::updateMediaSettings()
if (object->getTE(face))
if (object->getTE(face)->getMediaData())
return object->getTE(face)->getMediaData()->getAutoPlay();
- //return mMediaEntry.getAutoPlay(); set default to auto play TRUE -- angela EXT-5172
+ //return mMediaEntry.getAutoPlay(); set default to auto play true -- angela EXT-5172
return true;
};
@@ -2522,7 +2523,7 @@ void LLPanelFace::updateMediaSettings()
// Auto scale
- // set default to auto scale TRUE -- angela EXT-5172
+ // set default to auto scale true -- angela EXT-5172
//value_bool = default_media_data.getAutoScale();
value_bool = true;
struct functor_getter_auto_scale : public LLSelectedTEGetFunctor< bool >
@@ -2535,7 +2536,7 @@ void LLPanelFace::updateMediaSettings()
if (object->getTE(face))
if (object->getTE(face)->getMediaData())
return object->getTE(face)->getMediaData()->getAutoScale();
- // return mMediaEntry.getAutoScale(); set default to auto scale TRUE -- angela EXT-5172
+ // return mMediaEntry.getAutoScale(); set default to auto scale true -- angela EXT-5172
return true;
};
@@ -3220,9 +3221,9 @@ void LLPanelFace::onCommitGlow(LLUICtrl* ctrl, void* userdata)
}
// static
-BOOL LLPanelFace::onDragPbr(LLUICtrl*, LLInventoryItem* item)
+bool LLPanelFace::onDragPbr(LLUICtrl*, LLInventoryItem* item)
{
- BOOL accept = TRUE;
+ bool accept = true;
for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin();
iter != LLSelectMgr::getInstance()->getSelection()->root_end(); iter++)
{
@@ -3230,7 +3231,7 @@ BOOL LLPanelFace::onDragPbr(LLUICtrl*, LLInventoryItem* item)
LLViewerObject* obj = node->getObject();
if (!LLToolDragAndDrop::isInventoryDropAcceptable(obj, item))
{
- accept = FALSE;
+ accept = false;
break;
}
}
@@ -3286,9 +3287,9 @@ void LLPanelFace::onSelectPbr(const LLSD& data)
}
// static
-BOOL LLPanelFace::onDragTexture(LLUICtrl*, LLInventoryItem* item)
+bool LLPanelFace::onDragTexture(LLUICtrl*, LLInventoryItem* item)
{
- BOOL accept = TRUE;
+ bool accept = true;
for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin();
iter != LLSelectMgr::getInstance()->getSelection()->root_end(); iter++)
{
@@ -3296,7 +3297,7 @@ BOOL LLPanelFace::onDragTexture(LLUICtrl*, LLInventoryItem* item)
LLViewerObject* obj = node->getObject();
if (!LLToolDragAndDrop::isInventoryDropAcceptable(obj, item))
{
- accept = FALSE;
+ accept = false;
break;
}
}
@@ -4682,7 +4683,7 @@ void LLPanelFace::onPasteTexture(LLViewerObject* objectp, S32 te)
else if (full_perm)
{
// Either library, local or existed as fullperm when user made a copy
- LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(imageid, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+ LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(imageid, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
objectp->setTEImage(U8(te), image);
}
}
diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h
index a64b85815f..9a34ce6f07 100644
--- a/indra/newview/llpanelface.h
+++ b/indra/newview/llpanelface.h
@@ -100,7 +100,7 @@ public:
class LLPanelFace : public LLPanel
{
public:
- virtual BOOL postBuild();
+ virtual bool postBuild();
LLPanelFace();
virtual ~LLPanelFace();
@@ -110,7 +110,7 @@ public:
static void onMaterialOverrideReceived(const LLUUID& object_id, S32 side);
- /*virtual*/ void onVisibilityChange(BOOL new_visibility);
+ /*virtual*/ void onVisibilityChange(bool new_visibility);
/*virtual*/ void draw();
LLMaterialPtr createDefaultMaterial(LLMaterialPtr current_material)
@@ -145,6 +145,7 @@ protected:
void sendTexGen(); // applies and sends bump map
void sendShiny(U32 shininess); // applies and sends shininess
void sendFullbright(); // applies and sends full bright
+
void sendGlow();
void alignTestureLayer();
@@ -153,10 +154,10 @@ protected:
void onCommitPbr(const LLSD& data);
void onCancelPbr(const LLSD& data);
void onSelectPbr(const LLSD& data);
- static BOOL onDragPbr(LLUICtrl* ctrl, LLInventoryItem* item);
+ static bool onDragPbr(LLUICtrl* ctrl, LLInventoryItem* item);
- // this function is to return TRUE if the drag should succeed.
- static BOOL onDragTexture(LLUICtrl* ctrl, LLInventoryItem* item);
+ // this function is to return true if the drag should succeed.
+ static bool onDragTexture(LLUICtrl* ctrl, LLInventoryItem* item);
void onCommitTexture(const LLSD& data);
void onCancelTexture(const LLSD& data);
@@ -234,7 +235,7 @@ protected:
static void onCommitShiny( LLUICtrl* ctrl, void* userdata);
static void onCommitAlphaMode( LLUICtrl* ctrl, void* userdata);
static void onCommitFullbright( LLUICtrl* ctrl, void* userdata);
- static void onCommitGlow( LLUICtrl* ctrl, void *userdata);
+ static void onCommitGlow( LLUICtrl* ctrl, void *userdata);
static void onCommitPlanarAlign( LLUICtrl* ctrl, void* userdata);
static void onCommitRepeatsPerMeter( LLUICtrl* ctrl, void* userinfo);
diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp
index ab255d5215..c8cb18d171 100644
--- a/indra/newview/llpanelgroup.cpp
+++ b/indra/newview/llpanelgroup.cpp
@@ -62,8 +62,8 @@ static LLPanelInjector<LLPanelGroup> t_panel_group("panel_group_info_sidetray");
LLPanelGroupTab::LLPanelGroupTab()
: LLPanel(),
- mAllowEdit(TRUE),
- mHasModal(FALSE)
+ mAllowEdit(true),
+ mHasModal(false)
{
mGroupID = LLUUID::null;
}
@@ -72,21 +72,21 @@ LLPanelGroupTab::~LLPanelGroupTab()
{
}
-BOOL LLPanelGroupTab::isVisibleByAgent(LLAgent* agentp)
+bool LLPanelGroupTab::isVisibleByAgent(LLAgent* agentp)
{
//default to being visible
- return TRUE;
+ return true;
}
-BOOL LLPanelGroupTab::postBuild()
+bool LLPanelGroupTab::postBuild()
{
- return TRUE;
+ return true;
}
LLPanelGroup::LLPanelGroup()
: LLPanel(),
LLGroupMgrObserver( LLUUID() ),
- mSkipRefresh(FALSE),
+ mSkipRefresh(false),
mButtonJoin(NULL)
{
// Set up the factory callbacks.
@@ -137,7 +137,7 @@ void LLPanelGroup::onOpen(const LLSD& key)
}
-BOOL LLPanelGroup::postBuild()
+bool LLPanelGroup::postBuild()
{
mDefaultNeedsApplyMesg = getString("default_needs_apply_text");
mWantApplyMesg = getString("want_apply_text");
@@ -187,7 +187,7 @@ BOOL LLPanelGroup::postBuild()
LLVoiceClient::getInstance()->addObserver(this);
- return TRUE;
+ return true;
}
void LLPanelGroup::reposButton(const std::string& name)
@@ -221,7 +221,7 @@ void LLPanelGroup::reposButtons()
reposButton("btn_call");
}
-void LLPanelGroup::reshape(S32 width, S32 height, BOOL called_from_parent )
+void LLPanelGroup::reshape(S32 width, S32 height, bool called_from_parent )
{
LLPanel::reshape(width, height, called_from_parent );
@@ -485,7 +485,7 @@ bool LLPanelGroup::apply(LLPanelGroupTab* tab)
}
}
- mSkipRefresh = TRUE;
+ mSkipRefresh = true;
return true;
}
@@ -538,7 +538,7 @@ void LLPanelGroup::refreshData()
{
if(mSkipRefresh)
{
- mSkipRefresh = FALSE;
+ mSkipRefresh = false;
return;
}
LLGroupMgr::getInstance()->clearGroupData(getID());
diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h
index be40b08a6d..5aeadaefdb 100644
--- a/indra/newview/llpanelgroup.h
+++ b/indra/newview/llpanelgroup.h
@@ -49,7 +49,7 @@ public:
LLPanelGroup();
virtual ~LLPanelGroup();
- virtual BOOL postBuild();
+ virtual bool postBuild();
void setGroupID(const LLUUID& group_id);
@@ -77,7 +77,7 @@ public:
void callGroup();
void chatGroup();
- virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+ virtual void reshape(S32 width, S32 height, bool called_from_parent = true);
static void showNotice(const std::string& subject,
const std::string& message,
@@ -107,7 +107,7 @@ protected:
LLTimer mRefreshTimer;
- BOOL mSkipRefresh;
+ bool mSkipRefresh;
std::string mDefaultNeedsApplyMesg;
std::string mWantApplyMesg;
@@ -135,7 +135,7 @@ public:
virtual bool needsApply(std::string& mesg) { return false; }
// Asks if there is currently a modal dialog being shown.
- virtual BOOL hasModal() { return mHasModal; }
+ virtual bool hasModal() { return mHasModal; }
// Request to apply current data.
// If returning fail, this function should modify the message to the user.
@@ -148,9 +148,9 @@ public:
virtual void update(LLGroupChange gc) { }
// This just connects the help button callback.
- virtual BOOL postBuild();
+ virtual bool postBuild();
- virtual BOOL isVisibleByAgent(LLAgent* agentp);
+ virtual bool isVisibleByAgent(LLAgent* agentp);
virtual void setGroupID(const LLUUID& id) {mGroupID = id;};
@@ -164,8 +164,8 @@ public:
protected:
LLUUID mGroupID;
- BOOL mAllowEdit;
- BOOL mHasModal;
+ bool mAllowEdit;
+ bool mHasModal;
};
#endif // LL_LLPANELGROUP_H
diff --git a/indra/newview/llpanelgroupbulk.cpp b/indra/newview/llpanelgroupbulk.cpp
index cffda02aa0..4ef5f1c733 100644
--- a/indra/newview/llpanelgroupbulk.cpp
+++ b/indra/newview/llpanelgroupbulk.cpp
@@ -93,7 +93,7 @@ void LLPanelGroupBulkImpl::callbackClickAdd(void* userdata)
LLView* button = panelp->findChild<LLButton>("add_button");
LLFloater* root_floater = gFloaterView->getParentFloater(panelp);
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(
- boost::bind(callbackAddUsers, _1, panelp->mImplementation), TRUE, FALSE, FALSE, root_floater->getName(), button);
+ boost::bind(callbackAddUsers, _1, panelp->mImplementation), true, false, false, root_floater->getName(), button);
if(picker)
{
root_floater->addDependentFloater(picker);
@@ -181,12 +181,12 @@ void LLPanelGroupBulkImpl::handleRemove()
}
mBulkAgentList->deleteSelectedItems();
- mRemoveButton->setEnabled(FALSE);
+ mRemoveButton->setEnabled(false);
if( mOKButton && mOKButton->getEnabled() &&
mBulkAgentList->isEmpty())
{
- mOKButton->setEnabled(FALSE);
+ mOKButton->setEnabled(false);
}
}
@@ -194,9 +194,9 @@ void LLPanelGroupBulkImpl::handleSelection()
{
std::vector<LLScrollListItem*> selection = mBulkAgentList->getAllSelected();
if (selection.empty())
- mRemoveButton->setEnabled(FALSE);
+ mRemoveButton->setEnabled(false);
else
- mRemoveButton->setEnabled(TRUE);
+ mRemoveButton->setEnabled(true);
}
void LLPanelGroupBulkImpl::addUsers(const std::vector<std::string>& names, const uuid_vec_t& agent_ids)
@@ -241,7 +241,7 @@ void LLPanelGroupBulkImpl::addUsers(const std::vector<std::string>& names, const
// We've successfully added someone to the list.
if(mOKButton && !mOKButton->getEnabled())
- mOKButton->setEnabled(TRUE);
+ mOKButton->setEnabled(true);
}
}
@@ -273,7 +273,7 @@ void LLPanelGroupBulk::clear()
mImplementation->mBulkAgentList->deleteAllItems();
if(mImplementation->mOKButton)
- mImplementation->mOKButton->setEnabled(FALSE);
+ mImplementation->mOKButton->setEnabled(false);
}
void LLPanelGroupBulk::update()
diff --git a/indra/newview/llpanelgroupbulkban.cpp b/indra/newview/llpanelgroupbulkban.cpp
index 2b6bf1bcd6..e38c8acdaa 100644
--- a/indra/newview/llpanelgroupbulkban.cpp
+++ b/indra/newview/llpanelgroupbulkban.cpp
@@ -55,16 +55,16 @@ LLPanelGroupBulkBan::LLPanelGroupBulkBan(const LLUUID& group_id) : LLPanelGroupB
buildFromFile( "panel_group_bulk_ban.xml");
}
-BOOL LLPanelGroupBulkBan::postBuild()
+bool LLPanelGroupBulkBan::postBuild()
{
- BOOL recurse = TRUE;
+ constexpr bool recurse = true;
mImplementation->mLoadingText = getString("loading");
mImplementation->mGroupName = getChild<LLTextBox>("group_name_text", recurse);
mImplementation->mBulkAgentList = getChild<LLNameListCtrl>("banned_agent_list", recurse);
if ( mImplementation->mBulkAgentList )
{
- mImplementation->mBulkAgentList->setCommitOnSelectionChange(TRUE);
+ mImplementation->mBulkAgentList->setCommitOnSelectionChange(true);
mImplementation->mBulkAgentList->setCommitCallback(LLPanelGroupBulkImpl::callbackSelect, mImplementation);
}
@@ -81,7 +81,7 @@ BOOL LLPanelGroupBulkBan::postBuild()
if ( mImplementation->mRemoveButton )
{
mImplementation->mRemoveButton->setClickedCallback(LLPanelGroupBulkImpl::callbackClickRemove, mImplementation);
- mImplementation->mRemoveButton->setEnabled(FALSE);
+ mImplementation->mRemoveButton->setEnabled(false);
}
mImplementation->mOKButton =
@@ -89,7 +89,7 @@ BOOL LLPanelGroupBulkBan::postBuild()
if ( mImplementation->mOKButton )
{
mImplementation->mOKButton->setClickedCallback(LLPanelGroupBulkBan::callbackClickSubmit, this);
- mImplementation->mOKButton->setEnabled(FALSE);
+ mImplementation->mOKButton->setEnabled(false);
}
button = getChild<LLButton>("cancel_button", recurse);
@@ -104,7 +104,7 @@ BOOL LLPanelGroupBulkBan::postBuild()
mImplementation->mCannotBanYourself = getString("cant_ban_yourself");
update();
- return TRUE;
+ return true;
}
// TODO: Refactor the shitty callback functions with void* -- just use boost::bind to call submit() instead.
@@ -161,12 +161,12 @@ void LLPanelGroupBulkBan::submit()
// remove already banned users and yourself from request.
std::vector<LLAvatarName> banned_avatar_names;
std::vector<LLAvatarName> out_of_limit_names;
- bool banning_self{ false };
- std::vector<LLUUID>::iterator conflict = std::find(banned_agent_list.begin(), banned_agent_list.end(), gAgentID);
+ bool banning_self = false;
+ std::vector<LLUUID>::iterator conflict = std::find(banned_agent_list.begin(), banned_agent_list.end(), gAgent.getID());
if (conflict != banned_agent_list.end())
{
banned_agent_list.erase(conflict);
- banning_self = TRUE;
+ banning_self = true;
}
if (group_datap)
{
diff --git a/indra/newview/llpanelgroupbulkban.h b/indra/newview/llpanelgroupbulkban.h
index 9060d275f9..2ceb9df679 100644
--- a/indra/newview/llpanelgroupbulkban.h
+++ b/indra/newview/llpanelgroupbulkban.h
@@ -38,7 +38,7 @@ public:
LLPanelGroupBulkBan(const LLUUID& group_id);
~LLPanelGroupBulkBan() {}
- virtual BOOL postBuild();
+ virtual bool postBuild();
static void callbackClickSubmit(void* userdata);
virtual void submit();
diff --git a/indra/newview/llpanelgroupcreate.cpp b/indra/newview/llpanelgroupcreate.cpp
index 01a4ab0455..fd960c9e97 100644
--- a/indra/newview/llpanelgroupcreate.cpp
+++ b/indra/newview/llpanelgroupcreate.cpp
@@ -66,28 +66,28 @@ LLPanelGroupCreate::~LLPanelGroupCreate()
{
}
-BOOL LLPanelGroupCreate::postBuild()
+bool LLPanelGroupCreate::postBuild()
{
childSetCommitCallback("back", boost::bind(&LLPanelGroupCreate::onBackBtnClick, this), NULL);
- mComboMature = getChild<LLComboBox>("group_mature_check", TRUE);
- mCtrlOpenEnrollment = getChild<LLCheckBoxCtrl>("open_enrollement", TRUE);
- mCtrlEnrollmentFee = getChild<LLCheckBoxCtrl>("check_enrollment_fee", TRUE);
- mEditCharter = getChild<LLTextEditor>("charter", TRUE);
- mSpinEnrollmentFee = getChild<LLSpinCtrl>("spin_enrollment_fee", TRUE);
- mMembershipList = getChild<LLScrollListCtrl>("membership_list", TRUE);
+ mComboMature = getChild<LLComboBox>("group_mature_check", true);
+ mCtrlOpenEnrollment = getChild<LLCheckBoxCtrl>("open_enrollement", true);
+ mCtrlEnrollmentFee = getChild<LLCheckBoxCtrl>("check_enrollment_fee", true);
+ mEditCharter = getChild<LLTextEditor>("charter", true);
+ mSpinEnrollmentFee = getChild<LLSpinCtrl>("spin_enrollment_fee", true);
+ mMembershipList = getChild<LLScrollListCtrl>("membership_list", true);
- mCreateButton = getChild<LLButton>("btn_create", TRUE);
+ mCreateButton = getChild<LLButton>("btn_create", true);
mCreateButton->setCommitCallback(boost::bind(&LLPanelGroupCreate::onBtnCreate, this));
- mGroupNameEditor = getChild<LLLineEditor>("group_name_editor", TRUE);
+ mGroupNameEditor = getChild<LLLineEditor>("group_name_editor", true);
mGroupNameEditor->setPrevalidate(LLTextValidate::validateASCIINoLeadingSpace);
- mInsignia = getChild<LLTextureCtrl>("insignia", TRUE);
- mInsignia->setAllowLocalTexture(FALSE);
- mInsignia->setCanApplyImmediately(FALSE);
+ mInsignia = getChild<LLTextureCtrl>("insignia", true);
+ mInsignia->setAllowLocalTexture(false);
+ mInsignia->setCanApplyImmediately(false);
- return TRUE;
+ return true;
}
void LLPanelGroupCreate::onOpen(const LLSD& key)
@@ -97,8 +97,8 @@ void LLPanelGroupCreate::onOpen(const LLSD& key)
mGroupNameEditor->clear();
mEditCharter->clear();
mSpinEnrollmentFee->set(0.f);
- mCtrlEnrollmentFee->set(FALSE);
- mCtrlOpenEnrollment->set(FALSE);
+ mCtrlEnrollmentFee->set(false);
+ mCtrlOpenEnrollment->set(false);
mMembershipList->clearRows();
// populate list
diff --git a/indra/newview/llpanelgroupcreate.h b/indra/newview/llpanelgroupcreate.h
index 3ae2e7f24a..fd0b6e243d 100644
--- a/indra/newview/llpanelgroupcreate.h
+++ b/indra/newview/llpanelgroupcreate.h
@@ -46,9 +46,9 @@ public:
LLPanelGroupCreate();
virtual ~LLPanelGroupCreate();
- virtual BOOL postBuild();
+ bool postBuild() override;
- void onOpen(const LLSD& key);
+ void onOpen(const LLSD& key) override;
static void refreshCreatedGroup(const LLUUID& group_id);
diff --git a/indra/newview/llpanelgroupexperiences.cpp b/indra/newview/llpanelgroupexperiences.cpp
index 6c40499208..d5fa4d1a73 100644
--- a/indra/newview/llpanelgroupexperiences.cpp
+++ b/indra/newview/llpanelgroupexperiences.cpp
@@ -50,7 +50,7 @@ LLPanelGroupExperiences::~LLPanelGroupExperiences()
{
}
-BOOL LLPanelGroupExperiences::postBuild()
+bool LLPanelGroupExperiences::postBuild()
{
mExperiencesList = getChild<LLFlatListView>("experiences_list");
if (hasString("loading_experiences"))
diff --git a/indra/newview/llpanelgroupexperiences.h b/indra/newview/llpanelgroupexperiences.h
index 7c79f77332..58d5397bb5 100644
--- a/indra/newview/llpanelgroupexperiences.h
+++ b/indra/newview/llpanelgroupexperiences.h
@@ -40,7 +40,7 @@ public:
// LLPanelGroupTab
virtual void activate();
- virtual BOOL postBuild();
+ virtual bool postBuild();
virtual void setGroupID(const LLUUID& id);
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index 04d3236bf1..1620cc126f 100644
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -64,8 +64,8 @@ const S32 DECLINE_TO_STATE = 0;
LLPanelGroupGeneral::LLPanelGroupGeneral()
: LLPanelGroupTab(),
- mChanged(FALSE),
- mFirstUse(TRUE),
+ mChanged(false),
+ mFirstUse(true),
mGroupNameEditor(NULL),
mFounderName(NULL),
mInsignia(NULL),
@@ -87,9 +87,9 @@ LLPanelGroupGeneral::~LLPanelGroupGeneral()
{
}
-BOOL LLPanelGroupGeneral::postBuild()
+bool LLPanelGroupGeneral::postBuild()
{
- bool recurse = true;
+ constexpr bool recurse = true;
mEditCharter = getChild<LLTextEditor>("charter", recurse);
if(mEditCharter)
@@ -115,7 +115,7 @@ BOOL LLPanelGroupGeneral::postBuild()
if (gAgent.isTeen())
{
// Teens don't get to set mature flag. JC
- mComboMature->setVisible(FALSE);
+ mComboMature->setVisible(false);
mComboMature->setCurrentByIndex(NON_MATURE_CONTENT);
}
}
@@ -139,8 +139,8 @@ BOOL LLPanelGroupGeneral::postBuild()
mSpinEnrollmentFee->resetDirty();
}
- BOOL accept_notices = FALSE;
- BOOL list_in_profile = FALSE;
+ bool accept_notices = false;
+ bool list_in_profile = false;
LLGroupData data;
if(gAgent.getGroupData(mGroupID,data))
{
@@ -177,13 +177,13 @@ BOOL LLPanelGroupGeneral::postBuild()
// If the group_id is null, then we are creating a new group
if (mGroupID.isNull())
{
- mEditCharter->setEnabled(TRUE);
+ mEditCharter->setEnabled(true);
- mCtrlShowInGroupList->setEnabled(TRUE);
- mComboMature->setEnabled(TRUE);
- mCtrlOpenEnrollment->setEnabled(TRUE);
- mCtrlEnrollmentFee->setEnabled(TRUE);
- mSpinEnrollmentFee->setEnabled(TRUE);
+ mCtrlShowInGroupList->setEnabled(true);
+ mComboMature->setEnabled(true);
+ mCtrlOpenEnrollment->setEnabled(true);
+ mCtrlEnrollmentFee->setEnabled(true);
+ mSpinEnrollmentFee->setEnabled(true);
}
@@ -196,7 +196,7 @@ void LLPanelGroupGeneral::setupCtrls(LLPanel* panel_group)
if (mInsignia)
{
mInsignia->setCommitCallback(onCommitAny, this);
- mInsignia->setAllowLocalTexture(FALSE);
+ mInsignia->setAllowLocalTexture(false);
}
mFounderName = getChild<LLTextBox>("founder_name");
@@ -227,7 +227,7 @@ void LLPanelGroupGeneral::onCommitAny(LLUICtrl* ctrl, void* data)
void LLPanelGroupGeneral::onCommitUserOnly(LLUICtrl* ctrl, void* data)
{
LLPanelGroupGeneral* self = (LLPanelGroupGeneral*)data;
- self->mChanged = TRUE;
+ self->mChanged = true;
self->notifyObservers();
}
@@ -253,11 +253,11 @@ void LLPanelGroupGeneral::onCommitEnrollment(LLUICtrl* ctrl, void* data)
if (self->mCtrlEnrollmentFee->get())
{
- self->mSpinEnrollmentFee->setEnabled(TRUE);
+ self->mSpinEnrollmentFee->setEnabled(true);
}
else
{
- self->mSpinEnrollmentFee->setEnabled(FALSE);
+ self->mSpinEnrollmentFee->setEnabled(false);
self->mSpinEnrollmentFee->set(0);
}
}
@@ -291,9 +291,9 @@ void LLPanelGroupGeneral::activate()
LLGroupMgr::getInstance()->sendGroupTitlesRequest(mGroupID);
LLGroupMgr::getInstance()->sendGroupPropertiesRequest(mGroupID);
- mFirstUse = FALSE;
+ mFirstUse = false;
}
- mChanged = FALSE;
+ mChanged = false;
update(GC_ALL);
}
@@ -317,7 +317,7 @@ bool LLPanelGroupGeneral::apply(std::string& mesg)
mComboActiveTitle->resetDirty();
}
- BOOL has_power_in_group = gAgent.hasPowerInGroup(mGroupID,GP_GROUP_CHANGE_IDENTITY);
+ bool has_power_in_group = gAgent.hasPowerInGroup(mGroupID,GP_GROUP_CHANGE_IDENTITY);
if (has_power_in_group)
{
@@ -357,7 +357,7 @@ bool LLPanelGroupGeneral::apply(std::string& mesg)
}
else
{
- gdatap->mMaturePublish = FALSE;
+ gdatap->mMaturePublish = false;
}
}
if (mCtrlShowInGroupList) gdatap->mShowInList = mCtrlShowInGroupList->get();
@@ -381,8 +381,8 @@ bool LLPanelGroupGeneral::apply(std::string& mesg)
}
}
- BOOL receive_notices = false;
- BOOL list_in_profile = false;
+ bool receive_notices = false;
+ bool list_in_profile = false;
if (mCtrlReceiveNotices)
receive_notices = mCtrlReceiveNotices->get();
if (mCtrlListGroup)
@@ -392,14 +392,14 @@ bool LLPanelGroupGeneral::apply(std::string& mesg)
resetDirty();
- mChanged = FALSE;
+ mChanged = false;
return true;
}
void LLPanelGroupGeneral::cancel()
{
- mChanged = FALSE;
+ mChanged = false;
//cancel out all of the click changes to, although since we are
//shifting tabs or closing the floater, this need not be done...yet
@@ -469,11 +469,11 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
if (1 == gdatap->mTitles.size())
{
// Only the everyone title. Don't bother letting them try changing this.
- mComboActiveTitle->setEnabled(FALSE);
+ mComboActiveTitle->setEnabled(false);
}
else
{
- mComboActiveTitle->setEnabled(TRUE);
+ mComboActiveTitle->setEnabled(true);
}
std::vector<LLGroupTitle>::const_iterator citer = gdatap->mTitles.begin();
@@ -560,7 +560,7 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
if (mInsignia) mInsignia->setEnabled(mAllowEdit && can_change_ident);
if (mEditCharter) mEditCharter->setEnabled(mAllowEdit && can_change_ident);
- if (mGroupNameEditor) mGroupNameEditor->setVisible(FALSE);
+ if (mGroupNameEditor) mGroupNameEditor->setVisible(false);
if (mFounderName) mFounderName->setText(LLSLURL("agent", gdatap->mFounderID, "inspect").getSLURLString());
if (mInsignia)
{
@@ -603,13 +603,13 @@ void LLPanelGroupGeneral::updateChanged()
mComboActiveTitle
};
- mChanged = FALSE;
+ mChanged = false;
for( size_t i=0; i<LL_ARRAY_SIZE(check_list); i++ )
{
if( check_list[i] && check_list[i]->isDirty() )
{
- mChanged = TRUE;
+ mChanged = true;
break;
}
}
@@ -630,17 +630,17 @@ void LLPanelGroupGeneral::reset()
mCtrlListGroup->setEnabled(false);
- mGroupNameEditor->setEnabled(TRUE);
- mEditCharter->setEnabled(TRUE);
+ mGroupNameEditor->setEnabled(true);
+ mEditCharter->setEnabled(true);
mCtrlShowInGroupList->setEnabled(false);
- mComboMature->setEnabled(TRUE);
+ mComboMature->setEnabled(true);
- mCtrlOpenEnrollment->setEnabled(TRUE);
+ mCtrlOpenEnrollment->setEnabled(true);
- mCtrlEnrollmentFee->setEnabled(TRUE);
+ mCtrlEnrollmentFee->setEnabled(true);
- mSpinEnrollmentFee->setEnabled(TRUE);
+ mSpinEnrollmentFee->setEnabled(true);
mSpinEnrollmentFee->set((F32)0);
mGroupNameEditor->setVisible(true);
@@ -708,8 +708,8 @@ void LLPanelGroupGeneral::setGroupID(const LLUUID& id)
return;
}
- BOOL accept_notices = FALSE;
- BOOL list_in_profile = FALSE;
+ bool accept_notices = false;
+ bool list_in_profile = false;
LLGroupData data;
if(gAgent.getGroupData(mGroupID,data))
{
diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h
index 1d0789521c..f372acf720 100644
--- a/indra/newview/llpanelgroupgeneral.h
+++ b/indra/newview/llpanelgroupgeneral.h
@@ -54,7 +54,7 @@ public:
virtual void update(LLGroupChange gc);
- virtual BOOL postBuild();
+ virtual bool postBuild();
virtual void draw();
@@ -78,8 +78,8 @@ private:
void updateChanged();
bool confirmMatureApply(const LLSD& notification, const LLSD& response);
- BOOL mChanged;
- BOOL mFirstUse;
+ bool mChanged;
+ bool mFirstUse;
std::string mIncompleteMemberDataStr;
// Group information (include any updates in updateChanged)
diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp
index d6b66ee622..34307c9951 100644
--- a/indra/newview/llpanelgroupinvite.cpp
+++ b/indra/newview/llpanelgroupinvite.cpp
@@ -253,7 +253,7 @@ void LLPanelGroupInvite::impl::addRoleNames(LLGroupMgrGroupData* gdatap)
//else if they have the limited add to roles power
//we add every role the user is in,
//else we just add to everyone
- bool is_owner = FALSE;
+ bool is_owner = false;
bool can_assign_any = gAgent.hasPowerInGroup(mGroupID,
GP_ROLE_ASSIGN_MEMBER);
bool can_assign_limited = gAgent.hasPowerInGroup(mGroupID,
@@ -314,7 +314,7 @@ void LLPanelGroupInvite::impl::callbackClickAdd(void* userdata)
LLView * button = panelp->findChild<LLButton>("add_button");
LLFloater * root_floater = gFloaterView->getParentFloater(panelp);
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(
- boost::bind(impl::callbackAddUsers, _1, panelp->mImplementation), TRUE, FALSE, FALSE, root_floater->getName(), button);
+ boost::bind(impl::callbackAddUsers, _1, panelp->mImplementation), true, false, false, root_floater->getName(), button);
if (picker)
{
root_floater->addDependentFloater(picker);
@@ -345,7 +345,7 @@ void LLPanelGroupInvite::impl::handleRemove()
// Remove all selected invitees.
mInvitees->deleteSelectedItems();
- mRemoveButton->setEnabled(FALSE);
+ mRemoveButton->setEnabled(false);
}
// static
@@ -363,11 +363,11 @@ void LLPanelGroupInvite::impl::handleSelection()
mInvitees->getAllSelected();
if (selection.empty())
{
- mRemoveButton->setEnabled(FALSE);
+ mRemoveButton->setEnabled(false);
}
else
{
- mRemoveButton->setEnabled(TRUE);
+ mRemoveButton->setEnabled(true);
}
}
@@ -443,7 +443,7 @@ void LLPanelGroupInvite::impl::onAvatarNameCache(const LLUUID& agent_id,
LLPanelGroupInvite::LLPanelGroupInvite(const LLUUID& group_id)
: LLPanel(),
mImplementation(new impl(group_id)),
- mPendingUpdate(FALSE)
+ mPendingUpdate(false)
{
// Pass on construction of this panel to the control factory.
buildFromFile( "panel_group_invite.xml");
@@ -467,7 +467,7 @@ void LLPanelGroupInvite::clear()
mImplementation->mInvitees->deleteAllItems();
mImplementation->mRoleNames->clear();
mImplementation->mRoleNames->removeall();
- mImplementation->mOKButton->setEnabled(FALSE);
+ mImplementation->mOKButton->setEnabled(false);
mImplementation->mInviteeIDs.clear();
}
@@ -544,7 +544,7 @@ void LLPanelGroupInvite::draw()
void LLPanelGroupInvite::update()
{
- mPendingUpdate = FALSE;
+ mPendingUpdate = false;
if (mImplementation->mGroupName)
{
mImplementation->mGroupName->setText(mImplementation->mLoadingText);
@@ -630,21 +630,21 @@ void LLPanelGroupInvite::updateLists()
LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mImplementation->mGroupID);
}
}
- mPendingUpdate = TRUE;
+ mPendingUpdate = true;
}
else
{
- mPendingUpdate = FALSE;
+ mPendingUpdate = false;
if (mImplementation->mOKButton && mImplementation->mRoleNames->getItemCount())
{
- mImplementation->mOKButton->setEnabled(TRUE);
+ mImplementation->mOKButton->setEnabled(true);
}
}
}
-BOOL LLPanelGroupInvite::postBuild()
+bool LLPanelGroupInvite::postBuild()
{
- BOOL recurse = TRUE;
+ constexpr bool recurse = true;
mImplementation->mLoadingText = getString("loading");
mImplementation->mRoleNames = getChild<LLComboBox>("role_name",
@@ -654,7 +654,7 @@ BOOL LLPanelGroupInvite::postBuild()
getChild<LLNameListCtrl>("invitee_list", recurse);
if ( mImplementation->mInvitees )
{
- mImplementation->mInvitees->setCommitOnSelectionChange(TRUE);
+ mImplementation->mInvitees->setCommitOnSelectionChange(true);
mImplementation->mInvitees->setCommitCallback(impl::callbackSelect, mImplementation);
}
@@ -671,7 +671,7 @@ BOOL LLPanelGroupInvite::postBuild()
if ( mImplementation->mRemoveButton )
{
mImplementation->mRemoveButton->setClickedCallback(impl::callbackClickRemove, mImplementation);
- mImplementation->mRemoveButton->setEnabled(FALSE);
+ mImplementation->mRemoveButton->setEnabled(false);
}
mImplementation->mOKButton =
@@ -679,7 +679,7 @@ BOOL LLPanelGroupInvite::postBuild()
if ( mImplementation->mOKButton )
{
mImplementation->mOKButton->setClickedCallback(impl::callbackClickOK, mImplementation);
- mImplementation->mOKButton->setEnabled(FALSE);
+ mImplementation->mOKButton->setEnabled(false);
}
button = getChild<LLButton>("cancel_button", recurse);
diff --git a/indra/newview/llpanelgroupinvite.h b/indra/newview/llpanelgroupinvite.h
index 9f7b5ae9be..16fea8040c 100644
--- a/indra/newview/llpanelgroupinvite.h
+++ b/indra/newview/llpanelgroupinvite.h
@@ -43,18 +43,18 @@ public:
* this callback is being used to add a user whose fullname isn't been loaded before invoking of addUsers().
*/
void addUserCallback(const LLUUID& id, const LLAvatarName& av_name);
- void clear();
+ void clear() override;
void update();
void setCloseCallback(void (*close_callback)(void*), void* data);
- virtual void draw();
- virtual BOOL postBuild();
+ void draw() override;
+ bool postBuild() override;
protected:
class impl;
impl* mImplementation;
- BOOL mPendingUpdate;
+ bool mPendingUpdate;
LLUUID mStoreSelected;
void updateLists();
};
diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp
index f276d6d785..369a510edd 100644
--- a/indra/newview/llpanelgrouplandmoney.cpp
+++ b/indra/newview/llpanelgrouplandmoney.cpp
@@ -674,7 +674,7 @@ void LLPanelGroupLandMoney::cancel()
}
-BOOL LLPanelGroupLandMoney::postBuild()
+bool LLPanelGroupLandMoney::postBuild()
{
/* This power was removed to make group roles simpler
bool has_parcel_view = gAgent.hasPowerInGroup(mGroupID,
@@ -722,12 +722,12 @@ BOOL LLPanelGroupLandMoney::postBuild()
if ( mImplementationp->mGroupOverLimitTextp )
{
- mImplementationp->mGroupOverLimitTextp->setVisible(FALSE);
+ mImplementationp->mGroupOverLimitTextp->setVisible(false);
}
if ( mImplementationp->mGroupOverLimitIconp )
{
- mImplementationp->mGroupOverLimitIconp->setVisible(FALSE);
+ mImplementationp->mGroupOverLimitIconp->setVisible(false);
}
if ( !can_view )
@@ -736,7 +736,7 @@ BOOL LLPanelGroupLandMoney::postBuild()
{
mImplementationp->mGroupParcelsp->setCommentText(
mImplementationp->mCantViewParcelsText);
- mImplementationp->mGroupParcelsp->setEnabled(FALSE);
+ mImplementationp->mGroupParcelsp->setEnabled(false);
}
}
@@ -831,7 +831,7 @@ void LLPanelGroupLandMoney::onLandSelectionChanged()
mImplementationp->mMapButtonp->setEnabled( mImplementationp->mGroupParcelsp->getItemCount() > 0 );
}
-BOOL LLPanelGroupLandMoney::isVisibleByAgent(LLAgent* agentp)
+bool LLPanelGroupLandMoney::isVisibleByAgent(LLAgent* agentp)
{
return mAllowEdit && agentp->isInGroup(mGroupID);
}
@@ -1557,12 +1557,12 @@ void LLPanelGroupLandMoney::setGroupID(const LLUUID& id)
if ( mImplementationp->mGroupOverLimitTextp )
{
- mImplementationp->mGroupOverLimitTextp->setVisible(FALSE);
+ mImplementationp->mGroupOverLimitTextp->setVisible(false);
}
if ( mImplementationp->mGroupOverLimitIconp )
{
- mImplementationp->mGroupOverLimitIconp->setVisible(FALSE);
+ mImplementationp->mGroupOverLimitIconp->setVisible(false);
}
if ( mImplementationp->mGroupParcelsp )
@@ -1572,7 +1572,7 @@ void LLPanelGroupLandMoney::setGroupID(const LLUUID& id)
if ( !can_view && mImplementationp->mGroupParcelsp )
{
- mImplementationp->mGroupParcelsp->setEnabled(FALSE);
+ mImplementationp->mGroupParcelsp->setEnabled(false);
}
diff --git a/indra/newview/llpanelgrouplandmoney.h b/indra/newview/llpanelgrouplandmoney.h
index 3cec6065e7..3a818ecc40 100644
--- a/indra/newview/llpanelgrouplandmoney.h
+++ b/indra/newview/llpanelgrouplandmoney.h
@@ -36,8 +36,8 @@ class LLPanelGroupLandMoney : public LLPanelGroupTab
public:
LLPanelGroupLandMoney();
virtual ~LLPanelGroupLandMoney();
- virtual BOOL postBuild();
- virtual BOOL isVisibleByAgent(LLAgent* agentp);
+ virtual bool postBuild();
+ virtual bool isVisibleByAgent(LLAgent* agentp);
virtual void activate();
virtual bool needsApply(std::string& mesg);
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp
index 82f880c9ee..c4bdebdfa5 100644
--- a/indra/newview/llpanelgroupnotices.cpp
+++ b/indra/newview/llpanelgroupnotices.cpp
@@ -89,11 +89,9 @@ public:
LLGroupDropTarget(const Params&);
~LLGroupDropTarget() {};
- void doDrop(EDragAndDropType cargo_type, void* cargo_data);
-
//
// LLView functionality
- virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
@@ -114,23 +112,18 @@ LLGroupDropTarget::LLGroupDropTarget(const LLGroupDropTarget::Params& p)
mGroupID(p.group_id)
{}
-void LLGroupDropTarget::doDrop(EDragAndDropType cargo_type, void* cargo_data)
-{
- LL_INFOS() << "LLGroupDropTarget::doDrop()" << LL_ENDL;
-}
-
-BOOL LLGroupDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+bool LLGroupDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
std::string& tooltip_msg)
{
- BOOL handled = FALSE;
+ bool handled = false;
if (!gAgent.hasPowerInGroup(mGroupID,GP_NOTICES_SEND))
{
*accept = ACCEPT_NO;
- return TRUE;
+ return true;
}
if(getParent())
@@ -138,7 +131,7 @@ BOOL LLGroupDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
// check if inside
//LLRect parent_rect = mParentView->getRect();
//getRect().set(0, parent_rect.getHeight(), parent_rect.getWidth(), 0);
- handled = TRUE;
+ handled = true;
// check the type
switch(cargo_type)
@@ -237,18 +230,18 @@ LLPanelGroupNotices::~LLPanelGroupNotices()
}
-BOOL LLPanelGroupNotices::isVisibleByAgent(LLAgent* agentp)
+bool LLPanelGroupNotices::isVisibleByAgent(LLAgent* agentp)
{
return mAllowEdit &&
agentp->hasPowerInGroup(mGroupID, GP_NOTICES_SEND | GP_NOTICES_RECEIVE);
}
-BOOL LLPanelGroupNotices::postBuild()
+bool LLPanelGroupNotices::postBuild()
{
- bool recurse = true;
+ constexpr bool recurse = true;
mNoticesList = getChild<LLScrollListCtrl>("notice_list",recurse);
- mNoticesList->setCommitOnSelectionChange(TRUE);
+ mNoticesList->setCommitOnSelectionChange(true);
mNoticesList->setCommitCallback(onSelectNotice, this);
mBtnNewMessage = getChild<LLButton>("create_new_notice",recurse);
@@ -263,29 +256,29 @@ BOOL LLPanelGroupNotices::postBuild()
mCreateMessage = getChild<LLTextEditor>("create_message",recurse);
mCreateInventoryName = getChild<LLLineEditor>("create_inventory_name",recurse);
- mCreateInventoryName->setTabStop(FALSE);
- mCreateInventoryName->setEnabled(FALSE);
+ mCreateInventoryName->setTabStop(false);
+ mCreateInventoryName->setEnabled(false);
mCreateInventoryIcon = getChild<LLIconCtrl>("create_inv_icon",recurse);
- mCreateInventoryIcon->setVisible(FALSE);
+ mCreateInventoryIcon->setVisible(false);
mBtnSendMessage = getChild<LLButton>("send_notice",recurse);
mBtnSendMessage->setClickedCallback(onClickSendMessage, this);
mBtnRemoveAttachment = getChild<LLButton>("remove_attachment",recurse);
mBtnRemoveAttachment->setClickedCallback(onClickRemoveAttachment, this);
- mBtnRemoveAttachment->setEnabled(FALSE);
+ mBtnRemoveAttachment->setEnabled(false);
// View
mViewSubject = getChild<LLLineEditor>("view_subject",recurse);
mViewMessage = getChild<LLTextEditor>("view_message",recurse);
mViewInventoryName = getChild<LLLineEditor>("view_inventory_name",recurse);
- mViewInventoryName->setTabStop(FALSE);
- mViewInventoryName->setEnabled(FALSE);
+ mViewInventoryName->setTabStop(false);
+ mViewInventoryName->setEnabled(false);
mViewInventoryIcon = getChild<LLIconCtrl>("view_inv_icon",recurse);
- mViewInventoryIcon->setVisible(FALSE);
+ mViewInventoryIcon->setVisible(false);
mBtnOpenAttachment = getChild<LLButton>("open_attachment",recurse);
mBtnOpenAttachment->setClickedCallback(onClickOpenAttachment, this);
@@ -314,15 +307,15 @@ void LLPanelGroupNotices::activate()
mPrevSelectedNotice = LLUUID();
- BOOL can_send = gAgent.hasPowerInGroup(mGroupID,GP_NOTICES_SEND);
- BOOL can_receive = gAgent.hasPowerInGroup(mGroupID,GP_NOTICES_RECEIVE);
+ bool can_send = gAgent.hasPowerInGroup(mGroupID,GP_NOTICES_SEND);
+ bool can_receive = gAgent.hasPowerInGroup(mGroupID,GP_NOTICES_RECEIVE);
mPanelViewNotice->setEnabled(can_receive);
mPanelCreateNotice->setEnabled(can_send);
// Always disabled to stop direct editing of attachment names
- mCreateInventoryName->setEnabled(FALSE);
- mViewInventoryName->setEnabled(FALSE);
+ mCreateInventoryName->setEnabled(false);
+ mViewInventoryName->setEnabled(false);
// If we can receive notices, grab them right away.
if (can_receive)
@@ -335,10 +328,10 @@ void LLPanelGroupNotices::setItem(LLPointer<LLInventoryItem> inv_item)
{
mInventoryItem = inv_item;
- BOOL item_is_multi = FALSE;
+ bool item_is_multi = false;
if ( inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS )
{
- item_is_multi = TRUE;
+ item_is_multi = true;
};
std::string icon_name = LLInventoryIcon::getIconName(inv_item->getType(),
@@ -347,13 +340,13 @@ void LLPanelGroupNotices::setItem(LLPointer<LLInventoryItem> inv_item)
item_is_multi );
mCreateInventoryIcon->setValue(icon_name);
- mCreateInventoryIcon->setVisible(TRUE);
+ mCreateInventoryIcon->setVisible(true);
std::stringstream ss;
ss << " " << mInventoryItem->getName();
mCreateInventoryName->setText(ss.str());
- mBtnRemoveAttachment->setEnabled(TRUE);
+ mBtnRemoveAttachment->setEnabled(true);
}
void LLPanelGroupNotices::onClickRemoveAttachment(void* data)
@@ -361,8 +354,8 @@ void LLPanelGroupNotices::onClickRemoveAttachment(void* data)
LLPanelGroupNotices* self = (LLPanelGroupNotices*)data;
self->mInventoryItem = NULL;
self->mCreateInventoryName->clear();
- self->mCreateInventoryIcon->setVisible(FALSE);
- self->mBtnRemoveAttachment->setEnabled(FALSE);
+ self->mCreateInventoryIcon->setVisible(false);
+ self->mBtnRemoveAttachment->setEnabled(false);
}
//static
@@ -372,7 +365,7 @@ void LLPanelGroupNotices::onClickOpenAttachment(void* data)
self->mInventoryOffer->forceResponse(IOR_ACCEPT);
self->mInventoryOffer = NULL;
- self->mBtnOpenAttachment->setEnabled(FALSE);
+ self->mBtnOpenAttachment->setEnabled(false);
}
void LLPanelGroupNotices::onClickSendMessage(void* data)
@@ -442,7 +435,7 @@ void LLPanelGroupNotices::onClickNewMessage(void* data)
self->mCreateSubject->clear();
self->mCreateMessage->clear();
if (self->mInventoryItem) onClickRemoveAttachment(self);
- self->mNoticesList->deselectAllItems(TRUE); // TRUE == don't commit on chnage
+ self->mNoticesList->deselectAllItems(true); // true == don't commit on chnage
}
void LLPanelGroupNotices::refreshNotices()
@@ -508,13 +501,13 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
std::string subj;
std::string name;
U32 timestamp;
- BOOL has_attachment;
+ bool has_attachment;
U8 asset_type;
S32 i=0;
S32 count = msg->getNumberOfBlocks("Data");
- mNoticesList->setEnabled(TRUE);
+ mNoticesList->setEnabled(true);
//save sort state and set unsorted state to prevent unnecessary
//sorting while adding notices
@@ -528,7 +521,7 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
{
// Only one entry, the dummy entry.
mNoticesList->setCommentText(mNoNoticesStr);
- mNoticesList->setEnabled(FALSE);
+ mNoticesList->setEnabled(false);
return;
}
@@ -634,19 +627,19 @@ void LLPanelGroupNotices::showNotice(const std::string& subject,
LLInventoryType::IT_TEXTURE);
mViewInventoryIcon->setValue(icon_name);
- mViewInventoryIcon->setVisible(TRUE);
+ mViewInventoryIcon->setVisible(true);
std::stringstream ss;
ss << " " << inventory_name;
mViewInventoryName->setText(ss.str());
- mBtnOpenAttachment->setEnabled(TRUE);
+ mBtnOpenAttachment->setEnabled(true);
}
else
{
mViewInventoryName->clear();
- mViewInventoryIcon->setVisible(FALSE);
- mBtnOpenAttachment->setEnabled(FALSE);
+ mViewInventoryIcon->setVisible(false);
+ mBtnOpenAttachment->setEnabled(false);
}
}
@@ -654,14 +647,14 @@ void LLPanelGroupNotices::arrangeNoticeView(ENoticeView view_type)
{
if (CREATE_NEW_NOTICE == view_type)
{
- mPanelCreateNotice->setVisible(TRUE);
- mPanelViewNotice->setVisible(FALSE);
+ mPanelCreateNotice->setVisible(true);
+ mPanelViewNotice->setVisible(false);
}
else
{
- mPanelCreateNotice->setVisible(FALSE);
- mPanelViewNotice->setVisible(TRUE);
- mBtnOpenAttachment->setEnabled(FALSE);
+ mPanelCreateNotice->setVisible(false);
+ mPanelViewNotice->setVisible(true);
+ mBtnOpenAttachment->setEnabled(false);
}
}
void LLPanelGroupNotices::setGroupID(const LLUUID& id)
diff --git a/indra/newview/llpanelgroupnotices.h b/indra/newview/llpanelgroupnotices.h
index 55319cb9ae..b41a274dd5 100644
--- a/indra/newview/llpanelgroupnotices.h
+++ b/indra/newview/llpanelgroupnotices.h
@@ -50,8 +50,8 @@ public:
//virtual bool apply(std::string& mesg);
//virtual void update();
- virtual BOOL postBuild();
- virtual BOOL isVisibleByAgent(LLAgent* agentp);
+ virtual bool postBuild();
+ virtual bool isVisibleByAgent(LLAgent* agentp);
void setItem(LLPointer<LLInventoryItem> inv_item);
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index e3d75d5604..6c81eb3ea1 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -119,7 +119,7 @@ LLPanelGroupRoles::LLPanelGroupRoles()
mCurrentTab(NULL),
mRequestedTab( NULL ),
mSubTabContainer( NULL ),
- mFirstUse( TRUE )
+ mFirstUse( true )
{
}
@@ -127,13 +127,13 @@ LLPanelGroupRoles::~LLPanelGroupRoles()
{
}
-BOOL LLPanelGroupRoles::postBuild()
+bool LLPanelGroupRoles::postBuild()
{
LL_DEBUGS() << "LLPanelGroupRoles::postBuild()" << LL_ENDL;
mSubTabContainer = getChild<LLTabContainer>("roles_tab_container");
- if (!mSubTabContainer) return FALSE;
+ if (!mSubTabContainer) return false;
// Hook up each sub-tabs callback and widgets.
for (S32 i = 0; i < mSubTabContainer->getTabCount(); ++i)
@@ -143,13 +143,13 @@ BOOL LLPanelGroupRoles::postBuild()
if (!subtabp)
{
LL_WARNS() << "Invalid subtab panel: " << panel->getName() << LL_ENDL;
- return FALSE;
+ return false;
}
// Hand the subtab a pointer to this LLPanelGroupRoles, so that it can
// look around for the widgets it is interested in.
if (!subtabp->postBuildSubTab(this))
- return FALSE;
+ return false;
//subtabp->addObserver(this);
}
@@ -165,7 +165,7 @@ BOOL LLPanelGroupRoles::postBuild()
mCurrentTab = (LLPanelGroupTab*) mSubTabContainer->getCurrentPanel();
}
- if (!mCurrentTab) return FALSE;
+ if (!mCurrentTab) return false;
// Act as though this tab was just activated.
mCurrentTab->activate();
@@ -177,7 +177,7 @@ BOOL LLPanelGroupRoles::postBuild()
return LLPanelGroupTab::postBuild();
}
-BOOL LLPanelGroupRoles::isVisibleByAgent(LLAgent* agentp)
+bool LLPanelGroupRoles::isVisibleByAgent(LLAgent* agentp)
{
/* This power was removed to make group roles simpler
return agentp->hasPowerInGroup(mGroupID,
@@ -221,9 +221,9 @@ bool LLPanelGroupRoles::handleSubTabSwitch(const LLSD& data)
args["WANT_APPLY_MESSAGE"] = mWantApplyMesg;
LLNotificationsUtil::add("PanelGroupApply", args, LLSD(),
boost::bind(&LLPanelGroupRoles::handleNotifyCallback, this, _1, _2));
- mHasModal = TRUE;
+ mHasModal = true;
- // Returning FALSE will block a close action from finishing until
+ // Returning false will block a close action from finishing until
// we get a response back from the user.
return false;
}
@@ -253,7 +253,7 @@ void LLPanelGroupRoles::transitionToTab()
bool LLPanelGroupRoles::handleNotifyCallback(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- mHasModal = FALSE;
+ mHasModal = false;
LLPanelGroupTab* transition_tab = mRequestedTab;
switch (option)
{
@@ -266,7 +266,7 @@ bool LLPanelGroupRoles::handleNotifyCallback(const LLSD& notification, const LLS
// There was a problem doing the apply.
if ( !apply_mesg.empty() )
{
- mHasModal = TRUE;
+ mHasModal = true;
LLSD args;
args["MESSAGE"] = apply_mesg;
LLNotificationsUtil::add("GenericAlert", args, LLSD(), boost::bind(&LLPanelGroupRoles::onModalClose, this, _1, _2));
@@ -296,7 +296,7 @@ bool LLPanelGroupRoles::handleNotifyCallback(const LLSD& notification, const LLS
bool LLPanelGroupRoles::onModalClose(const LLSD& notification, const LLSD& response)
{
- mHasModal = FALSE;
+ mHasModal = false;
return false;
}
@@ -369,7 +369,7 @@ void LLPanelGroupRoles::activate()
LLGroupMgr::getInstance()->sendGroupPropertiesRequest(mGroupID);
}
- mFirstUse = FALSE;
+ mFirstUse = false;
LLPanelGroupTab* panelp = (LLPanelGroupTab*) mSubTabContainer->getCurrentPanel();
if (panelp) panelp->activate();
@@ -389,12 +389,12 @@ bool LLPanelGroupRoles::needsApply(std::string& mesg)
return panelp->needsApply(mesg);
}
-BOOL LLPanelGroupRoles::hasModal()
+bool LLPanelGroupRoles::hasModal()
{
- if (mHasModal) return TRUE;
+ if (mHasModal) return true;
LLPanelGroupTab* panelp = (LLPanelGroupTab*) mSubTabContainer->getCurrentPanel();
- if (!panelp) return FALSE;
+ if (!panelp) return false;
return panelp->hasModal();
}
@@ -419,7 +419,7 @@ void LLPanelGroupRoles::setGroupID(const LLUUID& id)
if(mSubTabContainer)
mSubTabContainer->selectTab(1);
- group_roles_tab->mFirstOpen = TRUE;
+ group_roles_tab->mFirstOpen = true;
activate();
}
@@ -437,9 +437,10 @@ LLPanelGroupSubTab::LLPanelGroupSubTab()
LLPanelGroupSubTab::~LLPanelGroupSubTab()
{
+ mSearchCommitConnection.disconnect();
}
-BOOL LLPanelGroupSubTab::postBuildSubTab(LLView* root)
+bool LLPanelGroupSubTab::postBuildSubTab(LLView* root)
{
// Get icons for later use.
mActionIcons.clear();
@@ -458,18 +459,19 @@ BOOL LLPanelGroupSubTab::postBuildSubTab(LLView* root)
{
mActionIcons["partial"] = getString("power_partial_icon");
}
- return TRUE;
+ return true;
}
-BOOL LLPanelGroupSubTab::postBuild()
+bool LLPanelGroupSubTab::postBuild()
{
// Hook up the search widgets.
- bool recurse = true;
+ constexpr bool recurse = true;
mSearchEditor = findChild<LLFilterEditor>("filter_input", recurse);
if (mSearchEditor) // SubTab doesn't implement this, only some of derived classes
{
- mSearchEditor->setCommitCallback(boost::bind(&LLPanelGroupSubTab::setSearchFilter, this, _2));
+ // panel
+ mSearchCommitConnection = mSearchEditor->setCommitCallback(boost::bind(&LLPanelGroupSubTab::setSearchFilter, this, _2));
}
return LLPanelGroupTab::postBuild();
@@ -499,15 +501,15 @@ void LLPanelGroupSubTab::setSearchFilter(const std::string& filter)
void LLPanelGroupSubTab::activate()
{
- setOthersVisible(TRUE);
+ setOthersVisible(true);
}
void LLPanelGroupSubTab::deactivate()
{
- setOthersVisible(FALSE);
+ setOthersVisible(false);
}
-void LLPanelGroupSubTab::setOthersVisible(BOOL b)
+void LLPanelGroupSubTab::setOthersVisible(bool b)
{
if (mHeader)
{
@@ -543,9 +545,9 @@ void LLPanelGroupSubTab::buildActionsList(LLScrollListCtrl* ctrl,
U64 allowed_by_some,
U64 allowed_by_all,
LLUICtrl::commit_callback_t commit_callback,
- BOOL show_all,
- BOOL filter,
- BOOL is_owner_role)
+ bool show_all,
+ bool filter,
+ bool is_owner_role)
{
if (LLGroupMgr::getInstance()->mRoleActionSets.empty())
{
@@ -575,9 +577,9 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,
U64 allowed_by_all,
LLRoleActionSet* action_set,
LLUICtrl::commit_callback_t commit_callback,
- BOOL show_all,
- BOOL filter,
- BOOL is_owner_role)
+ bool show_all,
+ bool filter,
+ bool is_owner_role)
{
LL_DEBUGS() << "Building role list for: " << action_set->mActionSetData->mName << LL_ENDL;
// See if the allow mask matches anything in this category.
@@ -613,7 +615,7 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,
std::vector<LLRoleAction*>::iterator ra_end = action_set->mActions.end();
bool items_match_filter = false;
- BOOL can_change_actions = (!is_owner_role && gAgent.hasPowerInGroup(mGroupID, GP_ROLE_CHANGE_ACTIONS));
+ bool can_change_actions = (!is_owner_role && gAgent.hasPowerInGroup(mGroupID, GP_ROLE_CHANGE_ACTIONS));
for ( ; ra_it != ra_end; ++ra_it)
{
@@ -724,26 +726,26 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,
if (show_all)
{
- check->setTentative(FALSE);
+ check->setTentative(false);
if (allowed_by_some & (*ra_it)->mPowerBit)
{
- check->set(TRUE);
+ check->set(true);
}
else
{
- check->set(FALSE);
+ check->set(false);
}
}
else
{
- check->set(TRUE);
+ check->set(true);
if (show_full_strength)
{
- check->setTentative(FALSE);
+ check->setTentative(false);
}
else
{
- check->setTentative(TRUE);
+ check->setTentative(true);
}
}
@@ -766,7 +768,7 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,
}
}
-void LLPanelGroupSubTab::setFooterEnabled(BOOL enable)
+void LLPanelGroupSubTab::setFooterEnabled(bool enable)
{
if (mFooter)
{
@@ -783,9 +785,9 @@ LLPanelGroupMembersSubTab::LLPanelGroupMembersSubTab()
mMembersList(NULL),
mAssignedRolesList(NULL),
mAllowedActionsList(NULL),
- mChanged(FALSE),
- mPendingMemberUpdate(FALSE),
- mHasMatch(FALSE),
+ mChanged(false),
+ mPendingMemberUpdate(false),
+ mHasMatch(false),
mNumOwnerAdditions(0)
{
}
@@ -806,7 +808,7 @@ LLPanelGroupMembersSubTab::~LLPanelGroupMembersSubTab()
}
}
-BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root)
+bool LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root)
{
LLPanelGroupSubTab::postBuildSubTab(root);
@@ -823,13 +825,13 @@ BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root)
mAllowedActionsList = parent->getChild<LLScrollListCtrl>("member_allowed_actions", recurse);
mActionDescription = parent->getChild<LLTextEditor>("member_action_description", recurse);
- if (!mMembersList || !mAssignedRolesList || !mAllowedActionsList || !mActionDescription) return FALSE;
+ if (!mMembersList || !mAssignedRolesList || !mAllowedActionsList || !mActionDescription) return false;
- mAllowedActionsList->setCommitOnSelectionChange(TRUE);
+ mAllowedActionsList->setCommitOnSelectionChange(true);
mAllowedActionsList->setCommitCallback(boost::bind(&LLPanelGroupMembersSubTab::updateActionDescription, this));
// We want to be notified whenever a member is selected.
- mMembersList->setCommitOnSelectionChange(TRUE);
+ mMembersList->setCommitOnSelectionChange(true);
mMembersList->setCommitCallback(onMemberSelect, this);
// Show the member's profile on double click.
mMembersList->setDoubleClickCallback(onMemberDoubleClick, this);
@@ -844,7 +846,7 @@ BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root)
std::string order_by = gSavedSettings.getString("GroupMembersSortOrder");
if(!order_by.empty())
{
- mMembersList->sortByColumn(order_by, TRUE);
+ mMembersList->sortByColumn(order_by, true);
}
LLButton* button = parent->getChild<LLButton>("member_invite", recurse);
@@ -858,17 +860,17 @@ BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root)
if ( mEjectBtn )
{
mEjectBtn->setClickedCallback(onEjectMembers, this);
- mEjectBtn->setEnabled(FALSE);
+ mEjectBtn->setEnabled(false);
}
mBanBtn = parent->getChild<LLButton>("member_ban", recurse);
if(mBanBtn)
{
mBanBtn->setClickedCallback(onBanMember, this);
- mBanBtn->setEnabled(FALSE);
+ mBanBtn->setEnabled(false);
}
- return TRUE;
+ return true;
}
void LLPanelGroupMembersSubTab::setGroupID(const LLUUID& id)
@@ -936,9 +938,9 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
allowed_by_some,
allowed_by_all,
NULL,
- FALSE,
- FALSE,
- FALSE);
+ false,
+ false,
+ false);
//////////////////////////////////
// Build the assigned roles list.
@@ -947,9 +949,9 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
LLGroupMgrGroupData::role_list_t::iterator iter = gdatap->mRoles.begin();
LLGroupMgrGroupData::role_list_t::iterator end = gdatap->mRoles.end();
- BOOL can_ban_members = gAgent.hasPowerInGroup(mGroupID, GP_GROUP_BAN_ACCESS);
- BOOL can_eject_members = gAgent.hasPowerInGroup(mGroupID, GP_MEMBER_EJECT);
- BOOL member_is_owner = FALSE;
+ bool can_ban_members = gAgent.hasPowerInGroup(mGroupID, GP_GROUP_BAN_ACCESS);
+ bool can_eject_members = gAgent.hasPowerInGroup(mGroupID, GP_MEMBER_EJECT);
+ bool member_is_owner = false;
for( ; iter != end; ++iter)
{
@@ -959,14 +961,14 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
if (group_role_data)
{
- const BOOL needs_sort = FALSE;
+ const bool needs_sort = false;
S32 count = group_role_data->getMembersInRole(
selected_members, needs_sort);
//check if the user has permissions to assign/remove
//members to/from the role (but the ability to add/remove
//should only be based on the "saved" changes to the role
//not in the temp/meta data. -jwolk
- BOOL cb_enable = ( (count > 0) ?
+ bool cb_enable = ( (count > 0) ?
agentCanRemoveFromRole(mGroupID, role_id) :
agentCanAddToRole(mGroupID, role_id) );
@@ -994,8 +996,8 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
if ( member_data && member_data->isInRole(gdatap->mOwnerRole) )
{
// Can't remove other owners.
- cb_enable = FALSE;
- can_ban_members = FALSE;
+ cb_enable = false;
+ can_ban_members = false;
break;
}
}
@@ -1017,10 +1019,10 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
// If anyone selected is in any role besides 'Everyone' then they can't be ejected.
if (role_id.notNull() && (count > 0))
{
- can_eject_members = FALSE;
+ can_eject_members = false;
if (role_id == gdatap->mOwnerRole)
{
- member_is_owner = TRUE;
+ member_is_owner = true;
}
}
@@ -1076,12 +1078,12 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
LL_WARNS() << "No group role data for " << iter->second << LL_ENDL;
}
}
- mAssignedRolesList->setEnabled(TRUE);
+ mAssignedRolesList->setEnabled(true);
if (gAgent.isGodlike())
{
- can_eject_members = TRUE;
- // can_ban_members = TRUE;
+ can_eject_members = true;
+ // can_ban_members = true;
}
if (!can_eject_members && !member_is_owner)
@@ -1094,8 +1096,8 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
if ( member_data && member_data->isInRole(gdatap->mOwnerRole) )
{
- can_eject_members = TRUE;
- //can_ban_members = TRUE;
+ can_eject_members = true;
+ //can_ban_members = true;
}
}
@@ -1107,12 +1109,12 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
{
if( gAgent.hasPowerInGroup(mGroupID, GP_MEMBER_EJECT))
{
- can_eject_members = TRUE;
+ can_eject_members = true;
}
if( gAgent.hasPowerInGroup(mGroupID, GP_GROUP_BAN_ACCESS))
{
- can_ban_members = TRUE;
+ can_ban_members = true;
}
}
@@ -1124,8 +1126,8 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
// Don't count the agent.
if ((*member_iter) == gAgent.getID())
{
- can_eject_members = FALSE;
- can_ban_members = FALSE;
+ can_eject_members = false;
+ can_ban_members = false;
}
}
@@ -1257,7 +1259,7 @@ void LLPanelGroupMembersSubTab::handleRoleCheck(const LLUUID& role_id,
U64 powers_all_have = GP_ALL_POWERS;
U64 powers_some_have = 0;
- BOOL is_owner_role = ( gdatap->mOwnerRole == role_id );
+ bool is_owner_role = ( gdatap->mOwnerRole == role_id );
LLUUID member_id;
std::vector<LLScrollListItem*> selection = mMembersList->getAllSelected();
@@ -1329,9 +1331,9 @@ void LLPanelGroupMembersSubTab::handleRoleCheck(const LLUUID& role_id,
powers_some_have,
powers_all_have,
NULL,
- FALSE,
- FALSE,
- FALSE);
+ false,
+ false,
+ false);
}
// static
@@ -1414,7 +1416,7 @@ void LLPanelGroupMembersSubTab::cancel()
DeletePairedPointer());
mMemberRoleChangeData.clear();
- mChanged = FALSE;
+ mChanged = false;
notifyObservers();
}
}
@@ -1441,7 +1443,7 @@ bool LLPanelGroupMembersSubTab::apply(std::string& mesg)
if ( gdatap->getRoleData(gdatap->mOwnerRole, rd) )
{
- mHasModal = TRUE;
+ mHasModal = true;
args["ROLE_NAME"] = rd.mRoleName;
LLNotificationsUtil::add("AddGroupOwnerWarning",
args,
@@ -1469,7 +1471,7 @@ bool LLPanelGroupMembersSubTab::apply(std::string& mesg)
bool LLPanelGroupMembersSubTab::addOwnerCB(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- mHasModal = FALSE;
+ mHasModal = false;
if (0 == option)
{
@@ -1512,7 +1514,7 @@ void LLPanelGroupMembersSubTab::applyMemberChanges()
//force a UI update
handleMemberSelect();
- mChanged = FALSE;
+ mChanged = false;
mNumOwnerAdditions = 0;
notifyObservers();
}
@@ -1680,8 +1682,8 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc)
&& gdatap->isRoleMemberDataComplete())
{
mMemberProgress = gdatap->mMembers.begin();
- mPendingMemberUpdate = TRUE;
- mHasMatch = FALSE;
+ mPendingMemberUpdate = true;
+ mHasMatch = false;
}
else
{
@@ -1710,7 +1712,7 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc)
// Still busy retreiving role/member mappings.
retrieved << "Retrieving role member mappings...";
}
- mMembersList->setEnabled(FALSE);
+ mMembersList->setEnabled(false);
mMembersList->setCommentText(retrieved.str());
}
}
@@ -1736,7 +1738,7 @@ void LLPanelGroupMembersSubTab::addMemberToList(LLGroupMemberData* data)
mMembersList->addNameItemRow(item_params);
- mHasMatch = TRUE;
+ mHasMatch = true;
}
void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name, const LLUUID& av_id)
@@ -1765,7 +1767,7 @@ void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemb
addMemberToList(member);
if(!mMembersList->getEnabled())
{
- mMembersList->setEnabled(TRUE);
+ mMembersList->setEnabled(true);
}
}
@@ -1773,7 +1775,7 @@ void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemb
void LLPanelGroupMembersSubTab::updateMembers()
{
- mPendingMemberUpdate = FALSE;
+ mPendingMemberUpdate = false;
// Rebuild the members list.
@@ -1838,17 +1840,17 @@ void LLPanelGroupMembersSubTab::updateMembers()
{
if (mHasMatch)
{
- mMembersList->setEnabled(TRUE);
+ mMembersList->setEnabled(true);
}
else if (gdatap->mMembers.size())
{
- mMembersList->setEnabled(FALSE);
+ mMembersList->setEnabled(false);
mMembersList->setCommentText(std::string("No match."));
}
}
else
{
- mPendingMemberUpdate = TRUE;
+ mPendingMemberUpdate = true;
}
// This should clear the other two lists, since nothing is selected.
@@ -1964,8 +1966,8 @@ LLPanelGroupRolesSubTab::LLPanelGroupRolesSubTab()
mDeleteRoleButton(NULL),
mCopyRoleButton(NULL),
mCreateRoleButton(NULL),
- mFirstOpen(TRUE),
- mHasRoleChange(FALSE)
+ mFirstOpen(true),
+ mHasRoleChange(false)
{
}
@@ -1973,7 +1975,7 @@ LLPanelGroupRolesSubTab::~LLPanelGroupRolesSubTab()
{
}
-BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root)
+bool LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root)
{
LLPanelGroupSubTab::postBuildSubTab(root);
@@ -2001,7 +2003,7 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root)
|| !mRoleName || !mRoleTitle || !mRoleDescription || !mMemberVisibleCheck)
{
LL_WARNS() << "ARG! element not found." << LL_ENDL;
- return FALSE;
+ return false;
}
mRemoveEveryoneTxt = getString("cant_delete_role");
@@ -2011,7 +2013,7 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root)
if ( mCreateRoleButton )
{
mCreateRoleButton->setClickedCallback(onCreateRole, this);
- mCreateRoleButton->setEnabled(FALSE);
+ mCreateRoleButton->setEnabled(false);
}
mCopyRoleButton =
@@ -2019,7 +2021,7 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root)
if ( mCopyRoleButton )
{
mCopyRoleButton->setClickedCallback(onCopyRole, this);
- mCopyRoleButton->setEnabled(FALSE);
+ mCopyRoleButton->setEnabled(false);
}
mDeleteRoleButton =
@@ -2027,31 +2029,31 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root)
if ( mDeleteRoleButton )
{
mDeleteRoleButton->setClickedCallback(onDeleteRole, this);
- mDeleteRoleButton->setEnabled(FALSE);
+ mDeleteRoleButton->setEnabled(false);
}
- mRolesList->setCommitOnSelectionChange(TRUE);
+ mRolesList->setCommitOnSelectionChange(true);
mRolesList->setCommitCallback(onRoleSelect, this);
mAssignedMembersList->setContextMenu(LLScrollListCtrl::MENU_AVATAR);
mMemberVisibleCheck->setCommitCallback(onMemberVisibilityChange, this);
- mAllowedActionsList->setCommitOnSelectionChange(TRUE);
+ mAllowedActionsList->setCommitOnSelectionChange(true);
mAllowedActionsList->setCommitCallback(boost::bind(&LLPanelGroupRolesSubTab::updateActionDescription, this));
- mRoleName->setCommitOnFocusLost(TRUE);
+ mRoleName->setCommitOnFocusLost(true);
mRoleName->setKeystrokeCallback(onPropertiesKey, this);
- mRoleTitle->setCommitOnFocusLost(TRUE);
+ mRoleTitle->setCommitOnFocusLost(true);
mRoleTitle->setKeystrokeCallback(onPropertiesKey, this);
- mRoleDescription->setCommitOnFocusLost(TRUE);
+ mRoleDescription->setCommitOnFocusLost(true);
mRoleDescription->setKeystrokeCallback(boost::bind(&LLPanelGroupRolesSubTab::onDescriptionKeyStroke, this, _1));
- setFooterEnabled(FALSE);
+ setFooterEnabled(false);
- return TRUE;
+ return true;
}
void LLPanelGroupRolesSubTab::activate()
@@ -2066,9 +2068,9 @@ void LLPanelGroupRolesSubTab::activate()
mRoleDescription->clear();
mRoleTitle->clear();
- setFooterEnabled(FALSE);
+ setFooterEnabled(false);
- mHasRoleChange = FALSE;
+ mHasRoleChange = false;
update(GC_ALL);
}
@@ -2077,7 +2079,7 @@ void LLPanelGroupRolesSubTab::deactivate()
LL_DEBUGS() << "LLPanelGroupRolesSubTab::deactivate()" << LL_ENDL;
LLPanelGroupSubTab::deactivate();
- mFirstOpen = FALSE;
+ mFirstOpen = false;
}
bool LLPanelGroupRolesSubTab::needsApply(std::string& mesg)
@@ -2101,7 +2103,7 @@ bool LLPanelGroupRolesSubTab::apply(std::string& mesg)
LL_DEBUGS() << "LLPanelGroupRolesSubTab::apply()" << LL_ENDL;
saveRoleChanges(true);
- mFirstOpen = FALSE;
+ mFirstOpen = false;
LLGroupMgr::getInstance()->sendGroupRoleChanges(mGroupID);
notifyObservers();
@@ -2111,7 +2113,7 @@ bool LLPanelGroupRolesSubTab::apply(std::string& mesg)
void LLPanelGroupRolesSubTab::cancel()
{
- mHasRoleChange = FALSE;
+ mHasRoleChange = false;
LLGroupMgr::getInstance()->cancelGroupRoleChanges(mGroupID);
notifyObservers();
@@ -2200,7 +2202,7 @@ void LLPanelGroupRolesSubTab::update(LLGroupChange gc)
item = mRolesList->addElement(row, ((*rit).first.isNull()) ? ADD_TOP : ADD_BOTTOM, this);
if (had_selection && ((*rit).first == last_selected))
{
- item->setSelected(TRUE);
+ item->setSelected(true);
}
}
}
@@ -2210,16 +2212,16 @@ void LLPanelGroupRolesSubTab::update(LLGroupChange gc)
}
}
- mRolesList->sortByColumn(std::string("name"), TRUE);
+ mRolesList->sortByColumn(std::string("name"), true);
if ( (gdatap->mRoles.size() < (U32)MAX_ROLES)
&& gAgent.hasPowerInGroup(mGroupID, GP_ROLE_CREATE) )
{
- mCreateRoleButton->setEnabled(TRUE);
+ mCreateRoleButton->setEnabled(true);
}
else
{
- mCreateRoleButton->setEnabled(FALSE);
+ mCreateRoleButton->setEnabled(false);
}
if (had_selection)
@@ -2233,9 +2235,9 @@ void LLPanelGroupRolesSubTab::update(LLGroupChange gc)
mRoleName->clear();
mRoleDescription->clear();
mRoleTitle->clear();
- setFooterEnabled(FALSE);
- mDeleteRoleButton->setEnabled(FALSE);
- mCopyRoleButton->setEnabled(FALSE);
+ setFooterEnabled(false);
+ mDeleteRoleButton->setEnabled(false);
+ mCopyRoleButton->setEnabled(false);
}
}
@@ -2260,7 +2262,7 @@ void LLPanelGroupRolesSubTab::onRoleSelect(LLUICtrl* ctrl, void* user_data)
void LLPanelGroupRolesSubTab::handleRoleSelect()
{
- BOOL can_delete = TRUE;
+ bool can_delete = true;
LL_DEBUGS() << "LLPanelGroupRolesSubTab::handleRoleSelect()" << LL_ENDL;
mAssignedMembersList->deleteAllItems();
@@ -2280,16 +2282,16 @@ void LLPanelGroupRolesSubTab::handleRoleSelect()
LLScrollListItem* item = mRolesList->getFirstSelected();
if (!item)
{
- setFooterEnabled(FALSE);
+ setFooterEnabled(false);
return;
}
- setFooterEnabled(TRUE);
+ setFooterEnabled(true);
LLRoleData rd;
if (gdatap->getRoleData(item->getUUID(),rd))
{
- BOOL is_owner_role = ( gdatap->mOwnerRole == item->getUUID() );
+ bool is_owner_role = ( gdatap->mOwnerRole == item->getUUID() );
mRoleName->setText(rd.mRoleName);
mRoleTitle->setText(rd.mRoleTitle);
mRoleDescription->setText(rd.mRoleDescription);
@@ -2300,8 +2302,8 @@ void LLPanelGroupRolesSubTab::handleRoleSelect()
rd.mRolePowers,
0LL,
boost::bind(&LLPanelGroupRolesSubTab::handleActionCheck, this, _1, false),
- TRUE,
- FALSE,
+ true,
+ false,
is_owner_role);
@@ -2314,9 +2316,9 @@ void LLPanelGroupRolesSubTab::handleRoleSelect()
if ( is_owner_role )
{
// you can't delete the owner role
- can_delete = FALSE;
+ can_delete = false;
// ... or hide members with this role
- mMemberVisibleCheck->setEnabled(FALSE);
+ mMemberVisibleCheck->setEnabled(false);
}
else
{
@@ -2326,9 +2328,9 @@ void LLPanelGroupRolesSubTab::handleRoleSelect()
if (item->getUUID().isNull())
{
// Everyone role, can't edit description or name or delete
- mRoleDescription->setEnabled(FALSE);
- mRoleName->setEnabled(FALSE);
- can_delete = FALSE;
+ mRoleDescription->setEnabled(false);
+ mRoleName->setEnabled(false);
+ can_delete = false;
}
}
else
@@ -2339,9 +2341,9 @@ void LLPanelGroupRolesSubTab::handleRoleSelect()
mRoleName->clear();
mRoleDescription->clear();
mRoleTitle->clear();
- setFooterEnabled(FALSE);
+ setFooterEnabled(false);
- can_delete = FALSE;
+ can_delete = false;
}
mSelectedRole = item->getUUID();
buildMembersList();
@@ -2445,7 +2447,7 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force)
{
// Uncheck the item, for now. It will be
// checked if they click 'Yes', below.
- check->set(FALSE);
+ check->set(false);
LLRoleData rd;
LLSD args;
@@ -2454,7 +2456,7 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force)
{
args["ACTION_NAME"] = rap->mDescription;
args["ROLE_NAME"] = rd.mRoleName;
- mHasModal = TRUE;
+ mHasModal = true;
std::string warning = "AssignDangerousActionWarning";
if (GP_ROLE_CHANGE_ACTIONS == power)
{
@@ -2481,7 +2483,7 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force)
{
args["ACTION_NAME"] = rap->mDescription;
args["ROLE_NAME"] = rd.mRoleName;
- mHasModal = TRUE;
+ mHasModal = true;
std::vector<LLScrollListItem*> all_data = mAllowedActionsList->getAllData();
std::vector<LLScrollListItem*>::iterator ad_it = all_data.begin();
@@ -2527,9 +2529,9 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force)
current_role_powers,
current_role_powers,
boost::bind(&LLPanelGroupRolesSubTab::handleActionCheck, this, _1, false),
- TRUE,
- FALSE,
- FALSE);
+ true,
+ false,
+ false);
}
@@ -2545,7 +2547,7 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force)
gdatap->removeRolePower(role_id,power);
}
- mHasRoleChange = TRUE;
+ mHasRoleChange = true;
notifyObservers();
}
@@ -2554,13 +2556,13 @@ bool LLPanelGroupRolesSubTab::addActionCB(const LLSD& notification, const LLSD&
{
if (!check) return false;
- mHasModal = FALSE;
+ mHasModal = false;
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (0 == option)
{
// User clicked "Yes"
- check->set(TRUE);
+ check->set(true);
const bool force_add = true;
handleActionCheck(check, force_add);
}
@@ -2573,13 +2575,13 @@ void LLPanelGroupRolesSubTab::onPropertiesKey(LLLineEditor* ctrl, void* user_dat
LLPanelGroupRolesSubTab* self = static_cast<LLPanelGroupRolesSubTab*>(user_data);
if (!self) return;
- self->mHasRoleChange = TRUE;
+ self->mHasRoleChange = true;
self->notifyObservers();
}
void LLPanelGroupRolesSubTab::onDescriptionKeyStroke(LLTextEditor* caller)
{
- mHasRoleChange = TRUE;
+ mHasRoleChange = true;
notifyObservers();
}
@@ -2589,7 +2591,7 @@ void LLPanelGroupRolesSubTab::onDescriptionCommit(LLUICtrl* ctrl, void* user_dat
LLPanelGroupRolesSubTab* self = static_cast<LLPanelGroupRolesSubTab*>(user_data);
if (!self) return;
- self->mHasRoleChange = TRUE;
+ self->mHasRoleChange = true;
self->notifyObservers();
}
@@ -2653,7 +2655,7 @@ void LLPanelGroupRolesSubTab::handleCreateRole()
rd.mRoleName = "New Role";
gdatap->createRole(new_role_id,rd);
- mRolesList->deselectAllItems(TRUE);
+ mRolesList->deselectAllItems(true);
LLSD row;
row["id"] = new_role_id;
row["columns"][0]["column"] = "name";
@@ -2664,7 +2666,7 @@ void LLPanelGroupRolesSubTab::handleCreateRole()
// put focus on name field and select its contents
if(mRoleName)
{
- mRoleName->setFocus(TRUE);
+ mRoleName->setFocus(true);
mRoleName->onTabInto();
gFocusMgr.triggerFocusFlash();
}
@@ -2704,7 +2706,7 @@ void LLPanelGroupRolesSubTab::handleCopyRole()
rd.mRoleName += "(Copy)";
gdatap->createRole(new_role_id,rd);
- mRolesList->deselectAllItems(TRUE);
+ mRolesList->deselectAllItems(true);
LLSD row;
row["id"] = new_role_id;
row["columns"][0]["column"] = "name";
@@ -2715,7 +2717,7 @@ void LLPanelGroupRolesSubTab::handleCopyRole()
// put focus on name field and select its contents
if(mRoleName)
{
- mRoleName->setFocus(TRUE);
+ mRoleName->setFocus(true);
mRoleName->onTabInto();
gFocusMgr.triggerFocusFlash();
}
@@ -2792,7 +2794,7 @@ void LLPanelGroupRolesSubTab::saveRoleChanges(bool select_saved_role)
LLScrollListItem* item = mRolesList->addElement(row, ADD_BOTTOM, this);
item->setSelected(select_saved_role);
- mHasRoleChange = FALSE;
+ mHasRoleChange = false;
}
}
@@ -2823,9 +2825,9 @@ void LLPanelGroupRolesSubTab::setGroupID(const LLUUID& id)
if(mRoleDescription) mRoleDescription->clear();
if(mRoleTitle) mRoleTitle->clear();
- mHasRoleChange = FALSE;
+ mHasRoleChange = false;
- setFooterEnabled(FALSE);
+ setFooterEnabled(false);
LLPanelGroupSubTab::setGroupID(id);
}
@@ -2843,7 +2845,7 @@ LLPanelGroupActionsSubTab::~LLPanelGroupActionsSubTab()
{
}
-BOOL LLPanelGroupActionsSubTab::postBuildSubTab(LLView* root)
+bool LLPanelGroupActionsSubTab::postBuildSubTab(LLView* root)
{
LLPanelGroupSubTab::postBuildSubTab(root);
@@ -2861,15 +2863,15 @@ BOOL LLPanelGroupActionsSubTab::postBuildSubTab(LLView* root)
mActionRoles = parent->getChild<LLScrollListCtrl>("action_roles",recurse);
mActionMembers = parent->getChild<LLNameListCtrl>("action_members",recurse);
- if (!mActionList || !mActionDescription || !mActionRoles || !mActionMembers) return FALSE;
+ if (!mActionList || !mActionDescription || !mActionRoles || !mActionMembers) return false;
- mActionList->setCommitOnSelectionChange(TRUE);
+ mActionList->setCommitOnSelectionChange(true);
mActionList->setCommitCallback(boost::bind(&LLPanelGroupActionsSubTab::handleActionSelect, this));
mActionList->setContextMenu(LLScrollListCtrl::MENU_AVATAR);
update(GC_ALL);
- return TRUE;
+ return true;
}
void LLPanelGroupActionsSubTab::activate()
@@ -2884,9 +2886,9 @@ void LLPanelGroupActionsSubTab::activate()
GP_ALL_POWERS,
GP_ALL_POWERS,
NULL,
- FALSE,
- TRUE,
- FALSE);
+ false,
+ true,
+ false);
}
void LLPanelGroupActionsSubTab::deactivate()
@@ -2937,9 +2939,9 @@ void LLPanelGroupActionsSubTab::onFilterChanged()
GP_ALL_POWERS,
GP_ALL_POWERS,
NULL,
- FALSE,
- TRUE,
- FALSE);
+ false,
+ true,
+ false);
}
void LLPanelGroupActionsSubTab::handleActionSelect()
@@ -3050,7 +3052,7 @@ LLPanelGroupBanListSubTab::LLPanelGroupBanListSubTab()
mDeleteBanButton(NULL)
{}
-BOOL LLPanelGroupBanListSubTab::postBuildSubTab(LLView* root)
+bool LLPanelGroupBanListSubTab::postBuildSubTab(LLView* root)
{
LLPanelGroupSubTab::postBuildSubTab(root);
@@ -3071,19 +3073,19 @@ BOOL LLPanelGroupBanListSubTab::postBuildSubTab(LLView* root)
mBanCountText = parent->getChild<LLTextBase>("ban_count", recurse);
if(!mBanList || !mCreateBanButton || !mDeleteBanButton || !mRefreshBanListButton || !mBanCountText)
- return FALSE;
+ return false;
- mBanList->setCommitOnSelectionChange(TRUE);
+ mBanList->setCommitOnSelectionChange(true);
mBanList->setCommitCallback(onBanEntrySelect, this);
mCreateBanButton->setClickedCallback(onCreateBanEntry, this);
- mCreateBanButton->setEnabled(FALSE);
+ mCreateBanButton->setEnabled(false);
mDeleteBanButton->setClickedCallback(onDeleteBanEntry, this);
- mDeleteBanButton->setEnabled(FALSE);
+ mDeleteBanButton->setEnabled(false);
mRefreshBanListButton->setClickedCallback(onRefreshBanList, this);
- mRefreshBanListButton->setEnabled(FALSE);
+ mRefreshBanListButton->setEnabled(false);
setBanCount(0);
@@ -3091,8 +3093,8 @@ BOOL LLPanelGroupBanListSubTab::postBuildSubTab(LLView* root)
populateBanList();
- setFooterEnabled(FALSE);
- return TRUE;
+ setFooterEnabled(false);
+ return true;
}
void LLPanelGroupBanListSubTab::activate()
@@ -3100,7 +3102,7 @@ void LLPanelGroupBanListSubTab::activate()
LLPanelGroupSubTab::activate();
mBanList->deselectAllItems();
- mDeleteBanButton->setEnabled(FALSE);
+ mDeleteBanButton->setEnabled(false);
LLGroupMgrGroupData * group_datap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
if (group_datap)
@@ -3111,7 +3113,7 @@ void LLPanelGroupBanListSubTab::activate()
}
else
{
- mCreateBanButton->setEnabled(FALSE);
+ mCreateBanButton->setEnabled(false);
setBanCount(0);
}
@@ -3122,7 +3124,7 @@ void LLPanelGroupBanListSubTab::activate()
//
LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_GET, mGroupID);
- setFooterEnabled(FALSE);
+ setFooterEnabled(false);
update(GC_ALL);
}
@@ -3153,7 +3155,7 @@ void LLPanelGroupBanListSubTab::handleBanEntrySelect()
{
if (gAgent.hasPowerInGroup(mGroupID, GP_GROUP_BAN_ACCESS))
{
- mDeleteBanButton->setEnabled(TRUE);
+ mDeleteBanButton->setEnabled(true);
}
}
@@ -3229,11 +3231,11 @@ void LLPanelGroupBanListSubTab::handleDeleteBanEntry()
// Removing an item removes the selection, we shouldn't be able to click
// the button anymore until we reselect another entry.
- mDeleteBanButton->setEnabled(FALSE);
+ mDeleteBanButton->setEnabled(false);
}
// update ban-count related elements
- mCreateBanButton->setEnabled(TRUE);
+ mCreateBanButton->setEnabled(true);
setBanCount(gdatap->mBanList.size());
LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_POST, mGroupID, LLGroupMgr::BAN_DELETE, ban_ids);
@@ -3250,7 +3252,7 @@ void LLPanelGroupBanListSubTab::onRefreshBanList(void* user_data)
void LLPanelGroupBanListSubTab::handleRefreshBanList()
{
- mRefreshBanListButton->setEnabled(FALSE);
+ mRefreshBanListButton->setEnabled(false);
LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_GET, mGroupID);
}
@@ -3258,7 +3260,7 @@ void LLPanelGroupBanListSubTab::onBanListCompleted(bool isComplete)
{
if(isComplete)
{
- mRefreshBanListButton->setEnabled(TRUE);
+ mRefreshBanListButton->setEnabled(true);
populateBanList();
}
}
@@ -3309,7 +3311,7 @@ void LLPanelGroupBanListSubTab::populateBanList()
mBanList->addNameItemRow(ban_entry);
}
- mRefreshBanListButton->setEnabled(TRUE);
+ mRefreshBanListButton->setEnabled(true);
mCreateBanButton->setEnabled(gAgent.hasPowerInGroup(mGroupID, GP_GROUP_BAN_ACCESS) &&
gdatap->mBanList.size() < GB_MAX_BANNED_AGENTS);
setBanCount(gdatap->mBanList.size());
@@ -3320,6 +3322,6 @@ void LLPanelGroupBanListSubTab::setGroupID(const LLUUID& id)
if(mBanList)
mBanList->deleteAllItems();
- setFooterEnabled(FALSE);
+ setFooterEnabled(false);
LLPanelGroupSubTab::setGroupID(id);
}
diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h
index 459b77703f..3fa96213e5 100644
--- a/indra/newview/llpanelgrouproles.h
+++ b/indra/newview/llpanelgrouproles.h
@@ -53,14 +53,14 @@ public:
friend class LLPanelGroupRolesSubTab;
friend class LLPanelGroupActionsSubTab;
- virtual BOOL postBuild();
- virtual BOOL isVisibleByAgent(LLAgent* agentp);
+ virtual bool postBuild();
+ virtual bool isVisibleByAgent(LLAgent* agentp);
bool handleSubTabSwitch(const LLSD& data);
// Checks if the current tab needs to be applied, and tries to switch to the requested tab.
- BOOL attemptTransition();
+ bool attemptTransition();
// Switches to the requested tab (will close() if requested is NULL)
void transitionToTab();
@@ -73,7 +73,7 @@ public:
virtual void activate();
virtual void deactivate();
virtual bool needsApply(std::string& mesg);
- virtual BOOL hasModal();
+ virtual bool hasModal();
virtual bool apply(std::string& mesg);
virtual void cancel();
virtual void update(LLGroupChange gc);
@@ -84,7 +84,7 @@ protected:
LLPanelGroupTab* mCurrentTab;
LLPanelGroupTab* mRequestedTab;
LLTabContainer* mSubTabContainer;
- BOOL mFirstUse;
+ bool mFirstUse;
std::string mDefaultNeedsApplyMesg;
std::string mWantApplyMesg;
@@ -97,10 +97,10 @@ public:
LLPanelGroupSubTab();
virtual ~LLPanelGroupSubTab();
- virtual BOOL postBuild();
+ virtual bool postBuild();
// This allows sub-tabs to collect child widgets from a higher level in the view hierarchy.
- virtual BOOL postBuildSubTab(LLView* root);
+ virtual bool postBuildSubTab(LLView* root);
virtual void setSearchFilter( const std::string& filter );
@@ -111,7 +111,7 @@ public:
bool matchesActionSearchFilter(std::string action);
- void setFooterEnabled(BOOL enable);
+ void setFooterEnabled(bool enable);
virtual void setGroupID(const LLUUID& id);
protected:
@@ -119,23 +119,24 @@ protected:
U64 allowed_by_some,
U64 allowed_by_all,
LLUICtrl::commit_callback_t commit_callback,
- BOOL show_all,
- BOOL filter,
- BOOL is_owner_role);
+ bool show_all,
+ bool filter,
+ bool is_owner_role);
void buildActionCategory(LLScrollListCtrl* ctrl,
U64 allowed_by_some,
U64 allowed_by_all,
LLRoleActionSet* action_set,
LLUICtrl::commit_callback_t commit_callback,
- BOOL show_all,
- BOOL filter,
- BOOL is_owner_role);
+ bool show_all,
+ bool filter,
+ bool is_owner_role);
protected:
LLPanel* mHeader; // Might not be present in xui of derived class (NULL)
LLPanel* mFooter;
LLFilterEditor* mSearchEditor;
+ boost::signals2::connection mSearchCommitConnection;
std::string mSearchFilter;
@@ -146,7 +147,7 @@ protected:
bool mHasGroupBanPower; // Used to communicate between action sets due to the dependency between
// GP_GROUP_BAN_ACCESS and GP_EJECT_MEMBER and GP_ROLE_REMOVE_MEMBER
- void setOthersVisible(BOOL b);
+ void setOthersVisible(bool b);
};
@@ -156,7 +157,7 @@ public:
LLPanelGroupMembersSubTab();
virtual ~LLPanelGroupMembersSubTab();
- virtual BOOL postBuildSubTab(LLView* root);
+ virtual bool postBuildSubTab(LLView* root);
static void onMemberSelect(LLUICtrl*, void*);
void handleMemberSelect();
@@ -219,9 +220,9 @@ protected:
LLButton* mEjectBtn;
LLButton* mBanBtn;
- BOOL mChanged;
- BOOL mPendingMemberUpdate;
- BOOL mHasMatch;
+ bool mChanged;
+ bool mPendingMemberUpdate;
+ bool mHasMatch;
LLTextEditor* mActionDescription;
@@ -240,7 +241,7 @@ public:
LLPanelGroupRolesSubTab();
virtual ~LLPanelGroupRolesSubTab();
- virtual BOOL postBuildSubTab(LLView* root);
+ virtual bool postBuildSubTab(LLView* root);
virtual void activate();
virtual void deactivate();
@@ -281,7 +282,7 @@ public:
virtual void setGroupID(const LLUUID& id);
- BOOL mFirstOpen;
+ bool mFirstOpen;
protected:
void handleActionCheck(LLUICtrl* ctrl, bool force);
@@ -302,7 +303,7 @@ protected:
LLButton* mCopyRoleButton;
LLUUID mSelectedRole;
- BOOL mHasRoleChange;
+ bool mHasRoleChange;
std::string mRemoveEveryoneTxt;
};
@@ -313,7 +314,7 @@ public:
LLPanelGroupActionsSubTab();
virtual ~LLPanelGroupActionsSubTab();
- virtual BOOL postBuildSubTab(LLView* root);
+ virtual bool postBuildSubTab(LLView* root);
virtual void activate();
@@ -341,7 +342,7 @@ public:
LLPanelGroupBanListSubTab();
virtual ~LLPanelGroupBanListSubTab() {}
- virtual BOOL postBuildSubTab(LLView* root);
+ virtual bool postBuildSubTab(LLView* root);
virtual void activate();
virtual void update(LLGroupChange gc);
diff --git a/indra/newview/llpanelhome.cpp b/indra/newview/llpanelhome.cpp
index ab0ccffae4..b8b1d45d95 100644
--- a/indra/newview/llpanelhome.cpp
+++ b/indra/newview/llpanelhome.cpp
@@ -52,7 +52,7 @@ void LLPanelHome::onOpen(const LLSD& key)
mFirstView = false;
}
-BOOL LLPanelHome::postBuild()
+bool LLPanelHome::postBuild()
{
mBrowser = getChild<LLMediaCtrl>("browser");
if (mBrowser)
@@ -64,7 +64,7 @@ BOOL LLPanelHome::postBuild()
mBrowser->setHomePageUrl(url);
}
- return TRUE;
+ return true;
}
void LLPanelHome::handleMediaEvent(LLPluginClassMedia *self, EMediaEvent event)
diff --git a/indra/newview/llpanelhome.h b/indra/newview/llpanelhome.h
index 748566326f..809e8edf8c 100644
--- a/indra/newview/llpanelhome.h
+++ b/indra/newview/llpanelhome.h
@@ -44,7 +44,7 @@ class LLPanelHome :
public:
LLPanelHome();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onOpen(const LLSD& key);
private:
diff --git a/indra/newview/llpanelland.cpp b/indra/newview/llpanelland.cpp
index acdb16f432..c7ced5699b 100644
--- a/indra/newview/llpanelland.cpp
+++ b/indra/newview/llpanelland.cpp
@@ -56,7 +56,7 @@ public:
};
-BOOL LLPanelLandInfo::postBuild()
+bool LLPanelLandInfo::postBuild()
{
childSetAction("button buy land",boost::bind(onClickClaim));
childSetAction("button abandon land", boost::bind(onClickRelease));
@@ -67,7 +67,7 @@ BOOL LLPanelLandInfo::postBuild()
mCheckShowOwners = getChild<LLCheckBoxCtrl>("checkbox show owners");
getChild<LLUICtrl>("checkbox show owners")->setValue(gSavedSettings.getBOOL("ShowParcelOwners"));
- return TRUE;
+ return true;
}
//
// Methods
@@ -125,11 +125,11 @@ void LLPanelLandInfo::refresh()
//mTextPrice->setText(LLStringUtil::null);
getChild<LLUICtrl>("textbox price")->setValue(LLStringUtil::null);
- getChildView("button buy land")->setEnabled(FALSE);
- getChildView("button abandon land")->setEnabled(FALSE);
- getChildView("button subdivide land")->setEnabled(FALSE);
- getChildView("button join land")->setEnabled(FALSE);
- getChildView("button about land")->setEnabled(FALSE);
+ getChildView("button buy land")->setEnabled(false);
+ getChildView("button abandon land")->setEnabled(false);
+ getChildView("button subdivide land")->setEnabled(false);
+ getChildView("button join land")->setEnabled(false);
+ getChildView("button about land")->setEnabled(false);
}
else
{
@@ -137,30 +137,30 @@ void LLPanelLandInfo::refresh()
const LLUUID& owner_id = parcel->getOwnerID();
const LLUUID& auth_buyer_id = parcel->getAuthorizedBuyerID();
- BOOL is_public = parcel->isPublic();
- BOOL is_for_sale = parcel->getForSale()
+ bool is_public = parcel->isPublic();
+ bool is_for_sale = parcel->getForSale()
&& ((parcel->getSalePrice() > 0) || (auth_buyer_id.notNull()));
- BOOL can_buy = (is_for_sale
+ bool can_buy = (is_for_sale
&& (owner_id != gAgent.getID())
&& ((gAgent.getID() == auth_buyer_id)
|| (auth_buyer_id.isNull())));
if (is_public && !LLViewerParcelMgr::getInstance()->getParcelSelection()->getMultipleOwners())
{
- getChildView("button buy land")->setEnabled(TRUE);
+ getChildView("button buy land")->setEnabled(true);
}
else
{
getChildView("button buy land")->setEnabled(can_buy);
}
- BOOL owner_release = LLViewerParcelMgr::isParcelOwnedByAgent(parcel, GP_LAND_RELEASE);
- BOOL owner_divide = LLViewerParcelMgr::isParcelOwnedByAgent(parcel, GP_LAND_DIVIDE_JOIN);
+ bool owner_release = LLViewerParcelMgr::isParcelOwnedByAgent(parcel, GP_LAND_RELEASE);
+ bool owner_divide = LLViewerParcelMgr::isParcelOwnedByAgent(parcel, GP_LAND_DIVIDE_JOIN);
- BOOL manager_releaseable = ( gAgent.canManageEstate()
+ bool manager_releaseable = ( gAgent.canManageEstate()
&& (parcel->getOwnerID() == regionp->getOwner()) );
- BOOL manager_divideable = ( gAgent.canManageEstate()
+ bool manager_divideable = ( gAgent.canManageEstate()
&& ((parcel->getOwnerID() == regionp->getOwner()) || owner_divide) );
getChildView("button abandon land")->setEnabled(owner_release || manager_releaseable || gAgent.isGodlike());
@@ -183,21 +183,21 @@ void LLPanelLandInfo::refresh()
//&& LLViewerParcelMgr::getInstance()->getSelfCount() > 1
&& !LLViewerParcelMgr::getInstance()->getParcelSelection()->getWholeParcelSelected())
{
- getChildView("button join land")->setEnabled(TRUE);
+ getChildView("button join land")->setEnabled(true);
}
else
{
LL_DEBUGS() << "Invalid selection for joining land" << LL_ENDL;
- getChildView("button join land")->setEnabled(FALSE);
+ getChildView("button join land")->setEnabled(false);
}
- getChildView("button about land")->setEnabled(TRUE);
+ getChildView("button about land")->setEnabled(true);
// show pricing information
S32 area;
S32 claim_price;
S32 rent_price;
- BOOL for_sale;
+ bool for_sale;
F32 dwell;
LLViewerParcelMgr::getInstance()->getDisplayInfo(&area,
&claim_price,
diff --git a/indra/newview/llpanelland.h b/indra/newview/llpanelland.h
index 2ab1618d47..9626414f31 100644
--- a/indra/newview/llpanelland.h
+++ b/indra/newview/llpanelland.h
@@ -43,7 +43,7 @@ public:
LLPanelLandInfo();
virtual ~LLPanelLandInfo();
- void refresh();
+ void refresh() override;
static void refreshAll();
LLCheckBoxCtrl *mCheckShowOwners;
@@ -56,7 +56,7 @@ protected:
static void onClickAbout();
protected:
- virtual BOOL postBuild();
+ bool postBuild() override;
static LLPanelLandSelectObserver* sObserver;
static LLPanelLandInfo* sInstance;
diff --git a/indra/newview/llpanellandaudio.cpp b/indra/newview/llpanellandaudio.cpp
index 9e3fc54477..706bf02df2 100644
--- a/indra/newview/llpanellandaudio.cpp
+++ b/indra/newview/llpanellandaudio.cpp
@@ -74,7 +74,7 @@ LLPanelLandAudio::~LLPanelLandAudio()
}
-BOOL LLPanelLandAudio::postBuild()
+bool LLPanelLandAudio::postBuild()
{
mCheckSoundLocal = getChild<LLCheckBoxCtrl>("check sound local");
childSetCommitCallback("check sound local", onCommitAny, this);
@@ -100,7 +100,7 @@ BOOL LLPanelLandAudio::postBuild()
mCheckObscureMOAP = getChild<LLCheckBoxCtrl>("obscure_moap");
childSetCommitCallback("obscure_moap", onCommitAny, this);
- return TRUE;
+ return true;
}
@@ -118,7 +118,7 @@ void LLPanelLandAudio::refresh()
// something selected, hooray!
// Display options
- BOOL can_change_media = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA);
+ bool can_change_media = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA);
mCheckSoundLocal->set( parcel->getSoundLocal() );
mCheckSoundLocal->setEnabled( can_change_media );
@@ -154,7 +154,7 @@ 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();
+ bool can_change_av_sounds = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_OPTIONS) && parcel->getHaveNewParcelLimitData();
mCheckAVSoundAny->set(parcel->getAllowAnyAVSounds());
mCheckAVSoundAny->setEnabled(can_change_av_sounds);
@@ -177,14 +177,14 @@ void LLPanelLandAudio::onCommitAny(LLUICtrl*, void *userdata)
}
// Extract data from UI
- BOOL sound_local = self->mCheckSoundLocal->get();
+ bool sound_local = self->mCheckSoundLocal->get();
std::string music_url = self->mMusicURLEdit->getText();
- BOOL voice_enabled = self->mCheckParcelEnableVoice->get();
- BOOL voice_estate_chan = !self->mCheckParcelVoiceLocal->get();
+ 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
+ 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();
diff --git a/indra/newview/llpanellandaudio.h b/indra/newview/llpanellandaudio.h
index b54fe62179..f805338086 100644
--- a/indra/newview/llpanellandaudio.h
+++ b/indra/newview/llpanellandaudio.h
@@ -39,7 +39,7 @@ class LLPanelLandAudio
public:
LLPanelLandAudio(LLSafeHandle<LLParcelSelection>& parcelp);
/*virtual*/ ~LLPanelLandAudio();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
void refresh();
private:
diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp
index cc3c51dd83..24b0074bb0 100644
--- a/indra/newview/llpanellandmarkinfo.cpp
+++ b/indra/newview/llpanellandmarkinfo.cpp
@@ -69,7 +69,7 @@ LLPanelLandmarkInfo::~LLPanelLandmarkInfo()
{}
// virtual
-BOOL LLPanelLandmarkInfo::postBuild()
+bool LLPanelLandmarkInfo::postBuild()
{
LLPanelPlaceInfo::postBuild();
@@ -86,7 +86,7 @@ BOOL LLPanelLandmarkInfo::postBuild()
icon_m = getString("icon_M");
icon_r = getString("icon_R");
- return TRUE;
+ return true;
}
// virtual
@@ -134,9 +134,9 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type, const LLUUID &folder_id)
{
mCurrentTitle = getString("title_create_landmark");
- mLandmarkTitle->setVisible(FALSE);
- mLandmarkTitleEditor->setVisible(TRUE);
- mNotesEditor->setEnabled(TRUE);
+ mLandmarkTitle->setVisible(false);
+ mLandmarkTitleEditor->setVisible(true);
+ mNotesEditor->setEnabled(true);
LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance();
LLParcel* parcel = parcel_mgr->getAgentParcel();
@@ -203,16 +203,16 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type, const LLUUID &folder_id)
default:
mCurrentTitle = getString("title_landmark");
- mLandmarkTitle->setVisible(TRUE);
- mLandmarkTitleEditor->setVisible(FALSE);
- mNotesEditor->setEnabled(FALSE);
+ mLandmarkTitle->setVisible(true);
+ mLandmarkTitleEditor->setVisible(false);
+ mNotesEditor->setEnabled(false);
break;
}
populateFoldersList();
// Prevent the floater from losing focus (if the sidepanel is undocked).
- setFocus(TRUE);
+ setFocus(true);
LLPanelPlaceInfo::setInfoType(type);
}
@@ -338,7 +338,7 @@ void LLPanelLandmarkInfo::displayItemInfo(const LLInventoryItem* pItem)
mNotesEditor->setText(pItem->getDescription());
}
-void LLPanelLandmarkInfo::toggleLandmarkEditMode(BOOL enabled)
+void LLPanelLandmarkInfo::toggleLandmarkEditMode(bool enabled)
{
// If switching to edit mode while creating landmark
// the "Create Landmark" title remains.
@@ -353,7 +353,7 @@ void LLPanelLandmarkInfo::toggleLandmarkEditMode(BOOL enabled)
mLandmarkTitle->setText(mLandmarkTitleEditor->getText());
}
- if (mNotesEditor->getReadOnly() == (enabled == TRUE))
+ if (mNotesEditor->getReadOnly() == (enabled == true))
{
mLandmarkTitle->setVisible(!enabled);
mLandmarkTitleEditor->setVisible(enabled);
@@ -368,10 +368,10 @@ void LLPanelLandmarkInfo::toggleLandmarkEditMode(BOOL enabled)
}
// Prevent the floater from losing focus (if the sidepanel is undocked).
- setFocus(TRUE);
+ setFocus(true);
}
-void LLPanelLandmarkInfo::setCanEdit(BOOL enabled)
+void LLPanelLandmarkInfo::setCanEdit(bool enabled)
{
getChild<LLButton>("edit_btn")->setEnabled(enabled);
}
@@ -391,7 +391,7 @@ const LLUUID LLPanelLandmarkInfo::getLandmarkFolder() const
return mFolderCombo->getValue().asUUID();
}
-BOOL LLPanelLandmarkInfo::setLandmarkFolder(const LLUUID& id)
+bool LLPanelLandmarkInfo::setLandmarkFolder(const LLUUID& id)
{
return mFolderCombo->setCurrentByID(id);
}
@@ -545,7 +545,7 @@ void LLPanelLandmarkInfo::collectLandmarkFolders(LLInventoryModel::cat_array_t&
gInventory.accountForUpdate(update);
mItem->setParent(mNewParentId);
- mItem->updateParentOnServer(FALSE);
+ mItem->updateParentOnServer(false);
gInventory.updateItem(mItem);
gInventory.notifyObservers();
diff --git a/indra/newview/llpanellandmarkinfo.h b/indra/newview/llpanellandmarkinfo.h
index 8802ce066e..e71413a8f6 100644
--- a/indra/newview/llpanellandmarkinfo.h
+++ b/indra/newview/llpanellandmarkinfo.h
@@ -40,7 +40,7 @@ public:
LLPanelLandmarkInfo();
/*virtual*/ ~LLPanelLandmarkInfo();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void resetLocation();
@@ -55,15 +55,15 @@ public:
// Displays landmark owner, creator and creation date info.
void displayItemInfo(const LLInventoryItem* pItem);
- void toggleLandmarkEditMode(BOOL enabled);
- void setCanEdit(BOOL enabled);
+ void toggleLandmarkEditMode(bool enabled);
+ void setCanEdit(bool enabled);
const std::string& getLandmarkTitle() const;
const std::string getLandmarkNotes() const;
const LLUUID getLandmarkFolder() const;
// Select current landmark folder in combobox.
- BOOL setLandmarkFolder(const LLUUID& id);
+ bool setLandmarkFolder(const LLUUID& id);
typedef std::vector<LLPointer<LLViewerInventoryCategory> > cat_array_t;
static std::string getFullFolderName(const LLViewerInventoryCategory* cat);
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index c3334605ae..91d4a885f9 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -66,7 +66,7 @@ static void collapse_all_folders(LLFolderView* root_folder);
static void expand_all_folders(LLFolderView* root_folder);
static bool has_expanded_folders(LLFolderView* root_folder);
static bool has_collapsed_folders(LLFolderView* root_folder);
-static void toggle_restore_menu(LLMenuGL* menu, BOOL visible, BOOL enabled);
+static void toggle_restore_menu(LLMenuGL* menu, bool visible, bool enabled);
/**
* Functor counting expanded and collapsed folders in folder view tree to know
@@ -136,7 +136,7 @@ void LLOpenFolderByID::doFolder(LLFolderViewFolder* folder)
{
if (!folder->isOpen())
{
- folder->setOpen(TRUE);
+ folder->setOpen(true);
mIsFolderOpen = true;
}
}
@@ -175,16 +175,16 @@ LLLandmarksPanel::~LLLandmarksPanel()
{
}
-BOOL LLLandmarksPanel::postBuild()
+bool LLLandmarksPanel::postBuild()
{
if (!gInventory.isInventoryUsable())
- return FALSE;
+ return false;
// mast be called before any other initXXX methods to init Gear menu
initListCommandsHandlers();
initLandmarksInventoryPanel();
- return TRUE;
+ return true;
}
// virtual
@@ -292,7 +292,7 @@ void LLLandmarksPanel::updateVerbs()
}
}
-void LLLandmarksPanel::setItemSelected(const LLUUID& obj_id, BOOL take_keyboard_focus)
+void LLLandmarksPanel::setItemSelected(const LLUUID& obj_id, bool take_keyboard_focus)
{
if (!mCurrentSelectedList)
return;
@@ -301,7 +301,7 @@ void LLLandmarksPanel::setItemSelected(const LLUUID& obj_id, BOOL take_keyboard_
LLFolderViewItem* item = mCurrentSelectedList->getItemByID(obj_id);
if (!item)
return;
- root->setSelection(item, FALSE, take_keyboard_focus);
+ root->setSelection(item, false, take_keyboard_focus);
root->scrollToShowSelection();
}
@@ -473,18 +473,18 @@ void LLLandmarksPanel::initListCommandsHandlers()
{
mGearLandmarkMenu->setVisibilityChangeCallback(boost::bind(&LLLandmarksPanel::onMenuVisibilityChange, this, _1, _2));
// show menus even if all items are disabled
- mGearLandmarkMenu->setAlwaysShowMenu(TRUE);
+ mGearLandmarkMenu->setAlwaysShowMenu(true);
} // Else corrupted files?
if (mGearFolderMenu)
{
mGearFolderMenu->setVisibilityChangeCallback(boost::bind(&LLLandmarksPanel::onMenuVisibilityChange, this, _1, _2));
- mGearFolderMenu->setAlwaysShowMenu(TRUE);
+ mGearFolderMenu->setAlwaysShowMenu(true);
}
if (mAddMenu)
{
- mAddMenu->setAlwaysShowMenu(TRUE);
+ mAddMenu->setAlwaysShowMenu(true);
}
}
@@ -887,8 +887,8 @@ void LLLandmarksPanel::onMenuVisibilityChange(LLUICtrl* ctrl, const LLSD& param)
// We don't have to update items visibility if the menu is hiding.
if (!new_visibility) return;
- BOOL are_any_items_in_trash = FALSE;
- BOOL are_all_items_in_trash = TRUE;
+ bool are_any_items_in_trash = false;
+ bool are_all_items_in_trash = true;
LLFolderView* root_folder_view = mCurrentSelectedList ? mCurrentSelectedList->getRootFolder() : NULL;
if(root_folder_view)
@@ -1004,7 +1004,7 @@ bool LLLandmarksPanel::canItemBeModified(const std::string& command_name, LLFold
return can_be_modified;
}
-bool LLLandmarksPanel::handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, void* cargo_data , EAcceptance* accept)
+bool LLLandmarksPanel::handleDragAndDropToTrash(bool drop, EDragAndDropType cargo_type, void* cargo_data , EAcceptance* accept)
{
*accept = ACCEPT_NO;
@@ -1062,7 +1062,7 @@ void LLLandmarksPanel::doShowOnMap(LLLandmark* landmark)
if (mGearLandmarkMenu)
{
- mGearLandmarkMenu->setItemEnabled("show_on_map", TRUE);
+ mGearLandmarkMenu->setItemEnabled("show_on_map", true);
}
}
@@ -1151,7 +1151,7 @@ static void collapse_all_folders(LLFolderView* root_folder)
if (!root_folder)
return;
- root_folder->setOpenArrangeRecursively(FALSE, LLFolderViewFolder::RECURSE_DOWN);
+ root_folder->setOpenArrangeRecursively(false, LLFolderViewFolder::RECURSE_DOWN);
root_folder->arrangeAll();
}
@@ -1160,7 +1160,7 @@ static void expand_all_folders(LLFolderView* root_folder)
if (!root_folder)
return;
- root_folder->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_DOWN);
+ root_folder->setOpenArrangeRecursively(true, LLFolderViewFolder::RECURSE_DOWN);
root_folder->arrangeAll();
}
@@ -1195,7 +1195,7 @@ static bool has_collapsed_folders(LLFolderView* root_folder)
// Displays "Restore Item" context menu entry while hiding
// all other entries or vice versa.
// Sets "Restore Item" enabled state.
-void toggle_restore_menu(LLMenuGL *menu, BOOL visible, BOOL enabled)
+void toggle_restore_menu(LLMenuGL *menu, bool visible, bool enabled)
{
if (!menu) return;
@@ -1225,17 +1225,17 @@ LLFavoritesPanel::LLFavoritesPanel()
buildFromFile("panel_favorites.xml");
}
-BOOL LLFavoritesPanel::postBuild()
+bool LLFavoritesPanel::postBuild()
{
if (!gInventory.isInventoryUsable())
- return FALSE;
+ return false;
// mast be called before any other initXXX methods to init Gear menu
LLLandmarksPanel::initListCommandsHandlers();
initFavoritesInventoryPanel();
- return TRUE;
+ return true;
}
void LLFavoritesPanel::initFavoritesInventoryPanel()
diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h
index 16f3a5dc24..154c5fe505 100644
--- a/indra/newview/llpanellandmarks.h
+++ b/indra/newview/llpanellandmarks.h
@@ -52,7 +52,7 @@ public:
LLLandmarksPanel(bool is_landmark_panel);
virtual ~LLLandmarksPanel();
- BOOL postBuild() override;
+ bool postBuild() override;
void onSearchEdit(const std::string& string) override;
void onShowOnMap() override;
void onShowProfile() override;
@@ -68,7 +68,7 @@ public:
/**
* Processes drag-n-drop of the Landmarks and folders into trash button.
*/
- bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept) override;
+ bool handleDragAndDropToTrash(bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept) override;
void setCurrentSelectedList(LLPlacesInventoryPanel* inventory_list)
{
@@ -78,7 +78,7 @@ public:
/**
* Selects item with "obj_id" in one of accordion tabs.
*/
- void setItemSelected(const LLUUID& obj_id, BOOL take_keyboard_focus);
+ void setItemSelected(const LLUUID& obj_id, bool take_keyboard_focus);
void updateMenuVisibility(LLUICtrl* menu);
@@ -162,7 +162,7 @@ class LLFavoritesPanel : public LLLandmarksPanel
public:
LLFavoritesPanel();
- BOOL postBuild() override;
+ bool postBuild() override;
void initFavoritesInventoryPanel();
};
diff --git a/indra/newview/llpanellandmedia.cpp b/indra/newview/llpanellandmedia.cpp
index ca252d1455..de5ccb0240 100644
--- a/indra/newview/llpanellandmedia.cpp
+++ b/indra/newview/llpanellandmedia.cpp
@@ -78,12 +78,12 @@ LLPanelLandMedia::~LLPanelLandMedia()
{
}
-BOOL LLPanelLandMedia::postBuild()
+bool LLPanelLandMedia::postBuild()
{
mMediaTextureCtrl = getChild<LLTextureCtrl>("media texture");
mMediaTextureCtrl->setCommitCallback( onCommitAny, this );
- mMediaTextureCtrl->setAllowNoTexture ( TRUE );
+ mMediaTextureCtrl->setAllowNoTexture ( true );
mMediaTextureCtrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER);
mMediaTextureCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
@@ -112,7 +112,7 @@ BOOL LLPanelLandMedia::postBuild()
mSetURLButton = getChild<LLButton>("set_media_url");
childSetAction("set_media_url", onSetBtn, this);
- return TRUE;
+ return true;
}
@@ -130,10 +130,10 @@ void LLPanelLandMedia::refresh()
// something selected, hooray!
// Display options
- BOOL can_change_media = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA);
+ bool can_change_media = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA);
mMediaURLEdit->setText(parcel->getMediaURL());
- mMediaURLEdit->setEnabled( FALSE );
+ mMediaURLEdit->setEnabled( false );
getChild<LLUICtrl>("current_url")->setValue(parcel->getMediaCurrentURL());
@@ -149,14 +149,14 @@ void LLPanelLandMedia::refresh()
mMediaTypeCombo->setEnabled( can_change_media );
getChild<LLUICtrl>("mime_type")->setValue(mime_type);
- mMediaAutoScaleCheck->set( parcel->getMediaAutoScale () );
+ mMediaAutoScaleCheck->set( static_cast<bool>(parcel->getMediaAutoScale()) );
mMediaAutoScaleCheck->setEnabled ( can_change_media );
// Special code to disable looping checkbox for HTML MIME type
// (DEV-10042 -- Parcel Media: "Loop Media" should be disabled for static media types)
bool allow_looping = LLMIMETypes::findAllowLooping( mime_type );
if ( allow_looping )
- mMediaLoopCheck->set( parcel->getMediaLoop () );
+ mMediaLoopCheck->set( static_cast<bool>(parcel->getMediaLoop()) );
else
mMediaLoopCheck->set( false );
mMediaLoopCheck->setEnabled ( can_change_media && allow_looping );
@@ -275,8 +275,8 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata)
std::string media_url = self->mMediaURLEdit->getText();
std::string media_desc = self->mMediaDescEdit->getText();
std::string mime_type = self->getChild<LLUICtrl>("mime_type")->getValue().asString();
- U8 media_auto_scale = self->mMediaAutoScaleCheck->get();
- U8 media_loop = self->mMediaLoopCheck->get();
+ U8 media_auto_scale = static_cast<U8>(self->mMediaAutoScaleCheck->get());
+ U8 media_loop = static_cast<U8>(self->mMediaLoopCheck->get());
S32 media_width = (S32)self->mMediaWidthCtrl->get();
S32 media_height = (S32)self->mMediaHeightCtrl->get();
LLUUID media_id = self->mMediaTextureCtrl->getImageAssetID();
diff --git a/indra/newview/llpanellandmedia.h b/indra/newview/llpanellandmedia.h
index 63cfa01470..b841ded56d 100644
--- a/indra/newview/llpanellandmedia.h
+++ b/indra/newview/llpanellandmedia.h
@@ -39,7 +39,7 @@ class LLPanelLandMedia
public:
LLPanelLandMedia(LLSafeHandle<LLParcelSelection>& parcelp);
/*virtual*/ ~LLPanelLandMedia();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
void refresh();
void setMediaType(const std::string& media_type);
void setMediaURL(const std::string& media_type);
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 025a653c47..97c192d87d 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -74,8 +74,8 @@
#include "llsdserialize.h"
LLPanelLogin *LLPanelLogin::sInstance = NULL;
-BOOL LLPanelLogin::sCapslockDidNotification = FALSE;
-BOOL LLPanelLogin::sCredentialSet = FALSE;
+bool LLPanelLogin::sCapslockDidNotification = false;
+bool LLPanelLogin::sCredentialSet = false;
// Helper functions
@@ -190,10 +190,10 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
mLocationLength(0),
mShowFavorites(false)
{
- setBackgroundVisible(FALSE);
- setBackgroundOpaque(TRUE);
+ setBackgroundVisible(false);
+ setBackgroundOpaque(true);
- mPasswordModified = FALSE;
+ mPasswordModified = false;
sInstance = this;
@@ -321,7 +321,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
// STEAM-14: When user presses Enter with this field in focus, initiate login
username_combo->setCommitCallback(boost::bind(&LLPanelLogin::onUserListCommit, this));
username_combo->setReturnCallback(boost::bind(&LLPanelLogin::onClickConnect, this));
- username_combo->setKeystrokeOnEsc(TRUE);
+ username_combo->setKeystrokeOnEsc(true);
LLCheckBoxCtrl* remember_name = getChild<LLCheckBoxCtrl>("remember_name");
@@ -428,7 +428,7 @@ void LLPanelLogin::addFavoritesToStartLocation()
}
if (update_password_setting)
{
- gSavedSettings.setBOOL("UpdateRememberPasswordSetting", TRUE);
+ gSavedSettings.setBOOL("UpdateRememberPasswordSetting", true);
}
break;
}
@@ -451,7 +451,7 @@ LLPanelLogin::~LLPanelLogin()
}
// virtual
-void LLPanelLogin::setFocus(BOOL b)
+void LLPanelLogin::setFocus(bool b)
{
if(b != hasFocus())
{
@@ -475,8 +475,8 @@ void LLPanelLogin::giveFocus()
std::string username = sInstance->getChild<LLUICtrl>("username_combo")->getValue().asString();
std::string pass = sInstance->getChild<LLUICtrl>("password_edit")->getValue().asString();
- BOOL have_username = !username.empty();
- BOOL have_pass = !pass.empty();
+ bool have_username = !username.empty();
+ bool have_pass = !pass.empty();
LLLineEditor* edit = NULL;
LLComboBox* combo = NULL;
@@ -494,12 +494,12 @@ void LLPanelLogin::giveFocus()
if (edit)
{
- edit->setFocus(TRUE);
+ edit->setFocus(true);
edit->selectAll();
}
else if (combo)
{
- combo->setFocus(TRUE);
+ combo->setFocus(true);
}
}
}
@@ -517,7 +517,7 @@ void LLPanelLogin::show(const LLRect &rect,
if( !gFocusMgr.getKeyboardFocus() )
{
// Grab focus and move cursor to first enabled control
- sInstance->setFocus(TRUE);
+ sInstance->setFocus(true);
}
// Make sure that focus always goes here (and use the latest sInstance that was just created)
@@ -579,7 +579,7 @@ void LLPanelLogin::setFields(LLPointer<LLCredential> credential)
LL_WARNS() << "Attempted fillFields with no login view shown" << LL_ENDL;
return;
}
- sCredentialSet = TRUE;
+ sCredentialSet = true;
LL_INFOS("Credentials") << "Setting login fields to " << *credential << LL_ENDL;
LLSD identifier = credential.notNull() ? credential->getIdentifier() : LLSD();
@@ -715,7 +715,7 @@ void LLPanelLogin::getFields(LLPointer<LLCredential>& credential,
// static
-BOOL LLPanelLogin::areCredentialFieldsDirty()
+bool LLPanelLogin::areCredentialFieldsDirty()
{
if (!sInstance)
{
@@ -743,7 +743,7 @@ void LLPanelLogin::updateLocationSelectorsVisibility()
{
if (sInstance)
{
- BOOL show_server = gSavedSettings.getBOOL("ForceShowGrid");
+ bool show_server = gSavedSettings.getBOOL("ForceShowGrid");
LLComboBox* server_combo = sInstance->getChild<LLComboBox>("server_combo");
if ( server_combo )
{
@@ -890,7 +890,7 @@ void LLPanelLogin::loadLoginPage()
// First Login?
if (gSavedSettings.getBOOL("FirstLoginThisInstall"))
{
- params["firstlogin"] = "TRUE"; // not bool: server expects string TRUE
+ params["firstlogin"] = "true"; // not bool: server expects string true
}
// Channel and Version
@@ -941,7 +941,7 @@ void LLPanelLogin::onClickConnect(bool commit_fields)
if (commit_fields)
{
// JC - Make sure the fields all get committed.
- sInstance->setFocus(FALSE);
+ sInstance->setFocus(false);
}
LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo");
@@ -977,7 +977,7 @@ void LLPanelLogin::onClickConnect(bool commit_fields)
}
else
{
- sCredentialSet = FALSE;
+ sCredentialSet = false;
LLPointer<LLCredential> cred;
bool remember_1, remember_2;
getFields(cred, remember_1, remember_2);
@@ -1101,7 +1101,7 @@ void LLPanelLogin::onRememberPasswordCheck(void*)
{
if (sInstance)
{
- gSavedSettings.setBOOL("UpdateRememberPasswordSetting", TRUE);
+ gSavedSettings.setBOOL("UpdateRememberPasswordSetting", true);
LLPointer<LLCredential> cred;
bool remember_user, remember_password;
@@ -1116,11 +1116,11 @@ void LLPanelLogin::onRememberPasswordCheck(void*)
void LLPanelLogin::onPassKey(LLLineEditor* caller, void* user_data)
{
LLPanelLogin *self = (LLPanelLogin *)user_data;
- self->mPasswordModified = TRUE;
- if (gKeyboard->getKeyDown(KEY_CAPSLOCK) && sCapslockDidNotification == FALSE)
+ self->mPasswordModified = true;
+ if (gKeyboard->getKeyDown(KEY_CAPSLOCK) && sCapslockDidNotification == false)
{
// *TODO: use another way to notify user about enabled caps lock, see EXT-6858
- sCapslockDidNotification = TRUE;
+ sCapslockDidNotification = true;
}
LLLineEditor* password_edit(self->getChild<LLLineEditor>("password_edit"));
@@ -1205,7 +1205,7 @@ void LLPanelLogin::updateLoginButtons()
{
remember_name->setValue(true);
LLCheckBoxCtrl* remember_pass = getChild<LLCheckBoxCtrl>("remember_password");
- remember_pass->setEnabled(TRUE);
+ remember_pass->setEnabled(true);
} // Note: might be good idea to do "else remember_name->setValue(mRememberedState)" but it might behave 'weird' to user
}
}
@@ -1232,7 +1232,7 @@ void LLPanelLogin::populateUserList(LLPointer<LLCredential> credential)
if (cr_iter->second.notNull()) // basic safety in case of future changes
{
// cr_iter->first == user_id , to be able to be find it in case we select it
- user_combo->add(LLPanelLogin::getUserName(cr_iter->second), cr_iter->first, ADD_BOTTOM, TRUE);
+ user_combo->add(LLPanelLogin::getUserName(cr_iter->second), cr_iter->first, ADD_BOTTOM, true);
}
cr_iter++;
}
diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h
index 5c4f8e9135..39ca861026 100644
--- a/indra/newview/llpanellogin.h
+++ b/indra/newview/llpanellogin.h
@@ -49,7 +49,7 @@ public:
void *callback_data);
~LLPanelLogin();
- virtual void setFocus( BOOL b );
+ virtual void setFocus( bool b );
static void show(const LLRect &rect,
void (*callback)(S32 option, void* user_data),
@@ -60,9 +60,9 @@ public:
static void resetFields();
static void getFields(LLPointer<LLCredential>& credential, bool& remember_user, bool& remember_psswrd);
- static BOOL isCredentialSet() { return sCredentialSet; }
+ static bool isCredentialSet() { return sCredentialSet; }
- static BOOL areCredentialFieldsDirty();
+ static bool areCredentialFieldsDirty();
static void setLocation(const LLSLURL& slurl);
static void autologinToLocation(const LLSLURL& slurl);
@@ -71,8 +71,6 @@ public:
static void closePanel();
- void setSiteIsAlive( bool alive );
-
static void loadLoginPage();
static void giveFocus();
static void setAlwaysRefresh(bool refresh);
@@ -93,14 +91,12 @@ public:
private:
friend class LLPanelLoginListener;
void addFavoritesToStartLocation();
- void addUsersWithFavoritesToUsername();
void onSelectServer();
void onLocationSLURL();
static void setFields(LLPointer<LLCredential> credential);
static void onClickConnect(bool commit_fields = true);
- static void onClickNewAccount(void*);
static void onClickVersion(void*);
static void onClickForgotPassword(void*);
static void onClickSignUp(void*);
@@ -109,7 +105,6 @@ private:
static void onRememberUserCheck(void*);
static void onRememberPasswordCheck(void*);
static void onPassKey(LLLineEditor* caller, void* user_data);
- static void updateServerCombo();
private:
std::unique_ptr<LLPanelLoginListener> mListener;
@@ -120,14 +115,14 @@ private:
void (*mCallback)(S32 option, void *userdata);
void* mCallbackData;
- BOOL mPasswordModified;
+ bool mPasswordModified;
bool mShowFavorites;
static LLPanelLogin* sInstance;
- static BOOL sCapslockDidNotification;
+ static bool sCapslockDidNotification;
bool mFirstLoginThisInstall;
- static BOOL sCredentialSet;
+ static bool sCredentialSet;
unsigned int mUsernameLength;
unsigned int mPasswordLength;
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 20241aac24..f20b135faf 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -56,6 +56,7 @@
#include "lltrans.h"
#include "llviewermenu.h"
#include "llviewertexturelist.h"
+#include "llviewerinventory.h"
#include "llsidepanelinventory.h"
#include "llfolderview.h"
#include "llradiogroup.h"
@@ -79,11 +80,11 @@ class LLFloaterInventoryFinder : public LLFloater
public:
LLFloaterInventoryFinder( LLPanelMainInventory* inventory_view);
virtual void draw();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
void changeFilter(LLInventoryFilter* filter);
void updateElementsFromFilter();
- BOOL getCheckShowEmpty();
- BOOL getCheckSinceLogoff();
+ bool getCheckShowEmpty();
+ bool getCheckSinceLogoff();
U32 getDateSearchDirection();
void onCreatorSelfFilterCommit();
@@ -138,10 +139,10 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p)
mSavedFolderState = new LLSaveFolderState();
- mSavedFolderState->setApply(FALSE);
+ mSavedFolderState->setApply(false);
}
-BOOL LLPanelMainInventory::postBuild()
+bool LLPanelMainInventory::postBuild()
{
gInventory.addObserver(this);
@@ -167,7 +168,7 @@ BOOL LLPanelMainInventory::postBuild()
if (recent_items_panel)
{
// assign default values until we will be sure that we have setting to restore
- recent_items_panel->setSinceLogoff(TRUE);
+ recent_items_panel->setSinceLogoff(true);
recent_items_panel->setSortOrder(LLInventoryFilter::SO_DATE);
recent_items_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
LLInventoryFilter& recent_filter = recent_items_panel->getFilter();
@@ -276,14 +277,12 @@ BOOL LLPanelMainInventory::postBuild()
initListCommandsHandlers();
- const std::string texture_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost());
const std::string sound_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getSoundUploadCost());
const std::string animation_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getAnimationUploadCost());
LLMenuGL* menu = (LLMenuGL*)mMenuAddHandle.get();
if (menu)
{
- menu->getChild<LLMenuItemGL>("Upload Image")->setLabelArg("[COST]", texture_upload_cost_str);
menu->getChild<LLMenuItemGL>("Upload Sound")->setLabelArg("[COST]", sound_upload_cost_str);
menu->getChild<LLMenuItemGL>("Upload Animation")->setLabelArg("[COST]", animation_upload_cost_str);
}
@@ -291,7 +290,7 @@ BOOL LLPanelMainInventory::postBuild()
// Trigger callback for focus received so we can deselect items in inbox/outbox
LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLPanelMainInventory::onFocusReceived, this));
- return TRUE;
+ return true;
}
// Destroys the object
@@ -381,11 +380,11 @@ void LLPanelMainInventory::startSearch()
// this forces focus to line editor portion of search editor
if (mFilterEditor)
{
- mFilterEditor->focusFirstItem(TRUE);
+ mFilterEditor->focusFirstItem(true);
}
}
-BOOL LLPanelMainInventory::handleKeyHere(KEY key, MASK mask)
+bool LLPanelMainInventory::handleKeyHere(KEY key, MASK mask)
{
LLFolderView* root_folder = mActivePanel ? mActivePanel->getRootFolder() : NULL;
if (root_folder)
@@ -398,9 +397,9 @@ BOOL LLPanelMainInventory::handleKeyHere(KEY key, MASK mask)
&& mask == MASK_NONE)
{
// move focus to inventory proper
- mActivePanel->setFocus(TRUE);
+ mActivePanel->setFocus(true);
root_folder->scrollToShowSelection();
- return TRUE;
+ return true;
}
if (mActivePanel->hasFocus() && key == KEY_UP)
@@ -597,7 +596,7 @@ void LLPanelMainInventory::findLinks(const LLUUID& item_id, const std::string& i
filter.setFindAllLinksMode(item_name, item_id);
mFilterEditor->setText(item_name);
- mFilterEditor->setFocus(TRUE);
+ mFilterEditor->setFocus(true);
}
void LLPanelMainInventory::setSortBy(const LLSD& userdata)
@@ -724,17 +723,17 @@ void LLPanelMainInventory::updateSearchTypeCombo()
}
// static
-BOOL LLPanelMainInventory::filtersVisible(void* user_data)
+bool LLPanelMainInventory::filtersVisible(void* user_data)
{
LLPanelMainInventory* self = (LLPanelMainInventory*)user_data;
- if(!self) return FALSE;
+ if(!self) return false;
return self->getFinder() != NULL;
}
void LLPanelMainInventory::onClearSearch()
{
- BOOL initially_active = FALSE;
+ bool initially_active = false;
LLFloater *finder = getFinder();
if (mActivePanel && (getActivePanel() != mWornItemsPanel))
{
@@ -752,7 +751,7 @@ void LLPanelMainInventory::onClearSearch()
// re-open folders that were initially open in case filter was active
if (mActivePanel && (mFilterSubString.size() || initially_active) && !mSingleFolderMode)
{
- mSavedFolderState->setApply(TRUE);
+ mSavedFolderState->setApply(true);
mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
LLOpenFoldersWithSelection opener;
mActivePanel->getRootFolder()->applyFunctorRecursively(opener);
@@ -810,7 +809,7 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string )
// save current folder open state if no filter currently applied
if (!mActivePanel->getFilter().isNotDefault())
{
- mSavedFolderState->setApply(FALSE);
+ mSavedFolderState->setApply(false);
mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
}
@@ -830,7 +829,7 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string )
//static
- BOOL LLPanelMainInventory::incrementalFind(LLFolderViewItem* first_item, const char *find_text, BOOL backward)
+ bool LLPanelMainInventory::incrementalFind(LLFolderViewItem* first_item, const char *find_text, bool backward)
{
LLPanelMainInventory* active_view = NULL;
@@ -850,23 +849,23 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string )
if (!active_view)
{
- return FALSE;
+ return false;
}
std::string search_string(find_text);
if (search_string.empty())
{
- return FALSE;
+ return false;
}
if (active_view->getPanel() &&
active_view->getPanel()->getRootFolder()->search(first_item, search_string, backward))
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void LLPanelMainInventory::onFilterSelected()
@@ -913,7 +912,7 @@ void LLPanelMainInventory::setFilterSubString(const std::string& string)
mActivePanel->setFilterSubString(string);
}
-BOOL LLPanelMainInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+bool LLPanelMainInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
@@ -921,7 +920,7 @@ BOOL LLPanelMainInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
{
// Check to see if we are auto scrolling from the last frame
LLInventoryPanel* panel = (LLInventoryPanel*)this->getActivePanel();
- BOOL needsToScroll = panel->getScrollableContainer()->canAutoScroll(x, y);
+ bool needsToScroll = panel->getScrollableContainer()->canAutoScroll(x, y);
if(mFilterTabs)
{
if(needsToScroll)
@@ -930,7 +929,7 @@ BOOL LLPanelMainInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
}
}
- BOOL handled = LLPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
+ bool handled = LLPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
return handled;
}
@@ -1082,7 +1081,7 @@ void LLPanelMainInventory::setSelectCallback(const LLFolderView::signal_t::slot_
getChild<LLInventoryPanel>(RECENT_ITEMS)->setSelectCallback(cb);
}
-void LLPanelMainInventory::onSelectionChange(LLInventoryPanel *panel, const std::deque<LLFolderViewItem*>& items, BOOL user_action)
+void LLPanelMainInventory::onSelectionChange(LLInventoryPanel *panel, const std::deque<LLFolderViewItem*>& items, bool user_action)
{
updateListCommands();
panel->onSelectionChange(items, user_action);
@@ -1107,7 +1106,7 @@ LLFloaterInventoryFinder::LLFloaterInventoryFinder(LLPanelMainInventory* invento
updateElementsFromFilter();
}
-BOOL LLFloaterInventoryFinder::postBuild()
+bool LLFloaterInventoryFinder::postBuild()
{
const LLRect& viewrect = mPanelMainInventory->getRect();
setRect(LLRect(viewrect.mLeft - getRect().getWidth(), viewrect.mTop, viewrect.mLeft, viewrect.mTop - getRect().getHeight()));
@@ -1129,7 +1128,7 @@ BOOL LLFloaterInventoryFinder::postBuild()
childSetAction("Close", onCloseBtn, this);
updateElementsFromFilter();
- return TRUE;
+ return true;
}
void LLFloaterInventoryFinder::onTimeAgo(LLUICtrl *ctrl, void *user_data)
{
@@ -1218,31 +1217,31 @@ void LLFloaterInventoryFinder::updateElementsFromFilter()
void LLFloaterInventoryFinder::draw()
{
U64 filter = 0xffffffffffffffffULL;
- BOOL filtered_by_all_types = TRUE;
+ bool filtered_by_all_types = true;
if (!getChild<LLUICtrl>("check_animation")->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_ANIMATION);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_calling_card")->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_CALLINGCARD);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_clothing")->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_WEARABLE);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_gesture")->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_GESTURE);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_landmark")->getValue())
@@ -1250,56 +1249,56 @@ void LLFloaterInventoryFinder::draw()
{
filter &= ~(0x1 << LLInventoryType::IT_LANDMARK);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_material")->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_MATERIAL);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_notecard")->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_NOTECARD);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_object")->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_OBJECT);
filter &= ~(0x1 << LLInventoryType::IT_ATTACHMENT);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_script")->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_LSL);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_sound")->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_SOUND);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_texture")->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_TEXTURE);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_snapshot")->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_SNAPSHOT);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_settings")->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_SETTINGS);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!filtered_by_all_types || (mPanelMainInventory->getPanel()->getFilter().getFilterTypes() & LLInventoryFilter::FILTERTYPE_DATE))
@@ -1390,7 +1389,7 @@ void LLFloaterInventoryFinder::onCreatorSelfFilterCommit()
else if(!show_creator_self || !show_creator_other)
{
mPanelMainInventory->getCurrentFilter().setFilterCreator(LLInventoryFilter::FILTERCREATOR_OTHERS);
- mCreatorOthers->set(TRUE);
+ mCreatorOthers->set(true);
}
}
@@ -1410,16 +1409,16 @@ void LLFloaterInventoryFinder::onCreatorOtherFilterCommit()
else if(!show_creator_other || !show_creator_self)
{
mPanelMainInventory->getCurrentFilter().setFilterCreator(LLInventoryFilter::FILTERCREATOR_SELF);
- mCreatorSelf->set(TRUE);
+ mCreatorSelf->set(true);
}
}
-BOOL LLFloaterInventoryFinder::getCheckShowEmpty()
+bool LLFloaterInventoryFinder::getCheckShowEmpty()
{
return getChild<LLUICtrl>("check_show_empty")->getValue();
}
-BOOL LLFloaterInventoryFinder::getCheckSinceLogoff()
+bool LLFloaterInventoryFinder::getCheckSinceLogoff()
{
return getChild<LLUICtrl>("check_since_logoff")->getValue();
}
@@ -1441,19 +1440,19 @@ void LLFloaterInventoryFinder::selectAllTypes(void* user_data)
LLFloaterInventoryFinder* self = (LLFloaterInventoryFinder*)user_data;
if(!self) return;
- self->getChild<LLUICtrl>("check_animation")->setValue(TRUE);
- self->getChild<LLUICtrl>("check_calling_card")->setValue(TRUE);
- self->getChild<LLUICtrl>("check_clothing")->setValue(TRUE);
- self->getChild<LLUICtrl>("check_gesture")->setValue(TRUE);
- self->getChild<LLUICtrl>("check_landmark")->setValue(TRUE);
- self->getChild<LLUICtrl>("check_material")->setValue(TRUE);
- self->getChild<LLUICtrl>("check_notecard")->setValue(TRUE);
- self->getChild<LLUICtrl>("check_object")->setValue(TRUE);
- self->getChild<LLUICtrl>("check_script")->setValue(TRUE);
- self->getChild<LLUICtrl>("check_sound")->setValue(TRUE);
- self->getChild<LLUICtrl>("check_texture")->setValue(TRUE);
- self->getChild<LLUICtrl>("check_snapshot")->setValue(TRUE);
- self->getChild<LLUICtrl>("check_settings")->setValue(TRUE);
+ self->getChild<LLUICtrl>("check_animation")->setValue(true);
+ self->getChild<LLUICtrl>("check_calling_card")->setValue(true);
+ self->getChild<LLUICtrl>("check_clothing")->setValue(true);
+ self->getChild<LLUICtrl>("check_gesture")->setValue(true);
+ self->getChild<LLUICtrl>("check_landmark")->setValue(true);
+ self->getChild<LLUICtrl>("check_material")->setValue(true);
+ self->getChild<LLUICtrl>("check_notecard")->setValue(true);
+ self->getChild<LLUICtrl>("check_object")->setValue(true);
+ self->getChild<LLUICtrl>("check_script")->setValue(true);
+ self->getChild<LLUICtrl>("check_sound")->setValue(true);
+ self->getChild<LLUICtrl>("check_texture")->setValue(true);
+ self->getChild<LLUICtrl>("check_snapshot")->setValue(true);
+ self->getChild<LLUICtrl>("check_settings")->setValue(true);
}
//static
@@ -1462,19 +1461,19 @@ void LLFloaterInventoryFinder::selectNoTypes(void* user_data)
LLFloaterInventoryFinder* self = (LLFloaterInventoryFinder*)user_data;
if(!self) return;
- self->getChild<LLUICtrl>("check_animation")->setValue(FALSE);
- self->getChild<LLUICtrl>("check_calling_card")->setValue(FALSE);
- self->getChild<LLUICtrl>("check_clothing")->setValue(FALSE);
- self->getChild<LLUICtrl>("check_gesture")->setValue(FALSE);
- self->getChild<LLUICtrl>("check_landmark")->setValue(FALSE);
- self->getChild<LLUICtrl>("check_material")->setValue(FALSE);
- self->getChild<LLUICtrl>("check_notecard")->setValue(FALSE);
- self->getChild<LLUICtrl>("check_object")->setValue(FALSE);
- self->getChild<LLUICtrl>("check_script")->setValue(FALSE);
- self->getChild<LLUICtrl>("check_sound")->setValue(FALSE);
- self->getChild<LLUICtrl>("check_texture")->setValue(FALSE);
- self->getChild<LLUICtrl>("check_snapshot")->setValue(FALSE);
- self->getChild<LLUICtrl>("check_settings")->setValue(FALSE);
+ self->getChild<LLUICtrl>("check_animation")->setValue(false);
+ self->getChild<LLUICtrl>("check_calling_card")->setValue(false);
+ self->getChild<LLUICtrl>("check_clothing")->setValue(false);
+ self->getChild<LLUICtrl>("check_gesture")->setValue(false);
+ self->getChild<LLUICtrl>("check_landmark")->setValue(false);
+ self->getChild<LLUICtrl>("check_material")->setValue(false);
+ self->getChild<LLUICtrl>("check_notecard")->setValue(false);
+ self->getChild<LLUICtrl>("check_object")->setValue(false);
+ self->getChild<LLUICtrl>("check_script")->setValue(false);
+ self->getChild<LLUICtrl>("check_sound")->setValue(false);
+ self->getChild<LLUICtrl>("check_texture")->setValue(false);
+ self->getChild<LLUICtrl>("check_snapshot")->setValue(false);
+ self->getChild<LLUICtrl>("check_settings")->setValue(false);
}
//////////////////////////////////////////////////////////////////////////////////
@@ -2001,14 +2000,14 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata)
}
}
-void LLPanelMainInventory::onVisibilityChange( BOOL new_visibility )
+void LLPanelMainInventory::onVisibilityChange( bool new_visibility )
{
if(!new_visibility)
{
LLMenuGL* menu = (LLMenuGL*)mMenuAddHandle.get();
if (menu)
{
- menu->setVisible(FALSE);
+ menu->setVisible(false);
}
getActivePanel()->getRootFolder()->finishRenamingItem();
}
@@ -2039,12 +2038,12 @@ bool LLPanelMainInventory::isSaveTextureEnabled(const LLSD& userdata)
return false;
}
-BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
+bool LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
{
const std::string command_name = userdata.asString();
if (command_name == "not_empty")
{
- BOOL status = FALSE;
+ bool status = false;
LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem();
if (current_item)
{
@@ -2073,15 +2072,15 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
}
else{
LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem();
- if (!current_item) return FALSE;
+ if (!current_item) return false;
item_id = static_cast<LLFolderViewModelItemInventory*>(current_item->getViewModelItem())->getUUID();
}
const LLViewerInventoryItem *item = gInventory.getItem(item_id);
if (item && item->getIsLinkType() && !item->getIsBrokenLink())
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
if (command_name == "find_links")
@@ -2094,30 +2093,30 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
else{
LLFolderView* root = getActivePanel()->getRootFolder();
std::set<LLFolderViewItem*> selection_set = root->getSelectionList();
- if (selection_set.size() != 1) return FALSE;
+ if (selection_set.size() != 1) return false;
LLFolderViewItem* current_item = root->getCurSelectedItem();
- if (!current_item) return FALSE;
+ if (!current_item) return false;
item_id = static_cast<LLFolderViewModelItemInventory*>(current_item->getViewModelItem())->getUUID();
}
const LLInventoryObject *obj = gInventory.getObject(item_id);
if (obj && !obj->getIsLinkType() && LLAssetType::lookupCanLink(obj->getType()))
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
// This doesn't currently work, since the viewer can't change an assetID an item.
if (command_name == "regenerate_link")
{
LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem();
- if (!current_item) return FALSE;
+ if (!current_item) return false;
const LLUUID& item_id = static_cast<LLFolderViewModelItemInventory*>(current_item->getViewModelItem())->getUUID();
const LLViewerInventoryItem *item = gInventory.getItem(item_id);
if (item && item->getIsBrokenLink())
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
if (command_name == "share")
@@ -2128,9 +2127,9 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
}
else{
LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem();
- if (!current_item) return FALSE;
+ if (!current_item) return false;
LLSidepanelInventory* parent = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
- return parent ? parent->canShare() : FALSE;
+ return parent ? parent->canShare() : false;
}
}
if (command_name == "empty_trash")
@@ -2146,7 +2145,7 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
return children != LLInventoryModel::CHILDREN_NO && gInventory.isCategoryComplete(trash_id);
}
- return TRUE;
+ return true;
}
bool LLPanelMainInventory::isActionVisible(const LLSD& userdata)
@@ -2164,7 +2163,7 @@ bool LLPanelMainInventory::isActionVisible(const LLSD& userdata)
return true;
}
-BOOL LLPanelMainInventory::isActionChecked(const LLSD& userdata)
+bool LLPanelMainInventory::isActionChecked(const LLSD& userdata)
{
U32 sort_order_mask = (mSingleFolderMode && isGalleryViewMode()) ? mCombinationGalleryPanel->getSortOrder() : getActivePanel()->getSortOrder();
const std::string command_name = userdata.asString();
@@ -2221,7 +2220,7 @@ BOOL LLPanelMainInventory::isActionChecked(const LLSD& userdata)
return isCombinationViewMode();
}
- return FALSE;
+ return false;
}
void LLPanelMainInventory::setUploadCostIfNeeded()
@@ -2229,11 +2228,9 @@ void LLPanelMainInventory::setUploadCostIfNeeded()
LLMenuGL* menu = (LLMenuGL*)mMenuAddHandle.get();
if(mNeedUploadCost && menu)
{
- const std::string texture_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost());
const std::string sound_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getSoundUploadCost());
const std::string animation_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getAnimationUploadCost());
- menu->getChild<LLView>("Upload Image")->setLabelArg("[COST]", texture_upload_cost_str);
menu->getChild<LLView>("Upload Sound")->setLabelArg("[COST]", sound_upload_cost_str);
menu->getChild<LLView>("Upload Animation")->setLabelArg("[COST]", animation_upload_cost_str);
}
@@ -2342,7 +2339,7 @@ void LLPanelMainInventory::onCombinationGallerySelectionChanged(const LLUUID& ca
{
}
-void LLPanelMainInventory::onCombinationInventorySelectionChanged(const std::deque<LLFolderViewItem*>& items, BOOL user_action)
+void LLPanelMainInventory::onCombinationInventorySelectionChanged(const std::deque<LLFolderViewItem*>& items, bool user_action)
{
onSelectionChange(mCombinationInventoryPanel, items, user_action);
}
@@ -2474,9 +2471,9 @@ void LLPanelMainInventory::updateCombinationVisibility()
&& mCombInvUUIDNeedsRename.notNull()
&& mCombinationInventoryPanel->areViewsInitialized())
{
- mCombinationInventoryPanel->setSelectionByID(mCombInvUUIDNeedsRename, TRUE);
+ mCombinationInventoryPanel->setSelectionByID(mCombInvUUIDNeedsRename, true);
mCombinationInventoryPanel->getRootFolder()->scrollToShowSelection();
- mCombinationInventoryPanel->getRootFolder()->setNeedsAutoRename(TRUE);
+ mCombinationInventoryPanel->getRootFolder()->setNeedsAutoRename(true);
mCombInvUUIDNeedsRename.setNull();
}
}
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index fbfca43f64..2d74670cab 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -65,7 +65,7 @@ public:
LLPanelMainInventory(const LLPanel::Params& p = getDefaultParams());
~LLPanelMainInventory();
- BOOL postBuild();
+ bool postBuild();
enum EViewModeType
{
@@ -74,17 +74,17 @@ public:
MODE_COMBINATION
};
- virtual BOOL handleKeyHere(KEY key, MASK mask);
+ virtual bool handleKeyHere(KEY key, MASK mask);
// Inherited functionality
- /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ /*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 changed(U32);
/*virtual*/ void draw();
- /*virtual*/ void onVisibilityChange ( BOOL new_visibility );
+ /*virtual*/ void onVisibilityChange ( bool new_visibility );
LLInventoryPanel* getPanel() { return mActivePanel; }
LLInventoryPanel* getActivePanel() { return mActivePanel; }
@@ -144,14 +144,14 @@ protected:
void setFilterTextFromFilter();
void startSearch();
- void onSelectionChange(LLInventoryPanel *panel, const std::deque<LLFolderViewItem*>& items, BOOL user_action);
+ void onSelectionChange(LLInventoryPanel *panel, const std::deque<LLFolderViewItem*>& items, bool user_action);
- static BOOL filtersVisible(void* user_data);
+ static bool filtersVisible(void* user_data);
void onClearSearch();
static void onFoldersByName(void *user_data);
- static BOOL checkFoldersByName(void *user_data);
+ static bool checkFoldersByName(void *user_data);
- static BOOL incrementalFind(LLFolderViewItem* first_item, const char *find_text, BOOL backward);
+ static bool incrementalFind(LLFolderViewItem* first_item, const char *find_text, bool backward);
void onFilterSelected();
const std::string getFilterSubString();
@@ -224,8 +224,8 @@ protected:
void onAddButtonClick();
void showActionMenu(LLMenuGL* menu, std::string spawning_view_name);
void onClipboardAction(const LLSD& userdata);
- BOOL isActionEnabled(const LLSD& command_name);
- BOOL isActionChecked(const LLSD& userdata);
+ bool isActionEnabled(const LLSD& command_name);
+ bool isActionChecked(const LLSD& userdata);
void onCustomAction(const LLSD& command_name);
bool isActionVisible(const LLSD& userdata);
static bool hasSettingsInventory();
@@ -235,7 +235,7 @@ protected:
void onCombinationRootChanged(bool gallery_clicked);
void onCombinationGallerySelectionChanged(const LLUUID& category_id);
- void onCombinationInventorySelectionChanged(const std::deque<LLFolderViewItem*>& items, BOOL user_action);
+ void onCombinationInventorySelectionChanged(const std::deque<LLFolderViewItem*>& items, bool user_action);
/**
* Set upload cost in "Upload" sub menu.
*/
diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp
index 3638ee14fc..d04201da13 100644
--- a/indra/newview/llpanelmarketplaceinbox.cpp
+++ b/indra/newview/llpanelmarketplaceinbox.cpp
@@ -54,7 +54,7 @@ LLPanelMarketplaceInbox::LLPanelMarketplaceInbox(const Params& p)
, mSavedFolderState(NULL)
{
mSavedFolderState = new LLSaveFolderState();
- mSavedFolderState->setApply(FALSE);
+ mSavedFolderState->setApply(false);
}
LLPanelMarketplaceInbox::~LLPanelMarketplaceInbox()
@@ -63,14 +63,14 @@ LLPanelMarketplaceInbox::~LLPanelMarketplaceInbox()
}
// virtual
-BOOL LLPanelMarketplaceInbox::postBuild()
+bool LLPanelMarketplaceInbox::postBuild()
{
LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLPanelMarketplaceInbox::onFocusReceived, this));
mFreshCountCtrl = getChild<LLUICtrl>("inbox_fresh_new_count");
mInboxButton = getChild<LLButton>("inbox_btn");
- return TRUE;
+ return true;
}
void LLPanelMarketplaceInbox::onSelectionChange()
@@ -106,7 +106,7 @@ LLInventoryPanel * LLPanelMarketplaceInbox::setupInventoryPanel()
mInventoryPanel->getFilter().setEmptyLookupMessage("InventoryInboxNoItems");
// Hide the placeholder text
- inbox_inventory_placeholder->setVisible(FALSE);
+ inbox_inventory_placeholder->setVisible(false);
return mInventoryPanel;
}
@@ -122,10 +122,10 @@ void LLPanelMarketplaceInbox::onFocusReceived()
gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
}
-BOOL LLPanelMarketplaceInbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg)
+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;
+ return true;
}
U32 LLPanelMarketplaceInbox::getFreshItemCount() const
@@ -200,7 +200,7 @@ void LLPanelMarketplaceInbox::onClearSearch()
if (mInventoryPanel)
{
mInventoryPanel->setFilterSubString(LLStringUtil::null);
- mSavedFolderState->setApply(TRUE);
+ mSavedFolderState->setApply(true);
mInventoryPanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
LLOpenFoldersWithSelection opener;
mInventoryPanel->getRootFolder()->applyFunctorRecursively(opener);
@@ -220,7 +220,7 @@ void LLPanelMarketplaceInbox::onFilterEdit(const std::string& search_string)
if (!mInventoryPanel->getFilter().isNotDefault())
{
- mSavedFolderState->setApply(FALSE);
+ mSavedFolderState->setApply(false);
mInventoryPanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
}
mInventoryPanel->setFilterSubString(search_string);
@@ -274,7 +274,7 @@ void LLPanelMarketplaceInbox::draw()
{
mInboxButton->setLabel(getString("InboxLabelNoArg"));
- mFreshCountCtrl->setVisible(FALSE);
+ mFreshCountCtrl->setVisible(false);
}
LLPanel::draw();
diff --git a/indra/newview/llpanelmarketplaceinbox.h b/indra/newview/llpanelmarketplaceinbox.h
index 952e3a333a..6d79d8cf55 100644
--- a/indra/newview/llpanelmarketplaceinbox.h
+++ b/indra/newview/llpanelmarketplaceinbox.h
@@ -48,11 +48,11 @@ public:
LLPanelMarketplaceInbox(const Params& p = getDefaultParams());
~LLPanelMarketplaceInbox();
- /*virtual*/ BOOL postBuild();
+ bool postBuild() override;
- /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg);
+ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg) override;
- /*virtual*/ void draw();
+ void draw() override;
LLInventoryPanel * setupInventoryPanel();
@@ -68,7 +68,7 @@ private:
void onSelectionChange();
- void onFocusReceived();
+ void onFocusReceived() override;
private:
LLUICtrl * mFreshCountCtrl;
diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp
index e13bd0412d..5ce5716cf2 100644
--- a/indra/newview/llpanelmarketplaceinboxinventory.cpp
+++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp
@@ -176,13 +176,13 @@ void LLInboxFolderViewFolder::draw()
}
-BOOL LLInboxFolderViewFolder::handleMouseDown( S32 x, S32 y, MASK mask )
+bool LLInboxFolderViewFolder::handleMouseDown( S32 x, S32 y, MASK mask )
{
deFreshify();
return LLFolderViewFolder::handleMouseDown(x, y, mask);
}
-BOOL LLInboxFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask )
+bool LLInboxFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask )
{
deFreshify();
return LLFolderViewFolder::handleDoubleClick(x, y, mask);
@@ -252,7 +252,7 @@ void LLInboxFolderViewItem::addToFolder(LLFolderViewFolder* folder)
}
}
-BOOL LLInboxFolderViewItem::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLInboxFolderViewItem::handleDoubleClick(S32 x, S32 y, MASK mask)
{
deFreshify();
diff --git a/indra/newview/llpanelmarketplaceinboxinventory.h b/indra/newview/llpanelmarketplaceinboxinventory.h
index 9eef5f209c..7746ad8c7b 100644
--- a/indra/newview/llpanelmarketplaceinboxinventory.h
+++ b/indra/newview/llpanelmarketplaceinboxinventory.h
@@ -71,8 +71,8 @@ public:
void addItem(LLFolderViewItem* item);
void draw();
- BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
+ bool handleMouseDown(S32 x, S32 y, MASK mask);
+ bool handleDoubleClick(S32 x, S32 y, MASK mask);
void selectItem();
void computeFreshness();
@@ -101,7 +101,7 @@ public:
LLInboxFolderViewItem(const Params& p);
void addToFolder(LLFolderViewFolder* folder);
- BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
+ bool handleDoubleClick(S32 x, S32 y, MASK mask);
void draw();
diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp
index 8380394f2c..ffbf91b522 100644
--- a/indra/newview/llpanelmediasettingsgeneral.cpp
+++ b/indra/newview/llpanelmediasettingsgeneral.cpp
@@ -80,7 +80,7 @@ LLPanelMediaSettingsGeneral::LLPanelMediaSettingsGeneral() :
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLPanelMediaSettingsGeneral::postBuild()
+bool LLPanelMediaSettingsGeneral::postBuild()
{
// connect member vars with UI widgets
mAutoLoop = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_LOOP_KEY );
diff --git a/indra/newview/llpanelmediasettingsgeneral.h b/indra/newview/llpanelmediasettingsgeneral.h
index 06793d91fc..0950ae9c55 100644
--- a/indra/newview/llpanelmediasettingsgeneral.h
+++ b/indra/newview/llpanelmediasettingsgeneral.h
@@ -53,7 +53,7 @@ public:
// Hook that the floater calls after applying changes to the panel
void postApply();
- BOOL postBuild();
+ bool postBuild();
/*virtual*/ void draw();
/*virtual*/ void onClose(bool app_quitting);
diff --git a/indra/newview/llpanelmediasettingspermissions.cpp b/indra/newview/llpanelmediasettingspermissions.cpp
index cb0b7789ff..befa74db5c 100644
--- a/indra/newview/llpanelmediasettingspermissions.cpp
+++ b/indra/newview/llpanelmediasettingspermissions.cpp
@@ -64,7 +64,7 @@ LLPanelMediaSettingsPermissions::LLPanelMediaSettingsPermissions() :
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLPanelMediaSettingsPermissions::postBuild()
+bool LLPanelMediaSettingsPermissions::postBuild()
{
// connect member vars with UI widgets
mControls = getChild< LLComboBox >( LLMediaEntry::CONTROLS_KEY );
@@ -95,7 +95,7 @@ void LLPanelMediaSettingsPermissions::draw()
getChild<LLUICtrl>("perms_group_name")->setValue(LLStringUtil::null);
LLUUID group_id;
- BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id);
+ bool groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id);
if (groups_identical)
{
if(mPermsGroupName)
@@ -107,7 +107,7 @@ void LLPanelMediaSettingsPermissions::draw()
{
if(mPermsGroupName)
{
- mPermsGroupName->setNameID(LLUUID::null, TRUE);
+ mPermsGroupName->setNameID(LLUUID::null, true);
mPermsGroupName->refresh(LLUUID::null, std::string(), true);
}
}
diff --git a/indra/newview/llpanelmediasettingspermissions.h b/indra/newview/llpanelmediasettingspermissions.h
index f976720180..b2611745fa 100644
--- a/indra/newview/llpanelmediasettingspermissions.h
+++ b/indra/newview/llpanelmediasettingspermissions.h
@@ -44,7 +44,7 @@ public:
LLPanelMediaSettingsPermissions();
~LLPanelMediaSettingsPermissions();
- BOOL postBuild();
+ bool postBuild();
virtual void draw();
// XXX TODO: put these into a common parent class?
diff --git a/indra/newview/llpanelmediasettingssecurity.cpp b/indra/newview/llpanelmediasettingssecurity.cpp
index b588e8f930..d6ee15b7b9 100644
--- a/indra/newview/llpanelmediasettingssecurity.cpp
+++ b/indra/newview/llpanelmediasettingssecurity.cpp
@@ -58,7 +58,7 @@ LLPanelMediaSettingsSecurity::LLPanelMediaSettingsSecurity() :
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLPanelMediaSettingsSecurity::postBuild()
+bool LLPanelMediaSettingsSecurity::postBuild()
{
mEnableWhiteList = getChild< LLCheckBoxCtrl >( LLMediaEntry::WHITELIST_ENABLE_KEY );
mWhiteListList = getChild< LLScrollListCtrl >( LLMediaEntry::WHITELIST_KEY );
diff --git a/indra/newview/llpanelmediasettingssecurity.h b/indra/newview/llpanelmediasettingssecurity.h
index fe8e843571..0660182f23 100644
--- a/indra/newview/llpanelmediasettingssecurity.h
+++ b/indra/newview/llpanelmediasettingssecurity.h
@@ -40,7 +40,7 @@ public:
LLPanelMediaSettingsSecurity();
~LLPanelMediaSettingsSecurity();
- BOOL postBuild();
+ bool postBuild();
virtual void draw();
// XXX TODO: put these into a common parent class?
diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp
index 3c3cd5d522..a8553b654e 100644
--- a/indra/newview/llpanelnearbymedia.cpp
+++ b/indra/newview/llpanelnearbymedia.cpp
@@ -29,7 +29,9 @@
#include "llpanelnearbymedia.h"
#include "llaudioengine.h"
+#include "llbase64.h"
#include "llcheckboxctrl.h"
+#include "llclipboard.h"
#include "llcombobox.h"
#include "llresizebar.h"
#include "llresizehandle.h"
@@ -53,7 +55,9 @@
#include "llvovolume.h"
#include "llstatusbar.h"
#include "llsdutil.h"
+#include "lltoggleablemenu.h"
#include "llvieweraudio.h"
+#include "llviewermenu.h"
#include "llfloaterreg.h"
#include "llfloaterpreference.h" // for the gear icon
@@ -74,10 +78,10 @@ static const LLUUID PARCEL_AUDIO_LIST_ITEM_UUID = LLUUID("DF4B020D-8A24-4B95-AB5
LLPanelNearByMedia::LLPanelNearByMedia()
: mMediaList(NULL),
mEnableAllCtrl(NULL),
- mAllMediaDisabled(false),
mDebugInfoVisible(false),
mParcelMediaItem(NULL),
- mParcelAudioItem(NULL)
+ mParcelAudioItem(NULL),
+ mMoreLessBtn(NULL)
{
// This is just an initial value, mParcelAudioAutoStart does not affect ParcelMediaAutoPlayEnable
mParcelAudioAutoStart = gSavedSettings.getS32("ParcelMediaAutoPlayEnable") != 0
@@ -96,7 +100,19 @@ LLPanelNearByMedia::LLPanelNearByMedia()
mCommitCallbackRegistrar.add("SelectedMediaCtrl.Volume", boost::bind(&LLPanelNearByMedia::onCommitSelectedMediaVolume, this));
mCommitCallbackRegistrar.add("SelectedMediaCtrl.Zoom", boost::bind(&LLPanelNearByMedia::onClickSelectedMediaZoom, this));
mCommitCallbackRegistrar.add("SelectedMediaCtrl.Unzoom", boost::bind(&LLPanelNearByMedia::onClickSelectedMediaUnzoom, this));
-
+
+ // Context menu handler.
+ mCommitCallbackRegistrar.add("SelectedMediaCtrl.Action",
+ [this](LLUICtrl* ctrl, const LLSD& data)
+ {
+ onMenuAction(data);
+ });
+ mEnableCallbackRegistrar.add("SelectedMediaCtrl.Visible",
+ [this](LLUICtrl* ctrl, const LLSD& data)
+ {
+ return onMenuVisible(data);
+ });
+
buildFromFile( "panel_nearby_media.xml");
}
@@ -104,7 +120,7 @@ LLPanelNearByMedia::~LLPanelNearByMedia()
{
}
-BOOL LLPanelNearByMedia::postBuild()
+bool LLPanelNearByMedia::postBuild()
{
LLPanelPulldown::postBuild();
@@ -147,15 +163,16 @@ BOOL LLPanelNearByMedia::postBuild()
mUnzoomCtrl = getChild<LLUICtrl>("unzoom");
mVolumeSlider = getChild<LLSlider>("volume_slider");
mMuteBtn = getChild<LLButton>("mute_btn");
-
+ mMoreLessBtn = getChild<LLButton>("more_btn");
+
mEmptyNameString = getString("empty_item_text");
mParcelMediaName = getString("parcel_media_name");
mParcelAudioName = getString("parcel_audio_name");
mPlayingString = getString("playing_suffix");
mMediaList->setDoubleClickCallback(onZoomMedia, this);
- mMediaList->sortByColumnIndex(PROXIMITY_COLUMN, TRUE);
- mMediaList->sortByColumnIndex(VISIBILITY_COLUMN, FALSE);
+ mMediaList->sortByColumnIndex(PROXIMITY_COLUMN, true);
+ mMediaList->sortByColumnIndex(VISIBILITY_COLUMN, false);
refreshList();
updateControls();
@@ -166,10 +183,15 @@ BOOL LLPanelNearByMedia::postBuild()
mLessRect = getRect();
mLessRect.mBottom = minimized_controls->getRect().mBottom;
- getChild<LLUICtrl>("more_btn")->setVisible(false);
+ mMoreLessBtn->setVisible(false);
onMoreLess();
+
+ mContextMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>(
+ "menu_nearby_media.xml",
+ gMenuHolder,
+ LLViewerMenuHolderGL::child_registry_t::instance());
- return TRUE;
+ return true;
}
void LLPanelNearByMedia::handleMediaAutoPlayChanged(const LLSD& newvalue)
@@ -189,12 +211,11 @@ void LLPanelNearByMedia::handleMediaAutoPlayChanged(const LLSD& newvalue)
}
/*virtual*/
-void LLPanelNearByMedia::reshape(S32 width, S32 height, BOOL called_from_parent)
+void LLPanelNearByMedia::reshape(S32 width, S32 height, bool called_from_parent)
{
LLPanelPulldown::reshape(width, height, called_from_parent);
- LLButton* more_btn = findChild<LLButton>("more_btn");
- if (more_btn && more_btn->getValue().asBoolean())
+ if (mMoreLessBtn && mMoreLessBtn->getValue().asBoolean())
{
mMoreRect = getRect();
}
@@ -220,7 +241,7 @@ void LLPanelNearByMedia::draw()
}
/*virtual*/
-BOOL LLPanelNearByMedia::handleHover(S32 x, S32 y, MASK mask)
+bool LLPanelNearByMedia::handleHover(S32 x, S32 y, MASK mask)
{
LLPanelPulldown::handleHover(x, y, mask);
@@ -234,6 +255,36 @@ BOOL LLPanelNearByMedia::handleHover(S32 x, S32 y, MASK mask)
return true;
}
+bool LLPanelNearByMedia::handleRightMouseDown(S32 x, S32 y, MASK mask)
+{
+ S32 x_list, y_list;
+ localPointToOtherView(x, y, &x_list, &y_list, mMediaList);
+ if (mMoreLessBtn->getToggleState()
+ && mMediaList->pointInView(x_list, y_list)
+ && mMediaList->selectItemAt(x_list, y_list, mask))
+ {
+ if (mContextMenu)
+ {
+ mContextMenu->buildDrawLabels();
+ mContextMenu->updateParent(LLMenuGL::sMenuContainer);
+ LLMenuGL::showPopup(this, mContextMenu, x, y);
+ return true;
+ }
+ }
+
+ return LLPanelPulldown::handleRightMouseDown(x, y, mask);
+}
+
+
+void LLPanelNearByMedia::onVisibilityChange(bool new_visibility)
+{
+ if (!new_visibility && mContextMenu->getVisible())
+ {
+ gMenuHolder->hideMenus();
+ }
+ LLPanelPulldown::onVisibilityChange(new_visibility);
+}
+
bool LLPanelNearByMedia::getParcelAudioAutoStart()
{
return mParcelAudioAutoStart;
@@ -923,7 +974,7 @@ void LLPanelNearByMedia::onAdvancedButtonClick()
void LLPanelNearByMedia::onMoreLess()
{
- bool is_more = getChild<LLButton>("more_btn")->getToggleState();
+ bool is_more = mMoreLessBtn->getToggleState();
mNearbyMediaPanel->setVisible(is_more);
// enable resizing when expanded
@@ -934,7 +985,7 @@ void LLPanelNearByMedia::onMoreLess()
setShape(new_rect);
- getChild<LLUICtrl>("more_btn")->setVisible(true);
+ mMoreLessBtn->setVisible(true);
}
void LLPanelNearByMedia::updateControls()
@@ -1174,6 +1225,53 @@ void LLPanelNearByMedia::onClickSelectedMediaUnzoom()
LLViewerMediaFocus::getInstance()->unZoom();
}
+void LLPanelNearByMedia::onMenuAction(const LLSD& userdata)
+{
+ const std::string command_name = userdata.asString();
+ if ("copy_url" == command_name)
+ {
+ LLClipboard::instance().reset();
+ std::string url = getSelectedUrl();
+
+ if (!url.empty())
+ {
+ LLClipboard::instance().copyToClipboard(utf8str_to_wstring(url), 0, url.size());
+ }
+ }
+ else if ("copy_data" == command_name)
+ {
+ LLClipboard::instance().reset();
+ std::string url = getSelectedUrl();
+ static const std::string encoding_specifier = "base64,";
+ size_t pos = url.find(encoding_specifier);
+ if (pos != std::string::npos)
+ {
+ pos += encoding_specifier.size();
+ std::string res = LLBase64::decodeAsString(url.substr(pos));
+ LLClipboard::instance().copyToClipboard(utf8str_to_wstring(res), 0, res.size());
+ }
+ else
+ {
+ url = LLURI::unescape(url);
+ LLClipboard::instance().copyToClipboard(utf8str_to_wstring(url), 0, url.size());
+ }
+ }
+}
+
+bool LLPanelNearByMedia::onMenuVisible(const LLSD& userdata)
+{
+ const std::string command_name = userdata.asString();
+ if ("copy_data" == command_name)
+ {
+ std::string url = getSelectedUrl();
+ if (url.rfind("data:", 0) == 0)
+ {
+ // might be a a good idea to permit text/html only
+ return true;
+ }
+ }
+ return false;
+}
// static
void LLPanelNearByMedia::getNameAndUrlHelper(LLViewerMediaImpl* impl, std::string& name, std::string & url, const std::string &defaultName)
@@ -1200,3 +1298,27 @@ void LLPanelNearByMedia::getNameAndUrlHelper(LLViewerMediaImpl* impl, std::strin
}
}
+std::string LLPanelNearByMedia::getSelectedUrl()
+{
+ std::string url;
+ LLUUID selected_media_id = mMediaList->getValue().asUUID();
+ if (selected_media_id == PARCEL_AUDIO_LIST_ITEM_UUID)
+ {
+ url = LLViewerMedia::getInstance()->getParcelAudioURL();
+ }
+ else if (selected_media_id == PARCEL_MEDIA_LIST_ITEM_UUID)
+ {
+ url = LLViewerParcelMedia::getInstance()->getURL();
+ }
+ else
+ {
+ LLViewerMediaImpl* impl = LLViewerMedia::getInstance()->getMediaImplFromTextureID(selected_media_id);
+ if (NULL != impl)
+ {
+ std::string name;
+ getNameAndUrlHelper(impl, name, url, mEmptyNameString);
+ }
+ }
+ return url;
+}
+
diff --git a/indra/newview/llpanelnearbymedia.h b/indra/newview/llpanelnearbymedia.h
index 2d898d0aa1..22f154f388 100644
--- a/indra/newview/llpanelnearbymedia.h
+++ b/indra/newview/llpanelnearbymedia.h
@@ -36,6 +36,7 @@ class LLSlider;
class LLSliderCtrl;
class LLCheckBoxCtrl;
class LLTextBox;
+class LLToggleableMenu;
class LLComboBox;
class LLViewerMediaImpl;
@@ -43,10 +44,12 @@ class LLPanelNearByMedia : public LLPanelPulldown
{
public:
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void draw();
- /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent);
- /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
+ bool postBuild() override;
+ void draw() override;
+ void reshape(S32 width, S32 height, bool called_from_parent) override;
+ bool handleHover(S32 x, S32 y, MASK mask) override;
+ bool handleRightMouseDown(S32 x, S32 y, MASK mask) override;
+ void onVisibilityChange(bool new_visibility) override;
// this is part of the nearby media *dialog* so we can track whether
// the user *implicitly* wants audio on or off via their *explicit*
@@ -104,15 +107,12 @@ private:
void onClickDisableAll();
void onClickEnableParcelMedia();
void onClickDisableParcelMedia();
- void onClickMuteParcelMedia();
- void onParcelMediaVolumeSlider();
void onClickParcelMediaPlay();
void onClickParcelMediaStop();
void onClickParcelMediaPause();
void onClickParcelAudioPlay();
void onClickParcelAudioStop();
void onClickParcelAudioPause();
- void onCheckAutoPlay();
void onAdvancedButtonClick();
void onMoreLess();
@@ -124,6 +124,7 @@ private:
bool setDisabled(const LLUUID &id, bool disabled);
static void getNameAndUrlHelper(LLViewerMediaImpl* impl, std::string& name, std::string & url, const std::string &defaultName);
+ std::string getSelectedUrl();
void updateColumns();
@@ -141,6 +142,8 @@ private:
void onCommitSelectedMediaVolume();
void onClickSelectedMediaZoom();
void onClickSelectedMediaUnzoom();
+ void onMenuAction(const LLSD& userdata);
+ bool onMenuVisible(const LLSD& userdata);
LLUICtrl* mNearbyMediaPanel;
LLScrollListCtrl* mMediaList;
@@ -158,8 +161,8 @@ private:
LLUICtrl* mUnzoomCtrl;
LLSlider* mVolumeSlider;
LLButton* mMuteBtn;
+ LLButton* mMoreLessBtn;
- bool mAllMediaDisabled;
bool mDebugInfoVisible;
bool mParcelAudioAutoStart;
std::string mEmptyNameString;
@@ -171,6 +174,7 @@ private:
LLRect mLessRect;
LLScrollListItem* mParcelMediaItem;
LLScrollListItem* mParcelAudioItem;
+ LLToggleableMenu* mContextMenu;
};
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index 0704fc881d..ac0b5d40a4 100644
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -97,9 +97,9 @@ const F32 MAX_ATTACHMENT_DIST = 3.5f; // meters
//static const std::string LEGACY_FULLBRIGHT_DESC =LLTrans::getString("Fullbright");
-BOOL LLPanelObject::postBuild()
+bool LLPanelObject::postBuild()
{
- setMouseOpaque(FALSE);
+ setMouseOpaque(false);
//--------------------------------------------------------
// Top
@@ -255,17 +255,17 @@ BOOL LLPanelObject::postBuild()
LLAggregatePermissions texture_perms;
if (LLSelectMgr::getInstance()->selectGetAggregateTexturePermissions(texture_perms))
{
- BOOL can_copy =
+ bool can_copy =
texture_perms.getValue(PERM_COPY) == LLAggregatePermissions::AP_EMPTY ||
texture_perms.getValue(PERM_COPY) == LLAggregatePermissions::AP_ALL;
- BOOL can_transfer =
+ bool can_transfer =
texture_perms.getValue(PERM_TRANSFER) == LLAggregatePermissions::AP_EMPTY ||
texture_perms.getValue(PERM_TRANSFER) == LLAggregatePermissions::AP_ALL;
mCtrlSculptTexture->setCanApplyImmediately(can_copy && can_transfer);
}
else
{
- mCtrlSculptTexture->setCanApplyImmediately(FALSE);
+ mCtrlSculptTexture->setCanApplyImmediately(false);
}
}
@@ -280,21 +280,21 @@ BOOL LLPanelObject::postBuild()
// Start with everyone disabled
clearCtrls();
- return TRUE;
+ return true;
}
LLPanelObject::LLPanelObject()
: LLPanel(),
- mIsPhysical(FALSE),
- mIsTemporary(FALSE),
- mIsPhantom(FALSE),
+ mIsPhysical(false),
+ mIsTemporary(false),
+ mIsPhantom(false),
mSelectedType(MI_BOX),
mSculptTextureRevert(LLUUID::null),
mSculptTypeRevert(0),
mHasClipboardPos(false),
mHasClipboardSize(false),
mHasClipboardRot(false),
- mSizeChanged(FALSE)
+ mSizeChanged(false)
{
mCommitCallbackRegistrar.add("PanelObject.menuDoToSelected", boost::bind(&LLPanelObject::menuDoToSelected, this, _2));
mEnableCallbackRegistrar.add("PanelObject.menuEnable", boost::bind(&LLPanelObject::menuEnableItem, this, _2));
@@ -352,7 +352,7 @@ void LLPanelObject::getState( )
}
S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
- BOOL single_volume = (LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ))
+ bool single_volume = (LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ))
&& (selected_count == 1);
bool enable_move;
@@ -360,8 +360,8 @@ void LLPanelObject::getState( )
LLSelectMgr::getInstance()->selectGetEditMoveLinksetPermissions(enable_move, enable_modify);
- BOOL enable_scale = enable_modify;
- BOOL enable_rotate = enable_move; // already accounts for a case of children, which needs permModify() as well
+ bool enable_scale = enable_modify;
+ bool enable_rotate = enable_move; // already accounts for a case of children, which needs permModify() as well
LLVector3 vec;
if (enable_move)
@@ -454,20 +454,20 @@ void LLPanelObject::getState( )
// BUG? Check for all objects being editable?
S32 roots_selected = LLSelectMgr::getInstance()->getSelection()->getRootObjectCount();
- BOOL editable = root_objectp->permModify();
+ bool editable = root_objectp->permModify();
- BOOL is_flexible = volobjp && volobjp->isFlexible();
- BOOL is_permanent = root_objectp->flagObjectPermanent();
- BOOL is_permanent_enforced = root_objectp->isPermanentEnforced();
- BOOL is_character = root_objectp->flagCharacter();
+ bool is_flexible = volobjp && volobjp->isFlexible();
+ bool is_permanent = root_objectp->flagObjectPermanent();
+ bool is_permanent_enforced = root_objectp->isPermanentEnforced();
+ bool is_character = root_objectp->flagCharacter();
llassert(!is_permanent || !is_character); // should never have a permanent object that is also a character
// Lock checkbox - only modifiable if you own the object.
- BOOL self_owned = (gAgent.getID() == owner_id);
+ bool self_owned = (gAgent.getID() == owner_id);
mCheckLock->setEnabled( roots_selected > 0 && self_owned && !is_permanent_enforced);
// More lock and debit checkbox - get the values
- BOOL valid;
+ bool valid;
U32 owner_mask_on;
U32 owner_mask_off;
valid = LLSelectMgr::getInstance()->selectGetPerm(PERM_OWNER, &owner_mask_on, &owner_mask_off);
@@ -477,20 +477,20 @@ void LLPanelObject::getState( )
if(owner_mask_on & PERM_MOVE)
{
// owner can move, so not locked
- mCheckLock->set(FALSE);
- mCheckLock->setTentative(FALSE);
+ mCheckLock->set(false);
+ mCheckLock->setTentative(false);
}
else if(owner_mask_off & PERM_MOVE)
{
// owner can't move, so locked
- mCheckLock->set(TRUE);
- mCheckLock->setTentative(FALSE);
+ mCheckLock->set(true);
+ mCheckLock->setTentative(false);
}
else
{
// some locked, some not locked
- mCheckLock->set(FALSE);
- mCheckLock->setTentative(TRUE);
+ mCheckLock->set(false);
+ mCheckLock->setTentative(true);
}
}
@@ -510,7 +510,7 @@ void LLPanelObject::getState( )
mCheckTemporary->setEnabled( roots_selected>0 && editable && !is_permanent);
mIsPhantom = root_objectp->flagPhantom();
- BOOL is_volume_detect = root_objectp->flagVolumeDetect();
+ bool is_volume_detect = root_objectp->flagVolumeDetect();
llassert(!is_character || !mIsPhantom); // should never have a character that is also a phantom
mCheckPhantom->set( mIsPhantom );
mCheckPhantom->setEnabled( roots_selected>0 && editable && !is_flexible && !is_permanent_enforced && !is_character && !is_volume_detect);
@@ -519,10 +519,10 @@ void LLPanelObject::getState( )
S32 selected_item = MI_BOX;
S32 selected_hole = MI_HOLE_SAME;
- BOOL enabled = FALSE;
- BOOL hole_enabled = FALSE;
+ bool enabled = false;
+ bool hole_enabled = false;
F32 scale_x=1.f, scale_y=1.f;
- BOOL isMesh = FALSE;
+ bool isMesh = false;
if( !objectp || !objectp->getVolume() || !editable || !single_volume)
{
@@ -568,7 +568,7 @@ void LLPanelObject::getState( )
scale_x = volume_params.getRatioX();
scale_y = volume_params.getRatioY();
- BOOL linear_path = (path == LL_PCODE_PATH_LINE) || (path == LL_PCODE_PATH_FLEXIBLE);
+ bool linear_path = (path == LL_PCODE_PATH_LINE) || (path == LL_PCODE_PATH_FLEXIBLE);
if ( linear_path && profile == LL_PCODE_PROFILE_CIRCLE )
{
selected_item = MI_CYLINDER;
@@ -672,7 +672,7 @@ void LLPanelObject::getState( )
else
{
mComboHoleType->setCurrentByIndex( MI_HOLE_SAME );
- hole_enabled = FALSE;
+ hole_enabled = false;
}
// Cut interpretation varies based on base object type
@@ -802,38 +802,38 @@ void LLPanelObject::getState( )
// Compute control visibility, label names, and twist range.
// Start with defaults.
- BOOL cut_visible = TRUE;
- BOOL hollow_visible = TRUE;
- BOOL top_size_x_visible = TRUE;
- BOOL top_size_y_visible = TRUE;
- BOOL top_shear_x_visible = TRUE;
- BOOL top_shear_y_visible = TRUE;
- BOOL twist_visible = TRUE;
- BOOL advanced_cut_visible = FALSE;
- BOOL taper_visible = FALSE;
- BOOL skew_visible = FALSE;
- BOOL radius_offset_visible = FALSE;
- BOOL revolutions_visible = FALSE;
- BOOL sculpt_texture_visible = FALSE;
+ bool cut_visible = true;
+ bool hollow_visible = true;
+ bool top_size_x_visible = true;
+ bool top_size_y_visible = true;
+ bool top_shear_x_visible = true;
+ bool top_shear_y_visible = true;
+ bool twist_visible = true;
+ bool advanced_cut_visible = false;
+ bool taper_visible = false;
+ bool skew_visible = false;
+ bool radius_offset_visible = false;
+ bool revolutions_visible = false;
+ bool sculpt_texture_visible = false;
F32 twist_min = OBJECT_TWIST_LINEAR_MIN;
F32 twist_max = OBJECT_TWIST_LINEAR_MAX;
F32 twist_inc = OBJECT_TWIST_LINEAR_INC;
- BOOL advanced_is_dimple = FALSE;
- BOOL advanced_is_slice = FALSE;
- BOOL size_is_hole = FALSE;
+ bool advanced_is_dimple = false;
+ bool advanced_is_slice = false;
+ bool size_is_hole = false;
// Tune based on overall volume type
switch (selected_item)
{
case MI_SPHERE:
- top_size_x_visible = FALSE;
- top_size_y_visible = FALSE;
- top_shear_x_visible = FALSE;
- top_shear_y_visible = FALSE;
- //twist_visible = FALSE;
- advanced_cut_visible = TRUE;
- advanced_is_dimple = TRUE;
+ top_size_x_visible = false;
+ top_size_y_visible = false;
+ top_shear_x_visible = false;
+ top_shear_y_visible = false;
+ //twist_visible = false;
+ advanced_cut_visible = true;
+ advanced_is_dimple = true;
twist_min = OBJECT_TWIST_MIN;
twist_max = OBJECT_TWIST_MAX;
twist_inc = OBJECT_TWIST_INC;
@@ -842,14 +842,14 @@ void LLPanelObject::getState( )
case MI_TORUS:
case MI_TUBE:
case MI_RING:
- //top_size_x_visible = FALSE;
- //top_size_y_visible = FALSE;
- size_is_hole = TRUE;
- skew_visible = TRUE;
- advanced_cut_visible = TRUE;
- taper_visible = TRUE;
- radius_offset_visible = TRUE;
- revolutions_visible = TRUE;
+ //top_size_x_visible = false;
+ //top_size_y_visible = false;
+ size_is_hole = true;
+ skew_visible = true;
+ advanced_cut_visible = true;
+ taper_visible = true;
+ radius_offset_visible = true;
+ revolutions_visible = true;
twist_min = OBJECT_TWIST_MIN;
twist_max = OBJECT_TWIST_MAX;
twist_inc = OBJECT_TWIST_INC;
@@ -857,35 +857,35 @@ void LLPanelObject::getState( )
break;
case MI_SCULPT:
- cut_visible = FALSE;
- hollow_visible = FALSE;
- twist_visible = FALSE;
- top_size_x_visible = FALSE;
- top_size_y_visible = FALSE;
- top_shear_x_visible = FALSE;
- top_shear_y_visible = FALSE;
- skew_visible = FALSE;
- advanced_cut_visible = FALSE;
- taper_visible = FALSE;
- radius_offset_visible = FALSE;
- revolutions_visible = FALSE;
- sculpt_texture_visible = TRUE;
+ cut_visible = false;
+ hollow_visible = false;
+ twist_visible = false;
+ top_size_x_visible = false;
+ top_size_y_visible = false;
+ top_shear_x_visible = false;
+ top_shear_y_visible = false;
+ skew_visible = false;
+ advanced_cut_visible = false;
+ taper_visible = false;
+ radius_offset_visible = false;
+ revolutions_visible = false;
+ sculpt_texture_visible = true;
break;
case MI_BOX:
- advanced_cut_visible = TRUE;
- advanced_is_slice = TRUE;
+ advanced_cut_visible = true;
+ advanced_is_slice = true;
break;
case MI_CYLINDER:
- advanced_cut_visible = TRUE;
- advanced_is_slice = TRUE;
+ advanced_cut_visible = true;
+ advanced_is_slice = true;
break;
case MI_PRISM:
- advanced_cut_visible = TRUE;
- advanced_is_slice = TRUE;
+ advanced_cut_visible = true;
+ advanced_is_slice = true;
break;
default:
@@ -964,18 +964,18 @@ void LLPanelObject::getState( )
mLabelSkew ->setEnabled( enabled );
mSpinSkew ->setEnabled( enabled );
- getChildView("scale_hole")->setVisible( FALSE);
- getChildView("scale_taper")->setVisible( FALSE);
+ getChildView("scale_hole")->setVisible( false);
+ getChildView("scale_taper")->setVisible( false);
if (top_size_x_visible || top_size_y_visible)
{
if (size_is_hole)
{
- getChildView("scale_hole")->setVisible( TRUE);
+ getChildView("scale_hole")->setVisible( true);
getChildView("scale_hole")->setEnabled(enabled);
}
else
{
- getChildView("scale_taper")->setVisible( TRUE);
+ getChildView("scale_taper")->setVisible( true);
getChildView("scale_taper")->setEnabled(enabled);
}
}
@@ -987,26 +987,26 @@ void LLPanelObject::getState( )
mSpinShearX ->setEnabled( enabled );
mSpinShearY ->setEnabled( enabled );
- getChildView("advanced_cut")->setVisible( FALSE);
- getChildView("advanced_dimple")->setVisible( FALSE);
- getChildView("advanced_slice")->setVisible( FALSE);
+ getChildView("advanced_cut")->setVisible( false);
+ getChildView("advanced_dimple")->setVisible( false);
+ getChildView("advanced_slice")->setVisible( false);
if (advanced_cut_visible)
{
if (advanced_is_dimple)
{
- getChildView("advanced_dimple")->setVisible( TRUE);
+ getChildView("advanced_dimple")->setVisible( true);
getChildView("advanced_dimple")->setEnabled(enabled);
}
else if (advanced_is_slice)
{
- getChildView("advanced_slice")->setVisible( TRUE);
+ getChildView("advanced_slice")->setVisible( true);
getChildView("advanced_slice")->setEnabled(enabled);
}
else
{
- getChildView("advanced_cut")->setVisible( TRUE);
+ getChildView("advanced_cut")->setVisible( true);
getChildView("advanced_cut")->setEnabled(enabled);
}
}
@@ -1091,14 +1091,14 @@ void LLPanelObject::getState( )
U8 sculpt_type = sculpt_params->getSculptType();
U8 sculpt_stitching = sculpt_type & LL_SCULPT_TYPE_MASK;
- BOOL sculpt_invert = sculpt_type & LL_SCULPT_FLAG_INVERT;
- BOOL sculpt_mirror = sculpt_type & LL_SCULPT_FLAG_MIRROR;
+ bool sculpt_invert = sculpt_type & LL_SCULPT_FLAG_INVERT;
+ bool sculpt_mirror = sculpt_type & LL_SCULPT_FLAG_MIRROR;
isMesh = (sculpt_stitching == LL_SCULPT_TYPE_MESH);
LLTextureCtrl* mTextureCtrl = getChild<LLTextureCtrl>("sculpt texture control");
if(mTextureCtrl)
{
- mTextureCtrl->setTentative(FALSE);
+ mTextureCtrl->setTentative(false);
mTextureCtrl->setEnabled(editable && !isMesh);
if (editable)
mTextureCtrl->setImageAssetID(sculpt_params->getSculptTexture());
@@ -1138,7 +1138,7 @@ void LLPanelObject::getState( )
if (mLabelSculptType)
{
- mLabelSculptType->setEnabled(TRUE);
+ mLabelSculptType->setEnabled(true);
}
}
@@ -1161,12 +1161,12 @@ void LLPanelObject::getState( )
bool LLPanelObject::precommitValidate( const LLSD& data )
{
// TODO: Richard will fill this in later.
- return TRUE; // FALSE means that validation failed and new value should not be commited.
+ return true; // false means that validation failed and new value should not be commited.
}
void LLPanelObject::sendIsPhysical()
{
- BOOL value = mCheckPhysics->get();
+ bool value = mCheckPhysics->get();
if( mIsPhysical != value )
{
LLSelectMgr::getInstance()->selectionUpdatePhysics(value);
@@ -1182,7 +1182,7 @@ void LLPanelObject::sendIsPhysical()
void LLPanelObject::sendIsTemporary()
{
- BOOL value = mCheckTemporary->get();
+ bool value = mCheckTemporary->get();
if( mIsTemporary != value )
{
LLSelectMgr::getInstance()->selectionUpdateTemporary(value);
@@ -1199,7 +1199,7 @@ void LLPanelObject::sendIsTemporary()
void LLPanelObject::sendIsPhantom()
{
- BOOL value = mCheckPhantom->get();
+ bool value = mCheckPhantom->get();
if( mIsPhantom != value )
{
LLSelectMgr::getInstance()->selectionUpdatePhantom(value);
@@ -1245,7 +1245,7 @@ void LLPanelObject::onCommitParametric( LLUICtrl* ctrl, void* userdata )
if (selected_type == MI_SCULPT)
{
- self->mObject->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, TRUE, TRUE);
+ self->mObject->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, true, true);
LLSculptParams *sculpt_params = (LLSculptParams *)self->mObject->getParameterEntry(LLNetworkData::PARAMS_SCULPT);
if (sculpt_params)
volume_params.setSculptID(sculpt_params->getSculptTexture(), sculpt_params->getSculptType());
@@ -1254,7 +1254,7 @@ void LLPanelObject::onCommitParametric( LLUICtrl* ctrl, void* userdata )
{
LLSculptParams *sculpt_params = (LLSculptParams *)self->mObject->getParameterEntry(LLNetworkData::PARAMS_SCULPT);
if (sculpt_params)
- self->mObject->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, FALSE, TRUE);
+ self->mObject->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, false, true);
}
// Update the volume, if necessary.
@@ -1559,7 +1559,7 @@ void LLPanelObject::getVolumeParams(LLVolumeParams& volume_params)
}
// BUG: Make work with multiple objects
-void LLPanelObject::sendRotation(BOOL btn_down)
+void LLPanelObject::sendRotation(bool btn_down)
{
if (mObject.isNull()) return;
@@ -1615,7 +1615,7 @@ void LLPanelObject::sendRotation(BOOL btn_down)
// BUG: Make work with multiple objects
-void LLPanelObject::sendScale(BOOL btn_down)
+void LLPanelObject::sendScale(bool btn_down)
{
if (mObject.isNull()) return;
@@ -1629,20 +1629,20 @@ void LLPanelObject::sendScale(BOOL btn_down)
// check to see if we aren't scaling the textures
// (in which case the tex coord's need to be recomputed)
- BOOL dont_stretch_textures = !LLManipScale::getStretchTextures();
+ bool dont_stretch_textures = !LLManipScale::getStretchTextures();
if (dont_stretch_textures)
{
LLSelectMgr::getInstance()->saveSelectedObjectTransform(SELECT_ACTION_TYPE_SCALE);
}
- mObject->setScale(newscale, TRUE);
+ mObject->setScale(newscale, true);
if(!btn_down)
{
LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_SCALE | UPD_POSITION);
}
- LLSelectMgr::getInstance()->adjustTexturesByScale(TRUE, !dont_stretch_textures);
+ LLSelectMgr::getInstance()->adjustTexturesByScale(true, !dont_stretch_textures);
// LL_INFOS() << "scale sent" << LL_ENDL;
}
else
@@ -1652,7 +1652,7 @@ void LLPanelObject::sendScale(BOOL btn_down)
}
-void LLPanelObject::sendPosition(BOOL btn_down)
+void LLPanelObject::sendPosition(bool btn_down)
{
if (mObject.isNull()) return;
@@ -1736,7 +1736,7 @@ void LLPanelObject::sendPosition(BOOL btn_down)
if (mObject->isRootEdit())
{
// only offset by parent's translation
- mObject->resetChildrenPosition(LLVector3(-delta), TRUE, TRUE) ;
+ mObject->resetChildrenPosition(LLVector3(-delta), true, true) ;
}
if(!btn_down)
@@ -1777,11 +1777,11 @@ void LLPanelObject::sendSculpt()
if (mCtrlSculptMirror)
{
- mCtrlSculptMirror->setEnabled(enabled ? TRUE : FALSE);
+ mCtrlSculptMirror->setEnabled(enabled ? true : false);
}
if (mCtrlSculptInvert)
{
- mCtrlSculptInvert->setEnabled(enabled ? TRUE : FALSE);
+ mCtrlSculptInvert->setEnabled(enabled ? true : false);
}
if ((mCtrlSculptMirror) && (mCtrlSculptMirror->get()))
@@ -1791,7 +1791,7 @@ void LLPanelObject::sendSculpt()
sculpt_type |= LL_SCULPT_FLAG_INVERT;
sculpt_params.setSculptTexture(sculpt_id, sculpt_type);
- mObject->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, TRUE);
+ mObject->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, true);
}
void LLPanelObject::refresh()
@@ -1890,34 +1890,34 @@ void LLPanelObject::clearCtrls()
{
LLPanel::clearCtrls();
- mCheckLock ->set(FALSE);
- mCheckLock ->setEnabled( FALSE );
- mCheckPhysics ->set(FALSE);
- mCheckPhysics ->setEnabled( FALSE );
- mCheckTemporary ->set(FALSE);
- mCheckTemporary ->setEnabled( FALSE );
- mCheckPhantom ->set(FALSE);
- mCheckPhantom ->setEnabled( FALSE );
+ mCheckLock ->set(false);
+ mCheckLock ->setEnabled( false );
+ mCheckPhysics ->set(false);
+ mCheckPhysics ->setEnabled( false );
+ mCheckTemporary ->set(false);
+ mCheckTemporary ->setEnabled( false );
+ mCheckPhantom ->set(false);
+ mCheckPhantom ->setEnabled( false );
// Disable text labels
- mLabelPosition ->setEnabled( FALSE );
- mLabelSize ->setEnabled( FALSE );
- mLabelRotation ->setEnabled( FALSE );
- mLabelCut ->setEnabled( FALSE );
- mLabelHollow ->setEnabled( FALSE );
- mLabelHoleType ->setEnabled( FALSE );
- mLabelTwist ->setEnabled( FALSE );
- mLabelSkew ->setEnabled( FALSE );
- mLabelShear ->setEnabled( FALSE );
- mLabelTaper ->setEnabled( FALSE );
- mLabelRadiusOffset->setEnabled( FALSE );
- mLabelRevolutions->setEnabled( FALSE );
+ mLabelPosition ->setEnabled( false );
+ mLabelSize ->setEnabled( false );
+ mLabelRotation ->setEnabled( false );
+ mLabelCut ->setEnabled( false );
+ mLabelHollow ->setEnabled( false );
+ mLabelHoleType ->setEnabled( false );
+ mLabelTwist ->setEnabled( false );
+ mLabelSkew ->setEnabled( false );
+ mLabelShear ->setEnabled( false );
+ mLabelTaper ->setEnabled( false );
+ mLabelRadiusOffset->setEnabled( false );
+ mLabelRevolutions->setEnabled( false );
- getChildView("scale_hole")->setEnabled(FALSE);
- getChildView("scale_taper")->setEnabled(FALSE);
- getChildView("advanced_cut")->setEnabled(FALSE);
- getChildView("advanced_dimple")->setEnabled(FALSE);
- getChildView("advanced_slice")->setVisible( FALSE);
+ getChildView("scale_hole")->setEnabled(false);
+ getChildView("scale_taper")->setEnabled(false);
+ getChildView("advanced_cut")->setEnabled(false);
+ getChildView("advanced_dimple")->setEnabled(false);
+ getChildView("advanced_slice")->setVisible( false);
}
//
@@ -1932,7 +1932,7 @@ void LLPanelObject::onCommitLock(LLUICtrl *ctrl, void *data)
if(self->mRootObject.isNull()) return;
- BOOL new_state = self->mCheckLock->get();
+ bool new_state = self->mCheckLock->get();
LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_OWNER, !new_state, PERM_MOVE | PERM_MODIFY);
}
@@ -1941,7 +1941,7 @@ void LLPanelObject::onCommitLock(LLUICtrl *ctrl, void *data)
void LLPanelObject::onCommitPosition( LLUICtrl* ctrl, void* userdata )
{
LLPanelObject* self = (LLPanelObject*) userdata;
- BOOL btn_down = ((LLSpinCtrl*)ctrl)->isMouseHeldDown() ;
+ bool btn_down = ((LLSpinCtrl*)ctrl)->isMouseHeldDown() ;
self->sendPosition(btn_down);
}
@@ -1949,7 +1949,7 @@ void LLPanelObject::onCommitPosition( LLUICtrl* ctrl, void* userdata )
void LLPanelObject::onCommitScale( LLUICtrl* ctrl, void* userdata )
{
LLPanelObject* self = (LLPanelObject*) userdata;
- BOOL btn_down = ((LLSpinCtrl*)ctrl)->isMouseHeldDown() ;
+ bool btn_down = ((LLSpinCtrl*)ctrl)->isMouseHeldDown() ;
self->sendScale(btn_down);
}
@@ -1957,7 +1957,7 @@ void LLPanelObject::onCommitScale( LLUICtrl* ctrl, void* userdata )
void LLPanelObject::onCommitRotation( LLUICtrl* ctrl, void* userdata )
{
LLPanelObject* self = (LLPanelObject*) userdata;
- BOOL btn_down = ((LLSpinCtrl*)ctrl)->isMouseHeldDown() ;
+ bool btn_down = ((LLSpinCtrl*)ctrl)->isMouseHeldDown() ;
self->sendRotation(btn_down);
}
@@ -2000,7 +2000,7 @@ void LLPanelObject::onCommitSculpt( const LLSD& data )
sendSculpt();
}
-BOOL LLPanelObject::onDropSculpt(LLInventoryItem* item)
+bool LLPanelObject::onDropSculpt(LLInventoryItem* item)
{
LLTextureCtrl* mTextureCtrl = getChild<LLTextureCtrl>("sculpt texture control");
@@ -2012,7 +2012,7 @@ BOOL LLPanelObject::onDropSculpt(LLInventoryItem* item)
mSculptTextureRevert = asset;
}
- return TRUE;
+ return true;
}
@@ -2099,7 +2099,7 @@ bool LLPanelObject::menuEnableItem(const LLSD& userdata)
if (command == "psr_paste")
{
S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
- BOOL single_volume = (LLSelectMgr::getInstance()->selectionAllPCode(LL_PCODE_VOLUME))
+ bool single_volume = (LLSelectMgr::getInstance()->selectionAllPCode(LL_PCODE_VOLUME))
&& (selected_count == 1);
if (!single_volume)
@@ -2135,7 +2135,7 @@ bool LLPanelObject::menuEnableItem(const LLSD& userdata)
else if (command == "psr_copy")
{
S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
- BOOL single_volume = (LLSelectMgr::getInstance()->selectionAllPCode(LL_PCODE_VOLUME))
+ bool single_volume = (LLSelectMgr::getInstance()->selectionAllPCode(LL_PCODE_VOLUME))
&& (selected_count == 1);
if (!single_volume)
@@ -2210,7 +2210,7 @@ void LLPanelObject::onPastePos()
mCtrlPosY->set( mClipboardPos.mV[VY] );
mCtrlPosZ->set( mClipboardPos.mV[VZ] );
- sendPosition(FALSE);
+ sendPosition(false);
}
void LLPanelObject::onPasteSize()
@@ -2225,7 +2225,7 @@ void LLPanelObject::onPasteSize()
mCtrlScaleY->set(mClipboardSize.mV[VY]);
mCtrlScaleZ->set(mClipboardSize.mV[VZ]);
- sendScale(FALSE);
+ sendScale(false);
}
void LLPanelObject::onPasteRot()
@@ -2236,7 +2236,7 @@ void LLPanelObject::onPasteRot()
mCtrlRotY->set(mClipboardRot.mV[VY]);
mCtrlRotZ->set(mClipboardRot.mV[VZ]);
- sendRotation(FALSE);
+ sendRotation(false);
}
void LLPanelObject::onCopyParams()
@@ -2289,14 +2289,14 @@ void LLPanelObject::onPasteParams()
LLUUID sculpt_id = mClipboardParams["sculpt"]["id"].asUUID();
U8 sculpt_type = (U8)mClipboardParams["sculpt"]["type"].asInteger();
sculpt_params.setSculptTexture(sculpt_id, sculpt_type);
- objectp->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, TRUE);
+ objectp->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, true);
}
else
{
LLSculptParams *sculpt_params = (LLSculptParams *)objectp->getParameterEntry(LLNetworkData::PARAMS_SCULPT);
if (sculpt_params)
{
- objectp->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, FALSE, TRUE);
+ objectp->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, false, true);
}
}
diff --git a/indra/newview/llpanelobject.h b/indra/newview/llpanelobject.h
index 515dd27c0a..3bda93a601 100644
--- a/indra/newview/llpanelobject.h
+++ b/indra/newview/llpanelobject.h
@@ -51,7 +51,7 @@ public:
LLPanelObject();
virtual ~LLPanelObject();
- virtual BOOL postBuild();
+ virtual bool postBuild();
virtual void draw();
virtual void clearCtrls();
@@ -81,7 +81,7 @@ public:
void onCommitSculpt(const LLSD& data);
void onCancelSculpt(const LLSD& data);
void onSelectSculpt(const LLSD& data);
- BOOL onDropSculpt(LLInventoryItem* item);
+ bool onDropSculpt(LLInventoryItem* item);
static void onCommitSculptType( LLUICtrl *ctrl, void* userdata);
void menuDoToSelected(const LLSD& userdata);
@@ -90,9 +90,9 @@ public:
protected:
void getState();
- void sendRotation(BOOL btn_down);
- void sendScale(BOOL btn_down);
- void sendPosition(BOOL btn_down);
+ void sendRotation(bool btn_down);
+ void sendScale(bool btn_down);
+ void sendPosition(bool btn_down);
void sendIsPhysical();
void sendIsTemporary();
void sendIsPhantom();
@@ -155,7 +155,7 @@ protected:
LLSpinCtrl* mCtrlScaleX;
LLSpinCtrl* mCtrlScaleY;
LLSpinCtrl* mCtrlScaleZ;
- BOOL mSizeChanged;
+ bool mSizeChanged;
LLMenuButton* mMenuClipboardRot;
LLTextBox* mLabelRotation;
@@ -175,9 +175,9 @@ protected:
LLCheckBoxCtrl *mCtrlSculptInvert;
LLVector3 mCurEulerDegrees; // to avoid sending rotation when not changed
- BOOL mIsPhysical; // to avoid sending "physical" when not changed
- BOOL mIsTemporary; // to avoid sending "temporary" when not changed
- BOOL mIsPhantom; // to avoid sending "phantom" when not changed
+ bool mIsPhysical; // to avoid sending "physical" when not changed
+ bool mIsTemporary; // to avoid sending "temporary" when not changed
+ bool mIsPhantom; // to avoid sending "phantom" when not changed
S32 mSelectedType; // So we know what selected type we last were
LLUUID mSculptTextureRevert; // so we can revert the sculpt texture on cancel
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index 632e902d70..7c560019c4 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -123,27 +123,27 @@ public:
virtual LLUIImagePtr getIcon() const;
virtual void openItem();
- virtual BOOL canOpenItem() const { return FALSE; }
+ virtual bool canOpenItem() const { return false; }
virtual void closeItem() {}
virtual void selectItem() {}
virtual void navigateToFolder(bool new_window = false, bool change_mode = false) {}
- virtual BOOL isItemRenameable() const;
- virtual BOOL renameItem(const std::string& new_name);
- virtual BOOL isItemMovable() const;
- virtual BOOL isItemRemovable() const;
- virtual BOOL removeItem();
+ virtual bool isItemRenameable() const;
+ virtual bool renameItem(const std::string& new_name);
+ virtual bool isItemMovable() const;
+ virtual bool isItemRemovable() const;
+ virtual bool removeItem();
virtual void removeBatch(std::vector<LLFolderViewModelItem*>& batch);
virtual void move(LLFolderViewModelItem* parent_listener);
virtual bool isItemCopyable(bool can_copy_as_link = true) const;
- virtual BOOL copyToClipboard() const;
- virtual BOOL cutToClipboard();
- virtual BOOL isClipboardPasteable() const;
+ virtual bool copyToClipboard() const;
+ virtual bool cutToClipboard();
+ virtual bool isClipboardPasteable() const;
virtual void pasteFromClipboard();
virtual void pasteLinkFromClipboard();
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
virtual void performAction(LLInventoryModel* model, std::string action);
- virtual BOOL isUpToDate() const { return TRUE; }
- virtual bool hasChildren() const { return FALSE; }
+ virtual bool isUpToDate() const { return true; }
+ virtual bool hasChildren() const { return false; }
virtual LLInventoryType::EType getInventoryType() const { return LLInventoryType::IT_NONE; }
virtual LLWearableType::EType getWearableType() const { return LLWearableType::WT_NONE; }
virtual LLSettingsType::type_e getSettingsType() const { return LLSettingsType::ST_NONE; }
@@ -153,8 +153,8 @@ public:
// LLDragAndDropBridge functionality
virtual LLToolDragAndDrop::ESource getDragSource() const { return LLToolDragAndDrop::SOURCE_WORLD; }
- virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const;
- virtual BOOL dragOrDrop(MASK mask, BOOL drop,
+ virtual bool startDrag(EDragAndDropType* type, LLUUID* id) const;
+ virtual bool dragOrDrop(MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
std::string& tooltip_msg);
@@ -236,9 +236,9 @@ const std::string& LLTaskInvFVBridge::getDisplayName() const
}
const LLPermissions& perm(item->getPermissions());
- BOOL copy = gAgent.allowOperation(PERM_COPY, perm, GP_OBJECT_MANIPULATE);
- BOOL mod = gAgent.allowOperation(PERM_MODIFY, perm, GP_OBJECT_MANIPULATE);
- BOOL xfer = gAgent.allowOperation(PERM_TRANSFER, perm, GP_OBJECT_MANIPULATE);
+ bool copy = gAgent.allowOperation(PERM_COPY, perm, GP_OBJECT_MANIPULATE);
+ bool mod = gAgent.allowOperation(PERM_MODIFY, perm, GP_OBJECT_MANIPULATE);
+ bool xfer = gAgent.allowOperation(PERM_TRANSFER, perm, GP_OBJECT_MANIPULATE);
if(!copy)
{
@@ -277,7 +277,7 @@ void LLTaskInvFVBridge::setCreationDate(time_t creation_date_utc)
LLUIImagePtr LLTaskInvFVBridge::getIcon() const
{
- const BOOL item_is_multi = (mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS);
+ const bool item_is_multi = (mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS);
return LLInventoryIcon::getIcon(mAssetType, mInventoryType, 0, item_is_multi );
}
@@ -288,9 +288,9 @@ void LLTaskInvFVBridge::openItem()
LL_DEBUGS() << "LLTaskInvFVBridge::openItem()" << LL_ENDL;
}
-BOOL LLTaskInvFVBridge::isItemRenameable() const
+bool LLTaskInvFVBridge::isItemRenameable() const
{
- if(gAgent.isGodlike()) return TRUE;
+ if(gAgent.isGodlike()) return true;
LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
if(object)
{
@@ -298,13 +298,13 @@ BOOL LLTaskInvFVBridge::isItemRenameable() const
if(item && gAgent.allowOperation(PERM_MODIFY, item->getPermissions(),
GP_OBJECT_MANIPULATE, GOD_LIKE))
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
-BOOL LLTaskInvFVBridge::renameItem(const std::string& new_name)
+bool LLTaskInvFVBridge::renameItem(const std::string& new_name)
{
LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
if(object)
@@ -322,29 +322,29 @@ BOOL LLTaskInvFVBridge::renameItem(const std::string& new_name)
false);
}
}
- return TRUE;
+ return true;
}
-BOOL LLTaskInvFVBridge::isItemMovable() const
+bool LLTaskInvFVBridge::isItemMovable() const
{
//LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
//if(object && (object->permModify() || gAgent.isGodlike()))
//{
- // return TRUE;
+ // return true;
//}
- //return FALSE;
- return TRUE;
+ //return false;
+ return true;
}
-BOOL LLTaskInvFVBridge::isItemRemovable() const
+bool LLTaskInvFVBridge::isItemRemovable() const
{
const LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
if(object
&& (object->permModify() || object->permYouOwner()))
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool remove_task_inventory_callback(const LLSD& notification, const LLSD& response, LLPanelObjectInventory* panel)
@@ -372,7 +372,7 @@ bool remove_task_inventory_callback(const LLSD& notification, const LLSD& respon
// ! REFACTOR ! two_uuids_list_t is also defined in llinventorybridge.h, but differently.
typedef std::pair<LLUUID, std::list<LLUUID> > panel_two_uuids_list_t;
typedef std::pair<LLPanelObjectInventory*, panel_two_uuids_list_t> remove_data_t;
-BOOL LLTaskInvFVBridge::removeItem()
+bool LLTaskInvFVBridge::removeItem()
{
if(isItemRemovable() && mPanel)
{
@@ -383,7 +383,7 @@ BOOL LLTaskInvFVBridge::removeItem()
{
// just do it.
object->removeInventory(mUUID);
- return TRUE;
+ return true;
}
else
{
@@ -391,11 +391,11 @@ BOOL LLTaskInvFVBridge::removeItem()
payload["task_id"] = mPanel->getTaskUUID();
payload["inventory_ids"].append(mUUID);
LLNotificationsUtil::add("RemoveItemWarn", LLSD(), payload, boost::bind(&remove_task_inventory_callback, _1, _2, mPanel));
- return FALSE;
+ return false;
}
}
}
- return FALSE;
+ return false;
}
void LLTaskInvFVBridge::removeBatch(std::vector<LLFolderViewModelItem*>& batch)
@@ -450,19 +450,19 @@ bool LLTaskInvFVBridge::isItemCopyable(bool can_link) const
GP_OBJECT_MANIPULATE);
}
-BOOL LLTaskInvFVBridge::copyToClipboard() const
+bool LLTaskInvFVBridge::copyToClipboard() const
{
- return FALSE;
+ return false;
}
-BOOL LLTaskInvFVBridge::cutToClipboard()
+bool LLTaskInvFVBridge::cutToClipboard()
{
- return FALSE;
+ return false;
}
-BOOL LLTaskInvFVBridge::isClipboardPasteable() const
+bool LLTaskInvFVBridge::isClipboardPasteable() const
{
- return FALSE;
+ return false;
}
void LLTaskInvFVBridge::pasteFromClipboard()
@@ -473,7 +473,7 @@ void LLTaskInvFVBridge::pasteLinkFromClipboard()
{
}
-BOOL LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
+bool LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
{
//LL_INFOS() << "LLTaskInvFVBridge::startDrag()" << LL_ENDL;
if(mPanel)
@@ -493,7 +493,7 @@ BOOL LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
// due to a race condition and possible exploit where
// attached objects do not update their inventory items
// when their contents are manipulated
- return FALSE;
+ return false;
}
if((can_copy && perm.allowTransferTo(gAgent.getID()))
|| object->permYouOwner())
@@ -503,21 +503,21 @@ BOOL LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
*type = LLViewerAssetType::lookupDragAndDropType(inv->getType());
*id = inv->getUUID();
- return TRUE;
+ return true;
}
}
}
}
- return FALSE;
+ return false;
}
-BOOL LLTaskInvFVBridge::dragOrDrop(MASK mask, BOOL drop,
+bool LLTaskInvFVBridge::dragOrDrop(MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
std::string& tooltip_msg)
{
//LL_INFOS() << "LLTaskInvFVBridge::dragOrDrop()" << LL_ENDL;
- return FALSE;
+ return false;
}
// virtual
@@ -585,18 +585,18 @@ public:
virtual LLUIImagePtr getIcon() const;
virtual const std::string& getDisplayName() const;
- virtual BOOL isItemRenameable() const;
- // virtual BOOL isItemCopyable() const { return FALSE; }
- virtual BOOL renameItem(const std::string& new_name);
- virtual BOOL isItemRemovable() const;
+ virtual bool isItemRenameable() const;
+ // virtual bool isItemCopyable() const { return false; }
+ virtual bool renameItem(const std::string& new_name);
+ virtual bool isItemRemovable() const;
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
virtual bool hasChildren() const;
- virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const;
- virtual BOOL dragOrDrop(MASK mask, BOOL drop,
+ virtual bool startDrag(EDragAndDropType* type, LLUUID* id) const;
+ virtual bool dragOrDrop(MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
std::string& tooltip_msg);
- virtual BOOL canOpenItem() const { return TRUE; }
+ virtual bool canOpenItem() const { return true; }
virtual void openItem();
virtual EInventorySortGroup getSortGroup() const { return SG_NORMAL_FOLDER; }
};
@@ -638,19 +638,19 @@ const std::string& LLTaskCategoryBridge::getDisplayName() const
return mDisplayName;
}
-BOOL LLTaskCategoryBridge::isItemRenameable() const
+bool LLTaskCategoryBridge::isItemRenameable() const
{
- return FALSE;
+ return false;
}
-BOOL LLTaskCategoryBridge::renameItem(const std::string& new_name)
+bool LLTaskCategoryBridge::renameItem(const std::string& new_name)
{
- return FALSE;
+ return false;
}
-BOOL LLTaskCategoryBridge::isItemRemovable() const
+bool LLTaskCategoryBridge::isItemRemovable() const
{
- return FALSE;
+ return false;
}
void LLTaskCategoryBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
@@ -662,16 +662,16 @@ void LLTaskCategoryBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
bool LLTaskCategoryBridge::hasChildren() const
{
- // return TRUE if we have or do know know if we have children.
- // *FIX: For now, return FALSE - we will know for sure soon enough.
- return FALSE;
+ // return true if we have or do know know if we have children.
+ // *FIX: For now, return false - we will know for sure soon enough.
+ return false;
}
void LLTaskCategoryBridge::openItem()
{
}
-BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
+bool LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
{
//LL_INFOS() << "LLTaskInvFVBridge::startDrag()" << LL_ENDL;
if(mPanel && mUUID.notNull())
@@ -680,24 +680,24 @@ BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
if(object)
{
const LLInventoryObject* cat = object->getInventoryObject(mUUID);
- if ( (cat) && (move_inv_category_world_to_agent(mUUID, LLUUID::null, FALSE)) )
+ if ( (cat) && (move_inv_category_world_to_agent(mUUID, LLUUID::null, false)) )
{
*type = LLViewerAssetType::lookupDragAndDropType(cat->getType());
*id = mUUID;
- return TRUE;
+ return true;
}
}
}
- return FALSE;
+ return false;
}
-BOOL LLTaskCategoryBridge::dragOrDrop(MASK mask, BOOL drop,
+bool LLTaskCategoryBridge::dragOrDrop(MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
std::string& tooltip_msg)
{
//LL_INFOS() << "LLTaskCategoryBridge::dragOrDrop()" << LL_ENDL;
- BOOL accept = FALSE;
+ bool accept = false;
LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
if(object)
{
@@ -739,14 +739,14 @@ BOOL LLTaskCategoryBridge::dragOrDrop(MASK mask, BOOL drop,
&& (LLToolDragAndDrop::SOURCE_WORLD != LLToolDragAndDrop::getInstance()->getSource())
&& (LLToolDragAndDrop::SOURCE_NOTECARD != LLToolDragAndDrop::getInstance()->getSource()))
{
- accept = TRUE;
+ accept = true;
}
if(accept && drop)
{
LLViewerInventoryItem* item = (LLViewerInventoryItem*)cargo_data;
// rez in the script active by default, rez in
// inactive if the control key is being held down.
- BOOL active = ((mask & MASK_CONTROL) == 0);
+ bool active = ((mask & MASK_CONTROL) == 0);
LLToolDragAndDrop::dropScript(object, item, active,
LLToolDragAndDrop::getInstance()->getSource(),
LLToolDragAndDrop::getInstance()->getSourceID());
@@ -771,7 +771,7 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
- virtual BOOL canOpenItem() const { return TRUE; }
+ virtual bool canOpenItem() const { return true; }
virtual void openItem();
};
@@ -803,7 +803,7 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
- virtual BOOL canOpenItem() const { return TRUE; }
+ virtual bool canOpenItem() const { return true; }
virtual void openItem();
virtual void performAction(LLInventoryModel* model, std::string action);
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
@@ -905,18 +905,18 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
- virtual BOOL isItemRenameable() const;
- virtual BOOL renameItem(const std::string& new_name);
+ virtual bool isItemRenameable() const;
+ virtual bool renameItem(const std::string& new_name);
};
-BOOL LLTaskCallingCardBridge::isItemRenameable() const
+bool LLTaskCallingCardBridge::isItemRenameable() const
{
- return FALSE;
+ return false;
}
-BOOL LLTaskCallingCardBridge::renameItem(const std::string& new_name)
+bool LLTaskCallingCardBridge::renameItem(const std::string& new_name)
{
- return FALSE;
+ return false;
}
@@ -932,7 +932,7 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
- //static BOOL enableIfCopyable( void* userdata );
+ //static bool enableIfCopyable( void* userdata );
};
class LLTaskLSLBridge : public LLTaskScriptBridge
@@ -943,9 +943,9 @@ public:
const std::string& name) :
LLTaskScriptBridge(panel, uuid, name) {}
- virtual BOOL canOpenItem() const { return TRUE; }
+ virtual bool canOpenItem() const { return true; }
virtual void openItem();
- virtual BOOL removeItem();
+ virtual bool removeItem();
//virtual void buildContextMenu(LLMenuGL& menu);
//static void copyToInventory(void* userdata);
@@ -968,7 +968,7 @@ void LLTaskLSLBridge::openItem()
LLLiveLSLEditor* preview = LLFloaterReg::showTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key, TAKE_FOCUS_YES);
if (preview)
{
- LLSelectNode *node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(NULL, TRUE);
+ LLSelectNode *node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(NULL, true);
if (node && node->mValid)
{
preview->setObjectName(node->mName);
@@ -982,7 +982,7 @@ void LLTaskLSLBridge::openItem()
}
}
-BOOL LLTaskLSLBridge::removeItem()
+bool LLTaskLSLBridge::removeItem()
{
LLFloaterReg::hideInstance("preview_scriptedit", LLSD(mUUID));
return LLTaskInvFVBridge::removeItem();
@@ -1014,9 +1014,9 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
- virtual BOOL canOpenItem() const { return TRUE; }
+ virtual bool canOpenItem() const { return true; }
virtual void openItem();
- virtual BOOL removeItem();
+ virtual bool removeItem();
};
void LLTaskNotecardBridge::openItem()
@@ -1029,7 +1029,7 @@ void LLTaskNotecardBridge::openItem()
// Note: even if we are not allowed to modify copyable notecard, we should be able to view it
LLInventoryItem *item = dynamic_cast<LLInventoryItem*>(object->getInventoryObject(mUUID));
- BOOL item_copy = item && gAgent.allowOperation(PERM_COPY, item->getPermissions(), GP_OBJECT_MANIPULATE);
+ bool item_copy = item && gAgent.allowOperation(PERM_COPY, item->getPermissions(), GP_OBJECT_MANIPULATE);
if( item_copy
|| object->permModify()
|| gAgent.isGodlike())
@@ -1045,7 +1045,7 @@ void LLTaskNotecardBridge::openItem()
}
}
-BOOL LLTaskNotecardBridge::removeItem()
+bool LLTaskNotecardBridge::removeItem()
{
LLFloaterReg::hideInstance("preview_notecard", LLSD(mUUID));
return LLTaskInvFVBridge::removeItem();
@@ -1063,9 +1063,9 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
- virtual BOOL canOpenItem() const { return TRUE; }
+ virtual bool canOpenItem() const { return true; }
virtual void openItem();
- virtual BOOL removeItem();
+ virtual bool removeItem();
};
void LLTaskGestureBridge::openItem()
@@ -1078,7 +1078,7 @@ void LLTaskGestureBridge::openItem()
LLPreviewGesture::show(mUUID, mPanel->getTaskUUID());
}
-BOOL LLTaskGestureBridge::removeItem()
+bool LLTaskGestureBridge::removeItem()
{
// Don't need to deactivate gesture because gestures inside objects can never be active.
LLFloaterReg::hideInstance("preview_gesture", LLSD(mUUID));
@@ -1097,9 +1097,9 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
- virtual BOOL canOpenItem() const { return TRUE; }
+ virtual bool canOpenItem() const { return true; }
virtual void openItem();
- virtual BOOL removeItem();
+ virtual bool removeItem();
};
void LLTaskAnimationBridge::openItem()
@@ -1117,7 +1117,7 @@ void LLTaskAnimationBridge::openItem()
}
}
-BOOL LLTaskAnimationBridge::removeItem()
+bool LLTaskAnimationBridge::removeItem()
{
LLFloaterReg::hideInstance("preview_anim", LLSD(mUUID));
return LLTaskInvFVBridge::removeItem();
@@ -1141,7 +1141,7 @@ public:
LLUIImagePtr LLTaskWearableBridge::getIcon() const
{
- return LLInventoryIcon::getIcon(mAssetType, mInventoryType, mFlags, FALSE );
+ return LLInventoryIcon::getIcon(mAssetType, mInventoryType, mFlags, false );
}
///----------------------------------------------------------------------------
@@ -1163,7 +1163,7 @@ public:
LLUIImagePtr LLTaskSettingsBridge::getIcon() const
{
- return LLInventoryIcon::getIcon(mAssetType, mInventoryType, mFlags, FALSE);
+ return LLInventoryIcon::getIcon(mAssetType, mInventoryType, mFlags, false);
}
LLSettingsType::type_e LLTaskSettingsBridge::getSettingsType() const
@@ -1183,9 +1183,9 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
- BOOL canOpenItem() const override { return TRUE; }
+ bool canOpenItem() const override { return true; }
void openItem() override;
- BOOL removeItem() override;
+ bool removeItem() override;
};
void LLTaskMaterialBridge::openItem()
@@ -1198,7 +1198,7 @@ void LLTaskMaterialBridge::openItem()
// Note: even if we are not allowed to modify copyable notecard, we should be able to view it
LLInventoryItem *item = dynamic_cast<LLInventoryItem*>(object->getInventoryObject(mUUID));
- BOOL item_copy = item && gAgent.allowOperation(PERM_COPY, item->getPermissions(), GP_OBJECT_MANIPULATE);
+ bool item_copy = item && gAgent.allowOperation(PERM_COPY, item->getPermissions(), GP_OBJECT_MANIPULATE);
if( item_copy
|| object->permModify()
|| gAgent.isGodlike())
@@ -1211,12 +1211,12 @@ void LLTaskMaterialBridge::openItem()
{
mat->setObjectID(mPanel->getTaskUUID());
mat->openFloater(floater_key);
- mat->setFocus(TRUE);
+ mat->setFocus(true);
}
}
}
-BOOL LLTaskMaterialBridge::removeItem()
+bool LLTaskMaterialBridge::removeItem()
{
LLFloaterReg::hideInstance("material_editor", LLSD(mUUID));
return LLTaskInvFVBridge::removeItem();
@@ -1339,9 +1339,9 @@ LLPanelObjectInventory::LLPanelObjectInventory(const LLPanelObjectInventory::Par
LLPanel(p),
mScroller(NULL),
mFolders(NULL),
- mHaveInventory(FALSE),
- mIsInventoryEmpty(TRUE),
- mInventoryNeedsUpdate(FALSE),
+ mHaveInventory(false),
+ mIsInventoryEmpty(true),
+ mInventoryNeedsUpdate(false),
mInventoryViewModel(p.name),
mShowRootFolder(p.show_root_folder)
{
@@ -1365,7 +1365,7 @@ LLPanelObjectInventory::~LLPanelObjectInventory()
}
}
-BOOL LLPanelObjectInventory::postBuild()
+bool LLPanelObjectInventory::postBuild()
{
// clear contents and initialize menus, sets up mFolders
reset();
@@ -1373,7 +1373,7 @@ BOOL LLPanelObjectInventory::postBuild()
// Register an idle update callback
gIdleCallbacks.addFunction(idle, this);
- return TRUE;
+ return true;
}
void LLPanelObjectInventory::doToSelected(const LLSD& userdata)
@@ -1383,8 +1383,8 @@ void LLPanelObjectInventory::doToSelected(const LLSD& userdata)
void LLPanelObjectInventory::clearContents()
{
- mHaveInventory = FALSE;
- mIsInventoryEmpty = TRUE;
+ mHaveInventory = false;
+ mIsInventoryEmpty = true;
if (LLToolDragAndDrop::getInstance() && LLToolDragAndDrop::getInstance()->getSource() == LLToolDragAndDrop::SOURCE_WORLD)
{
LLToolDragAndDrop::getInstance()->endDrag();
@@ -1463,7 +1463,7 @@ void LLPanelObjectInventory::inventoryChanged(LLViewerObject* object,
// << " task UUID: " << object->mID << LL_ENDL;
if(mTaskUUID == object->mID)
{
- mInventoryNeedsUpdate = TRUE;
+ mInventoryNeedsUpdate = true;
}
}
@@ -1475,7 +1475,7 @@ void LLPanelObjectInventory::updateInventory()
// We're still interested in this task's inventory.
std::vector<LLUUID> selected_item_ids;
std::set<LLFolderViewItem*> selected_items;
- BOOL inventory_has_focus = FALSE;
+ bool inventory_has_focus = false;
if (mHaveInventory && mFolders)
{
selected_items = mFolders->getSelectionList();
@@ -1498,14 +1498,14 @@ void LLPanelObjectInventory::updateInventory()
if (inventory_root)
{
reset();
- mIsInventoryEmpty = FALSE;
+ mIsInventoryEmpty = false;
createFolderViews(inventory_root, contents);
- mFolders->setEnabled(TRUE);
+ mFolders->setEnabled(true);
}
else
{
// TODO: create an empty inventory
- mIsInventoryEmpty = TRUE;
+ mIsInventoryEmpty = true;
}
mHaveInventory = !mIsInventoryEmpty || !objectp->isInventoryDirty();
@@ -1520,8 +1520,8 @@ void LLPanelObjectInventory::updateInventory()
else
{
// TODO: create an empty inventory
- mIsInventoryEmpty = TRUE;
- mHaveInventory = TRUE;
+ mIsInventoryEmpty = true;
+ mHaveInventory = true;
}
// restore previous selection
@@ -1536,12 +1536,12 @@ void LLPanelObjectInventory::updateInventory()
//HACK: "set" first item then "change" each other one to get keyboard focus right
if (first_item)
{
- mFolders->setSelection(selected_item, TRUE, inventory_has_focus);
- first_item = FALSE;
+ mFolders->setSelection(selected_item, true, inventory_has_focus);
+ first_item = false;
}
else
{
- mFolders->changeSelection(selected_item, TRUE);
+ mFolders->changeSelection(selected_item, true);
}
}
}
@@ -1550,7 +1550,7 @@ void LLPanelObjectInventory::updateInventory()
{
mFolders->requestArrange();
}
- mInventoryNeedsUpdate = FALSE;
+ mInventoryNeedsUpdate = false;
// Edit menu handler is set in onFocusReceived
}
@@ -1671,8 +1671,8 @@ void LLPanelObjectInventory::createViewsForCategory(LLInventoryObject::object_li
void LLPanelObjectInventory::refresh()
{
//LL_INFOS() << "LLPanelObjectInventory::refresh()" << LL_ENDL;
- BOOL has_inventory = FALSE;
- const BOOL non_root_ok = TRUE;
+ bool has_inventory = false;
+ const bool non_root_ok = true;
LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
LLSelectNode* node = selection->getFirstRootNode(NULL, non_root_ok);
if(node && node->mValid)
@@ -1683,7 +1683,7 @@ void LLPanelObjectInventory::refresh()
{
// determine if we need to make a request. Start with a
// default based on if we have inventory at all.
- BOOL make_request = !mHaveInventory;
+ bool make_request = !mHaveInventory;
// If the task id is different than what we've stored,
// then make the request.
@@ -1691,7 +1691,7 @@ void LLPanelObjectInventory::refresh()
{
mTaskUUID = object->mID;
mAttachmentUUID = object->getAttachmentItemID();
- make_request = TRUE;
+ make_request = true;
// This is a new object so pre-emptively clear the contents
// Otherwise we show the old stuff until the update comes in
@@ -1717,7 +1717,7 @@ void LLPanelObjectInventory::refresh()
{
if(node->mInventorySerial != object->getInventorySerial() || object->isInventoryDirty())
{
- make_request = TRUE;
+ make_request = true;
}
}
@@ -1726,7 +1726,7 @@ void LLPanelObjectInventory::refresh()
{
requestVOInventory();
}
- has_inventory = TRUE;
+ has_inventory = true;
}
}
if(!has_inventory)
@@ -1795,14 +1795,14 @@ void LLPanelObjectInventory::deleteAllChildren()
LLView::deleteAllChildren();
}
-BOOL LLPanelObjectInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg)
+bool LLPanelObjectInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg)
{
if (mFolders)
{
LLFolderViewItem* folderp = mFolders->getNextFromChild(NULL);
if (!folderp)
{
- return FALSE;
+ return false;
}
// Try to pass on unmodified mouse coordinates
S32 local_x = x - mFolders->getRect().mLeft;
@@ -1820,7 +1820,7 @@ BOOL LLPanelObjectInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL dro
}
else
{
- return FALSE;
+ return false;
}
}
@@ -1886,9 +1886,9 @@ void LLPanelObjectInventory::clearItemIDs()
mItemMap.clear();
}
-BOOL LLPanelObjectInventory::handleKeyHere( KEY key, MASK mask )
+bool LLPanelObjectInventory::handleKeyHere( KEY key, MASK mask )
{
- BOOL handled = FALSE;
+ bool handled = false;
switch (key)
{
case KEY_DELETE:
@@ -1900,23 +1900,23 @@ BOOL LLPanelObjectInventory::handleKeyHere( KEY key, MASK mask )
if (isSelectionRemovable() && mask == MASK_NONE)
{
LLInventoryAction::doToSelected(&gInventory, mFolders, "delete");
- handled = TRUE;
+ handled = true;
}
break;
}
return handled;
}
-BOOL LLPanelObjectInventory::isSelectionRemovable()
+bool LLPanelObjectInventory::isSelectionRemovable()
{
if (!mFolders || !mFolders->getRoot())
{
- return FALSE;
+ return false;
}
std::set<LLFolderViewItem*> selection_set = mFolders->getRoot()->getSelectionList();
if (selection_set.empty())
{
- return FALSE;
+ return false;
}
for (std::set<LLFolderViewItem*>::iterator iter = selection_set.begin();
iter != selection_set.end();
@@ -1926,8 +1926,8 @@ BOOL LLPanelObjectInventory::isSelectionRemovable()
const LLFolderViewModelItemInventory *listener = dynamic_cast<const LLFolderViewModelItemInventory*>(item->getViewModelItem());
if (!listener || !listener->isItemRemovable() || listener->isItemInTrash())
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
diff --git a/indra/newview/llpanelobjectinventory.h b/indra/newview/llpanelobjectinventory.h
index 0e450d8ce9..3141d71fbd 100644
--- a/indra/newview/llpanelobjectinventory.h
+++ b/indra/newview/llpanelobjectinventory.h
@@ -60,7 +60,7 @@ public:
LLPanelObjectInventory(const Params&);
virtual ~LLPanelObjectInventory();
- virtual BOOL postBuild();
+ virtual bool postBuild();
LLFolderViewModelInventory& getRootViewModel() { return mInventoryViewModel; }
@@ -76,7 +76,7 @@ public:
virtual void draw();
virtual void deleteAllChildren();
- virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg);
+ 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 onFocusLost();
/*virtual*/ void onFocusReceived();
@@ -101,8 +101,8 @@ protected:
void removeItemID(const LLUUID& id);
void clearItemIDs();
- BOOL handleKeyHere( KEY key, MASK mask );
- BOOL isSelectionRemovable();
+ bool handleKeyHere( KEY key, MASK mask );
+ bool isSelectionRemovable();
private:
std::map<LLUUID, LLFolderViewItem*> mItemMap;
@@ -112,9 +112,9 @@ private:
LLUUID mTaskUUID;
LLUUID mAttachmentUUID;
- BOOL mHaveInventory; // 'Loading' label and used for initial request
- BOOL mIsInventoryEmpty; // 'Empty' label
- BOOL mInventoryNeedsUpdate; // for idle, set on changed callback
+ bool mHaveInventory; // 'Loading' label and used for initial request
+ bool mIsInventoryEmpty; // 'Empty' label
+ bool mInventoryNeedsUpdate; // for idle, set on changed callback
LLFolderViewModelInventory mInventoryViewModel;
bool mShowRootFolder;
};
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index c7ae4eb0d9..abb8178b47 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -187,8 +187,8 @@ private:
// Populate the menu with items like "New Skin", "New Pants", etc.
static void populateCreateWearableSubmenus(LLMenuGL* menu)
{
- LLView* menu_clothes = gMenuHolder->getChildView("COF.Gear.New_Clothes", FALSE);
- LLView* menu_bp = gMenuHolder->getChildView("COF.Gear.New_Body_Parts", FALSE);
+ LLView* menu_clothes = gMenuHolder->getChildView("COF.Gear.New_Clothes", false);
+ LLView* menu_bp = gMenuHolder->getChildView("COF.Gear.New_Body_Parts", false);
LLWearableType * wearable_type_inst = LLWearableType::getInstance();
for (U8 i = LLWearableType::WT_SHAPE; i != (U8) LLWearableType::WT_COUNT; ++i)
@@ -407,7 +407,7 @@ LLPanelOutfitEdit::LLPanelOutfitEdit()
mGearMenuBtn(NULL)
{
mSavedFolderState = new LLSaveFolderState();
- mSavedFolderState->setApply(FALSE);
+ mSavedFolderState->setApply(false);
LLOutfitObserver& observer = LLOutfitObserver::instance();
@@ -440,7 +440,7 @@ LLPanelOutfitEdit::~LLPanelOutfitEdit()
}
}
-BOOL LLPanelOutfitEdit::postBuild()
+bool LLPanelOutfitEdit::postBuild()
{
// gInventory.isInventoryUsable() no longer needs to be tested per Richard's fix for race conditions between inventory and panels
@@ -568,7 +568,7 @@ BOOL LLPanelOutfitEdit::postBuild()
getChild<LLButton>(SAVE_AS_BTN)->setCommitCallback(boost::bind(&LLPanelOutfitEdit::saveOutfit, this, true));
onOutfitChanging(gAgentWearables.isCOFChangeInProgress());
- return TRUE;
+ return true;
}
// virtual
@@ -595,7 +595,7 @@ void LLPanelOutfitEdit::moveWearable(bool closer_to_body)
void LLPanelOutfitEdit::toggleAddWearablesPanel()
{
- BOOL current_visibility = mAddWearablesPanel->getVisible();
+ bool current_visibility = mAddWearablesPanel->getVisible();
showAddWearablesPanel(!current_visibility);
}
@@ -655,7 +655,7 @@ void LLPanelOutfitEdit::showWearablesFilter()
}
else
{
- mSearchFilter->setFocus(TRUE);
+ mSearchFilter->setFocus(true);
}
}
@@ -667,7 +667,7 @@ void LLPanelOutfitEdit::showWearablesListView()
updateFiltersVisibility();
mWearableListManager->populateIfNeeded();
}
- mListViewBtn->setToggleState(TRUE);
+ mListViewBtn->setToggleState(true);
}
void LLPanelOutfitEdit::showWearablesFolderView()
@@ -677,7 +677,7 @@ void LLPanelOutfitEdit::showWearablesFolderView()
updateWearablesPanelVerbButtons();
updateFiltersVisibility();
}
- mFolderViewBtn->setToggleState(TRUE);
+ mFolderViewBtn->setToggleState(true);
}
void LLPanelOutfitEdit::updateFiltersVisibility()
@@ -693,7 +693,7 @@ void LLPanelOutfitEdit::onFolderViewFilterCommitted(LLUICtrl* ctrl)
mInventoryItemsPanel->setFilterTypes(mFolderViewItemTypes[curr_filter_type].inventoryMask);
- mSavedFolderState->setApply(TRUE);
+ mSavedFolderState->setApply(true);
mInventoryItemsPanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
LLOpenFoldersWithSelection opener;
@@ -735,7 +735,7 @@ void LLPanelOutfitEdit::onSearchEdit(const std::string& string)
mInventoryItemsPanel->setFilterSubString(LLStringUtil::null);
mWearableItemsList->setFilterSubString(LLStringUtil::null, true);
// re-open folders that were initially open
- mSavedFolderState->setApply(TRUE);
+ mSavedFolderState->setApply(true);
mInventoryItemsPanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
LLOpenFoldersWithSelection opener;
mInventoryItemsPanel->getRootFolder()->applyFunctorRecursively(opener);
@@ -757,7 +757,7 @@ void LLPanelOutfitEdit::onSearchEdit(const std::string& string)
// save current folder open state if no filter currently applied
if (mInventoryItemsPanel->getFilterSubString().empty())
{
- mSavedFolderState->setApply(FALSE);
+ mSavedFolderState->setApply(false);
mInventoryItemsPanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
}
@@ -997,10 +997,10 @@ void LLPanelOutfitEdit::updatePlusButton()
current_item->getLocalRect().mBottom);
mAddToLookBtn->setRect(btn_rect);
- mAddToLookBtn->setEnabled(TRUE);
+ mAddToLookBtn->setEnabled(true);
if (!mAddToLookBtn->getVisible())
{
- mAddToLookBtn->setVisible(TRUE);
+ mAddToLookBtn->setVisible(true);
}
current_item->addChild(mAddToLookBtn); */
@@ -1167,7 +1167,7 @@ void LLPanelOutfitEdit::update()
updateVerbs();
}
-BOOL LLPanelOutfitEdit::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+bool LLPanelOutfitEdit::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
@@ -1176,7 +1176,7 @@ BOOL LLPanelOutfitEdit::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
if (cargo_data == NULL)
{
LL_WARNS() << "cargo_data is NULL" << LL_ENDL;
- return TRUE;
+ return true;
}
switch (cargo_type)
@@ -1214,14 +1214,14 @@ BOOL LLPanelOutfitEdit::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
}
}
- return TRUE;
+ return true;
}
void LLPanelOutfitEdit::displayCurrentOutfit()
{
if (!getVisible())
{
- setVisible(TRUE);
+ setVisible(true);
}
updateCurrentOutfitName();
@@ -1264,8 +1264,8 @@ bool LLPanelOutfitEdit::switchPanels(LLPanel* switch_from_panel, LLPanel* switch
{
if(switch_from_panel && switch_to_panel && !switch_to_panel->getVisible())
{
- switch_from_panel->setVisible(FALSE);
- switch_to_panel->setVisible(TRUE);
+ switch_from_panel->setVisible(false);
+ switch_to_panel->setVisible(true);
return true;
}
return false;
@@ -1383,13 +1383,13 @@ void LLPanelOutfitEdit::updateWearablesPanelVerbButtons()
{
if(mWearablesListViewPanel->getVisible())
{
- mFolderViewBtn->setToggleState(FALSE);
+ mFolderViewBtn->setToggleState(false);
mFolderViewBtn->setImageOverlay(getString("folder_view_off"), mFolderViewBtn->getImageOverlayHAlign());
mListViewBtn->setImageOverlay(getString("list_view_on"), mListViewBtn->getImageOverlayHAlign());
}
else if(mInventoryItemsPanel->getVisible())
{
- mListViewBtn->setToggleState(FALSE);
+ mListViewBtn->setToggleState(false);
mListViewBtn->setImageOverlay(getString("list_view_off"), mListViewBtn->getImageOverlayHAlign());
mFolderViewBtn->setImageOverlay(getString("folder_view_on"), mFolderViewBtn->getImageOverlayHAlign());
}
@@ -1429,9 +1429,9 @@ void LLPanelOutfitEdit::saveListSelection()
LLFolderViewFolder* parent = item->getParentFolder();
if(parent)
{
- parent->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP);
+ parent->setOpenArrangeRecursively(true, LLFolderViewFolder::RECURSE_UP);
}
- mInventoryItemsPanel->getRootFolder()->changeSelection(item, TRUE);
+ mInventoryItemsPanel->getRootFolder()->changeSelection(item, true);
}
mInventoryItemsPanel->getRootFolder()->scrollToShowSelection();
}
diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h
index d0597fb72b..ec88018f8f 100644
--- a/indra/newview/llpaneloutfitedit.h
+++ b/indra/newview/llpaneloutfitedit.h
@@ -124,7 +124,7 @@ public:
LLPanelOutfitEdit();
/*virtual*/ ~LLPanelOutfitEdit();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onOpen(const LLSD& key);
void moveWearable(bool closer_to_body);
@@ -181,7 +181,7 @@ public:
void resetAccordionState();
- virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index af06de379d..5bb403f600 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -78,7 +78,7 @@ LLPanelOutfitsInventory::~LLPanelOutfitsInventory()
}
// virtual
-BOOL LLPanelOutfitsInventory::postBuild()
+bool LLPanelOutfitsInventory::postBuild()
{
initTabPanels();
initListCommandsHandlers();
@@ -96,7 +96,7 @@ BOOL LLPanelOutfitsInventory::postBuild()
getChild<LLButton>(SAVE_BTN)->setCommitCallback(boost::bind(&LLPanelOutfitsInventory::saveOutfit, this, false));
getChild<LLButton>(SAVE_AS_BTN)->setCommitCallback(boost::bind(&LLPanelOutfitsInventory::saveOutfit, this, true));
- return TRUE;
+ return true;
}
// virtual
@@ -137,7 +137,7 @@ void LLPanelOutfitsInventory::onOpen(const LLSD& key)
LLFolderViewFolder* first_outfit = dynamic_cast<LLFolderViewFolder*>(my_outfits_folder->getFirstChild());
if (first_outfit)
{
- first_outfit->setOpen(TRUE);
+ first_outfit->setOpen(true);
}
}
}
diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index 63f9f599f1..157e051923 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -46,7 +46,7 @@ public:
LLPanelOutfitsInventory();
virtual ~LLPanelOutfitsInventory();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onOpen(const LLSD& key);
void onSearchEdit(const std::string& string);
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 13b52e97c5..da2206aefb 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -313,9 +313,9 @@ public:
mEventTimer.stop();
}
- virtual BOOL tick() // from LLEventTimer
+ virtual bool tick() // from LLEventTimer
{
- return FALSE;
+ return false;
}
};
@@ -367,9 +367,9 @@ public:
}
- /*virtual*/ BOOL tick()
+ /*virtual*/ bool tick()
{
- if (!mIsActive) return FALSE;
+ if (!mIsActive) return false;
if (mMask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE))
{
@@ -380,7 +380,7 @@ public:
mEventTimer.stop();
mMask = 0;
- return FALSE;
+ return false;
}
// virtual
@@ -508,10 +508,10 @@ public:
}
}
- /*virtual*/ BOOL tick()
+ /*virtual*/ bool tick()
{
update();
- return FALSE;
+ return false;
}
private:
};
@@ -577,6 +577,11 @@ LLPanelPeople::~LLPanelPeople()
delete mFriendListUpdater;
delete mRecentListUpdater;
+ mNearbyFilterCommitConnection.disconnect();
+ mFriedsFilterCommitConnection.disconnect();
+ mGroupsFilterCommitConnection.disconnect();
+ mRecentFilterCommitConnection.disconnect();
+
if(LLVoiceClient::instanceExists())
{
LLVoiceClient::getInstance()->removeObserver(this);
@@ -609,14 +614,14 @@ void LLPanelPeople::removePicker()
}
}
-BOOL LLPanelPeople::postBuild()
+bool LLPanelPeople::postBuild()
{
S32 max_premium = LLAgentBenefitsMgr::get("Premium").getGroupMembershipLimit();
- getChild<LLFilterEditor>("nearby_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
- getChild<LLFilterEditor>("friends_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
- getChild<LLFilterEditor>("groups_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
- getChild<LLFilterEditor>("recent_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
+ mNearbyFilterCommitConnection = getChild<LLFilterEditor>("nearby_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
+ mFriedsFilterCommitConnection = getChild<LLFilterEditor>("friends_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
+ mGroupsFilterCommitConnection = getChild<LLFilterEditor>("groups_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
+ mRecentFilterCommitConnection = getChild<LLFilterEditor>("recent_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
if(LLAgentBenefitsMgr::current().getGroupMembershipLimit() < max_premium)
{
@@ -729,7 +734,7 @@ BOOL LLPanelPeople::postBuild()
mOnlineFriendList->setRefreshCompleteCallback(boost::bind(&LLPanelPeople::onFriendListRefreshComplete, this, _1, _2));
mAllFriendList->setRefreshCompleteCallback(boost::bind(&LLPanelPeople::onFriendListRefreshComplete, this, _1, _2));
- return TRUE;
+ return true;
}
// virtual
@@ -831,7 +836,7 @@ void LLPanelPeople::updateNearbyList()
mNearbyList->setDirty();
DISTANCE_COMPARATOR.updateAvatarsPositions(positions, mNearbyList->getIDs());
- LLActiveSpeakerMgr::instance().update(TRUE);
+ LLActiveSpeakerMgr::instance().update(true);
}
void LLPanelPeople::updateRecentList()
@@ -887,7 +892,7 @@ void LLPanelPeople::updateButtons()
LLPanel* cur_panel = mTabContainer->getCurrentPanel();
if (cur_panel)
{
- if (cur_panel->hasChild("add_friend_btn", TRUE))
+ if (cur_panel->hasChild("add_friend_btn", true))
cur_panel->getChildView("add_friend_btn")->setEnabled(item_selected && !is_friend && !is_self);
if (friends_tab_active)
@@ -961,25 +966,6 @@ void LLPanelPeople::getCurrentItemIDs(uuid_vec_t& selected_uuids) const
}
-void LLPanelPeople::showGroupMenu(LLMenuGL* menu)
-{
- // Shows the menu at the top of the button bar.
-
- // Calculate its coordinates.
- // (assumes that groups panel is the current tab)
- LLPanel* bottom_panel = mTabContainer->getCurrentPanel()->getChild<LLPanel>("bottom_panel");
- LLPanel* parent_panel = mTabContainer->getCurrentPanel();
- menu->arrangeAndClear();
- S32 menu_height = menu->getRect().getHeight();
- S32 menu_x = -2; // *HACK: compensates HPAD in showPopup()
- S32 menu_y = bottom_panel->getRect().mTop + menu_height;
-
- // Actually show the menu.
- menu->buildDrawLabels();
- menu->updateParent(LLMenuGL::sMenuContainer);
- LLMenuGL::showPopup(parent_panel, menu, menu_x, menu_y);
-}
-
void LLPanelPeople::setSortOrder(LLAvatarList* list, ESortOrder order, bool save)
{
switch (order)
@@ -1184,11 +1170,11 @@ bool LLPanelPeople::isItemsFreeOfFriends(const uuid_vec_t& uuids)
void LLPanelPeople::onAddFriendWizButtonClicked()
{
LLPanel* cur_panel = mTabContainer->getCurrentPanel();
- LLView * button = cur_panel->findChild<LLButton>("friends_add_btn", TRUE);
+ LLView * button = cur_panel->findChild<LLButton>("friends_add_btn", true);
// Show add friend wizard.
LLFloater* root_floater = gFloaterView->getParentFloater(this);
- LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelPeople::onAvatarPicked, _1, _2), FALSE, TRUE, FALSE, root_floater->getName(), button);
+ LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelPeople::onAvatarPicked, _1, _2), false, true, false, root_floater->getName(), button);
if (!picker)
{
return;
diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h
index 14205cebe2..058f34aa2f 100644
--- a/indra/newview/llpanelpeople.h
+++ b/indra/newview/llpanelpeople.h
@@ -50,12 +50,12 @@ public:
LLPanelPeople();
virtual ~LLPanelPeople();
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ bool notifyChildren(const LLSD& info);
+ bool postBuild() override;
+ void onOpen(const LLSD& key) override;
+ bool notifyChildren(const LLSD& info) override;
// Implements LLVoiceClientStatusObserver::onChange() to enable call buttons
// when voice is available
- /*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal);
+ void onChange(EStatusType status, const std::string &channelURI, bool proximal) override;
// internals
class Updater;
@@ -87,7 +87,6 @@ private:
std::string getActiveTabName() const;
LLUUID getCurrentItemID() const;
void getCurrentItemIDs(uuid_vec_t& selected_uuids) const;
- void showGroupMenu(LLMenuGL* menu);
void setSortOrder(LLAvatarList* list, ESortOrder order, bool save = true);
// UI callbacks
@@ -148,6 +147,11 @@ private:
Updater* mRecentListUpdater;
Updater* mButtonsUpdater;
LLHandle< LLFloater > mPicker;
+
+ boost::signals2::connection mNearbyFilterCommitConnection;
+ boost::signals2::connection mFriedsFilterCommitConnection;
+ boost::signals2::connection mGroupsFilterCommitConnection;
+ boost::signals2::connection mRecentFilterCommitConnection;
};
#endif //LL_LLPANELPEOPLE_H
diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp
index 67f913a067..9beb219138 100644
--- a/indra/newview/llpanelpermissions.cpp
+++ b/indra/newview/llpanelpermissions.cpp
@@ -151,10 +151,10 @@ std::string click_action_to_string_value( U8 action)
LLPanelPermissions::LLPanelPermissions() :
LLPanel()
{
- setMouseOpaque(FALSE);
+ setMouseOpaque(false);
}
-BOOL LLPanelPermissions::postBuild()
+bool LLPanelPermissions::postBuild()
{
childSetCommitCallback("Object Name",LLPanelPermissions::onCommitName,this);
getChild<LLLineEditor>("Object Name")->setPrevalidate(LLTextValidate::validateASCIIPrintableNoPipe);
@@ -188,7 +188,7 @@ BOOL LLPanelPermissions::postBuild()
mLabelOwnerName = getChild<LLTextBox>("Owner Name");
mLabelCreatorName = getChild<LLTextBox>("Creator Name");
- return TRUE;
+ return true;
}
@@ -208,85 +208,85 @@ LLPanelPermissions::~LLPanelPermissions()
void LLPanelPermissions::disableAll()
{
- getChildView("perm_modify")->setEnabled(FALSE);
+ getChildView("perm_modify")->setEnabled(false);
getChild<LLUICtrl>("perm_modify")->setValue(LLStringUtil::null);
- getChildView("pathfinding_attributes_value")->setEnabled(FALSE);
+ getChildView("pathfinding_attributes_value")->setEnabled(false);
getChild<LLUICtrl>("pathfinding_attributes_value")->setValue(LLStringUtil::null);
- getChildView("Creator:")->setEnabled(FALSE);
- getChild<LLUICtrl>("Creator Icon")->setVisible(FALSE);
+ getChildView("Creator:")->setEnabled(false);
+ getChild<LLUICtrl>("Creator Icon")->setVisible(false);
mLabelCreatorName->setValue(LLStringUtil::null);
- mLabelCreatorName->setEnabled(FALSE);
+ mLabelCreatorName->setEnabled(false);
- getChildView("Owner:")->setEnabled(FALSE);
- getChild<LLUICtrl>("Owner Icon")->setVisible(FALSE);
- getChild<LLUICtrl>("Owner Group Icon")->setVisible(FALSE);
+ getChildView("Owner:")->setEnabled(false);
+ getChild<LLUICtrl>("Owner Icon")->setVisible(false);
+ getChild<LLUICtrl>("Owner Group Icon")->setVisible(false);
mLabelOwnerName->setValue(LLStringUtil::null);
- mLabelOwnerName->setEnabled(FALSE);
+ mLabelOwnerName->setEnabled(false);
- getChildView("Group:")->setEnabled(FALSE);
+ getChildView("Group:")->setEnabled(false);
getChild<LLUICtrl>("Group Name Proxy")->setValue(LLStringUtil::null);
- getChildView("Group Name Proxy")->setEnabled(FALSE);
- getChildView("button set group")->setEnabled(FALSE);
+ getChildView("Group Name Proxy")->setEnabled(false);
+ getChildView("button set group")->setEnabled(false);
getChild<LLUICtrl>("Object Name")->setValue(LLStringUtil::null);
- getChildView("Object Name")->setEnabled(FALSE);
- getChildView("Name:")->setEnabled(FALSE);
+ getChildView("Object Name")->setEnabled(false);
+ getChildView("Name:")->setEnabled(false);
getChild<LLUICtrl>("Group Name")->setValue(LLStringUtil::null);
- getChildView("Group Name")->setEnabled(FALSE);
- getChildView("Description:")->setEnabled(FALSE);
+ getChildView("Group Name")->setEnabled(false);
+ getChildView("Description:")->setEnabled(false);
getChild<LLUICtrl>("Object Description")->setValue(LLStringUtil::null);
- getChildView("Object Description")->setEnabled(FALSE);
+ getChildView("Object Description")->setEnabled(false);
- getChild<LLUICtrl>("checkbox share with group")->setValue(FALSE);
- getChildView("checkbox share with group")->setEnabled(FALSE);
- getChildView("button deed")->setEnabled(FALSE);
+ getChild<LLUICtrl>("checkbox share with group")->setValue(false);
+ getChildView("checkbox share with group")->setEnabled(false);
+ getChildView("button deed")->setEnabled(false);
- getChild<LLUICtrl>("checkbox allow everyone move")->setValue(FALSE);
- getChildView("checkbox allow everyone move")->setEnabled(FALSE);
- getChild<LLUICtrl>("checkbox allow everyone copy")->setValue(FALSE);
- getChildView("checkbox allow everyone copy")->setEnabled(FALSE);
+ getChild<LLUICtrl>("checkbox allow everyone move")->setValue(false);
+ getChildView("checkbox allow everyone move")->setEnabled(false);
+ getChild<LLUICtrl>("checkbox allow everyone copy")->setValue(false);
+ getChildView("checkbox allow everyone copy")->setEnabled(false);
//Next owner can:
- getChildView("Next owner can:")->setEnabled(FALSE);
- getChild<LLUICtrl>("checkbox next owner can modify")->setValue(FALSE);
- getChildView("checkbox next owner can modify")->setEnabled(FALSE);
- getChild<LLUICtrl>("checkbox next owner can copy")->setValue(FALSE);
- getChildView("checkbox next owner can copy")->setEnabled(FALSE);
- getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(FALSE);
- getChildView("checkbox next owner can transfer")->setEnabled(FALSE);
+ getChildView("Next owner can:")->setEnabled(false);
+ getChild<LLUICtrl>("checkbox next owner can modify")->setValue(false);
+ getChildView("checkbox next owner can modify")->setEnabled(false);
+ getChild<LLUICtrl>("checkbox next owner can copy")->setValue(false);
+ getChildView("checkbox next owner can copy")->setEnabled(false);
+ getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(false);
+ getChildView("checkbox next owner can transfer")->setEnabled(false);
//checkbox for sale
- getChild<LLUICtrl>("checkbox for sale")->setValue(FALSE);
- getChildView("checkbox for sale")->setEnabled(FALSE);
+ getChild<LLUICtrl>("checkbox for sale")->setValue(false);
+ getChildView("checkbox for sale")->setEnabled(false);
//checkbox include in search
- getChild<LLUICtrl>("search_check")->setValue(FALSE);
- getChildView("search_check")->setEnabled(FALSE);
+ getChild<LLUICtrl>("search_check")->setValue(false);
+ getChildView("search_check")->setEnabled(false);
LLComboBox* combo_sale_type = getChild<LLComboBox>("sale type");
combo_sale_type->setValue(LLSaleInfo::FS_COPY);
- combo_sale_type->setEnabled(FALSE);
+ combo_sale_type->setEnabled(false);
- getChildView("Cost")->setEnabled(FALSE);
+ getChildView("Cost")->setEnabled(false);
getChild<LLUICtrl>("Cost")->setValue(getString("Cost Default"));
getChild<LLUICtrl>("Edit Cost")->setValue(LLStringUtil::null);
- getChildView("Edit Cost")->setEnabled(FALSE);
+ getChildView("Edit Cost")->setEnabled(false);
- getChildView("label click action")->setEnabled(FALSE);
+ getChildView("label click action")->setEnabled(false);
LLComboBox* combo_click_action = getChild<LLComboBox>("clickaction");
if (combo_click_action)
{
- combo_click_action->setEnabled(FALSE);
+ combo_click_action->setEnabled(false);
combo_click_action->clear();
}
- getChildView("B:")->setVisible(FALSE);
- getChildView("O:")->setVisible(FALSE);
- getChildView("G:")->setVisible(FALSE);
- getChildView("E:")->setVisible(FALSE);
- getChildView("N:")->setVisible(FALSE);
- getChildView("F:")->setVisible(FALSE);
+ getChildView("B:")->setVisible(false);
+ getChildView("O:")->setVisible(false);
+ getChildView("G:")->setVisible(false);
+ getChildView("E:")->setVisible(false);
+ getChildView("N:")->setVisible(false);
+ getChildView("F:")->setVisible(false);
}
void LLPanelPermissions::refresh()
@@ -306,17 +306,17 @@ void LLPanelPermissions::refresh()
BtnDeedToGroup->setLabelSelected(deedText);
BtnDeedToGroup->setLabelUnselected(deedText);
}
- BOOL root_selected = TRUE;
+ bool root_selected = true;
LLSelectNode* nodep = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
S32 object_count = LLSelectMgr::getInstance()->getSelection()->getRootObjectCount();
if(!nodep || 0 == object_count)
{
nodep = LLSelectMgr::getInstance()->getSelection()->getFirstNode();
object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
- root_selected = FALSE;
+ root_selected = false;
}
- //BOOL attachment_selected = LLSelectMgr::getInstance()->getSelection()->isAttachment();
+ //bool attachment_selected = LLSelectMgr::getInstance()->getSelection()->isAttachment();
//attachment_selected = false;
LLViewerObject* objectp = NULL;
if(nodep) objectp = nodep->getObject();
@@ -328,13 +328,13 @@ void LLPanelPermissions::refresh()
}
// figure out a few variables
- const BOOL is_one_object = (object_count == 1);
+ const bool is_one_object = (object_count == 1);
// BUG: fails if a root and non-root are both single-selected.
- BOOL is_perm_modify = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode()
+ bool is_perm_modify = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode()
&& LLSelectMgr::getInstance()->selectGetRootsModify())
|| LLSelectMgr::getInstance()->selectGetModify();
- BOOL is_nonpermanent_enforced = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode()
+ bool is_nonpermanent_enforced = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode()
&& LLSelectMgr::getInstance()->selectGetRootsNonPermanentEnforced())
|| LLSelectMgr::getInstance()->selectGetNonPermanentEnforced();
const LLFocusableElement* keyboard_focus_view = gFocusMgr.getKeyboardFocus();
@@ -361,7 +361,7 @@ void LLPanelPermissions::refresh()
{
++string_index;
}
- getChildView("perm_modify")->setEnabled(TRUE);
+ getChildView("perm_modify")->setEnabled(true);
getChild<LLUICtrl>("perm_modify")->setValue(MODIFY_INFO_STRINGS[string_index]);
std::string pfAttrName;
@@ -389,11 +389,11 @@ void LLPanelPermissions::refresh()
pfAttrName = "Pathfinding_Object_Attr_MultiSelect";
}
- getChildView("pathfinding_attributes_value")->setEnabled(TRUE);
+ getChildView("pathfinding_attributes_value")->setEnabled(true);
getChild<LLUICtrl>("pathfinding_attributes_value")->setValue(LLTrans::getString(pfAttrName));
// Update creator text field
- getChildView("Creator:")->setEnabled(TRUE);
+ getChildView("Creator:")->setEnabled(true);
std::string creator_app_link;
LLSelectMgr::getInstance()->selectGetCreator(mCreatorID, creator_app_link);
@@ -424,14 +424,14 @@ void LLPanelPermissions::refresh()
mCreatorCacheConnection = LLAvatarNameCache::get(mCreatorID, boost::bind(&LLPanelPermissions::updateCreatorName, this, _1, _2, style_params));
}
getChild<LLAvatarIconCtrl>("Creator Icon")->setValue(mCreatorID);
- getChild<LLAvatarIconCtrl>("Creator Icon")->setVisible(TRUE);
- mLabelCreatorName->setEnabled(TRUE);
+ getChild<LLAvatarIconCtrl>("Creator Icon")->setVisible(true);
+ mLabelCreatorName->setEnabled(true);
// Update owner text field
- getChildView("Owner:")->setEnabled(TRUE);
+ getChildView("Owner:")->setEnabled(true);
std::string owner_app_link;
- const BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_app_link);
+ const bool owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_app_link);
if (LLSelectMgr::getInstance()->selectIsGroupOwned())
@@ -443,8 +443,8 @@ void LLPanelPermissions::refresh()
style_params.link_href = owner_app_link;
mLabelOwnerName->setText(group_data->mName, style_params);
getChild<LLGroupIconCtrl>("Owner Group Icon")->setIconId(group_data->mInsigniaID);
- getChild<LLGroupIconCtrl>("Owner Group Icon")->setVisible(TRUE);
- getChild<LLUICtrl>("Owner Icon")->setVisible(FALSE);
+ getChild<LLGroupIconCtrl>("Owner Group Icon")->setVisible(true);
+ getChild<LLUICtrl>("Owner Icon")->setVisible(false);
}
else
{
@@ -487,39 +487,39 @@ void LLPanelPermissions::refresh()
}
getChild<LLAvatarIconCtrl>("Owner Icon")->setValue(owner_id);
- getChild<LLAvatarIconCtrl>("Owner Icon")->setVisible(TRUE);
- getChild<LLUICtrl>("Owner Group Icon")->setVisible(FALSE);
+ getChild<LLAvatarIconCtrl>("Owner Icon")->setVisible(true);
+ getChild<LLUICtrl>("Owner Group Icon")->setVisible(false);
}
- mLabelOwnerName->setEnabled(TRUE);
+ mLabelOwnerName->setEnabled(true);
// update group text field
- getChildView("Group:")->setEnabled(TRUE);
+ getChildView("Group:")->setEnabled(true);
getChild<LLUICtrl>("Group Name")->setValue(LLStringUtil::null);
LLUUID group_id;
- BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id);
+ bool groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id);
if (groups_identical)
{
if (mLabelGroupName)
{
- mLabelGroupName->setNameID(group_id,TRUE);
- mLabelGroupName->setEnabled(TRUE);
+ mLabelGroupName->setNameID(group_id,true);
+ mLabelGroupName->setEnabled(true);
}
}
else
{
if (mLabelGroupName)
{
- mLabelGroupName->setNameID(LLUUID::null, TRUE);
+ mLabelGroupName->setNameID(LLUUID::null, true);
mLabelGroupName->refresh(LLUUID::null, std::string(), true);
- mLabelGroupName->setEnabled(FALSE);
+ mLabelGroupName->setEnabled(false);
}
}
getChildView("button set group")->setEnabled(root_selected && owners_identical && (mOwnerID == gAgent.getID()) && is_nonpermanent_enforced);
- getChildView("Name:")->setEnabled(TRUE);
+ getChildView("Name:")->setEnabled(true);
LLLineEditor* LineEditorObjectName = getChild<LLLineEditor>("Object Name");
- getChildView("Description:")->setEnabled(TRUE);
+ getChildView("Description:")->setEnabled(true);
LLLineEditor* LineEditorObjectDesc = getChild<LLLineEditor>("Object Description");
if (is_one_object)
@@ -544,44 +544,44 @@ void LLPanelPermissions::refresh()
}
// figure out the contents of the name, description, & category
- BOOL edit_name_desc = FALSE;
+ bool edit_name_desc = false;
if (is_one_object && objectp->permModify() && !objectp->isPermanentEnforced())
{
- edit_name_desc = TRUE;
+ edit_name_desc = true;
}
if (edit_name_desc)
{
- getChildView("Object Name")->setEnabled(TRUE);
- getChildView("Object Description")->setEnabled(TRUE);
+ getChildView("Object Name")->setEnabled(true);
+ getChildView("Object Description")->setEnabled(true);
}
else
{
- getChildView("Object Name")->setEnabled(FALSE);
- getChildView("Object Description")->setEnabled(FALSE);
+ getChildView("Object Name")->setEnabled(false);
+ getChildView("Object Description")->setEnabled(false);
}
S32 total_sale_price = 0;
S32 individual_sale_price = 0;
- BOOL is_for_sale_mixed = FALSE;
- BOOL is_sale_price_mixed = FALSE;
- U32 num_for_sale = FALSE;
+ bool is_for_sale_mixed = false;
+ bool is_sale_price_mixed = false;
+ U32 num_for_sale = false;
LLSelectMgr::getInstance()->selectGetAggregateSaleInfo(num_for_sale,
is_for_sale_mixed,
is_sale_price_mixed,
total_sale_price,
individual_sale_price);
- const BOOL self_owned = (gAgent.getID() == mOwnerID);
- const BOOL group_owned = LLSelectMgr::getInstance()->selectIsGroupOwned() ;
- const BOOL public_owned = (mOwnerID.isNull() && !LLSelectMgr::getInstance()->selectIsGroupOwned());
- const BOOL can_transfer = LLSelectMgr::getInstance()->selectGetRootsTransfer();
- const BOOL can_copy = LLSelectMgr::getInstance()->selectGetRootsCopy();
+ const bool self_owned = (gAgent.getID() == mOwnerID);
+ const bool group_owned = LLSelectMgr::getInstance()->selectIsGroupOwned() ;
+ const bool public_owned = (mOwnerID.isNull() && !LLSelectMgr::getInstance()->selectIsGroupOwned());
+ const bool can_transfer = LLSelectMgr::getInstance()->selectGetRootsTransfer();
+ const bool can_copy = LLSelectMgr::getInstance()->selectGetRootsCopy();
if (!owners_identical)
{
- getChildView("Cost")->setEnabled(FALSE);
+ getChildView("Cost")->setEnabled(false);
getChild<LLUICtrl>("Edit Cost")->setValue(LLStringUtil::null);
- getChildView("Edit Cost")->setEnabled(FALSE);
+ getChildView("Edit Cost")->setEnabled(false);
}
// You own these objects.
else if (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id,GP_OBJECT_SET_SALE)))
@@ -603,11 +603,11 @@ void LLPanelPermissions::refresh()
// set to the actual cost.
if ((num_for_sale > 0) && is_for_sale_mixed)
{
- edit_price->setTentative(TRUE);
+ edit_price->setTentative(true);
}
else if ((num_for_sale > 0) && is_sale_price_mixed)
{
- edit_price->setTentative(TRUE);
+ edit_price->setTentative(true);
}
else
{
@@ -616,15 +616,15 @@ void LLPanelPermissions::refresh()
}
// The edit fields are only enabled if you can sell this object
// and the sale price is not mixed.
- BOOL enable_edit = (num_for_sale && can_transfer) ? !is_for_sale_mixed : FALSE;
+ bool enable_edit = (num_for_sale && can_transfer) ? !is_for_sale_mixed : false;
getChildView("Cost")->setEnabled(enable_edit);
getChildView("Edit Cost")->setEnabled(enable_edit);
}
// Someone, not you, owns these objects.
else if (!public_owned)
{
- getChildView("Cost")->setEnabled(FALSE);
- getChildView("Edit Cost")->setEnabled(FALSE);
+ getChildView("Cost")->setEnabled(false);
+ getChildView("Edit Cost")->setEnabled(false);
// Don't show a price if none of the items are for sale.
if (num_for_sale)
@@ -641,11 +641,11 @@ void LLPanelPermissions::refresh()
// This is a public object.
else
{
- getChildView("Cost")->setEnabled(FALSE);
+ getChildView("Cost")->setEnabled(false);
getChild<LLUICtrl>("Cost")->setValue(getString("Cost Default"));
getChild<LLUICtrl>("Edit Cost")->setValue(LLStringUtil::null);
- getChildView("Edit Cost")->setEnabled(FALSE);
+ getChildView("Edit Cost")->setEnabled(false);
}
// Enable and disable the permissions checkboxes
@@ -663,22 +663,22 @@ void LLPanelPermissions::refresh()
U32 next_owner_mask_on = 0;
U32 next_owner_mask_off = 0;
- BOOL valid_base_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_BASE,
+ bool valid_base_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_BASE,
&base_mask_on,
&base_mask_off);
- //BOOL valid_owner_perms =//
+ //bool valid_owner_perms =//
LLSelectMgr::getInstance()->selectGetPerm(PERM_OWNER,
&owner_mask_on,
&owner_mask_off);
- BOOL valid_group_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_GROUP,
+ bool valid_group_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_GROUP,
&group_mask_on,
&group_mask_off);
- BOOL valid_everyone_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_EVERYONE,
+ bool valid_everyone_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_EVERYONE,
&everyone_mask_on,
&everyone_mask_off);
- BOOL valid_next_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_NEXT_OWNER,
+ bool valid_next_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_NEXT_OWNER,
&next_owner_mask_on,
&next_owner_mask_off);
@@ -688,15 +688,15 @@ void LLPanelPermissions::refresh()
if (valid_base_perms)
{
getChild<LLUICtrl>("B:")->setValue("B: " + mask_to_string(base_mask_on));
- getChildView("B:")->setVisible(TRUE);
+ getChildView("B:")->setVisible(true);
getChild<LLUICtrl>("O:")->setValue("O: " + mask_to_string(owner_mask_on));
- getChildView("O:")->setVisible(TRUE);
+ getChildView("O:")->setVisible(true);
getChild<LLUICtrl>("G:")->setValue("G: " + mask_to_string(group_mask_on));
- getChildView("G:")->setVisible(TRUE);
+ getChildView("G:")->setVisible(true);
getChild<LLUICtrl>("E:")->setValue("E: " + mask_to_string(everyone_mask_on));
- getChildView("E:")->setVisible(TRUE);
+ getChildView("E:")->setVisible(true);
getChild<LLUICtrl>("N:")->setValue("N: " + mask_to_string(next_owner_mask_on));
- getChildView("N:")->setVisible(TRUE);
+ getChildView("N:")->setVisible(true);
}
else if(!root_selected)
{
@@ -706,25 +706,25 @@ void LLPanelPermissions::refresh()
if (node && node->mValid)
{
getChild<LLUICtrl>("B:")->setValue("B: " + mask_to_string( node->mPermissions->getMaskBase()));
- getChildView("B:")->setVisible(TRUE);
+ getChildView("B:")->setVisible(true);
getChild<LLUICtrl>("O:")->setValue("O: " + mask_to_string(node->mPermissions->getMaskOwner()));
- getChildView("O:")->setVisible(TRUE);
+ getChildView("O:")->setVisible(true);
getChild<LLUICtrl>("G:")->setValue("G: " + mask_to_string(node->mPermissions->getMaskGroup()));
- getChildView("G:")->setVisible(TRUE);
+ getChildView("G:")->setVisible(true);
getChild<LLUICtrl>("E:")->setValue("E: " + mask_to_string(node->mPermissions->getMaskEveryone()));
- getChildView("E:")->setVisible(TRUE);
+ getChildView("E:")->setVisible(true);
getChild<LLUICtrl>("N:")->setValue("N: " + mask_to_string(node->mPermissions->getMaskNextOwner()));
- getChildView("N:")->setVisible(TRUE);
+ getChildView("N:")->setVisible(true);
}
}
}
else
{
- getChildView("B:")->setVisible(FALSE);
- getChildView("O:")->setVisible(FALSE);
- getChildView("G:")->setVisible(FALSE);
- getChildView("E:")->setVisible(FALSE);
- getChildView("N:")->setVisible(FALSE);
+ getChildView("B:")->setVisible(false);
+ getChildView("O:")->setVisible(false);
+ getChildView("G:")->setVisible(false);
+ getChildView("E:")->setVisible(false);
+ getChildView("N:")->setVisible(false);
}
U32 flag_mask = 0x0;
@@ -734,30 +734,30 @@ void LLPanelPermissions::refresh()
if (objectp->permTransfer()) flag_mask |= PERM_TRANSFER;
getChild<LLUICtrl>("F:")->setValue("F:" + mask_to_string(flag_mask));
- getChildView("F:")->setVisible( TRUE);
+ getChildView("F:")->setVisible( true);
}
else
{
- getChildView("B:")->setVisible( FALSE);
- getChildView("O:")->setVisible( FALSE);
- getChildView("G:")->setVisible( FALSE);
- getChildView("E:")->setVisible( FALSE);
- getChildView("N:")->setVisible( FALSE);
- getChildView("F:")->setVisible( FALSE);
+ getChildView("B:")->setVisible( false);
+ getChildView("O:")->setVisible( false);
+ getChildView("G:")->setVisible( false);
+ getChildView("E:")->setVisible( false);
+ getChildView("N:")->setVisible( false);
+ getChildView("F:")->setVisible( false);
}
- BOOL has_change_perm_ability = FALSE;
- BOOL has_change_sale_ability = FALSE;
+ bool has_change_perm_ability = false;
+ bool has_change_sale_ability = false;
if (valid_base_perms && is_nonpermanent_enforced &&
(self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_MANIPULATE))))
{
- has_change_perm_ability = TRUE;
+ has_change_perm_ability = true;
}
if (valid_base_perms && is_nonpermanent_enforced &&
(self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_SET_SALE))))
{
- has_change_sale_ability = TRUE;
+ has_change_sale_ability = true;
}
if (!has_change_perm_ability && !has_change_sale_ability && !root_selected)
@@ -768,15 +768,15 @@ void LLPanelPermissions::refresh()
if (has_change_perm_ability)
{
- getChildView("checkbox share with group")->setEnabled(TRUE);
+ getChildView("checkbox share with group")->setEnabled(true);
getChildView("checkbox allow everyone move")->setEnabled(owner_mask_on & PERM_MOVE);
getChildView("checkbox allow everyone copy")->setEnabled(owner_mask_on & PERM_COPY && owner_mask_on & PERM_TRANSFER);
}
else
{
- getChildView("checkbox share with group")->setEnabled(FALSE);
- getChildView("checkbox allow everyone move")->setEnabled(FALSE);
- getChildView("checkbox allow everyone copy")->setEnabled(FALSE);
+ getChildView("checkbox share with group")->setEnabled(false);
+ getChildView("checkbox allow everyone move")->setEnabled(false);
+ getChildView("checkbox allow everyone copy")->setEnabled(false);
}
if (has_change_sale_ability && (owner_mask_on & PERM_TRANSFER))
@@ -787,39 +787,39 @@ void LLPanelPermissions::refresh()
getChild<LLUICtrl>("checkbox for sale")->setTentative( is_for_sale_mixed);
getChildView("sale type")->setEnabled(num_for_sale && can_transfer && !is_sale_price_mixed);
- getChildView("Next owner can:")->setEnabled(TRUE);
+ getChildView("Next owner can:")->setEnabled(true);
getChildView("checkbox next owner can modify")->setEnabled(base_mask_on & PERM_MODIFY);
getChildView("checkbox next owner can copy")->setEnabled(base_mask_on & PERM_COPY);
getChildView("checkbox next owner can transfer")->setEnabled(next_owner_mask_on & PERM_COPY);
}
else
{
- getChildView("checkbox for sale")->setEnabled(FALSE);
- getChildView("sale type")->setEnabled(FALSE);
+ getChildView("checkbox for sale")->setEnabled(false);
+ getChildView("sale type")->setEnabled(false);
- getChildView("Next owner can:")->setEnabled(FALSE);
- getChildView("checkbox next owner can modify")->setEnabled(FALSE);
- getChildView("checkbox next owner can copy")->setEnabled(FALSE);
- getChildView("checkbox next owner can transfer")->setEnabled(FALSE);
+ getChildView("Next owner can:")->setEnabled(false);
+ getChildView("checkbox next owner can modify")->setEnabled(false);
+ getChildView("checkbox next owner can copy")->setEnabled(false);
+ getChildView("checkbox next owner can transfer")->setEnabled(false);
}
if (valid_group_perms)
{
if ((group_mask_on & PERM_COPY) && (group_mask_on & PERM_MODIFY) && (group_mask_on & PERM_MOVE))
{
- getChild<LLUICtrl>("checkbox share with group")->setValue(TRUE);
- getChild<LLUICtrl>("checkbox share with group")->setTentative( FALSE);
+ getChild<LLUICtrl>("checkbox share with group")->setValue(true);
+ getChild<LLUICtrl>("checkbox share with group")->setTentative( false);
getChildView("button deed")->setEnabled(gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED) && (owner_mask_on & PERM_TRANSFER) && !group_owned && can_transfer);
}
else if ((group_mask_off & PERM_COPY) && (group_mask_off & PERM_MODIFY) && (group_mask_off & PERM_MOVE))
{
- getChild<LLUICtrl>("checkbox share with group")->setValue(FALSE);
- getChild<LLUICtrl>("checkbox share with group")->setTentative( FALSE);
- getChildView("button deed")->setEnabled(FALSE);
+ getChild<LLUICtrl>("checkbox share with group")->setValue(false);
+ getChild<LLUICtrl>("checkbox share with group")->setTentative( false);
+ getChildView("button deed")->setEnabled(false);
}
else
{
- getChild<LLUICtrl>("checkbox share with group")->setValue(TRUE);
+ getChild<LLUICtrl>("checkbox share with group")->setValue(true);
getChild<LLUICtrl>("checkbox share with group")->setTentative(!has_change_perm_ability);
getChildView("button deed")->setEnabled(gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED) && (group_mask_on & PERM_MOVE) && (owner_mask_on & PERM_TRANSFER) && !group_owned && can_transfer);
}
@@ -830,35 +830,35 @@ void LLPanelPermissions::refresh()
// Move
if (everyone_mask_on & PERM_MOVE)
{
- getChild<LLUICtrl>("checkbox allow everyone move")->setValue(TRUE);
- getChild<LLUICtrl>("checkbox allow everyone move")->setTentative( FALSE);
+ getChild<LLUICtrl>("checkbox allow everyone move")->setValue(true);
+ getChild<LLUICtrl>("checkbox allow everyone move")->setTentative( false);
}
else if (everyone_mask_off & PERM_MOVE)
{
- getChild<LLUICtrl>("checkbox allow everyone move")->setValue(FALSE);
- getChild<LLUICtrl>("checkbox allow everyone move")->setTentative( FALSE);
+ getChild<LLUICtrl>("checkbox allow everyone move")->setValue(false);
+ getChild<LLUICtrl>("checkbox allow everyone move")->setTentative( false);
}
else
{
- getChild<LLUICtrl>("checkbox allow everyone move")->setValue(TRUE);
- getChild<LLUICtrl>("checkbox allow everyone move")->setTentative( TRUE);
+ getChild<LLUICtrl>("checkbox allow everyone move")->setValue(true);
+ getChild<LLUICtrl>("checkbox allow everyone move")->setTentative( true);
}
// Copy == everyone can't copy
if (everyone_mask_on & PERM_COPY)
{
- getChild<LLUICtrl>("checkbox allow everyone copy")->setValue(TRUE);
+ getChild<LLUICtrl>("checkbox allow everyone copy")->setValue(true);
getChild<LLUICtrl>("checkbox allow everyone copy")->setTentative( !can_copy || !can_transfer);
}
else if (everyone_mask_off & PERM_COPY)
{
- getChild<LLUICtrl>("checkbox allow everyone copy")->setValue(FALSE);
- getChild<LLUICtrl>("checkbox allow everyone copy")->setTentative( FALSE);
+ getChild<LLUICtrl>("checkbox allow everyone copy")->setValue(false);
+ getChild<LLUICtrl>("checkbox allow everyone copy")->setTentative( false);
}
else
{
- getChild<LLUICtrl>("checkbox allow everyone copy")->setValue(TRUE);
- getChild<LLUICtrl>("checkbox allow everyone copy")->setTentative( TRUE);
+ getChild<LLUICtrl>("checkbox allow everyone copy")->setValue(true);
+ getChild<LLUICtrl>("checkbox allow everyone copy")->setTentative( true);
}
}
@@ -867,71 +867,71 @@ void LLPanelPermissions::refresh()
// Modify == next owner canot modify
if (next_owner_mask_on & PERM_MODIFY)
{
- getChild<LLUICtrl>("checkbox next owner can modify")->setValue(TRUE);
- getChild<LLUICtrl>("checkbox next owner can modify")->setTentative( FALSE);
+ getChild<LLUICtrl>("checkbox next owner can modify")->setValue(true);
+ getChild<LLUICtrl>("checkbox next owner can modify")->setTentative( false);
}
else if (next_owner_mask_off & PERM_MODIFY)
{
- getChild<LLUICtrl>("checkbox next owner can modify")->setValue(FALSE);
- getChild<LLUICtrl>("checkbox next owner can modify")->setTentative( FALSE);
+ getChild<LLUICtrl>("checkbox next owner can modify")->setValue(false);
+ getChild<LLUICtrl>("checkbox next owner can modify")->setTentative( false);
}
else
{
- getChild<LLUICtrl>("checkbox next owner can modify")->setValue(TRUE);
- getChild<LLUICtrl>("checkbox next owner can modify")->setTentative( TRUE);
+ getChild<LLUICtrl>("checkbox next owner can modify")->setValue(true);
+ getChild<LLUICtrl>("checkbox next owner can modify")->setTentative( true);
}
// Copy == next owner cannot copy
if (next_owner_mask_on & PERM_COPY)
{
- getChild<LLUICtrl>("checkbox next owner can copy")->setValue(TRUE);
+ getChild<LLUICtrl>("checkbox next owner can copy")->setValue(true);
getChild<LLUICtrl>("checkbox next owner can copy")->setTentative( !can_copy);
}
else if (next_owner_mask_off & PERM_COPY)
{
- getChild<LLUICtrl>("checkbox next owner can copy")->setValue(FALSE);
- getChild<LLUICtrl>("checkbox next owner can copy")->setTentative( FALSE);
+ getChild<LLUICtrl>("checkbox next owner can copy")->setValue(false);
+ getChild<LLUICtrl>("checkbox next owner can copy")->setTentative( false);
}
else
{
- getChild<LLUICtrl>("checkbox next owner can copy")->setValue(TRUE);
- getChild<LLUICtrl>("checkbox next owner can copy")->setTentative( TRUE);
+ getChild<LLUICtrl>("checkbox next owner can copy")->setValue(true);
+ getChild<LLUICtrl>("checkbox next owner can copy")->setTentative( true);
}
// Transfer == next owner cannot transfer
if (next_owner_mask_on & PERM_TRANSFER)
{
- getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(TRUE);
+ getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(true);
getChild<LLUICtrl>("checkbox next owner can transfer")->setTentative( !can_transfer);
}
else if (next_owner_mask_off & PERM_TRANSFER)
{
- getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(FALSE);
- getChild<LLUICtrl>("checkbox next owner can transfer")->setTentative( FALSE);
+ getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(false);
+ getChild<LLUICtrl>("checkbox next owner can transfer")->setTentative( false);
}
else
{
- getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(TRUE);
- getChild<LLUICtrl>("checkbox next owner can transfer")->setTentative( TRUE);
+ getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(true);
+ getChild<LLUICtrl>("checkbox next owner can transfer")->setTentative( true);
}
}
// reflect sale information
LLSaleInfo sale_info;
- BOOL valid_sale_info = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info);
+ bool valid_sale_info = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info);
LLSaleInfo::EForSale sale_type = sale_info.getSaleType();
LLComboBox* combo_sale_type = getChild<LLComboBox>("sale type");
if (valid_sale_info)
{
combo_sale_type->setValue( sale_type == LLSaleInfo::FS_NOT ? LLSaleInfo::FS_COPY : sale_type);
- combo_sale_type->setTentative( FALSE); // unfortunately this doesn't do anything at the moment.
+ combo_sale_type->setTentative( false); // unfortunately this doesn't do anything at the moment.
}
else
{
// default option is sell copy, determined to be safest
combo_sale_type->setValue( LLSaleInfo::FS_COPY);
- combo_sale_type->setTentative( TRUE); // unfortunately this doesn't do anything at the moment.
+ combo_sale_type->setTentative( true); // unfortunately this doesn't do anything at the moment.
}
getChild<LLUICtrl>("checkbox for sale")->setValue((num_for_sale != 0));
@@ -949,9 +949,9 @@ void LLPanelPermissions::refresh()
}
// Check search status of objects
- const BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME );
+ const bool all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME );
bool include_in_search;
- const BOOL all_include_in_search = LLSelectMgr::getInstance()->selectionGetIncludeInSearch(&include_in_search);
+ const bool all_include_in_search = LLSelectMgr::getInstance()->selectionGetIncludeInSearch(&include_in_search);
getChildView("search_check")->setEnabled(has_change_sale_ability && all_volume);
getChild<LLUICtrl>("search_check")->setValue(include_in_search);
getChild<LLUICtrl>("search_check")->setTentative( !all_include_in_search);
@@ -970,9 +970,9 @@ void LLPanelPermissions::refresh()
if (LLSelectMgr::getInstance()->getSelection()->isAttachment())
{
- getChildView("checkbox for sale")->setEnabled(FALSE);
- getChildView("Edit Cost")->setEnabled(FALSE);
- getChild<LLComboBox>("sale type")->setEnabled(FALSE);
+ getChildView("checkbox for sale")->setEnabled(false);
+ getChildView("Edit Cost")->setEnabled(false);
+ getChild<LLComboBox>("sale type")->setEnabled(false);
}
getChildView("label click action")->setEnabled(is_perm_modify && is_nonpermanent_enforced && all_volume);
@@ -1049,7 +1049,7 @@ void LLPanelPermissions::onClickGroup()
{
LLUUID owner_id;
std::string name;
- BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, name);
+ bool owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, name);
LLFloater* parent_floater = gFloaterView->getParentFloater(this);
if(owners_identical && (owner_id == gAgent.getID()))
@@ -1073,7 +1073,7 @@ void LLPanelPermissions::cbGroupID(LLUUID group_id)
{
if(mLabelGroupName)
{
- mLabelGroupName->setNameID(group_id, TRUE);
+ mLabelGroupName->setNameID(group_id, true);
}
LLSelectMgr::getInstance()->sendGroup(group_id);
}
@@ -1084,10 +1084,10 @@ bool callback_deed_to_group(const LLSD& notification, const LLSD& response)
if (0 == option)
{
LLUUID group_id;
- BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id);
+ bool groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id);
if(group_id.notNull() && groups_identical && (gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED)))
{
- LLSelectMgr::getInstance()->sendOwner(LLUUID::null, group_id, FALSE);
+ LLSelectMgr::getInstance()->sendOwner(LLUUID::null, group_id, false);
}
}
return false;
@@ -1111,7 +1111,7 @@ void LLPanelPermissions::onCommitPerm(LLUICtrl *ctrl, void *data, U8 field, U32
// Checkbox will have toggled itself
// LLPanelPermissions* self = (LLPanelPermissions*)data;
LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl;
- BOOL new_state = check->get();
+ bool new_state = check->get();
LLSelectMgr::getInstance()->selectionSetObjectPermissions(field, new_state, perm);
}
@@ -1175,7 +1175,7 @@ void LLPanelPermissions::onCommitName(LLUICtrl*, void* data)
{
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
new_item->rename(tb->getText());
- new_item->updateServer(FALSE);
+ new_item->updateServer(false);
gInventory.updateItem(new_item);
gInventory.notifyObservers();
}
@@ -1202,7 +1202,7 @@ void LLPanelPermissions::onCommitDesc(LLUICtrl*, void* data)
{
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
new_item->setDescription(le->getText());
- new_item->updateServer(FALSE);
+ new_item->updateServer(false);
gInventory.updateItem(new_item);
gInventory.notifyObservers();
}
@@ -1252,10 +1252,10 @@ void LLPanelPermissions::setAllSaleInfo()
LLSelectMgr::getInstance()->selectionSetObjectSaleInfo(new_sale_info);
// Note: won't work right if a root and non-root are both single-selected (here and other places).
- BOOL is_perm_modify = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode()
+ bool is_perm_modify = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode()
&& LLSelectMgr::getInstance()->selectGetRootsModify())
|| LLSelectMgr::getInstance()->selectGetModify();
- BOOL is_nonpermanent_enforced = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode()
+ bool is_nonpermanent_enforced = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode()
&& LLSelectMgr::getInstance()->selectGetRootsNonPermanentEnforced())
|| LLSelectMgr::getInstance()->selectGetNonPermanentEnforced();
diff --git a/indra/newview/llpanelpermissions.h b/indra/newview/llpanelpermissions.h
index e657f8f8b7..5be9d9efe6 100644
--- a/indra/newview/llpanelpermissions.h
+++ b/indra/newview/llpanelpermissions.h
@@ -48,7 +48,7 @@ public:
LLPanelPermissions();
virtual ~LLPanelPermissions();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
void updateOwnerName(const LLUUID& owner_id, const LLAvatarName& owner_name, const LLStyle::Params& style_params);
void updateCreatorName(const LLUUID& creator_id, const LLAvatarName& creator_name, const LLStyle::Params& style_params);
void refresh(); // refresh all labels as needed
diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp
index fb5957ff8f..e272856f77 100644
--- a/indra/newview/llpanelplaceinfo.cpp
+++ b/indra/newview/llpanelplaceinfo.cpp
@@ -72,7 +72,7 @@ LLPanelPlaceInfo::~LLPanelPlaceInfo()
}
//virtual
-BOOL LLPanelPlaceInfo::postBuild()
+bool LLPanelPlaceInfo::postBuild()
{
mTitle = getChild<LLTextBox>("title");
mCurrentTitle = mTitle->getText();
@@ -92,7 +92,7 @@ BOOL LLPanelPlaceInfo::postBuild()
mScrollingPanelMinHeight = mScrollContainer->getScrolledViewRect().getHeight();
mScrollingPanelWidth = mScrollingPanel->getRect().getWidth();
- return TRUE;
+ return true;
}
//virtual
@@ -194,7 +194,7 @@ void LLPanelPlaceInfo::setErrorStatus(S32 status, const std::string& reason)
mRegionTitle.clear();
// Enable "Back" button that was disabled when parcel request was sent.
- getChild<LLButton>("back_btn")->setEnabled(TRUE);
+ getChild<LLButton>("back_btn")->setEnabled(true);
}
// virtual
@@ -258,11 +258,11 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data)
}
// virtual
-void LLPanelPlaceInfo::reshape(S32 width, S32 height, BOOL called_from_parent)
+void LLPanelPlaceInfo::reshape(S32 width, S32 height, bool called_from_parent)
{
// This if was added to force collapsing description textbox on Windows at the beginning of reshape
- // (the only case when reshape is skipped here is when it's caused by this textbox, so called_from_parent is FALSE)
+ // (the only case when reshape is skipped here is when it's caused by this textbox, so called_from_parent is false)
// This way it is consistent with Linux where topLost collapses textbox at the beginning of reshape.
// On windows it collapsed only after reshape which caused EXT-8342.
if(called_from_parent)
diff --git a/indra/newview/llpanelplaceinfo.h b/indra/newview/llpanelplaceinfo.h
index 533215016a..c9dfca6b62 100644
--- a/indra/newview/llpanelplaceinfo.h
+++ b/indra/newview/llpanelplaceinfo.h
@@ -62,7 +62,7 @@ public:
LLPanelPlaceInfo();
/*virtual*/ ~LLPanelPlaceInfo();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
// Ignore all old location information, useful if you are
// recycling an existing dialog and need to clear it.
@@ -89,7 +89,7 @@ public:
/*virtual*/ void processParcelInfo(const LLParcelData& parcel_data);
- /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+ /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true);
// Create a pick for the location specified
// by global_pos.
diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp
index 9283dfa218..2e21a21d3d 100644
--- a/indra/newview/llpanelplaceprofile.cpp
+++ b/indra/newview/llpanelplaceprofile.cpp
@@ -92,7 +92,7 @@ LLPanelPlaceProfile::~LLPanelPlaceProfile()
}
// virtual
-BOOL LLPanelPlaceProfile::postBuild()
+bool LLPanelPlaceProfile::postBuild()
{
LLPanelPlaceInfo::postBuild();
@@ -166,7 +166,7 @@ BOOL LLPanelPlaceProfile::postBuild()
mLastSelectedRegionID = LLUUID::null;
mNextCovenantUpdateTime = 0;
- return TRUE;
+ return true;
}
// virtual
@@ -177,8 +177,8 @@ void LLPanelPlaceProfile::resetLocation()
mLastSelectedRegionID = LLUUID::null;
mNextCovenantUpdateTime = 0;
- mForSalePanel->setVisible(FALSE);
- mYouAreHerePanel->setVisible(FALSE);
+ mForSalePanel->setVisible(false);
+ mYouAreHerePanel->setVisible(false);
std::string loading = LLTrans::getString("LoadingData");
@@ -222,7 +222,7 @@ void LLPanelPlaceProfile::resetLocation()
mResaleText->setValue(loading);
mSaleToText->setValue(loading);
- getChild<LLAccordionCtrlTab>("sales_tab")->setVisible(TRUE);
+ getChild<LLAccordionCtrlTab>("sales_tab")->setVisible(true);
}
// virtual
@@ -312,7 +312,7 @@ void LLPanelPlaceProfile::processParcelInfo(const LLParcelData& parcel_data)
}
// virtual
-void LLPanelPlaceProfile::onVisibilityChange(BOOL new_visibility)
+void LLPanelPlaceProfile::onVisibilityChange(bool new_visibility)
{
LLPanel::onVisibilityChange(new_visibility);
@@ -540,7 +540,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
S32 claim_price;
S32 rent_price;
F32 dwell;
- BOOL for_sale;
+ bool for_sale;
vpm->getDisplayInfo(&area, &claim_price, &rent_price, &for_sale, &dwell);
mForSalePanel->setVisible(for_sale);
if (for_sale)
@@ -553,7 +553,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
// Show sales info to a specific person or a group he belongs to.
if (auth_buyer_id != gAgent.getID() && !gAgent.isInGroup(auth_buyer_id))
{
- for_sale = FALSE;
+ for_sale = false;
}
}
else
@@ -674,7 +674,7 @@ void LLPanelPlaceProfile::updateYouAreHereBanner(void* userdata)
{
static F32 radius = gSavedSettings.getF32("YouAreHereDistance");
- BOOL display_banner = gAgent.getRegion()->getRegionID() == self->mLastSelectedRegionID &&
+ bool display_banner = gAgent.getRegion()->getRegionID() == self->mLastSelectedRegionID &&
LLAgentUI::checkAgentDistance(self->mPosRegion, radius);
self->mYouAreHerePanel->setVisible(display_banner);
diff --git a/indra/newview/llpanelplaceprofile.h b/indra/newview/llpanelplaceprofile.h
index 16478bc179..ce0b89f5f7 100644
--- a/indra/newview/llpanelplaceprofile.h
+++ b/indra/newview/llpanelplaceprofile.h
@@ -39,7 +39,7 @@ public:
LLPanelPlaceProfile();
/*virtual*/ ~LLPanelPlaceProfile();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void resetLocation();
@@ -47,7 +47,7 @@ public:
/*virtual*/ void processParcelInfo(const LLParcelData& parcel_data);
- /*virtual*/ void onVisibilityChange(BOOL new_visibility);
+ /*virtual*/ void onVisibilityChange(bool new_visibility);
// Displays information about the currently selected parcel
// without sending a request to the server.
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 1d5ed93c4d..2abbcc0c12 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -108,7 +108,7 @@ public:
}
LLUUID parcel_id;
- if (!parcel_id.set(params[0], FALSE))
+ if (!parcel_id.set(params[0], false))
{
return false;
}
@@ -275,7 +275,7 @@ LLPanelPlaces::~LLPanelPlaces()
}
}
-BOOL LLPanelPlaces::postBuild()
+bool LLPanelPlaces::postBuild()
{
mTeleportBtn = getChild<LLButton>("teleport_btn");
mTeleportBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onTeleportButtonClicked, this));
@@ -309,7 +309,7 @@ BOOL LLPanelPlaces::postBuild()
LLDragAndDropButton* trash_btn = (LLDragAndDropButton*)mRemoveSelectedBtn;
trash_btn->setDragAndDropHandler(boost::bind(&LLPanelPlaces::handleDragAndDropToTrash, this
- , _4 // BOOL drop
+ , _4 // bool drop
, _5 // EDragAndDropType cargo_type
, _6 // void* cargo_data
, _7 // EAcceptance* accept
@@ -323,7 +323,7 @@ BOOL LLPanelPlaces::postBuild()
mPlaceMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_place.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
if (mPlaceMenu)
{
- mPlaceMenu->setAlwaysShowMenu(TRUE);
+ mPlaceMenu->setAlwaysShowMenu(true);
}
else
{
@@ -343,7 +343,7 @@ BOOL LLPanelPlaces::postBuild()
}
mButtonsContainer = getChild<LLPanel>("button_layout_panel");
- mButtonsContainer->setVisible(FALSE);
+ mButtonsContainer->setVisible(false);
mFilterContainer = getChild<LLLayoutStack>("top_menu_panel");
mFilterEditor = getChild<LLFilterEditor>("Filter");
@@ -360,7 +360,7 @@ BOOL LLPanelPlaces::postBuild()
mPlaceProfile = findChild<LLPanelPlaceProfile>("panel_place_profile");
mLandmarkInfo = findChild<LLPanelLandmarkInfo>("panel_landmark_info");
if (!mPlaceProfile || !mLandmarkInfo)
- return FALSE;
+ return false;
mPlaceProfileBackBtn = mPlaceProfile->getChild<LLButton>("back_btn");
mPlaceProfileBackBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this));
@@ -382,7 +382,7 @@ BOOL LLPanelPlaces::postBuild()
createTabs();
updateVerbs();
- return TRUE;
+ return true;
}
void LLPanelPlaces::onOpen(const LLSD& key)
@@ -403,9 +403,9 @@ void LLPanelPlaces::onOpen(const LLSD& key)
// The second toggle forces the list to be set to Landmark.
// This avoids extracting and duplicating all the state logic from togglePlaceInfoPanel()
// here or some specific private method
- togglePlaceInfoPanel(FALSE);
+ togglePlaceInfoPanel(false);
mPlaceInfoType = key_type;
- togglePlaceInfoPanel(FALSE);
+ togglePlaceInfoPanel(false);
// Update the active tab
onTabSelected();
// Update the buttons at the bottom of the panel
@@ -435,7 +435,7 @@ void LLPanelPlaces::onOpen(const LLSD& key)
mPosGlobal.setZero();
mItem = NULL;
mRegionId.setNull();
- togglePlaceInfoPanel(TRUE);
+ togglePlaceInfoPanel(true);
if (mPlaceInfoType == AGENT_INFO_TYPE)
{
@@ -463,7 +463,7 @@ void LLPanelPlaces::onOpen(const LLSD& key)
mLandmarkInfo->displayParcelInfo(LLUUID(), mPosGlobal);
- mSaveBtn->setEnabled(FALSE);
+ mSaveBtn->setEnabled(false);
}
else if (mPlaceInfoType == LANDMARK_INFO_TYPE)
{
@@ -474,7 +474,7 @@ void LLPanelPlaces::onOpen(const LLSD& key)
if (!item)
return;
- BOOL is_editable = gInventory.isObjectDescendentOf(id, gInventory.getRootFolderID())
+ bool is_editable = gInventory.isObjectDescendentOf(id, gInventory.getRootFolderID())
&& item->getPermissions().allowModifyBy(gAgent.getID());
mLandmarkInfo->setCanEdit(is_editable);
@@ -574,7 +574,7 @@ void LLPanelPlaces::setItem(LLInventoryItem* item)
}
// Check if item is in agent's inventory and he has the permission to modify it.
- BOOL is_landmark_editable = gInventory.isObjectDescendentOf(mItem->getUUID(), gInventory.getRootFolderID()) &&
+ bool is_landmark_editable = gInventory.isObjectDescendentOf(mItem->getUUID(), gInventory.getRootFolderID()) &&
mItem->getPermissions().allowModifyBy(gAgent.getID());
mSaveBtn->setEnabled(is_landmark_editable);
@@ -663,7 +663,7 @@ void LLPanelPlaces::onTabSelected()
childSetVisible("add_btn_panel", supports_create);
// favorites and inventory can remove items, history can clear history
- childSetVisible("trash_btn_panel", TRUE);
+ childSetVisible("trash_btn_panel", true);
if (supports_create)
{
@@ -784,7 +784,7 @@ void LLPanelPlaces::onEditButtonClicked()
isLandmarkEditModeOn = true;
- mLandmarkInfo->toggleLandmarkEditMode(TRUE);
+ mLandmarkInfo->toggleLandmarkEditMode(true);
updateVerbs();
}
@@ -831,7 +831,7 @@ void LLPanelPlaces::onSaveButtonClicked()
gInventory.accountForUpdate(update);
new_item->setParent(folder_id);
- new_item->updateParentOnServer(FALSE);
+ new_item->updateParentOnServer(false);
}
gInventory.updateItem(new_item);
@@ -851,7 +851,7 @@ void LLPanelPlaces::onCancelButtonClicked()
}
else
{
- mLandmarkInfo->toggleLandmarkEditMode(FALSE);
+ mLandmarkInfo->toggleLandmarkEditMode(false);
isLandmarkEditModeOn = false;
updateVerbs();
@@ -898,7 +898,7 @@ void LLPanelPlaces::onOverflowButtonClicked()
{
menu = mLandmarkMenu;
- BOOL is_landmark_removable = FALSE;
+ bool is_landmark_removable = false;
if (mItem.notNull())
{
const LLUUID& item_id = mItem->getUUID();
@@ -978,7 +978,7 @@ void LLPanelPlaces::onOverflowMenuItemClicked(const LLSD& param)
void LLPanelPlaces::onBackButtonClicked()
{
- togglePlaceInfoPanel(FALSE);
+ togglePlaceInfoPanel(false);
// Resetting mPlaceInfoType when Place Info panel is closed.
mPlaceInfoType = LLStringUtil::null;
@@ -1023,7 +1023,7 @@ void LLPanelPlaces::onRemoveButtonClicked()
}
}
-bool LLPanelPlaces::handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept)
+bool LLPanelPlaces::handleDragAndDropToTrash(bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept)
{
if (mActivePanel)
{
@@ -1032,7 +1032,7 @@ bool LLPanelPlaces::handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_t
return false;
}
-void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible)
+void LLPanelPlaces::togglePlaceInfoPanel(bool visible)
{
if (!mPlaceProfile || !mLandmarkInfo)
return;
@@ -1055,7 +1055,7 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible)
// to avoid text blinking.
mResetInfoTimer.setTimerExpirySec(PLACE_INFO_UPDATE_INTERVAL);
- mLandmarkInfo->setVisible(FALSE);
+ mLandmarkInfo->setVisible(false);
}
else if (mPlaceInfoType == AGENT_INFO_TYPE)
{
@@ -1071,7 +1071,7 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible)
mPlaceInfoType == LANDMARK_TAB_INFO_TYPE)
{
mLandmarkInfo->setVisible(visible);
- mPlaceProfile->setVisible(FALSE);
+ mPlaceProfile->setVisible(false);
if (visible)
{
mLandmarkInfo->resetLocation();
@@ -1095,7 +1095,7 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible)
mTabContainer->selectTabPanel(landmarks_panel);
if (mItem.notNull())
{
- landmarks_panel->setItemSelected(mItem->getUUID(), TRUE);
+ landmarks_panel->setItemSelected(mItem->getUUID(), true);
}
else
{
@@ -1107,7 +1107,7 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible)
}
// virtual
-void LLPanelPlaces::onVisibilityChange(BOOL new_visibility)
+void LLPanelPlaces::onVisibilityChange(bool new_visibility)
{
LLPanel::onVisibilityChange(new_visibility);
@@ -1213,7 +1213,7 @@ void LLPanelPlaces::createTabs()
childSetVisible("add_btn_panel", supports_create);
// favorites and inventory can remove items, history can clear history
- childSetVisible("trash_btn_panel", TRUE);
+ childSetVisible("trash_btn_panel", true);
if (supports_create)
{
diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h
index e554099343..d69b15ab14 100644
--- a/indra/newview/llpanelplaces.h
+++ b/indra/newview/llpanelplaces.h
@@ -57,7 +57,7 @@ public:
LLPanelPlaces();
virtual ~LLPanelPlaces();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onOpen(const LLSD& key);
// Called on parcel selection change to update place information.
@@ -99,11 +99,11 @@ private:
void onSortingMenuClick();
void onAddMenuClick();
void onRemoveButtonClicked();
- bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept);
+ bool handleDragAndDropToTrash(bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept);
- void togglePlaceInfoPanel(BOOL visible);
+ void togglePlaceInfoPanel(bool visible);
- /*virtual*/ void onVisibilityChange(BOOL new_visibility);
+ /*virtual*/ void onVisibilityChange(bool new_visibility);
void updateVerbs();
diff --git a/indra/newview/llpanelplacestab.h b/indra/newview/llpanelplacestab.h
index aab1c130c1..9c2acb83d6 100644
--- a/indra/newview/llpanelplacestab.h
+++ b/indra/newview/llpanelplacestab.h
@@ -54,7 +54,7 @@ public:
/**
* Processes drag-n-drop of the Landmarks and folders into trash button.
*/
- virtual bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept) = 0;
+ virtual bool handleDragAndDropToTrash(bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept) = 0;
bool isTabVisible(); // Check if parent TabContainer is visible.
diff --git a/indra/newview/llpanelpresetscamerapulldown.cpp b/indra/newview/llpanelpresetscamerapulldown.cpp
index 4c9c30160c..dc723f9055 100644
--- a/indra/newview/llpanelpresetscamerapulldown.cpp
+++ b/indra/newview/llpanelpresetscamerapulldown.cpp
@@ -54,7 +54,7 @@ LLPanelPresetsCameraPulldown::LLPanelPresetsCameraPulldown()
buildFromFile( "panel_presets_camera_pulldown.xml");
}
-BOOL LLPanelPresetsCameraPulldown::postBuild()
+bool LLPanelPresetsCameraPulldown::postBuild()
{
LLPresetsManager* presetsMgr = LLPresetsManager::getInstance();
if (presetsMgr)
@@ -128,9 +128,9 @@ void LLPanelPresetsCameraPulldown::onRowClick(const LLSD& user_data)
LLFloaterCamera::switchToPreset(name);
// Scroll grabbed focus, drop it to prevent selection of parent menu
- setFocus(FALSE);
+ setFocus(false);
- setVisible(FALSE);
+ setVisible(false);
}
else
{
@@ -146,7 +146,7 @@ void LLPanelPresetsCameraPulldown::onRowClick(const LLSD& user_data)
void LLPanelPresetsCameraPulldown::onViewButtonClick(const LLSD& user_data)
{
// close the minicontrol, we're bringing up the big one
- setVisible(FALSE);
+ setVisible(false);
LLFloaterReg::toggleInstanceOrBringToFront("camera");
}
diff --git a/indra/newview/llpanelpresetscamerapulldown.h b/indra/newview/llpanelpresetscamerapulldown.h
index c49bab042e..b313e5785e 100644
--- a/indra/newview/llpanelpresetscamerapulldown.h
+++ b/indra/newview/llpanelpresetscamerapulldown.h
@@ -35,7 +35,7 @@ class LLPanelPresetsCameraPulldown : public LLPanelPulldown
{
public:
LLPanelPresetsCameraPulldown();
- /*virtual*/ BOOL postBuild();
+ bool postBuild() override;
void populatePanel();
private:
diff --git a/indra/newview/llpanelpresetspulldown.cpp b/indra/newview/llpanelpresetspulldown.cpp
index f6e501f147..00085549ad 100644
--- a/indra/newview/llpanelpresetspulldown.cpp
+++ b/indra/newview/llpanelpresetspulldown.cpp
@@ -57,7 +57,7 @@ LLPanelPresetsPulldown::LLPanelPresetsPulldown()
buildFromFile( "panel_presets_pulldown.xml");
}
-BOOL LLPanelPresetsPulldown::postBuild()
+bool LLPanelPresetsPulldown::postBuild()
{
LLPresetsManager* presetsMgr = LLPresetsManager::getInstance();
presetsMgr->setPresetListChangeCallback(boost::bind(&LLPanelPresetsPulldown::populatePanel, this));
@@ -125,9 +125,9 @@ void LLPanelPresetsPulldown::onRowClick(const LLSD& user_data)
LLPresetsManager::getInstance()->loadPreset(PRESETS_GRAPHIC, name);
// Scroll grabbed focus, drop it to prevent selection of parent menu
- setFocus(FALSE);
+ setFocus(false);
- setVisible(FALSE);
+ setVisible(false);
}
else
{
@@ -143,7 +143,7 @@ void LLPanelPresetsPulldown::onRowClick(const LLSD& user_data)
void LLPanelPresetsPulldown::onGraphicsButtonClick(const LLSD& user_data)
{
// close the minicontrol, we're bringing up the big one
- setVisible(FALSE);
+ setVisible(false);
// bring up the prefs floater
LLFloater* prefsfloater = LLFloaterReg::showInstance("preferences");
@@ -162,7 +162,7 @@ void LLPanelPresetsPulldown::onGraphicsButtonClick(const LLSD& user_data)
void LLPanelPresetsPulldown::onAutofpsButtonClick(const LLSD& user_data)
{
- setVisible(FALSE);
+ setVisible(false);
LLFloaterPerformance* performance_floater = LLFloaterReg::showTypedInstance<LLFloaterPerformance>("performance");
if (performance_floater)
{
diff --git a/indra/newview/llpanelpresetspulldown.h b/indra/newview/llpanelpresetspulldown.h
index 79bd6886b1..cc3ea7f038 100644
--- a/indra/newview/llpanelpresetspulldown.h
+++ b/indra/newview/llpanelpresetspulldown.h
@@ -36,7 +36,7 @@ class LLPanelPresetsPulldown : public LLPanelPulldown
{
public:
LLPanelPresetsPulldown();
- /*virtual*/ BOOL postBuild();
+ bool postBuild() override;
void populatePanel();
private:
diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp
index c42cd6c6ba..3dcffa91ac 100644
--- a/indra/newview/llpanelprimmediacontrols.cpp
+++ b/indra/newview/llpanelprimmediacontrols.cpp
@@ -141,7 +141,7 @@ LLPanelPrimMediaControls::~LLPanelPrimMediaControls()
{
}
-BOOL LLPanelPrimMediaControls::postBuild()
+bool LLPanelPrimMediaControls::postBuild()
{
mMediaRegion = getChild<LLView>("media_region");
mBackCtrl = getChild<LLUICtrl>("back");
@@ -223,8 +223,8 @@ BOOL LLPanelPrimMediaControls::postBuild()
mCurrentZoom = ZOOM_NONE;
// clicks on buttons do not remove keyboard focus from media
- setIsChrome(TRUE);
- return TRUE;
+ setIsChrome(true);
+ return true;
}
void LLPanelPrimMediaControls::setMediaFace(LLPointer<LLViewerObject> objectp, S32 face, viewer_media_t media_impl, LLVector3 pick_normal)
@@ -297,7 +297,7 @@ void LLPanelPrimMediaControls::updateShape()
if(!media_impl || gFloaterTools->getVisible())
{
- setVisible(FALSE);
+ setVisible(false);
return;
}
@@ -443,17 +443,17 @@ void LLPanelPrimMediaControls::updateShape()
switch(result)
{
case LLPluginClassMediaOwner::MEDIA_PLAYING:
- mPlayCtrl->setEnabled(FALSE);
- mPlayCtrl->setVisible(FALSE);
- mPauseCtrl->setEnabled(TRUE);
+ mPlayCtrl->setEnabled(false);
+ mPlayCtrl->setVisible(false);
+ mPauseCtrl->setEnabled(true);
mPauseCtrl->setVisible(has_focus);
break;
case LLPluginClassMediaOwner::MEDIA_PAUSED:
default:
- mPauseCtrl->setEnabled(FALSE);
- mPauseCtrl->setVisible(FALSE);
- mPlayCtrl->setEnabled(TRUE);
+ mPauseCtrl->setEnabled(false);
+ mPauseCtrl->setVisible(false);
+ mPlayCtrl->setEnabled(true);
mPlayCtrl->setVisible(has_focus);
break;
}
@@ -469,17 +469,17 @@ void LLPanelPrimMediaControls::updateShape()
mCurrentURL.clear();
}
- mPlayCtrl->setVisible(FALSE);
- mPauseCtrl->setVisible(FALSE);
- mMediaStopCtrl->setVisible(FALSE);
+ mPlayCtrl->setVisible(false);
+ mPauseCtrl->setVisible(false);
+ mMediaStopCtrl->setVisible(false);
mMediaAddressCtrl->setVisible(has_focus && !mini_controls);
mMediaAddressCtrl->setEnabled(has_focus && !mini_controls);
- mMediaPlaySliderPanel->setVisible(FALSE);
- mMediaPlaySliderPanel->setEnabled(FALSE);
- mSkipFwdCtrl->setVisible(FALSE);
- mSkipFwdCtrl->setEnabled(FALSE);
- mSkipBackCtrl->setVisible(FALSE);
- mSkipBackCtrl->setEnabled(FALSE);
+ mMediaPlaySliderPanel->setVisible(false);
+ mMediaPlaySliderPanel->setEnabled(false);
+ mSkipFwdCtrl->setVisible(false);
+ mSkipFwdCtrl->setEnabled(false);
+ mSkipBackCtrl->setVisible(false);
+ mSkipBackCtrl->setEnabled(false);
if(media_impl->getVolume() <= 0.0)
{
@@ -515,17 +515,17 @@ void LLPanelPrimMediaControls::updateShape()
if(result == LLPluginClassMediaOwner::MEDIA_LOADING)
{
- mReloadCtrl->setEnabled(FALSE);
- mReloadCtrl->setVisible(FALSE);
- mStopCtrl->setEnabled(TRUE);
+ mReloadCtrl->setEnabled(false);
+ mReloadCtrl->setVisible(false);
+ mStopCtrl->setEnabled(true);
mStopCtrl->setVisible(has_focus);
}
else
{
- mReloadCtrl->setEnabled(TRUE);
+ mReloadCtrl->setEnabled(true);
mReloadCtrl->setVisible(has_focus);
- mStopCtrl->setEnabled(FALSE);
- mStopCtrl->setVisible(FALSE);
+ mStopCtrl->setEnabled(false);
+ mStopCtrl->setVisible(false);
}
}
@@ -741,7 +741,7 @@ void LLPanelPrimMediaControls::updateShape()
else
{
// I don't think this is correct anymore. This is done in draw() after the fade has completed.
- // setVisible(FALSE);
+ // setVisible(false);
}
}
}
@@ -834,10 +834,10 @@ void LLPanelPrimMediaControls::draw()
}
}
-BOOL LLPanelPrimMediaControls::handleScrollWheel(S32 x, S32 y, S32 clicks)
+bool LLPanelPrimMediaControls::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
mInactivityTimer.start();
- BOOL res = FALSE;
+ bool res = false;
// Unlike other mouse events, we need to handle scroll here otherwise
// it will be intercepted by camera and won't reach toolpie
@@ -850,10 +850,10 @@ BOOL LLPanelPrimMediaControls::handleScrollWheel(S32 x, S32 y, S32 clicks)
return res;
}
-BOOL LLPanelPrimMediaControls::handleScrollHWheel(S32 x, S32 y, S32 clicks)
+bool LLPanelPrimMediaControls::handleScrollHWheel(S32 x, S32 y, S32 clicks)
{
mInactivityTimer.start();
- BOOL res = FALSE;
+ bool res = false;
if (LLViewerMediaFocus::getInstance()->isHoveringOverFocused())
{
@@ -864,19 +864,19 @@ BOOL LLPanelPrimMediaControls::handleScrollHWheel(S32 x, S32 y, S32 clicks)
return res;
}
-BOOL LLPanelPrimMediaControls::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLPanelPrimMediaControls::handleMouseDown(S32 x, S32 y, MASK mask)
{
mInactivityTimer.start();
return LLPanel::handleMouseDown(x, y, mask);
}
-BOOL LLPanelPrimMediaControls::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLPanelPrimMediaControls::handleMouseUp(S32 x, S32 y, MASK mask)
{
mInactivityTimer.start();
return LLPanel::handleMouseUp(x, y, mask);
}
-BOOL LLPanelPrimMediaControls::handleKeyHere( KEY key, MASK mask )
+bool LLPanelPrimMediaControls::handleKeyHere( KEY key, MASK mask )
{
mInactivityTimer.start();
return LLPanel::handleKeyHere(key, mask);
@@ -934,7 +934,7 @@ void LLPanelPrimMediaControls::close()
{
resetZoomLevel(true);
LLViewerMediaFocus::getInstance()->clearFocus();
- setVisible(FALSE);
+ setVisible(false);
}
@@ -1120,7 +1120,7 @@ void LLPanelPrimMediaControls::updateZoom()
{
case ZOOM_NONE:
{
- gAgentCamera.setFocusOnAvatar(TRUE, ANIMATE);
+ gAgentCamera.setFocusOnAvatar(true, ANIMATE);
break;
}
case ZOOM_FAR:
@@ -1140,7 +1140,7 @@ void LLPanelPrimMediaControls::updateZoom()
}
default:
{
- gAgentCamera.setFocusOnAvatar(TRUE, ANIMATE);
+ gAgentCamera.setFocusOnAvatar(true, ANIMATE);
break;
}
}
@@ -1420,7 +1420,7 @@ void LLPanelPrimMediaControls::clearFaceOnFade()
// Hiding this object makes scroll events go missing after it fades out
// (see DEV-41755 for a full description of the train wreck).
// Only hide the controls when we're untargeting.
- setVisible(FALSE);
+ setVisible(false);
mClearFaceOnFade = false;
mVolumeSliderVisible = 0;
diff --git a/indra/newview/llpanelprimmediacontrols.h b/indra/newview/llpanelprimmediacontrols.h
index dd0e4ff095..1b8f106f7b 100644
--- a/indra/newview/llpanelprimmediacontrols.h
+++ b/indra/newview/llpanelprimmediacontrols.h
@@ -46,14 +46,14 @@ class LLPanelPrimMediaControls : public LLPanel
public:
LLPanelPrimMediaControls();
virtual ~LLPanelPrimMediaControls();
- /*virtual*/ BOOL postBuild();
- virtual void draw();
- virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
- virtual BOOL handleScrollHWheel(S32 x, S32 y, S32 clicks);
-
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- virtual BOOL handleKeyHere(KEY key, MASK mask);
+ bool postBuild() override;
+ void draw() override;
+ bool handleScrollWheel(S32 x, S32 y, S32 clicks) override;
+ bool handleScrollHWheel(S32 x, S32 y, S32 clicks) override;
+
+ bool handleMouseDown(S32 x, S32 y, MASK mask) override;
+ bool handleMouseUp(S32 x, S32 y, MASK mask) override;
+ bool handleKeyHere(KEY key, MASK mask) override;
void updateShape();
bool isMouseOver();
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 8114e05a94..3a26fb086b 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -46,6 +46,7 @@
#include "lltexteditor.h"
#include "lltexturectrl.h"
#include "lltoggleablemenu.h"
+#include "lltooldraganddrop.h"
#include "llgrouplist.h"
#include "llurlaction.h"
@@ -137,7 +138,7 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id)
return;
}
- LLPanel *panel = floater_profile->findChild<LLPanel>(PANEL_PROFILE_VIEW, TRUE);
+ LLPanel *panel = floater_profile->findChild<LLPanel>(PANEL_PROFILE_VIEW, true);
LLPanelProfile *panel_profile = dynamic_cast<LLPanelProfile*>(panel);
if (!panel_profile)
{
@@ -191,21 +192,21 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id)
avatar_data->caption_text = result["caption"].asString();
}
- panel = floater_profile->findChild<LLPanel>(PANEL_SECONDLIFE, TRUE);
+ panel = floater_profile->findChild<LLPanel>(PANEL_SECONDLIFE, true);
LLPanelProfileSecondLife *panel_sl = dynamic_cast<LLPanelProfileSecondLife*>(panel);
if (panel_sl)
{
panel_sl->processProfileProperties(avatar_data);
}
- panel = floater_profile->findChild<LLPanel>(PANEL_WEB, TRUE);
+ panel = floater_profile->findChild<LLPanel>(PANEL_WEB, true);
LLPanelProfileWeb *panel_web = dynamic_cast<LLPanelProfileWeb*>(panel);
if (panel_web)
{
panel_web->setLoaded();
}
- panel = floater_profile->findChild<LLPanel>(PANEL_FIRSTLIFE, TRUE);
+ panel = floater_profile->findChild<LLPanel>(PANEL_FIRSTLIFE, true);
LLPanelProfileFirstLife *panel_first = dynamic_cast<LLPanelProfileFirstLife*>(panel);
if (panel_first)
{
@@ -225,7 +226,7 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id)
avatar_picks.picks_list.emplace_back(pick_data["id"].asUUID(), pick_data["name"].asString());
}
- panel = floater_profile->findChild<LLPanel>(PANEL_PICKS, TRUE);
+ panel = floater_profile->findChild<LLPanel>(PANEL_PICKS, true);
LLPanelProfilePicks *panel_picks = dynamic_cast<LLPanelProfilePicks*>(panel);
if (panel_picks)
{
@@ -266,7 +267,7 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id)
avatar_notes.target_id = agent_id;
avatar_notes.notes = result["notes"].asString();
- panel = floater_profile->findChild<LLPanel>(PANEL_NOTES, TRUE);
+ panel = floater_profile->findChild<LLPanel>(PANEL_NOTES, true);
LLPanelProfileNotes *panel_notes = dynamic_cast<LLPanelProfileNotes*>(panel);
if (panel_notes)
{
@@ -533,7 +534,7 @@ public:
{
if (params.size() < 2) return false;
LLUUID avatar_id;
- if (!avatar_id.set(params[0], FALSE))
+ if (!avatar_id.set(params[0], false))
{
return false;
}
@@ -660,7 +661,7 @@ class LLFloaterProfilePermissions
public:
LLFloaterProfilePermissions(LLView * owner, const LLUUID &avatar_id);
~LLFloaterProfilePermissions();
- BOOL postBuild() override;
+ bool postBuild() override;
void onOpen(const LLSD& key) override;
void draw() override;
void changed(U32 mask) override; // LLFriendObserver
@@ -712,7 +713,7 @@ LLFloaterProfilePermissions::~LLFloaterProfilePermissions()
}
}
-BOOL LLFloaterProfilePermissions::postBuild()
+bool LLFloaterProfilePermissions::postBuild()
{
mDescription = getChild<LLTextBase>("perm_description");
mOnlineStatus = getChild<LLCheckBoxCtrl>("online_check");
@@ -727,7 +728,7 @@ BOOL LLFloaterProfilePermissions::postBuild()
mOkBtn->setCommitCallback([this](LLUICtrl*, void*) { onApplyRights(); }, nullptr);
mCancelBtn->setCommitCallback([this](LLUICtrl*, void*) { onCancel(); }, nullptr);
- return TRUE;
+ return true;
}
void LLFloaterProfilePermissions::onOpen(const LLSD& key)
@@ -778,11 +779,11 @@ void LLFloaterProfilePermissions::fillRightsData()
{
S32 rights = relation->getRightsGrantedTo();
- BOOL see_online = LLRelationship::GRANT_ONLINE_STATUS & rights ? TRUE : FALSE;
+ bool see_online = LLRelationship::GRANT_ONLINE_STATUS & rights ? true : false;
mOnlineStatus->setValue(see_online);
mMapRights->setEnabled(see_online);
- mMapRights->setValue(LLRelationship::GRANT_MAP_LOCATION & rights ? TRUE : FALSE);
- mEditObjectRights->setValue(LLRelationship::GRANT_MODIFY_OBJECTS & rights ? TRUE : FALSE);
+ mMapRights->setValue(LLRelationship::GRANT_MAP_LOCATION & rights ? true : false);
+ mEditObjectRights->setValue(LLRelationship::GRANT_MODIFY_OBJECTS & rights ? true : false);
}
else
{
@@ -797,7 +798,7 @@ void LLFloaterProfilePermissions::rightsConfirmationCallback(const LLSD& notific
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option != 0) // canceled
{
- mEditObjectRights->setValue(mEditObjectRights->getValue().asBoolean() ? FALSE : TRUE);
+ mEditObjectRights->setValue(mEditObjectRights->getValue().asBoolean() ? false : true);
}
else
{
@@ -823,7 +824,7 @@ void LLFloaterProfilePermissions::onCommitSeeOnlineRights()
if (relation)
{
S32 rights = relation->getRightsGrantedTo();
- mMapRights->setValue(LLRelationship::GRANT_MAP_LOCATION & rights ? TRUE : FALSE);
+ mMapRights->setValue(LLRelationship::GRANT_MAP_LOCATION & rights ? true : false);
}
else
{
@@ -833,7 +834,7 @@ void LLFloaterProfilePermissions::onCommitSeeOnlineRights()
}
else
{
- mMapRights->setValue(FALSE);
+ mMapRights->setValue(false);
}
mHasUnsavedPermChanges = true;
}
@@ -924,7 +925,7 @@ LLPanelProfileSecondLife::~LLPanelProfileSecondLife()
}
}
-BOOL LLPanelProfileSecondLife::postBuild()
+bool LLPanelProfileSecondLife::postBuild()
{
mGroupList = getChild<LLGroupList>("group_list");
mShowInSearchCombo = getChild<LLComboBox>("show_in_search");
@@ -956,7 +957,7 @@ BOOL LLPanelProfileSecondLife::postBuild()
mCantEditObjectsIcon->setMouseUpCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask) { onShowAgentPermissionsDialog(); });
mSecondLifePic->setMouseUpCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask) { onShowAgentProfileTexture(); });
- return TRUE;
+ return true;
}
void LLPanelProfileSecondLife::onOpen(const LLSD& key)
@@ -967,7 +968,7 @@ void LLPanelProfileSecondLife::onOpen(const LLSD& key)
LLUUID avatar_id = getAvatarId();
- BOOL own_profile = getSelfProfile();
+ bool own_profile = getSelfProfile();
mGroupList->setShowNone(!own_profile);
@@ -1004,7 +1005,7 @@ void LLPanelProfileSecondLife::onOpen(const LLSD& key)
if (!own_profile)
{
- mVoiceStatus = LLAvatarActions::canCall() && (LLAvatarActions::isFriend(avatar_id) ? LLAvatarTracker::instance().isBuddyOnline(avatar_id) : TRUE);
+ mVoiceStatus = LLAvatarActions::canCall() && (LLAvatarActions::isFriend(avatar_id) ? LLAvatarTracker::instance().isBuddyOnline(avatar_id) : true);
updateOnlineStatus();
fillRightsData();
}
@@ -1012,6 +1013,51 @@ void LLPanelProfileSecondLife::onOpen(const LLSD& key)
mAvatarNameCacheConnection = LLAvatarNameCache::get(getAvatarId(), boost::bind(&LLPanelProfileSecondLife::onAvatarNameCache, this, _1, _2));
}
+
+bool LLPanelProfileSecondLife::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg)
+{
+ // Try children first
+ if (LLPanelProfileTab::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg)
+ && *accept != ACCEPT_NO)
+ {
+ return true;
+ }
+
+ // No point sharing with own profile
+ if (getSelfProfile())
+ {
+ return false;
+ }
+
+ // Exclude fields that look like they are editable.
+ S32 child_x = 0;
+ S32 child_y = 0;
+ if (localPointToOtherView(x, y, &child_x, &child_y, mDescriptionEdit)
+ && mDescriptionEdit->pointInView(child_x, child_y))
+ {
+ return false;
+ }
+
+ if (localPointToOtherView(x, y, &child_x, &child_y, mGroupList)
+ && mGroupList->pointInView(child_x, child_y))
+ {
+ return false;
+ }
+
+ // Share
+ LLToolDragAndDrop::handleGiveDragAndDrop(getAvatarId(),
+ LLUUID::null,
+ drop,
+ cargo_type,
+ cargo_data,
+ accept);
+ return true;
+}
+
void LLPanelProfileSecondLife::updateData()
{
LLUUID avatar_id = getAvatarId();
@@ -1070,9 +1116,9 @@ void LLPanelProfileSecondLife::resetData()
mCanEditObjectsIcon->setEnabled(false);
mCantEditObjectsIcon->setEnabled(false);
- childSetVisible("partner_layout", FALSE);
- childSetVisible("badge_layout", FALSE);
- childSetVisible("partner_spacer_layout", TRUE);
+ childSetVisible("partner_layout", false);
+ childSetVisible("badge_layout", false);
+ childSetVisible("partner_spacer_layout", true);
}
void LLPanelProfileSecondLife::processProfileProperties(const LLAvatarData* avatar_data)
@@ -1154,11 +1200,11 @@ void LLPanelProfileSecondLife::setProfileImageUploaded(const LLUUID &image_asset
{
imagep->setLoadedCallback(onImageLoaded,
MAX_DISCARD_LEVEL,
- FALSE,
- FALSE,
+ false,
+ false,
new LLHandle<LLPanel>(getHandle()),
NULL,
- FALSE);
+ false);
}
LLFloater *floater = mFloaterProfileTextureHandle.get();
@@ -1241,17 +1287,17 @@ void LLPanelProfileSecondLife::fillCommonData(const LLAvatarData* avatar_data)
{
imagep->setLoadedCallback(onImageLoaded,
MAX_DISCARD_LEVEL,
- FALSE,
- FALSE,
+ false,
+ false,
new LLHandle<LLPanel>(getHandle()),
NULL,
- FALSE);
+ false);
}
if (getSelfProfile())
{
mAllowPublish = avatar_data->flags & AVATAR_ALLOW_PUBLISH;
- mShowInSearchCombo->setValue((BOOL)mAllowPublish);
+ mShowInSearchCombo->setValue((bool)mAllowPublish);
}
}
@@ -1260,7 +1306,7 @@ void LLPanelProfileSecondLife::fillPartnerData(const LLAvatarData* avatar_data)
LLTextBox* partner_text_ctrl = getChild<LLTextBox>("partner_link");
if (avatar_data->partner_id.notNull())
{
- childSetVisible("partner_layout", TRUE);
+ childSetVisible("partner_layout", true);
LLStringUtil::format_map_t args;
args["[LINK]"] = LLSLURL("agent", avatar_data->partner_id, "inspect").getSLURLString();
std::string partner_text = getString("partner_text", args);
@@ -1268,7 +1314,7 @@ void LLPanelProfileSecondLife::fillPartnerData(const LLAvatarData* avatar_data)
}
else
{
- childSetVisible("partner_layout", FALSE);
+ childSetVisible("partner_layout", false);
}
}
@@ -1290,48 +1336,48 @@ void LLPanelProfileSecondLife::fillAccountStatus(const LLAvatarData* avatar_data
{
getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Linden");
getChild<LLUICtrl>("badge_text")->setValue(getString("BadgeLinden"));
- childSetVisible("badge_layout", TRUE);
- childSetVisible("partner_spacer_layout", FALSE);
+ childSetVisible("badge_layout", true);
+ childSetVisible("partner_spacer_layout", false);
}
else if (avatar_data->born_on < sl_release)
{
getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Beta");
getChild<LLUICtrl>("badge_text")->setValue(getString("BadgeBeta"));
- childSetVisible("badge_layout", TRUE);
- childSetVisible("partner_spacer_layout", FALSE);
+ childSetVisible("badge_layout", true);
+ childSetVisible("partner_spacer_layout", false);
}
else if (customer_lower == "beta_lifetime")
{
getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Beta_Lifetime");
getChild<LLUICtrl>("badge_text")->setValue(getString("BadgeBetaLifetime"));
- childSetVisible("badge_layout", TRUE);
- childSetVisible("partner_spacer_layout", FALSE);
+ childSetVisible("badge_layout", true);
+ childSetVisible("partner_spacer_layout", false);
}
else if (customer_lower == "lifetime")
{
getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Lifetime");
getChild<LLUICtrl>("badge_text")->setValue(getString("BadgeLifetime"));
- childSetVisible("badge_layout", TRUE);
- childSetVisible("partner_spacer_layout", FALSE);
+ childSetVisible("badge_layout", true);
+ childSetVisible("partner_spacer_layout", false);
}
else if (customer_lower == "secondlifetime_premium")
{
getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Premium_Lifetime");
getChild<LLUICtrl>("badge_text")->setValue(getString("BadgePremiumLifetime"));
- childSetVisible("badge_layout", TRUE);
- childSetVisible("partner_spacer_layout", FALSE);
+ childSetVisible("badge_layout", true);
+ childSetVisible("partner_spacer_layout", false);
}
else if (customer_lower == "secondlifetime_premium_plus")
{
getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Pplus_Lifetime");
getChild<LLUICtrl>("badge_text")->setValue(getString("BadgePremiumPlusLifetime"));
- childSetVisible("badge_layout", TRUE);
- childSetVisible("partner_spacer_layout", FALSE);
+ childSetVisible("badge_layout", true);
+ childSetVisible("partner_spacer_layout", false);
}
else
{
- childSetVisible("badge_layout", FALSE);
- childSetVisible("partner_spacer_layout", TRUE);
+ childSetVisible("badge_layout", false);
+ childSetVisible("partner_spacer_layout", true);
}
}
@@ -1393,7 +1439,7 @@ void LLPanelProfileSecondLife::fillAgeData(const LLDate &born_on)
getChild<LLUICtrl>("user_age")->setValue(register_date);
}
-void LLPanelProfileSecondLife::onImageLoaded(BOOL success, LLViewerFetchedTexture *imagep)
+void LLPanelProfileSecondLife::onImageLoaded(bool success, LLViewerFetchedTexture *imagep)
{
LLRect imageRect = mSecondLifePicLayout->getRect();
if (!success || imagep->getFullWidth() == imagep->getFullHeight())
@@ -1408,12 +1454,12 @@ void LLPanelProfileSecondLife::onImageLoaded(BOOL success, LLViewerFetchedTextur
}
//static
-void LLPanelProfileSecondLife::onImageLoaded(BOOL success,
+void LLPanelProfileSecondLife::onImageLoaded(bool success,
LLViewerFetchedTexture *src_vi,
LLImageRaw* src,
LLImageRaw* aux_src,
S32 discard_level,
- BOOL final,
+ bool final,
void* userdata)
{
if (!userdata) return;
@@ -1453,7 +1499,7 @@ void LLPanelProfileSecondLife::onChange(EStatusType status, const std::string &c
return;
}
- mVoiceStatus = LLAvatarActions::canCall() && (LLAvatarActions::isFriend(getAvatarId()) ? LLAvatarTracker::instance().isBuddyOnline(getAvatarId()) : TRUE);
+ mVoiceStatus = LLAvatarActions::canCall() && (LLAvatarActions::isFriend(getAvatarId()) ? LLAvatarTracker::instance().isBuddyOnline(getAvatarId()) : true);
}
void LLPanelProfileSecondLife::setAvatarId(const LLUUID& avatar_id)
@@ -1506,8 +1552,8 @@ void LLPanelProfileSecondLife::setLoaded()
if (getSelfProfile())
{
- mShowInSearchCombo->setEnabled(TRUE);
- mDescriptionEdit->setEnabled(TRUE);
+ mShowInSearchCombo->setEnabled(true);
+ mDescriptionEdit->setEnabled(true);
}
}
@@ -1817,8 +1863,8 @@ void LLPanelProfileSecondLife::onAvatarNameCacheSetName(const LLUUID& agent_id,
void LLPanelProfileSecondLife::setDescriptionText(const std::string &text)
{
- mSaveDescriptionChanges->setEnabled(FALSE);
- mDiscardDescriptionChanges->setEnabled(FALSE);
+ mSaveDescriptionChanges->setEnabled(false);
+ mDiscardDescriptionChanges->setEnabled(false);
mHasUnsavedDescriptionChanges = false;
mDescriptionText = text;
@@ -1827,8 +1873,8 @@ void LLPanelProfileSecondLife::setDescriptionText(const std::string &text)
void LLPanelProfileSecondLife::onSetDescriptionDirty()
{
- mSaveDescriptionChanges->setEnabled(TRUE);
- mDiscardDescriptionChanges->setEnabled(TRUE);
+ mSaveDescriptionChanges->setEnabled(true);
+ mDiscardDescriptionChanges->setEnabled(true);
mHasUnsavedDescriptionChanges = true;
}
@@ -1868,8 +1914,8 @@ void LLPanelProfileSecondLife::onSaveDescriptionChanges()
LL_WARNS("AvatarProperties") << "Failed to update profile data, no cap found" << LL_ENDL;
}
- mSaveDescriptionChanges->setEnabled(FALSE);
- mDiscardDescriptionChanges->setEnabled(FALSE);
+ mSaveDescriptionChanges->setEnabled(false);
+ mDiscardDescriptionChanges->setEnabled(false);
mHasUnsavedDescriptionChanges = false;
}
@@ -1889,15 +1935,15 @@ void LLPanelProfileSecondLife::onShowAgentPermissionsDialog()
LLFloaterProfilePermissions * perms = new LLFloaterProfilePermissions(parent_floater, getAvatarId());
mFloaterPermissionsHandle = perms->getHandle();
perms->openFloater();
- perms->setVisibleAndFrontmost(TRUE);
+ perms->setVisibleAndFrontmost(true);
parent_floater->addDependentFloater(mFloaterPermissionsHandle);
}
}
else // already open
{
- floater->setMinimized(FALSE);
- floater->setVisibleAndFrontmost(TRUE);
+ floater->setMinimized(false);
+ floater->setVisibleAndFrontmost(true);
}
}
@@ -1925,7 +1971,7 @@ void LLPanelProfileSecondLife::onShowAgentProfileTexture()
texture_view->resetAsset();
}
texture_view->openFloater();
- texture_view->setVisibleAndFrontmost(TRUE);
+ texture_view->setVisibleAndFrontmost(true);
parent_floater->addDependentFloater(mFloaterProfileTextureHandle);
}
@@ -1933,8 +1979,8 @@ void LLPanelProfileSecondLife::onShowAgentProfileTexture()
else // already open
{
LLFloaterProfileTexture * texture_view = dynamic_cast<LLFloaterProfileTexture*>(floater);
- texture_view->setMinimized(FALSE);
- texture_view->setVisibleAndFrontmost(TRUE);
+ texture_view->setMinimized(false);
+ texture_view->setVisibleAndFrontmost(true);
if (mImageId.notNull())
{
texture_view->loadAsset(mImageId);
@@ -1963,12 +2009,12 @@ void LLPanelProfileSecondLife::onShowTexturePicker()
mImageId,
LLUUID::null,
mImageId,
- FALSE,
- FALSE,
+ false,
+ false,
"SELECT PHOTO",
PERM_NONE,
PERM_NONE,
- FALSE,
+ false,
NULL,
PICK_TEXTURE);
@@ -1981,20 +2027,20 @@ void LLPanelProfileSecondLife::onShowTexturePicker()
onCommitProfileImage(asset_id);
}
});
- texture_floaterp->setLocalTextureEnabled(FALSE);
- texture_floaterp->setBakeTextureEnabled(FALSE);
+ texture_floaterp->setLocalTextureEnabled(false);
+ texture_floaterp->setBakeTextureEnabled(false);
texture_floaterp->setCanApply(false, true, false);
parent_floater->addDependentFloater(mFloaterTexturePickerHandle);
texture_floaterp->openFloater();
- texture_floaterp->setFocus(TRUE);
+ texture_floaterp->setFocus(true);
}
}
else
{
- floaterp->setMinimized(FALSE);
- floaterp->setVisibleAndFrontmost(TRUE);
+ floaterp->setMinimized(false);
+ floaterp->setVisibleAndFrontmost(true);
}
}
@@ -2079,13 +2125,13 @@ void LLPanelProfileWeb::onOpen(const LLSD& key)
mAvatarNameCacheConnection = LLAvatarNameCache::get(getAvatarId(), boost::bind(&LLPanelProfileWeb::onAvatarNameCache, this, _1, _2));
}
-BOOL LLPanelProfileWeb::postBuild()
+bool LLPanelProfileWeb::postBuild()
{
mWebBrowser = getChild<LLMediaCtrl>("profile_html");
mWebBrowser->addObserver(this);
mWebBrowser->setHomePageUrl("about:blank");
- return TRUE;
+ return true;
}
void LLPanelProfileWeb::resetData()
@@ -2100,7 +2146,7 @@ void LLPanelProfileWeb::updateData()
{
setIsLoading();
- mWebBrowser->setVisible(TRUE);
+ mWebBrowser->setVisible(true);
mPerformanceTimer.start();
mWebBrowser->navigateTo(mURLWebProfile, HTTP_CONTENT_TEXT_HTML);
}
@@ -2137,7 +2183,7 @@ void LLPanelProfileWeb::onCommitLoad(LLUICtrl* ctrl)
LLSD::String valstr = ctrl->getValue().asString();
if (valstr.empty())
{
- mWebBrowser->setVisible(TRUE);
+ mWebBrowser->setVisible(true);
mPerformanceTimer.start();
mWebBrowser->navigateTo( mURLHome, HTTP_CONTENT_TEXT_HTML );
}
@@ -2204,7 +2250,7 @@ LLPanelProfileFirstLife::~LLPanelProfileFirstLife()
{
}
-BOOL LLPanelProfileFirstLife::postBuild()
+bool LLPanelProfileFirstLife::postBuild()
{
mDescriptionEdit = getChild<LLTextEditor>("fl_description_edit");
mPicture = getChild<LLThumbnailCtrl>("real_world_pic");
@@ -2222,7 +2268,7 @@ BOOL LLPanelProfileFirstLife::postBuild()
mDiscardChanges->setCommitCallback([this](LLUICtrl*, void*) { onDiscardDescriptionChanges(); }, nullptr);
mDescriptionEdit->setKeystrokeCallback([this](LLTextEditor* caller) { onSetDescriptionDirty(); });
- return TRUE;
+ return true;
}
void LLPanelProfileFirstLife::onOpen(const LLSD& key)
@@ -2232,7 +2278,7 @@ void LLPanelProfileFirstLife::onOpen(const LLSD& key)
if (!getSelfProfile())
{
// Otherwise as the only focusable element it will be selected
- mDescriptionEdit->setTabStop(FALSE);
+ mDescriptionEdit->setTabStop(false);
}
resetData();
@@ -2299,12 +2345,12 @@ void LLPanelProfileFirstLife::onChangePhoto()
mImageId,
LLUUID::null,
mImageId,
- FALSE,
- FALSE,
+ false,
+ false,
"SELECT PHOTO",
PERM_NONE,
PERM_NONE,
- FALSE,
+ false,
NULL,
PICK_TEXTURE);
@@ -2317,19 +2363,19 @@ void LLPanelProfileFirstLife::onChangePhoto()
onCommitPhoto(asset_id);
}
});
- texture_floaterp->setLocalTextureEnabled(FALSE);
+ texture_floaterp->setLocalTextureEnabled(false);
texture_floaterp->setCanApply(false, true, false);
parent_floater->addDependentFloater(mFloaterTexturePickerHandle);
texture_floaterp->openFloater();
- texture_floaterp->setFocus(TRUE);
+ texture_floaterp->setFocus(true);
}
}
else
{
- floaterp->setMinimized(FALSE);
- floaterp->setVisibleAndFrontmost(TRUE);
+ floaterp->setMinimized(false);
+ floaterp->setVisibleAndFrontmost(true);
}
}
@@ -2379,8 +2425,8 @@ void LLPanelProfileFirstLife::onCommitPhoto(const LLUUID& id)
void LLPanelProfileFirstLife::setDescriptionText(const std::string &text)
{
- mSaveChanges->setEnabled(FALSE);
- mDiscardChanges->setEnabled(FALSE);
+ mSaveChanges->setEnabled(false);
+ mDiscardChanges->setEnabled(false);
mHasUnsavedChanges = false;
mCurrentDescription = text;
@@ -2389,8 +2435,8 @@ void LLPanelProfileFirstLife::setDescriptionText(const std::string &text)
void LLPanelProfileFirstLife::onSetDescriptionDirty()
{
- mSaveChanges->setEnabled(TRUE);
- mDiscardChanges->setEnabled(TRUE);
+ mSaveChanges->setEnabled(true);
+ mDiscardChanges->setEnabled(true);
mHasUnsavedChanges = true;
}
@@ -2408,8 +2454,8 @@ void LLPanelProfileFirstLife::onSaveDescriptionChanges()
LL_WARNS("AvatarProperties") << "Failed to update profile data, no cap found" << LL_ENDL;
}
- mSaveChanges->setEnabled(FALSE);
- mDiscardChanges->setEnabled(FALSE);
+ mSaveChanges->setEnabled(false);
+ mDiscardChanges->setEnabled(false);
mHasUnsavedChanges = false;
}
@@ -2455,8 +2501,8 @@ void LLPanelProfileFirstLife::setLoaded()
if (getSelfProfile())
{
- mDescriptionEdit->setEnabled(TRUE);
- mPicture->setEnabled(TRUE);
+ mDescriptionEdit->setEnabled(true);
+ mPicture->setEnabled(true);
mRemovePhoto->setEnabled(mImageId.notNull());
}
}
@@ -2500,7 +2546,7 @@ void LLPanelProfileNotes::commitUnsavedChanges()
}
}
-BOOL LLPanelProfileNotes::postBuild()
+bool LLPanelProfileNotes::postBuild()
{
mNotesEditor = getChild<LLTextEditor>("notes_edit");
mSaveChanges = getChild<LLButton>("notes_save_changes");
@@ -2510,7 +2556,7 @@ BOOL LLPanelProfileNotes::postBuild()
mDiscardChanges->setCommitCallback([this](LLUICtrl*, void*) { onDiscardNotesChanges(); }, nullptr);
mNotesEditor->setKeystrokeCallback([this](LLTextEditor* caller) { onSetNotesDirty(); });
- return TRUE;
+ return true;
}
void LLPanelProfileNotes::onOpen(const LLSD& key)
@@ -2522,8 +2568,8 @@ void LLPanelProfileNotes::onOpen(const LLSD& key)
void LLPanelProfileNotes::setNotesText(const std::string &text)
{
- mSaveChanges->setEnabled(FALSE);
- mDiscardChanges->setEnabled(FALSE);
+ mSaveChanges->setEnabled(false);
+ mDiscardChanges->setEnabled(false);
mHasUnsavedChanges = false;
mCurrentNotes = text;
@@ -2532,8 +2578,8 @@ void LLPanelProfileNotes::setNotesText(const std::string &text)
void LLPanelProfileNotes::onSetNotesDirty()
{
- mSaveChanges->setEnabled(TRUE);
- mDiscardChanges->setEnabled(TRUE);
+ mSaveChanges->setEnabled(true);
+ mDiscardChanges->setEnabled(true);
mHasUnsavedChanges = true;
}
@@ -2551,8 +2597,8 @@ void LLPanelProfileNotes::onSaveNotesChanges()
LL_WARNS("AvatarProperties") << "Failed to update profile data, no cap found" << LL_ENDL;
}
- mSaveChanges->setEnabled(FALSE);
- mDiscardChanges->setEnabled(FALSE);
+ mSaveChanges->setEnabled(false);
+ mDiscardChanges->setEnabled(false);
mHasUnsavedChanges = false;
}
@@ -2564,7 +2610,7 @@ void LLPanelProfileNotes::onDiscardNotesChanges()
void LLPanelProfileNotes::processProperties(LLAvatarNotes* avatar_notes)
{
setNotesText(avatar_notes->notes);
- mNotesEditor->setEnabled(TRUE);
+ mNotesEditor->setEnabled(true);
setLoaded();
}
@@ -2595,9 +2641,9 @@ LLPanelProfile::~LLPanelProfile()
{
}
-BOOL LLPanelProfile::postBuild()
+bool LLPanelProfile::postBuild()
{
- return TRUE;
+ return true;
}
void LLPanelProfile::onTabChange()
diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h
index 11632a10ae..b7a3840bca 100644
--- a/indra/newview/llpanelprofile.h
+++ b/indra/newview/llpanelprofile.h
@@ -78,6 +78,12 @@ public:
void onOpen(const LLSD& key) override;
+ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg) override;
+
/**
* LLFriendObserver trigger
*/
@@ -89,7 +95,7 @@ public:
void setAvatarId(const LLUUID& avatar_id) override;
- BOOL postBuild() override;
+ bool postBuild() override;
void resetData() override;
@@ -145,13 +151,13 @@ protected:
*/
void fillAgeData(const LLDate &born_on);
- void onImageLoaded(BOOL success, LLViewerFetchedTexture *imagep);
- static void onImageLoaded(BOOL success,
+ void onImageLoaded(bool success, LLViewerFetchedTexture *imagep);
+ static void onImageLoaded(bool success,
LLViewerFetchedTexture *src_vi,
LLImageRaw* src,
LLImageRaw* aux_src,
S32 discard_level,
- BOOL final,
+ bool final,
void* userdata);
/**
@@ -234,7 +240,7 @@ public:
void onOpen(const LLSD& key) override;
- BOOL postBuild() override;
+ bool postBuild() override;
void resetData() override;
@@ -275,7 +281,7 @@ public:
void onOpen(const LLSD& key) override;
- BOOL postBuild() override;
+ bool postBuild() override;
void processProperties(const LLAvatarData* avatar_data);
@@ -330,7 +336,7 @@ public:
void onOpen(const LLSD& key) override;
- BOOL postBuild() override;
+ bool postBuild() override;
void processProperties(LLAvatarNotes* avatar_notes);
@@ -366,7 +372,7 @@ public:
LLPanelProfile();
/*virtual*/ ~LLPanelProfile();
- BOOL postBuild() override;
+ bool postBuild() override;
void updateData() override;
void refreshName();
diff --git a/indra/newview/llpanelprofileclassifieds.cpp b/indra/newview/llpanelprofileclassifieds.cpp
index 307935f45f..b39e4fddf1 100644
--- a/indra/newview/llpanelprofileclassifieds.cpp
+++ b/indra/newview/llpanelprofileclassifieds.cpp
@@ -135,7 +135,7 @@ public:
// get the ID for the classified
LLUUID classified_id;
- if (!classified_id.set(params[0], FALSE))
+ if (!classified_id.set(params[0], false))
{
return false;
}
@@ -241,11 +241,11 @@ void LLPanelProfileClassifieds::onOpen(const LLSD& key)
bool own_profile = getSelfProfile();
if (own_profile)
{
- mNewButton->setVisible(TRUE);
- mNewButton->setEnabled(FALSE);
+ mNewButton->setVisible(true);
+ mNewButton->setEnabled(false);
- mDeleteButton->setVisible(TRUE);
- mDeleteButton->setEnabled(FALSE);
+ mDeleteButton->setVisible(true);
+ mDeleteButton->setEnabled(false);
}
childSetVisible("buttons_header", own_profile);
@@ -266,7 +266,7 @@ void LLPanelProfileClassifieds::selectClassified(const LLUUID& classified_id, bo
mTabContainer->selectTabPanel(classified_panel);
if (edit)
{
- classified_panel->setEditMode(TRUE);
+ classified_panel->setEditMode(true);
}
break;
}
@@ -284,7 +284,7 @@ void LLPanelProfileClassifieds::createClassified()
{
if (getIsLoaded())
{
- mNoItemsLabel->setVisible(FALSE);
+ mNoItemsLabel->setVisible(false);
LLPanelProfileClassified* classified_panel = LLPanelProfileClassified::create();
classified_panel->onOpen(LLSD());
mTabContainer->addTabPanel(
@@ -300,7 +300,7 @@ void LLPanelProfileClassifieds::createClassified()
}
}
-BOOL LLPanelProfileClassifieds::postBuild()
+bool LLPanelProfileClassifieds::postBuild()
{
mTabContainer = getChild<LLTabContainer>("tab_classifieds");
mNoItemsLabel = getChild<LLUICtrl>("classifieds_panel_text");
@@ -310,12 +310,12 @@ BOOL LLPanelProfileClassifieds::postBuild()
mNewButton->setCommitCallback(boost::bind(&LLPanelProfileClassifieds::onClickNewBtn, this));
mDeleteButton->setCommitCallback(boost::bind(&LLPanelProfileClassifieds::onClickDelete, this));
- return TRUE;
+ return true;
}
void LLPanelProfileClassifieds::onClickNewBtn()
{
- mNoItemsLabel->setVisible(FALSE);
+ mNoItemsLabel->setVisible(false);
LLPanelProfileClassified* classified_panel = LLPanelProfileClassified::create();
classified_panel->onOpen(LLSD());
mTabContainer->addTabPanel(
@@ -364,7 +364,7 @@ void LLPanelProfileClassifieds::callbackDeleteClassified(const LLSD& notificatio
updateButtons();
- BOOL no_data = !mTabContainer->getTabCount();
+ bool no_data = !mTabContainer->getTabCount();
mNoItemsLabel->setVisible(no_data);
}
}
@@ -474,7 +474,7 @@ void LLPanelProfileClassifieds::updateData()
{
setIsLoading();
mNoItemsLabel->setValue(LLTrans::getString("PicksClassifiedsLoadingText"));
- mNoItemsLabel->setVisible(TRUE);
+ mNoItemsLabel->setVisible(true);
LLAvatarPropertiesProcessor::getInstance()->sendAvatarClassifiedsRequest(avatar_id);
}
@@ -605,7 +605,7 @@ LLPanelProfileClassified* LLPanelProfileClassified::create()
return panel;
}
-BOOL LLPanelProfileClassified::postBuild()
+bool LLPanelProfileClassified::postBuild()
{
mScrollContainer = getChild<LLScrollContainer>("profile_scroll");
mInfoPanel = getChild<LLView>("info_panel");
@@ -650,8 +650,8 @@ BOOL LLPanelProfileClassified::postBuild()
mSnapshotCtrl->setOnSelectCallback(boost::bind(&LLPanelProfileClassified::onTextureSelected, this));
mSnapshotCtrl->setMouseEnterCallback(boost::bind(&LLPanelProfileClassified::onTexturePickerMouseEnter, this));
mSnapshotCtrl->setMouseLeaveCallback(boost::bind(&LLPanelProfileClassified::onTexturePickerMouseLeave, this));
- mSnapshotCtrl->setAllowLocalTexture(FALSE);
- mSnapshotCtrl->setBakeTextureEnabled(FALSE);
+ mSnapshotCtrl->setAllowLocalTexture(false);
+ mSnapshotCtrl->setBakeTextureEnabled(false);
mEditIcon->setVisible(false);
mMapButton->setCommitCallback(boost::bind(&LLPanelProfileClassified::onMapClick, this));
@@ -675,7 +675,7 @@ BOOL LLPanelProfileClassified::postBuild()
mContentTypeCombo->setCommitCallback(boost::bind(&LLPanelProfileClassified::onChange, this));
mAutoRenewEdit->setCommitCallback(boost::bind(&LLPanelProfileClassified::onChange, this));
- return TRUE;
+ return true;
}
void LLPanelProfileClassified::onOpen(const LLSD& key)
@@ -720,7 +720,7 @@ void LLPanelProfileClassified::onOpen(const LLSD& key)
mSaveButton->setLabelArg("[LABEL]", getString("publish_label"));
- setEditMode(TRUE);
+ setEditMode(true);
enableSave(true);
enableEditing(true);
resetDirty();
@@ -793,7 +793,7 @@ void LLPanelProfileClassified::processProperties(void* data, EAvatarProcessorTyp
if (mIsNewWithErrors)
{
// We just published it
- setEditMode(FALSE);
+ setEditMode(false);
}
mIsNewWithErrors = false;
mIsNew = false;
@@ -841,13 +841,13 @@ void LLPanelProfileClassified::processProperties(void* data, EAvatarProcessorTyp
if (mEditOnLoad)
{
- setEditMode(TRUE);
+ setEditMode(true);
}
}
}
-void LLPanelProfileClassified::setEditMode(BOOL edit_mode)
+void LLPanelProfileClassified::setEditMode(bool edit_mode)
{
mEditMode = edit_mode;
@@ -883,7 +883,7 @@ void LLPanelProfileClassified::updateInfoRect()
// info_scroll_content_panel contains both info and edit panel
// info panel can be very large and scroll bar will carry over.
// Resize info panel to prevent scroll carry over when in edit mode.
- mInfoScroll->reshape(mInfoScroll->getRect().getWidth(), DEFAULT_EDIT_CLASSIFIED_SCROLL_HEIGHT, FALSE);
+ mInfoScroll->reshape(mInfoScroll->getRect().getWidth(), DEFAULT_EDIT_CLASSIFIED_SCROLL_HEIGHT, false);
}
else
{
@@ -893,7 +893,7 @@ void LLPanelProfileClassified::updateInfoRect()
S32 delta_height = new_height - visible_rect.getHeight() + 5;
LLRect rect = mInfoScroll->getRect();
- mInfoScroll->reshape(rect.getWidth(), rect.getHeight() + delta_height, FALSE);
+ mInfoScroll->reshape(rect.getWidth(), rect.getHeight() + delta_height, false);
}
}
@@ -920,7 +920,7 @@ void LLPanelProfileClassified::resetControls()
void LLPanelProfileClassified::onEditClick()
{
- setEditMode(TRUE);
+ setEditMode(true);
}
void LLPanelProfileClassified::onCancelClick()
@@ -945,7 +945,7 @@ void LLPanelProfileClassified::onCancelClick()
setInfoLoaded(false);
- setEditMode(FALSE);
+ setEditMode(false);
}
void LLPanelProfileClassified::onSaveClick()
@@ -1032,8 +1032,8 @@ void LLPanelProfileClassified::resetData()
getChild<LLUICtrl>("click_through_text")->setValue(LLStringUtil::null);
mEditButton->setValue(LLStringUtil::null);
getChild<LLUICtrl>("creation_date")->setValue(LLStringUtil::null);
- mContentTypeM->setVisible(FALSE);
- mContentTypeG->setVisible(FALSE);
+ mContentTypeM->setVisible(false);
+ mContentTypeG->setVisible(false);
}
void LLPanelProfileClassified::setClassifiedName(const std::string& name)
@@ -1242,14 +1242,14 @@ void LLPanelProfileClassified::onTeleportClick()
}
}
-BOOL LLPanelProfileClassified::isDirty() const
+bool LLPanelProfileClassified::isDirty() const
{
if(mIsNew)
{
- return TRUE;
+ return true;
}
- BOOL dirty = false;
+ bool dirty = false;
dirty |= mSnapshotCtrl->isDirty();
dirty |= mClassifiedNameEdit->isDirty();
dirty |= mClassifiedDescEdit->isDirty();
@@ -1429,7 +1429,7 @@ void LLPanelProfileClassified::doSave()
if (!isNew() && !isNewWithErrors())
{
- setEditMode(FALSE);
+ setEditMode(false);
return;
}
@@ -1487,12 +1487,12 @@ void LLPanelProfileClassified::notifyInvalidName()
void LLPanelProfileClassified::onTexturePickerMouseEnter()
{
- mEditIcon->setVisible(TRUE);
+ mEditIcon->setVisible(true);
}
void LLPanelProfileClassified::onTexturePickerMouseLeave()
{
- mEditIcon->setVisible(FALSE);
+ mEditIcon->setVisible(false);
}
void LLPanelProfileClassified::onTextureSelected()
@@ -1525,14 +1525,14 @@ LLPublishClassifiedFloater::~LLPublishClassifiedFloater()
{
}
-BOOL LLPublishClassifiedFloater::postBuild()
+bool LLPublishClassifiedFloater::postBuild()
{
LLFloater::postBuild();
childSetAction("publish_btn", boost::bind(&LLFloater::closeFloater, this, false));
childSetAction("cancel_btn", boost::bind(&LLFloater::closeFloater, this, false));
- return TRUE;
+ return true;
}
void LLPublishClassifiedFloater::setPrice(S32 price)
diff --git a/indra/newview/llpanelprofileclassifieds.h b/indra/newview/llpanelprofileclassifieds.h
index d1aa5f55e3..9f0b27139a 100644
--- a/indra/newview/llpanelprofileclassifieds.h
+++ b/indra/newview/llpanelprofileclassifieds.h
@@ -54,7 +54,7 @@ public:
LLPublishClassifiedFloater(const LLSD& key);
virtual ~LLPublishClassifiedFloater();
- BOOL postBuild() override;
+ bool postBuild() override;
void setPrice(S32 price);
S32 getPrice();
@@ -74,7 +74,7 @@ public:
LLPanelProfileClassifieds();
/*virtual*/ ~LLPanelProfileClassifieds();
- BOOL postBuild() override;
+ bool postBuild() override;
void onOpen(const LLSD& key) override;
@@ -125,7 +125,7 @@ public:
/*virtual*/ ~LLPanelProfileClassified();
- BOOL postBuild() override;
+ bool postBuild() override;
void onOpen(const LLSD& key) override;
@@ -171,7 +171,7 @@ public:
void setInfoLoaded(bool loaded) { mInfoLoaded = loaded; }
- BOOL isDirty() const override;
+ bool isDirty() const override;
void resetDirty() override;
@@ -193,7 +193,7 @@ public:
S32 getPriceForListing() { return mPriceForListing; }
- void setEditMode(BOOL edit_mode);
+ void setEditMode(bool edit_mode);
bool getEditMode() {return mEditMode;}
static void setClickThrough(
diff --git a/indra/newview/llpanelprofilepicks.cpp b/indra/newview/llpanelprofilepicks.cpp
index 8bbd4a748d..7a0b4ff1ce 100644
--- a/indra/newview/llpanelprofilepicks.cpp
+++ b/indra/newview/llpanelprofilepicks.cpp
@@ -119,7 +119,7 @@ public:
// get the ID for the pick_id
LLUUID pick_id;
- if (!pick_id.set(params[0], FALSE))
+ if (!pick_id.set(params[0], false))
{
return false;
}
@@ -165,11 +165,11 @@ void LLPanelProfilePicks::onOpen(const LLSD& key)
bool own_profile = getSelfProfile();
if (own_profile)
{
- mNewButton->setVisible(TRUE);
- mNewButton->setEnabled(FALSE);
+ mNewButton->setVisible(true);
+ mNewButton->setEnabled(false);
- mDeleteButton->setVisible(TRUE);
- mDeleteButton->setEnabled(FALSE);
+ mDeleteButton->setVisible(true);
+ mDeleteButton->setEnabled(false);
}
childSetVisible("buttons_header", own_profile);
@@ -181,7 +181,7 @@ void LLPanelProfilePicks::createPick(const LLPickData &data)
{
if (canAddNewPick())
{
- mNoItemsLabel->setVisible(FALSE);
+ mNoItemsLabel->setVisible(false);
LLPanelProfilePick* pick_panel = LLPanelProfilePick::create();
pick_panel->setAvatarId(getAvatarId());
pick_panel->processProperties(&data);
@@ -228,7 +228,7 @@ void LLPanelProfilePicks::selectPick(const LLUUID& pick_id)
}
}
-BOOL LLPanelProfilePicks::postBuild()
+bool LLPanelProfilePicks::postBuild()
{
mTabContainer = getChild<LLTabContainer>("tab_picks");
mNoItemsLabel = getChild<LLUICtrl>("picks_panel_text");
@@ -238,12 +238,12 @@ BOOL LLPanelProfilePicks::postBuild()
mNewButton->setCommitCallback(boost::bind(&LLPanelProfilePicks::onClickNewBtn, this));
mDeleteButton->setCommitCallback(boost::bind(&LLPanelProfilePicks::onClickDelete, this));
- return TRUE;
+ return true;
}
void LLPanelProfilePicks::onClickNewBtn()
{
- mNoItemsLabel->setVisible(FALSE);
+ mNoItemsLabel->setVisible(false);
LLPanelProfilePick* pick_panel = LLPanelProfilePick::create();
pick_panel->setAvatarId(getAvatarId());
mTabContainer->addTabPanel(
@@ -433,7 +433,7 @@ void LLPanelProfilePicks::updateData()
if (!getIsLoaded())
{
mNoItemsLabel->setValue(LLTrans::getString("PicksClassifiedsLoadingText"));
- mNoItemsLabel->setVisible(TRUE);
+ mNoItemsLabel->setVisible(true);
}
}
@@ -558,29 +558,29 @@ void LLPanelProfilePick::setAvatarId(const LLUUID& avatar_id)
setSnapshotId(snapshot_id);
setPickLocation(createLocationText(getLocationNotice(), pick_name, region_name, getPosGlobal()));
- enableSaveButton(TRUE);
+ enableSaveButton(true);
}
else
{
LLAvatarPropertiesProcessor::getInstance()->sendPickInfoRequest(getAvatarId(), getPickId());
- enableSaveButton(FALSE);
+ enableSaveButton(false);
}
resetDirty();
if (getSelfProfile())
{
- mPickName->setEnabled(TRUE);
- mPickDescription->setEnabled(TRUE);
+ mPickName->setEnabled(true);
+ mPickDescription->setEnabled(true);
}
else
{
- mSnapshotCtrl->setEnabled(FALSE);
+ mSnapshotCtrl->setEnabled(false);
}
}
-BOOL LLPanelProfilePick::postBuild()
+bool LLPanelProfilePick::postBuild()
{
mPickName = getChild<LLLineEditor>("pick_name");
mPickDescription = getChild<LLTextEditor>("pick_desc");
@@ -590,8 +590,8 @@ BOOL LLPanelProfilePick::postBuild()
mSnapshotCtrl = getChild<LLTextureCtrl>("pick_snapshot");
mSnapshotCtrl->setCommitCallback(boost::bind(&LLPanelProfilePick::onSnapshotChanged, this));
- mSnapshotCtrl->setAllowLocalTexture(FALSE);
- mSnapshotCtrl->setBakeTextureEnabled(FALSE);
+ mSnapshotCtrl->setAllowLocalTexture(false);
+ mSnapshotCtrl->setBakeTextureEnabled(false);
childSetAction("teleport_btn", boost::bind(&LLPanelProfilePick::onClickTeleport, this));
childSetAction("show_on_map_btn", boost::bind(&LLPanelProfilePick::onClickMap, this));
@@ -601,14 +601,14 @@ BOOL LLPanelProfilePick::postBuild()
mCancelButton->setCommitCallback(boost::bind(&LLPanelProfilePick::onClickCancel, this));
mPickName->setKeystrokeCallback(boost::bind(&LLPanelProfilePick::onPickChanged, this, _1), NULL);
- mPickName->setEnabled(FALSE);
+ mPickName->setEnabled(false);
mPickDescription->setKeystrokeCallback(boost::bind(&LLPanelProfilePick::onPickChanged, this, _1));
mPickDescription->setFocusReceivedCallback(boost::bind(&LLPanelProfilePick::onDescriptionFocusReceived, this));
- getChild<LLUICtrl>("pick_location")->setEnabled(FALSE);
+ getChild<LLUICtrl>("pick_location")->setEnabled(false);
- return TRUE;
+ return true;
}
void LLPanelProfilePick::onDescriptionFocusReceived()
@@ -646,7 +646,7 @@ void LLPanelProfilePick::processProperties(const LLPickData* pick_info)
setSnapshotId(pick_info->snapshot_id);
if (!getSelfProfile())
{
- mSnapshotCtrl->setEnabled(FALSE);
+ mSnapshotCtrl->setEnabled(false);
}
setPickName(pick_info->name);
setPickDesc(pick_info->desc);
@@ -674,7 +674,7 @@ void LLPanelProfilePick::apply()
void LLPanelProfilePick::setSnapshotId(const LLUUID& id)
{
mSnapshotCtrl->setImageAssetID(id);
- mSnapshotCtrl->setValid(TRUE);
+ mSnapshotCtrl->setValid(true);
}
void LLPanelProfilePick::setPickName(const std::string& name)
@@ -713,7 +713,7 @@ void LLPanelProfilePick::onClickTeleport()
}
}
-void LLPanelProfilePick::enableSaveButton(BOOL enable)
+void LLPanelProfilePick::enableSaveButton(bool enable)
{
childSetVisible("save_changes_lp", enable);
@@ -724,7 +724,7 @@ void LLPanelProfilePick::enableSaveButton(BOOL enable)
void LLPanelProfilePick::onSnapshotChanged()
{
- enableSaveButton(TRUE);
+ enableSaveButton(true);
}
void LLPanelProfilePick::onPickChanged(LLUICtrl* ctrl)
@@ -747,7 +747,7 @@ void LLPanelProfilePick::resetDirty()
mLocationChanged = false;
}
-BOOL LLPanelProfilePick::isDirty() const
+bool LLPanelProfilePick::isDirty() const
{
if (mNewPick
|| LLPanel::isDirty()
@@ -756,9 +756,9 @@ BOOL LLPanelProfilePick::isDirty() const
|| mPickName->isDirty()
|| mPickDescription->isDirty())
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void LLPanelProfilePick::onClickSave()
@@ -781,7 +781,7 @@ void LLPanelProfilePick::onClickCancel()
updateTabLabel(mPickNameStr);
LLAvatarPropertiesProcessor::getInstance()->sendPickInfoRequest(getAvatarId(), getPickId());
mLocationChanged = false;
- enableSaveButton(FALSE);
+ enableSaveButton(false);
}
std::string LLPanelProfilePick::getLocationNotice()
@@ -835,14 +835,14 @@ void LLPanelProfilePick::sendUpdate()
pick_data.creator_id = gAgentID;;
//legacy var need to be deleted
- pick_data.top_pick = FALSE;
+ pick_data.top_pick = false;
pick_data.parcel_id = mParcelId;
pick_data.name = getPickName();
pick_data.desc = mPickDescription->getValue().asString();
pick_data.snapshot_id = mSnapshotCtrl->getImageAssetID();
pick_data.pos_global = getPosGlobal();
pick_data.sort_order = 0;
- pick_data.enabled = TRUE;
+ pick_data.enabled = true;
LLAvatarPropertiesProcessor::getInstance()->sendPickInfoUpdate(&pick_data);
diff --git a/indra/newview/llpanelprofilepicks.h b/indra/newview/llpanelprofilepicks.h
index 76b1452431..3608d113ed 100644
--- a/indra/newview/llpanelprofilepicks.h
+++ b/indra/newview/llpanelprofilepicks.h
@@ -50,7 +50,7 @@ public:
LLPanelProfilePicks();
/*virtual*/ ~LLPanelProfilePicks();
- BOOL postBuild() override;
+ bool postBuild() override;
void onOpen(const LLSD& key) override;
@@ -110,7 +110,7 @@ public:
/*virtual*/ ~LLPanelProfilePick();
- BOOL postBuild() override;
+ bool postBuild() override;
void setAvatarId(const LLUUID& avatar_id) override;
@@ -126,7 +126,7 @@ public:
/**
* Returns true if any of Pick properties was changed by user.
*/
- BOOL isDirty() const override;
+ bool isDirty() const override;
/**
* Saves changes.
@@ -184,7 +184,7 @@ public:
/**
* Enables/disables "Save" button
*/
- void enableSaveButton(BOOL enable);
+ void enableSaveButton(bool enable);
/**
* Called when snapshot image changes.
diff --git a/indra/newview/llpanelpulldown.cpp b/indra/newview/llpanelpulldown.cpp
index 075278f44c..f26a9dc362 100644
--- a/indra/newview/llpanelpulldown.cpp
+++ b/indra/newview/llpanelpulldown.cpp
@@ -51,35 +51,35 @@ void LLPanelPulldown::onMouseEnter(S32 x, S32 y, MASK mask)
/*virtual*/
void LLPanelPulldown::onTopLost()
{
- setFocus(FALSE); // drop focus to prevent transfer to parent
- setVisible(FALSE);
+ setFocus(false); // drop focus to prevent transfer to parent
+ setVisible(false);
}
/*virtual*/
-BOOL LLPanelPulldown::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLPanelPulldown::handleMouseDown(S32 x, S32 y, MASK mask)
{
LLPanel::handleMouseDown(x, y, mask);
- return TRUE;
+ return true;
}
/*virtual*/
-BOOL LLPanelPulldown::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLPanelPulldown::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
LLPanel::handleRightMouseDown(x, y, mask);
- return TRUE;
+ return true;
}
/*virtual*/
-BOOL LLPanelPulldown::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLPanelPulldown::handleDoubleClick(S32 x, S32 y, MASK mask)
{
LLPanel::handleDoubleClick(x, y, mask);
- return TRUE;
+ return true;
}
-BOOL LLPanelPulldown::handleScrollWheel(S32 x, S32 y, S32 clicks)
+bool LLPanelPulldown::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
LLPanel::handleScrollWheel(x, y, clicks);
- return TRUE; //If we got here, then we are in Pulldown's rect, consume the event.
+ return true; //If we got here, then we are in Pulldown's rect, consume the event.
}
/*virtual*/
@@ -90,7 +90,7 @@ void LLPanelPulldown::onMouseLeave(S32 x, S32 y, MASK mask)
}
/*virtual*/
-void LLPanelPulldown::onVisibilityChange(BOOL new_visibility)
+void LLPanelPulldown::onVisibilityChange(bool new_visibility)
{
if (new_visibility)
{
@@ -114,7 +114,7 @@ void LLPanelPulldown::draw()
if (alpha == 0.f)
{
- setFocus(FALSE); // drop focus to prevent transfer to parent
- setVisible(FALSE);
+ setFocus(false); // drop focus to prevent transfer to parent
+ setVisible(false);
}
}
diff --git a/indra/newview/llpanelpulldown.h b/indra/newview/llpanelpulldown.h
index 705e76d0ab..834bd2595c 100644
--- a/indra/newview/llpanelpulldown.h
+++ b/indra/newview/llpanelpulldown.h
@@ -37,16 +37,16 @@ class LLPanelPulldown : public LLPanel
{
public:
LLPanelPulldown();
- /*virtual*/ void onMouseEnter(S32 x, S32 y, MASK mask);
- /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
- /*virtual*/ void onTopLost();
- /*virtual*/ void onVisibilityChange(BOOL new_visibility);
-
- /*virtual*/ void draw();
+ void onMouseEnter(S32 x, S32 y, MASK mask) override;
+ void onMouseLeave(S32 x, S32 y, MASK mask) override;
+ bool handleMouseDown(S32 x, S32 y, MASK mask) override;
+ bool handleRightMouseDown(S32 x, S32 y, MASK mask) override;
+ bool handleDoubleClick(S32 x, S32 y, MASK mask) override;
+ bool handleScrollWheel(S32 x, S32 y, S32 clicks) override;
+ void onTopLost() override;
+ void onVisibilityChange(bool new_visibility) override;
+
+ void draw() override;
protected:
LLFrameTimer mHoverTimer;
diff --git a/indra/newview/llpanelsnapshot.cpp b/indra/newview/llpanelsnapshot.cpp
index c3524a8c87..a7e1f57f9d 100644
--- a/indra/newview/llpanelsnapshot.cpp
+++ b/indra/newview/llpanelsnapshot.cpp
@@ -41,7 +41,7 @@
#include "llagentbenefits.h"
-const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512
+constexpr S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512
S32 power_of_two(S32 sz, S32 upper)
{
@@ -59,7 +59,7 @@ LLPanelSnapshot::LLPanelSnapshot()
{}
// virtual
-BOOL LLPanelSnapshot::postBuild()
+bool LLPanelSnapshot::postBuild()
{
getChild<LLUICtrl>("save_btn")->setLabelArg("[UPLOAD_COST]", std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost()));
getChild<LLUICtrl>(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshot::onResolutionComboCommit, this, _1));
@@ -78,7 +78,7 @@ BOOL LLPanelSnapshot::postBuild()
updateControls(LLSD());
mSnapshotFloater = getParentByType<LLFloaterSnapshotBase>();
- return TRUE;
+ return true;
}
// virtual
@@ -104,7 +104,7 @@ LLSnapshotModel::ESnapshotFormat LLPanelSnapshot::getImageFormat() const
return LLSnapshotModel::SNAPSHOT_FORMAT_JPEG;
}
-void LLPanelSnapshot::enableControls(BOOL enable)
+void LLPanelSnapshot::enableControls(bool enable)
{
setCtrlsEnabled(enable);
}
@@ -133,7 +133,7 @@ S32 LLPanelSnapshot::getTypedPreviewHeight() const
return getChild<LLUICtrl>(getHeightSpinnerName())->getValue().asInteger();
}
-void LLPanelSnapshot::enableAspectRatioCheckbox(BOOL enable)
+void LLPanelSnapshot::enableAspectRatioCheckbox(bool enable)
{
llassert(!getAspectRatioCBName().empty());
getChild<LLUICtrl>(getAspectRatioCBName())->setEnabled(enable);
diff --git a/indra/newview/llpanelsnapshot.h b/indra/newview/llpanelsnapshot.h
index 55273797cc..593b4782c0 100644
--- a/indra/newview/llpanelsnapshot.h
+++ b/indra/newview/llpanelsnapshot.h
@@ -43,8 +43,8 @@ class LLPanelSnapshot: public LLPanel
public:
LLPanelSnapshot();
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void onOpen(const LLSD& key);
+ bool postBuild() override;
+ void onOpen(const LLSD& key) override;
virtual std::string getWidthSpinnerName() const = 0;
virtual std::string getHeightSpinnerName() const = 0;
@@ -56,11 +56,11 @@ public:
virtual S32 getTypedPreviewHeight() const;
virtual LLSpinCtrl* getWidthSpinner();
virtual LLSpinCtrl* getHeightSpinner();
- virtual void enableAspectRatioCheckbox(BOOL enable);
+ virtual void enableAspectRatioCheckbox(bool enable);
virtual LLSnapshotModel::ESnapshotFormat getImageFormat() const;
virtual LLSnapshotModel::ESnapshotType getSnapshotType();
virtual void updateControls(const LLSD& info) = 0; ///< Update controls from saved settings
- void enableControls(BOOL enable);
+ void enableControls(bool enable);
protected:
LLSideTrayPanelContainer* getParentContainer();
diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp
index 9e56a04b3b..01d046da51 100644
--- a/indra/newview/llpanelsnapshotinventory.cpp
+++ b/indra/newview/llpanelsnapshotinventory.cpp
@@ -50,7 +50,7 @@ class LLPanelSnapshotInventoryBase
public:
LLPanelSnapshotInventoryBase();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
protected:
void onSend();
/*virtual*/ LLSnapshotModel::ESnapshotType getSnapshotType();
@@ -63,7 +63,7 @@ class LLPanelSnapshotInventory
public:
LLPanelSnapshotInventory();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onOpen(const LLSD& key);
void onResolutionCommit(LLUICtrl* ctrl);
@@ -85,7 +85,7 @@ class LLPanelOutfitSnapshotInventory
public:
LLPanelOutfitSnapshotInventory();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onOpen(const LLSD& key);
private:
@@ -107,7 +107,7 @@ LLPanelSnapshotInventoryBase::LLPanelSnapshotInventoryBase()
{
}
-BOOL LLPanelSnapshotInventoryBase::postBuild()
+bool LLPanelSnapshotInventoryBase::postBuild()
{
return LLPanelSnapshot::postBuild();
}
@@ -124,10 +124,10 @@ LLPanelSnapshotInventory::LLPanelSnapshotInventory()
}
// virtual
-BOOL LLPanelSnapshotInventory::postBuild()
+bool LLPanelSnapshotInventory::postBuild()
{
- getChild<LLSpinCtrl>(getWidthSpinnerName())->setAllowEdit(FALSE);
- getChild<LLSpinCtrl>(getHeightSpinnerName())->setAllowEdit(FALSE);
+ getChild<LLSpinCtrl>(getWidthSpinnerName())->setAllowEdit(false);
+ getChild<LLSpinCtrl>(getHeightSpinnerName())->setAllowEdit(false);
getChild<LLUICtrl>(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshotInventory::onResolutionCommit, this, _1));
return LLPanelSnapshotInventoryBase::postBuild();
@@ -148,7 +148,7 @@ void LLPanelSnapshotInventory::updateControls(const LLSD& info)
void LLPanelSnapshotInventory::onResolutionCommit(LLUICtrl* ctrl)
{
- BOOL current_window_selected = (getChild<LLComboBox>(getImageSizeComboName())->getCurrentIndex() == 3);
+ bool current_window_selected = (getChild<LLComboBox>(getImageSizeComboName())->getCurrentIndex() == 3);
getChild<LLSpinCtrl>(getWidthSpinnerName())->setVisible(!current_window_selected);
getChild<LLSpinCtrl>(getHeightSpinnerName())->setVisible(!current_window_selected);
}
@@ -183,7 +183,7 @@ LLPanelOutfitSnapshotInventory::LLPanelOutfitSnapshotInventory()
}
// virtual
-BOOL LLPanelOutfitSnapshotInventory::postBuild()
+bool LLPanelOutfitSnapshotInventory::postBuild()
{
return LLPanelSnapshotInventoryBase::postBuild();
}
diff --git a/indra/newview/llpanelsnapshotlocal.cpp b/indra/newview/llpanelsnapshotlocal.cpp
index e7fced92a7..4d9368bd72 100644
--- a/indra/newview/llpanelsnapshotlocal.cpp
+++ b/indra/newview/llpanelsnapshotlocal.cpp
@@ -47,7 +47,7 @@ class LLPanelSnapshotLocal
public:
LLPanelSnapshotLocal();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onOpen(const LLSD& key);
private:
@@ -79,7 +79,7 @@ LLPanelSnapshotLocal::LLPanelSnapshotLocal()
}
// virtual
-BOOL LLPanelSnapshotLocal::postBuild()
+bool LLPanelSnapshotLocal::postBuild()
{
getChild<LLUICtrl>("image_quality_slider")->setCommitCallback(boost::bind(&LLPanelSnapshotLocal::onQualitySliderCommit, this, _1));
getChild<LLUICtrl>("local_format_combo")->setCommitCallback(boost::bind(&LLPanelSnapshotLocal::onFormatComboCommit, this, _1));
diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp
index 8cc2fbc770..42f0731172 100644
--- a/indra/newview/llpanelsnapshotoptions.cpp
+++ b/indra/newview/llpanelsnapshotoptions.cpp
@@ -46,7 +46,7 @@ class LLPanelSnapshotOptions
public:
LLPanelSnapshotOptions();
~LLPanelSnapshotOptions();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onOpen(const LLSD& key);
private:
@@ -75,7 +75,7 @@ LLPanelSnapshotOptions::~LLPanelSnapshotOptions()
}
// virtual
-BOOL LLPanelSnapshotOptions::postBuild()
+bool LLPanelSnapshotOptions::postBuild()
{
mSnapshotFloater = getParentByType<LLFloaterSnapshotBase>();
return LLPanel::postBuild();
diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp
index 05fa2b58b1..db8fc421cf 100644
--- a/indra/newview/llpanelsnapshotpostcard.cpp
+++ b/indra/newview/llpanelsnapshotpostcard.cpp
@@ -56,7 +56,7 @@ class LLPanelSnapshotPostcard
public:
LLPanelSnapshotPostcard();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onOpen(const LLSD& key);
private:
@@ -92,12 +92,12 @@ LLPanelSnapshotPostcard::LLPanelSnapshotPostcard()
}
// virtual
-BOOL LLPanelSnapshotPostcard::postBuild()
+bool LLPanelSnapshotPostcard::postBuild()
{
// For the first time a user focuses to .the msg box, all text will be selected.
getChild<LLUICtrl>("msg_form")->setFocusChangedCallback(boost::bind(&LLPanelSnapshotPostcard::onMsgFormFocusRecieved, this));
- getChild<LLUICtrl>("to_form")->setFocus(TRUE);
+ getChild<LLUICtrl>("to_form")->setFocus(true);
getChild<LLUICtrl>("image_quality_slider")->setCommitCallback(boost::bind(&LLPanelSnapshotPostcard::onQualitySliderCommit, this, _1));
diff --git a/indra/newview/llpanelsnapshotprofile.cpp b/indra/newview/llpanelsnapshotprofile.cpp
index 38dec78030..84742fad64 100644
--- a/indra/newview/llpanelsnapshotprofile.cpp
+++ b/indra/newview/llpanelsnapshotprofile.cpp
@@ -49,7 +49,7 @@ class LLPanelSnapshotProfile
public:
LLPanelSnapshotProfile();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onOpen(const LLSD& key);
private:
@@ -73,7 +73,7 @@ LLPanelSnapshotProfile::LLPanelSnapshotProfile()
}
// virtual
-BOOL LLPanelSnapshotProfile::postBuild()
+bool LLPanelSnapshotProfile::postBuild()
{
return LLPanelSnapshot::postBuild();
}
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index 3ed444a5af..1471da2ad1 100644
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -60,7 +60,7 @@ public:
LLDate date, const std::string &hl);
virtual ~LLTeleportHistoryFlatItem();
- virtual BOOL postBuild();
+ virtual bool postBuild();
/*virtual*/ S32 notify(const LLSD& info);
@@ -78,7 +78,7 @@ public:
void onMouseEnter(S32 x, S32 y, MASK mask);
void onMouseLeave(S32 x, S32 y, MASK mask);
- virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleRightMouseDown(S32 x, S32 y, MASK mask);
static void showPlaceInfoPanel(S32 index);
@@ -148,7 +148,7 @@ LLTeleportHistoryFlatItem::~LLTeleportHistoryFlatItem()
}
//virtual
-BOOL LLTeleportHistoryFlatItem::postBuild()
+bool LLTeleportHistoryFlatItem::postBuild()
{
mTitle = getChild<LLTextBox>("region");
@@ -265,11 +265,11 @@ void LLTeleportHistoryFlatItem::onMouseLeave(S32 x, S32 y, MASK mask)
}
// virtual
-BOOL LLTeleportHistoryFlatItem::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLTeleportHistoryFlatItem::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
LLPanel::handleRightMouseDown(x, y, mask);
showMenu(x, y);
- return TRUE;
+ return true;
}
void LLTeleportHistoryFlatItem::showPlaceInfoPanel(S32 index)
@@ -317,7 +317,7 @@ LLTeleportHistoryFlatItemStorage::getFlatItemForPersistentItem (
item->setRegionName(persistent_item.mTitle);
item->setDate(persistent_item.mDate);
item->setHighlightedText(hl);
- item->setVisible(TRUE);
+ item->setVisible(true);
item->updateTitle();
item->updateTimestamp();
}
@@ -400,14 +400,14 @@ LLTeleportHistoryPanel::~LLTeleportHistoryPanel()
mTeleportHistoryChangedConnection.disconnect();
}
-BOOL LLTeleportHistoryPanel::postBuild()
+bool LLTeleportHistoryPanel::postBuild()
{
mCommitCallbackRegistrar.add("TeleportHistory.GearMenu.Action", boost::bind(&LLTeleportHistoryPanel::onGearMenuAction, this, _2));
mEnableCallbackRegistrar.add("TeleportHistory.GearMenu.Enable", boost::bind(&LLTeleportHistoryPanel::isActionEnabled, this, _2));
// init menus before list, since menus are passed to list
mGearItemMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_teleport_history_item.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
- mGearItemMenu->setAlwaysShowMenu(TRUE); // all items can be disabled if nothing is selected, show anyway
+ mGearItemMenu->setAlwaysShowMenu(true); // all items can be disabled if nothing is selected, show anyway
mSortingMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_teleport_history_gear.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
mTeleportHistory = LLTeleportHistoryStorage::getInstance();
@@ -461,7 +461,7 @@ BOOL LLTeleportHistoryPanel::postBuild()
}
}
- return TRUE;
+ return true;
}
// virtual
diff --git a/indra/newview/llpanelteleporthistory.h b/indra/newview/llpanelteleporthistory.h
index 058fee0170..62d5dfe009 100644
--- a/indra/newview/llpanelteleporthistory.h
+++ b/indra/newview/llpanelteleporthistory.h
@@ -46,7 +46,7 @@ public:
LLTeleportHistoryPanel();
virtual ~LLTeleportHistoryPanel();
- BOOL postBuild() override;
+ bool postBuild() override;
void draw() override;
void onSearchEdit(const std::string& string) override;
@@ -62,7 +62,7 @@ public:
LLToggleableMenu* getSortingMenu() override;
LLToggleableMenu* getCreateMenu() override;
- bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept) override { return false; }
+ bool handleDragAndDropToTrash(bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept) override { return false; }
private:
diff --git a/indra/newview/llpaneltiptoast.cpp b/indra/newview/llpaneltiptoast.cpp
index 35009a552d..61808ab788 100644
--- a/indra/newview/llpaneltiptoast.cpp
+++ b/indra/newview/llpaneltiptoast.cpp
@@ -28,7 +28,7 @@
#include "llpaneltiptoast.h"
-BOOL LLPanelTipToast::postBuild()
+bool LLPanelTipToast::postBuild()
{
mMessageText= findChild<LLUICtrl>("message");
@@ -40,10 +40,10 @@ BOOL LLPanelTipToast::postBuild()
else
{
llassert(!"Can't find child 'message' text box.");
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
void LLPanelTipToast::onMessageTextClick()
diff --git a/indra/newview/llpaneltiptoast.h b/indra/newview/llpaneltiptoast.h
index cb09f1dca6..e6f871ffc1 100644
--- a/indra/newview/llpaneltiptoast.h
+++ b/indra/newview/llpaneltiptoast.h
@@ -40,7 +40,7 @@ class LLPanelTipToast : public LLToastPanel
LOG_CLASS(LLPanelTipToast);
public:
LLPanelTipToast(const LLNotificationPtr& notification): LLToastPanel(notification) {}
- virtual BOOL postBuild();
+ bool postBuild() override;
private:
void onMessageTextClick();
void onPanelClick(S32 x, S32 y, MASK mask);
diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp
index 0723a78704..949a8c2c56 100644
--- a/indra/newview/llpaneltopinfobar.cpp
+++ b/indra/newview/llpaneltopinfobar.cpp
@@ -128,7 +128,7 @@ void LLPanelTopInfoBar::handleLoginComplete()
update();
}
-BOOL LLPanelTopInfoBar::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLPanelTopInfoBar::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
if(!LLUICtrl::CommitCallbackRegistry::getValue("TopInfoBar.Action"))
{
@@ -136,10 +136,10 @@ BOOL LLPanelTopInfoBar::handleRightMouseDown(S32 x, S32 y, MASK mask)
.add("TopInfoBar.Action", boost::bind(&LLPanelTopInfoBar::onContextMenuItemClicked, this, _2));
}
show_topinfobar_context_menu(this, x, y);
- return TRUE;
+ return true;
}
-BOOL LLPanelTopInfoBar::postBuild()
+bool LLPanelTopInfoBar::postBuild()
{
mInfoBtn = getChild<LLButton>("place_info_btn");
mInfoBtn->setClickedCallback(boost::bind(&LLPanelTopInfoBar::onInfoButtonClicked, this));
@@ -172,7 +172,7 @@ BOOL LLPanelTopInfoBar::postBuild()
setVisibleCallback(boost::bind(&LLPanelTopInfoBar::onVisibilityChanged, this, _2));
- return TRUE;
+ return true;
}
void LLPanelTopInfoBar::onNavBarShowParcelPropertiesCtrlChanged()
@@ -241,7 +241,7 @@ void LLPanelTopInfoBar::setParcelInfoText(const std::string& new_text)
LLRect rect = mParcelInfoText->getRect();
rect.setOriginAndSize(rect.mLeft, rect.mBottom, new_text_width, rect.getHeight());
- mParcelInfoText->reshape(rect.getWidth(), rect.getHeight(), TRUE);
+ mParcelInfoText->reshape(rect.getWidth(), rect.getHeight(), true);
mParcelInfoText->setRect(rect);
layoutParcelIcons();
diff --git a/indra/newview/llpaneltopinfobar.h b/indra/newview/llpaneltopinfobar.h
index b6c263e331..eefe702667 100644
--- a/indra/newview/llpaneltopinfobar.h
+++ b/indra/newview/llpaneltopinfobar.h
@@ -46,8 +46,8 @@ class LLPanelTopInfoBar : public LLPanel, public LLSingleton<LLPanelTopInfoBar>,
public:
typedef boost::signals2::signal<void ()> resize_signal_t;
- /*virtual*/ BOOL postBuild() override;
- /*virtual*/ void draw() override;
+ bool postBuild() override;
+ void draw() override;
/**
* Updates location and parcel icons on login complete
@@ -83,7 +83,7 @@ private:
*/
void initParcelIcons();
- BOOL handleRightMouseDown(S32 x, S32 y, MASK mask) override;
+ bool handleRightMouseDown(S32 x, S32 y, MASK mask) override;
/**
* Handles clicks on the parcel icons.
@@ -158,7 +158,7 @@ private:
{
if (LLPanelTopInfoBar::instanceExists())
{
- LLPanelTopInfoBar::getInstance()->setEnabled(FALSE);
+ LLPanelTopInfoBar::getInstance()->setEnabled(false);
}
}
diff --git a/indra/newview/llpanelvoicedevicesettings.cpp b/indra/newview/llpanelvoicedevicesettings.cpp
index af57169f3b..3b1454d08b 100644
--- a/indra/newview/llpanelvoicedevicesettings.cpp
+++ b/indra/newview/llpanelvoicedevicesettings.cpp
@@ -51,7 +51,7 @@ LLPanelVoiceDeviceSettings::LLPanelVoiceDeviceSettings()
mCtrlOutputDevices = NULL;
mInputDevice = gSavedSettings.getString("VoiceInputAudioDevice");
mOutputDevice = gSavedSettings.getString("VoiceOutputAudioDevice");
- mDevicesUpdated = FALSE; //obsolete
+ mDevicesUpdated = false; //obsolete
mUseTuningMode = true;
// grab "live" mic volume level
@@ -63,7 +63,7 @@ LLPanelVoiceDeviceSettings::~LLPanelVoiceDeviceSettings()
{
}
-BOOL LLPanelVoiceDeviceSettings::postBuild()
+bool LLPanelVoiceDeviceSettings::postBuild()
{
LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider");
// set mic volume tuning slider based on last mic volume setting
@@ -88,11 +88,11 @@ BOOL LLPanelVoiceDeviceSettings::postBuild()
mCtrlInputDevices->setMouseDownCallback(boost::bind(&LLPanelVoiceDeviceSettings::onInputDevicesClicked, this));
- return TRUE;
+ return true;
}
// virtual
-void LLPanelVoiceDeviceSettings::onVisibilityChange ( BOOL new_visibility )
+void LLPanelVoiceDeviceSettings::onVisibilityChange ( bool new_visibility )
{
if (new_visibility)
{
@@ -103,7 +103,7 @@ void LLPanelVoiceDeviceSettings::onVisibilityChange ( BOOL new_visibility )
cleanup();
// when closing this window, turn of visiblity control so that
// next time preferences is opened we don't suspend voice
- gSavedSettings.setBOOL("ShowDeviceSettings", FALSE);
+ gSavedSettings.setBOOL("ShowDeviceSettings", false);
}
}
void LLPanelVoiceDeviceSettings::draw()
@@ -116,12 +116,12 @@ void LLPanelVoiceDeviceSettings::draw()
if (voice_enabled)
{
getChildView("wait_text")->setVisible( !is_in_tuning_mode && mUseTuningMode);
- getChildView("disabled_text")->setVisible(FALSE);
- mUnmuteBtn->setVisible(FALSE);
+ getChildView("disabled_text")->setVisible(false);
+ mUnmuteBtn->setVisible(false);
}
else
{
- getChildView("wait_text")->setVisible(FALSE);
+ getChildView("wait_text")->setVisible(false);
static LLCachedControl<bool> chat_enabled(gSavedSettings, "EnableVoiceChat");
// If voice isn't enabled, it is either disabled or muted
@@ -144,7 +144,7 @@ void LLPanelVoiceDeviceSettings::draw()
LLView* bar_view = getChild<LLView>(view_name);
if (bar_view)
{
- gl_rect_2d(bar_view->getRect(), LLColor4::grey, TRUE);
+ gl_rect_2d(bar_view->getRect(), LLColor4::grey, true);
LLColor4 color;
if (power_bar_idx < discrete_power)
@@ -158,7 +158,7 @@ void LLPanelVoiceDeviceSettings::draw()
LLRect color_rect = bar_view->getRect();
color_rect.stretch(-1);
- gl_rect_2d(color_rect, color, TRUE);
+ gl_rect_2d(color_rect, color, true);
}
}
}
@@ -267,7 +267,7 @@ void LLPanelVoiceDeviceSettings::refresh()
}
// Fix invalid input audio device preference.
- if (!mCtrlInputDevices->setSelectedByValue(mInputDevice, TRUE))
+ if (!mCtrlInputDevices->setSelectedByValue(mInputDevice, true))
{
mCtrlInputDevices->setValue(DEFAULT_DEVICE);
gSavedSettings.setString("VoiceInputAudioDevice", DEFAULT_DEVICE);
@@ -288,7 +288,7 @@ void LLPanelVoiceDeviceSettings::refresh()
}
// Fix invalid output audio device preference.
- if (!mCtrlOutputDevices->setSelectedByValue(mOutputDevice, TRUE))
+ if (!mCtrlOutputDevices->setSelectedByValue(mOutputDevice, true))
{
mCtrlOutputDevices->setValue(DEFAULT_DEVICE);
gSavedSettings.setString("VoiceOutputAudioDevice", DEFAULT_DEVICE);
@@ -362,5 +362,5 @@ void LLPanelVoiceDeviceSettings::onInputDevicesClicked()
void LLPanelVoiceDeviceSettings::onCommitUnmute()
{
- gSavedSettings.setBOOL("EnableVoiceChat", TRUE);
+ gSavedSettings.setBOOL("EnableVoiceChat", true);
}
diff --git a/indra/newview/llpanelvoicedevicesettings.h b/indra/newview/llpanelvoicedevicesettings.h
index e704394d4a..f326190077 100644
--- a/indra/newview/llpanelvoicedevicesettings.h
+++ b/indra/newview/llpanelvoicedevicesettings.h
@@ -37,14 +37,14 @@ public:
~LLPanelVoiceDeviceSettings();
/*virtual*/ void draw();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
void apply();
void cancel();
void refresh();
void initialize();
void cleanup();
- /*virtual*/ void onVisibilityChange ( BOOL new_visibility );
+ /*virtual*/ void onVisibilityChange ( bool new_visibility );
void setUseTuningMode(bool use) { mUseTuningMode = use; };
@@ -63,7 +63,7 @@ protected:
class LLComboBox *mCtrlInputDevices;
class LLComboBox *mCtrlOutputDevices;
class LLButton *mUnmuteBtn;
- BOOL mDevicesUpdated;
+ bool mDevicesUpdated;
bool mUseTuningMode;
std::map<std::string, std::string> mLocalizedDeviceNames;
};
diff --git a/indra/newview/llpanelvoiceeffect.cpp b/indra/newview/llpanelvoiceeffect.cpp
index a3f0e25ef0..996f4757e2 100644
--- a/indra/newview/llpanelvoiceeffect.cpp
+++ b/indra/newview/llpanelvoiceeffect.cpp
@@ -61,7 +61,7 @@ LLPanelVoiceEffect::~LLPanelVoiceEffect()
}
// virtual
-BOOL LLPanelVoiceEffect::postBuild()
+bool LLPanelVoiceEffect::postBuild()
{
mVoiceEffectCombo = getChild<LLComboBox>("voice_effect");
@@ -78,7 +78,7 @@ BOOL LLPanelVoiceEffect::postBuild()
update(true);
- return TRUE;
+ return true;
}
//////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llpanelvoiceeffect.h b/indra/newview/llpanelvoiceeffect.h
index bba525e1df..b22e446daa 100644
--- a/indra/newview/llpanelvoiceeffect.h
+++ b/indra/newview/llpanelvoiceeffect.h
@@ -43,14 +43,14 @@ public:
LLPanelVoiceEffect();
virtual ~LLPanelVoiceEffect();
- virtual BOOL postBuild();
+ bool postBuild() override;
private:
void onCommitVoiceEffect();
void update(bool list_updated);
/// Called by voice effect provider when voice effect list is changed.
- virtual void onVoiceEffectChanged(bool effect_list_updated);
+ void onVoiceEffectChanged(bool effect_list_updated) override;
// Fixed entries in the Voice Morph list
typedef enum e_voice_effect_combo_items
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp
index 595609b4de..9e8091aac5 100644
--- a/indra/newview/llpanelvolume.cpp
+++ b/indra/newview/llpanelvolume.cpp
@@ -90,7 +90,7 @@ const F32 DEFAULT_GRAVITY_MULTIPLIER = 1.f;
const F32 DEFAULT_DENSITY = 1000.f;
// "Features" Tab
-BOOL LLPanelVolume::postBuild()
+bool LLPanelVolume::postBuild()
{
// Flexible Objects Parameters
{
@@ -150,7 +150,7 @@ BOOL LLPanelVolume::postBuild()
// REFLECTION PROBE Parameters
{
childSetCommitCallback("Reflection Probe", onCommitIsReflectionProbe, this);
- childSetCommitCallback("Probe Dynamic", onCommitProbe, this);
+ childSetCommitCallback("Probe Update Type", onCommitProbe, this);
childSetCommitCallback("Probe Volume Type", onCommitProbe, this);
childSetCommitCallback("Probe Ambiance", onCommitProbe, this);
childSetCommitCallback("Probe Near Clip", onCommitProbe, this);
@@ -213,14 +213,14 @@ BOOL LLPanelVolume::postBuild()
// Start with everyone disabled
clearCtrls();
- return TRUE;
+ return true;
}
LLPanelVolume::LLPanelVolume()
: LLPanel(),
mComboMaterialItemCount(0)
{
- setMouseOpaque(FALSE);
+ setMouseOpaque(false);
mCommitCallbackRegistrar.add("PanelVolume.menuDoToSelected", boost::bind(&LLPanelVolume::menuDoToSelected, this, _2));
mEnableCallbackRegistrar.add("PanelVolume.menuEnable", boost::bind(&LLPanelVolume::menuEnableItem, this, _2));
@@ -285,10 +285,10 @@ void LLPanelVolume::getState( )
LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name);
// BUG? Check for all objects being editable?
- BOOL editable = root_objectp->permModify() && !root_objectp->isPermanentEnforced();
- BOOL single_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME )
+ bool editable = root_objectp->permModify() && !root_objectp->isPermanentEnforced();
+ bool single_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME )
&& LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1;
- BOOL single_root_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ) &&
+ bool single_root_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ) &&
LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() == 1;
// Select Single Message
@@ -304,28 +304,28 @@ void LLPanelVolume::getState( )
getChildView("select_single")->setVisible(true);
getChildView("select_single")->setEnabled(true);
}
-
+
// Light properties
- BOOL is_light = volobjp && volobjp->getIsLight();
+ bool is_light = volobjp && volobjp->getIsLight();
getChild<LLUICtrl>("Light Checkbox Ctrl")->setValue(is_light);
getChildView("Light Checkbox Ctrl")->setEnabled(editable && single_volume && volobjp);
if (is_light && editable && single_volume)
{
- //mLabelColor ->setEnabled( TRUE );
+ //mLabelColor ->setEnabled( true );
LLColorSwatchCtrl* LightColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
if(LightColorSwatch)
{
- LightColorSwatch->setEnabled( TRUE );
- LightColorSwatch->setValid( TRUE );
+ LightColorSwatch->setEnabled( true );
+ LightColorSwatch->setValid( true );
LightColorSwatch->set(volobjp->getLightSRGBBaseColor());
}
LLTextureCtrl* LightTextureCtrl = getChild<LLTextureCtrl>("light texture control");
if (LightTextureCtrl)
{
- LightTextureCtrl->setEnabled(TRUE);
- LightTextureCtrl->setValid(TRUE);
+ LightTextureCtrl->setEnabled(true);
+ LightTextureCtrl->setValid(true);
LightTextureCtrl->setImageAssetID(volobjp->getLightTextureID());
}
@@ -357,14 +357,14 @@ void LLPanelVolume::getState( )
LLColorSwatchCtrl* LightColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
if(LightColorSwatch)
{
- LightColorSwatch->setEnabled( FALSE );
- LightColorSwatch->setValid( FALSE );
+ LightColorSwatch->setEnabled( false );
+ LightColorSwatch->setValid( false );
}
LLTextureCtrl* LightTextureCtrl = getChild<LLTextureCtrl>("light texture control");
if (LightTextureCtrl)
{
- LightTextureCtrl->setEnabled(FALSE);
- LightTextureCtrl->setValid(FALSE);
+ LightTextureCtrl->setEnabled(false);
+ LightTextureCtrl->setValid(false);
if (objectp->isAttachment())
{
@@ -386,23 +386,31 @@ void LLPanelVolume::getState( )
}
// Reflection Probe
- BOOL is_probe = volobjp && volobjp->isReflectionProbe();
+ bool is_probe = volobjp && volobjp->isReflectionProbe();
getChild<LLUICtrl>("Reflection Probe")->setValue(is_probe);
getChildView("Reflection Probe")->setEnabled(editable && single_volume && volobjp && !volobjp->isMesh());
bool probe_enabled = is_probe && editable && single_volume;
+ bool mirrors_enabled = LLPipeline::RenderMirrors;
+
+ getChildView("Probe Update Type")->setVisible(mirrors_enabled);
+ getChildView("Probe Update Label")->setVisible(mirrors_enabled);
+ getChildView("Probe Dynamic")->setVisible(!mirrors_enabled);
+
getChildView("Probe Dynamic")->setEnabled(probe_enabled);
+ getChildView("Probe Update Type")->setEnabled(probe_enabled);
getChildView("Probe Volume Type")->setEnabled(probe_enabled);
getChildView("Probe Ambiance")->setEnabled(probe_enabled);
getChildView("Probe Near Clip")->setEnabled(probe_enabled);
+ getChildView("Probe Update Label")->setEnabled(probe_enabled);
if (!probe_enabled)
{
getChild<LLComboBox>("Probe Volume Type", true)->clear();
getChild<LLSpinCtrl>("Probe Ambiance", true)->clear();
getChild<LLSpinCtrl>("Probe Near Clip", true)->clear();
- getChild<LLCheckBoxCtrl>("Probe Dynamic", true)->clear();
+ getChild<LLComboBox>("Probe Update Type", true)->clear();
}
else
{
@@ -416,16 +424,34 @@ void LLPanelVolume::getState( )
volume_type = "Sphere";
}
+ std::string update_type;
+ if (volobjp->getReflectionProbeIsDynamic())
+ {
+ update_type = "Dynamic";
+ }
+ else if (volobjp->getReflectionProbeIsMirror())
+ {
+ update_type = "Mirror";
+
+ }
+ else
+ {
+ update_type = "Static";
+ }
+
+ getChildView("Probe Ambiance")->setEnabled(update_type != "Mirror");
+ getChildView("Probe Near Clip")->setEnabled(update_type != "Mirror");
+
getChild<LLComboBox>("Probe Volume Type", true)->setValue(volume_type);
getChild<LLSpinCtrl>("Probe Ambiance", true)->setValue(volobjp->getReflectionProbeAmbiance());
getChild<LLSpinCtrl>("Probe Near Clip", true)->setValue(volobjp->getReflectionProbeNearClip());
- getChild<LLCheckBoxCtrl>("Probe Dynamic", true)->setValue(volobjp->getReflectionProbeIsDynamic());
+ getChild<LLComboBox>("Probe Update Type", true)->setValue(update_type);
}
// Animated Mesh
- BOOL is_animated_mesh = single_root_volume && root_volobjp && root_volobjp->isAnimatedObject();
+ bool is_animated_mesh = single_root_volume && root_volobjp && root_volobjp->isAnimatedObject();
getChild<LLUICtrl>("Animated Mesh Checkbox Ctrl")->setValue(is_animated_mesh);
- BOOL enabled_animated_object_box = FALSE;
+ bool enabled_animated_object_box = false;
if (root_volobjp && root_volobjp == volobjp)
{
enabled_animated_object_box = single_root_volume && root_volobjp && root_volobjp->canBeAnimatedObject() && editable;
@@ -473,7 +499,7 @@ void LLPanelVolume::getState( )
}
// Flexible properties
- BOOL is_flexible = volobjp && volobjp->isFlexible();
+ bool is_flexible = volobjp && volobjp->isFlexible();
getChild<LLUICtrl>("Flexible1D Checkbox Ctrl")->setValue(is_flexible);
if (is_flexible || (volobjp && volobjp->canBeFlexible()))
{
@@ -551,7 +577,7 @@ void LLPanelVolume::getState( )
std::string LEGACY_FULLBRIGHT_DESC = LLTrans::getString("Fullbright");
if (editable && single_volume && material_same)
{
- mComboMaterial->setEnabled( TRUE );
+ mComboMaterial->setEnabled( true );
if (material_code == LL_MCODE_LIGHT)
{
if (mComboMaterial->getItemCount() == mComboMaterialItemCount)
@@ -572,7 +598,7 @@ void LLPanelVolume::getState( )
}
else
{
- mComboMaterial->setEnabled( FALSE );
+ mComboMaterial->setEnabled( false );
}
// Physics properties
@@ -593,7 +619,7 @@ void LLPanelVolume::getState( )
mComboPhysicsShapeType->removeall();
mComboPhysicsShapeType->add(getString("None"), LLSD(1));
- BOOL isMesh = FALSE;
+ bool isMesh = false;
LLSculptParams *sculpt_params = (LLSculptParams *)objectp->getParameterEntry(LLNetworkData::PARAMS_SCULPT);
if (sculpt_params)
{
@@ -634,7 +660,7 @@ void LLPanelVolume::getState( )
bool LLPanelVolume::precommitValidate( const LLSD& data )
{
// TODO: Richard will fill this in later.
- return TRUE; // FALSE means that validation failed and new value should not be commited.
+ return true; // false means that validation failed and new value should not be commited.
}
@@ -690,14 +716,14 @@ void LLPanelVolume::clearCtrls()
LLColorSwatchCtrl* LightColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
if(LightColorSwatch)
{
- LightColorSwatch->setEnabled( FALSE );
- LightColorSwatch->setValid( FALSE );
+ LightColorSwatch->setEnabled( false );
+ LightColorSwatch->setValid( false );
}
LLTextureCtrl* LightTextureCtrl = getChild<LLTextureCtrl>("light texture control");
if(LightTextureCtrl)
{
- LightTextureCtrl->setEnabled( FALSE );
- LightTextureCtrl->setValid( FALSE );
+ LightTextureCtrl->setEnabled( false );
+ LightTextureCtrl->setValid( false );
}
getChildView("Light Intensity")->setEnabled(false);
@@ -706,7 +732,7 @@ void LLPanelVolume::clearCtrls()
getChildView("Reflection Probe")->setEnabled(false);;
getChildView("Probe Volume Type")->setEnabled(false);
- getChildView("Probe Dynamic")->setEnabled(false);
+ getChildView("Probe Update Type")->setEnabled(false);
getChildView("Probe Ambiance")->setEnabled(false);
getChildView("Probe Near Clip")->setEnabled(false);
getChildView("Animated Mesh Checkbox Ctrl")->setEnabled(false);
@@ -720,12 +746,12 @@ void LLPanelVolume::clearCtrls()
getChildView("FlexForceY")->setEnabled(false);
getChildView("FlexForceZ")->setEnabled(false);
- mSpinPhysicsGravity->setEnabled(FALSE);
- mSpinPhysicsFriction->setEnabled(FALSE);
- mSpinPhysicsDensity->setEnabled(FALSE);
- mSpinPhysicsRestitution->setEnabled(FALSE);
+ mSpinPhysicsGravity->setEnabled(false);
+ mSpinPhysicsFriction->setEnabled(false);
+ mSpinPhysicsDensity->setEnabled(false);
+ mSpinPhysicsRestitution->setEnabled(false);
- mComboMaterial->setEnabled( FALSE );
+ mComboMaterial->setEnabled( false );
}
//
@@ -741,7 +767,7 @@ void LLPanelVolume::sendIsLight()
}
LLVOVolume *volobjp = (LLVOVolume *)objectp;
- BOOL value = getChild<LLUICtrl>("Light Checkbox Ctrl")->getValue();
+ bool value = getChild<LLUICtrl>("Light Checkbox Ctrl")->getValue();
volobjp->setIsLight(value);
LL_INFOS() << "update light sent" << LL_ENDL;
}
@@ -763,8 +789,8 @@ void LLPanelVolume::sendIsReflectionProbe()
}
LLVOVolume* volobjp = (LLVOVolume*)objectp;
- BOOL value = getChild<LLUICtrl>("Reflection Probe")->getValue();
- BOOL old_value = volobjp->isReflectionProbe();
+ bool value = getChild<LLUICtrl>("Reflection Probe")->getValue();
+ bool old_value = volobjp->isReflectionProbe();
if (value && value != old_value)
{ // defer to notification util as to whether or not we *really* make this object a reflection probe
@@ -783,7 +809,7 @@ void LLPanelVolume::sendIsReflectionProbe()
if (in_linkeset)
{
// In linkset with a phantom flag
- objectp->setFlags(FLAGS_PHANTOM, FALSE);
+ objectp->setFlags(FLAGS_PHANTOM, false);
}
}
volobjp->setIsReflectionProbe(value);
@@ -836,8 +862,8 @@ void LLPanelVolume::sendIsFlexible()
}
LLVOVolume *volobjp = (LLVOVolume *)objectp;
- BOOL is_flexible = getChild<LLUICtrl>("Flexible1D Checkbox Ctrl")->getValue();
- //BOOL is_flexible = mCheckFlexible1D->get();
+ bool is_flexible = getChild<LLUICtrl>("Flexible1D Checkbox Ctrl")->getValue();
+ //bool is_flexible = mCheckFlexible1D->get();
if (is_flexible)
{
@@ -1055,10 +1081,10 @@ void LLPanelVolume::onPasteFeatures()
bool is_root = objectp->isRoot();
// Not sure if phantom should go under physics, but doesn't fit elsewhere
- BOOL is_phantom = clipboard["is_phantom"].asBoolean() && is_root;
+ bool is_phantom = clipboard["is_phantom"].asBoolean() && is_root;
LLSelectMgr::getInstance()->selectionUpdatePhantom(is_phantom);
- BOOL is_physical = clipboard["is_physical"].asBoolean() && is_root;
+ bool is_physical = clipboard["is_physical"].asBoolean() && is_root;
LLSelectMgr::getInstance()->selectionUpdatePhysics(is_physical);
if (clipboard.has("physics"))
@@ -1073,7 +1099,7 @@ void LLPanelVolume::onPasteFeatures()
objectp->setPhysicsFriction(clipboard["physics"]["friction"].asReal());
objectp->setPhysicsDensity(clipboard["physics"]["density"].asReal());
objectp->setPhysicsRestitution(clipboard["physics"]["restitution"].asReal());
- objectp->updateFlags(TRUE);
+ objectp->updateFlags(true);
}
// Flexible
@@ -1081,7 +1107,7 @@ void LLPanelVolume::onPasteFeatures()
if (is_flexible && volobjp->canBeFlexible())
{
LLVOVolume *volobjp = (LLVOVolume *)objectp;
- BOOL update_shape = FALSE;
+ bool update_shape = false;
// do before setParameterEntry or it will think that it is already flexi
update_shape = volobjp->setIsFlexible(is_flexible);
@@ -1200,7 +1226,7 @@ void LLPanelVolume::onPasteLight()
{
if (clipboard.has("light"))
{
- volobjp->setIsLight(TRUE);
+ volobjp->setIsLight(true);
volobjp->setLightIntensity((F32)clipboard["light"]["intensity"].asReal());
volobjp->setLightRadius((F32)clipboard["light"]["radius"].asReal());
volobjp->setLightFalloff((F32)clipboard["light"]["falloff"].asReal());
@@ -1211,7 +1237,7 @@ void LLPanelVolume::onPasteLight()
}
else
{
- volobjp->setIsLight(FALSE);
+ volobjp->setIsLight(false);
}
if (clipboard.has("spot"))
@@ -1226,7 +1252,7 @@ void LLPanelVolume::onPasteLight()
if (clipboard.has("reflection_probe"))
{
- volobjp->setIsReflectionProbe(TRUE);
+ volobjp->setIsReflectionProbe(true);
volobjp->setReflectionProbeIsBox(clipboard["reflection_probe"]["is_box"].asBoolean());
volobjp->setReflectionProbeAmbiance((F32)clipboard["reflection_probe"]["ambiance"].asReal());
volobjp->setReflectionProbeNearClip((F32)clipboard["reflection_probe"]["near_clip"].asReal());
@@ -1241,7 +1267,7 @@ void LLPanelVolume::onPasteLight()
if (in_linkeset)
{
// In linkset with a phantom flag
- objectp->setFlags(FLAGS_PHANTOM, FALSE);
+ objectp->setFlags(FLAGS_PHANTOM, false);
}
}
@@ -1377,9 +1403,9 @@ void LLPanelVolume::onCommitLight( LLUICtrl* ctrl, void* userdata )
else if (volobjp->isLightSpotlight())
{ //no longer a spot light
setLightTextureID(id, item_id, volobjp);
- //self->getChildView("Light FOV")->setEnabled(FALSE);
- //self->getChildView("Light Focus")->setEnabled(FALSE);
- //self->getChildView("Light Ambiance")->setEnabled(FALSE);
+ //self->getChildView("Light FOV")->setEnabled(false);
+ //self->getChildView("Light Focus")->setEnabled(false);
+ //self->getChildView("Light Ambiance")->setEnabled(false);
}
}
@@ -1399,7 +1425,14 @@ void LLPanelVolume::onCommitProbe(LLUICtrl* ctrl, void* userdata)
volobjp->setReflectionProbeAmbiance((F32)self->getChild<LLUICtrl>("Probe Ambiance")->getValue().asReal());
volobjp->setReflectionProbeNearClip((F32)self->getChild<LLUICtrl>("Probe Near Clip")->getValue().asReal());
- volobjp->setReflectionProbeIsDynamic(self->getChild<LLUICtrl>("Probe Dynamic")->getValue().asBoolean());
+
+ std::string update_type = self->getChild<LLUICtrl>("Probe Update Type")->getValue().asString();
+
+ volobjp->setReflectionProbeIsDynamic(update_type == "Dynamic");
+ volobjp->setReflectionProbeIsMirror(update_type == "Mirror");
+
+ self->getChildView("Probe Ambiance")->setEnabled(update_type != "Mirror");
+ self->getChildView("Probe Near Clip")->setEnabled(update_type != "Mirror");
std::string shape_type = self->getChild<LLUICtrl>("Probe Volume Type")->getValue().asString();
@@ -1422,7 +1455,7 @@ void LLPanelVolume::onCommitProbe(LLUICtrl* ctrl, void* userdata)
path = LL_PCODE_PATH_CIRCLE;
F32 scale = volobjp->getScale().mV[0];
- volobjp->setScale(LLVector3(scale, scale, scale), FALSE);
+ volobjp->setScale(LLVector3(scale, scale, scale), false);
LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_ROTATION | UPD_POSITION | UPD_SCALE);
}
else
@@ -1456,7 +1489,7 @@ void LLPanelVolume::setLightTextureID(const LLUUID &asset_id, const LLUUID &item
if (item && volobjp->isAttachment())
{
const LLPermissions& perm = item->getPermissions();
- BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE;
+ bool unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? true : false;
if (!unrestricted)
{
// Attachments are in world and in inventory simultaneously,
@@ -1526,7 +1559,7 @@ void LLPanelVolume::onCommitAnimatedMeshCheckbox(LLUICtrl *, void*)
return;
}
LLVOVolume *volobjp = (LLVOVolume *)objectp;
- BOOL animated_mesh = getChild<LLUICtrl>("Animated Mesh Checkbox Ctrl")->getValue();
+ bool animated_mesh = getChild<LLUICtrl>("Animated Mesh Checkbox Ctrl")->getValue();
U32 flags = volobjp->getExtendedMeshFlags();
U32 new_flags = flags;
if (animated_mesh)
@@ -1585,6 +1618,6 @@ void LLPanelVolume::handleResponseChangeToFlexible(const LLSD &pNotification, co
}
else
{
- getChild<LLUICtrl>("Flexible1D Checkbox Ctrl")->setValue(FALSE);
+ getChild<LLUICtrl>("Flexible1D Checkbox Ctrl")->setValue(false);
}
}
diff --git a/indra/newview/llpanelvolume.h b/indra/newview/llpanelvolume.h
index 01b7ebb75c..1758a52bae 100644
--- a/indra/newview/llpanelvolume.h
+++ b/indra/newview/llpanelvolume.h
@@ -52,12 +52,12 @@ public:
virtual void draw();
virtual void clearCtrls();
- virtual BOOL postBuild();
+ virtual bool postBuild();
void refresh();
void sendIsLight();
-
+
// when an object is becoming a refleciton probe, present a dialog asking for confirmation
// otherwise, send the reflection probe update immediately
void sendIsReflectionProbe();
diff --git a/indra/newview/llpanelvolumepulldown.cpp b/indra/newview/llpanelvolumepulldown.cpp
index 09038ac95a..a7aca8a957 100644
--- a/indra/newview/llpanelvolumepulldown.cpp
+++ b/indra/newview/llpanelvolumepulldown.cpp
@@ -55,7 +55,7 @@ LLPanelVolumePulldown::LLPanelVolumePulldown()
buildFromFile( "panel_volume_pulldown.xml");
}
-BOOL LLPanelVolumePulldown::postBuild()
+bool LLPanelVolumePulldown::postBuild()
{
return LLPanelPulldown::postBuild();
}
@@ -63,7 +63,7 @@ BOOL LLPanelVolumePulldown::postBuild()
void LLPanelVolumePulldown::onAdvancedButtonClick(const LLSD& user_data)
{
// close the global volume minicontrol, we're bringing up the big one
- setVisible(FALSE);
+ setVisible(false);
// bring up the prefs floater
LLFloaterPreference* prefsfloater = dynamic_cast<LLFloaterPreference*>
@@ -87,7 +87,7 @@ void LLPanelVolumePulldown::setControlFalse(const LLSD& user_data)
LLControlVariable* control = findControl(control_name);
if (control)
- control->set(LLSD(FALSE));
+ control->set(LLSD(false));
}
void LLPanelVolumePulldown::updateCheckbox(LLUICtrl* ctrl, const LLSD& user_data)
diff --git a/indra/newview/llpanelvolumepulldown.h b/indra/newview/llpanelvolumepulldown.h
index 3243d2e968..9a9872a6ec 100644
--- a/indra/newview/llpanelvolumepulldown.h
+++ b/indra/newview/llpanelvolumepulldown.h
@@ -36,7 +36,7 @@ class LLPanelVolumePulldown : public LLPanelPulldown
{
public:
LLPanelVolumePulldown();
- /*virtual*/ BOOL postBuild();
+ bool postBuild() override;
private:
void setControlFalse(const LLSD& user_data);
diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp
index bfdb0fbc88..f4ae51d70e 100644
--- a/indra/newview/llpanelwearing.cpp
+++ b/indra/newview/llpanelwearing.cpp
@@ -193,15 +193,15 @@ protected:
void updateMenuItemsVisibility(LLContextMenu* menu)
{
- menu->setItemVisible("touch_attach", TRUE);
+ menu->setItemVisible("touch_attach", true);
menu->setItemEnabled("touch_attach", 1 == mUUIDs.size());
- menu->setItemVisible("edit_item", TRUE);
+ menu->setItemVisible("edit_item", true);
menu->setItemEnabled("edit_item", 1 == mUUIDs.size());
- menu->setItemVisible("take_off", FALSE);
- menu->setItemVisible("detach", TRUE);
- menu->setItemVisible("edit_outfit_separator", FALSE);
- menu->setItemVisible("show_original", FALSE);
- menu->setItemVisible("edit_outfit", FALSE);
+ menu->setItemVisible("take_off", false);
+ menu->setItemVisible("detach", true);
+ menu->setItemVisible("edit_outfit_separator", false);
+ menu->setItemVisible("show_original", false);
+ menu->setItemVisible("edit_outfit", false);
}
LLPanelWearing* mPanelWearing;
@@ -234,7 +234,7 @@ LLPanelWearing::~LLPanelWearing()
}
}
-BOOL LLPanelWearing::postBuild()
+bool LLPanelWearing::postBuild()
{
mAccordionCtrl = getChild<LLAccordionCtrl>("wearables_accordion");
mWearablesTab = getChild<LLAccordionCtrlTab>("tab_wearables");
@@ -253,7 +253,7 @@ BOOL LLPanelWearing::postBuild()
menu_gear_btn->setMenu(mGearMenu->getMenu());
- return TRUE;
+ return true;
}
//virtual
diff --git a/indra/newview/llpanelwearing.h b/indra/newview/llpanelwearing.h
index 2f3f14956a..a443b706b3 100644
--- a/indra/newview/llpanelwearing.h
+++ b/indra/newview/llpanelwearing.h
@@ -55,7 +55,7 @@ public:
LLPanelWearing();
virtual ~LLPanelWearing();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void draw();
diff --git a/indra/newview/llparcelselection.cpp b/indra/newview/llparcelselection.cpp
index 5c62159b93..47fcc91e49 100644
--- a/indra/newview/llparcelselection.cpp
+++ b/indra/newview/llparcelselection.cpp
@@ -36,8 +36,8 @@
//
LLParcelSelection::LLParcelSelection() :
mParcel(NULL),
- mSelectedMultipleOwners(FALSE),
- mWholeParcelSelected(FALSE),
+ mSelectedMultipleOwners(false),
+ mWholeParcelSelected(false),
mSelectedSelfCount(0),
mSelectedOtherCount(0),
mSelectedPublicCount(0)
@@ -46,8 +46,8 @@ LLParcelSelection::LLParcelSelection() :
LLParcelSelection::LLParcelSelection(LLParcel* parcel) :
mParcel(parcel),
- mSelectedMultipleOwners(FALSE),
- mWholeParcelSelected(FALSE),
+ mSelectedMultipleOwners(false),
+ mWholeParcelSelected(false),
mSelectedSelfCount(0),
mSelectedOtherCount(0),
mSelectedPublicCount(0)
@@ -58,13 +58,13 @@ LLParcelSelection::~LLParcelSelection()
{
}
-BOOL LLParcelSelection::getMultipleOwners() const
+bool LLParcelSelection::getMultipleOwners() const
{
return mSelectedMultipleOwners;
}
-BOOL LLParcelSelection::getWholeParcelSelected() const
+bool LLParcelSelection::getWholeParcelSelected() const
{
return mWholeParcelSelected;
}
diff --git a/indra/newview/llparcelselection.h b/indra/newview/llparcelselection.h
index 06d9141efb..02905f498d 100644
--- a/indra/newview/llparcelselection.h
+++ b/indra/newview/llparcelselection.h
@@ -57,18 +57,18 @@ public:
bool hasOthersSelected() const;
// Does the selection have multiple land owners in it?
- BOOL getMultipleOwners() const;
+ bool getMultipleOwners() const;
// Is the entire parcel selected, or just a part?
- BOOL getWholeParcelSelected() const;
+ bool getWholeParcelSelected() const;
private:
void setParcel(LLParcel* parcel) { mParcel = parcel; }
private:
LLParcel* mParcel;
- BOOL mSelectedMultipleOwners;
- BOOL mWholeParcelSelected;
+ bool mSelectedMultipleOwners;
+ bool mWholeParcelSelected;
S32 mSelectedSelfCount;
S32 mSelectedOtherCount;
S32 mSelectedPublicCount;
diff --git a/indra/newview/llpathfindingcharacter.cpp b/indra/newview/llpathfindingcharacter.cpp
index 00f2ebc4bb..b609afce60 100644
--- a/indra/newview/llpathfindingcharacter.cpp
+++ b/indra/newview/llpathfindingcharacter.cpp
@@ -47,7 +47,7 @@
LLPathfindingCharacter::LLPathfindingCharacter(const std::string &pUUID, const LLSD& pCharacterData)
: LLPathfindingObject(pUUID, pCharacterData),
mCPUTime(0U),
- mIsHorizontal(FALSE),
+ mIsHorizontal(false),
mLength(0.0f),
mRadius(0.0f)
{
diff --git a/indra/newview/llpathfindingcharacter.h b/indra/newview/llpathfindingcharacter.h
index 7cf9f401b0..c0a9de8adb 100644
--- a/indra/newview/llpathfindingcharacter.h
+++ b/indra/newview/llpathfindingcharacter.h
@@ -44,7 +44,7 @@ public:
inline F32 getCPUTime() const {return mCPUTime;};
- inline BOOL isHorizontal() const {return mIsHorizontal;};
+ inline bool isHorizontal() const {return mIsHorizontal;};
inline F32 getLength() const {return mLength;};
inline F32 getRadius() const {return mRadius;};
@@ -55,7 +55,7 @@ private:
F32 mCPUTime;
- BOOL mIsHorizontal;
+ bool mIsHorizontal;
F32 mLength;
F32 mRadius;
};
diff --git a/indra/newview/llpathfindinglinkset.cpp b/indra/newview/llpathfindinglinkset.cpp
index 50b76378f5..5562ac1baf 100644
--- a/indra/newview/llpathfindinglinkset.cpp
+++ b/indra/newview/llpathfindinglinkset.cpp
@@ -61,10 +61,10 @@ LLPathfindingLinkset::LLPathfindingLinkset(const LLSD& pTerrainData)
: LLPathfindingObject(),
mIsTerrain(true),
mLandImpact(0U),
- mIsModifiable(FALSE),
- mCanBeVolume(FALSE),
- mIsScripted(FALSE),
- mHasIsScripted(TRUE),
+ mIsModifiable(false),
+ mCanBeVolume(false),
+ mIsScripted(false),
+ mHasIsScripted(true),
mLinksetUse(kUnknown),
mWalkabilityCoefficientA(MIN_WALKABILITY_VALUE),
mWalkabilityCoefficientB(MIN_WALKABILITY_VALUE),
@@ -78,10 +78,10 @@ LLPathfindingLinkset::LLPathfindingLinkset(const std::string &pUUID, const LLSD&
: LLPathfindingObject(pUUID, pLinksetData),
mIsTerrain(false),
mLandImpact(0U),
- mIsModifiable(TRUE),
- mCanBeVolume(TRUE),
- mIsScripted(FALSE),
- mHasIsScripted(FALSE),
+ mIsModifiable(true),
+ mCanBeVolume(true),
+ mIsScripted(false),
+ mHasIsScripted(false),
mLinksetUse(kUnknown),
mWalkabilityCoefficientA(MIN_WALKABILITY_VALUE),
mWalkabilityCoefficientB(MIN_WALKABILITY_VALUE),
@@ -131,14 +131,14 @@ LLPathfindingLinkset& LLPathfindingLinkset::operator =(const LLPathfindingLinkse
return *this;
}
-BOOL LLPathfindingLinkset::isPhantom() const
+bool LLPathfindingLinkset::isPhantom() const
{
return isPhantom(getLinksetUse());
}
LLPathfindingLinkset::ELinksetUse LLPathfindingLinkset::getLinksetUseWithToggledPhantom(ELinksetUse pLinksetUse)
{
- BOOL isPhantom = LLPathfindingLinkset::isPhantom(pLinksetUse);
+ bool isPhantom = LLPathfindingLinkset::isPhantom(pLinksetUse);
ENavMeshGenerationCategory navMeshGenerationCategory = getNavMeshGenerationCategory(pLinksetUse);
return getLinksetUse(!isPhantom, navMeshGenerationCategory);
@@ -259,9 +259,9 @@ void LLPathfindingLinkset::parsePathfindingData(const LLSD &pLinksetData)
llassert(mWalkabilityCoefficientD <= MAX_WALKABILITY_VALUE);
}
-BOOL LLPathfindingLinkset::isPhantom(ELinksetUse pLinksetUse)
+bool LLPathfindingLinkset::isPhantom(ELinksetUse pLinksetUse)
{
- BOOL retVal;
+ bool retVal;
switch (pLinksetUse)
{
diff --git a/indra/newview/llpathfindinglinkset.h b/indra/newview/llpathfindinglinkset.h
index 308a3a1e0f..0896b989ce 100644
--- a/indra/newview/llpathfindinglinkset.h
+++ b/indra/newview/llpathfindinglinkset.h
@@ -56,15 +56,15 @@ public:
inline bool isTerrain() const {return mIsTerrain;};
inline U32 getLandImpact() const {return mLandImpact;};
- BOOL isModifiable() const {return mIsModifiable;};
- BOOL isPhantom() const;
- BOOL canBeVolume() const {return mCanBeVolume;};
+ bool isModifiable() const {return mIsModifiable;};
+ bool isPhantom() const;
+ bool canBeVolume() const {return mCanBeVolume;};
static ELinksetUse getLinksetUseWithToggledPhantom(ELinksetUse pLinksetUse);
inline ELinksetUse getLinksetUse() const {return mLinksetUse;};
- inline BOOL isScripted() const {return mIsScripted;};
- inline BOOL hasIsScripted() const {return mHasIsScripted;};
+ inline bool isScripted() const {return mIsScripted;};
+ inline bool hasIsScripted() const {return mHasIsScripted;};
inline S32 getWalkabilityCoefficientA() const {return mWalkabilityCoefficientA;};
inline S32 getWalkabilityCoefficientB() const {return mWalkabilityCoefficientB;};
@@ -92,7 +92,7 @@ private:
void parseLinksetData(const LLSD &pLinksetData);
void parsePathfindingData(const LLSD &pLinksetData);
- static BOOL isPhantom(ELinksetUse pLinksetUse);
+ static bool isPhantom(ELinksetUse pLinksetUse);
static ELinksetUse getLinksetUse(bool pIsPhantom, ENavMeshGenerationCategory pNavMeshGenerationCategory);
static ENavMeshGenerationCategory getNavMeshGenerationCategory(ELinksetUse pLinksetUse);
static LLSD convertCategoryToLLSD(ENavMeshGenerationCategory pNavMeshGenerationCategory);
@@ -100,10 +100,10 @@ private:
bool mIsTerrain;
U32 mLandImpact;
- BOOL mIsModifiable;
- BOOL mCanBeVolume;
- BOOL mIsScripted;
- BOOL mHasIsScripted;
+ bool mIsModifiable;
+ bool mCanBeVolume;
+ bool mIsScripted;
+ bool mHasIsScripted;
ELinksetUse mLinksetUse;
S32 mWalkabilityCoefficientA;
S32 mWalkabilityCoefficientB;
diff --git a/indra/newview/llpathfindinglinksetlist.cpp b/indra/newview/llpathfindinglinksetlist.cpp
index eb7b95552e..beceacb94a 100644
--- a/indra/newview/llpathfindinglinksetlist.cpp
+++ b/indra/newview/llpathfindinglinksetlist.cpp
@@ -141,15 +141,15 @@ bool LLPathfindingLinksetList::isShowCannotBeVolumeWarning(LLPathfindingLinkset:
return isShowWarning;
}
-void LLPathfindingLinksetList::determinePossibleStates(BOOL &pCanBeWalkable, BOOL &pCanBeStaticObstacle, BOOL &pCanBeDynamicObstacle,
- BOOL &pCanBeMaterialVolume, BOOL &pCanBeExclusionVolume, BOOL &pCanBeDynamicPhantom) const
+void LLPathfindingLinksetList::determinePossibleStates(bool &pCanBeWalkable, bool &pCanBeStaticObstacle, bool &pCanBeDynamicObstacle,
+ bool &pCanBeMaterialVolume, bool &pCanBeExclusionVolume, bool &pCanBeDynamicPhantom) const
{
- pCanBeWalkable = FALSE;
- pCanBeStaticObstacle = FALSE;
- pCanBeDynamicObstacle = FALSE;
- pCanBeMaterialVolume = FALSE;
- pCanBeExclusionVolume = FALSE;
- pCanBeDynamicPhantom = FALSE;
+ pCanBeWalkable = false;
+ pCanBeStaticObstacle = false;
+ pCanBeDynamicObstacle = false;
+ pCanBeMaterialVolume = false;
+ pCanBeExclusionVolume = false;
+ pCanBeDynamicPhantom = false;
for (const_iterator objectIter = begin();
!(pCanBeWalkable && pCanBeStaticObstacle && pCanBeDynamicObstacle && pCanBeMaterialVolume && pCanBeExclusionVolume && pCanBeDynamicPhantom) && (objectIter != end());
@@ -160,36 +160,36 @@ void LLPathfindingLinksetList::determinePossibleStates(BOOL &pCanBeWalkable, BOO
if (linkset->isTerrain())
{
- pCanBeWalkable = TRUE;
+ pCanBeWalkable = true;
}
else
{
if (linkset->isModifiable())
{
- pCanBeWalkable = TRUE;
- pCanBeStaticObstacle = TRUE;
- pCanBeDynamicObstacle = TRUE;
- pCanBeDynamicPhantom = TRUE;
+ pCanBeWalkable = true;
+ pCanBeStaticObstacle = true;
+ pCanBeDynamicObstacle = true;
+ pCanBeDynamicPhantom = true;
if (linkset->canBeVolume())
{
- pCanBeMaterialVolume = TRUE;
- pCanBeExclusionVolume = TRUE;
+ pCanBeMaterialVolume = true;
+ pCanBeExclusionVolume = true;
}
}
else if (linkset->isPhantom())
{
- pCanBeDynamicPhantom = TRUE;
+ pCanBeDynamicPhantom = true;
if (linkset->canBeVolume())
{
- pCanBeMaterialVolume = TRUE;
- pCanBeExclusionVolume = TRUE;
+ pCanBeMaterialVolume = true;
+ pCanBeExclusionVolume = true;
}
}
else
{
- pCanBeWalkable = TRUE;
- pCanBeStaticObstacle = TRUE;
- pCanBeDynamicObstacle = TRUE;
+ pCanBeWalkable = true;
+ pCanBeStaticObstacle = true;
+ pCanBeDynamicObstacle = true;
}
}
}
diff --git a/indra/newview/llpathfindinglinksetlist.h b/indra/newview/llpathfindinglinksetlist.h
index 1d38e4c11a..ef1559261e 100644
--- a/indra/newview/llpathfindinglinksetlist.h
+++ b/indra/newview/llpathfindinglinksetlist.h
@@ -46,8 +46,8 @@ public:
bool isShowPhantomToggleWarning(LLPathfindingLinkset::ELinksetUse pLinksetUse) const;
bool isShowCannotBeVolumeWarning(LLPathfindingLinkset::ELinksetUse pLinksetUse) const;
- void determinePossibleStates(BOOL &pCanBeWalkable, BOOL &pCanBeStaticObstacle, BOOL &pCanBeDynamicObstacle,
- BOOL &pCanBeMaterialVolume, BOOL &pCanBeExclusionVolume, BOOL &pCanBeDynamicPhantom) const;
+ void determinePossibleStates(bool &pCanBeWalkable, bool &pCanBeStaticObstacle, bool &pCanBeDynamicObstacle,
+ bool &pCanBeMaterialVolume, bool &pCanBeExclusionVolume, bool &pCanBeDynamicPhantom) const;
protected:
diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp
index 664e240484..dc1c749126 100644
--- a/indra/newview/llpathfindingmanager.cpp
+++ b/indra/newview/llpathfindingmanager.cpp
@@ -363,7 +363,7 @@ void LLPathfindingManager::requestGetAgentState()
if (currentRegion == NULL)
{
- mAgentStateSignal(FALSE);
+ mAgentStateSignal(false);
}
else
{
@@ -373,7 +373,7 @@ void LLPathfindingManager::requestGetAgentState()
}
else if (!isPathfindingEnabledForRegion(currentRegion))
{
- mAgentStateSignal(FALSE);
+ mAgentStateSignal(false);
}
else
{
@@ -708,7 +708,7 @@ void LLPathfindingManager::handleNavMeshStatusUpdate(const LLPathfindingNavMeshS
}
}
-void LLPathfindingManager::handleAgentState(BOOL pCanRebakeRegion)
+void LLPathfindingManager::handleAgentState(bool pCanRebakeRegion)
{
mAgentStateSignal(pCanRebakeRegion);
}
@@ -831,7 +831,7 @@ void LLAgentStateChangeNode::post(ResponsePtr pResponse, const LLSD &pContext, c
llassert(pInput.get(SIM_MESSAGE_BODY_FIELD).isMap());
llassert(pInput.get(SIM_MESSAGE_BODY_FIELD).has(AGENT_STATE_CAN_REBAKE_REGION_FIELD));
llassert(pInput.get(SIM_MESSAGE_BODY_FIELD).get(AGENT_STATE_CAN_REBAKE_REGION_FIELD).isBoolean());
- BOOL canRebakeRegion = pInput.get(SIM_MESSAGE_BODY_FIELD).get(AGENT_STATE_CAN_REBAKE_REGION_FIELD).asBoolean();
+ bool canRebakeRegion = pInput.get(SIM_MESSAGE_BODY_FIELD).get(AGENT_STATE_CAN_REBAKE_REGION_FIELD).asBoolean();
LLPathfindingManager::getInstance()->handleAgentState(canRebakeRegion);
}
diff --git a/indra/newview/llpathfindingmanager.h b/indra/newview/llpathfindingmanager.h
index 258d0fdef7..13589b603b 100644
--- a/indra/newview/llpathfindingmanager.h
+++ b/indra/newview/llpathfindingmanager.h
@@ -83,8 +83,8 @@ public:
void requestGetCharacters(request_id_t pRequestId, object_request_callback_t pCharactersCallback) const;
- typedef boost::function<void (BOOL)> agent_state_callback_t;
- typedef boost::signals2::signal<void (BOOL)> agent_state_signal_t;
+ typedef boost::function<void (bool)> agent_state_callback_t;
+ typedef boost::signals2::signal<void (bool)> agent_state_signal_t;
typedef boost::signals2::connection agent_state_slot_t;
agent_state_slot_t registerAgentStateListener(agent_state_callback_t pAgentStateCallback);
@@ -114,7 +114,7 @@ private:
//void handleNavMeshStatusRequest(const LLPathfindingNavMeshStatus &pNavMeshStatus, LLViewerRegion *pRegion, bool pIsGetStatusOnly);
void handleNavMeshStatusUpdate(const LLPathfindingNavMeshStatus &pNavMeshStatus);
- void handleAgentState(BOOL pCanRebakeRegion);
+ void handleAgentState(bool pCanRebakeRegion);
LLPathfindingNavMeshPtr getNavMeshForRegion(const LLUUID &pRegionUUID);
LLPathfindingNavMeshPtr getNavMeshForRegion(LLViewerRegion *pRegion);
diff --git a/indra/newview/llpathfindingobject.h b/indra/newview/llpathfindingobject.h
index 0114cce3f1..4095d05f36 100644
--- a/indra/newview/llpathfindingobject.h
+++ b/indra/newview/llpathfindingobject.h
@@ -56,10 +56,10 @@ public:
inline const LLUUID& getUUID() const {return mUUID;};
inline const std::string& getName() const {return mName;};
inline const std::string& getDescription() const {return mDescription;};
- inline BOOL hasOwner() const {return mOwnerUUID.notNull();};
+ inline bool hasOwner() const {return mOwnerUUID.notNull();};
inline bool hasOwnerName() const {return mHasOwnerName;};
std::string getOwnerName() const;
- inline BOOL isGroupOwned() const {return mIsGroupOwned;};
+ inline bool isGroupOwned() const {return mIsGroupOwned;};
inline const LLVector3& getLocation() const {return mLocation;};
typedef boost::function<void (const LLPathfindingObject *)> name_callback_t;
@@ -84,7 +84,7 @@ private:
bool mHasOwnerName;
LLAvatarName mOwnerName;
LLAvatarNameCache::callback_connection_t mAvatarNameCacheConnection;
- BOOL mIsGroupOwned;
+ bool mIsGroupOwned;
LLVector3 mLocation;
name_signal_t mOwnerNameSignal;
};
diff --git a/indra/newview/llpathfindingpathtool.cpp b/indra/newview/llpathfindingpathtool.cpp
index 3187325101..fd5a56b70d 100644
--- a/indra/newview/llpathfindingpathtool.cpp
+++ b/indra/newview/llpathfindingpathtool.cpp
@@ -63,9 +63,9 @@ LLPathfindingPathTool::~LLPathfindingPathTool()
{
}
-BOOL LLPathfindingPathTool::handleMouseDown(S32 pX, S32 pY, MASK pMask)
+bool LLPathfindingPathTool::handleMouseDown(S32 pX, S32 pY, MASK pMask)
{
- BOOL returnVal = FALSE;
+ bool returnVal = false;
if (!mIsLeftMouseButtonHeld && !mIsMiddleMouseButtonHeld && !mIsRightMouseButtonHeld)
{
@@ -76,15 +76,15 @@ BOOL LLPathfindingPathTool::handleMouseDown(S32 pX, S32 pY, MASK pMask)
: UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD);
computeFinalPoints(pX, pY, pMask);
mIsLeftMouseButtonHeld = true;
- setMouseCapture(TRUE);
- returnVal = TRUE;
+ setMouseCapture(true);
+ returnVal = true;
}
else if (!isCameraModKeys(pMask))
{
gViewerWindow->setCursor(UI_CURSOR_TOOLNO);
mIsLeftMouseButtonHeld = true;
- setMouseCapture(TRUE);
- returnVal = TRUE;
+ setMouseCapture(true);
+ returnVal = true;
}
}
mIsLeftMouseButtonHeld = true;
@@ -92,69 +92,69 @@ BOOL LLPathfindingPathTool::handleMouseDown(S32 pX, S32 pY, MASK pMask)
return returnVal;
}
-BOOL LLPathfindingPathTool::handleMouseUp(S32 pX, S32 pY, MASK pMask)
+bool LLPathfindingPathTool::handleMouseUp(S32 pX, S32 pY, MASK pMask)
{
- BOOL returnVal = FALSE;
+ bool returnVal = false;
if (mIsLeftMouseButtonHeld && !mIsMiddleMouseButtonHeld && !mIsRightMouseButtonHeld)
{
computeFinalPoints(pX, pY, pMask);
- setMouseCapture(FALSE);
- returnVal = TRUE;
+ setMouseCapture(false);
+ returnVal = true;
}
mIsLeftMouseButtonHeld = false;
return returnVal;
}
-BOOL LLPathfindingPathTool::handleMiddleMouseDown(S32 pX, S32 pY, MASK pMask)
+bool LLPathfindingPathTool::handleMiddleMouseDown(S32 pX, S32 pY, MASK pMask)
{
- setMouseCapture(TRUE);
+ setMouseCapture(true);
mIsMiddleMouseButtonHeld = true;
gViewerWindow->setCursor(UI_CURSOR_TOOLNO);
- return TRUE;
+ return true;
}
-BOOL LLPathfindingPathTool::handleMiddleMouseUp(S32 pX, S32 pY, MASK pMask)
+bool LLPathfindingPathTool::handleMiddleMouseUp(S32 pX, S32 pY, MASK pMask)
{
if (!mIsLeftMouseButtonHeld && mIsMiddleMouseButtonHeld && !mIsRightMouseButtonHeld)
{
- setMouseCapture(FALSE);
+ setMouseCapture(false);
}
mIsMiddleMouseButtonHeld = false;
- return TRUE;
+ return true;
}
-BOOL LLPathfindingPathTool::handleRightMouseDown(S32 pX, S32 pY, MASK pMask)
+bool LLPathfindingPathTool::handleRightMouseDown(S32 pX, S32 pY, MASK pMask)
{
- setMouseCapture(TRUE);
+ setMouseCapture(true);
mIsRightMouseButtonHeld = true;
gViewerWindow->setCursor(UI_CURSOR_TOOLNO);
- return TRUE;
+ return true;
}
-BOOL LLPathfindingPathTool::handleRightMouseUp(S32 pX, S32 pY, MASK pMask)
+bool LLPathfindingPathTool::handleRightMouseUp(S32 pX, S32 pY, MASK pMask)
{
if (!mIsLeftMouseButtonHeld && !mIsMiddleMouseButtonHeld && mIsRightMouseButtonHeld)
{
- setMouseCapture(FALSE);
+ setMouseCapture(false);
}
mIsRightMouseButtonHeld = false;
- return TRUE;
+ return true;
}
-BOOL LLPathfindingPathTool::handleDoubleClick(S32 pX, S32 pY, MASK pMask)
+bool LLPathfindingPathTool::handleDoubleClick(S32 pX, S32 pY, MASK pMask)
{
- return TRUE;
+ return true;
}
-BOOL LLPathfindingPathTool::handleHover(S32 pX, S32 pY, MASK pMask)
+bool LLPathfindingPathTool::handleHover(S32 pX, S32 pY, MASK pMask)
{
- BOOL returnVal = FALSE;
+ bool returnVal = false;
if (!mIsLeftMouseButtonHeld && !mIsMiddleMouseButtonHeld && !mIsRightMouseButtonHeld && !isAnyPathToolModKeys(pMask))
{
@@ -167,7 +167,7 @@ BOOL LLPathfindingPathTool::handleHover(S32 pX, S32 pY, MASK pMask)
? (mIsLeftMouseButtonHeld ? UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD : UI_CURSOR_TOOLPATHFINDING_PATH_START)
: (mIsLeftMouseButtonHeld ? UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD : UI_CURSOR_TOOLPATHFINDING_PATH_END));
computeTempPoints(pX, pY, pMask);
- returnVal = TRUE;
+ returnVal = true;
}
else
{
@@ -178,7 +178,7 @@ BOOL LLPathfindingPathTool::handleHover(S32 pX, S32 pY, MASK pMask)
return returnVal;
}
-BOOL LLPathfindingPathTool::handleKey(KEY pKey, MASK pMask)
+bool LLPathfindingPathTool::handleKey(KEY pKey, MASK pMask)
{
// Eat the escape key or else the camera tool will pick up and reset to default view. This,
// in turn, will cause some other methods to get called. And one of those methods will reset
diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h
index f98624e30d..f9b3e170f4 100644
--- a/indra/newview/llpathfindingpathtool.h
+++ b/indra/newview/llpathfindingpathtool.h
@@ -66,17 +66,17 @@ public:
typedef boost::signals2::signal<void (void)> path_event_signal_t;
typedef boost::signals2::connection path_event_slot_t;
- virtual BOOL handleMouseDown(S32 pX, S32 pY, MASK pMask) override;
- virtual BOOL handleMouseUp(S32 pX, S32 pY, MASK pMask) override;
- virtual BOOL handleMiddleMouseDown(S32 pX, S32 pY, MASK pMask) override;
- virtual BOOL handleMiddleMouseUp(S32 pX, S32 pY, MASK pMask) override;
- virtual BOOL handleRightMouseDown(S32 pX, S32 pY, MASK pMask) override;
- virtual BOOL handleRightMouseUp(S32 pX, S32 pY, MASK pMask) override;
- virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask) override;
+ virtual bool handleMouseDown(S32 pX, S32 pY, MASK pMask) override;
+ virtual bool handleMouseUp(S32 pX, S32 pY, MASK pMask) override;
+ virtual bool handleMiddleMouseDown(S32 pX, S32 pY, MASK pMask) override;
+ virtual bool handleMiddleMouseUp(S32 pX, S32 pY, MASK pMask) override;
+ virtual bool handleRightMouseDown(S32 pX, S32 pY, MASK pMask) override;
+ virtual bool handleRightMouseUp(S32 pX, S32 pY, MASK pMask) override;
+ virtual bool handleDoubleClick(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleHover(S32 pX, S32 pY, MASK pMask) override;
+ virtual bool handleHover(S32 pX, S32 pY, MASK pMask) override;
- virtual BOOL handleKey(KEY pKey, MASK pMask) override;
+ virtual bool handleKey(KEY pKey, MASK pMask) override;
EPathStatus getPathStatus() const;
diff --git a/indra/newview/llperfstats.cpp b/indra/newview/llperfstats.cpp
index 8718f7e7b0..946005b387 100644
--- a/indra/newview/llperfstats.cpp
+++ b/indra/newview/llperfstats.cpp
@@ -131,14 +131,14 @@ namespace LLPerfStats
if(gSavedSettings.getBOOL("AutoTuneLock") && !gSavedSettings.getU32("KeepAutoTuneLock"))
{
- gSavedSettings.setBOOL("AutoTuneLock", FALSE);
+ gSavedSettings.setBOOL("AutoTuneLock", false);
}
LLPerfStats::tunables.userAutoTuneEnabled = LLPerfStats::tunables.userAutoTuneLock;
if (LLPerfStats::tunables.userAutoTuneEnabled && !gSavedSettings.getBOOL("AutoTuneFPS"))
{
- gSavedSettings.setBOOL("AutoTuneFPS", TRUE);
+ gSavedSettings.setBOOL("AutoTuneFPS", true);
}
// Note: The Max ART slider is logarithmic and thus we have an intermediate proxy value
diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp
index 03a02ba26f..13a272c6d8 100644
--- a/indra/newview/llphysicsmotion.cpp
+++ b/indra/newview/llphysicsmotion.cpp
@@ -120,11 +120,11 @@ public:
}
}
- BOOL initialize();
+ bool initialize();
~LLPhysicsMotion() {}
- BOOL onUpdate(F32 time);
+ bool onUpdate(F32 time);
LLPointer<LLJointState> getJointState()
{
@@ -217,20 +217,20 @@ default_controller_map_t initDefaultController()
default_controller_map_t LLPhysicsMotion::sDefaultController = initDefaultController();
-BOOL LLPhysicsMotion::initialize()
+bool LLPhysicsMotion::initialize()
{
if (!mJointState->setJoint(mCharacter->getJoint(mJointName.c_str())))
- return FALSE;
+ return false;
mJointState->setUsage(LLJointState::ROT);
mParamDriver = (LLViewerVisualParam*)mCharacter->getVisualParam(mParamDriverName.c_str());
if (mParamDriver == NULL)
{
LL_INFOS() << "Failure reading in [ " << mParamDriverName << " ]" << LL_ENDL;
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
LLPhysicsMotionController::LLPhysicsMotionController(const LLUUID &id) :
@@ -250,9 +250,9 @@ LLPhysicsMotionController::~LLPhysicsMotionController()
}
}
-BOOL LLPhysicsMotionController::onActivate()
-{
- return TRUE;
+bool LLPhysicsMotionController::onActivate()
+{
+ return true;
}
void LLPhysicsMotionController::onDeactivate()
@@ -282,7 +282,7 @@ LLMotion::LLMotionInitStatus LLPhysicsMotionController::onInitialize(LLCharacter
controller);
if (!motion->initialize())
{
- llassert_always(FALSE);
+ llassert_always(false);
return STATUS_FAILURE;
}
addMotion(motion);
@@ -305,7 +305,7 @@ LLMotion::LLMotionInitStatus LLPhysicsMotionController::onInitialize(LLCharacter
controller);
if (!motion->initialize())
{
- llassert_always(FALSE);
+ llassert_always(false);
return STATUS_FAILURE;
}
addMotion(motion);
@@ -328,7 +328,7 @@ LLMotion::LLMotionInitStatus LLPhysicsMotionController::onInitialize(LLCharacter
controller);
if (!motion->initialize())
{
- llassert_always(FALSE);
+ llassert_always(false);
return STATUS_FAILURE;
}
addMotion(motion);
@@ -350,7 +350,7 @@ LLMotion::LLMotionInitStatus LLPhysicsMotionController::onInitialize(LLCharacter
controller);
if (!motion->initialize())
{
- llassert_always(FALSE);
+ llassert_always(false);
return STATUS_FAILURE;
}
addMotion(motion);
@@ -373,7 +373,7 @@ LLMotion::LLMotionInitStatus LLPhysicsMotionController::onInitialize(LLCharacter
controller);
if (!motion->initialize())
{
- llassert_always(FALSE);
+ llassert_always(false);
return STATUS_FAILURE;
}
addMotion(motion);
@@ -396,7 +396,7 @@ LLMotion::LLMotionInitStatus LLPhysicsMotionController::onInitialize(LLCharacter
controller);
if (!motion->initialize())
{
- llassert_always(FALSE);
+ llassert_always(false);
return STATUS_FAILURE;
}
addMotion(motion);
@@ -451,16 +451,16 @@ F32 LLPhysicsMotion::calculateAcceleration_local(const F32 velocity_local, const
return smoothed_acceleration_local;
}
-BOOL LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask)
+bool LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
// Skip if disabled globally.
if (!gSavedSettings.getBOOL("AvatarPhysics"))
{
- return TRUE;
+ return true;
}
- BOOL update_visuals = FALSE;
+ bool update_visuals = false;
for (motion_vec_t::iterator iter = mMotions.begin();
iter != mMotions.end();
++iter)
@@ -472,21 +472,21 @@ BOOL LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask)
if (update_visuals)
mCharacter->updateVisualParams();
- return TRUE;
+ return true;
}
-// Return TRUE if character has to update visual params.
-BOOL LLPhysicsMotion::onUpdate(F32 time)
+// Return true if character has to update visual params.
+bool LLPhysicsMotion::onUpdate(F32 time)
{
// static FILE *mFileWrite = fopen("c:\\temp\\avatar_data.txt","w");
if (!mParamDriver)
- return FALSE;
+ return false;
if (!mLastTime || mLastTime >= time)
{
mLastTime = time;
- return FALSE;
+ return false;
}
////////////////////////////////////////////////////////////////////////////////
@@ -499,7 +499,7 @@ BOOL LLPhysicsMotion::onUpdate(F32 time)
if (time_delta > 1.0)
{
mLastTime = time;
- return FALSE;
+ return false;
}
// Higher LOD is better. This controls the granularity
@@ -507,7 +507,7 @@ BOOL LLPhysicsMotion::onUpdate(F32 time)
const F32 lod_factor = LLVOAvatar::sPhysicsLODFactor;
if (lod_factor == 0)
{
- return TRUE;
+ return true;
}
LLJoint *joint = mJointState->getJoint();
@@ -520,7 +520,7 @@ BOOL LLPhysicsMotion::onUpdate(F32 time)
const F32 behavior_drag = getParamValue(DRAG);
F32 behavior_maxeffect = getParamValue(MAX_EFFECT);
- const BOOL physics_test = FALSE; // Enable this to simulate bouncing on all parts.
+ const bool physics_test = false; // Enable this to simulate bouncing on all parts.
if (physics_test)
behavior_maxeffect = 1.0f;
@@ -548,7 +548,7 @@ BOOL LLPhysicsMotion::onUpdate(F32 time)
// End velocity and acceleration
////////////////////////////////////////////////////////////////////////////////
- BOOL update_visuals = FALSE;
+ bool update_visuals = false;
// Break up the physics into a bunch of iterations so that differing framerates will show
// roughly the same behavior.
@@ -700,14 +700,14 @@ BOOL LLPhysicsMotion::onUpdate(F32 time)
const F32 area_for_this_setting = area_for_max_settings + (area_for_min_settings-area_for_max_settings)*(1.0-lod_factor);
const F32 pixel_area = sqrtf(mCharacter->getPixelArea());
- const BOOL is_self = (dynamic_cast<LLVOAvatarSelf *>(mCharacter) != NULL);
+ const bool is_self = (dynamic_cast<LLVOAvatarSelf *>(mCharacter) != NULL);
if ((pixel_area > area_for_this_setting) || is_self)
{
const F32 position_diff_local = llabs(mPositionLastUpdate_local-position_new_local_clamped);
const F32 min_delta = (1.0001f-lod_factor)*0.4f;
if (llabs(position_diff_local) > min_delta)
{
- update_visuals = TRUE;
+ update_visuals = true;
mPositionLastUpdate_local = position_new_local;
}
}
diff --git a/indra/newview/llphysicsmotion.h b/indra/newview/llphysicsmotion.h
index b246fa99bb..259a9abde6 100644
--- a/indra/newview/llphysicsmotion.h
+++ b/indra/newview/llphysicsmotion.h
@@ -66,7 +66,7 @@ public:
//-------------------------------------------------------------------------
// motions must specify whether or not they loop
- virtual BOOL getLoop() { return TRUE; }
+ virtual bool getLoop() { return true; }
// motions must report their total duration
virtual F32 getDuration() { return 0.0; }
@@ -91,14 +91,14 @@ public:
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
// called when a motion is activated
- // must return TRUE to indicate success, or else
+ // must return true to indicate success, or else
// it will be deactivated
- virtual BOOL onActivate();
+ virtual bool onActivate();
// called per time step
- // must return TRUE while it is active, and
- // must return FALSE when the motion is completed.
- virtual BOOL onUpdate(F32 time, U8* joint_mask);
+ // must return true while it is active, and
+ // must return false when the motion is completed.
+ virtual bool onUpdate(F32 time, U8* joint_mask);
// called when a motion is deactivated
virtual void onDeactivate();
diff --git a/indra/newview/llplacesfolderview.cpp b/indra/newview/llplacesfolderview.cpp
index fe89c1e314..0d9fd5ac8b 100644
--- a/indra/newview/llplacesfolderview.cpp
+++ b/indra/newview/llplacesfolderview.cpp
@@ -39,10 +39,10 @@ LLPlacesFolderView::LLPlacesFolderView(const LLFolderView::Params& p)
// we do not need auto select functionality in places landmarks, so override default behavior.
// this disables applying of the LLSelectFirstFilteredItem in LLFolderView::doIdle.
// Fixed issues: EXT-1631, EXT-4994.
- mAutoSelectOverride = TRUE;
+ mAutoSelectOverride = true;
}
-BOOL LLPlacesFolderView::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLPlacesFolderView::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
// let children to change selection first
childrenHandleRightMouseDown(x, y, mask);
diff --git a/indra/newview/llplacesfolderview.h b/indra/newview/llplacesfolderview.h
index 65fe76007a..359d136eca 100644
--- a/indra/newview/llplacesfolderview.h
+++ b/indra/newview/llplacesfolderview.h
@@ -49,7 +49,7 @@ public:
* Contains workaround for EXT-2786: sets current selected list for landmark
* panel using @c mParentLandmarksPanel which is set in @c LLLandmarksPanel::initLandmarksPanel
*/
- /*virtual*/ BOOL handleRightMouseDown( S32 x, S32 y, MASK mask );
+ /*virtual*/ bool handleRightMouseDown( S32 x, S32 y, MASK mask );
/*virtual*/ void updateMenu();
diff --git a/indra/newview/llplacesinventorypanel.cpp b/indra/newview/llplacesinventorypanel.cpp
index f3455bb4f0..ccb2feac10 100644
--- a/indra/newview/llplacesinventorypanel.cpp
+++ b/indra/newview/llplacesinventorypanel.cpp
@@ -48,7 +48,7 @@ LLPlacesInventoryPanel::LLPlacesInventoryPanel(const Params& p) :
{
mInvFVBridgeBuilder = &PLACES_INVENTORY_BUILDER;
mSavedFolderState = new LLSaveFolderState();
- mSavedFolderState->setApply(FALSE);
+ mSavedFolderState->setApply(false);
}
@@ -90,14 +90,14 @@ LLFolderView * LLPlacesInventoryPanel::createFolderRoot(LLUUID root_id )
// save current folder open state
void LLPlacesInventoryPanel::saveFolderState()
{
- mSavedFolderState->setApply(FALSE);
+ mSavedFolderState->setApply(false);
mFolderRoot.get()->applyFunctorRecursively(*mSavedFolderState);
}
// re-open folders which state was saved
void LLPlacesInventoryPanel::restoreFolderState()
{
- mSavedFolderState->setApply(TRUE);
+ mSavedFolderState->setApply(true);
mFolderRoot.get()->applyFunctorRecursively(*mSavedFolderState);
LLOpenFoldersWithSelection opener;
mFolderRoot.get()->applyFunctorRecursively(opener);
@@ -121,12 +121,12 @@ S32 LLPlacesInventoryPanel::notify(const LLSD& info)
return 0;
}
-BOOL LLPlacesInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data,
+bool LLPlacesInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void *cargo_data,
EAcceptance *accept, std::string &tooltip_msg)
{
if (mAcceptsDragAndDrop)
{
return LLInventoryPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
}
- return FALSE;
+ return false;
}
diff --git a/indra/newview/llplacesinventorypanel.h b/indra/newview/llplacesinventorypanel.h
index 81b623b045..0f6aa03e0d 100644
--- a/indra/newview/llplacesinventorypanel.h
+++ b/indra/newview/llplacesinventorypanel.h
@@ -53,7 +53,7 @@ public:
virtual S32 notify(const LLSD& info) override;
- BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data,
+ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void *cargo_data,
EAcceptance *accept, std::string &tooltip_msg) override;
private:
diff --git a/indra/newview/llpopupview.cpp b/indra/newview/llpopupview.cpp
index d1a9ca229f..22c9b191a3 100644
--- a/indra/newview/llpopupview.cpp
+++ b/indra/newview/llpopupview.cpp
@@ -94,12 +94,12 @@ void LLPopupView::draw()
LLPanel::draw();
}
-BOOL LLPopupView::handleMouseEvent(boost::function<BOOL(LLView*, S32, S32)> func,
+bool LLPopupView::handleMouseEvent(boost::function<bool(LLView*, S32, S32)> func,
boost::function<bool(LLView*)> predicate,
S32 x, S32 y,
bool close_popups)
{
- BOOL handled = FALSE;
+ bool handled = false;
// make a copy of list of popups, in case list is modified during mouse event handling
popup_list_t popups(mPopups);
@@ -120,7 +120,7 @@ BOOL LLPopupView::handleMouseEvent(boost::function<BOOL(LLView*, S32, S32)> func
{
if (func(popup, popup_x, popup_y))
{
- handled = TRUE;
+ handled = true;
break;
}
}
@@ -136,9 +136,9 @@ BOOL LLPopupView::handleMouseEvent(boost::function<BOOL(LLView*, S32, S32)> func
}
-BOOL LLPopupView::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLPopupView::handleMouseDown(S32 x, S32 y, MASK mask)
{
- BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleMouseDown, _1, _2, _3, mask), view_visible_and_enabled, x, y, true);
+ bool handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleMouseDown, _1, _2, _3, mask), view_visible_and_enabled, x, y, true);
if (!handled)
{
handled = LLPanel::handleMouseDown(x, y, mask);
@@ -146,9 +146,9 @@ BOOL LLPopupView::handleMouseDown(S32 x, S32 y, MASK mask)
return handled;
}
-BOOL LLPopupView::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLPopupView::handleMouseUp(S32 x, S32 y, MASK mask)
{
- BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleMouseUp, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
+ bool handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleMouseUp, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
if (!handled)
{
handled = LLPanel::handleMouseUp(x, y, mask);
@@ -156,9 +156,9 @@ BOOL LLPopupView::handleMouseUp(S32 x, S32 y, MASK mask)
return handled;
}
-BOOL LLPopupView::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
+bool LLPopupView::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
{
- BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleMiddleMouseDown, _1, _2, _3, mask), view_visible_and_enabled, x, y, true);
+ bool handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleMiddleMouseDown, _1, _2, _3, mask), view_visible_and_enabled, x, y, true);
if (!handled)
{
handled = LLPanel::handleMiddleMouseDown(x, y, mask);
@@ -166,9 +166,9 @@ BOOL LLPopupView::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
return handled;
}
-BOOL LLPopupView::handleMiddleMouseUp(S32 x, S32 y, MASK mask)
+bool LLPopupView::handleMiddleMouseUp(S32 x, S32 y, MASK mask)
{
- BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleMiddleMouseUp, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
+ bool handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleMiddleMouseUp, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
if (!handled)
{
handled = LLPanel::handleMiddleMouseUp(x, y, mask);
@@ -176,9 +176,9 @@ BOOL LLPopupView::handleMiddleMouseUp(S32 x, S32 y, MASK mask)
return handled;
}
-BOOL LLPopupView::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLPopupView::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
- BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleRightMouseDown, _1, _2, _3, mask), view_visible_and_enabled, x, y, true);
+ bool handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleRightMouseDown, _1, _2, _3, mask), view_visible_and_enabled, x, y, true);
if (!handled)
{
handled = LLPanel::handleRightMouseDown(x, y, mask);
@@ -186,9 +186,9 @@ BOOL LLPopupView::handleRightMouseDown(S32 x, S32 y, MASK mask)
return handled;
}
-BOOL LLPopupView::handleRightMouseUp(S32 x, S32 y, MASK mask)
+bool LLPopupView::handleRightMouseUp(S32 x, S32 y, MASK mask)
{
- BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleRightMouseUp, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
+ bool handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleRightMouseUp, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
if (!handled)
{
handled = LLPanel::handleRightMouseUp(x, y, mask);
@@ -196,9 +196,9 @@ BOOL LLPopupView::handleRightMouseUp(S32 x, S32 y, MASK mask)
return handled;
}
-BOOL LLPopupView::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLPopupView::handleDoubleClick(S32 x, S32 y, MASK mask)
{
- BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleDoubleClick, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
+ bool handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleDoubleClick, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
if (!handled)
{
handled = LLPanel::handleDoubleClick(x, y, mask);
@@ -206,9 +206,9 @@ BOOL LLPopupView::handleDoubleClick(S32 x, S32 y, MASK mask)
return handled;
}
-BOOL LLPopupView::handleHover(S32 x, S32 y, MASK mask)
+bool LLPopupView::handleHover(S32 x, S32 y, MASK mask)
{
- BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleHover, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
+ bool handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleHover, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
if (!handled)
{
handled = LLPanel::handleHover(x, y, mask);
@@ -216,9 +216,9 @@ BOOL LLPopupView::handleHover(S32 x, S32 y, MASK mask)
return handled;
}
-BOOL LLPopupView::handleScrollWheel(S32 x, S32 y, S32 clicks)
+bool LLPopupView::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
- BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleScrollWheel, _1, _2, _3, clicks), view_visible_and_enabled, x, y, false);
+ bool handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleScrollWheel, _1, _2, _3, clicks), view_visible_and_enabled, x, y, false);
if (!handled)
{
handled = LLPanel::handleScrollWheel(x, y, clicks);
@@ -226,9 +226,9 @@ BOOL LLPopupView::handleScrollWheel(S32 x, S32 y, S32 clicks)
return handled;
}
-BOOL LLPopupView::handleToolTip(S32 x, S32 y, MASK mask)
+bool LLPopupView::handleToolTip(S32 x, S32 y, MASK mask)
{
- BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleToolTip, _1, _2, _3, mask), view_visible, x, y, false);
+ bool handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleToolTip, _1, _2, _3, mask), view_visible, x, y, false);
if (!handled)
{
handled = LLPanel::handleToolTip(x, y, mask);
diff --git a/indra/newview/llpopupview.h b/indra/newview/llpopupview.h
index b378f61984..665271668a 100644
--- a/indra/newview/llpopupview.h
+++ b/indra/newview/llpopupview.h
@@ -36,16 +36,16 @@ public:
~LLPopupView();
/*virtual*/ void draw();
- /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleMiddleMouseUp(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleRightMouseUp(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
- /*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleMiddleMouseDown(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleMiddleMouseUp(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleRightMouseUp(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleDoubleClick(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleScrollWheel(S32 x, S32 y, S32 clicks);
+ /*virtual*/ bool handleToolTip(S32 x, S32 y, MASK mask);
void addPopup(LLView* popup);
void removePopup(LLView* popup);
@@ -55,7 +55,7 @@ public:
popup_list_t getCurrentPopups() { return mPopups; }
private:
- BOOL handleMouseEvent(boost::function<BOOL(LLView*, S32, S32)>, boost::function<bool(LLView*)>, S32 x, S32 y, bool close_popups);
+ bool handleMouseEvent(boost::function<bool(LLView*, S32, S32)>, boost::function<bool(LLView*)>, S32 x, S32 y, bool close_popups);
popup_list_t mPopups;
};
#endif //LL_LLROOTVIEW_H
diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp
index 30d0a22ef0..b13b91a6cd 100644
--- a/indra/newview/llpresetsmanager.cpp
+++ b/indra/newview/llpresetsmanager.cpp
@@ -426,7 +426,7 @@ bool LLPresetsManager::setPresetNamesInComboBox(const std::string& subdirectory,
bool sts = true;
combo->clearRows();
- combo->setEnabled(TRUE);
+ combo->setEnabled(true);
std::list<std::string> preset_names;
loadPresetNamesFromDir(subdirectory, preset_names, default_option);
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index 0117db86e8..22600f7fc3 100644
--- a/indra/newview/llpreview.cpp
+++ b/indra/newview/llpreview.cpp
@@ -58,26 +58,26 @@ LLPreview::LLPreview(const LLSD& key)
mItemUUID(key.has("itemid") ? key.get("itemid").asUUID() : key.asUUID()),
mObjectUUID(), // set later by setObjectID()
mCopyToInvBtn( NULL ),
- mForceClose(FALSE),
- mUserResized(FALSE),
- mCloseAfterSave(FALSE),
+ mForceClose(false),
+ mUserResized(false),
+ mCloseAfterSave(false),
mAssetStatus(PREVIEW_ASSET_UNLOADED),
- mDirty(TRUE),
- mSaveDialogShown(FALSE)
+ mDirty(true),
+ mSaveDialogShown(false)
{
mAuxItem = new LLInventoryItem;
// don't necessarily steal focus on creation -- sometimes these guys pop up without user action
- setAutoFocus(FALSE);
+ setAutoFocus(false);
gInventory.addObserver(this);
refreshFromItem();
}
-BOOL LLPreview::postBuild()
+bool LLPreview::postBuild()
{
refreshFromItem();
- return TRUE;
+ return true;
}
LLPreview::~LLPreview()
@@ -142,7 +142,7 @@ void LLPreview::onCommit()
if (!item->isFinished())
{
// We are attempting to save an item that was never loaded
- LL_WARNS() << "LLPreview::onCommit() called with mIsComplete == FALSE"
+ LL_WARNS() << "LLPreview::onCommit() called with mIsComplete == false"
<< " Type: " << item->getType()
<< " ID: " << item->getUUID()
<< LL_ENDL;
@@ -172,7 +172,7 @@ void LLPreview::onCommit()
}
else if(item->getPermissions().getOwner() == gAgent.getID())
{
- new_item->updateServer(FALSE);
+ new_item->updateServer(false);
gInventory.updateItem(new_item);
gInventory.notifyObservers();
@@ -186,7 +186,7 @@ void LLPreview::onCommit()
if( obj )
{
LLSelectMgr::getInstance()->deselectAll();
- LLSelectMgr::getInstance()->addAsIndividual( obj, SELECT_ALL_TES, FALSE );
+ LLSelectMgr::getInstance()->addAsIndividual( obj, SELECT_ALL_TES, false );
LLSelectMgr::getInstance()->selectionSetObjectDescription( getChild<LLUICtrl>("desc")->getValue().asString() );
LLSelectMgr::getInstance()->deselectAll();
@@ -199,7 +199,7 @@ void LLPreview::onCommit()
void LLPreview::changed(U32 mask)
{
- mDirty = TRUE;
+ mDirty = true;
}
void LLPreview::setNotecardInfo(const LLUUID& notecard_inv_id,
@@ -214,7 +214,7 @@ void LLPreview::draw()
LLFloater::draw();
if (mDirty)
{
- mDirty = FALSE;
+ mDirty = false;
refreshFromItem();
}
}
@@ -239,7 +239,7 @@ void LLPreview::refreshFromItem()
}
// static
-BOOL LLPreview::canModify(const LLUUID taskUUID, const LLInventoryItem* item)
+bool LLPreview::canModify(const LLUUID taskUUID, const LLInventoryItem* item)
{
const LLViewerObject* object = nullptr;
if (taskUUID.notNull())
@@ -251,12 +251,12 @@ BOOL LLPreview::canModify(const LLUUID taskUUID, const LLInventoryItem* item)
}
// static
-BOOL LLPreview::canModify(const LLViewerObject* object, const LLInventoryItem* item)
+bool LLPreview::canModify(const LLViewerObject* object, const LLInventoryItem* item)
{
if (object && !object->permModify())
{
// No permission to edit in-world inventory
- return FALSE;
+ return false;
}
return item && gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), GP_OBJECT_MANIPULATE);
@@ -277,7 +277,7 @@ void LLPreview::onRadio(LLUICtrl*, void* userdata)
}
// static
-void LLPreview::hide(const LLUUID& item_uuid, BOOL no_saving /* = FALSE */ )
+void LLPreview::hide(const LLUUID& item_uuid, bool no_saving /* = false */ )
{
LLFloater* floater = LLFloaterReg::findInstance("preview", LLSD(item_uuid));
if (!floater) floater = LLFloaterReg::findInstance("preview_avatar", LLSD(item_uuid));
@@ -287,7 +287,7 @@ void LLPreview::hide(const LLUUID& item_uuid, BOOL no_saving /* = FALSE */ )
{
if ( no_saving )
{
- preview->mForceClose = TRUE;
+ preview->mForceClose = true;
}
preview->closeFloater();
}
@@ -302,11 +302,11 @@ void LLPreview::dirty(const LLUUID& item_uuid)
LLPreview* preview = dynamic_cast<LLPreview*>(floater);
if(preview)
{
- preview->mDirty = TRUE;
+ preview->mDirty = true;
}
}
-BOOL LLPreview::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLPreview::handleMouseDown(S32 x, S32 y, MASK mask)
{
if(mClientRect.pointInRect(x, y))
{
@@ -318,22 +318,22 @@ BOOL LLPreview::handleMouseDown(S32 x, S32 y, MASK mask)
S32 screen_y;
localPointToScreen(x, y, &screen_x, &screen_y );
LLToolDragAndDrop::getInstance()->setDragStart(screen_x, screen_y);
- return TRUE;
+ return true;
}
return LLFloater::handleMouseDown(x, y, mask);
}
-BOOL LLPreview::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLPreview::handleMouseUp(S32 x, S32 y, MASK mask)
{
if(hasMouseCapture())
{
gFocusMgr.setMouseCapture(NULL);
- return TRUE;
+ return true;
}
return LLFloater::handleMouseUp(x, y, mask);
}
-BOOL LLPreview::handleHover(S32 x, S32 y, MASK mask)
+bool LLPreview::handleHover(S32 x, S32 y, MASK mask)
{
if(hasMouseCapture())
{
@@ -442,7 +442,7 @@ void LLPreview::onDiscardBtn(void* data)
const LLInventoryItem* item = self->getItem();
if (!item) return;
- self->mForceClose = TRUE;
+ self->mForceClose = true;
self->closeFloater();
// Move the item to the trash
@@ -460,7 +460,7 @@ void LLPreview::onDiscardBtn(void* data)
new_item->setParent(trash_id);
// no need to restamp it though it's a move into trash because
// it's a brand new item already.
- new_item->updateParentOnServer(FALSE);
+ new_item->updateParentOnServer(false);
gInventory.updateItem(new_item);
gInventory.notifyObservers();
}
@@ -495,7 +495,7 @@ LLMultiPreview::LLMultiPreview()
}
setTitle(LLTrans::getString("MultiPreviewTitle"));
buildTabContainer();
- setCanResize(TRUE);
+ setCanResize(true);
}
void LLMultiPreview::onOpen(const LLSD& key)
diff --git a/indra/newview/llpreview.h b/indra/newview/llpreview.h
index 3688ee0192..43cdde514c 100644
--- a/indra/newview/llpreview.h
+++ b/indra/newview/llpreview.h
@@ -68,7 +68,7 @@ public:
LLPreview(const LLSD& key );
virtual ~LLPreview();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
virtual void setObjectID(const LLUUID& object_id);
void setItem( LLInventoryItem* item );
@@ -76,30 +76,27 @@ public:
void setAssetId(const LLUUID& asset_id);
const LLInventoryItem* getItem() const; // searches if not constructed with it
- static void hide(const LLUUID& item_uuid, BOOL no_saving = FALSE );
+ static void hide(const LLUUID& item_uuid, bool no_saving = false );
static void dirty(const LLUUID& item_uuid);
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- virtual BOOL handleHover(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask);
+ virtual bool handleHover(S32 x, S32 y, MASK mask);
virtual void onOpen(const LLSD& key);
virtual void setAuxItem( const LLInventoryItem* item );
static void onBtnCopyToInv(void* userdata);
- void addKeepDiscardButtons();
static void onKeepBtn(void* data);
static void onDiscardBtn(void* data);
/*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false);
- void userResized() { mUserResized = TRUE; };
+ void userResized() { mUserResized = true; };
virtual void loadAsset() { mAssetStatus = PREVIEW_ASSET_LOADED; }
virtual EAssetStatus getAssetStatus() { return mAssetStatus;}
- static LLPreview* getFirstPreviewForSource(const LLUUID& source_id);
-
// Why is this at the LLPreview level? JC
void setNotecardInfo(const LLUUID& notecard_inv_id, const LLUUID& object_id);
@@ -109,21 +106,19 @@ public:
// We can't modify Item or description in preview if either in-world Object
// or Item itself is unmodifiable
- static BOOL canModify(const LLUUID taskUUID, const LLInventoryItem* item);
- static BOOL canModify(const LLViewerObject* object, const LLInventoryItem* item);
+ static bool canModify(const LLUUID taskUUID, const LLInventoryItem* item);
+ static bool canModify(const LLViewerObject* object, const LLInventoryItem* item);
protected:
virtual void onCommit();
- void addDescriptionUI();
-
static void onText(LLUICtrl*, void* userdata);
static void onRadio(LLUICtrl*, void* userdata);
// for LLInventoryObserver
virtual void changed(U32 mask);
- BOOL mDirty;
- BOOL mSaveDialogShown;
+ bool mDirty;
+ bool mSaveDialogShown;
protected:
LLUUID mItemUUID;
@@ -140,13 +135,13 @@ protected:
LLButton* mCopyToInvBtn;
// Close without saving changes
- BOOL mForceClose;
+ bool mForceClose;
- BOOL mUserResized;
+ bool mUserResized;
// When closing springs a "Want to save?" dialog, we want
// to keep the preview open until the save completes.
- BOOL mCloseAfterSave;
+ bool mCloseAfterSave;
EAssetStatus mAssetStatus;
diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp
index 7f01438425..3d06066464 100644
--- a/indra/newview/llpreviewanim.cpp
+++ b/indra/newview/llpreviewanim.cpp
@@ -50,7 +50,7 @@ LLPreviewAnim::LLPreviewAnim(const LLSD& key)
}
// virtual
-BOOL LLPreviewAnim::postBuild()
+bool LLPreviewAnim::postBuild()
{
childSetCommitCallback("desc", LLPreview::onText, this);
getChild<LLLineEditor>("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);
@@ -58,9 +58,9 @@ BOOL LLPreviewAnim::postBuild()
pAdvancedStatsTextBox = getChild<LLTextBox>("AdvancedStats");
// Assume that advanced stats start visible (for XUI preview tool's purposes)
- pAdvancedStatsTextBox->setVisible(FALSE);
+ pAdvancedStatsTextBox->setVisible(false);
LLRect rect = getRect();
- reshape(rect.getWidth(), rect.getHeight() - pAdvancedStatsTextBox->getRect().getHeight() - ADVANCED_VPAD, FALSE);
+ reshape(rect.getWidth(), rect.getHeight() - pAdvancedStatsTextBox->getRect().getHeight() - ADVANCED_VPAD, false);
return LLPreview::postBuild();
}
@@ -180,10 +180,10 @@ void LLPreviewAnim::cleanup()
{
this->mItemID = LLUUID::null;
this->mDidStart = false;
- getChild<LLUICtrl>("Inworld")->setValue(FALSE);
- getChild<LLUICtrl>("Locally")->setValue(FALSE);
- getChild<LLUICtrl>("Inworld")->setEnabled(TRUE);
- getChild<LLUICtrl>("Locally")->setEnabled(TRUE);
+ getChild<LLUICtrl>("Inworld")->setValue(false);
+ getChild<LLUICtrl>("Locally")->setValue(false);
+ getChild<LLUICtrl>("Inworld")->setEnabled(true);
+ getChild<LLUICtrl>("Locally")->setEnabled(true);
}
// virtual
@@ -200,19 +200,19 @@ void LLPreviewAnim::onClose(bool app_quitting)
void LLPreviewAnim::showAdvanced()
{
- BOOL was_visible = pAdvancedStatsTextBox->getVisible();
+ bool was_visible = pAdvancedStatsTextBox->getVisible();
if (was_visible)
{
- pAdvancedStatsTextBox->setVisible(FALSE);
+ pAdvancedStatsTextBox->setVisible(false);
LLRect rect = getRect();
- reshape(rect.getWidth(), rect.getHeight() - pAdvancedStatsTextBox->getRect().getHeight() - ADVANCED_VPAD, FALSE);
+ reshape(rect.getWidth(), rect.getHeight() - pAdvancedStatsTextBox->getRect().getHeight() - ADVANCED_VPAD, false);
}
else
{
- pAdvancedStatsTextBox->setVisible(TRUE);
+ pAdvancedStatsTextBox->setVisible(true);
LLRect rect = getRect();
- reshape(rect.getWidth(), rect.getHeight() + pAdvancedStatsTextBox->getRect().getHeight() + ADVANCED_VPAD, FALSE);
+ reshape(rect.getWidth(), rect.getHeight() + pAdvancedStatsTextBox->getRect().getHeight() + ADVANCED_VPAD, false);
LLMotion *motion = NULL;
const LLInventoryItem* item = getItem();
diff --git a/indra/newview/llpreviewanim.h b/indra/newview/llpreviewanim.h
index 9f4ad4fa69..ec1bdd8828 100644
--- a/indra/newview/llpreviewanim.h
+++ b/indra/newview/llpreviewanim.h
@@ -38,7 +38,7 @@ class LLPreviewAnim : public LLPreview
public:
LLPreviewAnim(const LLSD& key);
- BOOL postBuild() override;
+ bool postBuild() override;
void onClose(bool app_quitting) override;
void draw() override;
void refreshFromItem() override;
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index 544ff8b5dc..1f66db92d5 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -137,12 +137,12 @@ void LLPreviewGesture::draw()
}
// virtual
-BOOL LLPreviewGesture::handleKeyHere(KEY key, MASK mask)
+bool LLPreviewGesture::handleKeyHere(KEY key, MASK mask)
{
if(('S' == key) && (MASK_CONTROL == (mask & MASK_CONTROL)))
{
saveIfNeeded();
- return TRUE;
+ return true;
}
return LLPreview::handleKeyHere(key, mask);
@@ -150,13 +150,13 @@ BOOL LLPreviewGesture::handleKeyHere(KEY key, MASK mask)
// virtual
-BOOL LLPreviewGesture::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+bool LLPreviewGesture::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
std::string& tooltip_msg)
{
- BOOL handled = TRUE;
+ bool handled = true;
switch(cargo_type)
{
case DAD_ANIMATION:
@@ -199,7 +199,7 @@ BOOL LLPreviewGesture::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
sound->mSoundName = item->getName();
}
updateLabel(line);
- mDirty = TRUE;
+ mDirty = true;
refresh();
}
*accept = ACCEPT_YES_COPY_MULTI;
@@ -225,23 +225,23 @@ BOOL LLPreviewGesture::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
// virtual
-BOOL LLPreviewGesture::canClose()
+bool LLPreviewGesture::canClose()
{
if(!mDirty || mForceClose)
{
- return TRUE;
+ return true;
}
else
{
if(!mSaveDialogShown)
{
- mSaveDialogShown = TRUE;
+ mSaveDialogShown = true;
// Bring up view-modal dialog: Save changes? Yes, No, Cancel
LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(),
boost::bind(&LLPreviewGesture::handleSaveChangesDialog, this, _1, _2) );
}
- return FALSE;
+ return false;
}
}
@@ -268,19 +268,19 @@ void LLPreviewGesture::onVisibilityChanged ( const LLSD& new_visibility )
bool LLPreviewGesture::handleSaveChangesDialog(const LLSD& notification, const LLSD& response)
{
- mSaveDialogShown = FALSE;
+ mSaveDialogShown = false;
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch(option)
{
case 0: // "Yes"
LLGestureMgr::instance().stopGesture(mPreviewGesture);
- mCloseAfterSave = TRUE;
+ mCloseAfterSave = true;
onClickSave(this);
break;
case 1: // "No"
LLGestureMgr::instance().stopGesture(mPreviewGesture);
- mDirty = FALSE; // Force the dirty flag because user has clicked NO on confirm save dialog...
+ mDirty = false; // Force the dirty flag because user has clicked NO on confirm save dialog...
closeFloater();
break;
@@ -313,7 +313,7 @@ LLPreviewGesture::LLPreviewGesture(const LLSD& key)
mSaveBtn(NULL),
mPreviewBtn(NULL),
mPreviewGesture(NULL),
- mDirty(FALSE)
+ mDirty(false)
{
NONE_LABEL = LLTrans::getString("---");
SHIFT_LABEL = LLTrans::getString("KBShift");
@@ -336,7 +336,7 @@ LLPreviewGesture::~LLPreviewGesture()
}
-BOOL LLPreviewGesture::postBuild()
+bool LLPreviewGesture::postBuild()
{
setVisibleCallback(boost::bind(&LLPreviewGesture::onVisibilityChanged, this, _2));
@@ -353,20 +353,20 @@ BOOL LLPreviewGesture::postBuild()
edit = getChild<LLLineEditor>("trigger_editor");
edit->setKeystrokeCallback(onKeystrokeCommit, this);
edit->setCommitCallback(onCommitSetDirty, this);
- edit->setCommitOnFocusLost(TRUE);
- edit->setIgnoreTab(TRUE);
+ edit->setCommitOnFocusLost(true);
+ edit->setIgnoreTab(true);
mTriggerEditor = edit;
text = getChild<LLTextBox>("replace_text");
- text->setEnabled(FALSE);
+ text->setEnabled(false);
mReplaceText = text;
edit = getChild<LLLineEditor>("replace_editor");
- edit->setEnabled(FALSE);
+ edit->setEnabled(false);
edit->setKeystrokeCallback(onKeystrokeCommit, this);
edit->setCommitCallback(onCommitSetDirty, this);
- edit->setCommitOnFocusLost(TRUE);
- edit->setIgnoreTab(TRUE);
+ edit->setCommitOnFocusLost(true);
+ edit->setIgnoreTab(true);
mReplaceEditor = edit;
combo = getChild<LLComboBox>( "modifier_combo");
@@ -384,22 +384,22 @@ BOOL LLPreviewGesture::postBuild()
btn = getChild<LLButton>( "add_btn");
btn->setClickedCallback(onClickAdd, this);
- btn->setEnabled(FALSE);
+ btn->setEnabled(false);
mAddBtn = btn;
btn = getChild<LLButton>( "up_btn");
btn->setClickedCallback(onClickUp, this);
- btn->setEnabled(FALSE);
+ btn->setEnabled(false);
mUpBtn = btn;
btn = getChild<LLButton>( "down_btn");
btn->setClickedCallback(onClickDown, this);
- btn->setEnabled(FALSE);
+ btn->setEnabled(false);
mDownBtn = btn;
btn = getChild<LLButton>( "delete_btn");
btn->setClickedCallback(onClickDelete, this);
- btn->setEnabled(FALSE);
+ btn->setEnabled(false);
mDeleteBtn = btn;
list = getChild<LLScrollListCtrl>("step_list");
@@ -410,47 +410,47 @@ BOOL LLPreviewGesture::postBuild()
mOptionsText = getChild<LLTextBox>("options_text");
combo = getChild<LLComboBox>( "animation_list");
- combo->setVisible(FALSE);
+ combo->setVisible(false);
combo->setCommitCallback(onCommitAnimation, this);
mAnimationCombo = combo;
LLRadioGroup* group;
group = getChild<LLRadioGroup>("animation_trigger_type");
- group->setVisible(FALSE);
+ group->setVisible(false);
group->setCommitCallback(onCommitAnimationTrigger, this);
mAnimationRadio = group;
combo = getChild<LLComboBox>( "sound_list");
- combo->setVisible(FALSE);
+ combo->setVisible(false);
combo->setCommitCallback(onCommitSound, this);
mSoundCombo = combo;
edit = getChild<LLLineEditor>("chat_editor");
- edit->setVisible(FALSE);
+ edit->setVisible(false);
edit->setCommitCallback(onCommitChat, this);
//edit->setKeystrokeCallback(onKeystrokeCommit, this);
- edit->setCommitOnFocusLost(TRUE);
- edit->setIgnoreTab(TRUE);
+ edit->setCommitOnFocusLost(true);
+ edit->setIgnoreTab(true);
mChatEditor = edit;
check = getChild<LLCheckBoxCtrl>( "wait_anim_check");
- check->setVisible(FALSE);
+ check->setVisible(false);
check->setCommitCallback(onCommitWait, this);
mWaitAnimCheck = check;
check = getChild<LLCheckBoxCtrl>( "wait_time_check");
- check->setVisible(FALSE);
+ check->setVisible(false);
check->setCommitCallback(onCommitWait, this);
mWaitTimeCheck = check;
edit = getChild<LLLineEditor>("wait_time_editor");
- edit->setEnabled(FALSE);
- edit->setVisible(FALSE);
+ edit->setEnabled(false);
+ edit->setVisible(false);
edit->setPrevalidate(LLTextValidate::validateFloat);
// edit->setKeystrokeCallback(onKeystrokeCommit, this);
- edit->setCommitOnFocusLost(TRUE);
+ edit->setCommitOnFocusLost(true);
edit->setCommitCallback(onCommitWaitTime, this);
- edit->setIgnoreTab(TRUE);
+ edit->setIgnoreTab(true);
mWaitTimeEditor = edit;
// Buttons at the bottom
@@ -620,39 +620,39 @@ void LLPreviewGesture::refresh()
if (mPreviewGesture || !is_complete)
{
- getChildView("desc")->setEnabled(FALSE);
- //mDescEditor->setEnabled(FALSE);
- mTriggerEditor->setEnabled(FALSE);
- mReplaceText->setEnabled(FALSE);
- mReplaceEditor->setEnabled(FALSE);
- mModifierCombo->setEnabled(FALSE);
- mKeyCombo->setEnabled(FALSE);
- mLibraryList->setEnabled(FALSE);
- mAddBtn->setEnabled(FALSE);
- mUpBtn->setEnabled(FALSE);
- mDownBtn->setEnabled(FALSE);
- mDeleteBtn->setEnabled(FALSE);
- mStepList->setEnabled(FALSE);
- mOptionsText->setEnabled(FALSE);
- mAnimationCombo->setEnabled(FALSE);
- mAnimationRadio->setEnabled(FALSE);
- mSoundCombo->setEnabled(FALSE);
- mChatEditor->setEnabled(FALSE);
- mWaitAnimCheck->setEnabled(FALSE);
- mWaitTimeCheck->setEnabled(FALSE);
- mWaitTimeEditor->setEnabled(FALSE);
- mActiveCheck->setEnabled(FALSE);
- mSaveBtn->setEnabled(FALSE);
+ getChildView("desc")->setEnabled(false);
+ //mDescEditor->setEnabled(false);
+ mTriggerEditor->setEnabled(false);
+ mReplaceText->setEnabled(false);
+ mReplaceEditor->setEnabled(false);
+ mModifierCombo->setEnabled(false);
+ mKeyCombo->setEnabled(false);
+ mLibraryList->setEnabled(false);
+ mAddBtn->setEnabled(false);
+ mUpBtn->setEnabled(false);
+ mDownBtn->setEnabled(false);
+ mDeleteBtn->setEnabled(false);
+ mStepList->setEnabled(false);
+ mOptionsText->setEnabled(false);
+ mAnimationCombo->setEnabled(false);
+ mAnimationRadio->setEnabled(false);
+ mSoundCombo->setEnabled(false);
+ mChatEditor->setEnabled(false);
+ mWaitAnimCheck->setEnabled(false);
+ mWaitTimeCheck->setEnabled(false);
+ mWaitTimeEditor->setEnabled(false);
+ mActiveCheck->setEnabled(false);
+ mSaveBtn->setEnabled(false);
// Make sure preview button is enabled, so we can stop it
- mPreviewBtn->setEnabled(TRUE);
+ mPreviewBtn->setEnabled(true);
return;
}
- BOOL modifiable = item->getPermissions().allowModifyBy(gAgent.getID());
+ bool modifiable = item->getPermissions().allowModifyBy(gAgent.getID());
getChildView("desc")->setEnabled(modifiable);
- mTriggerEditor->setEnabled(TRUE);
+ mTriggerEditor->setEnabled(true);
mLibraryList->setEnabled(modifiable);
mStepList->setEnabled(modifiable);
mOptionsText->setEnabled(modifiable);
@@ -663,27 +663,27 @@ void LLPreviewGesture::refresh()
mWaitAnimCheck->setEnabled(modifiable);
mWaitTimeCheck->setEnabled(modifiable);
mWaitTimeEditor->setEnabled(modifiable);
- mActiveCheck->setEnabled(TRUE);
+ mActiveCheck->setEnabled(true);
const std::string& trigger = mTriggerEditor->getText();
- BOOL have_trigger = !trigger.empty();
+ bool have_trigger = !trigger.empty();
const std::string& replace = mReplaceEditor->getText();
- BOOL have_replace = !replace.empty();
+ bool have_replace = !replace.empty();
LLScrollListItem* library_item = mLibraryList->getFirstSelected();
- BOOL have_library = (library_item != NULL);
+ bool have_library = (library_item != NULL);
LLScrollListItem* step_item = mStepList->getFirstSelected();
S32 step_index = mStepList->getFirstSelectedIndex();
S32 step_count = mStepList->getItemCount();
- BOOL have_step = (step_item != NULL);
+ bool have_step = (step_item != NULL);
mReplaceText->setEnabled(have_trigger || have_replace);
mReplaceEditor->setEnabled(have_trigger || have_replace);
- mModifierCombo->setEnabled(TRUE);
- mKeyCombo->setEnabled(TRUE);
+ mModifierCombo->setEnabled(true);
+ mKeyCombo->setEnabled(true);
mAddBtn->setEnabled(modifiable && have_library);
mUpBtn->setEnabled(modifiable && have_step && step_index > 0);
@@ -691,13 +691,13 @@ void LLPreviewGesture::refresh()
mDeleteBtn->setEnabled(modifiable && have_step);
// Assume all not visible
- mAnimationCombo->setVisible(FALSE);
- mAnimationRadio->setVisible(FALSE);
- mSoundCombo->setVisible(FALSE);
- mChatEditor->setVisible(FALSE);
- mWaitAnimCheck->setVisible(FALSE);
- mWaitTimeCheck->setVisible(FALSE);
- mWaitTimeEditor->setVisible(FALSE);
+ mAnimationCombo->setVisible(false);
+ mAnimationRadio->setVisible(false);
+ mSoundCombo->setVisible(false);
+ mChatEditor->setVisible(false);
+ mWaitAnimCheck->setVisible(false);
+ mWaitTimeCheck->setVisible(false);
+ mWaitTimeEditor->setVisible(false);
std::string optionstext;
@@ -713,8 +713,8 @@ void LLPreviewGesture::refresh()
{
LLGestureStepAnimation* anim_step = (LLGestureStepAnimation*)step;
optionstext = getString("step_anim");
- mAnimationCombo->setVisible(TRUE);
- mAnimationRadio->setVisible(TRUE);
+ mAnimationCombo->setVisible(true);
+ mAnimationRadio->setVisible(true);
mAnimationRadio->setSelectedIndex((anim_step->mFlags & ANIM_FLAG_STOP) ? 1 : 0);
mAnimationCombo->setCurrentByID(anim_step->mAnimAssetID);
break;
@@ -723,7 +723,7 @@ void LLPreviewGesture::refresh()
{
LLGestureStepSound* sound_step = (LLGestureStepSound*)step;
optionstext = getString("step_sound");
- mSoundCombo->setVisible(TRUE);
+ mSoundCombo->setVisible(true);
mSoundCombo->setCurrentByID(sound_step->mSoundAssetID);
break;
}
@@ -731,7 +731,7 @@ void LLPreviewGesture::refresh()
{
LLGestureStepChat* chat_step = (LLGestureStepChat*)step;
optionstext = getString("step_chat");
- mChatEditor->setVisible(TRUE);
+ mChatEditor->setVisible(true);
mChatEditor->setText(chat_step->mChatText);
break;
}
@@ -739,11 +739,11 @@ void LLPreviewGesture::refresh()
{
LLGestureStepWait* wait_step = (LLGestureStepWait*)step;
optionstext = getString("step_wait");
- mWaitAnimCheck->setVisible(TRUE);
+ mWaitAnimCheck->setVisible(true);
mWaitAnimCheck->set(wait_step->mFlags & WAIT_FLAG_ALL_ANIM);
- mWaitTimeCheck->setVisible(TRUE);
+ mWaitTimeCheck->setVisible(true);
mWaitTimeCheck->set(wait_step->mFlags & WAIT_FLAG_TIME);
- mWaitTimeEditor->setVisible(TRUE);
+ mWaitTimeEditor->setVisible(true);
std::string buffer = llformat("%.1f", (double)wait_step->mWaitSeconds);
mWaitTimeEditor->setText(buffer);
break;
@@ -755,7 +755,7 @@ void LLPreviewGesture::refresh()
mOptionsText->setText(optionstext);
- BOOL active = LLGestureMgr::instance().isGestureActive(mItemUUID);
+ bool active = LLGestureMgr::instance().isGestureActive(mItemUUID);
mActiveCheck->set(active);
// Can only preview if there are steps
@@ -791,7 +791,7 @@ void LLPreviewGesture::initDefaultGesture()
mStepList->selectFirstItem();
// this is *new* content, so we are dirty
- mDirty = TRUE;
+ mDirty = true;
}
@@ -824,7 +824,7 @@ void LLPreviewGesture::loadAsset()
// window if the download gets stalled.
LLUUID* item_idp = new LLUUID(mItemUUID);
- const BOOL high_priority = TRUE;
+ const bool high_priority = true;
gAssetStorage->getAssetData(asset_id,
LLAssetType::AT_GESTURE,
onLoadComplete,
@@ -856,7 +856,7 @@ void LLPreviewGesture::onLoadComplete(const LLUUID& asset_uuid,
LLMultiGesture* gesture = new LLMultiGesture();
LLDataPackerAsciiBuffer dp(&buffer[0], size+1);
- BOOL ok = gesture->deserialize(dp);
+ bool ok = gesture->deserialize(dp);
if (ok)
{
@@ -865,7 +865,7 @@ void LLPreviewGesture::onLoadComplete(const LLUUID& asset_uuid,
self->mStepList->selectFirstItem();
- self->mDirty = FALSE;
+ self->mDirty = false;
self->refresh();
self->refreshFromItem(); // to update description and title
}
@@ -1143,7 +1143,7 @@ void LLPreviewGesture::saveIfNeeded()
LLLineEditor* descEditor = getChild<LLLineEditor>("desc");
LLSaveInfo* info = new LLSaveInfo(mItemUUID, mObjectUUID, descEditor->getText(), tid);
- gAssetStorage->storeAssetData(tid, LLAssetType::AT_GESTURE, onSaveComplete, info, FALSE);
+ gAssetStorage->storeAssetData(tid, LLAssetType::AT_GESTURE, onSaveComplete, info, false);
}
}
@@ -1196,7 +1196,7 @@ void LLPreviewGesture::onSaveComplete(const LLUUID& asset_uuid, void* user_data,
new_item->setDescription(info->mDesc);
new_item->setTransactionID(info->mTransactionID);
new_item->setAssetUUID(asset_uuid);
- new_item->updateServer(FALSE);
+ new_item->updateServer(false);
gInventory.updateItem(new_item);
gInventory.notifyObservers();
}
@@ -1342,7 +1342,7 @@ void LLPreviewGesture::onCommitKeyorModifier()
mKeyCombo->setEnabledByValue(LLKeyboard::stringFromKey(KEY_F10), mModifierCombo->getSimple() != CTRL_LABEL);
mModifierCombo->setEnabledByValue(CTRL_LABEL, mKeyCombo->getSimple() != LLKeyboard::stringFromKey(KEY_F10));
- mDirty = TRUE;
+ mDirty = true;
refresh();
}
@@ -1361,7 +1361,7 @@ void LLPreviewGesture::updateLabel(LLScrollListItem* item)
void LLPreviewGesture::onCommitSetDirty(LLUICtrl* ctrl, void* data)
{
LLPreviewGesture* self = (LLPreviewGesture*)data;
- self->mDirty = TRUE;
+ self->mDirty = true;
self->refresh();
}
@@ -1420,7 +1420,7 @@ void LLPreviewGesture::onCommitAnimation(LLUICtrl* ctrl, void* data)
// Update the UI label in the list
updateLabel(step_item);
- self->mDirty = TRUE;
+ self->mDirty = true;
self->refresh();
}
}
@@ -1451,7 +1451,7 @@ void LLPreviewGesture::onCommitAnimationTrigger(LLUICtrl* ctrl, void *data)
// Update the UI label in the list
updateLabel(step_item);
- self->mDirty = TRUE;
+ self->mDirty = true;
self->refresh();
}
}
@@ -1477,7 +1477,7 @@ void LLPreviewGesture::onCommitSound(LLUICtrl* ctrl, void* data)
// Update the UI label in the list
updateLabel(step_item);
- self->mDirty = TRUE;
+ self->mDirty = true;
self->refresh();
}
}
@@ -1501,7 +1501,7 @@ void LLPreviewGesture::onCommitChat(LLUICtrl* ctrl, void* data)
// Update the UI label in the list
updateLabel(step_item);
- self->mDirty = TRUE;
+ self->mDirty = true;
self->refresh();
}
@@ -1537,7 +1537,7 @@ void LLPreviewGesture::onCommitWait(LLUICtrl* ctrl, void* data)
// Update the UI label in the list
updateLabel(step_item);
- self->mDirty = TRUE;
+ self->mDirty = true;
self->refresh();
}
@@ -1552,7 +1552,7 @@ void LLPreviewGesture::onCommitWaitTime(LLUICtrl* ctrl, void* data)
LLGestureStep* step = (LLGestureStep*)step_item->getUserdata();
if (step->getType() != STEP_WAIT) return;
- self->mWaitTimeCheck->set(TRUE);
+ self->mWaitTimeCheck->set(true);
onCommitWait(ctrl, data);
}
@@ -1585,7 +1585,7 @@ void LLPreviewGesture::onClickAdd(void* data)
}
self->addStep( (EStepType)library_item_index );
- self->mDirty = TRUE;
+ self->mDirty = true;
self->refresh();
}
@@ -1626,7 +1626,7 @@ LLScrollListItem* LLPreviewGesture::addStep( const EStepType step_type )
mLibraryList->deselectAllItems();
mStepList->deselectAllItems();
- step_item->setSelected(TRUE);
+ step_item->setSelected(true);
return step_item;
}
@@ -1686,7 +1686,7 @@ void LLPreviewGesture::onClickUp(void* data)
if (selected_index > 0)
{
self->mStepList->swapWithPrevious(selected_index);
- self->mDirty = TRUE;
+ self->mDirty = true;
self->refresh();
}
}
@@ -1703,7 +1703,7 @@ void LLPreviewGesture::onClickDown(void* data)
if (selected_index < count-1)
{
self->mStepList->swapWithNext(selected_index);
- self->mDirty = TRUE;
+ self->mDirty = true;
self->refresh();
}
}
@@ -1723,7 +1723,7 @@ void LLPreviewGesture::onClickDelete(void* data)
self->mStepList->deleteSingleItem(selected_index);
- self->mDirty = TRUE;
+ self->mDirty = true;
self->refresh();
}
}
diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h
index f5c47d71b8..818879335a 100644
--- a/indra/newview/llpreviewgesture.h
+++ b/indra/newview/llpreviewgesture.h
@@ -52,18 +52,18 @@ public:
// LLView
/*virtual*/ void draw();
- /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
- /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ /*virtual*/ bool handleKeyHere(KEY key, MASK mask);
+ /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
std::string& tooltip_msg);
// LLPanel
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
// LLFloater
- /*virtual*/ BOOL canClose();
+ /*virtual*/ bool canClose();
/*virtual*/ void onClose(bool app_quitting);
/*virtual*/ void onUpdateSucceeded();
/*virtual*/ void refresh();
@@ -163,7 +163,7 @@ private:
LLButton* mPreviewBtn;
LLMultiGesture* mPreviewGesture;
- BOOL mDirty;
+ bool mDirty;
};
#endif // LL_LLPREVIEWGESTURE_H
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index 6681703625..56ceadb62f 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -82,14 +82,14 @@ LLPreviewNotecard::~LLPreviewNotecard()
delete mLiveFile;
}
-BOOL LLPreviewNotecard::postBuild()
+bool LLPreviewNotecard::postBuild()
{
mEditor = getChild<LLViewerTextEditor>("Notecard Editor");
mEditor->setNotecardInfo(mItemUUID, mObjectID, getKey());
mEditor->makePristine();
childSetAction("Save", onClickSave, this);
- getChildView("lock")->setVisible( FALSE);
+ getChildView("lock")->setVisible( false);
childSetAction("Delete", onClickDelete, this);
getChildView("Delete")->setEnabled(false);
@@ -102,7 +102,7 @@ BOOL LLPreviewNotecard::postBuild()
if (item)
{
getChild<LLUICtrl>("desc")->setValue(item->getDescription());
- BOOL source_library = mObjectUUID.isNull() && gInventory.isObjectDescendentOf(item->getUUID(), gInventory.getLibraryRootFolderID());
+ bool source_library = mObjectUUID.isNull() && gInventory.isObjectDescendentOf(item->getUUID(), gInventory.getLibraryRootFolderID());
getChildView("Delete")->setEnabled(!source_library);
}
getChild<LLLineEditor>("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);
@@ -116,7 +116,7 @@ bool LLPreviewNotecard::saveItem()
return saveIfNeeded(item);
}
-void LLPreviewNotecard::setEnabled( BOOL enabled )
+void LLPreviewNotecard::setEnabled(bool enabled)
{
LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
@@ -131,7 +131,7 @@ void LLPreviewNotecard::setEnabled( BOOL enabled )
void LLPreviewNotecard::draw()
{
LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
- BOOL changed = !editor->isPristine();
+ bool changed = !editor->isPristine();
getChildView("Save")->setEnabled(changed && getEnabled());
@@ -139,35 +139,35 @@ void LLPreviewNotecard::draw()
}
// virtual
-BOOL LLPreviewNotecard::handleKeyHere(KEY key, MASK mask)
+bool LLPreviewNotecard::handleKeyHere(KEY key, MASK mask)
{
if(('S' == key) && (MASK_CONTROL == (mask & MASK_CONTROL)))
{
saveIfNeeded();
- return TRUE;
+ return true;
}
return LLPreview::handleKeyHere(key, mask);
}
// virtual
-BOOL LLPreviewNotecard::canClose()
+bool LLPreviewNotecard::canClose()
{
LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
if(mForceClose || editor->isPristine())
{
- return TRUE;
+ return true;
}
else
{
if(!mSaveDialogShown)
{
- mSaveDialogShown = TRUE;
+ mSaveDialogShown = true;
// Bring up view-modal dialog: Save changes? Yes, No, Cancel
LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLPreviewNotecard::handleSaveChangesDialog,this, _1, _2));
}
- return FALSE;
+ return false;
}
}
@@ -239,10 +239,10 @@ void LLPreviewNotecard::loadAsset()
if(item)
{
LLPermissions perm(item->getPermissions());
- BOOL is_owner = gAgent.allowOperation(PERM_OWNER, perm, GP_OBJECT_MANIPULATE);
- BOOL allow_copy = gAgent.allowOperation(PERM_COPY, perm, GP_OBJECT_MANIPULATE);
- BOOL allow_modify = canModify(mObjectUUID, item);
- BOOL source_library = mObjectUUID.isNull() && gInventory.isObjectDescendentOf(mItemUUID, gInventory.getLibraryRootFolderID());
+ bool is_owner = gAgent.allowOperation(PERM_OWNER, perm, GP_OBJECT_MANIPULATE);
+ bool allow_copy = gAgent.allowOperation(PERM_COPY, perm, GP_OBJECT_MANIPULATE);
+ bool allow_modify = canModify(mObjectUUID, item);
+ bool source_library = mObjectUUID.isNull() && gInventory.isObjectDescendentOf(mItemUUID, gInventory.getLibraryRootFolderID());
if (allow_copy || gAgent.isGodlike())
{
@@ -251,7 +251,7 @@ void LLPreviewNotecard::loadAsset()
{
editor->setText(LLStringUtil::null);
editor->makePristine();
- editor->setEnabled(TRUE);
+ editor->setEnabled(true);
mAssetStatus = PREVIEW_ASSET_LOADED;
}
else
@@ -272,7 +272,7 @@ void LLPreviewNotecard::loadAsset()
mAssetID.setNull();
editor->setText(getString("no_object"));
editor->makePristine();
- editor->setEnabled(FALSE);
+ editor->setEnabled(false);
mAssetStatus = PREVIEW_ASSET_LOADED;
return;
}
@@ -294,7 +294,7 @@ void LLPreviewNotecard::loadAsset()
item->getType(),
&onLoadComplete,
(void*)user_data,
- TRUE);
+ true);
mAssetStatus = PREVIEW_ASSET_LOADING;
}
}
@@ -303,20 +303,20 @@ void LLPreviewNotecard::loadAsset()
mAssetID.setNull();
editor->setText(getString("not_allowed"));
editor->makePristine();
- editor->setEnabled(FALSE);
+ editor->setEnabled(false);
mAssetStatus = PREVIEW_ASSET_LOADED;
}
if(!allow_modify)
{
- editor->setEnabled(FALSE);
- getChildView("lock")->setVisible( TRUE);
- getChildView("Edit")->setEnabled(FALSE);
+ editor->setEnabled(false);
+ getChildView("lock")->setVisible( true);
+ getChildView("Edit")->setEnabled(false);
}
if((allow_modify || is_owner) && !source_library)
{
- getChildView("Delete")->setEnabled(TRUE);
+ getChildView("Delete")->setEnabled(true);
}
}
else if (mObjectUUID.notNull() && mItemUUID.notNull())
@@ -347,7 +347,7 @@ void LLPreviewNotecard::loadAsset()
{
editor->setText(LLStringUtil::null);
editor->makePristine();
- editor->setEnabled(TRUE);
+ editor->setEnabled(true);
// Don't set asset status here; we may not have set the item id yet
// (e.g. when this gets called initially)
//mAssetStatus = PREVIEW_ASSET_LOADED;
@@ -393,7 +393,7 @@ void LLPreviewNotecard::onLoadComplete(const LLUUID& asset_uuid,
}
previewEditor->makePristine();
- BOOL modifiable = preview->canModify(preview->mObjectID, preview->getItem());
+ bool modifiable = preview->canModify(preview->mObjectID, preview->getItem());
preview->setEnabled(modifiable);
preview->syncExternal();
preview->mAssetStatus = PREVIEW_ASSET_LOADED;
@@ -599,7 +599,7 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem, bool sync)
gAssetStorage->storeAssetData(tid, LLAssetType::AT_NOTECARD,
&onSaveComplete,
(void*)info,
- FALSE);
+ false);
return true;
}
else // !gAssetStorage
@@ -659,7 +659,7 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
new_item->setAssetUUID(asset_uuid);
new_item->setTransactionID(info->mTransactionID);
- new_item->updateServer(FALSE);
+ new_item->updateServer(false);
gInventory.updateItem(new_item);
gInventory.notifyObservers();
}
@@ -725,17 +725,17 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data
bool LLPreviewNotecard::handleSaveChangesDialog(const LLSD& notification, const LLSD& response)
{
- mSaveDialogShown = FALSE;
+ mSaveDialogShown = false;
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch(option)
{
case 0: // "Yes"
- mCloseAfterSave = TRUE;
+ mCloseAfterSave = true;
LLPreviewNotecard::onClickSave((void*)this);
break;
case 1: // "No"
- mForceClose = TRUE;
+ mForceClose = true;
closeFloater();
break;
@@ -764,7 +764,7 @@ bool LLPreviewNotecard::handleConfirmDeleteDialog(const LLSD& notification, cons
if (item != NULL)
{
const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
- gInventory.changeItemParent(item, trash_id, FALSE);
+ gInventory.changeItemParent(item, trash_id, false);
}
}
else
@@ -782,7 +782,7 @@ bool LLPreviewNotecard::handleConfirmDeleteDialog(const LLSD& notification, cons
}
// close floater, ignore unsaved changes
- mForceClose = TRUE;
+ mForceClose = true;
closeFloater();
return false;
}
diff --git a/indra/newview/llpreviewnotecard.h b/indra/newview/llpreviewnotecard.h
index 321f44a1ea..4d9e6fcd2c 100644
--- a/indra/newview/llpreviewnotecard.h
+++ b/indra/newview/llpreviewnotecard.h
@@ -53,14 +53,14 @@ public:
// llview
void draw() override;
- BOOL handleKeyHere(KEY key, MASK mask) override;
- void setEnabled( BOOL enabled ) override;
+ bool handleKeyHere(KEY key, MASK mask) override;
+ void setEnabled(bool enabled) override;
// llfloater
- BOOL canClose() override;
+ bool canClose() override;
// llpanel
- BOOL postBuild() override;
+ bool postBuild() override;
// reach into the text editor, and grab the drag item
const LLInventoryItem* getDragItem();
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 7095275c52..151252fb2d 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -156,7 +156,7 @@ public:
LLFloaterScriptSearch(LLScriptEdCore* editor_core);
~LLFloaterScriptSearch();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
static void show(LLScriptEdCore* editor_core);
static void onBtnSearch(void* userdata);
void handleBtnSearch();
@@ -171,7 +171,7 @@ public:
static LLFloaterScriptSearch* getInstance() { return sInstance; }
virtual bool hasAccelerators() const;
- virtual BOOL handleKeyHere(KEY key, MASK mask);
+ virtual bool handleKeyHere(KEY key, MASK mask);
private:
@@ -210,19 +210,19 @@ LLFloaterScriptSearch::LLFloaterScriptSearch(LLScriptEdCore* editor_core)
}
}
-BOOL LLFloaterScriptSearch::postBuild()
+bool LLFloaterScriptSearch::postBuild()
{
mReplaceBox = getChild<LLLineEditor>("replace_text");
mSearchBox = getChild<LLLineEditor>("search_text");
mSearchBox->setCommitCallback(boost::bind(&LLFloaterScriptSearch::onSearchBoxCommit, this));
- mSearchBox->setCommitOnFocusLost(FALSE);
+ mSearchBox->setCommitOnFocusLost(false);
childSetAction("search_btn", onBtnSearch,this);
childSetAction("replace_btn", onBtnReplace,this);
childSetAction("replace_all_btn", onBtnReplaceAll,this);
setDefaultBtn("search_btn");
- return TRUE;
+ return true;
}
//static
@@ -299,21 +299,21 @@ bool LLFloaterScriptSearch::hasAccelerators() const
{
return mEditorCore->hasAccelerators();
}
- return FALSE;
+ return false;
}
-BOOL LLFloaterScriptSearch::handleKeyHere(KEY key, MASK mask)
+bool LLFloaterScriptSearch::handleKeyHere(KEY key, MASK mask)
{
if (mEditorCore)
{
- BOOL handled = mEditorCore->handleKeyHere(key, mask);
+ bool handled = mEditorCore->handleKeyHere(key, mask);
if (!handled)
{
LLFloater::handleKeyHere(key, mask);
}
}
- return FALSE;
+ return false;
}
void LLFloaterScriptSearch::onSearchBoxCommit()
@@ -374,7 +374,7 @@ LLScriptEdCore::LLScriptEdCore(
const std::string& sample,
const LLHandle<LLFloater>& floater_handle,
void (*load_callback)(void*),
- void (*save_callback)(void*, BOOL),
+ void (*save_callback)(void*, bool),
void (*search_replace_callback) (void* userdata),
void* userdata,
bool live,
@@ -387,19 +387,19 @@ LLScriptEdCore::LLScriptEdCore(
mSaveCallback( save_callback ),
mSearchReplaceCallback( search_replace_callback ),
mUserdata( userdata ),
- mForceClose( FALSE ),
+ mForceClose( false ),
mLastHelpToken(NULL),
mLiveHelpHistorySize(0),
- mEnableSave(FALSE),
+ mEnableSave(false),
mLiveFile(NULL),
mLive(live),
mContainer(container),
- mHasScriptData(FALSE),
- mScriptRemoved(FALSE),
- mSaveDialogShown(FALSE)
+ mHasScriptData(false),
+ mScriptRemoved(false),
+ mSaveDialogShown(false)
{
setFollowsAll();
- setBorderVisible(FALSE);
+ setBorderVisible(false);
setXMLFilename("panel_script_ed.xml");
llassert_always(mContainer != NULL);
@@ -429,7 +429,7 @@ void LLLiveLSLEditor::experienceChanged()
if(mScriptEd->getAssociatedExperience() != mExperiences->getSelectedValue().asUUID())
{
mScriptEd->enableSave(getIsModifiable());
- //getChildView("Save_btn")->setEnabled(TRUE);
+ //getChildView("Save_btn")->setEnabled(true);
mScriptEd->setAssociatedExperience(mExperiences->getSelectedValue().asUUID());
updateExperiencePanel();
}
@@ -473,7 +473,7 @@ void LLLiveLSLEditor::onToggleExperience( LLUICtrl *ui, void* userdata )
self->updateExperiencePanel();
}
-BOOL LLScriptEdCore::postBuild()
+bool LLScriptEdCore::postBuild()
{
mErrorList = getChild<LLScrollListCtrl>("lsl errors");
@@ -484,7 +484,7 @@ BOOL LLScriptEdCore::postBuild()
mEditor = getChild<LLScriptEditor>("Script Editor");
childSetCommitCallback("lsl errors", &LLScriptEdCore::onErrorList, this);
- childSetAction("Save_btn", boost::bind(&LLScriptEdCore::doSave,this,FALSE));
+ childSetAction("Save_btn", boost::bind(&LLScriptEdCore::doSave,this,false));
childSetAction("Edit_btn", boost::bind(&LLScriptEdCore::openInExternalEditor, this));
initMenu();
@@ -502,7 +502,7 @@ BOOL LLScriptEdCore::postBuild()
"menu_lsl_font_size.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
getChild<LLMenuButton>("font_btn")->setMenu(context_menu, LLMenuButton::MP_BOTTOM_LEFT, true);
- return TRUE;
+ return true;
}
void LLScriptEdCore::processKeywords()
@@ -546,7 +546,7 @@ void LLScriptEdCore::initMenu()
LLMenuItemCallGL* menuItem;
menuItem = getChild<LLMenuItemCallGL>("Save");
- menuItem->setClickCallback(boost::bind(&LLScriptEdCore::doSave, this, FALSE));
+ menuItem->setClickCallback(boost::bind(&LLScriptEdCore::doSave, this, false));
menuItem->setEnableCallback(boost::bind(&LLScriptEdCore::hasChanged, this));
menuItem = getChild<LLMenuItemCallGL>("Revert All Changes");
@@ -599,7 +599,7 @@ void LLScriptEdCore::initMenu()
menuItem->setEnableCallback(boost::bind(&LLScriptEdCore::enableSaveToFileMenu, this));
}
-void LLScriptEdCore::setScriptText(const std::string& text, BOOL is_valid)
+void LLScriptEdCore::setScriptText(const std::string& text, bool is_valid)
{
if (mEditor)
{
@@ -704,14 +704,14 @@ bool LLScriptEdCore::hasChanged()
void LLScriptEdCore::draw()
{
- BOOL script_changed = hasChanged();
+ bool script_changed = hasChanged();
getChildView("Save_btn")->setEnabled(script_changed && !mScriptRemoved);
if( mEditor->hasFocus() )
{
S32 line = 0;
S32 column = 0;
- mEditor->getCurrentLineAndColumn( &line, &column, FALSE ); // don't include wordwrap
+ mEditor->getCurrentLineAndColumn( &line, &column, false ); // don't include wordwrap
LLStringUtil::format_map_t args;
std::string cursor_pos;
args["[LINE]"] = llformat ("%d", line);
@@ -729,7 +729,7 @@ void LLScriptEdCore::draw()
LLPanel::draw();
}
-void LLScriptEdCore::updateDynamicHelp(BOOL immediate)
+void LLScriptEdCore::updateDynamicHelp(bool immediate)
{
LLFloater* help_floater = mLiveHelpHandle.get();
if (!help_floater) return;
@@ -880,21 +880,21 @@ void LLScriptEdCore::addHelpItemToHistory(const std::string& help_string)
mLiveHelpHistorySize++;
}
-BOOL LLScriptEdCore::canClose()
+bool LLScriptEdCore::canClose()
{
if(mForceClose || !hasChanged() || mScriptRemoved)
{
- return TRUE;
+ return true;
}
else
{
if(!mSaveDialogShown)
{
- mSaveDialogShown = TRUE;
+ mSaveDialogShown = true;
// Bring up view-modal dialog: Save changes? Yes, No, Cancel
LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLScriptEdCore::handleSaveChangesDialog, this, _1, _2));
}
- return FALSE;
+ return false;
}
}
@@ -906,17 +906,17 @@ void LLScriptEdCore::setEnableEditing(bool enable)
bool LLScriptEdCore::handleSaveChangesDialog(const LLSD& notification, const LLSD& response )
{
- mSaveDialogShown = FALSE;
+ mSaveDialogShown = false;
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch( option )
{
case 0: // "Yes"
// close after saving
- doSave( TRUE );
+ doSave( true );
break;
case 1: // "No"
- mForceClose = TRUE;
+ mForceClose = true;
// This will close immediately because mForceClose is true, so we won't
// infinite loop with these dialogs. JC
((LLFloater*) getParent())->closeFloater();
@@ -941,7 +941,7 @@ void LLScriptEdCore::onBtnDynamicHelp()
LLFloater* parent = dynamic_cast<LLFloater*>(getParent());
llassert(parent);
if (parent)
- parent->addDependentFloater(live_help_floater, TRUE);
+ parent->addDependentFloater(live_help_floater, true);
live_help_floater->childSetCommitCallback("lock_check", onCheckLock, this);
live_help_floater->getChild<LLUICtrl>("lock_check")->setValue(gSavedSettings.getBOOL("ScriptHelpFollowsCursor"));
live_help_floater->childSetCommitCallback("history_combo", onHelpComboCommit, this);
@@ -949,7 +949,7 @@ void LLScriptEdCore::onBtnDynamicHelp()
live_help_floater->childSetAction("fwd_btn", onClickForward, this);
LLMediaCtrl* browser = live_help_floater->getChild<LLMediaCtrl>("lsl_guide_html");
- browser->setAlwaysRefresh(TRUE);
+ browser->setAlwaysRefresh(true);
LLComboBox* help_combo = live_help_floater->getChild<LLComboBox>("history_combo");
LLKeywordToken *token;
@@ -969,12 +969,12 @@ void LLScriptEdCore::onBtnDynamicHelp()
mLiveHelpHistorySize = 0;
}
- BOOL visible = TRUE;
- BOOL take_focus = TRUE;
+ bool visible = true;
+ bool take_focus = true;
live_help_floater->setVisible(visible);
live_help_floater->setFrontmost(take_focus);
- updateDynamicHelp(TRUE);
+ updateDynamicHelp(true);
}
//static
@@ -1058,11 +1058,11 @@ void LLScriptEdCore::onBtnInsertFunction(LLUICtrl *ui, void* userdata)
{
self->mEditor->insertText(self->mFunctions->getSimple());
}
- self->mEditor->setFocus(TRUE);
+ self->mEditor->setFocus(true);
self->setHelpPage(self->mFunctions->getSimple());
}
-void LLScriptEdCore::doSave( BOOL close_after_save )
+void LLScriptEdCore::doSave( bool close_after_save )
{
add(LLStatViewer::LSL_SAVES, 1);
@@ -1158,7 +1158,7 @@ void LLScriptEdCore::onErrorList(LLUICtrl*, void* user_data)
//LL_INFOS() << "LLScriptEdCore::onErrorList() - " << row << ", "
//<< column << LL_ENDL;
self->mEditor->setCursor(row, column);
- self->mEditor->setFocus(TRUE);
+ self->mEditor->setFocus(true);
}
}
@@ -1170,7 +1170,7 @@ bool LLScriptEdCore::handleReloadFromServerDialog(const LLSD& notification, cons
case 0: // "Yes"
if( mLoadCallback )
{
- setScriptText(getString("loading"), FALSE);
+ setScriptText(getString("loading"), false);
mLoadCallback(mUserdata);
}
break;
@@ -1215,7 +1215,7 @@ void LLScriptEdCore::deleteBridges()
}
// virtual
-BOOL LLScriptEdCore::handleKeyHere(KEY key, MASK mask)
+bool LLScriptEdCore::handleKeyHere(KEY key, MASK mask)
{
bool just_control = MASK_CONTROL == (mask & MASK_MODIFIERS);
@@ -1224,10 +1224,10 @@ BOOL LLScriptEdCore::handleKeyHere(KEY key, MASK mask)
if(mSaveCallback)
{
// don't close after saving
- mSaveCallback(mUserdata, FALSE);
+ mSaveCallback(mUserdata, false);
}
- return TRUE;
+ return true;
}
if(('F' == key) && just_control)
@@ -1237,10 +1237,10 @@ BOOL LLScriptEdCore::handleKeyHere(KEY key, MASK mask)
mSearchReplaceCallback(mUserdata);
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void LLScriptEdCore::onBtnLoadFromFile( void* data )
@@ -1300,7 +1300,7 @@ void LLScriptEdCore::saveScriptToFile(const std::vector<std::string>& filenames,
llofstream fout(filename.c_str());
fout << (scriptText);
fout.close();
- self->mSaveCallback(self->mUserdata, FALSE);
+ self->mSaveCallback(self->mUserdata, false);
}
}
@@ -1314,7 +1314,7 @@ bool LLScriptEdCore::canLoadOrSaveToFile( void* userdata )
bool LLScriptEdCore::enableSaveToFileMenu(void* userdata)
{
LLScriptEdCore* self = (LLScriptEdCore*)userdata;
- if (!self || !self->mEditor) return FALSE;
+ if (!self || !self->mEditor) return false;
return self->mEditor->canLoadOrSaveToFile();
}
@@ -1322,7 +1322,7 @@ bool LLScriptEdCore::enableSaveToFileMenu(void* userdata)
bool LLScriptEdCore::enableLoadFromFileMenu(void* userdata)
{
LLScriptEdCore* self = (LLScriptEdCore*)userdata;
- return (self && self->mEditor) ? self->mEditor->canLoadOrSaveToFile() : FALSE;
+ return (self && self->mEditor) ? self->mEditor->canLoadOrSaveToFile() : false;
}
LLUUID LLScriptEdCore::getAssociatedExperience()const
@@ -1355,26 +1355,26 @@ void LLLiveLSLEditor::updateExperiencePanel()
{
if(mScriptEd->getAssociatedExperience().isNull())
{
- mExperienceEnabled->set(FALSE);
- mExperiences->setVisible(FALSE);
+ mExperienceEnabled->set(false);
+ mExperiences->setVisible(false);
if(mExperienceIds.size()>0)
{
- mExperienceEnabled->setEnabled(TRUE);
+ mExperienceEnabled->setEnabled(true);
mExperienceEnabled->setToolTip(getString("add_experiences"));
}
else
{
- mExperienceEnabled->setEnabled(FALSE);
+ mExperienceEnabled->setEnabled(false);
mExperienceEnabled->setToolTip(getString("no_experiences"));
}
- getChild<LLButton>("view_profile")->setVisible(FALSE);
+ getChild<LLButton>("view_profile")->setVisible(false);
}
else
{
mExperienceEnabled->setToolTip(getString("experience_enabled"));
mExperienceEnabled->setEnabled(getIsModifiable());
- mExperiences->setVisible(TRUE);
- mExperienceEnabled->set(TRUE);
+ mExperiences->setVisible(true);
+ mExperienceEnabled->set(true);
getChild<LLButton>("view_profile")->setToolTip(getString("show_experience_profile"));
buildExperienceList();
}
@@ -1431,20 +1431,20 @@ void LLLiveLSLEditor::buildExperienceList()
item=mExperiences->add(getString("loading"), associated, ADD_TOP);
last = associated;
}
- item->setEnabled(FALSE);
+ item->setEnabled(false);
}
if(last.notNull())
{
- mExperiences->setEnabled(FALSE);
+ mExperiences->setEnabled(false);
LLExperienceCache::instance().get(last, boost::bind(&LLLiveLSLEditor::buildExperienceList, this));
}
else
{
- mExperiences->setEnabled(TRUE);
- mExperiences->sortByName(TRUE);
+ mExperiences->setEnabled(true);
+ mExperiences->sortByName(true);
mExperiences->setCurrentByIndex(mExperiences->getCurrentIndex());
- getChild<LLButton>("view_profile")->setVisible(TRUE);
+ getChild<LLButton>("view_profile")->setVisible(true);
}
}
@@ -1532,21 +1532,22 @@ bool LLScriptEdContainer::onExternalChange(const std::string& filename)
return true;
}
-BOOL LLScriptEdContainer::handleKeyHere(KEY key, MASK mask)
+bool LLScriptEdContainer::handleKeyHere(KEY key, MASK mask)
{
if (('A' == key) && (MASK_CONTROL == (mask & MASK_MODIFIERS)))
{
mScriptEd->selectAll();
- return TRUE;
+ return true;
}
if (!LLPreview::handleKeyHere(key, mask))
{
return mScriptEd->handleKeyHere(key, mask);
}
- return TRUE;
+ return true;
}
- /// ---------------------------------------------------------------------------
+
+/// ---------------------------------------------------------------------------
/// LLPreviewLSL
/// ---------------------------------------------------------------------------
@@ -1598,7 +1599,7 @@ LLPreviewLSL::~LLPreviewLSL()
}
// virtual
-BOOL LLPreviewLSL::postBuild()
+bool LLPreviewLSL::postBuild()
{
const LLInventoryItem* item = getItem();
@@ -1623,7 +1624,7 @@ void LLPreviewLSL::draw()
if(!item)
{
setTitle(LLTrans::getString("ScriptWasDeleted"));
- mScriptEd->setItemRemoved(TRUE);
+ mScriptEd->setItemRemoved(true);
}
else if (mDirty)
{
@@ -1668,7 +1669,7 @@ void LLPreviewLSL::loadAsset()
// then it might be part of the inventory library. If it's in the
// library, then you can see the script, but not modify it.
const LLInventoryItem* item = gInventory.getItem(mItemUUID);
- BOOL is_library = item
+ bool is_library = item
&& !gInventory.isObjectDescendentOf(mItemUUID,
gInventory.getRootFolderID());
if(!item)
@@ -1678,9 +1679,9 @@ void LLPreviewLSL::loadAsset()
}
if(item)
{
- BOOL is_copyable = gAgent.allowOperation(PERM_COPY,
+ bool is_copyable = gAgent.allowOperation(PERM_COPY,
item->getPermissions(), GP_OBJECT_MANIPULATE);
- BOOL is_modifiable = gAgent.allowOperation(PERM_MODIFY,
+ bool is_modifiable = gAgent.allowOperation(PERM_MODIFY,
item->getPermissions(), GP_OBJECT_MANIPULATE);
if (gAgent.isGodlike() || (is_copyable && (is_modifiable || is_library)))
{
@@ -1695,14 +1696,14 @@ void LLPreviewLSL::loadAsset()
item->getType(),
&LLPreviewLSL::onLoadComplete,
(void*)new_uuid,
- TRUE);
+ true);
mAssetStatus = PREVIEW_ASSET_LOADING;
}
else
{
- mScriptEd->setScriptText(mScriptEd->getString("can_not_view"), FALSE);
+ mScriptEd->setScriptText(mScriptEd->getString("can_not_view"), false);
mScriptEd->mEditor->makePristine();
- mScriptEd->mFunctions->setEnabled(FALSE);
+ mScriptEd->mFunctions->setEnabled(false);
mAssetStatus = PREVIEW_ASSET_LOADED;
}
getChildView("lock")->setVisible( !is_modifiable);
@@ -1710,14 +1711,14 @@ void LLPreviewLSL::loadAsset()
}
else
{
- mScriptEd->setScriptText(std::string(HELLO_LSL), TRUE);
- mScriptEd->setEnableEditing(TRUE);
+ mScriptEd->setScriptText(std::string(HELLO_LSL), true);
+ mScriptEd->setEnableEditing(true);
mAssetStatus = PREVIEW_ASSET_LOADED;
}
}
-BOOL LLPreviewLSL::canClose()
+bool LLPreviewLSL::canClose()
{
return mScriptEd->canClose();
}
@@ -1748,7 +1749,7 @@ void LLPreviewLSL::onLoad(void* userdata)
}
// static
-void LLPreviewLSL::onSave(void* userdata, BOOL close_after_save)
+void LLPreviewLSL::onSave(void* userdata, bool close_after_save)
{
LLPreviewLSL* self = (LLPreviewLSL*)userdata;
self->mCloseAfterSave = close_after_save;
@@ -1865,12 +1866,12 @@ void LLPreviewLSL::onLoadComplete(const LLUUID& asset_uuid, LLAssetType::EType t
// put a EOS at the end
buffer[file_length] = 0;
- preview->mScriptEd->setScriptText(LLStringExplicit(&buffer[0]), TRUE);
+ preview->mScriptEd->setScriptText(LLStringExplicit(&buffer[0]), true);
preview->mScriptEd->mEditor->makePristine();
std::string script_name = DEFAULT_SCRIPT_NAME;
LLInventoryItem* item = gInventory.getItem(*item_uuid);
- BOOL is_modifiable = FALSE;
+ bool is_modifiable = false;
if (item)
{
if (!item->getName().empty())
@@ -1879,7 +1880,7 @@ void LLPreviewLSL::onLoadComplete(const LLUUID& asset_uuid, LLAssetType::EType t
}
if (gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), GP_OBJECT_MANIPULATE))
{
- is_modifiable = TRUE;
+ is_modifiable = true;
}
}
preview->mScriptEd->setScriptName(script_name);
@@ -1937,32 +1938,32 @@ void* LLLiveLSLEditor::createScriptEdPanel(void* userdata)
LLLiveLSLEditor::LLLiveLSLEditor(const LLSD& key) :
LLScriptEdContainer(key),
- mAskedForRunningInfo(FALSE),
- mHaveRunningInfo(FALSE),
- mCloseAfterSave(FALSE),
+ mAskedForRunningInfo(false),
+ mHaveRunningInfo(false),
+ mCloseAfterSave(false),
mPendingUploads(0),
- mIsModifiable(FALSE),
+ mIsModifiable(false),
mIsNew(false),
- mIsSaving(FALSE),
+ mIsSaving(false),
mObjectName("")
{
mFactoryMap["script ed panel"] = LLCallbackMap(LLLiveLSLEditor::createScriptEdPanel, this);
}
-BOOL LLLiveLSLEditor::postBuild()
+bool LLLiveLSLEditor::postBuild()
{
childSetCommitCallback("running", LLLiveLSLEditor::onRunningCheckboxClicked, this);
- getChildView("running")->setEnabled(FALSE);
+ getChildView("running")->setEnabled(false);
childSetAction("Reset",&LLLiveLSLEditor::onReset,this);
- getChildView("Reset")->setEnabled(TRUE);
+ getChildView("Reset")->setEnabled(true);
mMonoCheckbox = getChild<LLCheckBoxCtrl>("mono");
childSetCommitCallback("mono", &LLLiveLSLEditor::onMonoCheckboxClicked, this);
- getChildView("mono")->setEnabled(FALSE);
+ getChildView("mono")->setEnabled(true);
mScriptEd->mEditor->makePristine();
- mScriptEd->mEditor->setFocus(TRUE);
+ mScriptEd->mEditor->setFocus(true);
mExperiences = getChild<LLComboBox>("Experiences...");
@@ -1986,7 +1987,7 @@ void LLLiveLSLEditor::callbackLSLCompileSucceeded(const LLUUID& task_id,
mScriptEd->mErrorList->setCommentText(LLTrans::getString("CompileSuccessful"));
mScriptEd->mErrorList->setCommentText(LLTrans::getString("SaveComplete"));
getChild<LLCheckBoxCtrl>("running")->set(is_script_running);
- mIsSaving = FALSE;
+ mIsSaving = false;
closeIfNeeded();
}
@@ -2007,7 +2008,7 @@ void LLLiveLSLEditor::callbackLSLCompileFailed(const LLSD& compile_errors)
mScriptEd->mErrorList->addElement(row);
}
mScriptEd->selectFirstError();
- mIsSaving = FALSE;
+ mIsSaving = false;
closeIfNeeded();
}
@@ -2039,9 +2040,9 @@ void LLLiveLSLEditor::loadAsset()
if(!isGodlike && (!copyManipulate || !mIsModifiable))
{
mItem = new LLViewerInventoryItem(item);
- mScriptEd->setScriptText(getString("not_allowed"), FALSE);
+ mScriptEd->setScriptText(getString("not_allowed"), false);
mScriptEd->mEditor->makePristine();
- mScriptEd->enableSave(FALSE);
+ mScriptEd->enableSave(false);
mAssetStatus = PREVIEW_ASSET_LOADED;
}
else if(copyManipulate || isGodlike)
@@ -2060,24 +2061,24 @@ void LLLiveLSLEditor::loadAsset()
item->getType(),
&LLLiveLSLEditor::onLoadComplete,
(void*)user_data,
- TRUE);
+ true);
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_GetScriptRunning);
msg->nextBlockFast(_PREHASH_Script);
msg->addUUIDFast(_PREHASH_ObjectID, mObjectUUID);
msg->addUUIDFast(_PREHASH_ItemID, mItemUUID);
msg->sendReliable(object->getRegion()->getHost());
- mAskedForRunningInfo = TRUE;
+ mAskedForRunningInfo = true;
mAssetStatus = PREVIEW_ASSET_LOADING;
}
}
if(mItem.isNull())
{
- mScriptEd->setScriptText(LLStringUtil::null, FALSE);
+ mScriptEd->setScriptText(LLStringUtil::null, false);
mScriptEd->mEditor->makePristine();
mAssetStatus = PREVIEW_ASSET_LOADED;
- mIsModifiable = FALSE;
+ mIsModifiable = false;
}
refreshFromItem();
@@ -2100,8 +2101,8 @@ void LLLiveLSLEditor::loadAsset()
}
else
{
- mScriptEd->setScriptText(std::string(HELLO_LSL), TRUE);
- mScriptEd->enableSave(FALSE);
+ mScriptEd->setScriptText(std::string(HELLO_LSL), true);
+ mScriptEd->enableSave(false);
LLPermissions perm;
perm.init(gAgent.getID(), gAgent.getID(), LLUUID::null, gAgent.getGroupID());
perm.initMasks(PERM_ALL, PERM_ALL, PERM_NONE, PERM_NONE, PERM_MOVE | PERM_TRANSFER);
@@ -2138,7 +2139,7 @@ void LLLiveLSLEditor::onLoadComplete(const LLUUID& asset_id,
if( LL_ERR_NOERR == status )
{
instance->loadScriptText(asset_id, type);
- instance->mScriptEd->setEnableEditing(TRUE);
+ instance->mScriptEd->setEnableEditing(true);
instance->mAssetStatus = PREVIEW_ASSET_LOADED;
instance->mScriptEd->setAssetID(asset_id);
}
@@ -2179,7 +2180,7 @@ void LLLiveLSLEditor::loadScriptText(const LLUUID &uuid, LLAssetType::EType type
buffer[file_length] = '\0';
- mScriptEd->setScriptText(LLStringExplicit(&buffer[0]), TRUE);
+ mScriptEd->setScriptText(LLStringExplicit(&buffer[0]), true);
mScriptEd->makeEditorPristine();
std::string script_name = DEFAULT_SCRIPT_NAME;
@@ -2198,7 +2199,7 @@ void LLLiveLSLEditor::onRunningCheckboxClicked( LLUICtrl*, void* userdata )
LLLiveLSLEditor* self = (LLLiveLSLEditor*) userdata;
LLViewerObject* object = gObjectList.findObject( self->mObjectUUID );
LLCheckBoxCtrl* runningCheckbox = self->getChild<LLCheckBoxCtrl>("running");
- BOOL running = runningCheckbox->get();
+ bool running = runningCheckbox->get();
//self->mRunningCheckbox->get();
if( object )
{
@@ -2257,14 +2258,14 @@ void LLLiveLSLEditor::draw()
else
{
runningCheckbox->setLabel(getString("public_objects_can_not_run"));
- runningCheckbox->setEnabled(FALSE);
+ runningCheckbox->setEnabled(false);
// *FIX: Set it to false so that the ui is correct for
// a box that is released to public. It could be
// incorrect after a release/claim cycle, but will be
// correct after clicking on it.
- runningCheckbox->set(FALSE);
- mMonoCheckbox->set(FALSE);
+ runningCheckbox->set(false);
+ mMonoCheckbox->set(false);
}
}
else if(!object)
@@ -2272,10 +2273,10 @@ void LLLiveLSLEditor::draw()
// HACK: Display this information in the title bar.
// Really ought to put in main window.
setTitle(LLTrans::getString("ObjectOutOfRange"));
- runningCheckbox->setEnabled(FALSE);
- mMonoCheckbox->setEnabled(FALSE);
+ runningCheckbox->setEnabled(false);
+ mMonoCheckbox->setEnabled(false);
// object may have fallen out of range.
- mHaveRunningInfo = FALSE;
+ mHaveRunningInfo = false;
}
LLPreview::draw();
@@ -2292,15 +2293,15 @@ void LLLiveLSLEditor::onSearchReplace(void* userdata)
struct LLLiveLSLSaveData
{
- LLLiveLSLSaveData(const LLUUID& id, const LLViewerInventoryItem* item, BOOL active);
+ LLLiveLSLSaveData(const LLUUID& id, const LLViewerInventoryItem* item, bool active);
LLUUID mSaveObjectID;
LLPointer<LLViewerInventoryItem> mItem;
- BOOL mActive;
+ bool mActive;
};
LLLiveLSLSaveData::LLLiveLSLSaveData(const LLUUID& id,
const LLViewerInventoryItem* item,
- BOOL active) :
+ bool active) :
mSaveObjectID(id),
mActive(active)
{
@@ -2373,7 +2374,7 @@ void LLLiveLSLEditor::saveIfNeeded(bool sync /*= true*/)
mPendingUploads = 0;
// save the script
- mScriptEd->enableSave(FALSE);
+ mScriptEd->enableSave(false);
mScriptEd->mEditor->makePristine();
mScriptEd->mErrorList->deleteAllItems();
mScriptEd->mEditor->makePristine();
@@ -2406,7 +2407,7 @@ void LLLiveLSLEditor::saveIfNeeded(bool sync /*= true*/)
}
}
-BOOL LLLiveLSLEditor::canClose()
+bool LLLiveLSLEditor::canClose()
{
return (mScriptEd->canClose());
}
@@ -2429,7 +2430,7 @@ void LLLiveLSLEditor::onLoad(void* userdata)
}
// static
-void LLLiveLSLEditor::onSave(void* userdata, BOOL close_after_save)
+void LLLiveLSLEditor::onSave(void* userdata, bool close_after_save)
{
LLLiveLSLEditor* self = (LLLiveLSLEditor*)userdata;
if(self)
@@ -2455,12 +2456,12 @@ void LLLiveLSLEditor::processScriptRunningReply(LLMessageSystem* msg, void**)
LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key);
if(instance)
{
- instance->mHaveRunningInfo = TRUE;
- BOOL running;
+ instance->mHaveRunningInfo = true;
+ bool running;
msg->getBOOLFast(_PREHASH_Script, _PREHASH_Running, running);
LLCheckBoxCtrl* runningCheckbox = instance->getChild<LLCheckBoxCtrl>("running");
runningCheckbox->set(running);
- BOOL mono;
+ bool mono;
msg->getBOOLFast(_PREHASH_Script, "Mono", mono);
LLCheckBoxCtrl* monoCheckbox = instance->getChild<LLCheckBoxCtrl>("mono");
monoCheckbox->setEnabled(instance->getIsModifiable() && have_script_upload_cap(object_id));
@@ -2476,13 +2477,13 @@ void LLLiveLSLEditor::onMonoCheckboxClicked(LLUICtrl*, void* userdata)
self->mScriptEd->enableSave(self->getIsModifiable());
}
-BOOL LLLiveLSLEditor::monoChecked() const
+bool LLLiveLSLEditor::monoChecked() const
{
if(NULL != mMonoCheckbox)
{
- return mMonoCheckbox->getValue()? TRUE : FALSE;
+ return mMonoCheckbox->getValue()? true : false;
}
- return FALSE;
+ return false;
}
void LLLiveLSLEditor::setAssociatedExperience( LLHandle<LLLiveLSLEditor> editor, const LLSD& experience )
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h
index dc49770699..d003159d09 100644
--- a/indra/newview/llpreviewscript.h
+++ b/indra/newview/llpreviewscript.h
@@ -89,7 +89,7 @@ protected:
const std::string& sample,
const LLHandle<LLFloater>& floater_handle,
void (*load_callback)(void* userdata),
- void (*save_callback)(void* userdata, BOOL close_after_save),
+ void (*save_callback)(void* userdata, bool close_after_save),
void (*search_replace_callback)(void* userdata),
void* userdata,
bool live,
@@ -97,24 +97,22 @@ protected:
public:
~LLScriptEdCore();
- void initializeKeywords();
void initMenu();
void processKeywords();
- void processLoaded();
virtual void draw();
- /*virtual*/ BOOL postBuild();
- BOOL canClose();
+ /*virtual*/ bool postBuild();
+ bool canClose();
void setEnableEditing(bool enable);
bool canLoadOrSaveToFile( void* userdata );
- void setScriptText(const std::string& text, BOOL is_valid);
+ void setScriptText(const std::string& text, bool is_valid);
void makeEditorPristine();
bool loadScriptText(const std::string& filename);
bool writeToFile(const std::string& filename);
void sync();
- void doSave( BOOL close_after_save );
+ void doSave( bool close_after_save );
bool handleSaveChangesDialog(const LLSD& notification, const LLSD& response);
bool handleReloadFromServerDialog(const LLSD& notification, const LLSD& response);
@@ -150,7 +148,7 @@ public:
bool isFontSizeChecked(const LLSD &userdata);
void onChangeFontSize(const LLSD &size_name);
- virtual BOOL handleKeyHere(KEY key, MASK mask);
+ virtual bool handleKeyHere(KEY key, MASK mask);
void selectAll() { mEditor->selectAll(); }
private:
@@ -161,12 +159,12 @@ public:
void selectFirstError();
- void enableSave(BOOL b) {mEnableSave = b;}
+ void enableSave(bool b) {mEnableSave = b;}
protected:
void deleteBridges();
void setHelpPage(const std::string& help_string);
- void updateDynamicHelp(BOOL immediate = FALSE);
+ void updateDynamicHelp(bool immediate = false);
bool isKeyword(LLKeywordToken* token);
void addHelpItemToHistory(const std::string& help_string);
static void onErrorList(LLUICtrl*, void* user_data);
@@ -178,11 +176,11 @@ private:
std::string mScriptName;
LLScriptEditor* mEditor;
void (*mLoadCallback)(void* userdata);
- void (*mSaveCallback)(void* userdata, BOOL close_after_save);
+ void (*mSaveCallback)(void* userdata, bool close_after_save);
void (*mSearchReplaceCallback) (void* userdata);
void* mUserdata;
LLComboBox *mFunctions;
- BOOL mForceClose;
+ bool mForceClose;
LLPanel* mCodePanel;
LLScrollListCtrl* mErrorList;
std::vector<LLEntryAndEdCore*> mBridges;
@@ -190,12 +188,12 @@ private:
LLKeywordToken* mLastHelpToken;
LLFrameTimer mLiveHelpTimer;
S32 mLiveHelpHistorySize;
- BOOL mEnableSave;
- BOOL mHasScriptData;
+ bool mEnableSave;
+ bool mHasScriptData;
LLLiveLSLFile* mLiveFile;
LLUUID mAssociatedExperience;
- BOOL mScriptRemoved;
- BOOL mSaveDialogShown;
+ bool mScriptRemoved;
+ bool mSaveDialogShown;
LLUUID mAssetID;
LLScriptEdContainer* mContainer; // parent view
@@ -213,7 +211,7 @@ public:
LLScriptEdContainer(const LLSD& key);
LLScriptEdContainer(const LLSD& key, const bool live);
- BOOL handleKeyHere(KEY key, MASK mask);
+ bool handleKeyHere(KEY key, MASK mask);
protected:
std::string getTmpFileName(const std::string& script_name);
@@ -237,11 +235,11 @@ public:
virtual void callbackLSLCompileSucceeded();
virtual void callbackLSLCompileFailed(const LLSD& compile_errors);
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
protected:
virtual void draw();
- virtual BOOL canClose();
+ virtual bool canClose();
void closeIfNeeded();
virtual void loadAsset();
@@ -249,7 +247,7 @@ protected:
static void onSearchReplace(void* userdata);
static void onLoad(void* userdata);
- static void onSave(void* userdata, BOOL close_after_save);
+ static void onSave(void* userdata, bool close_after_save);
static void onLoadComplete(const LLUUID& uuid,
LLAssetType::EType type,
@@ -285,9 +283,9 @@ public:
bool is_script_running);
virtual void callbackLSLCompileFailed(const LLSD& compile_errors);
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
- void setIsNew() { mIsNew = TRUE; }
+ void setIsNew() { mIsNew = true; }
static void setAssociatedExperience( LLHandle<LLLiveLSLEditor> editor, const LLSD& experience );
static void onToggleExperience(LLUICtrl *ui, void* userdata);
@@ -298,24 +296,22 @@ public:
void updateExperiencePanel();
void requestExperiences();
void experienceChanged();
- void addAssociatedExperience(const LLSD& experience);
void setObjectName(std::string name) { mObjectName = name; }
private:
- virtual BOOL canClose();
+ virtual bool canClose();
void closeIfNeeded();
virtual void draw();
virtual void loadAsset();
- void loadAsset(BOOL is_new);
/*virtual*/ void saveIfNeeded(bool sync = true);
- BOOL monoChecked() const;
+ bool monoChecked() const;
static void onSearchReplace(void* userdata);
static void onLoad(void* userdata);
- static void onSave(void* userdata, BOOL close_after_save);
+ static void onSave(void* userdata, bool close_after_save);
static void onLoadComplete(const LLUUID& asset_uuid,
LLAssetType::EType type,
@@ -325,8 +321,6 @@ private:
void loadScriptText(const LLUUID &uuid, LLAssetType::EType type);
- static void onErrorList(LLUICtrl*, void* user_data);
-
static void* createScriptEdPanel(void* userdata);
static void onMonoCheckboxClicked(LLUICtrl*, void* userdata);
@@ -337,21 +331,21 @@ private:
private:
bool mIsNew;
//LLUUID mTransmitID;
- LLCheckBoxCtrl* mRunningCheckbox;
- BOOL mAskedForRunningInfo;
- BOOL mHaveRunningInfo;
- LLButton* mResetButton;
+ //LLCheckBoxCtrl* mRunningCheckbox;
+ bool mAskedForRunningInfo;
+ bool mHaveRunningInfo;
+ //LLButton* mResetButton;
LLPointer<LLViewerInventoryItem> mItem;
- BOOL mCloseAfterSave;
+ bool mCloseAfterSave;
// need to save both text and script, so need to decide when done
S32 mPendingUploads;
- BOOL mIsSaving;
+ bool mIsSaving;
- BOOL getIsModifiable() const { return mIsModifiable; } // Evaluated on load assert
+ bool getIsModifiable() const { return mIsModifiable; } // Evaluated on load assert
LLCheckBoxCtrl* mMonoCheckbox;
- BOOL mIsModifiable;
+ bool mIsModifiable;
LLComboBox* mExperiences;
diff --git a/indra/newview/llpreviewsound.cpp b/indra/newview/llpreviewsound.cpp
index 105c5e8cbe..2fbbfdc40d 100644
--- a/indra/newview/llpreviewsound.cpp
+++ b/indra/newview/llpreviewsound.cpp
@@ -48,7 +48,7 @@ LLPreviewSound::LLPreviewSound(const LLSD& key)
}
// virtual
-BOOL LLPreviewSound::postBuild()
+bool LLPreviewSound::postBuild()
{
const LLInventoryItem* item = getItem();
if (item)
diff --git a/indra/newview/llpreviewsound.h b/indra/newview/llpreviewsound.h
index 0453bfd936..4c0aebd5e3 100644
--- a/indra/newview/llpreviewsound.h
+++ b/indra/newview/llpreviewsound.h
@@ -38,7 +38,7 @@ public:
static void auditionSound( void* userdata );
protected:
- /* virtual */ BOOL postBuild();
+ bool postBuild() override;
};
#endif // LL_LLPREVIEWSOUND_H
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index ea7d4800e0..28428112a1 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -66,23 +66,23 @@ const F32 PREVIEW_TEXTURE_MIN_ASPECT = 0.005f;
LLPreviewTexture::LLPreviewTexture(const LLSD& key)
: LLPreview(key),
- mLoadingFullImage( FALSE ),
- mShowKeepDiscard(FALSE),
- mCopyToInv(FALSE),
- mIsCopyable(FALSE),
- mIsFullPerm(FALSE),
- mUpdateDimensions(TRUE),
+ mLoadingFullImage( false ),
+ mShowKeepDiscard(false),
+ mCopyToInv(false),
+ mIsCopyable(false),
+ mIsFullPerm(false),
+ mUpdateDimensions(true),
mLastHeight(0),
mLastWidth(0),
mAspectRatio(0.f),
- mPreviewToSave(FALSE),
+ mPreviewToSave(false),
mImage(NULL),
mImageOldBoostLevel(LLGLTexture::BOOST_NONE)
{
updateImageID();
if (key.has("save_as"))
{
- mPreviewToSave = TRUE;
+ mPreviewToSave = true;
}
}
@@ -126,7 +126,7 @@ void LLPreviewTexture::populateRatioList()
}
// virtual
-BOOL LLPreviewTexture::postBuild()
+bool LLPreviewTexture::postBuild()
{
if (mCopyToInv)
{
@@ -158,7 +158,7 @@ BOOL LLPreviewTexture::postBuild()
getChild<LLUICtrl>("desc")->setValue(item->getDescription());
getChild<LLLineEditor>("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);
}
- BOOL source_library = mObjectUUID.isNull() && gInventory.isObjectDescendentOf(item->getUUID(), gInventory.getLibraryRootFolderID());
+ bool source_library = mObjectUUID.isNull() && gInventory.isObjectDescendentOf(item->getUUID(), gInventory.getLibraryRootFolderID());
if (source_library)
{
getChildView("Discard")->setEnabled(false);
@@ -283,7 +283,7 @@ void LLPreviewTexture::draw()
// virtual
-BOOL LLPreviewTexture::canSaveAs() const
+bool LLPreviewTexture::canSaveAs() const
{
return mIsFullPerm && !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset();
}
@@ -304,18 +304,18 @@ void LLPreviewTexture::saveTextureToFile(const std::vector<std::string>& filenam
const LLInventoryItem* item = getItem();
if (item && mPreviewToSave)
{
- mPreviewToSave = FALSE;
+ mPreviewToSave = false;
LLFloaterReg::showTypedInstance<LLPreviewTexture>("preview_texture", item->getUUID());
}
// remember the user-approved/edited file name.
mSaveFileName = filenames[0];
- mLoadingFullImage = TRUE;
+ mLoadingFullImage = true;
getWindow()->incBusyCount();
mImage->forceToSaveRawImage(0);//re-fetch the raw image if the old one is removed.
mImage->setLoadedCallback(LLPreviewTexture::onFileLoadedForSave,
- 0, TRUE, FALSE, new LLUUID(mItemUUID), &mCallbackTextureList);
+ 0, true, false, new LLUUID(mItemUUID), &mCallbackTextureList);
}
@@ -348,16 +348,16 @@ void LLPreviewTexture::saveMultipleToFile(const std::string& file_name)
mSaveFileName = filepath;
- mLoadingFullImage = TRUE;
+ mLoadingFullImage = true;
getWindow()->incBusyCount();
mImage->forceToSaveRawImage(0);//re-fetch the raw image if the old one is removed.
mImage->setLoadedCallback(LLPreviewTexture::onFileLoadedForSave,
- 0, TRUE, FALSE, new LLUUID(mItemUUID), &mCallbackTextureList);
+ 0, true, false, new LLUUID(mItemUUID), &mCallbackTextureList);
}
// virtual
-void LLPreviewTexture::reshape(S32 width, S32 height, BOOL called_from_parent)
+void LLPreviewTexture::reshape(S32 width, S32 height, bool called_from_parent)
{
LLPreview::reshape(width, height, called_from_parent);
@@ -412,7 +412,7 @@ void LLPreviewTexture::onFocusReceived()
void LLPreviewTexture::openToSave()
{
- mPreviewToSave = TRUE;
+ mPreviewToSave = true;
}
void LLPreviewTexture::hideCtrlButtons()
@@ -426,12 +426,12 @@ void LLPreviewTexture::hideCtrlButtons()
}
// static
-void LLPreviewTexture::onFileLoadedForSave(BOOL success,
+void LLPreviewTexture::onFileLoadedForSave(bool success,
LLViewerFetchedTexture *src_vi,
LLImageRaw* src,
LLImageRaw* aux_src,
S32 discard_level,
- BOOL final,
+ bool final,
void* userdata)
{
LLUUID* item_uuid = (LLUUID*) userdata;
@@ -445,7 +445,7 @@ void LLPreviewTexture::onFileLoadedForSave(BOOL success,
if( self )
{
self->getWindow()->decBusyCount();
- self->mLoadingFullImage = FALSE;
+ self->mLoadingFullImage = false;
}
}
@@ -530,12 +530,12 @@ void LLPreviewTexture::updateDimensions()
// Reshape the floater only when required
if (mUpdateDimensions)
{
- mUpdateDimensions = FALSE;
+ mUpdateDimensions = false;
//reshape floater
reshape(getRect().getWidth(), getRect().getHeight());
- gFloaterView->adjustToFitScreen(this, FALSE);
+ gFloaterView->adjustToFitScreen(this, false);
LLRect dim_rect(getChildView("dimensions")->getRect());
LLRect aspect_label_rect(getChildView("aspect_ratio")->getRect());
@@ -547,7 +547,7 @@ void LLPreviewTexture::updateDimensions()
// Return true if everything went fine, false if we somewhat modified the ratio as we bumped on border values
bool LLPreviewTexture::setAspectRatio(const F32 width, const F32 height)
{
- mUpdateDimensions = TRUE;
+ mUpdateDimensions = true;
// We don't allow negative width or height. Also, if height is positive but too small, we reset to default
// A default 0.f value for mAspectRatio means "unconstrained" in the rest of the code
@@ -595,7 +595,7 @@ void LLPreviewTexture::loadAsset()
mImage->setBoostLevel(LLGLTexture::BOOST_PREVIEW);
mImage->forceToSaveRawImage(0) ;
mAssetStatus = PREVIEW_ASSET_LOADING;
- mUpdateDimensions = TRUE;
+ mUpdateDimensions = true;
updateDimensions();
getChildView("save_tex_btn")->setEnabled(canSaveAs());
if (mObjectUUID.notNull())
@@ -606,7 +606,7 @@ void LLPreviewTexture::loadAsset()
else
{
// check that we can remove item
- BOOL source_library = gInventory.isObjectDescendentOf(mItemUUID, gInventory.getLibraryRootFolderID());
+ bool source_library = gInventory.isObjectDescendentOf(mItemUUID, gInventory.getLibraryRootFolderID());
if (source_library)
{
getChildView("Discard")->setEnabled(false);
@@ -674,7 +674,7 @@ void LLPreviewTexture::adjustAspectRatio()
}
}
- mUpdateDimensions = TRUE;
+ mUpdateDimensions = true;
}
void LLPreviewTexture::updateImageID()
@@ -687,9 +687,9 @@ void LLPreviewTexture::updateImageID()
// here's the old logic...
//mShowKeepDiscard = item->getPermissions().getCreator() != gAgent.getID();
// here's the new logic... 'cos we hate disappearing buttons.
- mShowKeepDiscard = TRUE;
+ mShowKeepDiscard = true;
- mCopyToInv = FALSE;
+ mCopyToInv = false;
LLPermissions perm(item->getPermissions());
mIsCopyable = perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID()) && perm.allowTransferTo(gAgent.getID());
mIsFullPerm = item->checkPermissionsSet(PERM_ITEM_UNRESTRICTED);
@@ -697,10 +697,10 @@ void LLPreviewTexture::updateImageID()
else // not an item, assume it's an asset id
{
mImageID = mItemUUID;
- mShowKeepDiscard = FALSE;
- mCopyToInv = TRUE;
- mIsCopyable = TRUE;
- mIsFullPerm = TRUE;
+ mShowKeepDiscard = false;
+ mCopyToInv = true;
+ mIsCopyable = true;
+ mIsFullPerm = true;
}
}
diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h
index 16db51332e..fdc6dddb38 100644
--- a/indra/newview/llpreviewtexture.h
+++ b/indra/newview/llpreviewtexture.h
@@ -43,22 +43,22 @@ public:
virtual void draw();
- virtual BOOL canSaveAs() const;
+ virtual bool canSaveAs() const;
virtual void saveAs();
virtual void loadAsset();
virtual EAssetStatus getAssetStatus();
- virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+ virtual void reshape(S32 width, S32 height, bool called_from_parent = true);
virtual void onFocusReceived();
static void onFileLoadedForSave(
- BOOL success,
+ bool success,
LLViewerFetchedTexture *src_vi,
LLImageRaw* src,
LLImageRaw* aux_src,
S32 discard_level,
- BOOL final,
+ bool final,
void* userdata );
void openToSave();
@@ -73,7 +73,7 @@ public:
protected:
void init();
void populateRatioList();
- /* virtual */ BOOL postBuild();
+ /* virtual */ bool postBuild();
bool setAspectRatio(const F32 width, const F32 height);
static void onAspectRatioCommit(LLUICtrl*,void* userdata);
void adjustAspectRatio();
@@ -86,18 +86,18 @@ private:
S32 mImageOldBoostLevel;
std::string mSaveFileName;
LLFrameTimer mSavedFileTimer;
- BOOL mLoadingFullImage;
- BOOL mShowKeepDiscard;
- BOOL mCopyToInv;
+ bool mLoadingFullImage;
+ bool mShowKeepDiscard;
+ bool mCopyToInv;
// Save the image once it's loaded.
- BOOL mPreviewToSave;
+ bool mPreviewToSave;
// This is stored off in a member variable, because the save-as
// button and drag and drop functionality need to know.
- BOOL mIsCopyable;
- BOOL mIsFullPerm;
- BOOL mUpdateDimensions;
+ bool mIsCopyable;
+ bool mIsFullPerm;
+ bool mUpdateDimensions;
S32 mLastHeight;
S32 mLastWidth;
F32 mAspectRatio;
diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp
index 416848f9af..7c22514264 100644
--- a/indra/newview/llprogressview.cpp
+++ b/indra/newview/llprogressview.cpp
@@ -77,7 +77,7 @@ LLProgressView::LLProgressView()
mFadeFromLoginTimer.stop();
}
-BOOL LLProgressView::postBuild()
+bool LLProgressView::postBuild()
{
mProgressBar = getChild<LLProgressBar>("login_progress_bar");
@@ -96,12 +96,12 @@ BOOL LLProgressView::postBuild()
getChild<LLTextBox>("message_text")->setClickedCallback(onClickMessage, this);
// hidden initially, until we need it
- setVisible(FALSE);
+ setVisible(false);
LLNotifications::instance().getChannel("AlertModal")->connectChanged(boost::bind(&LLProgressView::onAlertModal, this, _1));
sInstance = this;
- return TRUE;
+ return true;
}
@@ -115,24 +115,24 @@ LLProgressView::~LLProgressView()
sInstance = NULL;
}
-BOOL LLProgressView::handleHover(S32 x, S32 y, MASK mask)
+bool LLProgressView::handleHover(S32 x, S32 y, MASK mask)
{
if( childrenHandleHover( x, y, mask ) == NULL )
{
gViewerWindow->setCursor(UI_CURSOR_WAIT);
}
- return TRUE;
+ return true;
}
-BOOL LLProgressView::handleKeyHere(KEY key, MASK mask)
+bool LLProgressView::handleKeyHere(KEY key, MASK mask)
{
// Suck up all keystokes except CTRL-Q.
if( ('Q' == key) && (MASK_CONTROL == mask) )
{
LLAppViewer::instance()->userQuit();
}
- return TRUE;
+ return true;
}
void LLProgressView::revealIntroPanel()
@@ -141,20 +141,20 @@ void LLProgressView::revealIntroPanel()
std::string intro_url = gSavedSettings.getString("PostFirstLoginIntroURL");
if ( intro_url.length() > 0 &&
gSavedSettings.getBOOL("BrowserJavascriptEnabled") &&
- gSavedSettings.getBOOL("PostFirstLoginIntroViewed" ) == FALSE )
+ gSavedSettings.getBOOL("PostFirstLoginIntroViewed" ) == false )
{
// hide the progress bar
getChild<LLView>("stack1")->setVisible(false);
// navigate to intro URL and reveal widget
mMediaCtrl->navigateTo( intro_url );
- mMediaCtrl->setVisible( TRUE );
+ mMediaCtrl->setVisible( true );
// flag as having seen the new user post login intro
- gSavedSettings.setBOOL("PostFirstLoginIntroViewed", TRUE );
+ gSavedSettings.setBOOL("PostFirstLoginIntroViewed", true );
- mMediaCtrl->setFocus(TRUE);
+ mMediaCtrl->setFocus(true);
}
mFadeFromLoginTimer.start();
@@ -173,7 +173,7 @@ void LLProgressView::setStartupComplete()
}
}
-void LLProgressView::setVisible(BOOL visible)
+void LLProgressView::setVisible(bool visible)
{
if (!visible && mFadeFromLoginTimer.getStarted())
{
@@ -182,14 +182,14 @@ void LLProgressView::setVisible(BOOL visible)
// hiding progress view
if (getVisible() && !visible)
{
- LLPanel::setVisible(FALSE);
+ LLPanel::setVisible(false);
}
// showing progress view
else if (visible && (!getVisible() || mFadeToWorldTimer.getStarted()))
{
- setFocus(TRUE);
+ setFocus(true);
mFadeToWorldTimer.stop();
- LLPanel::setVisible(TRUE);
+ LLPanel::setVisible(true);
}
}
@@ -251,7 +251,7 @@ void LLProgressView::drawLogos(F32 alpha)
iter->mDrawRect.getHeight(),
iter->mTexturep.get(),
UI_VERTEX_COLOR % alpha,
- FALSE,
+ false,
iter->mClipRect,
iter->mOffsetRect);
}
@@ -298,7 +298,7 @@ void LLProgressView::draw()
gFocusMgr.releaseFocusIfNeeded( this );
// turn off panel that hosts intro so we see the world
- setVisible(FALSE);
+ setVisible(false);
// stop observing events since we no longer care
mMediaCtrl->remObserver( this );
@@ -368,7 +368,7 @@ void LLProgressView::loadLogo(const std::string &path,
raw->expandToPowerOfTwo();
TextureData data;
- data.mTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE);
+ data.mTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), false);
data.mDrawRect = pos_rect;
data.mClipRect = clip_rect;
data.mOffsetRect = offset_rect;
@@ -399,21 +399,6 @@ void LLProgressView::initLogos()
temp_str += gDirUtilp->getDirDelimiter();
-#ifdef LL_FMODSTUDIO
- // original image size is 264x96, it is on longer side but
- // with no internal paddings so it gets additional padding
- icon_width = 77;
- icon_height = 21;
- S32 pad_fmod_y = 4;
- texture_start_x++;
- loadLogo(temp_str + "fmod_logo.png",
- image_codec,
- LLRect(texture_start_x, texture_start_y + pad_fmod_y + icon_height, texture_start_x + icon_width, texture_start_y + pad_fmod_y),
- default_clip,
- default_clip);
-
- texture_start_x += icon_width + default_pad + 1;
-#endif //LL_FMODSTUDIO
#ifdef LL_HAVOK
// original image size is 342x113, central element is on a larger side
// plus internal padding, so it gets slightly more height than desired 32
@@ -502,7 +487,7 @@ void LLProgressView::initStartTexture(S32 location_id, bool is_in_production)
{
// HACK: getLocalTexture allows only power of two dimentions
raw->expandToPowerOfTwo();
- gStartTexture = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE);
+ gStartTexture = LLViewerTextureManager::getLocalTexture(raw.get(), false);
}
}
@@ -519,8 +504,8 @@ void LLProgressView::initTextures(S32 location_id, bool is_in_production)
initStartTexture(location_id, is_in_production);
initLogos();
- childSetVisible("panel_icons", mLogosList.empty() ? FALSE : TRUE);
- childSetVisible("panel_top_spacer", mLogosList.empty() ? TRUE : FALSE);
+ childSetVisible("panel_icons", mLogosList.empty() ? false : true);
+ childSetVisible("panel_top_spacer", mLogosList.empty() ? true : false);
}
void LLProgressView::releaseTextures()
@@ -528,11 +513,11 @@ void LLProgressView::releaseTextures()
gStartTexture = NULL;
mLogosList.clear();
- childSetVisible("panel_top_spacer", TRUE);
- childSetVisible("panel_icons", FALSE);
+ childSetVisible("panel_top_spacer", true);
+ childSetVisible("panel_icons", false);
}
-void LLProgressView::setCancelButtonVisible(BOOL b, const std::string& label)
+void LLProgressView::setCancelButtonVisible(bool b, const std::string& label)
{
mCancelBtn->setVisible( b );
mCancelBtn->setEnabled( b );
@@ -554,8 +539,8 @@ void LLProgressView::onCancelButtonClicked(void*)
else
{
gAgent.teleportCancel();
- sInstance->mCancelBtn->setEnabled(FALSE);
- sInstance->setVisible(FALSE);
+ sInstance->mCancelBtn->setEnabled(false);
+ sInstance->setVisible(false);
}
}
diff --git a/indra/newview/llprogressview.h b/indra/newview/llprogressview.h
index 56377a5889..c40a865a5e 100644
--- a/indra/newview/llprogressview.h
+++ b/indra/newview/llprogressview.h
@@ -48,15 +48,15 @@ public:
LLProgressView();
virtual ~LLProgressView();
- BOOL postBuild();
+ bool postBuild();
/*virtual*/ void draw();
void drawStartTexture(F32 alpha);
void drawLogos(F32 alpha);
- /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
- /*virtual*/ void setVisible(BOOL visible);
+ /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleKeyHere(KEY key, MASK mask);
+ /*virtual*/ void setVisible(bool visible);
// inherited from LLViewerMediaObserver
/*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
@@ -76,7 +76,7 @@ public:
void initTextures(S32 location_id, bool is_in_production);
void releaseTextures();
- void setCancelButtonVisible(BOOL b, const std::string& label);
+ void setCancelButtonVisible(bool b, const std::string& label);
static void onCancelButtonClicked( void* );
static void onClickMessage(void*);
diff --git a/indra/newview/llreflectionmap.cpp b/indra/newview/llreflectionmap.cpp
index a26445b4bc..30a61144b9 100644
--- a/indra/newview/llreflectionmap.cpp
+++ b/indra/newview/llreflectionmap.cpp
@@ -49,7 +49,7 @@ LLReflectionMap::~LLReflectionMap()
}
}
-void LLReflectionMap::update(U32 resolution, U32 face)
+void LLReflectionMap::update(U32 resolution, U32 face, bool force_dynamic, F32 near_clip, bool useClipPlane, LLPlane clipPlane)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
mLastUpdateTime = gFrameTimeSeconds;
@@ -63,7 +63,10 @@ void LLReflectionMap::update(U32 resolution, U32 face)
{
resolution /= 2;
}
- gViewerWindow->cubeSnapshot(LLVector3(mOrigin), mCubeArray, mCubeIndex, face, getNearClip(), getIsDynamic());
+
+ F32 clip = (near_clip > 0) ? near_clip : getNearClip();
+
+ gViewerWindow->cubeSnapshot(LLVector3(mOrigin), mCubeArray, mCubeIndex, face, clip, getIsDynamic() || force_dynamic, useClipPlane, clipPlane);
}
void LLReflectionMap::autoAdjustOrigin()
@@ -163,7 +166,7 @@ void LLReflectionMap::autoAdjustOrigin()
}
}
- else if (mViewerObject)
+ else if (mViewerObject && !mViewerObject->isDead())
{
mPriority = 1;
mOrigin.load3(mViewerObject->getPositionAgent().mV);
diff --git a/indra/newview/llreflectionmap.h b/indra/newview/llreflectionmap.h
index 7ea0fe6187..9e888f20d0 100644
--- a/indra/newview/llreflectionmap.h
+++ b/indra/newview/llreflectionmap.h
@@ -36,6 +36,15 @@ class alignas(16) LLReflectionMap : public LLRefCount
{
LL_ALIGN_NEW
public:
+
+ enum class ProbeType
+ {
+ ALL = 0,
+ RADIANCE,
+ IRRADIANCE,
+ REFLECTION
+ };
+
// allocate an environment map of the given resolution
LLReflectionMap();
@@ -43,7 +52,7 @@ public:
// update this environment map
// resolution - size of cube map to generate
- void update(U32 resolution, U32 face);
+ void update(U32 resolution, U32 face, bool force_dynamic = false, F32 near_clip = -1.f, bool useClipPlane = false, LLPlane clipPlane = LLPlane(LLVector3(0, 0, 0), LLVector3(0, 0, 1)));
// for volume partition probes, try to place this probe in the best spot
void autoAdjustOrigin();
@@ -127,5 +136,7 @@ public:
GLuint mOcclusionQuery = 0;
bool mOccluded = false;
U32 mOcclusionPendingFrames = 0;
+
+ ProbeType mType;
};
diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp
index 69674417c1..1762d7d5c1 100644
--- a/indra/newview/llreflectionmapmanager.cpp
+++ b/indra/newview/llreflectionmapmanager.cpp
@@ -27,6 +27,9 @@
#include "llviewerprecompiledheaders.h"
#include "llreflectionmapmanager.h"
+
+#include <vector>
+
#include "llviewercamera.h"
#include "llspatialpartition.h"
#include "llviewerregion.h"
@@ -35,9 +38,89 @@
#include "llviewercontrol.h"
#include "llenvironment.h"
#include "llstartup.h"
+#include "llviewermenufile.h"
+#include "llnotificationsutil.h"
+
+#if LL_WINDOWS
+#pragma warning (push)
+#pragma warning (disable : 4702) // compiler complains unreachable code
+#endif
+#define TINYEXR_USE_MINIZ 0
+#include "zlib.h"
+#define TINYEXR_IMPLEMENTATION
+#include "tinyexr/tinyexr.h"
+#if LL_WINDOWS
+#pragma warning (pop)
+#endif
+
+LLPointer<LLImageGL> gEXRImage;
+
+void load_exr(const std::string& filename)
+{
+ // reset reflection maps when previewing a new HDRI
+ gPipeline.mReflectionMapManager.reset();
+ gPipeline.mReflectionMapManager.initReflectionMaps();
+
+ float* out; // width * height * RGBA
+ int width;
+ int height;
+ const char* err = NULL; // or nullptr in C++11
+
+ int ret = LoadEXRWithLayer(&out, &width, &height, filename.c_str(), /* layername */ nullptr, &err);
+ if (ret == TINYEXR_SUCCESS)
+ {
+ U32 texName = 0;
+ LLImageGL::generateTextures(1, &texName);
+
+ gEXRImage = new LLImageGL(texName, 4, GL_TEXTURE_2D, GL_RGB16F, GL_RGB16F, GL_FLOAT, LLTexUnit::TAM_CLAMP);
+ gEXRImage->setHasMipMaps(TRUE);
+ gEXRImage->setUseMipMaps(TRUE);
+ gEXRImage->setFilteringOption(LLTexUnit::TFO_TRILINEAR);
+
+ gGL.getTexUnit(0)->bind(gEXRImage);
+
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB16F, width, height, 0, GL_RGBA, GL_FLOAT, out);
+ free(out); // release memory of image data
+
+ glGenerateMipmap(GL_TEXTURE_2D);
+
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+
+ }
+ else
+ {
+ LLSD notif_args;
+ notif_args["WHAT"] = filename;
+ notif_args["REASON"] = "Unknown";
+ if (err)
+ {
+ notif_args["REASON"] = std::string(err);
+ FreeEXRErrorMessage(err); // release memory of error message.
+ }
+ LLNotificationsUtil::add("CannotLoad", notif_args);
+ }
+}
+
+void hdri_preview()
+{
+ LLFilePickerReplyThread::startPicker(
+ [](const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter load_filter, LLFilePicker::ESaveFilter save_filter)
+ {
+ if (LLAppViewer::instance()->quitRequested())
+ {
+ return;
+ }
+ if (filenames.size() > 0)
+ {
+ load_exr(filenames[0]);
+ }
+ },
+ LLFilePicker::FFLOAD_HDRI,
+ true);
+}
-extern BOOL gCubeSnapshot;
-extern BOOL gTeleportDisplay;
+extern bool gCubeSnapshot;
+extern bool gTeleportDisplay;
static U32 sUpdateCount = 0;
@@ -130,6 +213,11 @@ void LLReflectionMapManager::update()
return;
}
+ if (mPaused && gFrameTimeSeconds > mResumeTime)
+ {
+ resume();
+ }
+
initReflectionMaps();
if (!mRenderTarget.isComplete())
@@ -306,8 +394,8 @@ void LLReflectionMapManager::update()
}
}
- if (realtime &&
- closestDynamic == nullptr &&
+ if (realtime &&
+ closestDynamic == nullptr &&
probe->mCubeIndex != -1 &&
probe->getIsDynamic())
{
@@ -322,7 +410,7 @@ void LLReflectionMapManager::update()
// should do a full irradiance pass on "odd" frames and a radiance pass on "even" frames
closestDynamic->autoAdjustOrigin();
- // store and override the value of "isRadiancePass" -- parts of the render pipe rely on "isRadiancePass" to set
+ // store and override the value of "isRadiancePass" -- parts of the render pipe rely on "isRadiancePass" to set
// lighting values etc
bool radiance_pass = isRadiancePass();
mRadiancePass = mRealtimeRadiancePass;
@@ -463,17 +551,22 @@ void LLReflectionMapManager::getReflectionMaps(std::vector<LLReflectionMap*>& ma
LLReflectionMap* LLReflectionMapManager::registerSpatialGroup(LLSpatialGroup* group)
{
- if (group->getSpatialPartition()->mPartitionType == LLViewerRegion::PARTITION_VOLUME)
+ if (!group)
{
- OctreeNode* node = group->getOctreeNode();
- F32 size = node->getSize().getF32ptr()[0];
- if (size >= 15.f && size <= 17.f)
- {
- return addProbe(group);
- }
+ return nullptr;
}
-
- return nullptr;
+ LLSpatialPartition* part = group->getSpatialPartition();
+ if (!part || part->mPartitionType != LLViewerRegion::PARTITION_VOLUME)
+ {
+ return nullptr;
+ }
+ OctreeNode* node = group->getOctreeNode();
+ F32 size = node->getSize().getF32ptr()[0];
+ if (size < 15.f || size > 17.f)
+ {
+ return nullptr;
+ }
+ return addProbe(group);
}
LLReflectionMap* LLReflectionMapManager::registerViewerObject(LLViewerObject* vobj)
@@ -573,7 +666,7 @@ void LLReflectionMapManager::doProbeUpdate()
// Do the reflection map update render passes.
// For every 12 calls of this function, one complete reflection probe radiance map and irradiance map is generated
-// First six passes render the scene with direct lighting only into a scratch space cube map at the end of the cube map array and generate
+// First six passes render the scene with direct lighting only into a scratch space cube map at the end of the cube map array and generate
// a simple mip chain (not convolution filter).
// At the end of these passes, an irradiance map is generated for this probe and placed into the irradiance cube map array at the index for this probe
// The next six passes render the scene with both radiance and irradiance into the same scratch space cube map and generate a simple mip chain.
@@ -734,6 +827,7 @@ void LLReflectionMapManager::updateProbeFace(LLReflectionMap* probe, U32 face)
mTexture->bind(channel);
gRadianceGenProgram.uniform1i(sSourceIdx, sourceIdx);
gRadianceGenProgram.uniform1f(LLShaderMgr::REFLECTION_PROBE_MAX_LOD, mMaxProbeLOD);
+ gRadianceGenProgram.uniform1f(LLShaderMgr::REFLECTION_PROBE_STRENGTH, 1.f);
U32 res = mMipChain[0].getWidth();
@@ -827,9 +921,10 @@ void LLReflectionMapManager::reset()
mReset = true;
}
-void LLReflectionMapManager::pause()
+void LLReflectionMapManager::pause(F32 duration)
{
mPaused = true;
+ mResumeTime = gFrameTimeSeconds + duration;
}
void LLReflectionMapManager::resume()
@@ -898,33 +993,41 @@ void LLReflectionMapManager::updateUniforms()
// see class3/deferred/reflectionProbeF.glsl
struct ReflectionProbeData
{
- // for box probes, matrix that transforms from camera space to a [-1, 1] cube representing the bounding box of
+ // for box probes, matrix that transforms from camera space to a [-1, 1] cube representing the bounding box of
// the box probe
- LLMatrix4 refBox[LL_MAX_REFLECTION_PROBE_COUNT];
+ LLMatrix4 refBox[LL_MAX_REFLECTION_PROBE_COUNT];
+
+ LLMatrix4 heroBox;
// for sphere probes, origin (xyz) and radius (w) of refmaps in clip space
- LLVector4 refSphere[LL_MAX_REFLECTION_PROBE_COUNT];
+ LLVector4 refSphere[LL_MAX_REFLECTION_PROBE_COUNT];
- // extra parameters
+ // extra parameters
// x - irradiance scale
// y - radiance scale
// z - fade in
// w - znear
LLVector4 refParams[LL_MAX_REFLECTION_PROBE_COUNT];
+ LLVector4 heroSphere;
+
// indices used by probe:
// [i][0] - cubemap array index for this probe
// [i][1] - index into "refNeighbor" for probes that intersect this probe
// [i][2] - number of probes that intersect this probe, or -1 for no neighbors
// [i][3] - priority (probe type stored in sign bit - positive for spheres, negative for boxes)
- GLint refIndex[LL_MAX_REFLECTION_PROBE_COUNT][4];
+ GLint refIndex[LL_MAX_REFLECTION_PROBE_COUNT][4];
// list of neighbor indices
- GLint refNeighbor[4096];
+ GLint refNeighbor[4096];
GLint refBucket[256][4]; //lookup table for which index to start with for the given Z depth
// numbrer of active refmaps
- GLint refmapCount;
+ GLint refmapCount;
+
+ GLint heroShape;
+ GLint heroMipCount;
+ GLint heroProbeCount;
};
mReflectionMaps.resize(mReflectionProbeCount);
@@ -954,9 +1057,8 @@ void LLReflectionMapManager::updateUniforms()
LLEnvironment& environment = LLEnvironment::instance();
LLSettingsSky::ptr_t psky = environment.getCurrentSky();
- static LLCachedControl<F32> cloud_shadow_scale(gSavedSettings, "RenderCloudShadowAmbianceFactor", 0.125f);
static LLCachedControl<bool> should_auto_adjust(gSavedSettings, "RenderSkyAutoAdjustLegacy", true);
- F32 minimum_ambiance = psky->getTotalReflectionProbeAmbiance(cloud_shadow_scale, should_auto_adjust);
+ F32 minimum_ambiance = psky->getReflectionProbeAmbiance(should_auto_adjust);
bool is_ambiance_pass = gCubeSnapshot && !isRadiancePass();
F32 ambscale = is_ambiance_pass ? 0.f : 1.f;
@@ -1012,7 +1114,6 @@ void LLReflectionMapManager::updateUniforms()
{
refmap->mRadius = refmap->mViewerObject->getScale().mV[0] * 0.5f;
}
-
}
modelview.affineTransform(refmap->mOrigin, oa);
rpd.refSphere[count].set(oa.getF32ptr());
@@ -1115,6 +1216,16 @@ void LLReflectionMapManager::updateUniforms()
rpd.refmapCount = count;
+ gPipeline.mHeroProbeManager.updateUniforms();
+
+ // Get the hero data.
+
+ rpd.heroBox = gPipeline.mHeroProbeManager.mHeroData.heroBox;
+ rpd.heroSphere = gPipeline.mHeroProbeManager.mHeroData.heroSphere;
+ rpd.heroShape = gPipeline.mHeroProbeManager.mHeroData.heroShape;
+ rpd.heroMipCount = gPipeline.mHeroProbeManager.mHeroData.heroMipCount;
+ rpd.heroProbeCount = gPipeline.mHeroProbeManager.mHeroData.heroProbeCount;
+
//copy rpd into uniform buffer object
if (mUBO == 0)
{
@@ -1152,7 +1263,7 @@ void LLReflectionMapManager::setUniforms()
}
if (mUBO == 0)
- {
+ {
updateUniforms();
}
glBindBufferBase(GL_UNIFORM_BUFFER, 1, mUBO);
@@ -1262,6 +1373,8 @@ void LLReflectionMapManager::initReflectionMaps()
if (mTexture.isNull() || mReflectionProbeCount != count || mReset)
{
+ gEXRImage = nullptr;
+
mReset = false;
mReflectionProbeCount = count;
mProbeResolution = nhpo2(llclamp(gSavedSettings.getU32("RenderReflectionProbeResolution"), (U32)64, (U32)512));
@@ -1277,7 +1390,7 @@ void LLReflectionMapManager::initReflectionMaps()
mTexture->allocate(mProbeResolution, 3, mReflectionProbeCount + 2);
mIrradianceMaps = new LLCubeMapArray();
- mIrradianceMaps->allocate(LL_IRRADIANCE_MAP_RESOLUTION, 3, mReflectionProbeCount, FALSE);
+ mIrradianceMaps->allocate(LL_IRRADIANCE_MAP_RESOLUTION, 3, mReflectionProbeCount, false);
}
// reset probe state
@@ -1319,7 +1432,6 @@ void LLReflectionMapManager::initReflectionMaps()
mDefaultProbe->mComplete = default_complete;
touch_default_probe(mDefaultProbe);
-
}
if (mVertexBuffer.isNull())
@@ -1343,8 +1455,8 @@ void LLReflectionMapManager::initReflectionMaps()
}
}
-void LLReflectionMapManager::cleanup()
-{
+void LLReflectionMapManager::cleanup()
+{
mVertexBuffer = nullptr;
mRenderTarget.release();
@@ -1383,3 +1495,39 @@ void LLReflectionMapManager::doOcclusion()
}
}
}
+
+void LLReflectionMapManager::forceDefaultProbeAndUpdateUniforms(bool force)
+{
+ static std::vector<bool> mProbeWasOccluded;
+
+ if (force)
+ {
+ llassert(mProbeWasOccluded.empty());
+
+ for (size_t i = 0; i < mProbes.size(); ++i)
+ {
+ auto& probe = mProbes[i];
+ mProbeWasOccluded.push_back(probe->mOccluded);
+ if (probe != nullptr && probe != mDefaultProbe)
+ {
+ probe->mOccluded = true;
+ }
+ }
+
+ updateUniforms();
+ }
+ else
+ {
+ llassert(mProbes.size() == mProbeWasOccluded.size());
+
+ const size_t n = llmin(mProbes.size(), mProbeWasOccluded.size());
+ for (size_t i = 0; i < n; ++i)
+ {
+ auto& probe = mProbes[i];
+ llassert(probe->mOccluded == (probe != mDefaultProbe));
+ probe->mOccluded = mProbeWasOccluded[i];
+ }
+ mProbeWasOccluded.clear();
+ mProbeWasOccluded.shrink_to_fit();
+ }
+}
diff --git a/indra/newview/llreflectionmapmanager.h b/indra/newview/llreflectionmapmanager.h
index b77a33da89..5c0651bc24 100644
--- a/indra/newview/llreflectionmapmanager.h
+++ b/indra/newview/llreflectionmapmanager.h
@@ -43,21 +43,23 @@ class LLViewerObject;
// reflection probe mininum scale
#define LL_REFLECTION_PROBE_MINIMUM_SCALE 1.f;
+void renderReflectionProbe(LLReflectionMap* probe);
+
class alignas(16) LLReflectionMapManager
{
LL_ALIGN_NEW
public:
- enum class DetailLevel
+ enum class DetailLevel
{
STATIC_ONLY = 0,
STATIC_AND_DYNAMIC,
REALTIME = 2
};
- // allocate an environment map of the given resolution
+ // allocate an environment map of the given resolution
LLReflectionMapManager();
- // release any GL state
+ // release any GL state
void cleanup();
// maintain reflection probes
@@ -85,7 +87,8 @@ public:
void reset();
// pause all updates other than the default probe
- void pause();
+ // duration - number of seconds to pause (default 10)
+ void pause(F32 duration = 10.f);
// unpause (see pause)
void resume();
@@ -106,8 +109,14 @@ public:
// perform occlusion culling on all active reflection probes
void doOcclusion();
+ // *HACK: "cull" all reflection probes except the default one. Only call
+ // this if you don't intend to call updateUniforms directly. Call again
+ // with false when done.
+ void forceDefaultProbeAndUpdateUniforms(bool force = true);
+
private:
friend class LLPipeline;
+ friend class LLHeroProbeManager;
// initialize mCubeFree array to default values
void initCubeFree();
@@ -119,7 +128,7 @@ private:
// returns -1 if allocation failed
S32 allocateCubeIndex();
- // update the neighbors of the given probe
+ // update the neighbors of the given probe
void updateNeighbors(LLReflectionMap* probe);
// update UBO used for rendering (call only once per render pipe flush)
@@ -200,5 +209,6 @@ private:
// if true, only update the default probe
bool mPaused = false;
+ F32 mResumeTime = 0.f;
};
diff --git a/indra/newview/llregioninfomodel.cpp b/indra/newview/llregioninfomodel.cpp
index 6caec6ec4a..a03c66bef7 100644
--- a/indra/newview/llregioninfomodel.cpp
+++ b/indra/newview/llregioninfomodel.cpp
@@ -92,8 +92,8 @@ void LLRegionInfoModel::sendRegionTerrain(const LLUUID& invoice) const
// strings[8] = from estate, float sun_hour
// *NOTE: this resets estate sun info.
- BOOL estate_global_time = true;
- BOOL estate_fixed_sun = false;
+ bool estate_global_time = true;
+ bool estate_fixed_sun = false;
F32 estate_sun_hour = 0.f;
buffer = llformat("%f", mWaterHeight);
diff --git a/indra/newview/llregioninfomodel.h b/indra/newview/llregioninfomodel.h
index baeff82fef..2aea654de7 100644
--- a/indra/newview/llregioninfomodel.h
+++ b/indra/newview/llregioninfomodel.h
@@ -70,7 +70,7 @@ public:
F32 mTerrainLowerLimit;
F32 mSunHour; // 6..30
- BOOL mUseEstateSun;
+ bool mUseEstateSun;
std::string mSimName;
std::string mSimType;
diff --git a/indra/newview/llsavedsettingsglue.cpp b/indra/newview/llsavedsettingsglue.cpp
deleted file mode 100644
index 37b576814d..0000000000
--- a/indra/newview/llsavedsettingsglue.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * @file llsavedsettingsglue.cpp
- * @author James Cook
- * @brief LLSavedSettingsGlue 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 "llsavedsettingsglue.h"
-
-#include "lluictrl.h"
-
-#include "llviewercontrol.h"
-
-void LLSavedSettingsGlue::setBOOL(LLUICtrl* ctrl, const std::string& name)
-{
- gSavedSettings.setBOOL(name, ctrl->getValue().asBoolean());
-}
-
-void LLSavedSettingsGlue::setS32(LLUICtrl* ctrl, const std::string& name)
-{
- gSavedSettings.setS32(name, ctrl->getValue().asInteger());
-}
-
-void LLSavedSettingsGlue::setF32(LLUICtrl* ctrl, const std::string& name)
-{
- gSavedSettings.setF32(name, (F32)ctrl->getValue().asReal());
-}
-
-void LLSavedSettingsGlue::setU32(LLUICtrl* ctrl, const std::string& name)
-{
- gSavedSettings.setU32(name, (U32)ctrl->getValue().asInteger());
-}
-
-void LLSavedSettingsGlue::setString(LLUICtrl* ctrl, const std::string& name)
-{
- gSavedSettings.setString(name, ctrl->getValue().asString());
-}
diff --git a/indra/newview/llsavedsettingsglue.h b/indra/newview/llsavedsettingsglue.h
deleted file mode 100644
index e8c6a7dbdb..0000000000
--- a/indra/newview/llsavedsettingsglue.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * @file llsavedsettingsglue.h
- * @author James Cook
- * @brief LLSavedSettingsGlue class definition
- *
- * $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$
- */
-
-#ifndef LL_LLSAVEDSETTINGSGLUE_H
-#define LL_LLSAVEDSETTINGSGLUE_H
-
-class LLUICtrl;
-
-// Helper to change gSavedSettings from UI widget commit callbacks.
-// Set the widget callback to be one of the setFoo() calls below,
-// and assign the control name as a const char* to the userdata.
-class LLSavedSettingsGlue
-{
-public:
- static void setBOOL(LLUICtrl* ctrl, const std::string& name);
- static void setS32(LLUICtrl* ctrl, const std::string& name);
- static void setF32(LLUICtrl* ctrl, const std::string& name);
- static void setU32(LLUICtrl* ctrl, const std::string& name);
- static void setString(LLUICtrl* ctrl, const std::string& name);
-};
-
-#endif
diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp
index ce0a8d69a9..1c1577a7e5 100644
--- a/indra/newview/llscenemonitor.cpp
+++ b/indra/newview/llscenemonitor.cpp
@@ -154,7 +154,7 @@ void LLSceneMonitor::generateDitheringTexture(S32 width, S32 height)
}
}
- mDitheringTexture = LLViewerTextureManager::getLocalTexture(image_raw.get(), FALSE) ;
+ mDitheringTexture = LLViewerTextureManager::getLocalTexture(image_raw.get(), false) ;
mDitheringTexture->setAddressMode(LLTexUnit::TAM_WRAP);
mDitheringTexture->setFilteringOption(LLTexUnit::TFO_POINT);
@@ -233,7 +233,7 @@ void LLSceneMonitor::freezeScene()
}
// freeze everything else
- gSavedSettings.setBOOL("FreezeTime", TRUE);
+ gSavedSettings.setBOOL("FreezeTime", true);
//disable sky, water and clouds
gPipeline.clearRenderTypeMask(LLPipeline::RENDER_TYPE_SKY, LLPipeline::RENDER_TYPE_WL_SKY,
@@ -254,7 +254,7 @@ void LLSceneMonitor::unfreezeScene()
}
// thaw everything else
- gSavedSettings.setBOOL("FreezeTime", FALSE);
+ gSavedSettings.setBOOL("FreezeTime", false);
//enable sky, water and clouds
gPipeline.setRenderTypeMask(LLPipeline::RENDER_TYPE_SKY, LLPipeline::RENDER_TYPE_WL_SKY,
@@ -673,7 +673,7 @@ LLSceneMonitorView::LLSceneMonitorView(const LLRect& rect)
: LLFloater(LLSD())
{
setRect(rect);
- setVisible(FALSE);
+ setVisible(false);
setCanMinimize(false);
setCanClose(true);
@@ -704,7 +704,7 @@ void LLSceneMonitorView::onTeleportFinished()
}
}
-void LLSceneMonitorView::onVisibilityChange(BOOL visible)
+void LLSceneMonitorView::onVisibilityChange(bool visible)
{
LLSceneMonitor::getInstance()->setDebugViewerVisible(visible);
}
diff --git a/indra/newview/llscenemonitor.h b/indra/newview/llscenemonitor.h
index f2e1ef69b9..b9dc46e494 100644
--- a/indra/newview/llscenemonitor.h
+++ b/indra/newview/llscenemonitor.h
@@ -114,7 +114,7 @@ public:
~LLSceneMonitorView();
virtual void draw();
- virtual void onVisibilityChange(BOOL visible);
+ virtual void onVisibilityChange(bool visible);
protected:
virtual void onClose(bool app_quitting=false);
diff --git a/indra/newview/llsceneview.cpp b/indra/newview/llsceneview.cpp
index 2643ee95f8..e8233faf82 100644
--- a/indra/newview/llsceneview.cpp
+++ b/indra/newview/llsceneview.cpp
@@ -46,7 +46,7 @@ LLSceneView::LLSceneView(const LLRect& rect)
: LLFloater(LLSD())
{
setRect(rect);
- setVisible(FALSE);
+ setVisible(false);
setCanMinimize(false);
setCanClose(true);
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 17f2970f99..bac79594a2 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -96,10 +96,10 @@ LLScreenChannelBase::LLScreenChannelBase(const Params& p)
mID = p.id;
setMouseOpaque( false );
- setVisible(FALSE);
+ setVisible(false);
}
-BOOL LLScreenChannelBase::postBuild()
+bool LLScreenChannelBase::postBuild()
{
if (mFloaterSnapRegion == NULL)
{
@@ -111,10 +111,10 @@ BOOL LLScreenChannelBase::postBuild()
mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container");
}
- return TRUE;
+ return true;
}
-void LLScreenChannelBase::reshape(S32 width, S32 height, BOOL called_from_parent)
+void LLScreenChannelBase::reshape(S32 width, S32 height, bool called_from_parent)
{
if (mChannelAlignment == CA_CENTRE)
{
@@ -165,7 +165,7 @@ void LLScreenChannelBase::init(S32 channel_left, S32 channel_right)
// top and bottom set by updateRect()
setRect(LLRect(channel_left, 0, channel_right, 0));
updateRect();
- setVisible(TRUE);
+ setVisible(true);
}
void LLScreenChannelBase::updateRect()
@@ -690,7 +690,7 @@ void LLScreenChannel::showToastsBottom()
{
// HACK
// EXT-2653: it is necessary to prevent overlapping for secondary showed toasts
- toast->setVisible(TRUE);
+ toast->setVisible(true);
}
if(!toast->hasFocus())
{
@@ -743,7 +743,7 @@ void LLScreenChannel::showToastsCentre()
toast_rect.setLeftTopAndSize(getRect().mLeft - toast_rect.getWidth() / 2, bottom + toast_rect.getHeight() / 2 + gSavedSettings.getS32("ToastGap"), toast_rect.getWidth() ,toast_rect.getHeight());
toast->setRect(toast_rect);
- toast->setVisible(TRUE);
+ toast->setVisible(true);
}
}
@@ -837,7 +837,7 @@ void LLScreenChannel::showToastsTop()
{
// HACK
// EXT-2653: it is necessary to prevent overlapping for secondary showed toasts
- toast->setVisible(TRUE);
+ toast->setVisible(true);
}
if (!toast->hasFocus())
{
@@ -897,7 +897,7 @@ void LLScreenChannel::createStartUpToast(S32 notif_num, F32 timer)
mStartUpToastPanel->reshape(getRect().getWidth(), toast_rect.getHeight(), true);
text_box->setValue(text);
- text_box->setVisible(TRUE);
+ text_box->setVisible(true);
text_box->reshapeToFitText();
text_box->setOrigin(text_box->getRect().mLeft, (wrapper_panel->getRect().getHeight() - text_box->getRect().getHeight())/2);
@@ -907,7 +907,7 @@ void LLScreenChannel::createStartUpToast(S32 notif_num, F32 timer)
addChild(mStartUpToastPanel);
- mStartUpToastPanel->setVisible(TRUE);
+ mStartUpToastPanel->setVisible(true);
}
// static --------------------------------------------------------------------------
@@ -942,7 +942,7 @@ void LLScreenChannel::closeStartUpToast()
{
if(mStartUpToastPanel != NULL)
{
- mStartUpToastPanel->setVisible(FALSE);
+ mStartUpToastPanel->setVisible(false);
mStartUpToastPanel = NULL;
}
}
@@ -974,7 +974,7 @@ void LLScreenChannel::hideToastsFromScreen()
LLToast* toast = it->getToast();
if (toast)
{
- toast->setVisible(FALSE);
+ toast->setVisible(false);
}
else
{
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h
index e5f4807ab7..ae9591ca8f 100644
--- a/indra/newview/llscreenchannel.h
+++ b/indra/newview/llscreenchannel.h
@@ -70,9 +70,9 @@ public:
LLScreenChannelBase(const Params&);
- BOOL postBuild();
+ bool postBuild();
- void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+ void reshape(S32 width, S32 height, bool called_from_parent = true);
// Channel's outfit-functions
// update channel's size and position in the World View
diff --git a/indra/newview/llscripteditor.cpp b/indra/newview/llscripteditor.cpp
index 693491e7e7..f9467ba8e4 100644
--- a/indra/newview/llscripteditor.cpp
+++ b/indra/newview/llscripteditor.cpp
@@ -54,7 +54,7 @@ LLScriptEditor::LLScriptEditor(const Params& p)
}
}
-BOOL LLScriptEditor::postBuild()
+bool LLScriptEditor::postBuild()
{
gSavedSettings.getControl("LSLFontSizeName")->getCommitSignal()->connect(boost::bind(&LLScriptEditor::onFontSizeChange, this));
return LLTextEditor::postBuild();
@@ -120,7 +120,7 @@ void LLScriptEditor::drawLineNumbers()
if(line.mLineNum != last_line_num && line.mRect.mTop <= scrolled_view_rect.mTop)
{
const LLWString ltext = utf8str_to_wstring(llformat("%d", line.mLineNum ));
- BOOL is_cur_line = cursor_line == line.mLineNum;
+ bool is_cur_line = cursor_line == line.mLineNum;
const U8 style = is_cur_line ? LLFontGL::BOLD : LLFontGL::NORMAL;
const LLColor4 fg_color = is_cur_line ? mCursorColor : mReadOnlyFgColor;
getScriptFont()->render(
diff --git a/indra/newview/llscripteditor.h b/indra/newview/llscripteditor.h
index ef941f552a..be6cfffec4 100644
--- a/indra/newview/llscripteditor.h
+++ b/indra/newview/llscripteditor.h
@@ -45,7 +45,7 @@ public:
// LLView override
virtual void draw();
- BOOL postBuild();
+ bool postBuild();
void initKeywords();
void loadKeywords();
diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp
index 6a27ff3047..d714017e01 100644
--- a/indra/newview/llscriptfloater.cpp
+++ b/indra/newview/llscriptfloater.cpp
@@ -87,8 +87,8 @@ bool LLScriptFloater::toggle(const LLUUID& notification_id)
}
else
{
- floater->setVisible(TRUE);
- floater->setFocus(FALSE);
+ floater->setVisible(true);
+ floater->setFocus(false);
}
}
// create and show new floater
@@ -113,7 +113,7 @@ LLScriptFloater* LLScriptFloater::show(const LLUUID& notification_id)
floater->createForm(notification_id);
//LLDialog(LLGiveInventory and LLLoadURL) should no longer steal focus (see EXT-5445)
- floater->setAutoFocus(FALSE);
+ floater->setAutoFocus(false);
if(LLScriptFloaterManager::OBJ_SCRIPT == LLScriptFloaterManager::getObjectType(notification_id))
{
@@ -126,7 +126,7 @@ LLScriptFloater* LLScriptFloater::show(const LLUUID& notification_id)
}
//LLDialog(LLGiveInventory and LLLoadURL) should no longer steal focus (see EXT-5445)
- LLFloaterReg::showTypedInstance<LLScriptFloater>("script_floater", notification_id, FALSE);
+ LLFloaterReg::showTypedInstance<LLScriptFloater>("script_floater", notification_id, false);
return floater;
}
@@ -205,7 +205,7 @@ void LLScriptFloater::setDocked(bool docked, bool pop_on_undock /* = true */)
hideToastsIfNeeded();
}
-void LLScriptFloater::setVisible(BOOL visible)
+void LLScriptFloater::setVisible(bool visible)
{
LLDockableFloater::setVisible(visible);
diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h
index 3695b8a3e1..6279211fc6 100644
--- a/indra/newview/llscriptfloater.h
+++ b/indra/newview/llscriptfloater.h
@@ -185,7 +185,7 @@ public:
/**
* Hide all notification toasts when we show dockable floater
*/
- /*virtual*/ void setVisible(BOOL visible);
+ /*virtual*/ void setVisible(bool visible);
bool getSavePosition() { return mSaveFloaterPosition; }
diff --git a/indra/newview/llscrollingpanelparam.cpp b/indra/newview/llscrollingpanelparam.cpp
index bfa453a0ae..833eaaf8ca 100644
--- a/indra/newview/llscrollingpanelparam.cpp
+++ b/indra/newview/llscrollingpanelparam.cpp
@@ -50,56 +50,51 @@ const S32 LLScrollingPanelParam::PARAM_HINT_HEIGHT = 128;
S32 LLScrollingPanelParam::sUpdateDelayFrames = 0;
LLScrollingPanelParam::LLScrollingPanelParam( const LLPanel::Params& panel_params,
- LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable, LLJoint* jointp, BOOL use_hints )
+ LLViewerJointMesh* mesh, LLViewerVisualParam* param, bool allow_modify, LLWearable* wearable, LLJoint* jointp, bool use_hints )
: LLScrollingPanelParamBase( panel_params, mesh, param, allow_modify, wearable, jointp, use_hints)
{
- // *HACK To avoid hard coding texture position, lets use border's position for texture.
- LLViewBorder* left_border = getChild<LLViewBorder>("left_border");
-
+ mLessBtn = getChild<LLButton>("less");
+ mMoreBtn = getChild<LLButton>("more");
+ mLeftBorder = getChild<LLViewBorder>("left_border");
+ mRightBorder = getChild<LLViewBorder>("right_border");
+ mMinParamText = getChild<LLUICtrl>("min param text");
+ mMaxParamText = getChild<LLUICtrl>("max param text");
+
+ // *HACK To avoid hard coding texture position, lets use border's position for texture.
static LLUICachedControl<S32> slider_ctrl_height ("UISliderctrlHeight", 0);
- S32 pos_x = left_border->getRect().mLeft + left_border->getBorderWidth();
- S32 pos_y = left_border->getRect().mBottom + left_border->getBorderWidth();
+ S32 pos_x = mLeftBorder->getRect().mLeft + mLeftBorder->getBorderWidth();
+ S32 pos_y = mLeftBorder->getRect().mBottom + mLeftBorder->getBorderWidth();
F32 min_weight = param->getMinWeight();
F32 max_weight = param->getMaxWeight();
mHintMin = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, (LLViewerVisualParam*) wearable->getVisualParam(param->getID()), wearable, min_weight, jointp);
- pos_x = getChild<LLViewBorder>("right_border")->getRect().mLeft + left_border->getBorderWidth();
+ pos_x = mRightBorder->getRect().mLeft + mLeftBorder->getBorderWidth();
mHintMax = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, (LLViewerVisualParam*) wearable->getVisualParam(param->getID()), wearable, max_weight, jointp );
- mHintMin->setAllowsUpdates( FALSE );
- mHintMax->setAllowsUpdates( FALSE );
+ mHintMin->setAllowsUpdates( false );
+ mHintMax->setAllowsUpdates( false );
- std::string min_name = LLTrans::getString(param->getMinDisplayName());
- std::string max_name = LLTrans::getString(param->getMaxDisplayName());
- getChild<LLUICtrl>("min param text")->setValue(min_name);
- getChild<LLUICtrl>("max param text")->setValue(max_name);
+ mMinParamText->setValue(LLTrans::getString(param->getMinDisplayName()));
+ mMaxParamText->setValue(LLTrans::getString(param->getMaxDisplayName()));
- LLButton* less = getChild<LLButton>("less");
- if (less)
- {
- less->setMouseDownCallback( LLScrollingPanelParam::onHintMinMouseDown, this );
- less->setMouseUpCallback( LLScrollingPanelParam::onHintMinMouseUp, this );
- less->setHeldDownCallback( LLScrollingPanelParam::onHintMinHeldDown, this );
- less->setHeldDownDelay( PARAM_STEP_TIME_THRESHOLD );
- }
+ mLessBtn->setMouseDownCallback(LLScrollingPanelParam::onHintMinMouseDown, this);
+ mLessBtn->setMouseUpCallback(LLScrollingPanelParam::onHintMinMouseUp, this);
+ mLessBtn->setHeldDownCallback(LLScrollingPanelParam::onHintMinHeldDown, this);
+ mLessBtn->setHeldDownDelay(PARAM_STEP_TIME_THRESHOLD);
- LLButton* more = getChild<LLButton>("more");
- if (more)
- {
- more->setMouseDownCallback( LLScrollingPanelParam::onHintMaxMouseDown, this );
- more->setMouseUpCallback( LLScrollingPanelParam::onHintMaxMouseUp, this );
- more->setHeldDownCallback( LLScrollingPanelParam::onHintMaxHeldDown, this );
- more->setHeldDownDelay( PARAM_STEP_TIME_THRESHOLD );
- }
+ mMoreBtn->setMouseDownCallback(LLScrollingPanelParam::onHintMaxMouseDown, this);
+ mMoreBtn->setMouseUpCallback(LLScrollingPanelParam::onHintMaxMouseUp, this);
+ mMoreBtn->setHeldDownCallback(LLScrollingPanelParam::onHintMaxHeldDown, this);
+ mMoreBtn->setHeldDownDelay(PARAM_STEP_TIME_THRESHOLD);
- setVisible(FALSE);
- setBorderVisible( FALSE );
+ setVisible(false);
+ setBorderVisible( false );
}
LLScrollingPanelParam::~LLScrollingPanelParam()
{
}
-void LLScrollingPanelParam::updatePanel(BOOL allow_modify)
+void LLScrollingPanelParam::updatePanel(bool allow_modify)
{
if (!mWearable)
{
@@ -110,11 +105,11 @@ void LLScrollingPanelParam::updatePanel(BOOL allow_modify)
mHintMin->requestUpdate( sUpdateDelayFrames++ );
mHintMax->requestUpdate( sUpdateDelayFrames++ );
- getChildView("less")->setEnabled(mAllowModify);
- getChildView("more")->setEnabled(mAllowModify);
+ mLessBtn->setEnabled(mAllowModify);
+ mMoreBtn->setEnabled(mAllowModify);
}
-void LLScrollingPanelParam::setVisible( BOOL visible )
+void LLScrollingPanelParam::setVisible( bool visible )
{
if( getVisible() != visible )
{
@@ -141,16 +136,16 @@ void LLScrollingPanelParam::draw()
return;
}
- getChildView("less")->setVisible( mHintMin->getVisible());
- getChildView("more")->setVisible( mHintMax->getVisible());
+ mLessBtn->setVisible( mHintMin->getVisible());
+ mMoreBtn->setVisible( mHintMax->getVisible());
// hide borders if texture has been loaded
- getChildView("left_border")->setVisible( !mHintMin->getVisible());
- getChildView("right_border")->setVisible( !mHintMax->getVisible());
+ mLeftBorder->setVisible( !mHintMin->getVisible());
+ mRightBorder->setVisible( !mHintMax->getVisible());
// Draw all the children except for the labels
- getChildView("min param text")->setVisible( FALSE );
- getChildView("max param text")->setVisible( FALSE );
+ mMinParamText->setVisible( false );
+ mMaxParamText->setVisible( false );
LLPanel::draw();
// If we're in a focused floater, don't apply the floater's alpha to visual param hint,
@@ -176,11 +171,11 @@ void LLScrollingPanelParam::draw()
// Draw labels on top of the buttons
- getChildView("min param text")->setVisible( TRUE );
- drawChild(getChild<LLView>("min param text"));
+ mMinParamText->setVisible( true );
+ drawChild(mMinParamText);
- getChildView("max param text")->setVisible( TRUE );
- drawChild(getChild<LLView>("max param text"));
+ mMaxParamText->setVisible( true );
+ drawChild(mMaxParamText);
}
// static
diff --git a/indra/newview/llscrollingpanelparam.h b/indra/newview/llscrollingpanelparam.h
index c7a47d5c7a..1ebf89f483 100644
--- a/indra/newview/llscrollingpanelparam.h
+++ b/indra/newview/llscrollingpanelparam.h
@@ -30,6 +30,8 @@
#include "llscrollingpanelparambase.h"
+class LLBorder;
+class LLButton;
class LLViewerJointMesh;
class LLViewerVisualParam;
class LLWearable;
@@ -41,12 +43,12 @@ class LLScrollingPanelParam : public LLScrollingPanelParamBase
{
public:
LLScrollingPanelParam( const LLPanel::Params& panel_params,
- LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable, LLJoint* jointp, BOOL use_hints = TRUE );
+ LLViewerJointMesh* mesh, LLViewerVisualParam* param, bool allow_modify, LLWearable* wearable, LLJoint* jointp, bool use_hints = true );
virtual ~LLScrollingPanelParam();
- virtual void draw();
- virtual void setVisible( BOOL visible );
- virtual void updatePanel(BOOL allow_modify);
+ void draw() override;
+ void setVisible(bool visible) override;
+ void updatePanel(bool allow_modify) override;
static void onSliderMouseDown(LLUICtrl* ctrl, void* userdata);
static void onSliderMouseUp(LLUICtrl* ctrl, void* userdata);
@@ -79,7 +81,14 @@ public:
protected:
LLTimer mMouseDownTimer; // timer for how long mouse has been held down on a hint.
F32 mLastHeldTime;
- BOOL mAllowModify;
+ bool mAllowModify;
+
+ LLButton* mLessBtn;
+ LLButton* mMoreBtn;
+ LLViewBorder* mLeftBorder;
+ LLViewBorder* mRightBorder;
+ LLUICtrl* mMinParamText;
+ LLUICtrl* mMaxParamText;
};
#endif
diff --git a/indra/newview/llscrollingpanelparambase.cpp b/indra/newview/llscrollingpanelparambase.cpp
index fe7a362723..eb490127a1 100644
--- a/indra/newview/llscrollingpanelparambase.cpp
+++ b/indra/newview/llscrollingpanelparambase.cpp
@@ -40,7 +40,7 @@
#include "llvoavatarself.h"
LLScrollingPanelParamBase::LLScrollingPanelParamBase( const LLPanel::Params& panel_params,
- LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable, LLJoint* jointp, BOOL use_hints)
+ LLViewerJointMesh* mesh, LLViewerVisualParam* param, bool allow_modify, LLWearable* wearable, LLJoint* jointp, bool use_hints)
: LLScrollingPanel( panel_params ),
mParam(param),
mAllowModify(allow_modify),
@@ -58,15 +58,15 @@ LLScrollingPanelParamBase::LLScrollingPanelParamBase( const LLPanel::Params& pan
getChildView("param slider")->setEnabled(mAllowModify);
childSetCommitCallback("param slider", LLScrollingPanelParamBase::onSliderMoved, this);
- setVisible(FALSE);
- setBorderVisible( FALSE );
+ setVisible(false);
+ setBorderVisible( false );
}
LLScrollingPanelParamBase::~LLScrollingPanelParamBase()
{
}
-void LLScrollingPanelParamBase::updatePanel(BOOL allow_modify)
+void LLScrollingPanelParamBase::updatePanel(bool allow_modify)
{
LLViewerVisualParam* param = mParam;
diff --git a/indra/newview/llscrollingpanelparambase.h b/indra/newview/llscrollingpanelparambase.h
index 9538826251..fd686636f2 100644
--- a/indra/newview/llscrollingpanelparambase.h
+++ b/indra/newview/llscrollingpanelparambase.h
@@ -42,10 +42,10 @@ class LLScrollingPanelParamBase : public LLScrollingPanel
{
public:
LLScrollingPanelParamBase( const LLPanel::Params& panel_params,
- LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable, LLJoint* jointp, BOOL use_hints = FALSE );
+ LLViewerJointMesh* mesh, LLViewerVisualParam* param, bool allow_modify, LLWearable* wearable, LLJoint* jointp, bool use_hints = false );
virtual ~LLScrollingPanelParamBase();
- virtual void updatePanel(BOOL allow_modify);
+ void updatePanel(bool allow_modify) override;
static void onSliderMoved(LLUICtrl* ctrl, void* userdata);
@@ -55,7 +55,7 @@ public:
public:
LLViewerVisualParam* mParam;
protected:
- BOOL mAllowModify;
+ bool mAllowModify;
LLWearable *mWearable;
};
diff --git a/indra/newview/llsearchableui.cpp b/indra/newview/llsearchableui.cpp
index 620bbdfcdf..6e025338cf 100644
--- a/indra/newview/llsearchableui.cpp
+++ b/indra/newview/llsearchableui.cpp
@@ -134,7 +134,7 @@ void ll::statusbar::SearchableItem::setNotHighlighted( )
if (mWasHiddenBySearch)
{
- mMenu->setVisible(TRUE);
+ mMenu->setVisible(true);
mWasHiddenBySearch = false;
}
}
@@ -169,7 +169,7 @@ bool ll::statusbar::SearchableItem::hightlightAndHide(LLWString const &aFilter,
if (mCtrl && !bVisible && !bHighlighted)
{
mWasHiddenBySearch = true;
- mMenu->setVisible(FALSE);
+ mMenu->setVisible(false);
}
return bVisible || bHighlighted;
}
diff --git a/indra/newview/llsearchcombobox.cpp b/indra/newview/llsearchcombobox.cpp
index 2824c70582..06cd3f6842 100644
--- a/indra/newview/llsearchcombobox.cpp
+++ b/indra/newview/llsearchcombobox.cpp
@@ -71,7 +71,7 @@ LLSearchComboBox::LLSearchComboBox(const Params&p)
button_params.click_callback.function(boost::bind(&LLSearchComboBox::onSelectionCommit, this));
mSearchButton = LLUICtrlFactory::create<LLButton>(button_params);
mTextEntry->addChild(mSearchButton);
- mTextEntry->setPassDelete(TRUE);
+ mTextEntry->setPassDelete(true);
setButtonVisible(p.dropdown_button_visible);
mTextEntry->setCommitCallback(boost::bind(&LLComboBox::onTextCommit, this, _2));
@@ -124,7 +124,7 @@ void LLSearchComboBox::onTextEntry(LLLineEditor* line_editor)
void LLSearchComboBox::focusTextEntry()
{
- // We can't use "mTextEntry->setFocus(TRUE)" instead because
+ // We can't use "mTextEntry->setFocus(true)" instead because
// if the "select_on_focus" parameter is true it places the cursor
// at the beginning (after selecting text), thus screwing up updateSelection().
if (mTextEntry)
@@ -164,9 +164,9 @@ void LLSearchComboBox::onSelectionCommit()
setControlValue(search_query);
}
-BOOL LLSearchComboBox::remove(const std::string& name)
+bool LLSearchComboBox::remove(const std::string& name)
{
- BOOL found = mList->selectItemByLabel(name, FALSE);
+ bool found = mList->selectItemByLabel(name, false);
if (found)
{
@@ -186,7 +186,7 @@ void LLSearchComboBox::clearHistory()
setTextEntry(LLStringUtil::null);
}
-BOOL LLSearchComboBox::handleKeyHere(KEY key,MASK mask )
+bool LLSearchComboBox::handleKeyHere(KEY key,MASK mask )
{
if(mTextEntry->hasFocus() && MASK_NONE == mask && KEY_DOWN == key)
{
diff --git a/indra/newview/llsearchcombobox.h b/indra/newview/llsearchcombobox.h
index 68f3979532..ea00ab3e3e 100644
--- a/indra/newview/llsearchcombobox.h
+++ b/indra/newview/llsearchcombobox.h
@@ -50,14 +50,14 @@ public:
/**
* Removes an entry from combo box, case insensitive
*/
- BOOL remove(const std::string& name);
+ bool remove(const std::string& name);
/**
* Clears search history
*/
void clearHistory();
- /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
+ /*virtual*/ bool handleKeyHere(KEY key, MASK mask);
~LLSearchComboBox();
diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp
index 8e8f2f4fe0..1a6b70c45a 100644
--- a/indra/newview/llsechandler_basic.cpp
+++ b/indra/newview/llsechandler_basic.cpp
@@ -759,7 +759,7 @@ bool _cert_subdomain_wildcard_match(const std::string& subdomain,
if(subdomain.substr(0, wildcard_pos) != wildcard.substr(0, wildcard_pos))
{
// the first portions of the strings didn't match
- return FALSE;
+ return false;
}
// as the portion of the wildcard string before the * matched, we need to check the
@@ -768,7 +768,7 @@ bool _cert_subdomain_wildcard_match(const std::string& subdomain,
if(new_wildcard_string.empty())
{
// we had nothing after the *, so it's an automatic match
- return TRUE;
+ return true;
}
// grab the portion of the remaining wildcard string before the next '*'. We need to find this
@@ -785,14 +785,14 @@ bool _cert_subdomain_wildcard_match(const std::string& subdomain,
new_subdomain = new_subdomain.substr(sub_pos, std::string::npos);
if(_cert_subdomain_wildcard_match(new_subdomain, new_wildcard_string))
{
- return TRUE;
+ return true;
}
sub_pos = new_subdomain.find_first_of(new_wildcard_match_string, 1);
}
// didn't find any instances of the match string that worked in the subdomain, so fail.
- return FALSE;
+ return false;
}
@@ -837,7 +837,7 @@ bool _cert_hostname_wildcard_match(const std::string& hostname, const std::strin
if(!_cert_subdomain_wildcard_match(new_hostname.substr(subdomain_pos+1, std::string::npos),
cn_part))
{
- return FALSE;
+ return false;
}
new_hostname = new_hostname.substr(0, subdomain_pos);
new_cn = new_cn.substr(0, subcn_pos);
@@ -849,7 +849,7 @@ bool _cert_hostname_wildcard_match(const std::string& hostname, const std::strin
if(new_cn == "*")
{
// if it's just a '*' we support all child domains as well, so '*.
- return TRUE;
+ return true;
}
return _cert_subdomain_wildcard_match(new_hostname, new_cn);
@@ -865,10 +865,10 @@ bool _LLSDArrayIncludesValue(const LLSD& llsd_set, LLSD llsd_value)
{
if(valueCompareLLSD((*set_value), llsd_value))
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
void _validateCert(int validation_policy,
@@ -975,7 +975,7 @@ void _validateCert(int validation_policy,
bool _verify_signature(LLPointer<LLCertificate> parent,
LLPointer<LLCertificate> child)
{
- bool verify_result = FALSE;
+ bool verify_result = false;
LLSD cert1, cert2;
parent->getLLSD(cert1);
child->getLLSD(cert2);
@@ -1913,7 +1913,7 @@ bool valueCompareLLSD(const LLSD& lhs, const LLSD& rhs)
{
if (lhs.type() != rhs.type())
{
- return FALSE;
+ return false;
}
if (lhs.isMap())
{
@@ -1925,7 +1925,7 @@ bool valueCompareLLSD(const LLSD& lhs, const LLSD& rhs)
{
if (!rhs.has(litt->first))
{
- return FALSE;
+ return false;
}
}
@@ -1937,14 +1937,14 @@ bool valueCompareLLSD(const LLSD& lhs, const LLSD& rhs)
{
if (!lhs.has(ritt->first))
{
- return FALSE;
+ return false;
}
if (!valueCompareLLSD(lhs[ritt->first], ritt->second))
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
else if (lhs.isArray())
{
@@ -1956,7 +1956,7 @@ bool valueCompareLLSD(const LLSD& lhs, const LLSD& rhs)
{
if (!valueCompareLLSD(*ritt, *litt))
{
- return FALSE;
+ return false;
}
ritt++;
}
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index b50c0f60bd..18dcec5e92 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -112,14 +112,14 @@ const S32 MAX_CHILDREN_PER_TASK = 255;
// Globals
//
-//BOOL gDebugSelectMgr = FALSE;
+//bool gDebugSelectMgr = false;
-//BOOL gHideSelectedObjects = FALSE;
-//BOOL gAllowSelectAvatar = FALSE;
+//bool gHideSelectedObjects = false;
+//bool gAllowSelectAvatar = false;
-BOOL LLSelectMgr::sRectSelectInclusive = TRUE;
-BOOL LLSelectMgr::sRenderHiddenSelections = TRUE;
-BOOL LLSelectMgr::sRenderLightRadius = FALSE;
+bool LLSelectMgr::sRectSelectInclusive = true;
+bool LLSelectMgr::sRenderHiddenSelections = true;
+bool LLSelectMgr::sRenderLightRadius = false;
F32 LLSelectMgr::sHighlightThickness = 0.f;
F32 LLSelectMgr::sHighlightUScale = 0.f;
F32 LLSelectMgr::sHighlightVScale = 0.f;
@@ -213,12 +213,12 @@ void LLSelectMgr::cleanupGlobals()
// LLSelectMgr()
//-----------------------------------------------------------------------------
LLSelectMgr::LLSelectMgr()
- : mHideSelectedObjects(LLCachedControl<bool>(gSavedSettings, "HideSelectedObjects", FALSE)),
- mRenderHighlightSelections(LLCachedControl<bool>(gSavedSettings, "RenderHighlightSelections", TRUE)),
- mAllowSelectAvatar( LLCachedControl<bool>(gSavedSettings, "AllowSelectAvatar", FALSE)),
- mDebugSelectMgr(LLCachedControl<bool>(gSavedSettings, "DebugSelectMgr", FALSE))
+ : mHideSelectedObjects(LLCachedControl<bool>(gSavedSettings, "HideSelectedObjects", false)),
+ mRenderHighlightSelections(LLCachedControl<bool>(gSavedSettings, "RenderHighlightSelections", true)),
+ mAllowSelectAvatar( LLCachedControl<bool>(gSavedSettings, "AllowSelectAvatar", false)),
+ mDebugSelectMgr(LLCachedControl<bool>(gSavedSettings, "DebugSelectMgr", false))
{
- mTEMode = FALSE;
+ mTEMode = false;
mTextureChannel = LLRender::DIFFUSE_MAP;
mLastCameraPos.clearVec();
@@ -239,7 +239,7 @@ LLSelectMgr::LLSelectMgr()
sRenderLightRadius = gSavedSettings.getBOOL("RenderLightRadius");
- mRenderSilhouettes = TRUE;
+ mRenderSilhouettes = true;
mGridMode = GRID_MODE_WORLD;
gSavedSettings.setS32("GridMode", (S32)GRID_MODE_WORLD);
@@ -248,8 +248,8 @@ LLSelectMgr::LLSelectMgr()
mHoverObjects = new LLObjectSelection();
mHighlightedObjects = new LLObjectSelection();
- mForceSelection = FALSE;
- mShowSelection = FALSE;
+ mForceSelection = false;
+ mShowSelection = false;
}
@@ -456,7 +456,7 @@ void LLSelectMgr::overrideAvatarUpdates()
//-----------------------------------------------------------------------------
// Select just the object, not any other group members.
//-----------------------------------------------------------------------------
-LLObjectSelectionHandle LLSelectMgr::selectObjectOnly(LLViewerObject* object, S32 face)
+LLObjectSelectionHandle LLSelectMgr::selectObjectOnly(LLViewerObject* object, S32 face, S32 gltf_node, S32 gltf_primitive)
{
llassert( object );
@@ -481,7 +481,7 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectOnly(LLViewerObject* object, S3
// Place it in the list and tag it.
// This will refresh dialogs.
- addAsIndividual(object, face);
+ addAsIndividual(object, face, TRUE, gltf_node, gltf_primitive);
// Stop the object from moving (this anticipates changes on the
// simulator in LLTask::userSelect)
@@ -519,7 +519,7 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectOnly(LLViewerObject* object, S3
//-----------------------------------------------------------------------------
// Select the object, parents and children.
//-----------------------------------------------------------------------------
-LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj, BOOL add_to_end, BOOL ignore_select_owned)
+LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj, bool add_to_end, bool ignore_select_owned)
{
llassert( obj );
@@ -582,7 +582,7 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj,
// leave component mode
if (gSavedSettings.getBOOL("EditLinkedParts"))
{
- gSavedSettings.setBOOL("EditLinkedParts", FALSE);
+ gSavedSettings.setBOOL("EditLinkedParts", false);
promoteSelectionToRoot();
}
@@ -600,7 +600,7 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj,
// Select the object, parents and children.
//-----------------------------------------------------------------------------
LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(const std::vector<LLViewerObject*>& object_list,
- BOOL send_to_sim)
+ bool send_to_sim)
{
// Collect all of the objects, children included
std::vector<LLViewerObject*> objects;
@@ -652,7 +652,7 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(const std::vector<LLV
// leave component mode
if (gSavedSettings.getBOOL("EditLinkedParts"))
{
- gSavedSettings.setBOOL("EditLinkedParts", FALSE);
+ gSavedSettings.setBOOL("EditLinkedParts", false);
promoteSelectionToRoot();
}
@@ -670,9 +670,9 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(const std::vector<LLV
// handles informing the current tool of the object's deletion.
//
// Caller needs to call dialog_refresh_all if necessary.
-BOOL LLSelectMgr::removeObjectFromSelections(const LLUUID &id)
+bool LLSelectMgr::removeObjectFromSelections(const LLUUID &id)
{
- BOOL object_found = FALSE;
+ bool object_found = false;
LLTool *tool = NULL;
tool = LLToolMgr::getInstance()->getCurrentTool();
@@ -682,7 +682,7 @@ BOOL LLSelectMgr::removeObjectFromSelections(const LLUUID &id)
if( tool_editing_object && tool_editing_object->mID == id)
{
tool->stopEditing();
- object_found = TRUE;
+ object_found = true;
}
// Iterate through selected objects list and kill the object
@@ -701,15 +701,15 @@ BOOL LLSelectMgr::removeObjectFromSelections(const LLUUID &id)
}
// lose the selection, don't tell simulator, it knows
- deselectObjectAndFamily(object, FALSE);
- object_found = TRUE;
+ deselectObjectAndFamily(object, false);
+ object_found = true;
break; // must break here, may have removed multiple objects from list
}
else if (object->isAvatar() && object->getParent() && ((LLViewerObject*)object->getParent())->mID == id)
{
// It's possible the item being removed has an avatar sitting on it
// So remove the avatar that is sitting on the object.
- deselectObjectAndFamily(object, FALSE);
+ deselectObjectAndFamily(object, false);
break; // must break here, may have removed multiple objects from list
}
}
@@ -862,7 +862,7 @@ bool LLSelectMgr::enableUnlinkObjects()
return new_value;
}
-void LLSelectMgr::deselectObjectAndFamily(LLViewerObject* object, BOOL send_to_sim, BOOL include_entire_object)
+void LLSelectMgr::deselectObjectAndFamily(LLViewerObject* object, bool send_to_sim, bool include_entire_object)
{
// bail if nothing selected or if object wasn't selected in the first place
if(!object) return;
@@ -904,7 +904,7 @@ void LLSelectMgr::deselectObjectAndFamily(LLViewerObject* object, BOOL send_to_s
//-----------------------------------------------------------
LLViewerRegion* regionp = object->getRegion();
- BOOL start_new_message = TRUE;
+ bool start_new_message = true;
S32 select_count = 0;
LLMessageSystem* msg = gMessageSystem;
@@ -917,7 +917,7 @@ void LLSelectMgr::deselectObjectAndFamily(LLViewerObject* object, BOOL send_to_s
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
select_count++;
- start_new_message = FALSE;
+ start_new_message = false;
}
msg->nextBlockFast(_PREHASH_ObjectData);
@@ -932,7 +932,7 @@ void LLSelectMgr::deselectObjectAndFamily(LLViewerObject* object, BOOL send_to_s
{
msg->sendReliable(regionp->getHost() );
select_count = 0;
- start_new_message = TRUE;
+ start_new_message = true;
}
}
@@ -945,7 +945,7 @@ void LLSelectMgr::deselectObjectAndFamily(LLViewerObject* object, BOOL send_to_s
updateSelectionCenter();
}
-void LLSelectMgr::deselectObjectOnly(LLViewerObject* object, BOOL send_to_sim)
+void LLSelectMgr::deselectObjectOnly(LLViewerObject* object, bool send_to_sim)
{
// bail if nothing selected or if object wasn't selected in the first place
if (!object) return;
@@ -979,7 +979,7 @@ void LLSelectMgr::deselectObjectOnly(LLViewerObject* object, BOOL send_to_sim)
// addAsFamily
//-----------------------------------------------------------------------------
-void LLSelectMgr::addAsFamily(std::vector<LLViewerObject*>& objects, BOOL add_to_end)
+void LLSelectMgr::addAsFamily(std::vector<LLViewerObject*>& objects, bool add_to_end)
{
for (std::vector<LLViewerObject*>::iterator iter = objects.begin();
iter != objects.end(); ++iter)
@@ -995,7 +995,7 @@ void LLSelectMgr::addAsFamily(std::vector<LLViewerObject*>& objects, BOOL add_to
if (!objectp->isSelected())
{
- LLSelectNode *nodep = new LLSelectNode(objectp, TRUE);
+ LLSelectNode *nodep = new LLSelectNode(objectp, true);
if (add_to_end)
{
mSelectedObjects->addNodeAtEnd(nodep);
@@ -1004,11 +1004,11 @@ void LLSelectMgr::addAsFamily(std::vector<LLViewerObject*>& objects, BOOL add_to
{
mSelectedObjects->addNode(nodep);
}
- objectp->setSelected(TRUE);
+ objectp->setSelected(true);
if (objectp->getNumTEs() > 0)
{
- nodep->selectAllTEs(TRUE);
+ nodep->selectAllTEs(true);
objectp->setAllTESelected(true);
}
else
@@ -1023,7 +1023,7 @@ void LLSelectMgr::addAsFamily(std::vector<LLViewerObject*>& objects, BOOL add_to
LLSelectNode* select_node = mSelectedObjects->findNode(objectp);
if (select_node)
{
- select_node->setTransient(FALSE);
+ select_node->setTransient(false);
}
}
}
@@ -1033,7 +1033,7 @@ void LLSelectMgr::addAsFamily(std::vector<LLViewerObject*>& objects, BOOL add_to
//-----------------------------------------------------------------------------
// addAsIndividual() - a single object, face, etc
//-----------------------------------------------------------------------------
-void LLSelectMgr::addAsIndividual(LLViewerObject *objectp, S32 face, BOOL undoable)
+void LLSelectMgr::addAsIndividual(LLViewerObject *objectp, S32 face, bool undoable, S32 gltf_node, S32 gltf_primitive)
{
// check to see if object is already in list
LLSelectNode *nodep = mSelectedObjects->findNode(objectp);
@@ -1041,23 +1041,23 @@ void LLSelectMgr::addAsIndividual(LLViewerObject *objectp, S32 face, BOOL undoab
// if not in list, add it
if (!nodep)
{
- nodep = new LLSelectNode(objectp, TRUE);
+ nodep = new LLSelectNode(objectp, true);
mSelectedObjects->addNode(nodep);
llassert_always(nodep->getObject());
}
else
{
// make this a full-fledged selection
- nodep->setTransient(FALSE);
+ nodep->setTransient(false);
// Move it to the front of the list
mSelectedObjects->moveNodeToFront(nodep);
}
// Make sure the object is tagged as selected
- objectp->setSelected( TRUE );
+ objectp->setSelected( true );
// And make sure we don't consider it as part of a family
- nodep->mIndividualSelection = TRUE;
+ nodep->mIndividualSelection = true;
// Handle face selection
if (objectp->getNumTEs() <= 0)
@@ -1066,12 +1066,12 @@ void LLSelectMgr::addAsIndividual(LLViewerObject *objectp, S32 face, BOOL undoab
}
else if (face == SELECT_ALL_TES)
{
- nodep->selectAllTEs(TRUE);
+ nodep->selectAllTEs(true);
objectp->setAllTESelected(true);
}
else if (0 <= face && face < SELECT_MAX_TES)
{
- nodep->selectTE(face, TRUE);
+ nodep->selectTE(face, true);
objectp->setTESelected(face, true);
}
else
@@ -1080,6 +1080,13 @@ void LLSelectMgr::addAsIndividual(LLViewerObject *objectp, S32 face, BOOL undoab
return;
}
+ // Handle glTF node selection
+ if (gltf_node >= 0)
+ {
+ nodep->selectGLTFNode(gltf_node, gltf_primitive, TRUE);
+
+ }
+
saveSelectedObjectTransform(SELECT_ACTION_TYPE_PICK);
updateSelectionCenter();
dialog_refresh_all();
@@ -1131,8 +1138,8 @@ LLObjectSelectionHandle LLSelectMgr::setHoverObject(LLViewerObject *objectp, S32
{
continue;
}
- LLSelectNode* nodep = new LLSelectNode(cur_objectp, FALSE);
- nodep->selectTE(face, TRUE);
+ LLSelectNode* nodep = new LLSelectNode(cur_objectp, false);
+ nodep->selectTE(face, true);
mHoverObjects->addNodeAtEnd(nodep);
}
@@ -1295,7 +1302,7 @@ LLObjectSelectionHandle LLSelectMgr::selectHighlightedObjects()
mSelectedObjects->addNode(new_nodep);
// flag this object as selected
- objectp->setSelected(TRUE);
+ objectp->setSelected(true);
objectp->setAllTESelected(true);
mSelectedObjects->mSelectType = getSelectTypeForObject(objectp);
@@ -1324,7 +1331,7 @@ LLObjectSelectionHandle LLSelectMgr::selectHighlightedObjects()
void LLSelectMgr::deselectHighlightedObjects()
{
- BOOL select_linked_set = !gSavedSettings.getBOOL("EditLinkedParts");
+ bool select_linked_set = !gSavedSettings.getBOOL("EditLinkedParts");
for (std::set<LLPointer<LLViewerObject> >::iterator iter = mRectSelectedObjects.begin();
iter != mRectSelectedObjects.end(); iter++)
{
@@ -1348,7 +1355,7 @@ void LLSelectMgr::deselectHighlightedObjects()
void LLSelectMgr::addGridObject(LLViewerObject* objectp)
{
- LLSelectNode* nodep = new LLSelectNode(objectp, FALSE);
+ LLSelectNode* nodep = new LLSelectNode(objectp, false);
mGridObjects.addNodeAtEnd(nodep);
LLViewerObject::const_child_list_t& child_list = objectp->getChildren();
@@ -1356,7 +1363,7 @@ void LLSelectMgr::addGridObject(LLViewerObject* objectp)
iter != child_list.end(); iter++)
{
LLViewerObject* child = *iter;
- nodep = new LLSelectNode(child, FALSE);
+ nodep = new LLSelectNode(child, false);
mGridObjects.addNodeAtEnd(nodep);
}
}
@@ -1410,7 +1417,7 @@ void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 &
LLVector4a min_extents(F32_MAX);
LLVector4a max_extents(-F32_MAX);
- BOOL grid_changed = FALSE;
+ bool grid_changed = false;
for (LLObjectSelection::iterator iter = mGridObjects.begin();
iter != mGridObjects.end(); ++iter)
{
@@ -1421,7 +1428,7 @@ void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 &
const LLVector4a* ext = drawable->getSpatialExtents();
update_min_max(min_extents, max_extents, ext[0]);
update_min_max(min_extents, max_extents, ext[1]);
- grid_changed = TRUE;
+ grid_changed = true;
}
}
if (grid_changed)
@@ -1443,7 +1450,7 @@ void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 &
}
else // GRID_MODE_WORLD or just plain default
{
- const BOOL non_root_ok = TRUE;
+ const bool non_root_ok = true;
LLViewerObject* first_object = mSelectedObjects->getFirstRootObject(non_root_ok);
mGridOrigin.clearVec();
@@ -1491,7 +1498,7 @@ void LLSelectMgr::remove(std::vector<LLViewerObject*>& objects)
LLSelectNode* nodep = mSelectedObjects->findNode(objectp);
if (nodep)
{
- objectp->setSelected(FALSE);
+ objectp->setSelected(false);
mSelectedObjects->removeNode(nodep);
nodep = NULL;
}
@@ -1504,7 +1511,7 @@ void LLSelectMgr::remove(std::vector<LLViewerObject*>& objects)
//-----------------------------------------------------------------------------
// remove() - a single object
//-----------------------------------------------------------------------------
-void LLSelectMgr::remove(LLViewerObject *objectp, S32 te, BOOL undoable)
+void LLSelectMgr::remove(LLViewerObject *objectp, S32 te, bool undoable)
{
// get object node (and verify it is in the selected list)
LLSelectNode *nodep = mSelectedObjects->findNode(objectp);
@@ -1519,14 +1526,14 @@ void LLSelectMgr::remove(LLViewerObject *objectp, S32 te, BOOL undoable)
// Remove all faces (or the object doesn't have faces) so remove the node
mSelectedObjects->removeNode(nodep);
nodep = NULL;
- objectp->setSelected( FALSE );
+ objectp->setSelected( false );
}
else if (0 <= te && te < SELECT_MAX_TES)
{
// ...valid face, check to see if it was on
if (nodep->isTESelected(te))
{
- nodep->selectTE(te, FALSE);
+ nodep->selectTE(te, false);
objectp->setTESelected(te, false);
}
else
@@ -1536,7 +1543,7 @@ void LLSelectMgr::remove(LLViewerObject *objectp, S32 te, BOOL undoable)
}
// ...check to see if this operation turned off all faces
- BOOL found = FALSE;
+ bool found = false;
for (S32 i = 0; i < nodep->getObject()->getNumTEs(); i++)
{
found = found || nodep->isTESelected(i);
@@ -1547,7 +1554,7 @@ void LLSelectMgr::remove(LLViewerObject *objectp, S32 te, BOOL undoable)
{
mSelectedObjects->removeNode(nodep);
nodep = NULL;
- objectp->setSelected( FALSE );
+ objectp->setSelected( false );
// *FIXME: Doesn't update simulator that object is no longer selected
}
}
@@ -1571,7 +1578,7 @@ void LLSelectMgr::removeAll()
iter != mSelectedObjects->end(); iter++ )
{
LLViewerObject *objectp = (*iter)->getObject();
- objectp->setSelected( FALSE );
+ objectp->setSelected( false );
}
mSelectedObjects->deleteAllNodes();
@@ -1587,7 +1594,7 @@ void LLSelectMgr::promoteSelectionToRoot()
{
std::set<LLViewerObject*> selection_set;
- BOOL selection_changed = FALSE;
+ bool selection_changed = false;
for (LLObjectSelection::iterator iter = getSelection()->begin();
iter != getSelection()->end(); )
@@ -1598,7 +1605,7 @@ void LLSelectMgr::promoteSelectionToRoot()
if (nodep->mIndividualSelection)
{
- selection_changed = TRUE;
+ selection_changed = true;
}
LLViewerObject* parentp = object;
@@ -1782,7 +1789,7 @@ bool LLObjectSelection::applyRestrictedPbrMaterialToTEs(LLViewerInventoryItem* i
LLUUID asset_id = item->getAssetUUID();
if (asset_id.isNull())
{
- asset_id = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
+ asset_id = BLANK_MATERIAL_ASSET_ID;
}
bool material_copied_all_faces = true;
@@ -1864,7 +1871,7 @@ bool LLSelectMgr::selectionSetImage(const LLUUID& imageid)
if (mItem && objectp->isAttachment())
{
const LLPermissions& perm = mItem->getPermissions();
- BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE;
+ bool unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? true : false;
if (!unrestricted)
{
// Attachments are in world and in inventory simultaneously,
@@ -1887,7 +1894,7 @@ bool LLSelectMgr::selectionSetImage(const LLUUID& imageid)
// Texture picker defaults aren't inventory items
// * Don't need to worry about permissions for them
// * Can just apply the texture and be done with it.
- objectp->setTEImage(te, LLViewerTextureManager::getFetchedTexture(mImageID, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE));
+ objectp->setTEImage(te, LLViewerTextureManager::getFetchedTexture(mImageID, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE));
}
return true;
@@ -1915,7 +1922,7 @@ bool LLSelectMgr::selectionSetImage(const LLUUID& imageid)
{
object->sendTEUpdate();
// 1 particle effect per object
- LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
+ LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, true);
effectp->setSourceObject(gAgentAvatarp);
effectp->setTargetObject(object);
effectp->setDuration(LL_HUD_DUR_SHORT);
@@ -1987,7 +1994,7 @@ bool LLSelectMgr::selectionSetGLTFMaterial(const LLUUID& mat_id)
asset_id = mItem->getAssetUUID();
if (asset_id.isNull())
{
- asset_id = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
+ asset_id = BLANK_MATERIAL_ASSET_ID;
}
}
@@ -2029,7 +2036,7 @@ bool LLSelectMgr::selectionSetGLTFMaterial(const LLUUID& mat_id)
if (!mItem)
{
// 1 particle effect per object
- LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
+ LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, true);
effectp->setSourceObject(gAgentAvatarp);
effectp->setTargetObject(object);
effectp->setDuration(LL_HUD_DUR_SHORT);
@@ -2187,7 +2194,7 @@ void LLSelectMgr::selectionRevertShinyColors()
getSelection()->applyToObjects(&sendfunc);
}
-BOOL LLSelectMgr::selectionRevertTextures()
+bool LLSelectMgr::selectionRevertTextures()
{
struct f : public LLSelectedTEFunctor
{
@@ -2205,11 +2212,11 @@ BOOL LLSelectMgr::selectionRevertTextures()
if (id.isNull())
{
// this was probably a no-copy texture, leave image as-is
- return FALSE;
+ return false;
}
else
{
- object->setTEImage(te, LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE));
+ object->setTEImage(te, LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE));
}
}
@@ -2217,7 +2224,7 @@ BOOL LLSelectMgr::selectionRevertTextures()
return true;
}
} setfunc(mSelectedObjects);
- BOOL revert_successful = getSelection()->applyToTEs(&setfunc);
+ bool revert_successful = getSelection()->applyToTEs(&setfunc);
LLSelectMgrSendFunctor sendfunc;
getSelection()->applyToObjects(&sendfunc);
@@ -2300,8 +2307,8 @@ void LLSelectMgr::selectionSetBumpmap(U8 bumpmap, const LLUUID &image_id)
return;
}
const LLPermissions& perm = item->getPermissions();
- BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE;
- BOOL attached = object->isAttachment();
+ bool unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? true : false;
+ bool attached = object->isAttachment();
if (attached && !unrestricted)
{
// Attachments are in world and in inventory simultaneously,
@@ -2372,8 +2379,8 @@ void LLSelectMgr::selectionSetShiny(U8 shiny, const LLUUID &image_id)
return;
}
const LLPermissions& perm = item->getPermissions();
- BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE;
- BOOL attached = object->isAttachment();
+ bool unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? true : false;
+ bool attached = object->isAttachment();
if (attached && !unrestricted)
{
// Attachments are in world and in inventory simultaneously,
@@ -2638,9 +2645,9 @@ LLPermissions* LLSelectMgr::findObjectPermissions(const LLViewerObject* object)
//-----------------------------------------------------------------------------
// selectionGetGlow()
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectionGetGlow(F32 *glow)
+bool LLSelectMgr::selectionGetGlow(F32 *glow)
{
- BOOL identical;
+ bool identical;
F32 lglow = 0.f;
struct f1 : public LLSelectedTEGetFunctor<F32>
{
@@ -2667,7 +2674,7 @@ void LLSelectMgr::selectionSetPhysicsType(U8 type)
if (object->permModify())
{
object->setPhysicsShapeType(mType);
- object->updateFlags(TRUE);
+ object->updateFlags(true);
}
return true;
}
@@ -2686,7 +2693,7 @@ void LLSelectMgr::selectionSetFriction(F32 friction)
if (object->permModify())
{
object->setPhysicsFriction(mFriction);
- object->updateFlags(TRUE);
+ object->updateFlags(true);
}
return true;
}
@@ -2705,7 +2712,7 @@ void LLSelectMgr::selectionSetGravity(F32 gravity )
if (object->permModify())
{
object->setPhysicsGravity(mGravity);
- object->updateFlags(TRUE);
+ object->updateFlags(true);
}
return true;
}
@@ -2724,7 +2731,7 @@ void LLSelectMgr::selectionSetDensity(F32 density )
if (object->permModify())
{
object->setPhysicsDensity(mDensity);
- object->updateFlags(TRUE);
+ object->updateFlags(true);
}
return true;
}
@@ -2743,7 +2750,7 @@ void LLSelectMgr::selectionSetRestitution(F32 restitution)
if (object->permModify())
{
object->setPhysicsRestitution(mRestitution);
- object->updateFlags(TRUE);
+ object->updateFlags(true);
}
return true;
}
@@ -2776,8 +2783,8 @@ void LLSelectMgr::selectionSetMaterial(U8 material)
getSelection()->applyToObjects(&sendfunc);
}
-// TRUE if all selected objects have this PCode
-BOOL LLSelectMgr::selectionAllPCode(LLPCode code)
+// true if all selected objects have this PCode
+bool LLSelectMgr::selectionAllPCode(LLPCode code)
{
struct f : public LLSelectedObjectFunctor
{
@@ -2787,19 +2794,19 @@ BOOL LLSelectMgr::selectionAllPCode(LLPCode code)
{
if (object->getPCode() != mCode)
{
- return FALSE;
+ return false;
}
return true;
}
} func(code);
- BOOL res = getSelection()->applyToObjects(&func);
+ bool res = getSelection()->applyToObjects(&func);
return res;
}
bool LLSelectMgr::selectionGetIncludeInSearch(bool* include_in_search_out)
{
LLViewerObject *object = mSelectedObjects->getFirstRootObject();
- if (!object) return FALSE;
+ if (!object) return false;
bool include_in_search = object->getIncludeInSearch();
@@ -2839,12 +2846,12 @@ void LLSelectMgr::selectionSetIncludeInSearch(bool include_in_search)
SEND_ONLY_ROOTS);
}
-BOOL LLSelectMgr::selectionGetClickAction(U8 *out_action)
+bool LLSelectMgr::selectionGetClickAction(U8 *out_action)
{
LLViewerObject *object = mSelectedObjects->getFirstObject();
if (!object)
{
- return FALSE;
+ return false;
}
U8 action = object->getClickAction();
@@ -2863,7 +2870,7 @@ BOOL LLSelectMgr::selectionGetClickAction(U8 *out_action)
return true;
}
} func(action);
- BOOL res = getSelection()->applyToObjects(&func);
+ bool res = getSelection()->applyToObjects(&func);
return res;
}
@@ -2991,7 +2998,7 @@ void LLSelectMgr::selectionTexScaleAutofit(F32 repeats_per_meter)
U32 s_axis, t_axis;
if (!LLPrimitive::getTESTAxes(te, &s_axis, &t_axis))
{
- return TRUE;
+ return true;
}
F32 new_s = object->getScale().mV[s_axis] * mRepeatsPerMeter;
@@ -3016,7 +3023,7 @@ void LLSelectMgr::selectionTexScaleAutofit(F32 repeats_per_meter)
//-----------------------------------------------------------------------------
// adjustTexturesByScale()
//-----------------------------------------------------------------------------
-void LLSelectMgr::adjustTexturesByScale(BOOL send_to_sim, BOOL stretch)
+void LLSelectMgr::adjustTexturesByScale(bool send_to_sim, bool stretch)
{
for (LLObjectSelection::iterator iter = getSelection()->begin();
iter != getSelection()->end(); iter++)
@@ -3039,13 +3046,13 @@ void LLSelectMgr::adjustTexturesByScale(BOOL send_to_sim, BOOL stretch)
continue;
}
- BOOL send = FALSE;
+ bool send = false;
for (U8 te_num = 0; te_num < object->getNumTEs(); te_num++)
{
const LLTextureEntry* tep = object->getTE(te_num);
- BOOL planar = tep->getTexGen() == LLTextureEntry::TEX_GEN_PLANAR;
+ bool planar = tep->getTexGen() == LLTextureEntry::TEX_GEN_PLANAR;
if (planar == stretch)
{
// Figure out how S,T changed with scale operation
@@ -3129,9 +3136,9 @@ void LLSelectMgr::adjustTexturesByScale(BOOL send_to_sim, BOOL stretch)
//-----------------------------------------------------------------------------
// selectGetAllRootsValid()
-// Returns TRUE if the viewer has information on all selected objects
+// Returns true if the viewer has information on all selected objects
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetAllRootsValid()
+bool LLSelectMgr::selectGetAllRootsValid()
{
for (LLObjectSelection::root_iterator iter = getSelection()->root_begin();
iter != getSelection()->root_end(); ++iter )
@@ -3139,18 +3146,18 @@ BOOL LLSelectMgr::selectGetAllRootsValid()
LLSelectNode* node = *iter;
if( !node->mValid )
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// selectGetAllValid()
-// Returns TRUE if the viewer has information on all selected objects
+// Returns true if the viewer has information on all selected objects
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetAllValid()
+bool LLSelectMgr::selectGetAllValid()
{
for (LLObjectSelection::iterator iter = getSelection()->begin();
iter != getSelection()->end(); ++iter )
@@ -3158,19 +3165,19 @@ BOOL LLSelectMgr::selectGetAllValid()
LLSelectNode* node = *iter;
if( !node->mValid )
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
-// selectGetAllValidAndObjectsFound() - return TRUE if selections are
+// selectGetAllValidAndObjectsFound() - return true if selections are
// valid and objects are found.
//
// For EXT-3114 - same as selectGetModify() without the modify check.
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetAllValidAndObjectsFound()
+bool LLSelectMgr::selectGetAllValidAndObjectsFound()
{
for (LLObjectSelection::iterator iter = getSelection()->begin();
iter != getSelection()->end(); iter++ )
@@ -3179,17 +3186,17 @@ BOOL LLSelectMgr::selectGetAllValidAndObjectsFound()
LLViewerObject* object = node->getObject();
if( !object || !node->mValid )
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
-// selectGetModify() - return TRUE if current agent can modify all
+// selectGetModify() - return true if current agent can modify all
// selected objects.
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetModify()
+bool LLSelectMgr::selectGetModify()
{
for (LLObjectSelection::iterator iter = getSelection()->begin();
iter != getSelection()->end(); iter++ )
@@ -3198,21 +3205,21 @@ BOOL LLSelectMgr::selectGetModify()
LLViewerObject* object = node->getObject();
if( !object || !node->mValid )
{
- return FALSE;
+ return false;
}
if( !object->permModify() )
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
-// selectGetRootsModify() - return TRUE if current agent can modify all
+// selectGetRootsModify() - return true if current agent can modify all
// selected root objects.
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetRootsModify()
+bool LLSelectMgr::selectGetRootsModify()
{
for (LLObjectSelection::root_iterator iter = getSelection()->root_begin();
iter != getSelection()->root_end(); iter++ )
@@ -3221,30 +3228,30 @@ BOOL LLSelectMgr::selectGetRootsModify()
LLViewerObject* object = node->getObject();
if( !node->mValid )
{
- return FALSE;
+ return false;
}
if( !object->permModify() )
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
-// selectGetSameRegion() - return TRUE if all objects are in same region
+// selectGetSameRegion() - return true if all objects are in same region
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetSameRegion()
+bool LLSelectMgr::selectGetSameRegion()
{
if (getSelection()->isEmpty())
{
- return TRUE;
+ return true;
}
LLViewerObject* object = getSelection()->getFirstObject();
if (!object)
{
- return FALSE;
+ return false;
}
LLViewerRegion* current_region = object->getRegion();
@@ -3255,18 +3262,18 @@ BOOL LLSelectMgr::selectGetSameRegion()
object = node->getObject();
if (!node->mValid || !object || current_region != object->getRegion())
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
-// selectGetNonPermanentEnforced() - return TRUE if all objects are not
+// selectGetNonPermanentEnforced() - return true if all objects are not
// permanent enforced
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetNonPermanentEnforced()
+bool LLSelectMgr::selectGetNonPermanentEnforced()
{
for (LLObjectSelection::iterator iter = getSelection()->begin();
iter != getSelection()->end(); iter++ )
@@ -3275,21 +3282,21 @@ BOOL LLSelectMgr::selectGetNonPermanentEnforced()
LLViewerObject* object = node->getObject();
if( !object || !node->mValid )
{
- return FALSE;
+ return false;
}
if( object->isPermanentEnforced())
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
-// selectGetRootsNonPermanentEnforced() - return TRUE if all root objects are
+// selectGetRootsNonPermanentEnforced() - return true if all root objects are
// not permanent enforced
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetRootsNonPermanentEnforced()
+bool LLSelectMgr::selectGetRootsNonPermanentEnforced()
{
for (LLObjectSelection::root_iterator iter = getSelection()->root_begin();
iter != getSelection()->root_end(); iter++ )
@@ -3298,21 +3305,21 @@ BOOL LLSelectMgr::selectGetRootsNonPermanentEnforced()
LLViewerObject* object = node->getObject();
if( !node->mValid )
{
- return FALSE;
+ return false;
}
if( object->isPermanentEnforced())
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
-// selectGetPermanent() - return TRUE if all objects are permanent
+// selectGetPermanent() - return true if all objects are permanent
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetPermanent()
+bool LLSelectMgr::selectGetPermanent()
{
for (LLObjectSelection::iterator iter = getSelection()->begin();
iter != getSelection()->end(); iter++ )
@@ -3321,21 +3328,21 @@ BOOL LLSelectMgr::selectGetPermanent()
LLViewerObject* object = node->getObject();
if( !object || !node->mValid )
{
- return FALSE;
+ return false;
}
if( !object->flagObjectPermanent())
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
-// selectGetRootsPermanent() - return TRUE if all root objects are
+// selectGetRootsPermanent() - return true if all root objects are
// permanent
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetRootsPermanent()
+bool LLSelectMgr::selectGetRootsPermanent()
{
for (LLObjectSelection::root_iterator iter = getSelection()->root_begin();
iter != getSelection()->root_end(); iter++ )
@@ -3344,21 +3351,21 @@ BOOL LLSelectMgr::selectGetRootsPermanent()
LLViewerObject* object = node->getObject();
if( !node->mValid )
{
- return FALSE;
+ return false;
}
if( !object->flagObjectPermanent())
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
-// selectGetCharacter() - return TRUE if all objects are character
+// selectGetCharacter() - return true if all objects are character
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetCharacter()
+bool LLSelectMgr::selectGetCharacter()
{
for (LLObjectSelection::iterator iter = getSelection()->begin();
iter != getSelection()->end(); iter++ )
@@ -3367,21 +3374,21 @@ BOOL LLSelectMgr::selectGetCharacter()
LLViewerObject* object = node->getObject();
if( !object || !node->mValid )
{
- return FALSE;
+ return false;
}
if( !object->flagCharacter())
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
-// selectGetRootsCharacter() - return TRUE if all root objects are
+// selectGetRootsCharacter() - return true if all root objects are
// character
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetRootsCharacter()
+bool LLSelectMgr::selectGetRootsCharacter()
{
for (LLObjectSelection::root_iterator iter = getSelection()->root_begin();
iter != getSelection()->root_end(); iter++ )
@@ -3390,21 +3397,21 @@ BOOL LLSelectMgr::selectGetRootsCharacter()
LLViewerObject* object = node->getObject();
if( !node->mValid )
{
- return FALSE;
+ return false;
}
if( !object->flagCharacter())
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
-// selectGetNonPathfinding() - return TRUE if all objects are not pathfinding
+// selectGetNonPathfinding() - return true if all objects are not pathfinding
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetNonPathfinding()
+bool LLSelectMgr::selectGetNonPathfinding()
{
for (LLObjectSelection::iterator iter = getSelection()->begin();
iter != getSelection()->end(); iter++ )
@@ -3413,21 +3420,21 @@ BOOL LLSelectMgr::selectGetNonPathfinding()
LLViewerObject* object = node->getObject();
if( !object || !node->mValid )
{
- return FALSE;
+ return false;
}
if( object->flagObjectPermanent() || object->flagCharacter())
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
-// selectGetRootsNonPathfinding() - return TRUE if all root objects are not
+// selectGetRootsNonPathfinding() - return true if all root objects are not
// pathfinding
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetRootsNonPathfinding()
+bool LLSelectMgr::selectGetRootsNonPathfinding()
{
for (LLObjectSelection::root_iterator iter = getSelection()->root_begin();
iter != getSelection()->root_end(); iter++ )
@@ -3436,21 +3443,21 @@ BOOL LLSelectMgr::selectGetRootsNonPathfinding()
LLViewerObject* object = node->getObject();
if( !node->mValid )
{
- return FALSE;
+ return false;
}
if( object->flagObjectPermanent() || object->flagCharacter())
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
-// selectGetNonPermanent() - return TRUE if all objects are not permanent
+// selectGetNonPermanent() - return true if all objects are not permanent
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetNonPermanent()
+bool LLSelectMgr::selectGetNonPermanent()
{
for (LLObjectSelection::iterator iter = getSelection()->begin();
iter != getSelection()->end(); iter++ )
@@ -3459,21 +3466,21 @@ BOOL LLSelectMgr::selectGetNonPermanent()
LLViewerObject* object = node->getObject();
if( !object || !node->mValid )
{
- return FALSE;
+ return false;
}
if( object->flagObjectPermanent())
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
-// selectGetRootsNonPermanent() - return TRUE if all root objects are not
+// selectGetRootsNonPermanent() - return true if all root objects are not
// permanent
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetRootsNonPermanent()
+bool LLSelectMgr::selectGetRootsNonPermanent()
{
for (LLObjectSelection::root_iterator iter = getSelection()->root_begin();
iter != getSelection()->root_end(); iter++ )
@@ -3482,21 +3489,21 @@ BOOL LLSelectMgr::selectGetRootsNonPermanent()
LLViewerObject* object = node->getObject();
if( !node->mValid )
{
- return FALSE;
+ return false;
}
if( object->flagObjectPermanent())
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
-// selectGetNonCharacter() - return TRUE if all objects are not character
+// selectGetNonCharacter() - return true if all objects are not character
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetNonCharacter()
+bool LLSelectMgr::selectGetNonCharacter()
{
for (LLObjectSelection::iterator iter = getSelection()->begin();
iter != getSelection()->end(); iter++ )
@@ -3505,21 +3512,21 @@ BOOL LLSelectMgr::selectGetNonCharacter()
LLViewerObject* object = node->getObject();
if( !object || !node->mValid )
{
- return FALSE;
+ return false;
}
if( object->flagCharacter())
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
-// selectGetRootsNonCharacter() - return TRUE if all root objects are not
+// selectGetRootsNonCharacter() - return true if all root objects are not
// character
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetRootsNonCharacter()
+bool LLSelectMgr::selectGetRootsNonCharacter()
{
for (LLObjectSelection::root_iterator iter = getSelection()->root_begin();
iter != getSelection()->root_end(); iter++ )
@@ -3528,23 +3535,23 @@ BOOL LLSelectMgr::selectGetRootsNonCharacter()
LLViewerObject* object = node->getObject();
if( !node->mValid )
{
- return FALSE;
+ return false;
}
if( object->flagCharacter())
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
-// selectGetEditableLinksets() - return TRUE if all objects are editable
+// selectGetEditableLinksets() - return true if all objects are editable
// pathfinding linksets
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetEditableLinksets()
+bool LLSelectMgr::selectGetEditableLinksets()
{
for (LLObjectSelection::iterator iter = getSelection()->begin();
iter != getSelection()->end(); iter++ )
@@ -3553,7 +3560,7 @@ BOOL LLSelectMgr::selectGetEditableLinksets()
LLViewerObject* object = node->getObject();
if( !object || !node->mValid )
{
- return FALSE;
+ return false;
}
if (object->flagUsePhysics() ||
object->flagTemporaryOnRez() ||
@@ -3566,17 +3573,17 @@ BOOL LLSelectMgr::selectGetEditableLinksets()
!object->permYouOwner() &&
!object->permMove()))
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
-// selectGetViewableCharacters() - return TRUE if all objects are characters
+// selectGetViewableCharacters() - return true if all objects are characters
// viewable within the pathfinding characters floater
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetViewableCharacters()
+bool LLSelectMgr::selectGetViewableCharacters()
{
for (LLObjectSelection::iterator iter = getSelection()->begin();
iter != getSelection()->end(); iter++ )
@@ -3585,22 +3592,22 @@ BOOL LLSelectMgr::selectGetViewableCharacters()
LLViewerObject* object = node->getObject();
if( !object || !node->mValid )
{
- return FALSE;
+ return false;
}
if( !object->flagCharacter() ||
(object->getRegion() != gAgent.getRegion()))
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
-// selectGetRootsTransfer() - return TRUE if current agent can transfer all
+// selectGetRootsTransfer() - return true if current agent can transfer all
// selected root objects.
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetRootsTransfer()
+bool LLSelectMgr::selectGetRootsTransfer()
{
for (LLObjectSelection::root_iterator iter = getSelection()->root_begin();
iter != getSelection()->root_end(); iter++ )
@@ -3609,21 +3616,21 @@ BOOL LLSelectMgr::selectGetRootsTransfer()
LLViewerObject* object = node->getObject();
if( !node->mValid )
{
- return FALSE;
+ return false;
}
if(!object->permTransfer())
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
-// selectGetRootsCopy() - return TRUE if current agent can copy all
+// selectGetRootsCopy() - return true if current agent can copy all
// selected root objects.
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetRootsCopy()
+bool LLSelectMgr::selectGetRootsCopy()
{
for (LLObjectSelection::root_iterator iter = getSelection()->root_begin();
iter != getSelection()->root_end(); iter++ )
@@ -3632,14 +3639,14 @@ BOOL LLSelectMgr::selectGetRootsCopy()
LLViewerObject* object = node->getObject();
if( !node->mValid )
{
- return FALSE;
+ return false;
}
if(!object->permCopy())
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
struct LLSelectGetFirstTest
@@ -3722,7 +3729,7 @@ protected:
}
};
-BOOL LLSelectMgr::selectGetCreator(LLUUID& result_id, std::string& name)
+bool LLSelectMgr::selectGetCreator(LLUUID& result_id, std::string& name)
{
LLSelectGetFirstCreator test;
getFirst(&test);
@@ -3730,7 +3737,7 @@ BOOL LLSelectMgr::selectGetCreator(LLUUID& result_id, std::string& name)
if (test.mFirstValue.isNull())
{
name = LLTrans::getString("AvatarNameNobody");
- return FALSE;
+ return false;
}
result_id = test.mFirstValue;
@@ -3762,14 +3769,14 @@ protected:
}
};
-BOOL LLSelectMgr::selectGetOwner(LLUUID& result_id, std::string& name)
+bool LLSelectMgr::selectGetOwner(LLUUID& result_id, std::string& name)
{
LLSelectGetFirstOwner test;
getFirst(&test);
if (test.mFirstValue.isNull())
{
- return FALSE;
+ return false;
}
result_id = test.mFirstValue;
@@ -3807,14 +3814,14 @@ protected:
}
};
-BOOL LLSelectMgr::selectGetLastOwner(LLUUID& result_id, std::string& name)
+bool LLSelectMgr::selectGetLastOwner(LLUUID& result_id, std::string& name)
{
LLSelectGetFirstLastOwner test;
getFirst(&test);
if (test.mFirstValue.isNull())
{
- return FALSE;
+ return false;
}
result_id = test.mFirstValue;
@@ -3844,7 +3851,7 @@ protected:
}
};
-BOOL LLSelectMgr::selectGetGroup(LLUUID& result_id)
+bool LLSelectMgr::selectGetGroup(LLUUID& result_id)
{
LLSelectGetFirstGroup test;
getFirst(&test);
@@ -3856,7 +3863,7 @@ BOOL LLSelectMgr::selectGetGroup(LLUUID& result_id)
//-----------------------------------------------------------------------------
// selectIsGroupOwned()
// Only operates on root nodes unless editing linked parts.
-// Returns TRUE if the first selected is group owned.
+// Returns true if the first selected is group owned.
//-----------------------------------------------------------------------------
struct LLSelectGetFirstGroupOwner : public LLSelectGetFirstTest
{
@@ -3871,29 +3878,29 @@ protected:
}
};
-BOOL LLSelectMgr::selectIsGroupOwned()
+bool LLSelectMgr::selectIsGroupOwned()
{
LLSelectGetFirstGroupOwner test;
getFirst(&test);
- return test.mFirstValue.notNull() ? TRUE : FALSE;
+ return test.mFirstValue.notNull() ? true : false;
}
//-----------------------------------------------------------------------------
// selectGetPerm()
// Only operates on root nodes.
-// Returns TRUE if all have valid data.
-// mask_on has bits set to TRUE where all permissions are TRUE
-// mask_off has bits set to TRUE where all permissions are FALSE
+// Returns true if all have valid data.
+// mask_on has bits set to true where all permissions are true
+// mask_off has bits set to true where all permissions are false
// if a bit is off both in mask_on and mask_off, the values differ within
// the selection.
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetPerm(U8 which_perm, U32* mask_on, U32* mask_off)
+bool LLSelectMgr::selectGetPerm(U8 which_perm, U32* mask_on, U32* mask_off)
{
U32 mask;
U32 mask_and = 0xffffffff;
U32 mask_or = 0x00000000;
- BOOL all_valid = FALSE;
+ bool all_valid = false;
for (LLObjectSelection::root_iterator iter = getSelection()->root_begin();
iter != getSelection()->root_end(); iter++)
@@ -3902,11 +3909,11 @@ BOOL LLSelectMgr::selectGetPerm(U8 which_perm, U32* mask_on, U32* mask_off)
if (!node->mValid)
{
- all_valid = FALSE;
+ all_valid = false;
break;
}
- all_valid = TRUE;
+ all_valid = true;
switch( which_perm )
{
@@ -3935,26 +3942,26 @@ BOOL LLSelectMgr::selectGetPerm(U8 which_perm, U32* mask_on, U32* mask_off)
if (all_valid)
{
- // ...TRUE through all ANDs means all TRUE
+ // ...true through all ANDs means all true
*mask_on = mask_and;
- // ...FALSE through all ORs means all FALSE
+ // ...false through all ORs means all false
*mask_off = ~mask_or;
- return TRUE;
+ return true;
}
else
{
*mask_on = 0;
*mask_off = 0;
- return FALSE;
+ return false;
}
}
-BOOL LLSelectMgr::selectGetPermissions(LLPermissions& result_perm)
+bool LLSelectMgr::selectGetPermissions(LLPermissions& result_perm)
{
- BOOL first = TRUE;
+ bool first = true;
LLPermissions perm;
for (LLObjectSelection::root_iterator iter = getSelection()->root_begin();
iter != getSelection()->root_end(); iter++ )
@@ -3962,13 +3969,13 @@ BOOL LLSelectMgr::selectGetPermissions(LLPermissions& result_perm)
LLSelectNode* node = *iter;
if (!node->mValid)
{
- return FALSE;
+ return false;
}
if (first)
{
perm = *(node->mPermissions);
- first = FALSE;
+ first = false;
}
else
{
@@ -3978,7 +3985,7 @@ BOOL LLSelectMgr::selectGetPermissions(LLPermissions& result_perm)
result_perm = perm;
- return TRUE;
+ return true;
}
@@ -3986,9 +3993,9 @@ void LLSelectMgr::selectDelete()
{
S32 deleteable_count = 0;
- BOOL locked_but_deleteable_object = FALSE;
- BOOL no_copy_but_deleteable_object = FALSE;
- BOOL all_owned_by_you = TRUE;
+ bool locked_but_deleteable_object = false;
+ bool no_copy_but_deleteable_object = false;
+ bool all_owned_by_you = true;
for (LLObjectSelection::iterator iter = getSelection()->begin();
iter != getSelection()->end(); iter++)
@@ -4005,15 +4012,15 @@ void LLSelectMgr::selectDelete()
// Check to see if you can delete objects which are locked.
if(!obj->permMove())
{
- locked_but_deleteable_object = TRUE;
+ locked_but_deleteable_object = true;
}
if(!obj->permCopy())
{
- no_copy_but_deleteable_object = TRUE;
+ no_copy_but_deleteable_object = true;
}
if(!obj->permYouOwner())
{
- all_owned_by_you = FALSE;
+ all_owned_by_you = false;
}
}
@@ -4108,7 +4115,7 @@ bool LLSelectMgr::confirmDelete(const LLSD& notification, const LLSD& response,
// VEFFECT: Delete Object - one effect for all deletes
if (LLSelectMgr::getInstance()->mSelectedObjects->mSelectType != SELECT_TYPE_HUD)
{
- LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, TRUE);
+ LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, true);
effectp->setPositionGlobal( LLSelectMgr::getInstance()->getSelectionCenterGlobal() );
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
F32 duration = 0.5f;
@@ -4137,11 +4144,11 @@ void LLSelectMgr::selectForceDelete()
packDeleteHeader,
packObjectLocalID,
logNoOp,
- (void*)TRUE,
+ (void*)true,
SEND_ONLY_ROOTS);
}
-BOOL LLSelectMgr::selectGetEditMoveLinksetPermissions(bool &move, bool &modify)
+bool LLSelectMgr::selectGetEditMoveLinksetPermissions(bool &move, bool &modify)
{
move = true;
modify = true;
@@ -4156,7 +4163,7 @@ BOOL LLSelectMgr::selectGetEditMoveLinksetPermissions(bool &move, bool &modify)
{
move = false;
modify = false;
- return FALSE;
+ return false;
}
LLViewerObject *root_object = object->getRootEdit();
@@ -4171,18 +4178,18 @@ BOOL LLSelectMgr::selectGetEditMoveLinksetPermissions(bool &move, bool &modify)
modify = modify && object->permModify();
}
- return TRUE;
+ return true;
}
void LLSelectMgr::selectGetAggregateSaleInfo(U32 &num_for_sale,
- BOOL &is_for_sale_mixed,
- BOOL &is_sale_price_mixed,
+ bool &is_for_sale_mixed,
+ bool &is_sale_price_mixed,
S32 &total_sale_price,
S32 &individual_sale_price)
{
num_for_sale = 0;
- is_for_sale_mixed = FALSE;
- is_sale_price_mixed = FALSE;
+ is_for_sale_mixed = false;
+ is_sale_price_mixed = false;
total_sale_price = 0;
individual_sale_price = 0;
@@ -4192,21 +4199,21 @@ void LLSelectMgr::selectGetAggregateSaleInfo(U32 &num_for_sale,
return;
LLSelectNode *node = *(getSelection()->root_begin());
- const BOOL first_node_for_sale = node->mSaleInfo.isForSale();
+ const bool first_node_for_sale = node->mSaleInfo.isForSale();
const S32 first_node_sale_price = node->mSaleInfo.getSalePrice();
for (LLObjectSelection::root_iterator iter = getSelection()->root_begin();
iter != getSelection()->root_end(); iter++)
{
LLSelectNode* node = *iter;
- const BOOL node_for_sale = node->mSaleInfo.isForSale();
+ const bool node_for_sale = node->mSaleInfo.isForSale();
const S32 node_sale_price = node->mSaleInfo.getSalePrice();
// Set mixed if the fields don't match the first node's fields.
if (node_for_sale != first_node_for_sale)
- is_for_sale_mixed = TRUE;
+ is_for_sale_mixed = true;
if (node_sale_price != first_node_sale_price)
- is_sale_price_mixed = TRUE;
+ is_sale_price_mixed = true;
if (node_for_sale)
{
@@ -4218,16 +4225,16 @@ void LLSelectMgr::selectGetAggregateSaleInfo(U32 &num_for_sale,
individual_sale_price = first_node_sale_price;
if (is_for_sale_mixed)
{
- is_sale_price_mixed = TRUE;
+ is_sale_price_mixed = true;
individual_sale_price = 0;
}
}
-// returns TRUE if all nodes are valid. method also stores an
+// returns true if all nodes are valid. method also stores an
// accumulated sale info.
-BOOL LLSelectMgr::selectGetSaleInfo(LLSaleInfo& result_sale_info)
+bool LLSelectMgr::selectGetSaleInfo(LLSaleInfo& result_sale_info)
{
- BOOL first = TRUE;
+ bool first = true;
LLSaleInfo sale_info;
for (LLObjectSelection::root_iterator iter = getSelection()->root_begin();
iter != getSelection()->root_end(); iter++ )
@@ -4235,13 +4242,13 @@ BOOL LLSelectMgr::selectGetSaleInfo(LLSaleInfo& result_sale_info)
LLSelectNode* node = *iter;
if (!node->mValid)
{
- return FALSE;
+ return false;
}
if (first)
{
sale_info = node->mSaleInfo;
- first = FALSE;
+ first = false;
}
else
{
@@ -4251,12 +4258,12 @@ BOOL LLSelectMgr::selectGetSaleInfo(LLSaleInfo& result_sale_info)
result_sale_info = sale_info;
- return TRUE;
+ return true;
}
-BOOL LLSelectMgr::selectGetAggregatePermissions(LLAggregatePermissions& result_perm)
+bool LLSelectMgr::selectGetAggregatePermissions(LLAggregatePermissions& result_perm)
{
- BOOL first = TRUE;
+ bool first = true;
LLAggregatePermissions perm;
for (LLObjectSelection::root_iterator iter = getSelection()->root_begin();
iter != getSelection()->root_end(); iter++ )
@@ -4264,13 +4271,13 @@ BOOL LLSelectMgr::selectGetAggregatePermissions(LLAggregatePermissions& result_p
LLSelectNode* node = *iter;
if (!node->mValid)
{
- return FALSE;
+ return false;
}
if (first)
{
perm = node->mAggregatePerm;
- first = FALSE;
+ first = false;
}
else
{
@@ -4280,12 +4287,12 @@ BOOL LLSelectMgr::selectGetAggregatePermissions(LLAggregatePermissions& result_p
result_perm = perm;
- return TRUE;
+ return true;
}
-BOOL LLSelectMgr::selectGetAggregateTexturePermissions(LLAggregatePermissions& result_perm)
+bool LLSelectMgr::selectGetAggregateTexturePermissions(LLAggregatePermissions& result_perm)
{
- BOOL first = TRUE;
+ bool first = true;
LLAggregatePermissions perm;
for (LLObjectSelection::root_iterator iter = getSelection()->root_begin();
iter != getSelection()->root_end(); iter++ )
@@ -4293,14 +4300,14 @@ BOOL LLSelectMgr::selectGetAggregateTexturePermissions(LLAggregatePermissions& r
LLSelectNode* node = *iter;
if (!node->mValid)
{
- return FALSE;
+ return false;
}
LLAggregatePermissions t_perm = node->getObject()->permYouOwner() ? node->mAggregateTexturePermOwner : node->mAggregateTexturePerm;
if (first)
{
perm = t_perm;
- first = FALSE;
+ first = false;
}
else
{
@@ -4310,19 +4317,19 @@ BOOL LLSelectMgr::selectGetAggregateTexturePermissions(LLAggregatePermissions& r
result_perm = perm;
- return TRUE;
+ return true;
}
-BOOL LLSelectMgr::isMovableAvatarSelected()
+bool LLSelectMgr::isMovableAvatarSelected()
{
if (mAllowSelectAvatar && getSelection()->getObjectCount() == 1)
{
// nothing but avatar should be selected, so check that
// there is only one selected object and it is a root
LLViewerObject* obj = getSelection()->getFirstRootObject();
- return obj && obj->isAvatar() && getSelection()->getFirstMoveableNode(TRUE);
+ return obj && obj->isAvatar() && getSelection()->getFirstMoveableNode(true);
}
- return FALSE;
+ return false;
}
//--------------------------------------------------------------------
@@ -4338,7 +4345,7 @@ struct LLDuplicateData
U32 flags;
};
-void LLSelectMgr::selectDuplicate(const LLVector3& offset, BOOL select_copy)
+void LLSelectMgr::selectDuplicate(const LLVector3& offset, bool select_copy)
{
if (mSelectedObjects->isAttachment())
{
@@ -4375,7 +4382,7 @@ void LLSelectMgr::selectDuplicate(const LLVector3& offset, BOOL select_copy)
iter != getSelection()->root_end(); iter++ )
{
LLSelectNode* node = *iter;
- node->mDuplicated = TRUE;
+ node->mDuplicated = true;
node->mDuplicatePos = node->getObject()->getPositionGlobal();
node->mDuplicateRot = node->getObject()->getRotation();
}
@@ -4460,22 +4467,22 @@ struct LLDuplicateOnRayData
{
LLVector3 mRayStartRegion;
LLVector3 mRayEndRegion;
- BOOL mBypassRaycast;
- BOOL mRayEndIsIntersection;
+ bool mBypassRaycast;
+ bool mRayEndIsIntersection;
LLUUID mRayTargetID;
- BOOL mCopyCenters;
- BOOL mCopyRotates;
+ bool mCopyCenters;
+ bool mCopyRotates;
U32 mFlags;
};
void LLSelectMgr::selectDuplicateOnRay(const LLVector3 &ray_start_region,
const LLVector3 &ray_end_region,
- BOOL bypass_raycast,
- BOOL ray_end_is_intersection,
+ bool bypass_raycast,
+ bool ray_end_is_intersection,
const LLUUID &ray_target_id,
- BOOL copy_centers,
- BOOL copy_rotates,
- BOOL select_copy)
+ bool copy_centers,
+ bool copy_rotates,
+ bool select_copy)
{
if (mSelectedObjects->isAttachment())
{
@@ -4597,12 +4604,12 @@ struct LLOwnerData
{
LLUUID owner_id;
LLUUID group_id;
- BOOL override;
+ bool override;
};
void LLSelectMgr::sendOwner(const LLUUID& owner_id,
const LLUUID& group_id,
- BOOL override)
+ bool override)
{
LLOwnerData data;
@@ -4684,16 +4691,16 @@ void LLSelectMgr::packBuyObjectIDs(LLSelectNode* node, void* data)
struct LLPermData
{
U8 mField;
- BOOL mSet;
+ bool mSet;
U32 mMask;
- BOOL mOverride;
+ bool mOverride;
};
// TODO: Make this able to fail elegantly.
void LLSelectMgr::selectionSetObjectPermissions(U8 field,
- BOOL set,
+ bool set,
U32 mask,
- BOOL override)
+ bool override)
{
LLPermData data;
@@ -4802,7 +4809,7 @@ void LLSelectMgr::convertTransient()
for (node_it = mSelectedObjects->begin(); node_it != mSelectedObjects->end(); ++node_it)
{
LLSelectNode *nodep = *node_it;
- nodep->setTransient(FALSE);
+ nodep->setTransient(false);
}
}
@@ -4944,7 +4951,7 @@ void LLSelectMgr::sendAttach(LLObjectSelectionHandle selection_handle, U8 attach
return;
}
- BOOL build_mode = LLToolMgr::getInstance()->inEdit();
+ bool build_mode = LLToolMgr::getInstance()->inEdit();
// Special case: Attach to default location for this object.
if (0 == attachment_point ||
get_if_there(gAgentAvatarp->mAttachmentPoints, (S32)attachment_point, (LLViewerJointAttachment*)NULL))
@@ -5178,7 +5185,7 @@ void LLSelectMgr::saveSelectedObjectTextures()
{
virtual bool apply(LLSelectNode* node)
{
- node->mValid = FALSE;
+ node->mValid = false;
return true;
}
} func;
@@ -5211,46 +5218,57 @@ void LLSelectMgr::saveSelectedObjectTransform(EActionType action_type)
{
return true; // skip
}
- selectNode->mSavedPositionLocal = object->getPosition();
- if (object->isAttachment())
- {
- if (object->isRootEdit())
- {
- LLXform* parent_xform = object->mDrawable->getXform()->getParent();
- if (parent_xform)
- {
- selectNode->mSavedPositionGlobal = gAgent.getPosGlobalFromAgent((object->getPosition() * parent_xform->getWorldRotation()) + parent_xform->getWorldPosition());
- }
- else
- {
- selectNode->mSavedPositionGlobal = object->getPositionGlobal();
- }
- }
- else
- {
- LLViewerObject* attachment_root = (LLViewerObject*)object->getParent();
- LLXform* parent_xform = attachment_root ? attachment_root->mDrawable->getXform()->getParent() : NULL;
- if (parent_xform)
- {
- LLVector3 root_pos = (attachment_root->getPosition() * parent_xform->getWorldRotation()) + parent_xform->getWorldPosition();
- LLQuaternion root_rot = (attachment_root->getRotation() * parent_xform->getWorldRotation());
- selectNode->mSavedPositionGlobal = gAgent.getPosGlobalFromAgent((object->getPosition() * root_rot) + root_pos);
- }
- else
- {
- selectNode->mSavedPositionGlobal = object->getPositionGlobal();
- }
- }
- selectNode->mSavedRotation = object->getRenderRotation();
- }
- else
- {
- selectNode->mSavedPositionGlobal = object->getPositionGlobal();
- selectNode->mSavedRotation = object->getRotationRegion();
- }
-
- selectNode->mSavedScale = object->getScale();
- selectNode->saveTextureScaleRatios(mManager->mTextureChannel);
+
+ if (selectNode->mSelectedGLTFNode != -1)
+ {
+ // save GLTF node state
+ object->getGLTFNodeTransformAgent(selectNode->mSelectedGLTFNode, &selectNode->mSavedPositionLocal, &selectNode->mSavedRotation, &selectNode->mSavedScale);
+ selectNode->mSavedPositionGlobal = gAgent.getPosGlobalFromAgent(selectNode->mSavedPositionLocal);
+ selectNode->mLastMoveLocal.setZero();
+ }
+ else
+ {
+ selectNode->mSavedPositionLocal = object->getPosition();
+ if (object->isAttachment())
+ {
+ if (object->isRootEdit())
+ {
+ LLXform* parent_xform = object->mDrawable->getXform()->getParent();
+ if (parent_xform)
+ {
+ selectNode->mSavedPositionGlobal = gAgent.getPosGlobalFromAgent((object->getPosition() * parent_xform->getWorldRotation()) + parent_xform->getWorldPosition());
+ }
+ else
+ {
+ selectNode->mSavedPositionGlobal = object->getPositionGlobal();
+ }
+ }
+ else
+ {
+ LLViewerObject* attachment_root = (LLViewerObject*)object->getParent();
+ LLXform* parent_xform = attachment_root ? attachment_root->mDrawable->getXform()->getParent() : NULL;
+ if (parent_xform)
+ {
+ LLVector3 root_pos = (attachment_root->getPosition() * parent_xform->getWorldRotation()) + parent_xform->getWorldPosition();
+ LLQuaternion root_rot = (attachment_root->getRotation() * parent_xform->getWorldRotation());
+ selectNode->mSavedPositionGlobal = gAgent.getPosGlobalFromAgent((object->getPosition() * root_rot) + root_pos);
+ }
+ else
+ {
+ selectNode->mSavedPositionGlobal = object->getPositionGlobal();
+ }
+ }
+ selectNode->mSavedRotation = object->getRenderRotation();
+ }
+ else
+ {
+ selectNode->mSavedPositionGlobal = object->getPositionGlobal();
+ selectNode->mSavedRotation = object->getRotationRegion();
+ }
+
+ selectNode->mSavedScale = object->getScale();
+ selectNode->saveTextureScaleRatios(mManager->mTextureChannel);
+ }
return true;
}
} func(action_type, this);
@@ -5261,9 +5279,9 @@ void LLSelectMgr::saveSelectedObjectTransform(EActionType action_type)
struct LLSelectMgrApplyFlags : public LLSelectedObjectFunctor
{
- LLSelectMgrApplyFlags(U32 flags, BOOL state) : mFlags(flags), mState(state) {}
+ LLSelectMgrApplyFlags(U32 flags, bool state) : mFlags(flags), mState(state) {}
U32 mFlags;
- BOOL mState;
+ bool mState;
virtual bool apply(LLViewerObject* object)
{
if ( object->permModify())
@@ -5282,19 +5300,19 @@ struct LLSelectMgrApplyFlags : public LLSelectedObjectFunctor
}
};
-void LLSelectMgr::selectionUpdatePhysics(BOOL physics)
+void LLSelectMgr::selectionUpdatePhysics(bool physics)
{
LLSelectMgrApplyFlags func( FLAGS_USE_PHYSICS, physics);
getSelection()->applyToObjects(&func);
}
-void LLSelectMgr::selectionUpdateTemporary(BOOL is_temporary)
+void LLSelectMgr::selectionUpdateTemporary(bool is_temporary)
{
LLSelectMgrApplyFlags func( FLAGS_TEMPORARY_ON_REZ, is_temporary);
getSelection()->applyToObjects(&func);
}
-void LLSelectMgr::selectionUpdatePhantom(BOOL is_phantom)
+void LLSelectMgr::selectionUpdatePhantom(bool is_phantom)
{
LLSelectMgrApplyFlags func( FLAGS_PHANTOM, is_phantom);
getSelection()->applyToObjects(&func);
@@ -5365,7 +5383,7 @@ void LLSelectMgr::packDuplicateHeader(void* data)
// static
void LLSelectMgr::packDeleteHeader(void* userdata)
{
- BOOL force = (BOOL)(intptr_t)userdata;
+ bool force = (bool)(intptr_t)userdata;
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
@@ -5579,7 +5597,7 @@ void LLSelectMgr::sendListToRegions(LLObjectSelectionHandle selected_handle,
{
if (node->getObject())
{
- BOOL is_root = node->getObject()->isRootEdit();
+ bool is_root = node->getObject()->isRootEdit();
if ((mRoots && is_root) || (!mRoots && !is_root))
{
nodes_to_send.push(node);
@@ -5589,8 +5607,8 @@ void LLSelectMgr::sendListToRegions(LLObjectSelectionHandle selected_handle,
}
};
struct push_all pushall(nodes_to_send);
- struct push_some pushroots(nodes_to_send, TRUE);
- struct push_some pushnonroots(nodes_to_send, FALSE);
+ struct push_some pushroots(nodes_to_send, true);
+ struct push_some pushnonroots(nodes_to_send, false);
switch(send_type)
{
@@ -5847,8 +5865,8 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data
if (save_textures)
{
- BOOL can_copy = FALSE;
- BOOL can_transfer = FALSE;
+ bool can_copy = false;
+ bool can_transfer = false;
LLAggregatePermissions::EValue value = LLAggregatePermissions::AP_NONE;
if(node->getObject()->permYouOwner())
@@ -5856,12 +5874,12 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data
value = ag_texture_perms_owner.getValue(PERM_COPY);
if (value == LLAggregatePermissions::AP_EMPTY || value == LLAggregatePermissions::AP_ALL)
{
- can_copy = TRUE;
+ can_copy = true;
}
value = ag_texture_perms_owner.getValue(PERM_TRANSFER);
if (value == LLAggregatePermissions::AP_EMPTY || value == LLAggregatePermissions::AP_ALL)
{
- can_transfer = TRUE;
+ can_transfer = true;
}
}
else
@@ -5869,12 +5887,12 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data
value = ag_texture_perms.getValue(PERM_COPY);
if (value == LLAggregatePermissions::AP_EMPTY || value == LLAggregatePermissions::AP_ALL)
{
- can_copy = TRUE;
+ can_copy = true;
}
value = ag_texture_perms.getValue(PERM_TRANSFER);
if (value == LLAggregatePermissions::AP_EMPTY || value == LLAggregatePermissions::AP_ALL)
{
- can_transfer = TRUE;
+ can_transfer = true;
}
}
@@ -5914,7 +5932,7 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data
}
}
- node->mValid = TRUE;
+ node->mValid = true;
node->mPermissions->init(creator_id, owner_id,
last_owner_id, group_id);
node->mPermissions->initMasks(base_mask, owner_mask, everyone_mask, group_mask, next_owner_mask);
@@ -6008,7 +6026,7 @@ void LLSelectMgr::processObjectPropertiesFamily(LLMessageSystem* msg, void** use
if (node)
{
- node->mValid = TRUE;
+ node->mValid = true;
node->mPermissions->init(LLUUID::null, owner_id,
last_owner_id, group_id);
node->mPermissions->initMasks(base_mask, owner_mask, everyone_mask, group_mask, next_owner_mask);
@@ -6025,7 +6043,7 @@ void LLSelectMgr::processObjectPropertiesFamily(LLMessageSystem* msg, void** use
// static
void LLSelectMgr::processForceObjectSelect(LLMessageSystem* msg, void**)
{
- BOOL reset_list;
+ bool reset_list;
msg->getBOOL("Header", "ResetList", reset_list);
if (reset_list)
@@ -6070,7 +6088,7 @@ void LLSelectMgr::updateSilhouettes()
if (!mSilhouetteImagep)
{
- mSilhouetteImagep = LLViewerTextureManager::getFetchedTextureFromFile("silhouette.j2c", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI);
+ mSilhouetteImagep = LLViewerTextureManager::getFetchedTextureFromFile("silhouette.j2c", FTT_LOCAL_FILE, true, LLGLTexture::BOOST_UI);
}
mHighlightedObjects->cleanupNodes();
@@ -6106,7 +6124,7 @@ void LLSelectMgr::updateSilhouettes()
// persists from frame to frame to avoid regenerating object silhouettes
// mHighlightedObjects includes all siblings of rect selected objects
- BOOL select_linked_set = !gSavedSettings.getBOOL("EditLinkedParts");
+ bool select_linked_set = !gSavedSettings.getBOOL("EditLinkedParts");
// generate list of roots from current object selection
for (std::set<LLPointer<LLViewerObject> >::iterator iter = mRectSelectedObjects.begin();
@@ -6183,12 +6201,12 @@ void LLSelectMgr::updateSilhouettes()
continue;
}
- LLSelectNode* rect_select_root_node = new LLSelectNode(objectp, TRUE);
- rect_select_root_node->selectAllTEs(TRUE);
+ LLSelectNode* rect_select_root_node = new LLSelectNode(objectp, true);
+ rect_select_root_node->selectAllTEs(true);
if (!select_linked_set)
{
- rect_select_root_node->mIndividualSelection = TRUE;
+ rect_select_root_node->mIndividualSelection = true;
}
else
{
@@ -6203,8 +6221,8 @@ void LLSelectMgr::updateSilhouettes()
continue;
}
- LLSelectNode* rect_select_node = new LLSelectNode(child_objectp, TRUE);
- rect_select_node->selectAllTEs(TRUE);
+ LLSelectNode* rect_select_node = new LLSelectNode(child_objectp, true);
+ rect_select_node->selectAllTEs(true);
mHighlightedObjects->addNodeAtEnd(rect_select_node);
}
}
@@ -6216,7 +6234,7 @@ void LLSelectMgr::updateSilhouettes()
num_sils_genned = 0;
// render silhouettes for highlighted objects
- //BOOL subtracting_from_selection = (gKeyboard->currentMask(TRUE) == MASK_CONTROL);
+ //bool subtracting_from_selection = (gKeyboard->currentMask(true) == MASK_CONTROL);
for (S32 pass = 0; pass < 2; pass++)
{
for (LLObjectSelection::iterator iter = mHighlightedObjects->begin();
@@ -6228,8 +6246,8 @@ void LLSelectMgr::updateSilhouettes()
continue;
// do roots first, then children so that root flags are cleared ASAP
- BOOL roots_only = (pass == 0);
- BOOL is_root = objectp->isRootEdit();
+ bool roots_only = (pass == 0);
+ bool is_root = objectp->isRootEdit();
if (roots_only != is_root)
{
continue;
@@ -6303,8 +6321,8 @@ void LLSelectMgr::updateSelectionSilhouette(LLObjectSelectionHandle object_handl
if (!objectp)
continue;
// do roots first, then children so that root flags are cleared ASAP
- BOOL roots_only = (pass == 0);
- BOOL is_root = (objectp->isRootEdit());
+ bool roots_only = (pass == 0);
+ bool is_root = (objectp->isRootEdit());
if (roots_only != is_root || objectp->mDrawable.isNull())
{
continue;
@@ -6334,7 +6352,7 @@ void LLSelectMgr::updateSelectionSilhouette(LLObjectSelectionHandle object_handl
}
}
}
-void LLSelectMgr::renderSilhouettes(BOOL for_hud)
+void LLSelectMgr::renderSilhouettes(bool for_hud)
{
if (!mRenderSilhouettes || !mRenderHighlightSelections)
{
@@ -6387,7 +6405,7 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
- BOOL is_hud_object = objectp->isHUDAttachment();
+ bool is_hud_object = objectp->isHUDAttachment();
if (!is_hud_object)
{
@@ -6507,8 +6525,8 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
}
else if (node->isTransient())
{
- BOOL oldHidden = LLSelectMgr::sRenderHiddenSelections;
- LLSelectMgr::sRenderHiddenSelections = FALSE;
+ bool oldHidden = LLSelectMgr::sRenderHiddenSelections;
+ LLSelectMgr::sRenderHiddenSelections = false;
node->renderOneSilhouette(sContextSilhouetteColor);
LLSelectMgr::sRenderHiddenSelections = oldHidden;
}
@@ -6528,7 +6546,7 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
if (mHighlightedObjects->getNumNodes())
{
// render silhouettes for highlighted objects
- BOOL subtracting_from_selection = (gKeyboard->currentMask(TRUE) == MASK_CONTROL);
+ bool subtracting_from_selection = (gKeyboard->currentMask(true) == MASK_CONTROL);
for (S32 pass = 0; pass < 2; pass++)
{
for (LLObjectSelection::iterator iter = mHighlightedObjects->begin();
@@ -6589,15 +6607,15 @@ void LLSelectMgr::generateSilhouette(LLSelectNode* nodep, const LLVector3& view_
//
// Utility classes
//
-LLSelectNode::LLSelectNode(LLViewerObject* object, BOOL glow)
+LLSelectNode::LLSelectNode(LLViewerObject* object, bool glow)
: mObject(object),
- mIndividualSelection(FALSE),
- mTransient(FALSE),
- mValid(FALSE),
+ mIndividualSelection(false),
+ mTransient(false),
+ mValid(false),
mPermissions(new LLPermissions()),
mInventorySerial(0),
- mSilhouetteExists(FALSE),
- mDuplicated(FALSE),
+ mSilhouetteExists(false),
+ mDuplicated(false),
mTESelectMask(0),
mLastTESelected(0),
mName(LLStringUtil::null),
@@ -6682,18 +6700,17 @@ LLSelectNode::~LLSelectNode()
}
}
-
- delete mPermissions;
+ delete mPermissions;
mPermissions = NULL;
}
-void LLSelectNode::selectAllTEs(BOOL b)
+void LLSelectNode::selectAllTEs(bool b)
{
mTESelectMask = b ? TE_SELECT_MASK_ALL : 0x0;
mLastTESelected = 0;
}
-void LLSelectNode::selectTE(S32 te_index, BOOL selected)
+void LLSelectNode::selectTE(S32 te_index, bool selected)
{
if (te_index < 0 || te_index >= SELECT_MAX_TES)
{
@@ -6711,11 +6728,22 @@ void LLSelectNode::selectTE(S32 te_index, BOOL selected)
mLastTESelected = te_index;
}
-BOOL LLSelectNode::isTESelected(S32 te_index) const
+void LLSelectNode::selectGLTFNode(S32 node_index, S32 primitive_index, bool selected)
+{
+ if (node_index < 0)
+ {
+ return;
+ }
+
+ mSelectedGLTFNode = node_index;
+ mSelectedGLTFPrimitive = primitive_index;
+}
+
+bool LLSelectNode::isTESelected(S32 te_index) const
{
if (te_index < 0 || te_index >= mObject->getNumTEs())
{
- return FALSE;
+ return false;
}
return (mTESelectMask & (0x1 << te_index)) != 0;
}
@@ -6858,17 +6886,17 @@ void LLSelectNode::saveTextureScaleRatios(LLRender::eTexIndex index_to_query)
// This implementation should be similar to LLTask::allowOperationOnTask
-BOOL LLSelectNode::allowOperationOnNode(PermissionBit op, U64 group_proxy_power) const
+bool LLSelectNode::allowOperationOnNode(PermissionBit op, U64 group_proxy_power) const
{
// Extract ownership.
- BOOL object_is_group_owned = FALSE;
+ bool object_is_group_owned = false;
LLUUID object_owner_id;
mPermissions->getOwnership(object_owner_id, object_is_group_owned);
// Operations on invalid or public objects is not allowed.
if (!mObject || (mObject->isDead()) || !mPermissions->isOwned())
{
- return FALSE;
+ return false;
}
// The transfer permissions can never be given through proxy.
@@ -6878,7 +6906,7 @@ BOOL LLSelectNode::allowOperationOnNode(PermissionBit op, U64 group_proxy_power)
if ( !object_is_group_owned
&& (gAgent.getID() == object_owner_id) )
{
- return TRUE;
+ return true;
}
else
{
@@ -6894,7 +6922,7 @@ BOOL LLSelectNode::allowOperationOnNode(PermissionBit op, U64 group_proxy_power)
// no proxy allowed.
if (mObject->isAttachment() && object_owner_id != gAgent.getID())
{
- return FALSE;
+ return false;
}
}
@@ -6907,7 +6935,7 @@ BOOL LLSelectNode::allowOperationOnNode(PermissionBit op, U64 group_proxy_power)
// Gods can always operate.
if (gAgent.isGodlike())
{
- return TRUE;
+ return true;
}
// Check if the agent is in the same group as the object.
@@ -6942,7 +6970,7 @@ BOOL LLSelectNode::allowOperationOnNode(PermissionBit op, U64 group_proxy_power)
if (PERM_OWNER == op)
{
// This this was just a check for ownership, we can now return the answer.
- return (proxy_agent_id == object_owner_id ? TRUE : FALSE);
+ return (proxy_agent_id == object_owner_id ? true : false);
}
// check permissions to see if the agent can operate
@@ -6979,7 +7007,7 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color)
return;
}
- BOOL is_hud_object = objectp->isHUDAttachment();
+ bool is_hud_object = objectp->isHUDAttachment();
if (mSilhouetteVertices.size() == 0 || mSilhouetteNormals.size() != mSilhouetteVertices.size())
{
@@ -7216,7 +7244,7 @@ void LLSelectMgr::updateSelectionCenter()
// nothing selected, probably grabbing
// Ignore by setting to avatar origin.
mSelectionCenterGlobal.clearVec();
- mShowSelection = FALSE;
+ mShowSelection = false;
mSelectionBBox = LLBBox();
resetAgentHUDZoom();
}
@@ -7230,7 +7258,7 @@ void LLSelectMgr::updateSelectionCenter()
resetAgentHUDZoom();
}
- mShowSelection = FALSE;
+ mShowSelection = false;
LLBBox bbox;
// have stuff selected
@@ -7239,7 +7267,7 @@ void LLSelectMgr::updateSelectionCenter()
// Initialize the bounding box to the root prim, so the BBox orientation
// matches the root prim's (affecting the orientation of the manipulators).
- bbox.addBBoxAgent( (mSelectedObjects->getFirstRootObject(TRUE))->getBoundingBoxAgent() );
+ bbox.addBBoxAgent( (mSelectedObjects->getFirstRootObject(true))->getBoundingBoxAgent() );
for (LLObjectSelection::iterator iter = mSelectedObjects->begin();
iter != mSelectedObjects->end(); iter++)
@@ -7254,7 +7282,7 @@ void LLSelectMgr::updateSelectionCenter()
!root->isChild(gAgentAvatarp) && // not the object you're sitting on
!object->isAvatar()) // not another avatar
{
- mShowSelection = TRUE;
+ mShowSelection = true;
}
bbox.addBBoxAgent( object->getBoundingBoxAgent() );
@@ -7397,7 +7425,7 @@ LLBBox LLSelectMgr::getBBoxOfSelection() const
//-----------------------------------------------------------------------------
// canUndo()
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::canUndo() const
+bool LLSelectMgr::canUndo() const
{
// Can edit or can move
return const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstUndoEnabledObject() != NULL; // HACK: casting away constness - MG;
@@ -7408,7 +7436,7 @@ BOOL LLSelectMgr::canUndo() const
//-----------------------------------------------------------------------------
void LLSelectMgr::undo()
{
- BOOL select_linked_set = !gSavedSettings.getBOOL("EditLinkedParts");
+ bool select_linked_set = !gSavedSettings.getBOOL("EditLinkedParts");
LLUUID group_id(gAgent.getGroupID());
sendListToRegions("Undo", packAgentAndSessionAndGroupID, packObjectID, logNoOp, &group_id, select_linked_set ? SEND_ONLY_ROOTS : SEND_CHILDREN_FIRST);
}
@@ -7416,7 +7444,7 @@ void LLSelectMgr::undo()
//-----------------------------------------------------------------------------
// canRedo()
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::canRedo() const
+bool LLSelectMgr::canRedo() const
{
return const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstEditableObject() != NULL; // HACK: casting away constness - MG
}
@@ -7426,7 +7454,7 @@ BOOL LLSelectMgr::canRedo() const
//-----------------------------------------------------------------------------
void LLSelectMgr::redo()
{
- BOOL select_linked_set = !gSavedSettings.getBOOL("EditLinkedParts");
+ bool select_linked_set = !gSavedSettings.getBOOL("EditLinkedParts");
LLUUID group_id(gAgent.getGroupID());
sendListToRegions("Redo", packAgentAndSessionAndGroupID, packObjectID, logNoOp, &group_id, select_linked_set ? SEND_ONLY_ROOTS : SEND_CHILDREN_FIRST);
}
@@ -7434,7 +7462,7 @@ void LLSelectMgr::redo()
//-----------------------------------------------------------------------------
// canDoDelete()
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::canDoDelete() const
+bool LLSelectMgr::canDoDelete() const
{
bool can_delete = false;
// This function is "logically const" - it does not change state in
@@ -7465,7 +7493,7 @@ void LLSelectMgr::doDelete()
//-----------------------------------------------------------------------------
// canDeselect()
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::canDeselect() const
+bool LLSelectMgr::canDeselect() const
{
return !mSelectedObjects->isEmpty();
}
@@ -7480,7 +7508,7 @@ void LLSelectMgr::deselect()
//-----------------------------------------------------------------------------
// canDuplicate()
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::canDuplicate() const
+bool LLSelectMgr::canDuplicate() const
{
return const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstCopyableObject() != NULL; // HACK: casting away constness - MG
}
@@ -7490,7 +7518,7 @@ BOOL LLSelectMgr::canDuplicate() const
void LLSelectMgr::duplicate()
{
LLVector3 offset(0.5f, 0.5f, 0.f);
- selectDuplicate(offset, TRUE);
+ selectDuplicate(offset, true);
}
ESelectType LLSelectMgr::getSelectTypeForObject(LLViewerObject* object)
@@ -7529,17 +7557,17 @@ void LLSelectMgr::validateSelection()
getSelection()->applyToObjects(&func);
}
-BOOL LLSelectMgr::canSelectObject(LLViewerObject* object, BOOL ignore_select_owned)
+bool LLSelectMgr::canSelectObject(LLViewerObject* object, bool ignore_select_owned)
{
// Never select dead objects
if (!object || object->isDead())
{
- return FALSE;
+ return false;
}
if (mForceSelection)
{
- return TRUE;
+ return true;
}
if(!ignore_select_owned)
@@ -7548,26 +7576,26 @@ BOOL LLSelectMgr::canSelectObject(LLViewerObject* object, BOOL ignore_select_own
(gSavedSettings.getBOOL("SelectMovableOnly") && (!object->permMove() || object->isPermanentEnforced())))
{
// only select my own objects
- return FALSE;
+ return false;
}
}
// Can't select orphans
- if (object->isOrphaned()) return FALSE;
+ if (object->isOrphaned()) return false;
// Can't select avatars
- if (object->isAvatar()) return FALSE;
+ if (object->isAvatar()) return false;
// Can't select land
- if (object->getPCode() == LLViewerObject::LL_VO_SURFACE_PATCH) return FALSE;
+ if (object->getPCode() == LLViewerObject::LL_VO_SURFACE_PATCH) return false;
ESelectType selection_type = getSelectTypeForObject(object);
- if (mSelectedObjects->getObjectCount() > 0 && mSelectedObjects->mSelectType != selection_type) return FALSE;
+ if (mSelectedObjects->getObjectCount() > 0 && mSelectedObjects->mSelectType != selection_type) return false;
- return TRUE;
+ return true;
}
-BOOL LLSelectMgr::setForceSelection(BOOL force)
+bool LLSelectMgr::setForceSelection(bool force)
{
std::swap(mForceSelection,force);
return force;
@@ -7701,7 +7729,7 @@ LLSelectNode* LLObjectSelection::findNode(LLViewerObject* objectp)
//-----------------------------------------------------------------------------
// isEmpty()
//-----------------------------------------------------------------------------
-BOOL LLObjectSelection::isEmpty() const
+bool LLObjectSelection::isEmpty() const
{
return (mList.size() == 0);
}
@@ -8091,9 +8119,9 @@ bool LLObjectSelection::applyToRootNodes(LLSelectedNodeFunctor *func, bool first
return result;
}
-BOOL LLObjectSelection::isMultipleTESelected()
+bool LLObjectSelection::isMultipleTESelected()
{
- BOOL te_selected = FALSE;
+ bool te_selected = false;
// ...all faces
for (LLObjectSelection::iterator iter = begin();
iter != end(); iter++)
@@ -8105,19 +8133,19 @@ BOOL LLObjectSelection::isMultipleTESelected()
{
if(te_selected)
{
- return TRUE;
+ return true;
}
- te_selected = TRUE;
+ te_selected = true;
}
}
}
- return FALSE;
+ return false;
}
//-----------------------------------------------------------------------------
// contains()
//-----------------------------------------------------------------------------
-BOOL LLObjectSelection::contains(LLViewerObject* object)
+bool LLObjectSelection::contains(LLViewerObject* object)
{
return findNode(object) != NULL;
}
@@ -8126,7 +8154,7 @@ BOOL LLObjectSelection::contains(LLViewerObject* object)
//-----------------------------------------------------------------------------
// contains()
//-----------------------------------------------------------------------------
-BOOL LLObjectSelection::contains(LLViewerObject* object, S32 te)
+bool LLObjectSelection::contains(LLViewerObject* object, S32 te)
{
if (te == SELECT_ALL_TES)
{
@@ -8140,10 +8168,10 @@ BOOL LLObjectSelection::contains(LLViewerObject* object, S32 te)
// Optimization
if (nodep->getTESelectMask() == TE_SELECT_MASK_ALL)
{
- return TRUE;
+ return true;
}
- BOOL all_selected = TRUE;
+ bool all_selected = true;
for (S32 i = 0; i < object->getNumTEs(); i++)
{
all_selected = all_selected && nodep->isTESelected(i);
@@ -8151,7 +8179,7 @@ BOOL LLObjectSelection::contains(LLViewerObject* object, S32 te)
return all_selected;
}
}
- return FALSE;
+ return false;
}
else
{
@@ -8161,15 +8189,15 @@ BOOL LLObjectSelection::contains(LLViewerObject* object, S32 te)
LLSelectNode* nodep = *iter;
if (nodep->getObject() == object && nodep->isTESelected(te))
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
}
-// returns TRUE is any node is currenly worn as an attachment
-BOOL LLObjectSelection::isAttachment()
+// returns true is any node is currenly worn as an attachment
+bool LLObjectSelection::isAttachment()
{
return (mSelectType == SELECT_TYPE_ATTACHMENT || mSelectType == SELECT_TYPE_HUD);
}
@@ -8210,7 +8238,7 @@ LLSelectNode* LLObjectSelection::getFirstNode(LLSelectedNodeFunctor* func)
return NULL;
}
-LLSelectNode* LLObjectSelection::getFirstRootNode(LLSelectedNodeFunctor* func, BOOL non_root_ok)
+LLSelectNode* LLObjectSelection::getFirstRootNode(LLSelectedNodeFunctor* func, bool non_root_ok)
{
for (root_iterator iter = root_begin(); iter != root_end(); ++iter)
{
@@ -8232,7 +8260,7 @@ LLSelectNode* LLObjectSelection::getFirstRootNode(LLSelectedNodeFunctor* func, B
//-----------------------------------------------------------------------------
// getFirstSelectedObject
//-----------------------------------------------------------------------------
-LLViewerObject* LLObjectSelection::getFirstSelectedObject(LLSelectedNodeFunctor* func, BOOL get_parent)
+LLViewerObject* LLObjectSelection::getFirstSelectedObject(LLSelectedNodeFunctor* func, bool get_parent)
{
LLSelectNode* res = getFirstNode(func);
if (res && get_parent)
@@ -8258,7 +8286,7 @@ LLViewerObject* LLObjectSelection::getFirstObject()
//-----------------------------------------------------------------------------
// getFirstRootObject()
//-----------------------------------------------------------------------------
-LLViewerObject* LLObjectSelection::getFirstRootObject(BOOL non_root_ok)
+LLViewerObject* LLObjectSelection::getFirstRootObject(bool non_root_ok)
{
LLSelectNode* res = getFirstRootNode(NULL, non_root_ok);
return res ? res->getObject() : NULL;
@@ -8267,7 +8295,7 @@ LLViewerObject* LLObjectSelection::getFirstRootObject(BOOL non_root_ok)
//-----------------------------------------------------------------------------
// getFirstMoveableNode()
//-----------------------------------------------------------------------------
-LLSelectNode* LLObjectSelection::getFirstMoveableNode(BOOL get_root_first)
+LLSelectNode* LLObjectSelection::getFirstMoveableNode(bool get_root_first)
{
struct f : public LLSelectedNodeFunctor
{
@@ -8277,14 +8305,14 @@ LLSelectNode* LLObjectSelection::getFirstMoveableNode(BOOL get_root_first)
return obj && obj->permMove() && !obj->isPermanentEnforced();
}
} func;
- LLSelectNode* res = get_root_first ? getFirstRootNode(&func, TRUE) : getFirstNode(&func);
+ LLSelectNode* res = get_root_first ? getFirstRootNode(&func, true) : getFirstNode(&func);
return res;
}
//-----------------------------------------------------------------------------
// getFirstCopyableObject()
//-----------------------------------------------------------------------------
-LLViewerObject* LLObjectSelection::getFirstCopyableObject(BOOL get_parent)
+LLViewerObject* LLObjectSelection::getFirstCopyableObject(bool get_parent)
{
struct f : public LLSelectedNodeFunctor
{
@@ -8332,7 +8360,7 @@ LLViewerObject* LLObjectSelection::getFirstDeleteableObject()
//-----------------------------------------------------------------------------
// getFirstEditableObject()
//-----------------------------------------------------------------------------
-LLViewerObject* LLObjectSelection::getFirstEditableObject(BOOL get_parent)
+LLViewerObject* LLObjectSelection::getFirstEditableObject(bool get_parent)
{
struct f : public LLSelectedNodeFunctor
{
@@ -8348,7 +8376,7 @@ LLViewerObject* LLObjectSelection::getFirstEditableObject(BOOL get_parent)
//-----------------------------------------------------------------------------
// getFirstMoveableObject()
//-----------------------------------------------------------------------------
-LLViewerObject* LLObjectSelection::getFirstMoveableObject(BOOL get_parent)
+LLViewerObject* LLObjectSelection::getFirstMoveableObject(bool get_parent)
{
struct f : public LLSelectedNodeFunctor
{
@@ -8364,7 +8392,7 @@ LLViewerObject* LLObjectSelection::getFirstMoveableObject(BOOL get_parent)
//-----------------------------------------------------------------------------
// getFirstUndoEnabledObject()
//-----------------------------------------------------------------------------
-LLViewerObject* LLObjectSelection::getFirstUndoEnabledObject(BOOL get_parent)
+LLViewerObject* LLObjectSelection::getFirstUndoEnabledObject(bool get_parent)
{
struct f : public LLSelectedNodeFunctor
{
@@ -8498,7 +8526,7 @@ bool LLSelectMgr::selectionMove(const LLVector3& displ,
if (enable_pos && enable_rot && obj->mDrawable.notNull())
{
- gPipeline.markMoved(obj->mDrawable, TRUE);
+ gPipeline.markMoved(obj->mDrawable, true);
}
}
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index f89209b437..7e6c239e89 100644
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -87,7 +87,7 @@ const S32 SELECT_ALL_TES = -1;
const S32 SELECT_MAX_TES = 32;
// Do something to all objects in the selection manager.
-// The BOOL return value can be used to indicate if all
+// The bool return value can be used to indicate if all
// objects are identical (gathering information) or if
// the operation was successful.
struct LLSelectedObjectFunctor
@@ -97,7 +97,7 @@ struct LLSelectedObjectFunctor
};
// Do something to all select nodes in the selection manager.
-// The BOOL return value can be used to indicate if all
+// The bool return value can be used to indicate if all
// objects are identical (gathering information) or if
// the operation was successful.
struct LLSelectedNodeFunctor
@@ -169,20 +169,21 @@ const S32 TE_SELECT_MASK_ALL = 0xFFFFFFFF;
class LLSelectNode
{
public:
- LLSelectNode(LLViewerObject* object, BOOL do_glow);
+ LLSelectNode(LLViewerObject* object, bool do_glow);
LLSelectNode(const LLSelectNode& nodep);
~LLSelectNode();
- void selectAllTEs(BOOL b);
- void selectTE(S32 te_index, BOOL selected);
- BOOL isTESelected(S32 te_index) const;
+ void selectAllTEs(bool b);
+ void selectTE(S32 te_index, bool selected);
+ void selectGLTFNode(S32 node_index, S32 primitive_index, bool selected);
+ bool isTESelected(S32 te_index) const;
bool hasSelectedTE() const { return TE_SELECT_MASK_ALL & mTESelectMask; }
S32 getLastSelectedTE() const;
S32 getLastOperatedTE() const { return mLastTESelected; }
S32 getTESelectMask() { return mTESelectMask; }
void renderOneSilhouette(const LLColor4 &color);
- void setTransient(BOOL transient) { mTransient = transient; }
- BOOL isTransient() const { return mTransient; }
+ void setTransient(bool transient) { mTransient = transient; }
+ bool isTransient() const { return mTransient; }
LLViewerObject* getObject();
void setObject(LLViewerObject* object);
// *NOTE: invalidate stored textures and colors when # faces change
@@ -199,13 +200,13 @@ public:
// overrides get applied in live material editor
void saveGLTFMaterials(const uuid_vec_t& materials, const gltf_materials_vec_t& override_materials);
- BOOL allowOperationOnNode(PermissionBit op, U64 group_proxy_power) const;
+ bool allowOperationOnNode(PermissionBit op, U64 group_proxy_power) const;
public:
- BOOL mIndividualSelection; // For root objects and objects individually selected
+ bool mIndividualSelection; // For root objects and objects individually selected
- BOOL mTransient;
- BOOL mValid; // is extra information valid?
+ bool mTransient;
+ bool mValid; // is extra information valid?
LLPermissions* mPermissions;
LLSaleInfo mSaleInfo;
LLAggregatePermissions mAggregatePerm;
@@ -217,12 +218,13 @@ public:
S16 mInventorySerial;
LLVector3 mSavedPositionLocal; // for interactively modifying object position
LLVector3 mLastPositionLocal;
+ LLVector3 mLastMoveLocal;
LLVector3d mSavedPositionGlobal; // for interactively modifying object position
LLVector3 mSavedScale; // for interactively modifying object scale
LLVector3 mLastScale;
LLQuaternion mSavedRotation; // for interactively modifying object rotation
LLQuaternion mLastRotation;
- BOOL mDuplicated;
+ bool mDuplicated;
LLVector3d mDuplicatePos;
LLQuaternion mDuplicateRot;
LLUUID mItemID;
@@ -239,12 +241,15 @@ public:
std::vector<LLVector3> mTextureScaleRatios;
std::vector<LLVector3> mSilhouetteVertices; // array of vertices to render silhouette of object
std::vector<LLVector3> mSilhouetteNormals; // array of normals to render silhouette of object
- BOOL mSilhouetteExists; // need to generate silhouette?
+ bool mSilhouetteExists; // need to generate silhouette?
+ S32 mSelectedGLTFNode = -1;
+ S32 mSelectedGLTFPrimitive = -1;
protected:
LLPointer<LLViewerObject> mObject;
S32 mTESelectMask;
S32 mLastTESelected;
+
};
class LLObjectSelection : public LLRefCount
@@ -311,21 +316,21 @@ public:
void updateEffects();
- BOOL isEmpty() const;
+ bool isEmpty() const;
LLSelectNode* getFirstNode(LLSelectedNodeFunctor* func = NULL);
- LLSelectNode* getFirstRootNode(LLSelectedNodeFunctor* func = NULL, BOOL non_root_ok = FALSE);
- LLViewerObject* getFirstSelectedObject(LLSelectedNodeFunctor* func, BOOL get_parent = FALSE);
+ LLSelectNode* getFirstRootNode(LLSelectedNodeFunctor* func = NULL, bool non_root_ok = false);
+ LLViewerObject* getFirstSelectedObject(LLSelectedNodeFunctor* func, bool get_parent = false);
LLViewerObject* getFirstObject();
- LLViewerObject* getFirstRootObject(BOOL non_root_ok = FALSE);
+ LLViewerObject* getFirstRootObject(bool non_root_ok = false);
- LLSelectNode* getFirstMoveableNode(BOOL get_root_first = FALSE);
+ LLSelectNode* getFirstMoveableNode(bool get_root_first = false);
- LLViewerObject* getFirstEditableObject(BOOL get_parent = FALSE);
- LLViewerObject* getFirstCopyableObject(BOOL get_parent = FALSE);
+ LLViewerObject* getFirstEditableObject(bool get_parent = false);
+ LLViewerObject* getFirstCopyableObject(bool get_parent = false);
LLViewerObject* getFirstDeleteableObject();
- LLViewerObject* getFirstMoveableObject(BOOL get_parent = FALSE);
- LLViewerObject* getFirstUndoEnabledObject(BOOL get_parent = FALSE);
+ LLViewerObject* getFirstMoveableObject(bool get_parent = false);
+ LLViewerObject* getFirstUndoEnabledObject(bool get_parent = false);
/// Return the object that lead to this selection, possible a child
LLViewerObject* getPrimaryObject() { return mPrimaryObject; }
@@ -351,19 +356,19 @@ public:
S32 getTECount();
S32 getRootObjectCount();
- BOOL isMultipleTESelected();
- BOOL contains(LLViewerObject* object);
- BOOL contains(LLViewerObject* object, S32 te);
+ bool isMultipleTESelected();
+ bool contains(LLViewerObject* object);
+ bool contains(LLViewerObject* object, S32 te);
- // returns TRUE is any node is currenly worn as an attachment
- BOOL isAttachment();
+ // returns true is any node is currenly worn as an attachment
+ bool isAttachment();
bool checkAnimatedObjectEstTris();
bool checkAnimatedObjectLinkable();
// Apply functors to various subsets of the selected objects
- // If firstonly is FALSE, returns the AND of all apply() calls.
- // Else returns TRUE immediately if any apply() call succeeds (i.e. OR with early exit)
+ // If firstonly is false, returns the AND of all apply() calls.
+ // Else returns true immediately if any apply() call succeeds (i.e. OR with early exit)
bool applyToRootObjects(LLSelectedObjectFunctor* func, bool firstonly = false);
bool applyToObjects(LLSelectedObjectFunctor* func);
bool applyToTEs(LLSelectedTEFunctor* func, bool firstonly = false);
@@ -433,9 +438,9 @@ private:
class LLSelectMgr : public LLEditMenuHandler, public LLSimpleton<LLSelectMgr>
{
public:
- static BOOL sRectSelectInclusive; // do we need to surround an object to pick it?
- static BOOL sRenderHiddenSelections; // do we show selection silhouettes that are occluded?
- static BOOL sRenderLightRadius; // do we show the radius of selected lights?
+ static bool sRectSelectInclusive; // do we need to surround an object to pick it?
+ static bool sRenderHiddenSelections; // do we show selection silhouettes that are occluded?
+ static bool sRenderLightRadius; // do we show the radius of selected lights?
static F32 sHighlightThickness;
static F32 sHighlightUScale;
@@ -463,20 +468,20 @@ public:
static void cleanupGlobals();
// LLEditMenuHandler interface
- virtual BOOL canUndo() const;
+ virtual bool canUndo() const;
virtual void undo();
- virtual BOOL canRedo() const;
+ virtual bool canRedo() const;
virtual void redo();
- virtual BOOL canDoDelete() const;
+ virtual bool canDoDelete() const;
virtual void doDelete();
virtual void deselect();
- virtual BOOL canDeselect() const;
+ virtual bool canDeselect() const;
virtual void duplicate();
- virtual BOOL canDuplicate() const;
+ virtual bool canDuplicate() const;
void clearSelections();
void update();
@@ -515,7 +520,7 @@ public:
// Returns the previous value of mForceSelection
- BOOL setForceSelection(BOOL force);
+ bool setForceSelection(bool force);
////////////////////////////////////////////////////////////////
// Selection methods
@@ -530,13 +535,13 @@ public:
//
// *NOTE: You must hold on to the object selection handle, otherwise
// the objects will be automatically deselected in 1 frame.
- LLObjectSelectionHandle selectObjectAndFamily(LLViewerObject* object, BOOL add_to_end = FALSE, BOOL ignore_select_owned = FALSE);
+ LLObjectSelectionHandle selectObjectAndFamily(LLViewerObject* object, bool add_to_end = false, bool ignore_select_owned = false);
// For when you want just a child object.
- LLObjectSelectionHandle selectObjectOnly(LLViewerObject* object, S32 face = SELECT_ALL_TES);
+ LLObjectSelectionHandle selectObjectOnly(LLViewerObject* object, S32 face = SELECT_ALL_TES, S32 gltf_node = -1, S32 gltf_primitive = -1);
// Same as above, but takes a list of objects. Used by rectangle select.
- LLObjectSelectionHandle selectObjectAndFamily(const std::vector<LLViewerObject*>& object_list, BOOL send_to_sim = TRUE);
+ LLObjectSelectionHandle selectObjectAndFamily(const std::vector<LLViewerObject*>& object_list, bool send_to_sim = true);
// converts all objects currently highlighted to a selection, and returns it
LLObjectSelectionHandle selectHighlightedObjects();
@@ -553,8 +558,8 @@ public:
// Remove
////////////////////////////////////////////////////////////////
- void deselectObjectOnly(LLViewerObject* object, BOOL send_to_sim = TRUE);
- void deselectObjectAndFamily(LLViewerObject* object, BOOL send_to_sim = TRUE, BOOL include_entire_object = FALSE);
+ void deselectObjectOnly(LLViewerObject* object, bool send_to_sim = true);
+ void deselectObjectAndFamily(LLViewerObject* object, bool send_to_sim = true, bool include_entire_object = false);
// Send deselect messages to simulator, then clear the list
void deselectAll();
@@ -573,7 +578,7 @@ public:
void unhighlightObjectAndFamily(LLViewerObject *objectp);
void unhighlightAll();
- BOOL removeObjectFromSelections(const LLUUID &id);
+ bool removeObjectFromSelections(const LLUUID &id);
////////////////////////////////////////////////////////////////
// Selection editing
@@ -605,10 +610,10 @@ public:
EGridMode getGridMode() { return mGridMode; }
void getGrid(LLVector3& origin, LLQuaternion& rotation, LLVector3 &scale, bool for_snap_guides = false);
- BOOL getTEMode() const { return mTEMode; }
- void setTEMode(BOOL b) { mTEMode = b; }
+ bool getTEMode() const { return mTEMode; }
+ void setTEMode(bool b) { mTEMode = b; }
- BOOL shouldShowSelection() const { return mShowSelection; }
+ bool shouldShowSelection() const { return mShowSelection; }
LLBBox getBBoxOfSelection() const;
LLBBox getSavedBBoxOfSelection() const { return mSavedSelectionBBox; }
@@ -617,8 +622,8 @@ public:
void cleanup();
void updateSilhouettes();
- void renderSilhouettes(BOOL for_hud);
- void enableSilhouette(BOOL enable) { mRenderSilhouettes = enable; }
+ void renderSilhouettes(bool for_hud);
+ void enableSilhouette(bool enable) { mRenderSilhouettes = enable; }
////////////////////////////////////////////////////////////////
// Utility functions that operate on the current selection
@@ -628,15 +633,15 @@ public:
void saveSelectedShinyColors();
void saveSelectedObjectTextures();
- void selectionUpdatePhysics(BOOL use_physics);
- void selectionUpdateTemporary(BOOL is_temporary);
- void selectionUpdatePhantom(BOOL is_ghost);
+ void selectionUpdatePhysics(bool use_physics);
+ void selectionUpdateTemporary(bool is_temporary);
+ void selectionUpdatePhantom(bool is_ghost);
void selectionDump();
- BOOL selectionAllPCode(LLPCode code); // all objects have this PCode
- BOOL selectionGetClickAction(U8 *out_action);
+ bool selectionAllPCode(LLPCode code); // all objects have this PCode
+ bool selectionGetClickAction(U8 *out_action);
bool selectionGetIncludeInSearch(bool* include_in_search_out); // true if all selected objects have same
- BOOL selectionGetGlow(F32 *glow);
+ bool selectionGetGlow(F32 *glow);
void selectionSetPhysicsType(U8 type);
void selectionSetGravity(F32 gravity);
@@ -651,7 +656,7 @@ public:
void selectionSetAlphaOnly(const F32 alpha); // Set only the alpha channel
void selectionRevertColors();
void selectionRevertShinyColors();
- BOOL selectionRevertTextures();
+ bool selectionRevertTextures();
void selectionRevertGLTFMaterials();
void selectionSetBumpmap( U8 bumpmap, const LLUUID &image_id );
void selectionSetTexGen( U8 texgen );
@@ -664,14 +669,14 @@ public:
void selectionSetMaterialParams(LLSelectedTEMaterialFunctor* material_func, int specific_te = -1);
void selectionRemoveMaterial();
- void selectionSetObjectPermissions(U8 perm_field, BOOL set, U32 perm_mask, BOOL override = FALSE);
+ void selectionSetObjectPermissions(U8 perm_field, bool set, U32 perm_mask, bool override = false);
void selectionSetObjectName(const std::string& name);
void selectionSetObjectDescription(const std::string& desc);
void selectionSetObjectCategory(const LLCategory& category);
void selectionSetObjectSaleInfo(const LLSaleInfo& sale_info);
void selectionTexScaleAutofit(F32 repeats_per_meter);
- void adjustTexturesByScale(BOOL send_to_sim, BOOL stretch);
+ void adjustTexturesByScale(bool send_to_sim, bool stretch);
bool selectionMove(const LLVector3& displ, F32 rx, F32 ry, F32 rz,
U32 update_type);
@@ -683,116 +688,116 @@ public:
// will make sure all selected object meet current criteria, or deselect them otherwise
void validateSelection();
- // returns TRUE if it is possible to select this object
- BOOL canSelectObject(LLViewerObject* object, BOOL ignore_select_owned = FALSE);
+ // returns true if it is possible to select this object
+ bool canSelectObject(LLViewerObject* object, bool ignore_select_owned = false);
- // Returns TRUE if the viewer has information on all selected objects
- BOOL selectGetAllRootsValid();
- BOOL selectGetAllValid();
- BOOL selectGetAllValidAndObjectsFound();
+ // Returns true if the viewer has information on all selected objects
+ bool selectGetAllRootsValid();
+ bool selectGetAllValid();
+ bool selectGetAllValidAndObjectsFound();
- // returns TRUE if you can modify all selected objects.
- BOOL selectGetRootsModify();
- BOOL selectGetModify();
+ // returns true if you can modify all selected objects.
+ bool selectGetRootsModify();
+ bool selectGetModify();
- // returns TRUE if all objects are in same region
- BOOL selectGetSameRegion();
+ // returns true if all objects are in same region
+ bool selectGetSameRegion();
- // returns TRUE if is all objects are non-permanent-enforced
- BOOL selectGetRootsNonPermanentEnforced();
- BOOL selectGetNonPermanentEnforced();
+ // returns true if is all objects are non-permanent-enforced
+ bool selectGetRootsNonPermanentEnforced();
+ bool selectGetNonPermanentEnforced();
- // returns TRUE if is all objects are permanent
- BOOL selectGetRootsPermanent();
- BOOL selectGetPermanent();
+ // returns true if is all objects are permanent
+ bool selectGetRootsPermanent();
+ bool selectGetPermanent();
- // returns TRUE if is all objects are character
- BOOL selectGetRootsCharacter();
- BOOL selectGetCharacter();
+ // returns true if is all objects are character
+ bool selectGetRootsCharacter();
+ bool selectGetCharacter();
- // returns TRUE if is all objects are not permanent
- BOOL selectGetRootsNonPathfinding();
- BOOL selectGetNonPathfinding();
+ // returns true if is all objects are not permanent
+ bool selectGetRootsNonPathfinding();
+ bool selectGetNonPathfinding();
- // returns TRUE if is all objects are not permanent
- BOOL selectGetRootsNonPermanent();
- BOOL selectGetNonPermanent();
+ // returns true if is all objects are not permanent
+ bool selectGetRootsNonPermanent();
+ bool selectGetNonPermanent();
- // returns TRUE if is all objects are not character
- BOOL selectGetRootsNonCharacter();
- BOOL selectGetNonCharacter();
+ // returns true if is all objects are not character
+ bool selectGetRootsNonCharacter();
+ bool selectGetNonCharacter();
- BOOL selectGetEditableLinksets();
- BOOL selectGetViewableCharacters();
+ bool selectGetEditableLinksets();
+ bool selectGetViewableCharacters();
- // returns TRUE if selected objects can be transferred.
- BOOL selectGetRootsTransfer();
+ // returns true if selected objects can be transferred.
+ bool selectGetRootsTransfer();
- // returns TRUE if selected objects can be copied.
- BOOL selectGetRootsCopy();
+ // returns true if selected objects can be copied.
+ bool selectGetRootsCopy();
- BOOL selectGetCreator(LLUUID& id, std::string& name); // TRUE if all have same creator, returns id
- BOOL selectGetOwner(LLUUID& id, std::string& name); // TRUE if all objects have same owner, returns id
- BOOL selectGetLastOwner(LLUUID& id, std::string& name); // TRUE if all objects have same owner, returns id
+ bool selectGetCreator(LLUUID& id, std::string& name); // true if all have same creator, returns id
+ bool selectGetOwner(LLUUID& id, std::string& name); // true if all objects have same owner, returns id
+ bool selectGetLastOwner(LLUUID& id, std::string& name); // true if all objects have same owner, returns id
- // returns TRUE if all are the same. id is stuffed with
+ // returns true if all are the same. id is stuffed with
// the value found if available.
- BOOL selectGetGroup(LLUUID& id);
- BOOL selectGetPerm( U8 which_perm, U32* mask_on, U32* mask_off); // TRUE if all have data, returns two masks, each indicating which bits are all on and all off
+ bool selectGetGroup(LLUUID& id);
+ bool selectGetPerm( U8 which_perm, U32* mask_on, U32* mask_off); // true if all have data, returns two masks, each indicating which bits are all on and all off
- BOOL selectIsGroupOwned(); // TRUE if all root objects have valid data and are group owned.
+ bool selectIsGroupOwned(); // true if all root objects have valid data and are group owned.
- // returns TRUE if all the nodes are valid. Accumulates
+ // returns true if all the nodes are valid. Accumulates
// permissions in the parameter.
- BOOL selectGetPermissions(LLPermissions& perm);
+ bool selectGetPermissions(LLPermissions& perm);
- // returns TRUE if all the nodes are valid. Depends onto "edit linked" state
+ // returns true if all the nodes are valid. Depends onto "edit linked" state
// Children in linksets are a bit special - they require not only move permission
// but also modify if "edit linked" is set, since you move them relative to parent
- BOOL selectGetEditMoveLinksetPermissions(bool &move, bool &modify);
+ bool selectGetEditMoveLinksetPermissions(bool &move, bool &modify);
// Get a bunch of useful sale information for the object(s) selected.
// "_mixed" is true if not all objects have the same setting.
void selectGetAggregateSaleInfo(U32 &num_for_sale,
- BOOL &is_for_sale_mixed,
- BOOL &is_sale_price_mixed,
+ bool &is_for_sale_mixed,
+ bool &is_sale_price_mixed,
S32 &total_sale_price,
S32 &individual_sale_price);
- // returns TRUE if all nodes are valid.
- BOOL selectGetCategory(LLCategory& category);
+ // returns true if all nodes are valid.
+ bool selectGetCategory(LLCategory& category);
- // returns TRUE if all nodes are valid. method also stores an
+ // returns true if all nodes are valid. method also stores an
// accumulated sale info.
- BOOL selectGetSaleInfo(LLSaleInfo& sale_info);
+ bool selectGetSaleInfo(LLSaleInfo& sale_info);
- // returns TRUE if all nodes are valid. fills passed in object
+ // returns true if all nodes are valid. fills passed in object
// with the aggregate permissions of the selection.
- BOOL selectGetAggregatePermissions(LLAggregatePermissions& ag_perm);
+ bool selectGetAggregatePermissions(LLAggregatePermissions& ag_perm);
- // returns TRUE if all nodes are valid. fills passed in object
+ // returns true if all nodes are valid. fills passed in object
// with the aggregate permissions for texture inventory items of the selection.
- BOOL selectGetAggregateTexturePermissions(LLAggregatePermissions& ag_perm);
+ bool selectGetAggregateTexturePermissions(LLAggregatePermissions& ag_perm);
LLPermissions* findObjectPermissions(const LLViewerObject* object);
- BOOL isMovableAvatarSelected();
+ bool isMovableAvatarSelected();
void selectDelete(); // Delete on simulator
void selectForceDelete(); // just delete, no into trash
- void selectDuplicate(const LLVector3& offset, BOOL select_copy); // Duplicate on simulator
+ void selectDuplicate(const LLVector3& offset, bool select_copy); // Duplicate on simulator
void repeatDuplicate();
void selectDuplicateOnRay(const LLVector3 &ray_start_region,
const LLVector3 &ray_end_region,
- BOOL bypass_raycast,
- BOOL ray_end_is_intersection,
+ bool bypass_raycast,
+ bool ray_end_is_intersection,
const LLUUID &ray_target_id,
- BOOL copy_centers,
- BOOL copy_rotates,
- BOOL select_copy);
+ bool copy_centers,
+ bool copy_rotates,
+ bool select_copy);
void sendMultipleUpdate(U32 type); // Position, rotation, scale all in one
- void sendOwner(const LLUUID& owner_id, const LLUUID& group_id, BOOL override = FALSE);
+ void sendOwner(const LLUUID& owner_id, const LLUUID& group_id, bool override = false);
void sendGroup(const LLUUID& group_id);
// Category ID is the UUID of the folder you want to contain the purchase.
@@ -831,16 +836,16 @@ public:
// Internal list maintenance functions. TODO: Make these private!
void remove(std::vector<LLViewerObject*>& objects);
- void remove(LLViewerObject* object, S32 te = SELECT_ALL_TES, BOOL undoable = TRUE);
+ void remove(LLViewerObject* object, S32 te = SELECT_ALL_TES, bool undoable = true);
void removeAll();
- void addAsIndividual(LLViewerObject* object, S32 te = SELECT_ALL_TES, BOOL undoable = TRUE);
+ void addAsIndividual(LLViewerObject* object, S32 te = SELECT_ALL_TES, bool undoable = TRUE, S32 gltf_node = -1, S32 gltf_primitive = -1);
void promoteSelectionToRoot();
void demoteSelectionToIndividuals();
private:
void convertTransient(); // converts temporarily selected objects to full-fledged selections
ESelectType getSelectTypeForObject(LLViewerObject* object);
- void addAsFamily(std::vector<LLViewerObject*>& objects, BOOL add_to_end = FALSE);
+ void addAsFamily(std::vector<LLViewerObject*>& objects, bool add_to_end = false);
void generateSilhouette(LLSelectNode *nodep, const LLVector3& view_point);
void updateSelectionSilhouette(LLObjectSelectionHandle object_handle, S32& num_sils_genned, std::vector<LLViewerObject*>& changed_objects);
// Send one message to each region containing an object on selection list.
@@ -917,19 +922,19 @@ private:
LLVector3 mGridScale;
EGridMode mGridMode;
- BOOL mTEMode; // render te
+ bool mTEMode; // render te
LLRender::eTexIndex mTextureChannel; // diff, norm, or spec, depending on UI editing mode
LLVector3d mSelectionCenterGlobal;
LLBBox mSelectionBBox;
LLVector3d mLastSentSelectionCenterGlobal;
- BOOL mShowSelection; // do we send the selection center name value and do we animate this selection?
+ bool mShowSelection; // do we send the selection center name value and do we animate this selection?
LLVector3d mLastCameraPos; // camera position from last generation of selection silhouette
- BOOL mRenderSilhouettes; // do we render the silhouette
+ bool mRenderSilhouettes; // do we render the silhouette
LLBBox mSavedSelectionBBox;
LLFrameTimer mEffectsTimer;
- BOOL mForceSelection;
+ bool mForceSelection;
std::vector<LLAnimPauseRequest> mPauseRequests;
};
@@ -950,7 +955,7 @@ template <typename T> bool LLObjectSelection::getSelectedTEValue(LLSelectedTEGet
T selected_value = T();
// Now iterate through all TEs to test for sameness
- bool identical = TRUE;
+ bool identical = true;
for (iterator iter = begin(); iter != end(); iter++)
{
LLSelectNode* node = *iter;
@@ -1021,7 +1026,7 @@ template <typename T> bool LLObjectSelection::isMultipleTEValue(LLSelectedTEGetF
T selected_value = T();
// Now iterate through all TEs to test for sameness
- bool unique = TRUE;
+ bool unique = true;
for (iterator iter = begin(); iter != end(); iter++)
{
LLSelectNode* node = *iter;
diff --git a/indra/newview/llsetkeybinddialog.cpp b/indra/newview/llsetkeybinddialog.cpp
index 74844a80e8..1e5a67302a 100644
--- a/indra/newview/llsetkeybinddialog.cpp
+++ b/indra/newview/llsetkeybinddialog.cpp
@@ -53,11 +53,11 @@ public:
virtual ~Updater(){}
protected:
- BOOL tick()
+ bool tick()
{
mCallback(mMask);
// Deletes itseft after execution
- return TRUE;
+ return true;
}
private:
@@ -88,19 +88,19 @@ LLSetKeyBindDialog::~LLSetKeyBindDialog()
}
//virtual
-BOOL LLSetKeyBindDialog::postBuild()
+bool LLSetKeyBindDialog::postBuild()
{
childSetAction("SetEmpty", onBlank, this);
childSetAction("Default", onDefault, this);
childSetAction("Cancel", onCancel, this);
- getChild<LLUICtrl>("Cancel")->setFocus(TRUE);
+ getChild<LLUICtrl>("Cancel")->setFocus(true);
pCheckBox = getChild<LLCheckBoxCtrl>("apply_all");
pDescription = getChild<LLTextBase>("description");
- gFocusMgr.setKeystrokesOnly(TRUE);
+ gFocusMgr.setKeystrokesOnly(true);
- return TRUE;
+ return true;
}
//virtual
@@ -165,7 +165,7 @@ void LLSetKeyBindDialog::setParent(LLKeyBindResponderInterface* parent, LLView*
}
// static
-bool LLSetKeyBindDialog::recordKey(KEY key, MASK mask, BOOL down)
+bool LLSetKeyBindDialog::recordKey(KEY key, MASK mask, bool down)
{
if (sRecordKeys)
{
@@ -183,7 +183,7 @@ bool LLSetKeyBindDialog::recordKey(KEY key, MASK mask, BOOL down)
return false;
}
-bool LLSetKeyBindDialog::recordAndHandleKey(KEY key, MASK mask, BOOL down)
+bool LLSetKeyBindDialog::recordAndHandleKey(KEY key, MASK mask, bool down)
{
if ((key == 'Q' && mask == MASK_CONTROL)
|| key == KEY_ESCAPE)
@@ -217,7 +217,7 @@ bool LLSetKeyBindDialog::recordAndHandleKey(KEY key, MASK mask, BOOL down)
// Masks by themself are not allowed
return false;
}
- if (down == TRUE)
+ if (down == true)
{
// Most keys are handled on 'down' event because menu is handled on 'down'
// masks are exceptions to let other keys be handled
@@ -272,14 +272,14 @@ bool LLSetKeyBindDialog::recordAndHandleKey(KEY key, MASK mask, BOOL down)
return true;
}
-BOOL LLSetKeyBindDialog::handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClickType clicktype, BOOL down)
+bool LLSetKeyBindDialog::handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClickType clicktype, bool down)
{
- BOOL result = FALSE;
+ bool result = false;
if (!pParent)
{
// we already processed 'down' event, this is 'up', consume
closeFloater();
- result = TRUE;
+ result = true;
}
if (!result && clicktype == CLICK_LEFT)
{
@@ -294,8 +294,8 @@ BOOL LLSetKeyBindDialog::handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClic
}
if (result)
{
- setFocus(TRUE);
- gFocusMgr.setKeystrokesOnly(TRUE);
+ setFocus(true);
+ gFocusMgr.setKeystrokesOnly(true);
}
// ignore selection related combinations
else if (down && (mask & (MASK_SHIFT | MASK_CONTROL)) == 0)
@@ -305,7 +305,7 @@ BOOL LLSetKeyBindDialog::handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClic
{
// Note: default doubleclick time is 500ms, but can stretch up to 5s
pUpdater = new Updater(boost::bind(&onClickTimeout, this, _1), 0.7f, mask);
- result = TRUE;
+ result = true;
}
}
}
@@ -317,7 +317,7 @@ BOOL LLSetKeyBindDialog::handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClic
&& ((mKeyFilterMask & ALLOW_MASK_MOUSE) != 0 || mask == 0)) // reserved for selection
{
setKeyBind(clicktype, KEY_NONE, mask, pCheckBox->getValue().asBoolean());
- result = TRUE;
+ result = true;
if (!down)
{
// wait for 'up' event before closing
diff --git a/indra/newview/llsetkeybinddialog.h b/indra/newview/llsetkeybinddialog.h
index 18e2601723..57ec65f7f3 100644
--- a/indra/newview/llsetkeybinddialog.h
+++ b/indra/newview/llsetkeybinddialog.h
@@ -59,7 +59,7 @@ public:
LLSetKeyBindDialog(const LLSD& key);
~LLSetKeyBindDialog();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onOpen(const LLSD& data);
/*virtual*/ void onClose(bool app_quiting);
/*virtual*/ void draw();
@@ -68,9 +68,9 @@ public:
// Wrapper around recordAndHandleKey
// It does not record, it handles, but handleKey function is already in use
- static bool recordKey(KEY key, MASK mask, BOOL down);
+ static bool recordKey(KEY key, MASK mask, bool down);
- BOOL handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClickType clicktype, BOOL down);
+ bool handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClickType clicktype, bool down);
static void onCancel(void* user_data);
static void onBlank(void* user_data);
static void onDefault(void* user_data);
@@ -81,7 +81,7 @@ public:
class Updater;
private:
- bool recordAndHandleKey(KEY key, MASK mask, BOOL down);
+ bool recordAndHandleKey(KEY key, MASK mask, bool down);
void setKeyBind(EMouseClickType click, KEY key, MASK mask, bool all_modes);
LLKeyBindResponderInterface *pParent;
LLCheckBoxCtrl *pCheckBox;
diff --git a/indra/newview/llsettingspicker.cpp b/indra/newview/llsettingspicker.cpp
index d2d21063e7..6054bd026c 100644
--- a/indra/newview/llsettingspicker.cpp
+++ b/indra/newview/llsettingspicker.cpp
@@ -78,7 +78,7 @@ LLFloaterSettingsPicker::LLFloaterSettingsPicker(LLView * owner, LLUUID initial_
mOwnerHandle = owner->getHandle();
buildFromFile(FLOATER_DEFINITION_XML);
- setCanMinimize(FALSE);
+ setCanMinimize(false);
}
@@ -88,10 +88,10 @@ LLFloaterSettingsPicker::~LLFloaterSettingsPicker()
}
//-------------------------------------------------------------------------
-BOOL LLFloaterSettingsPicker::postBuild()
+bool LLFloaterSettingsPicker::postBuild()
{
if (!LLFloater::postBuild())
- return FALSE;
+ return false;
std::string prefix = getString(STR_TITLE_PREFIX);
std::string label = getString(STR_TITLE_SETTINGS);
@@ -115,7 +115,7 @@ BOOL LLFloaterSettingsPicker::postBuild()
// Disable auto selecting first filtered item because it takes away
// selection from the item set by LLTextureCtrl owning this floater.
- mInventoryPanel->getRootFolder()->setAutoSelectOverride(TRUE);
+ mInventoryPanel->getRootFolder()->setAutoSelectOverride(true);
// don't put keyboard focus on selected item, because the selection callback
// will assume that this was user input
@@ -127,7 +127,7 @@ BOOL LLFloaterSettingsPicker::postBuild()
getChild<LLView>(BTN_SELECT)->setEnabled(mSettingItemID.notNull());
}
- mNoCopySettingsSelected = FALSE;
+ mNoCopySettingsSelected = false;
childSetAction(BTN_CANCEL, [this](LLUICtrl*, const LLSD& param){ onButtonCancel(); });
childSetAction(BTN_SELECT, [this](LLUICtrl*, const LLSD& param){ onButtonSelect(); });
@@ -135,9 +135,9 @@ BOOL LLFloaterSettingsPicker::postBuild()
getChild<LLPanel>(PNL_COMBO)->setVisible(mTrackMode != TRACK_NONE);
// update permission filter once UI is fully initialized
- mSavedFolderState.setApply(FALSE);
+ mSavedFolderState.setApply(false);
- return TRUE;
+ return true;
}
void LLFloaterSettingsPicker::onClose(bool app_quitting)
@@ -149,7 +149,7 @@ void LLFloaterSettingsPicker::onClose(bool app_quitting)
LLView *owner = mOwnerHandle.get();
if (owner)
{
- owner->setFocus(TRUE);
+ owner->setFocus(true);
}
mSettingItemID.setNull();
mInventoryPanel->getRootFolder()->clearSelection();
@@ -218,7 +218,7 @@ void LLFloaterSettingsPicker::onFilterEdit(const std::string& search_string)
return;
}
- mSavedFolderState.setApply(TRUE);
+ mSavedFolderState.setApply(true);
mInventoryPanel->getRootFolder()->applyFunctorRecursively(mSavedFolderState);
// add folder with current item to list of previously opened folders
LLOpenFoldersWithSelection opener;
@@ -231,7 +231,7 @@ void LLFloaterSettingsPicker::onFilterEdit(const std::string& search_string)
// first letter in search term, save existing folder open state
if (!mInventoryPanel->getFilter().isNotDefault())
{
- mSavedFolderState.setApply(FALSE);
+ mSavedFolderState.setApply(false);
mInventoryPanel->getRootFolder()->applyFunctorRecursively(mSavedFolderState);
}
}
@@ -359,9 +359,9 @@ void LLFloaterSettingsPicker::onButtonSelect()
closeFloater();
}
-BOOL LLFloaterSettingsPicker::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLFloaterSettingsPicker::handleDoubleClick(S32 x, S32 y, MASK mask)
{
- BOOL result = FALSE;
+ bool result = false;
if (mSettingItemID.notNull()
&& mInventoryPanel)
{
@@ -387,7 +387,7 @@ BOOL LLFloaterSettingsPicker::handleDoubleClick(S32 x, S32 y, MASK mask)
}
closeFloater();
// hit inside panel on selected item, double click should do nothing
- result = TRUE;
+ result = true;
}
}
}
@@ -400,7 +400,7 @@ BOOL LLFloaterSettingsPicker::handleDoubleClick(S32 x, S32 y, MASK mask)
return result;
}
-BOOL LLFloaterSettingsPicker::handleKeyHere(KEY key, MASK mask)
+bool LLFloaterSettingsPicker::handleKeyHere(KEY key, MASK mask)
{
if ((key == KEY_RETURN) && (mask == MASK_NONE))
{
@@ -416,7 +416,7 @@ BOOL LLFloaterSettingsPicker::handleKeyHere(KEY key, MASK mask)
(*mCommitSignal)(this, res);
}
closeFloater();
- return TRUE;
+ return true;
}
}
diff --git a/indra/newview/llsettingspicker.h b/indra/newview/llsettingspicker.h
index 859f92fbe8..291af6a304 100644
--- a/indra/newview/llsettingspicker.h
+++ b/indra/newview/llsettingspicker.h
@@ -60,7 +60,7 @@ public:
void setActive(bool active);
- virtual BOOL postBuild() override;
+ virtual bool postBuild() override;
virtual void onClose(bool app_quitting) override;
virtual void draw() override;
@@ -107,8 +107,8 @@ private:
void onAssetLoaded(LLUUID asset_id, LLSettingsBase::ptr_t settings);
void onButtonCancel();
void onButtonSelect();
- virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask) override;
- BOOL handleKeyHere(KEY key, MASK mask) override;
+ virtual bool handleDoubleClick(S32 x, S32 y, MASK mask) override;
+ bool handleKeyHere(KEY key, MASK mask) override;
void onFocusLost() override;
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index c07c939862..acac1761a8 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -69,7 +69,7 @@
#undef VERIFY_LEGACY_CONVERSION
-extern BOOL gCubeSnapshot;
+extern bool gCubeSnapshot;
//=========================================================================
namespace
@@ -181,7 +181,7 @@ void LLSettingsVOBase::onInventoryItemCreated(const LLUUID &inventoryId, LLSetti
{
perm.setMaskEveryone(PERM_COPY);
pitem->setPermissions(perm);
- pitem->updateServer(FALSE);
+ pitem->updateServer(false);
}
}
if (!settings)
@@ -227,8 +227,8 @@ void LLSettingsVOBase::updateInventoryItem(const LLSettingsBase::ptr_t &settings
if (settings->getFlag(LLSettingsBase::FLAG_NOTRANS) && new_item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()))
{
LLPermissions perm(inv_item->getPermissions());
- perm.setBaseBits(LLUUID::null, FALSE, PERM_TRANSFER);
- perm.setOwnerBits(LLUUID::null, FALSE, PERM_TRANSFER);
+ perm.setBaseBits(LLUUID::null, false, PERM_TRANSFER);
+ perm.setOwnerBits(LLUUID::null, false, PERM_TRANSFER);
new_item->setPermissions(perm);
need_update |= true;
}
@@ -240,7 +240,7 @@ void LLSettingsVOBase::updateInventoryItem(const LLSettingsBase::ptr_t &settings
}
if (need_update)
{
- new_item->updateServer(FALSE);
+ new_item->updateServer(false);
gInventory.updateItem(new_item);
gInventory.notifyObservers();
}
@@ -718,11 +718,11 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force)
LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky();
// TODO -- make these getters return vec3s
- LLVector3 sunDiffuse = LLVector3(psky->getSunlightColor().mV);
- LLVector3 moonDiffuse = LLVector3(psky->getMoonlightColor().mV);
+ LLVector3 sun_light_color = LLVector3(psky->getSunlightColor().mV);
+ LLVector3 moon_light_color = LLVector3(psky->getMoonlightColor().mV);
- shader->uniform3fv(LLShaderMgr::SUNLIGHT_COLOR, sunDiffuse);
- shader->uniform3fv(LLShaderMgr::MOONLIGHT_COLOR, moonDiffuse);
+ shader->uniform3fv(LLShaderMgr::SUNLIGHT_COLOR, sun_light_color);
+ shader->uniform3fv(LLShaderMgr::MOONLIGHT_COLOR, moon_light_color);
shader->uniform3fv(LLShaderMgr::CLOUD_COLOR, LLVector3(psky->getCloudColor().mV));
@@ -745,8 +745,7 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force)
shader->uniform1f(LLShaderMgr::SKY_SUNLIGHT_SCALE, sunlight_scale);
shader->uniform1f(LLShaderMgr::SKY_AMBIENT_SCALE, ambient_scale);
- static LLCachedControl<F32> cloud_shadow_scale(gSavedSettings, "RenderCloudShadowAmbianceFactor", 0.125f);
- F32 probe_ambiance = getTotalReflectionProbeAmbiance(cloud_shadow_scale);
+ F32 probe_ambiance = getReflectionProbeAmbiance();
if (irradiance_pass)
{ // during an irradiance map update, disable ambient lighting (direct lighting only) and desaturate sky color (avoid tinting the world blue)
@@ -765,9 +764,9 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force)
shader->uniform1f(LLShaderMgr::SKY_HDR_SCALE, auto_adjust_hdr_scale);
LLColor3 blue_horizon = getBlueHorizon() * auto_adjust_blue_horizon_scale;
LLColor3 blue_density = getBlueDensity() * auto_adjust_blue_density_scale;
- LLColor3 sun_diffuse = getSunDiffuse() * auto_adjust_sun_color_scale;
+ sun_light_color = sun_light_color * auto_adjust_sun_color_scale;
- shader->uniform3fv(LLShaderMgr::SUNLIGHT_COLOR, sun_diffuse.mV);
+ shader->uniform3fv(LLShaderMgr::SUNLIGHT_COLOR, sun_light_color.mV);
shader->uniform3fv(LLShaderMgr::BLUE_DENSITY, blue_density.mV);
shader->uniform3fv(LLShaderMgr::BLUE_HORIZON, blue_horizon.mV);
@@ -1009,6 +1008,7 @@ void LLSettingsVOWater::applySpecial(void *ptarget, bool force)
glh::matrix4f mat(modelView);
glh::matrix4f invtrans = mat.inverse().transpose();
+ invtrans.m[3] = invtrans.m[7] = invtrans.m[11] = 0.f;
glh::vec3f enorm;
glh::vec3f ep;
invtrans.mult_matrix_vec(norm, enorm);
@@ -1017,12 +1017,29 @@ void LLSettingsVOWater::applySpecial(void *ptarget, bool force)
LLVector4 waterPlane(enorm.v[0], enorm.v[1], enorm.v[2], -ep.dot(enorm));
+ norm = glh::vec3f(gPipeline.mHeroProbeManager.mMirrorNormal.mV);
+ p = glh::vec3f(gPipeline.mHeroProbeManager.mMirrorPosition.mV);
+ invtrans.mult_matrix_vec(norm, enorm);
+ enorm.normalize();
+ mat.mult_matrix_vec(p, ep);
+
+ LLVector4 mirrorPlane(enorm.v[0], enorm.v[1], enorm.v[2], -ep.dot(enorm));
+
LLDrawPoolAlpha::sWaterPlane = waterPlane;
shader->uniform4fv(LLShaderMgr::WATER_WATERPLANE, waterPlane.mV);
-
+ shader->uniform4fv(LLShaderMgr::CLIP_PLANE, mirrorPlane.mV);
LLVector4 light_direction = env.getClampedLightNorm();
+ if (gPipeline.mHeroProbeManager.isMirrorPass())
+ {
+ shader->uniform1f(LLShaderMgr::MIRROR_FLAG, 1);
+ }
+ else
+ {
+ shader->uniform1f(LLShaderMgr::MIRROR_FLAG, 0);
+ }
+
F32 waterFogKS = 1.f / llmax(light_direction.mV[2], WATER_FOG_LIGHT_CLAMP);
shader->uniform1f(LLShaderMgr::WATER_FOGKS, waterFogKS);
diff --git a/indra/newview/llshareavatarhandler.cpp b/indra/newview/llshareavatarhandler.cpp
index 8c5ebb75ef..fb7be7adff 100644
--- a/indra/newview/llshareavatarhandler.cpp
+++ b/indra/newview/llshareavatarhandler.cpp
@@ -54,7 +54,7 @@ public:
//Get the ID
LLUUID id;
- if (!id.set( params[0], FALSE ))
+ if (!id.set( params[0], false ))
{
return false;
}
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 7571d361a4..0e45385c2e 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -92,7 +92,7 @@ LLSidepanelAppearance::~LLSidepanelAppearance()
}
// virtual
-BOOL LLSidepanelAppearance::postBuild()
+bool LLSidepanelAppearance::postBuild()
{
mOpenOutfitBtn = getChild<LLButton>("openoutfit_btn");
mOpenOutfitBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onOpenOutfitButtonClicked, this));
@@ -142,7 +142,7 @@ BOOL LLSidepanelAppearance::postBuild()
setWearablesLoading(gAgentWearables.isCOFChangeInProgress());
- return TRUE;
+ return true;
}
// virtual
@@ -195,8 +195,8 @@ void LLSidepanelAppearance::updateToVisibility(const LLSD &new_visibility)
{
if (new_visibility["visible"].asBoolean())
{
- const BOOL is_outfit_edit_visible = mOutfitEdit && mOutfitEdit->getVisible();
- const BOOL is_wearable_edit_visible = mEditWearable && mEditWearable->getVisible();
+ const bool is_outfit_edit_visible = mOutfitEdit && mOutfitEdit->getVisible();
+ const bool is_wearable_edit_visible = mEditWearable && mEditWearable->getVisible();
if (is_outfit_edit_visible || is_wearable_edit_visible)
{
@@ -262,7 +262,7 @@ void LLSidepanelAppearance::onOpenOutfitButtonClicked()
LLAccordionCtrlTab* tab_outfits = mPanelOutfitsInventory->findChild<LLAccordionCtrlTab>("tab_outfits");
if (tab_outfits)
{
- tab_outfits->changeOpenClose(FALSE);
+ tab_outfits->changeOpenClose(false);
LLInventoryPanel *inventory_panel = tab_outfits->findChild<LLInventoryPanel>("outfitslist_tab");
if (inventory_panel)
{
@@ -271,7 +271,7 @@ void LLSidepanelAppearance::onOpenOutfitButtonClicked()
if (outfit_folder)
{
outfit_folder->setOpen(!outfit_folder->isOpen());
- root->setSelection(outfit_folder,TRUE);
+ root->setSelection(outfit_folder,true);
root->scrollToShowSelection();
}
}
@@ -289,16 +289,16 @@ void LLSidepanelAppearance::onEditAppearanceButtonClicked()
void LLSidepanelAppearance::showOutfitsInventoryPanel()
{
- toggleWearableEditPanel(FALSE);
- toggleOutfitEditPanel(FALSE);
- toggleMyOutfitsPanel(TRUE, "");
+ toggleWearableEditPanel(false);
+ toggleOutfitEditPanel(false);
+ toggleMyOutfitsPanel(true, "");
}
void LLSidepanelAppearance::showOutfitsInventoryPanel(const std::string &tab_name)
{
- toggleWearableEditPanel(FALSE);
- toggleOutfitEditPanel(FALSE);
- toggleMyOutfitsPanel(TRUE, tab_name);
+ toggleWearableEditPanel(false);
+ toggleOutfitEditPanel(false);
+ toggleMyOutfitsPanel(true, tab_name);
}
void LLSidepanelAppearance::showOutfitEditPanel()
@@ -308,7 +308,7 @@ void LLSidepanelAppearance::showOutfitEditPanel()
// Accordion's state must be reset in all cases except the one when user
// is returning back to the mOutfitEdit panel from the mEditWearable panel.
// The simplest way to control this is to check the visibility state of the mEditWearable
- // BEFORE it is changed by the call to the toggleWearableEditPanel(FALSE, NULL, TRUE).
+ // BEFORE it is changed by the call to the toggleWearableEditPanel(false, NULL, true).
if (mEditWearable != NULL && !mEditWearable->getVisible() && mOutfitEdit != NULL)
{
mOutfitEdit->resetAccordionState();
@@ -323,19 +323,19 @@ void LLSidepanelAppearance::showOutfitEditPanel()
return;
}
- toggleMyOutfitsPanel(FALSE, "");
- toggleWearableEditPanel(FALSE, NULL, TRUE); // don't switch out of edit appearance mode
- toggleOutfitEditPanel(TRUE);
+ toggleMyOutfitsPanel(false, "");
+ toggleWearableEditPanel(false, NULL, true); // don't switch out of edit appearance mode
+ toggleOutfitEditPanel(true);
}
-void LLSidepanelAppearance::showWearableEditPanel(LLViewerWearable *wearable /* = NULL*/, BOOL disable_camera_switch)
+void LLSidepanelAppearance::showWearableEditPanel(LLViewerWearable *wearable /* = NULL*/, bool disable_camera_switch)
{
- toggleMyOutfitsPanel(FALSE, "");
- toggleOutfitEditPanel(FALSE, TRUE); // don't switch out of edit appearance mode
- toggleWearableEditPanel(TRUE, wearable, disable_camera_switch);
+ toggleMyOutfitsPanel(false, "");
+ toggleOutfitEditPanel(false, true); // don't switch out of edit appearance mode
+ toggleWearableEditPanel(true, wearable, disable_camera_switch);
}
-void LLSidepanelAppearance::toggleMyOutfitsPanel(BOOL visible, const std::string& tab_name)
+void LLSidepanelAppearance::toggleMyOutfitsPanel(bool visible, const std::string& tab_name)
{
if (!mPanelOutfitsInventory
|| (mPanelOutfitsInventory->getVisible() == visible && tab_name.empty()))
@@ -370,7 +370,7 @@ bool LLSidepanelAppearance::isCOFPanelVisible()
return false;
}
-void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible, BOOL disable_camera_switch)
+void LLSidepanelAppearance::toggleOutfitEditPanel(bool visible, bool disable_camera_switch)
{
if (!mOutfitEdit || mOutfitEdit->getVisible() == visible)
{
@@ -395,7 +395,7 @@ void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible, BOOL disable_cam
}
}
-void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLViewerWearable *wearable, BOOL disable_camera_switch)
+void LLSidepanelAppearance::toggleWearableEditPanel(bool visible, LLViewerWearable *wearable, bool disable_camera_switch)
{
if (!mEditWearable)
{
@@ -411,7 +411,7 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLViewerWearab
// If we're just switching between outfit and wearable editing or updating item,
// don't end customization and don't switch camera
// Don't end customization and don't switch camera without visibility change
- BOOL change_state = !disable_camera_switch && mEditWearable->getVisible() != visible;
+ bool change_state = !disable_camera_switch && mEditWearable->getVisible() != visible;
if (!wearable)
{
@@ -462,18 +462,18 @@ void LLSidepanelAppearance::refreshCurrentOutfitName(const std::string& name)
std::string string_name = gAgentWearables.isCOFChangeInProgress() ? "Changing outfits" : "No Outfit";
mCurrentLookName->setText(getString(string_name));
- mOpenOutfitBtn->setEnabled(FALSE);
+ mOpenOutfitBtn->setEnabled(false);
}
else
{
mCurrentLookName->setText(name);
// Can't just call update verbs since the folder link may not have been created yet.
- mOpenOutfitBtn->setEnabled(TRUE);
+ mOpenOutfitBtn->setEnabled(true);
}
}
//static
-void LLSidepanelAppearance::editWearable(LLViewerWearable *wearable, LLView *data, BOOL disable_camera_switch)
+void LLSidepanelAppearance::editWearable(LLViewerWearable *wearable, LLView *data, bool disable_camera_switch)
{
LLFloaterSidePanelContainer::showPanel("appearance", LLSD());
LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(data);
diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h
index e67652d6f7..4949f78a3f 100644
--- a/indra/newview/llsidepanelappearance.h
+++ b/indra/newview/llsidepanelappearance.h
@@ -46,12 +46,12 @@ public:
LLSidepanelAppearance();
virtual ~LLSidepanelAppearance();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onOpen(const LLSD& key);
void refreshCurrentOutfitName(const std::string& name = "");
- static void editWearable(LLViewerWearable *wearable, LLView *data, BOOL disable_camera_switch = FALSE);
+ static void editWearable(LLViewerWearable *wearable, LLView *data, bool disable_camera_switch = false);
void fetchInventory();
void inventoryFetched();
@@ -59,7 +59,7 @@ public:
void showOutfitsInventoryPanel(); // last selected
void showOutfitsInventoryPanel(const std::string& tab_name);
void showOutfitEditPanel();
- void showWearableEditPanel(LLViewerWearable *wearable = NULL, BOOL disable_camera_switch = FALSE);
+ void showWearableEditPanel(LLViewerWearable *wearable = NULL, bool disable_camera_switch = false);
void setWearablesLoading(bool val);
void showDefaultSubpart();
void updateScrollingPanelList();
@@ -75,9 +75,9 @@ private:
void onOpenOutfitButtonClicked();
void onEditAppearanceButtonClicked();
- void toggleMyOutfitsPanel(BOOL visible, const std::string& tab_name);
- void toggleOutfitEditPanel(BOOL visible, BOOL disable_camera_switch = FALSE);
- void toggleWearableEditPanel(BOOL visible, LLViewerWearable* wearable = NULL, BOOL disable_camera_switch = FALSE);
+ void toggleMyOutfitsPanel(bool visible, const std::string& tab_name);
+ void toggleOutfitEditPanel(bool visible, bool disable_camera_switch = false);
+ void toggleWearableEditPanel(bool visible, LLViewerWearable* wearable = nullptr, bool disable_camera_switch = false);
LLFilterEditor* mFilterEditor;
LLPanelOutfitsInventory* mPanelOutfitsInventory;
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp
index e970f70e92..bf883c7873 100644
--- a/indra/newview/llsidepanelinventory.cpp
+++ b/indra/newview/llsidepanelinventory.cpp
@@ -153,7 +153,7 @@ void handleInventoryDisplayInboxChanged()
}
}
-BOOL LLSidepanelInventory::postBuild()
+bool LLSidepanelInventory::postBuild()
{
// UI elements from inventory panel
{
@@ -223,7 +223,7 @@ BOOL LLSidepanelInventory::postBuild()
initInventoryViews();
}
- return TRUE;
+ return true;
}
void LLSidepanelInventory::updateInbox()
@@ -428,14 +428,14 @@ void LLSidepanelInventory::onBackButtonClicked()
showInventoryPanel();
}
-void LLSidepanelInventory::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action)
+void LLSidepanelInventory::onSelectionChange(const std::deque<LLFolderViewItem*> &items, bool user_action)
{
}
void LLSidepanelInventory::showInventoryPanel()
{
- mInventoryPanel->setVisible(TRUE);
+ mInventoryPanel->setVisible(true);
}
void LLSidepanelInventory::initInventoryViews()
@@ -546,7 +546,7 @@ void LLSidepanelInventory::selectAllItemsPanel()
}
-BOOL LLSidepanelInventory::isMainInventoryPanelActive() const
+bool LLSidepanelInventory::isMainInventoryPanelActive() const
{
return mInventoryPanel->getVisible();
}
diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h
index 08989bb6af..4009b7a67c 100644
--- a/indra/newview/llsidepanelinventory.h
+++ b/indra/newview/llsidepanelinventory.h
@@ -53,7 +53,7 @@ public:
void observeInboxCreation();
void observeInboxModifications(const LLUUID& inboxID);
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onOpen(const LLSD& key);
LLInventoryPanel* getActivePanel(); // Returns an active inventory panel, if any.
@@ -61,7 +61,7 @@ public:
LLInventoryPanel* getInboxPanel() const { return mInventoryPanelInbox.get(); }
LLPanelMainInventory* getMainInventoryPanel() const { return mPanelMainInventory; }
- BOOL isMainInventoryPanelActive() const;
+ bool isMainInventoryPanelActive() const;
void clearSelections(bool clearMain, bool clearInbox);
std::set<LLFolderViewItem*> getInboxSelectionList();
@@ -88,7 +88,7 @@ protected:
// Tracks highlighted (selected) item in inventory panel.
LLInventoryItem *getSelectedItem();
U32 getSelectedCount();
- void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action);
+ void onSelectionChange(const std::deque<LLFolderViewItem*> &items, bool user_action);
// "wear", "teleport", etc.
void performActionOnSelection(const std::string &action);
diff --git a/indra/newview/llsidepanelinventorysubpanel.cpp b/indra/newview/llsidepanelinventorysubpanel.cpp
index 3b73b6b7dd..58982a38f5 100644
--- a/indra/newview/llsidepanelinventorysubpanel.cpp
+++ b/indra/newview/llsidepanelinventorysubpanel.cpp
@@ -48,8 +48,8 @@
// Default constructor
LLSidepanelInventorySubpanel::LLSidepanelInventorySubpanel(const LLPanel::Params& p)
: LLPanel(p),
- mIsDirty(TRUE),
- mIsEditing(FALSE),
+ mIsDirty(true),
+ mIsEditing(false),
mCancelBtn(NULL)
{
}
@@ -60,7 +60,7 @@ LLSidepanelInventorySubpanel::~LLSidepanelInventorySubpanel()
}
// virtual
-BOOL LLSidepanelInventorySubpanel::postBuild()
+bool LLSidepanelInventorySubpanel::postBuild()
{
mCancelBtn = findChild<LLButton>("cancel_btn");
@@ -68,10 +68,10 @@ BOOL LLSidepanelInventorySubpanel::postBuild()
{
mCancelBtn->setClickedCallback(boost::bind(&LLSidepanelInventorySubpanel::onCancelButtonClicked, this));
}
- return TRUE;
+ return true;
}
-void LLSidepanelInventorySubpanel::setVisible(BOOL visible)
+void LLSidepanelInventorySubpanel::setVisible(bool visible)
{
if (visible)
{
@@ -80,22 +80,22 @@ void LLSidepanelInventorySubpanel::setVisible(BOOL visible)
LLPanel::setVisible(visible);
}
-void LLSidepanelInventorySubpanel::setIsEditing(BOOL edit)
+void LLSidepanelInventorySubpanel::setIsEditing(bool edit)
{
mIsEditing = edit;
- mIsDirty = TRUE;
+ mIsDirty = true;
}
-BOOL LLSidepanelInventorySubpanel::getIsEditing() const
+bool LLSidepanelInventorySubpanel::getIsEditing() const
{
- return TRUE; // Default everything to edit mode since we're not using an edit button anymore.
+ return true; // Default everything to edit mode since we're not using an edit button anymore.
// return mIsEditing;
}
void LLSidepanelInventorySubpanel::reset()
{
- mIsDirty = TRUE;
+ mIsDirty = true;
}
void LLSidepanelInventorySubpanel::draw()
@@ -104,7 +104,7 @@ void LLSidepanelInventorySubpanel::draw()
{
refresh();
updateVerbs();
- mIsDirty = FALSE;
+ mIsDirty = false;
}
LLPanel::draw();
@@ -112,8 +112,8 @@ void LLSidepanelInventorySubpanel::draw()
void LLSidepanelInventorySubpanel::dirty()
{
- mIsDirty = TRUE;
- setIsEditing(FALSE);
+ mIsDirty = true;
+ setIsEditing(false);
}
void LLSidepanelInventorySubpanel::updateVerbs()
@@ -126,14 +126,14 @@ void LLSidepanelInventorySubpanel::updateVerbs()
void LLSidepanelInventorySubpanel::onEditButtonClicked()
{
- setIsEditing(TRUE);
+ setIsEditing(true);
refresh();
updateVerbs();
}
void LLSidepanelInventorySubpanel::onCancelButtonClicked()
{
- setIsEditing(FALSE);
+ setIsEditing(false);
refresh();
updateVerbs();
}
diff --git a/indra/newview/llsidepanelinventorysubpanel.h b/indra/newview/llsidepanelinventorysubpanel.h
index 0d18943cbf..3c13842bc0 100644
--- a/indra/newview/llsidepanelinventorysubpanel.h
+++ b/indra/newview/llsidepanelinventorysubpanel.h
@@ -43,19 +43,19 @@ public:
LLSidepanelInventorySubpanel(const LLPanel::Params& p = getDefaultParams());
virtual ~LLSidepanelInventorySubpanel();
- /*virtual*/ void setVisible(BOOL visible);
- virtual BOOL postBuild();
+ /*virtual*/ void setVisible(bool visible);
+ virtual bool postBuild();
virtual void draw();
virtual void reset();
void dirty();
- void setIsEditing(BOOL edit);
+ void setIsEditing(bool edit);
protected:
virtual void refresh() = 0;
virtual void save() = 0;
virtual void updateVerbs();
- BOOL getIsEditing() const;
+ bool getIsEditing() const;
//
// UI Elements
@@ -66,8 +66,8 @@ protected:
LLButton* mCancelBtn;
private:
- BOOL mIsDirty; // item properties need to be updated
- BOOL mIsEditing; // if we're in edit mode
+ bool mIsDirty; // item properties need to be updated
+ bool mIsEditing; // if we're in edit mode
};
#endif // LL_LLSIDEPANELINVENTORYSUBPANEL_H
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index d6d5a4ef2d..0a76a1f48f 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -152,7 +152,7 @@ LLSidepanelItemInfo::~LLSidepanelItemInfo()
}
// virtual
-BOOL LLSidepanelItemInfo::postBuild()
+bool LLSidepanelItemInfo::postBuild()
{
mChangeThumbnailBtn = getChild<LLUICtrl>("change_thumbnail_btn");
mItemTypeIcon = getChild<LLIconCtrl>("item_type_icon");
@@ -182,7 +182,7 @@ BOOL LLSidepanelItemInfo::postBuild()
// "Price" label for edit
getChild<LLUICtrl>("Edit Cost")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this, _1));
refresh();
- return TRUE;
+ return true;
}
void LLSidepanelItemInfo::setObjectID(const LLUUID& object_id)
@@ -292,16 +292,16 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
// do not enable the UI for incomplete items.
bool is_complete = item->isFinished();
- const BOOL cannot_restrict_permissions = LLInventoryType::cannotRestrictPermissions(item->getInventoryType());
- const BOOL is_calling_card = (item->getInventoryType() == LLInventoryType::IT_CALLINGCARD);
- const BOOL is_settings = (item->getInventoryType() == LLInventoryType::IT_SETTINGS);
+ const bool cannot_restrict_permissions = LLInventoryType::cannotRestrictPermissions(item->getInventoryType());
+ const bool is_calling_card = (item->getInventoryType() == LLInventoryType::IT_CALLINGCARD);
+ const bool is_settings = (item->getInventoryType() == LLInventoryType::IT_SETTINGS);
const LLPermissions& perm = item->getPermissions();
- const BOOL can_agent_manipulate = gAgent.allowOperation(PERM_OWNER, perm,
+ const bool can_agent_manipulate = gAgent.allowOperation(PERM_OWNER, perm,
GP_OBJECT_MANIPULATE);
- const BOOL can_agent_sell = gAgent.allowOperation(PERM_OWNER, perm,
+ const bool can_agent_sell = gAgent.allowOperation(PERM_OWNER, perm,
GP_OBJECT_SET_SALE) &&
!cannot_restrict_permissions;
- const BOOL is_link = item->getIsLinkType();
+ const bool is_link = item->getIsLinkType();
const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
bool not_in_trash = (item->getUUID() != trash_id) && !gInventory.isObjectDescendentOf(item->getUUID(), trash_id);
@@ -310,7 +310,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
// item in it.
LLViewerObject* object = NULL;
if(!mObjectID.isNull()) object = gObjectList.findObject(mObjectID);
- BOOL is_obj_modify = TRUE;
+ bool is_obj_modify = true;
if(object)
{
is_obj_modify = object->permOwnerModify();
@@ -318,10 +318,10 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
if(item->getInventoryType() == LLInventoryType::IT_LSL)
{
- getChildView("LabelItemExperienceTitle")->setVisible(TRUE);
+ getChildView("LabelItemExperienceTitle")->setVisible(true);
LLTextBox* tb = getChild<LLTextBox>("LabelItemExperience");
tb->setText(getString("loading_experience"));
- tb->setVisible(TRUE);
+ tb->setVisible(true);
std::string url = std::string();
if(object && object->getRegion())
{
@@ -334,19 +334,19 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
//////////////////////
// ITEM NAME & DESC //
//////////////////////
- BOOL is_modifiable = gAgent.allowOperation(PERM_MODIFY, perm,
+ bool is_modifiable = gAgent.allowOperation(PERM_MODIFY, perm,
GP_OBJECT_MANIPULATE)
&& is_obj_modify && is_complete && not_in_trash;
- getChildView("LabelItemNameTitle")->setEnabled(TRUE);
+ getChildView("LabelItemNameTitle")->setEnabled(true);
getChildView("LabelItemName")->setEnabled(is_modifiable && !is_calling_card); // for now, don't allow rename of calling cards
getChild<LLUICtrl>("LabelItemName")->setValue(item->getName());
- getChildView("LabelItemDescTitle")->setEnabled(TRUE);
+ getChildView("LabelItemDescTitle")->setEnabled(true);
getChildView("LabelItemDesc")->setEnabled(is_modifiable);
getChild<LLUICtrl>("LabelItemDesc")->setValue(item->getDescription());
getChild<LLUICtrl>("item_thumbnail")->setValue(item->getThumbnailUUID());
- LLUIImagePtr icon_img = LLInventoryIcon::getIcon(item->getType(), item->getInventoryType(), item->getFlags(), FALSE);
+ LLUIImagePtr icon_img = LLInventoryIcon::getIcon(item->getType(), item->getInventoryType(), item->getFlags(), false);
mItemTypeIcon->setImage(icon_img);
// Style for creator and owner links
@@ -389,13 +389,13 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
mCreatorCacheConnection = LLAvatarNameCache::get(creator_id, boost::bind(&LLSidepanelItemInfo::updateCreatorName, this, _1, _2, style_params));
}
- getChildView("LabelCreatorTitle")->setEnabled(TRUE);
- mLabelCreatorName->setEnabled(TRUE);
+ getChildView("LabelCreatorTitle")->setEnabled(true);
+ mLabelCreatorName->setEnabled(true);
}
else
{
- getChildView("LabelCreatorTitle")->setEnabled(FALSE);
- mLabelCreatorName->setEnabled(FALSE);
+ getChildView("LabelCreatorTitle")->setEnabled(false);
+ mLabelCreatorName->setEnabled(false);
mLabelCreatorName->setValue(getString("unknown_multiple"));
}
@@ -446,13 +446,13 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
mOwnerCacheConnection = LLAvatarNameCache::get(owner_id, boost::bind(&LLSidepanelItemInfo::updateOwnerName, this, _1, _2, style_params));
}
}
- getChildView("LabelOwnerTitle")->setEnabled(TRUE);
- mLabelOwnerName->setEnabled(TRUE);
+ getChildView("LabelOwnerTitle")->setEnabled(true);
+ mLabelOwnerName->setEnabled(true);
}
else
{
- getChildView("LabelOwnerTitle")->setEnabled(FALSE);
- mLabelOwnerName->setEnabled(FALSE);
+ getChildView("LabelOwnerTitle")->setEnabled(false);
+ mLabelOwnerName->setEnabled(false);
mLabelOwnerName->setValue(getString("public"));
}
@@ -554,12 +554,12 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
U32 everyone_mask = perm.getMaskEveryone();
U32 next_owner_mask = perm.getMaskNextOwner();
- getChildView("CheckOwnerModify")->setEnabled(FALSE);
- getChild<LLUICtrl>("CheckOwnerModify")->setValue(LLSD((BOOL)(owner_mask & PERM_MODIFY)));
- getChildView("CheckOwnerCopy")->setEnabled(FALSE);
- getChild<LLUICtrl>("CheckOwnerCopy")->setValue(LLSD((BOOL)(owner_mask & PERM_COPY)));
- getChildView("CheckOwnerTransfer")->setEnabled(FALSE);
- getChild<LLUICtrl>("CheckOwnerTransfer")->setValue(LLSD((BOOL)(owner_mask & PERM_TRANSFER)));
+ getChildView("CheckOwnerModify")->setEnabled(false);
+ getChild<LLUICtrl>("CheckOwnerModify")->setValue(LLSD((bool)(owner_mask & PERM_MODIFY)));
+ getChildView("CheckOwnerCopy")->setEnabled(false);
+ getChild<LLUICtrl>("CheckOwnerCopy")->setValue(LLSD((bool)(owner_mask & PERM_COPY)));
+ getChildView("CheckOwnerTransfer")->setEnabled(false);
+ getChild<LLUICtrl>("CheckOwnerTransfer")->setValue(LLSD((bool)(owner_mask & PERM_TRANSFER)));
///////////////////////
// DEBUG PERMISSIONS //
@@ -569,9 +569,9 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
{
childSetVisible("layout_debug_permissions", true);
- BOOL slam_perm = FALSE;
- BOOL overwrite_group = FALSE;
- BOOL overwrite_everyone = FALSE;
+ bool slam_perm = false;
+ bool overwrite_group = false;
+ bool overwrite_everyone = false;
if (item->getType() == LLAssetType::AT_OBJECT)
{
@@ -618,42 +618,42 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
// Check for ability to change values.
if (is_link || cannot_restrict_permissions)
{
- getChildView("CheckShareWithGroup")->setEnabled(FALSE);
- getChildView("CheckEveryoneCopy")->setEnabled(FALSE);
+ getChildView("CheckShareWithGroup")->setEnabled(false);
+ getChildView("CheckEveryoneCopy")->setEnabled(false);
}
else if (is_obj_modify && can_agent_manipulate)
{
- getChildView("CheckShareWithGroup")->setEnabled(TRUE);
+ getChildView("CheckShareWithGroup")->setEnabled(true);
getChildView("CheckEveryoneCopy")->setEnabled((owner_mask & PERM_COPY) && (owner_mask & PERM_TRANSFER));
}
else
{
- getChildView("CheckShareWithGroup")->setEnabled(FALSE);
- getChildView("CheckEveryoneCopy")->setEnabled(FALSE);
+ getChildView("CheckShareWithGroup")->setEnabled(false);
+ getChildView("CheckEveryoneCopy")->setEnabled(false);
}
// Set values.
- BOOL is_group_copy = (group_mask & PERM_COPY) ? TRUE : FALSE;
- BOOL is_group_modify = (group_mask & PERM_MODIFY) ? TRUE : FALSE;
- BOOL is_group_move = (group_mask & PERM_MOVE) ? TRUE : FALSE;
+ bool is_group_copy = (group_mask & PERM_COPY) ? true : false;
+ bool is_group_modify = (group_mask & PERM_MODIFY) ? true : false;
+ bool is_group_move = (group_mask & PERM_MOVE) ? true : false;
if (is_group_copy && is_group_modify && is_group_move)
{
- getChild<LLUICtrl>("CheckShareWithGroup")->setValue(LLSD((BOOL)TRUE));
+ getChild<LLUICtrl>("CheckShareWithGroup")->setValue(LLSD((bool)true));
LLCheckBoxCtrl* ctl = getChild<LLCheckBoxCtrl>("CheckShareWithGroup");
if(ctl)
{
- ctl->setTentative(FALSE);
+ ctl->setTentative(false);
}
}
else if (!is_group_copy && !is_group_modify && !is_group_move)
{
- getChild<LLUICtrl>("CheckShareWithGroup")->setValue(LLSD((BOOL)FALSE));
+ getChild<LLUICtrl>("CheckShareWithGroup")->setValue(LLSD((bool)false));
LLCheckBoxCtrl* ctl = getChild<LLCheckBoxCtrl>("CheckShareWithGroup");
if(ctl)
{
- ctl->setTentative(FALSE);
+ ctl->setTentative(false);
}
}
else
@@ -662,18 +662,18 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
if(ctl)
{
ctl->setTentative(!ctl->getEnabled());
- ctl->set(TRUE);
+ ctl->set(true);
}
}
- getChild<LLUICtrl>("CheckEveryoneCopy")->setValue(LLSD((BOOL)(everyone_mask & PERM_COPY)));
+ getChild<LLUICtrl>("CheckEveryoneCopy")->setValue(LLSD((bool)(everyone_mask & PERM_COPY)));
///////////////
// SALE INFO //
///////////////
const LLSaleInfo& sale_info = item->getSaleInfo();
- BOOL is_for_sale = sale_info.isForSale();
+ bool is_for_sale = sale_info.isForSale();
LLComboBox* combo_sale_type = getChild<LLComboBox>("ComboBoxSaleType");
LLUICtrl* edit_cost = getChild<LLUICtrl>("Edit Cost");
@@ -683,7 +683,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
{
getChildView("CheckPurchase")->setEnabled(is_complete);
- getChildView("NextOwnerLabel")->setEnabled(TRUE);
+ getChildView("NextOwnerLabel")->setEnabled(true);
getChildView("CheckNextOwnerModify")->setEnabled((base_mask & PERM_MODIFY) && !cannot_restrict_permissions);
getChildView("CheckNextOwnerCopy")->setEnabled((base_mask & PERM_COPY) && !cannot_restrict_permissions && !is_settings);
getChildView("CheckNextOwnerTransfer")->setEnabled((next_owner_mask & PERM_COPY) && !cannot_restrict_permissions);
@@ -693,15 +693,15 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
}
else
{
- getChildView("CheckPurchase")->setEnabled(FALSE);
+ getChildView("CheckPurchase")->setEnabled(false);
- getChildView("NextOwnerLabel")->setEnabled(FALSE);
- getChildView("CheckNextOwnerModify")->setEnabled(FALSE);
- getChildView("CheckNextOwnerCopy")->setEnabled(FALSE);
- getChildView("CheckNextOwnerTransfer")->setEnabled(FALSE);
+ getChildView("NextOwnerLabel")->setEnabled(false);
+ getChildView("CheckNextOwnerModify")->setEnabled(false);
+ getChildView("CheckNextOwnerCopy")->setEnabled(false);
+ getChildView("CheckNextOwnerTransfer")->setEnabled(false);
- combo_sale_type->setEnabled(FALSE);
- edit_cost->setEnabled(FALSE);
+ combo_sale_type->setEnabled(false);
+ edit_cost->setEnabled(false);
}
// Hide any properties that are not relevant to settings
@@ -725,9 +725,9 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
// Set values.
getChild<LLUICtrl>("CheckPurchase")->setValue(is_for_sale);
- getChild<LLUICtrl>("CheckNextOwnerModify")->setValue(LLSD(BOOL(next_owner_mask & PERM_MODIFY)));
- getChild<LLUICtrl>("CheckNextOwnerCopy")->setValue(LLSD(BOOL(next_owner_mask & PERM_COPY)));
- getChild<LLUICtrl>("CheckNextOwnerTransfer")->setValue(LLSD(BOOL(next_owner_mask & PERM_TRANSFER)));
+ getChild<LLUICtrl>("CheckNextOwnerModify")->setValue(LLSD(bool(next_owner_mask & PERM_MODIFY)));
+ getChild<LLUICtrl>("CheckNextOwnerCopy")->setValue(LLSD(bool(next_owner_mask & PERM_COPY)));
+ getChild<LLUICtrl>("CheckNextOwnerTransfer")->setValue(LLSD(bool(next_owner_mask & PERM_TRANSFER)));
if (is_for_sale)
{
@@ -957,7 +957,7 @@ void LLSidepanelItemInfo::updatePermissions()
LLViewerInventoryItem* item = findItem();
if(!item) return;
- BOOL is_group_owned;
+ bool is_group_owned;
LLUUID owner_id;
LLUUID group_id;
LLPermissions perm(item->getPermissions());
@@ -1066,10 +1066,10 @@ void LLSidepanelItemInfo::updateSaleInfo()
LLSaleInfo sale_info(item->getSaleInfo());
if(!gAgent.allowOperation(PERM_TRANSFER, item->getPermissions(), GP_OBJECT_SET_SALE))
{
- getChild<LLUICtrl>("CheckPurchase")->setValue(LLSD((BOOL)FALSE));
+ getChild<LLUICtrl>("CheckPurchase")->setValue(LLSD((bool)false));
}
- if((BOOL)getChild<LLUICtrl>("CheckPurchase")->getValue())
+ if((bool)getChild<LLUICtrl>("CheckPurchase")->getValue())
{
// turn on sale info
LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_COPY;
@@ -1144,7 +1144,7 @@ void LLSidepanelItemInfo::onCommitChanges(LLPointer<LLViewerInventoryItem> item)
mUpdatePendingId++;
LLPointer<LLInventoryCallback> callback = new PropertiesChangedCallback(getHandle(), mItemID, mUpdatePendingId);
update_inventory_item(item.get(), callback);
- //item->updateServer(FALSE);
+ //item->updateServer(false);
gInventory.updateItem(item);
gInventory.notifyObservers();
}
diff --git a/indra/newview/llsidepaneliteminfo.h b/indra/newview/llsidepaneliteminfo.h
index b916f44520..f82a75b09a 100644
--- a/indra/newview/llsidepaneliteminfo.h
+++ b/indra/newview/llsidepaneliteminfo.h
@@ -53,7 +53,7 @@ public:
LLSidepanelItemInfo(const LLPanel::Params& p = getDefaultParams());
virtual ~LLSidepanelItemInfo();
- /*virtual*/ BOOL postBuild() override;
+ /*virtual*/ bool postBuild() override;
/*virtual*/ void reset();
void setObjectID(const LLUUID& object_id);
diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp
index fe61b7a02a..db22fc34bf 100644
--- a/indra/newview/llsidepaneltaskinfo.cpp
+++ b/indra/newview/llsidepaneltaskinfo.cpp
@@ -78,7 +78,7 @@ static LLPanelInjector<LLSidepanelTaskInfo> t_task_info("sidepanel_task_info");
LLSidepanelTaskInfo::LLSidepanelTaskInfo()
: mVisibleDebugPermissions(true) // space was allocated by default
{
- setMouseOpaque(FALSE);
+ setMouseOpaque(false);
mSelectionUpdateSlot = LLSelectMgr::instance().mUpdateSignal.connect(boost::bind(&LLSidepanelTaskInfo::refreshAll, this));
gIdleCallbacks.addFunction(&LLSidepanelTaskInfo::onIdle, (void*)this);
}
@@ -97,7 +97,7 @@ LLSidepanelTaskInfo::~LLSidepanelTaskInfo()
}
// virtual
-BOOL LLSidepanelTaskInfo::postBuild()
+bool LLSidepanelTaskInfo::postBuild()
{
mOpenBtn = getChild<LLButton>("open_btn");
mOpenBtn->setClickedCallback(boost::bind(&LLSidepanelTaskInfo::onOpenButtonClicked, this));
@@ -160,10 +160,10 @@ BOOL LLSidepanelTaskInfo::postBuild()
mDAN = getChild<LLUICtrl>("N:");
mDAF = getChild<LLUICtrl>("F:");
- return TRUE;
+ return true;
}
-/*virtual*/ void LLSidepanelTaskInfo::onVisibilityChange ( BOOL visible )
+/*virtual*/ void LLSidepanelTaskInfo::onVisibilityChange(bool visible)
{
if (visible)
{
@@ -182,26 +182,26 @@ BOOL LLSidepanelTaskInfo::postBuild()
void LLSidepanelTaskInfo::disableAll()
{
mDACreatorName->setValue(LLStringUtil::null);
- mDACreatorName->setEnabled(FALSE);
+ mDACreatorName->setEnabled(false);
- mDAOwner->setEnabled(FALSE);
+ mDAOwner->setEnabled(false);
mDAOwnerName->setValue(LLStringUtil::null);
- mDAOwnerName->setEnabled(FALSE);
+ mDAOwnerName->setEnabled(false);
mDAObjectName->setValue(LLStringUtil::null);
- mDAObjectName->setEnabled(FALSE);
- mDAName->setEnabled(FALSE);
- mDADescription->setEnabled(FALSE);
+ mDAObjectName->setEnabled(false);
+ mDAName->setEnabled(false);
+ mDADescription->setEnabled(false);
mDAObjectDescription->setValue(LLStringUtil::null);
- mDAObjectDescription->setEnabled(FALSE);
+ mDAObjectDescription->setEnabled(false);
- mDAPathfindingAttributes->setEnabled(FALSE);
+ mDAPathfindingAttributes->setEnabled(false);
mDAPathfindingAttributes->setValue(LLStringUtil::null);
- mDAButtonSetGroup->setEnabled(FALSE);
- mDAButtonDeed->setEnabled(FALSE);
+ mDAButtonSetGroup->setEnabled(false);
+ mDAButtonDeed->setEnabled(false);
- mDAPermModify->setEnabled(FALSE);
+ mDAPermModify->setEnabled(false);
mDAPermModify->setValue(LLStringUtil::null);
mDAEditCost->setValue(LLStringUtil::null);
mDAComboSaleType->setValue(LLSaleInfo::FS_COPY);
@@ -210,12 +210,12 @@ void LLSidepanelTaskInfo::disableAll()
if (mVisibleDebugPermissions)
{
- mDAB->setVisible(FALSE);
- mDAO->setVisible(FALSE);
- mDAG->setVisible(FALSE);
- mDAE->setVisible(FALSE);
- mDAN->setVisible(FALSE);
- mDAF->setVisible(FALSE);
+ mDAB->setVisible(false);
+ mDAO->setVisible(false);
+ mDAG->setVisible(false);
+ mDAE->setVisible(false);
+ mDAN->setVisible(false);
+ mDAF->setVisible(false);
LLFloater* parent_floater = gFloaterView->getParentFloater(this);
LLRect parent_rect = parent_floater->getRect();
@@ -225,45 +225,45 @@ void LLSidepanelTaskInfo::disableAll()
mVisibleDebugPermissions = false;
}
- mOpenBtn->setEnabled(FALSE);
- mPayBtn->setEnabled(FALSE);
- mBuyBtn->setEnabled(FALSE);
+ mOpenBtn->setEnabled(false);
+ mPayBtn->setEnabled(false);
+ mBuyBtn->setEnabled(false);
}
void LLSidepanelTaskInfo::disablePermissions()
{
- mDACheckboxShareWithGroup->setValue(FALSE);
- mDACheckboxShareWithGroup->setEnabled(FALSE);
+ mDACheckboxShareWithGroup->setValue(false);
+ mDACheckboxShareWithGroup->setEnabled(false);
- mDACheckboxAllowEveryoneMove->setValue(FALSE);
- mDACheckboxAllowEveryoneMove->setEnabled(FALSE);
- mDACheckboxAllowEveryoneCopy->setValue(FALSE);
- mDACheckboxAllowEveryoneCopy->setEnabled(FALSE);
+ mDACheckboxAllowEveryoneMove->setValue(false);
+ mDACheckboxAllowEveryoneMove->setEnabled(false);
+ mDACheckboxAllowEveryoneCopy->setValue(false);
+ mDACheckboxAllowEveryoneCopy->setEnabled(false);
//Next owner can:
- mDACheckboxNextOwnerCanModify->setValue(FALSE);
- mDACheckboxNextOwnerCanModify->setEnabled(FALSE);
- mDACheckboxNextOwnerCanCopy->setValue(FALSE);
- mDACheckboxNextOwnerCanCopy->setEnabled(FALSE);
- mDACheckboxNextOwnerCanTransfer->setValue(FALSE);
- mDACheckboxNextOwnerCanTransfer->setEnabled(FALSE);
+ mDACheckboxNextOwnerCanModify->setValue(false);
+ mDACheckboxNextOwnerCanModify->setEnabled(false);
+ mDACheckboxNextOwnerCanCopy->setValue(false);
+ mDACheckboxNextOwnerCanCopy->setEnabled(false);
+ mDACheckboxNextOwnerCanTransfer->setValue(false);
+ mDACheckboxNextOwnerCanTransfer->setEnabled(false);
//checkbox for sale
- mDACheckboxForSale->setValue(FALSE);
- mDACheckboxForSale->setEnabled(FALSE);
+ mDACheckboxForSale->setValue(false);
+ mDACheckboxForSale->setEnabled(false);
//checkbox include in search
- mDASearchCheck->setValue(FALSE);
- mDASearchCheck->setEnabled(FALSE);
+ mDASearchCheck->setValue(false);
+ mDASearchCheck->setEnabled(false);
- mDAComboSaleType->setEnabled(FALSE);
+ mDAComboSaleType->setEnabled(false);
- mDAEditCost->setEnabled(FALSE);
+ mDAEditCost->setEnabled(false);
- mDALabelClickAction->setEnabled(FALSE);
+ mDALabelClickAction->setEnabled(false);
if (mDAComboClickAction)
{
- mDAComboClickAction->setEnabled(FALSE);
+ mDAComboClickAction->setEnabled(false);
mDAComboClickAction->clear();
}
}
@@ -288,14 +288,14 @@ void LLSidepanelTaskInfo::refresh()
btn_deed_to_group->setLabelUnselected(deedText);
}
- BOOL root_selected = TRUE;
+ bool root_selected = true;
LLSelectNode* nodep = mObjectSelection->getFirstRootNode();
S32 object_count = mObjectSelection->getRootObjectCount();
if (!nodep || (object_count == 0))
{
nodep = mObjectSelection->getFirstNode();
object_count = mObjectSelection->getObjectCount();
- root_selected = FALSE;
+ root_selected = false;
}
LLViewerObject* objectp = NULL;
@@ -312,12 +312,12 @@ void LLSidepanelTaskInfo::refresh()
}
// figure out a few variables
- const BOOL is_one_object = (object_count == 1);
+ const bool is_one_object = (object_count == 1);
// BUG: fails if a root and non-root are both single-selected.
- const BOOL is_perm_modify = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsModify()) ||
+ const bool is_perm_modify = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsModify()) ||
LLSelectMgr::getInstance()->selectGetModify();
- const BOOL is_nonpermanent_enforced = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsNonPermanentEnforced()) ||
+ const bool is_nonpermanent_enforced = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsNonPermanentEnforced()) ||
LLSelectMgr::getInstance()->selectGetNonPermanentEnforced();
S32 string_index = 0;
@@ -342,7 +342,7 @@ void LLSidepanelTaskInfo::refresh()
{
++string_index;
}
- getChildView("perm_modify")->setEnabled(TRUE);
+ getChildView("perm_modify")->setEnabled(true);
getChild<LLUICtrl>("perm_modify")->setValue(MODIFY_INFO_STRINGS[string_index]);
std::string pfAttrName;
@@ -370,11 +370,11 @@ void LLSidepanelTaskInfo::refresh()
pfAttrName = "Pathfinding_Object_Attr_MultiSelect";
}
- mDAPathfindingAttributes->setEnabled(TRUE);
+ mDAPathfindingAttributes->setEnabled(true);
mDAPathfindingAttributes->setValue(LLTrans::getString(pfAttrName));
// Update creator text field
- getChildView("Creator:")->setEnabled(TRUE);
+ getChildView("Creator:")->setEnabled(true);
std::string creator_name;
LLUUID creator_id;
@@ -389,14 +389,14 @@ void LLSidepanelTaskInfo::refresh()
{
mDACreatorName->setValue(creator_name);
}
- mDACreatorName->setEnabled(TRUE);
+ mDACreatorName->setEnabled(true);
// Update owner text field
- getChildView("Owner:")->setEnabled(TRUE);
+ getChildView("Owner:")->setEnabled(true);
std::string owner_name;
LLUUID owner_id;
- const BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name);
+ const bool owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name);
if (owner_id.isNull())
{
if (LLSelectMgr::getInstance()->selectIsGroupOwned())
@@ -429,36 +429,36 @@ void LLSidepanelTaskInfo::refresh()
mDAOwnerName->setValue(owner_name);
}
- getChildView("Owner Name")->setEnabled(TRUE);
+ getChildView("Owner Name")->setEnabled(true);
// update group text field
- getChildView("Group:")->setEnabled(TRUE);
+ getChildView("Group:")->setEnabled(true);
getChild<LLUICtrl>("Group Name")->setValue(LLStringUtil::null);
LLUUID group_id;
- BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id);
+ bool groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id);
if (groups_identical)
{
if (mLabelGroupName)
{
- mLabelGroupName->setNameID(group_id,TRUE);
- mLabelGroupName->setEnabled(TRUE);
+ mLabelGroupName->setNameID(group_id,true);
+ mLabelGroupName->setEnabled(true);
}
}
else
{
if (mLabelGroupName)
{
- mLabelGroupName->setNameID(LLUUID::null, TRUE);
+ mLabelGroupName->setNameID(LLUUID::null, true);
mLabelGroupName->refresh(LLUUID::null, std::string(), true);
- mLabelGroupName->setEnabled(FALSE);
+ mLabelGroupName->setEnabled(false);
}
}
getChildView("button set group")->setEnabled(owners_identical && (mOwnerID == gAgent.getID()) && is_nonpermanent_enforced);
- getChildView("Name:")->setEnabled(TRUE);
+ getChildView("Name:")->setEnabled(true);
LLLineEditor* LineEditorObjectName = getChild<LLLineEditor>("Object Name");
- getChildView("Description:")->setEnabled(TRUE);
+ getChildView("Description:")->setEnabled(true);
LLLineEditor* LineEditorObjectDesc = getChild<LLLineEditor>("Object Description");
if (is_one_object)
@@ -483,44 +483,44 @@ void LLSidepanelTaskInfo::refresh()
}
// figure out the contents of the name, description, & category
- BOOL edit_name_desc = FALSE;
+ bool edit_name_desc = false;
if (is_one_object && objectp->permModify() && !objectp->isPermanentEnforced())
{
- edit_name_desc = TRUE;
+ edit_name_desc = true;
}
if (edit_name_desc)
{
- getChildView("Object Name")->setEnabled(TRUE);
- getChildView("Object Description")->setEnabled(TRUE);
+ getChildView("Object Name")->setEnabled(true);
+ getChildView("Object Description")->setEnabled(true);
}
else
{
- getChildView("Object Name")->setEnabled(FALSE);
- getChildView("Object Description")->setEnabled(FALSE);
+ getChildView("Object Name")->setEnabled(false);
+ getChildView("Object Description")->setEnabled(false);
}
S32 total_sale_price = 0;
S32 individual_sale_price = 0;
- BOOL is_for_sale_mixed = FALSE;
- BOOL is_sale_price_mixed = FALSE;
- U32 num_for_sale = FALSE;
+ bool is_for_sale_mixed = false;
+ bool is_sale_price_mixed = false;
+ U32 num_for_sale = false;
LLSelectMgr::getInstance()->selectGetAggregateSaleInfo(num_for_sale,
is_for_sale_mixed,
is_sale_price_mixed,
total_sale_price,
individual_sale_price);
- const BOOL self_owned = (gAgent.getID() == mOwnerID);
- const BOOL group_owned = LLSelectMgr::getInstance()->selectIsGroupOwned() ;
- const BOOL public_owned = (mOwnerID.isNull() && !LLSelectMgr::getInstance()->selectIsGroupOwned());
- const BOOL can_transfer = LLSelectMgr::getInstance()->selectGetRootsTransfer();
- const BOOL can_copy = LLSelectMgr::getInstance()->selectGetRootsCopy();
+ const bool self_owned = (gAgent.getID() == mOwnerID);
+ const bool group_owned = LLSelectMgr::getInstance()->selectIsGroupOwned() ;
+ const bool public_owned = (mOwnerID.isNull() && !LLSelectMgr::getInstance()->selectIsGroupOwned());
+ const bool can_transfer = LLSelectMgr::getInstance()->selectGetRootsTransfer();
+ const bool can_copy = LLSelectMgr::getInstance()->selectGetRootsCopy();
if (!owners_identical)
{
- getChildView("Cost")->setEnabled(FALSE);
+ getChildView("Cost")->setEnabled(false);
getChild<LLUICtrl>("Edit Cost")->setValue(LLStringUtil::null);
- getChildView("Edit Cost")->setEnabled(FALSE);
+ getChildView("Edit Cost")->setEnabled(false);
}
// You own these objects.
else if (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id,GP_OBJECT_SET_SALE)))
@@ -544,11 +544,11 @@ void LLSidepanelTaskInfo::refresh()
// set to the actual cost.
if ((num_for_sale > 0) && is_for_sale_mixed)
{
- edit_price->setTentative(TRUE);
+ edit_price->setTentative(true);
}
else if ((num_for_sale > 0) && is_sale_price_mixed)
{
- edit_price->setTentative(TRUE);
+ edit_price->setTentative(true);
}
else
{
@@ -557,15 +557,15 @@ void LLSidepanelTaskInfo::refresh()
}
// The edit fields are only enabled if you can sell this object
// and the sale price is not mixed.
- BOOL enable_edit = (num_for_sale && can_transfer) ? !is_for_sale_mixed : FALSE;
+ bool enable_edit = (num_for_sale && can_transfer) ? !is_for_sale_mixed : false;
getChildView("Cost")->setEnabled(enable_edit);
getChildView("Edit Cost")->setEnabled(enable_edit);
}
// Someone, not you, owns these objects.
else if (!public_owned)
{
- getChildView("Cost")->setEnabled(FALSE);
- getChildView("Edit Cost")->setEnabled(FALSE);
+ getChildView("Cost")->setEnabled(false);
+ getChildView("Edit Cost")->setEnabled(false);
// Don't show a price if none of the items are for sale.
if (num_for_sale)
@@ -582,10 +582,10 @@ void LLSidepanelTaskInfo::refresh()
// This is a public object.
else
{
- getChildView("Cost")->setEnabled(FALSE);
+ getChildView("Cost")->setEnabled(false);
getChild<LLSpinCtrl>("Edit Cost")->setLabel(getString("Cost Default"));
getChild<LLUICtrl>("Edit Cost")->setValue(LLStringUtil::null);
- getChildView("Edit Cost")->setEnabled(FALSE);
+ getChildView("Edit Cost")->setEnabled(false);
}
// Enable and disable the permissions checkboxes
@@ -603,22 +603,22 @@ void LLSidepanelTaskInfo::refresh()
U32 next_owner_mask_on = 0;
U32 next_owner_mask_off = 0;
- BOOL valid_base_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_BASE,
+ bool valid_base_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_BASE,
&base_mask_on,
&base_mask_off);
- //BOOL valid_owner_perms =//
+ //bool valid_owner_perms =//
LLSelectMgr::getInstance()->selectGetPerm(PERM_OWNER,
&owner_mask_on,
&owner_mask_off);
- BOOL valid_group_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_GROUP,
+ bool valid_group_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_GROUP,
&group_mask_on,
&group_mask_off);
- BOOL valid_everyone_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_EVERYONE,
+ bool valid_everyone_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_EVERYONE,
&everyone_mask_on,
&everyone_mask_off);
- BOOL valid_next_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_NEXT_OWNER,
+ bool valid_next_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_NEXT_OWNER,
&next_owner_mask_on,
&next_owner_mask_off);
@@ -628,19 +628,19 @@ void LLSidepanelTaskInfo::refresh()
if (valid_base_perms)
{
mDAB->setValue("B: " + mask_to_string(base_mask_on));
- mDAB->setVisible( TRUE);
+ mDAB->setVisible( true);
mDAO->setValue("O: " + mask_to_string(owner_mask_on));
- mDAO->setVisible( TRUE);
+ mDAO->setVisible( true);
mDAG->setValue("G: " + mask_to_string(group_mask_on));
- mDAG->setVisible( TRUE);
+ mDAG->setVisible( true);
mDAE->setValue("E: " + mask_to_string(everyone_mask_on));
- mDAE->setVisible( TRUE);
+ mDAE->setVisible( true);
mDAN->setValue("N: " + mask_to_string(next_owner_mask_on));
- mDAN->setVisible( TRUE);
+ mDAN->setVisible( true);
}
U32 flag_mask = 0x0;
@@ -650,7 +650,7 @@ void LLSidepanelTaskInfo::refresh()
if (objectp->permTransfer()) flag_mask |= PERM_TRANSFER;
mDAF->setValue("F:" + mask_to_string(flag_mask));
- mDAF->setVisible(TRUE);
+ mDAF->setVisible(true);
if (!mVisibleDebugPermissions)
{
@@ -664,12 +664,12 @@ void LLSidepanelTaskInfo::refresh()
}
else if (mVisibleDebugPermissions)
{
- mDAB->setVisible(FALSE);
- mDAO->setVisible(FALSE);
- mDAG->setVisible(FALSE);
- mDAE->setVisible(FALSE);
- mDAN->setVisible(FALSE);
- mDAF->setVisible(FALSE);
+ mDAB->setVisible(false);
+ mDAO->setVisible(false);
+ mDAG->setVisible(false);
+ mDAE->setVisible(false);
+ mDAN->setVisible(false);
+ mDAF->setVisible(false);
LLFloater* parent_floater = gFloaterView->getParentFloater(this);
LLRect parent_rect = parent_floater->getRect();
@@ -679,18 +679,18 @@ void LLSidepanelTaskInfo::refresh()
mVisibleDebugPermissions = false;
}
- BOOL has_change_perm_ability = FALSE;
- BOOL has_change_sale_ability = FALSE;
+ bool has_change_perm_ability = false;
+ bool has_change_sale_ability = false;
if (valid_base_perms && is_nonpermanent_enforced &&
(self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_MANIPULATE))))
{
- has_change_perm_ability = TRUE;
+ has_change_perm_ability = true;
}
if (valid_base_perms && is_nonpermanent_enforced &&
(self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_SET_SALE))))
{
- has_change_sale_ability = TRUE;
+ has_change_sale_ability = true;
}
if (!has_change_perm_ability && !has_change_sale_ability && !root_selected)
@@ -701,15 +701,15 @@ void LLSidepanelTaskInfo::refresh()
if (has_change_perm_ability)
{
- getChildView("checkbox share with group")->setEnabled(TRUE);
+ getChildView("checkbox share with group")->setEnabled(true);
getChildView("checkbox allow everyone move")->setEnabled(owner_mask_on & PERM_MOVE);
getChildView("checkbox allow everyone copy")->setEnabled(owner_mask_on & PERM_COPY && owner_mask_on & PERM_TRANSFER);
}
else
{
- getChildView("checkbox share with group")->setEnabled(FALSE);
- getChildView("checkbox allow everyone move")->setEnabled(FALSE);
- getChildView("checkbox allow everyone copy")->setEnabled(FALSE);
+ getChildView("checkbox share with group")->setEnabled(false);
+ getChildView("checkbox allow everyone move")->setEnabled(false);
+ getChildView("checkbox allow everyone copy")->setEnabled(false);
}
if (has_change_sale_ability && (owner_mask_on & PERM_TRANSFER))
@@ -726,32 +726,32 @@ void LLSidepanelTaskInfo::refresh()
}
else
{
- getChildView("checkbox for sale")->setEnabled(FALSE);
- getChildView("sale type")->setEnabled(FALSE);
+ getChildView("checkbox for sale")->setEnabled(false);
+ getChildView("sale type")->setEnabled(false);
- getChildView("checkbox next owner can modify")->setEnabled(FALSE);
- getChildView("checkbox next owner can copy")->setEnabled(FALSE);
- getChildView("checkbox next owner can transfer")->setEnabled(FALSE);
+ getChildView("checkbox next owner can modify")->setEnabled(false);
+ getChildView("checkbox next owner can copy")->setEnabled(false);
+ getChildView("checkbox next owner can transfer")->setEnabled(false);
}
if (valid_group_perms)
{
if ((group_mask_on & PERM_COPY) && (group_mask_on & PERM_MODIFY) && (group_mask_on & PERM_MOVE))
{
- getChild<LLUICtrl>("checkbox share with group")->setValue(TRUE);
- getChild<LLUICtrl>("checkbox share with group")->setTentative( FALSE);
+ getChild<LLUICtrl>("checkbox share with group")->setValue(true);
+ getChild<LLUICtrl>("checkbox share with group")->setTentative( false);
getChildView("button deed")->setEnabled(gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED) && (owner_mask_on & PERM_TRANSFER) && !group_owned && can_transfer);
}
else if ((group_mask_off & PERM_COPY) && (group_mask_off & PERM_MODIFY) && (group_mask_off & PERM_MOVE))
{
- getChild<LLUICtrl>("checkbox share with group")->setValue(FALSE);
- getChild<LLUICtrl>("checkbox share with group")->setTentative( FALSE);
- getChildView("button deed")->setEnabled(FALSE);
+ getChild<LLUICtrl>("checkbox share with group")->setValue(false);
+ getChild<LLUICtrl>("checkbox share with group")->setTentative( false);
+ getChildView("button deed")->setEnabled(false);
}
else
{
- getChild<LLUICtrl>("checkbox share with group")->setValue(TRUE);
- getChild<LLUICtrl>("checkbox share with group")->setTentative( TRUE);
+ getChild<LLUICtrl>("checkbox share with group")->setValue(true);
+ getChild<LLUICtrl>("checkbox share with group")->setTentative( true);
getChildView("button deed")->setEnabled(gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED) && (group_mask_on & PERM_MOVE) && (owner_mask_on & PERM_TRANSFER) && !group_owned && can_transfer);
}
}
@@ -761,35 +761,35 @@ void LLSidepanelTaskInfo::refresh()
// Move
if (everyone_mask_on & PERM_MOVE)
{
- getChild<LLUICtrl>("checkbox allow everyone move")->setValue(TRUE);
- getChild<LLUICtrl>("checkbox allow everyone move")->setTentative( FALSE);
+ getChild<LLUICtrl>("checkbox allow everyone move")->setValue(true);
+ getChild<LLUICtrl>("checkbox allow everyone move")->setTentative( false);
}
else if (everyone_mask_off & PERM_MOVE)
{
- getChild<LLUICtrl>("checkbox allow everyone move")->setValue(FALSE);
- getChild<LLUICtrl>("checkbox allow everyone move")->setTentative( FALSE);
+ getChild<LLUICtrl>("checkbox allow everyone move")->setValue(false);
+ getChild<LLUICtrl>("checkbox allow everyone move")->setTentative( false);
}
else
{
- getChild<LLUICtrl>("checkbox allow everyone move")->setValue(TRUE);
- getChild<LLUICtrl>("checkbox allow everyone move")->setTentative( TRUE);
+ getChild<LLUICtrl>("checkbox allow everyone move")->setValue(true);
+ getChild<LLUICtrl>("checkbox allow everyone move")->setTentative( true);
}
// Copy == everyone can't copy
if (everyone_mask_on & PERM_COPY)
{
- getChild<LLUICtrl>("checkbox allow everyone copy")->setValue(TRUE);
+ getChild<LLUICtrl>("checkbox allow everyone copy")->setValue(true);
getChild<LLUICtrl>("checkbox allow everyone copy")->setTentative( !can_copy || !can_transfer);
}
else if (everyone_mask_off & PERM_COPY)
{
- getChild<LLUICtrl>("checkbox allow everyone copy")->setValue(FALSE);
- getChild<LLUICtrl>("checkbox allow everyone copy")->setTentative( FALSE);
+ getChild<LLUICtrl>("checkbox allow everyone copy")->setValue(false);
+ getChild<LLUICtrl>("checkbox allow everyone copy")->setTentative( false);
}
else
{
- getChild<LLUICtrl>("checkbox allow everyone copy")->setValue(TRUE);
- getChild<LLUICtrl>("checkbox allow everyone copy")->setTentative( TRUE);
+ getChild<LLUICtrl>("checkbox allow everyone copy")->setValue(true);
+ getChild<LLUICtrl>("checkbox allow everyone copy")->setTentative( true);
}
}
@@ -798,71 +798,71 @@ void LLSidepanelTaskInfo::refresh()
// Modify == next owner canot modify
if (next_owner_mask_on & PERM_MODIFY)
{
- getChild<LLUICtrl>("checkbox next owner can modify")->setValue(TRUE);
- getChild<LLUICtrl>("checkbox next owner can modify")->setTentative( FALSE);
+ getChild<LLUICtrl>("checkbox next owner can modify")->setValue(true);
+ getChild<LLUICtrl>("checkbox next owner can modify")->setTentative( false);
}
else if (next_owner_mask_off & PERM_MODIFY)
{
- getChild<LLUICtrl>("checkbox next owner can modify")->setValue(FALSE);
- getChild<LLUICtrl>("checkbox next owner can modify")->setTentative( FALSE);
+ getChild<LLUICtrl>("checkbox next owner can modify")->setValue(false);
+ getChild<LLUICtrl>("checkbox next owner can modify")->setTentative( false);
}
else
{
- getChild<LLUICtrl>("checkbox next owner can modify")->setValue(TRUE);
- getChild<LLUICtrl>("checkbox next owner can modify")->setTentative( TRUE);
+ getChild<LLUICtrl>("checkbox next owner can modify")->setValue(true);
+ getChild<LLUICtrl>("checkbox next owner can modify")->setTentative( true);
}
// Copy == next owner cannot copy
if (next_owner_mask_on & PERM_COPY)
{
- getChild<LLUICtrl>("checkbox next owner can copy")->setValue(TRUE);
+ getChild<LLUICtrl>("checkbox next owner can copy")->setValue(true);
getChild<LLUICtrl>("checkbox next owner can copy")->setTentative( !can_copy);
}
else if (next_owner_mask_off & PERM_COPY)
{
- getChild<LLUICtrl>("checkbox next owner can copy")->setValue(FALSE);
- getChild<LLUICtrl>("checkbox next owner can copy")->setTentative( FALSE);
+ getChild<LLUICtrl>("checkbox next owner can copy")->setValue(false);
+ getChild<LLUICtrl>("checkbox next owner can copy")->setTentative( false);
}
else
{
- getChild<LLUICtrl>("checkbox next owner can copy")->setValue(TRUE);
- getChild<LLUICtrl>("checkbox next owner can copy")->setTentative( TRUE);
+ getChild<LLUICtrl>("checkbox next owner can copy")->setValue(true);
+ getChild<LLUICtrl>("checkbox next owner can copy")->setTentative( true);
}
// Transfer == next owner cannot transfer
if (next_owner_mask_on & PERM_TRANSFER)
{
- getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(TRUE);
+ getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(true);
getChild<LLUICtrl>("checkbox next owner can transfer")->setTentative( !can_transfer);
}
else if (next_owner_mask_off & PERM_TRANSFER)
{
- getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(FALSE);
- getChild<LLUICtrl>("checkbox next owner can transfer")->setTentative( FALSE);
+ getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(false);
+ getChild<LLUICtrl>("checkbox next owner can transfer")->setTentative( false);
}
else
{
- getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(TRUE);
- getChild<LLUICtrl>("checkbox next owner can transfer")->setTentative( TRUE);
+ getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(true);
+ getChild<LLUICtrl>("checkbox next owner can transfer")->setTentative( true);
}
}
// reflect sale information
LLSaleInfo sale_info;
- BOOL valid_sale_info = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info);
+ bool valid_sale_info = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info);
LLSaleInfo::EForSale sale_type = sale_info.getSaleType();
LLComboBox* combo_sale_type = getChild<LLComboBox>("sale type");
if (valid_sale_info)
{
combo_sale_type->setValue( sale_type == LLSaleInfo::FS_NOT ? LLSaleInfo::FS_COPY : sale_type);
- combo_sale_type->setTentative( FALSE); // unfortunately this doesn't do anything at the moment.
+ combo_sale_type->setTentative( false); // unfortunately this doesn't do anything at the moment.
}
else
{
// default option is sell copy, determined to be safest
combo_sale_type->setValue( LLSaleInfo::FS_COPY);
- combo_sale_type->setTentative( TRUE); // unfortunately this doesn't do anything at the moment.
+ combo_sale_type->setTentative( true); // unfortunately this doesn't do anything at the moment.
}
getChild<LLUICtrl>("checkbox for sale")->setValue((num_for_sale != 0));
@@ -880,9 +880,9 @@ void LLSidepanelTaskInfo::refresh()
}
// Check search status of objects
- const BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME );
+ const bool all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME );
bool include_in_search;
- const BOOL all_include_in_search = LLSelectMgr::getInstance()->selectionGetIncludeInSearch(&include_in_search);
+ const bool all_include_in_search = LLSelectMgr::getInstance()->selectionGetIncludeInSearch(&include_in_search);
getChildView("search_check")->setEnabled(has_change_sale_ability && all_volume);
getChild<LLUICtrl>("search_check")->setValue(include_in_search);
getChild<LLUICtrl>("search_check")->setTentative(!all_include_in_search);
@@ -922,7 +922,7 @@ void LLSidepanelTaskInfo::onClickGroup()
{
LLUUID owner_id;
std::string name;
- BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, name);
+ bool owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, name);
LLFloater* parent_floater = gFloaterView->getParentFloater(this);
if (owners_identical && (owner_id == gAgent.getID()))
@@ -945,7 +945,7 @@ void LLSidepanelTaskInfo::cbGroupID(LLUUID group_id)
{
if (mLabelGroupName)
{
- mLabelGroupName->setNameID(group_id, TRUE);
+ mLabelGroupName->setNameID(group_id, true);
}
LLSelectMgr::getInstance()->sendGroup(group_id);
}
@@ -956,13 +956,13 @@ static bool callback_deed_to_group(const LLSD& notification, const LLSD& respons
if (option == 0)
{
LLUUID group_id;
- const BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id);
+ const bool groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id);
if (group_id.notNull() && groups_identical && (gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED)))
{
- LLSelectMgr::getInstance()->sendOwner(LLUUID::null, group_id, FALSE);
+ LLSelectMgr::getInstance()->sendOwner(LLUUID::null, group_id, false);
}
}
- return FALSE;
+ return false;
}
void LLSidepanelTaskInfo::onClickDeedToGroup(void *data)
@@ -983,7 +983,7 @@ void LLSidepanelTaskInfo::onCommitPerm(LLUICtrl *ctrl, void *data, U8 field, U32
// Checkbox will have toggled itself
// LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data;
LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl;
- BOOL new_state = check->get();
+ bool new_state = check->get();
LLSelectMgr::getInstance()->selectionSetObjectPermissions(field, new_state, perm);
@@ -1213,7 +1213,7 @@ void LLSidepanelTaskInfo::onCommitIncludeInSearch(LLUICtrl* ctrl, void* data)
void LLSidepanelTaskInfo::updateVerbs()
{
LLSafeHandle<LLObjectSelection> object_selection = LLSelectMgr::getInstance()->getSelection();
- const BOOL any_selected = (object_selection->getNumNodes() > 0);
+ const bool any_selected = (object_selection->getNumNodes() > 0);
mOpenBtn->setVisible(true);
mPayBtn->setVisible(true);
@@ -1275,12 +1275,12 @@ void LLSidepanelTaskInfo::refreshAll()
if (hasFocus())
{
focus = gFocusMgr.getKeyboardFocus();
- setFocus(FALSE);
+ setFocus(false);
}
refresh();
if (focus)
{
- focus->setFocus(TRUE);
+ focus->setFocus(true);
}
}
diff --git a/indra/newview/llsidepaneltaskinfo.h b/indra/newview/llsidepaneltaskinfo.h
index 2baafc67e7..8509edd8f1 100644
--- a/indra/newview/llsidepaneltaskinfo.h
+++ b/indra/newview/llsidepaneltaskinfo.h
@@ -49,8 +49,8 @@ public:
LLSidepanelTaskInfo();
virtual ~LLSidepanelTaskInfo();
- BOOL postBuild() override;
- void onVisibilityChange ( BOOL new_visibility ) override;
+ bool postBuild() override;
+ void onVisibilityChange (bool new_visibility) override;
void setObjectSelection(LLObjectSelectionHandle selection);
diff --git a/indra/newview/llsidetraypanelcontainer.cpp b/indra/newview/llsidetraypanelcontainer.cpp
index e340333c2c..4cec761839 100644
--- a/indra/newview/llsidetraypanelcontainer.cpp
+++ b/indra/newview/llsidetraypanelcontainer.cpp
@@ -81,12 +81,12 @@ void LLSideTrayPanelContainer::openPreviousPanel()
}
}
-BOOL LLSideTrayPanelContainer::handleKeyHere(KEY key, MASK mask)
+bool LLSideTrayPanelContainer::handleKeyHere(KEY key, MASK mask)
{
// No key press handling code for Panel Container - this disables
// Tab Container's Alt + Left/Right Button tab switching.
- // Let default handler process key presses, don't simply return TRUE or FALSE
+ // Let default handler process key presses, don't simply return true or false
// as this may brake some functionality as it did with Copy/Paste for
// text_editor (ticket EXT-642).
return LLPanel::handleKeyHere(key, mask);
diff --git a/indra/newview/llsidetraypanelcontainer.h b/indra/newview/llsidetraypanelcontainer.h
index 93a85ed374..1e6e6dd487 100644
--- a/indra/newview/llsidetraypanelcontainer.h
+++ b/indra/newview/llsidetraypanelcontainer.h
@@ -31,7 +31,7 @@
/**
* LLSideTrayPanelContainer class acts like LLTabContainer with invisible tabs.
-* It is designed to make panel switching easier, avoid setVisible(TRUE) setVisible(FALSE)
+* It is designed to make panel switching easier, avoid setVisible(true) setVisible(false)
* calls and related workarounds.
* use onOpen to open sub panel, pass the name of panel to open
* in key[PARAM_SUB_PANEL_NAME].
@@ -70,7 +70,7 @@ public:
* Overrides LLTabContainer::handleKeyHere to disable panel switch on
* Alt + Left/Right button press.
*/
- BOOL handleKeyHere(KEY key, MASK mask);
+ bool handleKeyHere(KEY key, MASK mask);
/**
* Name of parameter that stores panel name to open.
diff --git a/indra/newview/llsky.cpp b/indra/newview/llsky.cpp
index 4926b86b14..f6382bf38a 100644
--- a/indra/newview/llsky.cpp
+++ b/indra/newview/llsky.cpp
@@ -73,7 +73,7 @@ LLSky::LLSky()
mFogColor.mV[VALPHA] = 0.0f;
mLightingGeneration = 0;
- mUpdatedThisFrame = TRUE;
+ mUpdatedThisFrame = true;
}
@@ -207,7 +207,7 @@ void LLSky::init()
gSky.setFogRatio(gSavedSettings.getF32("RenderFogRatio"));
- mUpdatedThisFrame = TRUE;
+ mUpdatedThisFrame = true;
}
diff --git a/indra/newview/llsky.h b/indra/newview/llsky.h
index cce645e2be..65495e4615 100644
--- a/indra/newview/llsky.h
+++ b/indra/newview/llsky.h
@@ -72,7 +72,7 @@ public:
void updateSky();
S32 mLightingGeneration;
- BOOL mUpdatedThisFrame;
+ bool mUpdatedThisFrame;
void setFogRatio(const F32 fog_ratio); // Fog distance as fraction of cull distance.
F32 getFogRatio() const;
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp
index 2ff8f50277..63b1dca693 100644
--- a/indra/newview/llsnapshotlivepreview.cpp
+++ b/indra/newview/llsnapshotlivepreview.cpp
@@ -56,16 +56,16 @@
#include "llworld.h"
#include <boost/filesystem.hpp>
-const F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f;
+constexpr F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f;
-F32 SHINE_TIME = 0.5f;
-F32 SHINE_WIDTH = 0.6f;
-F32 SHINE_OPACITY = 0.3f;
-F32 FALL_TIME = 0.6f;
-S32 BORDER_WIDTH = 6;
-S32 TOP_PANEL_HEIGHT = 30;
+constexpr F32 SHINE_TIME = 0.5f;
+constexpr F32 SHINE_WIDTH = 0.6f;
+constexpr F32 SHINE_OPACITY = 0.3f;
+constexpr F32 FALL_TIME = 0.6f;
+constexpr S32 BORDER_WIDTH = 6;
+constexpr S32 TOP_PANEL_HEIGHT = 30;
-const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512
+constexpr S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512
std::set<LLSnapshotLivePreview*> LLSnapshotLivePreview::sList;
LLPointer<LLImageFormatted> LLSnapshotLivePreview::sSaveLocalImage = NULL;
@@ -79,24 +79,24 @@ LLSnapshotLivePreview::LLSnapshotLivePreview (const LLSnapshotLivePreview::Param
mBigThumbnailImage(NULL) ,
mThumbnailWidth(0),
mThumbnailHeight(0),
- mThumbnailSubsampled(FALSE),
+ mThumbnailSubsampled(false),
mPreviewImageEncoded(NULL),
mFormattedImage(NULL),
mShineCountdown(0),
mFlashAlpha(0.f),
- mNeedsFlash(TRUE),
+ mNeedsFlash(true),
mSnapshotQuality(gSavedSettings.getS32("SnapshotQuality")),
mDataSize(0),
mSnapshotType(LLSnapshotModel::SNAPSHOT_POSTCARD),
mSnapshotFormat(LLSnapshotModel::ESnapshotFormat(gSavedSettings.getS32("SnapshotFormat"))),
- mSnapshotUpToDate(FALSE),
+ mSnapshotUpToDate(false),
mCameraPos(LLViewerCamera::getInstance()->getOrigin()),
mCameraRot(LLViewerCamera::getInstance()->getQuaternion()),
- mSnapshotActive(FALSE),
+ mSnapshotActive(false),
mSnapshotBufferType(LLSnapshotModel::SNAPSHOT_TYPE_COLOR),
mFilterName(""),
- mAllowRenderUI(TRUE),
- mAllowFullScreenPreview(TRUE),
+ mAllowRenderUI(true),
+ mAllowFullScreenPreview(true),
mViewContainer(NULL)
{
setSnapshotQuality(gSavedSettings.getS32("SnapshotQuality"));
@@ -109,16 +109,16 @@ LLSnapshotLivePreview::LLSnapshotLivePreview (const LLSnapshotLivePreview::Param
mWidth[1] = gViewerWindow->getWindowWidthRaw();
mHeight[0] = gViewerWindow->getWindowHeightRaw();
mHeight[1] = gViewerWindow->getWindowHeightRaw();
- mImageScaled[0] = FALSE;
- mImageScaled[1] = FALSE;
+ mImageScaled[0] = false;
+ mImageScaled[1] = false;
mMaxImageSize = MAX_SNAPSHOT_IMAGE_SIZE ;
mKeepAspectRatio = gSavedSettings.getBOOL("KeepAspectForSnapshot") ;
- mThumbnailUpdateLock = FALSE ;
- mThumbnailUpToDate = FALSE ;
- mBigThumbnailUpToDate = FALSE ;
+ mThumbnailUpdateLock = false ;
+ mThumbnailUpToDate = false ;
+ mBigThumbnailUpToDate = false ;
- mForceUpdateSnapshot = FALSE;
+ mForceUpdateSnapshot = false;
}
LLSnapshotLivePreview::~LLSnapshotLivePreview()
@@ -153,7 +153,7 @@ F32 LLSnapshotLivePreview::getImageAspect()
return (mKeepAspectRatio ? ((F32)getRect().getWidth()) / ((F32)getRect().getHeight()) : ((F32)getWidth()) / ((F32)getHeight()));
}
-void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail, F32 delay)
+void LLSnapshotLivePreview::updateSnapshot(bool new_snapshot, bool new_thumbnail, F32 delay)
{
LL_DEBUGS("Snapshot") << "updateSnapshot: mSnapshotUpToDate = " << getSnapshotUpToDate() << LL_ENDL;
@@ -167,7 +167,7 @@ void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail
setSize(mWidth[old_image_index], mHeight[old_image_index]);
mFallAnimTimer.start();
}
- mSnapshotUpToDate = FALSE;
+ mSnapshotUpToDate = false;
// Update snapshot source rect depending on whether we keep the aspect ratio.
LLRect& rect = mImageRect[mCurImageIndex];
@@ -212,8 +212,8 @@ void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail
// Update thumbnail if requested.
if (new_thumbnail)
{
- mThumbnailUpToDate = FALSE ;
- mBigThumbnailUpToDate = FALSE;
+ mThumbnailUpToDate = false ;
+ mBigThumbnailUpToDate = false;
}
}
@@ -241,7 +241,7 @@ void LLSnapshotLivePreview::drawPreviewRect(S32 offset_x, S32 offset_y, LLColor4
glLineWidth(2.0f * line_width) ;
LLColor4 color(0.0f, 0.0f, 0.0f, 1.0f) ;
gl_rect_2d( mPreviewRect.mLeft + offset_x, mPreviewRect.mTop + offset_y,
- mPreviewRect.mRight + offset_x, mPreviewRect.mBottom + offset_y, color, FALSE ) ;
+ mPreviewRect.mRight + offset_x, mPreviewRect.mBottom + offset_y, color, false ) ;
glLineWidth(line_width) ;
//draw four alpha rectangles to cover areas outside of the snapshot image
@@ -254,20 +254,20 @@ void LLSnapshotLivePreview::drawPreviewRect(S32 offset_x, S32 offset_y, LLColor4
dwr = mThumbnailWidth - mPreviewRect.getWidth() - dwl ;
gl_rect_2d(mPreviewRect.mLeft + offset_x - dwl, mPreviewRect.mTop + offset_y,
- mPreviewRect.mLeft + offset_x, mPreviewRect.mBottom + offset_y, alpha_color, TRUE ) ;
+ mPreviewRect.mLeft + offset_x, mPreviewRect.mBottom + offset_y, alpha_color, true ) ;
gl_rect_2d( mPreviewRect.mRight + offset_x, mPreviewRect.mTop + offset_y,
- mPreviewRect.mRight + offset_x + dwr, mPreviewRect.mBottom + offset_y, alpha_color, TRUE ) ;
+ mPreviewRect.mRight + offset_x + dwr, mPreviewRect.mBottom + offset_y, alpha_color, true ) ;
}
if(mThumbnailHeight > mPreviewRect.getHeight())
{
S32 dh = (mThumbnailHeight - mPreviewRect.getHeight()) >> 1 ;
gl_rect_2d(mPreviewRect.mLeft + offset_x - dwl, mPreviewRect.mBottom + offset_y ,
- mPreviewRect.mRight + offset_x + dwr, mPreviewRect.mBottom + offset_y - dh, alpha_color, TRUE ) ;
+ mPreviewRect.mRight + offset_x + dwr, mPreviewRect.mBottom + offset_y - dh, alpha_color, true ) ;
dh = mThumbnailHeight - mPreviewRect.getHeight() - dh ;
gl_rect_2d( mPreviewRect.mLeft + offset_x - dwl, mPreviewRect.mTop + offset_y + dh,
- mPreviewRect.mRight + offset_x + dwr, mPreviewRect.mTop + offset_y, alpha_color, TRUE ) ;
+ mPreviewRect.mRight + offset_x + dwr, mPreviewRect.mTop + offset_y, alpha_color, true ) ;
}
}
}
@@ -323,7 +323,7 @@ void LLSnapshotLivePreview::draw()
}
else
{
- mNeedsFlash = FALSE;
+ mNeedsFlash = false;
}
}
else
@@ -398,7 +398,7 @@ void LLSnapshotLivePreview::draw()
gGL.getTexUnit(0)->bind(mViewerImage[old_image_index]);
// calculate UV scale
// *FIX get this to work with old image
- BOOL rescale = !mImageScaled[old_image_index] && mViewerImage[mCurImageIndex].notNull();
+ bool rescale = !mImageScaled[old_image_index] && mViewerImage[mCurImageIndex].notNull();
F32 uv_width = rescale ? llmin((F32)mWidth[old_image_index] / (F32)mViewerImage[mCurImageIndex]->getWidth(), 1.f) : 1.f;
F32 uv_height = rescale ? llmin((F32)mHeight[old_image_index] / (F32)mViewerImage[mCurImageIndex]->getHeight(), 1.f) : 1.f;
gGL.pushMatrix();
@@ -428,7 +428,7 @@ void LLSnapshotLivePreview::draw()
}
/*virtual*/
-void LLSnapshotLivePreview::reshape(S32 width, S32 height, BOOL called_from_parent)
+void LLSnapshotLivePreview::reshape(S32 width, S32 height, bool called_from_parent)
{
LLRect old_rect = getRect();
LLView::reshape(width, height, called_from_parent);
@@ -439,18 +439,18 @@ void LLSnapshotLivePreview::reshape(S32 width, S32 height, BOOL called_from_pare
{
// We usually resize only on window reshape, so give it a chance to redraw, assign delay
updateSnapshot(
- TRUE, // new snapshot is needed
- FALSE, // thumbnail will be updated either way.
+ true, // new snapshot is needed
+ false, // thumbnail will be updated either way.
AUTO_SNAPSHOT_TIME_DELAY); // shutter delay.
}
}
}
-BOOL LLSnapshotLivePreview::setThumbnailImageSize()
+bool LLSnapshotLivePreview::setThumbnailImageSize()
{
if (getWidth() < 10 || getHeight() < 10)
{
- return FALSE ;
+ return false ;
}
S32 width = (mThumbnailSubsampled ? mPreviewImage->getWidth() : gViewerWindow->getWindowWidthRaw());
S32 height = (mThumbnailSubsampled ? mPreviewImage->getHeight() : gViewerWindow->getWindowHeightRaw()) ;
@@ -476,7 +476,7 @@ BOOL LLSnapshotLivePreview::setThumbnailImageSize()
if (mThumbnailWidth > width || mThumbnailHeight > height)
{
- return FALSE ;//if the window is too small, ignore thumbnail updating.
+ return false ;//if the window is too small, ignore thumbnail updating.
}
S32 left = 0 , top = mThumbnailHeight, right = mThumbnailWidth, bottom = 0 ;
@@ -500,10 +500,10 @@ BOOL LLSnapshotLivePreview::setThumbnailImageSize()
}
mPreviewRect.set(left - 1, top + 1, right + 1, bottom - 1) ;
- return TRUE ;
+ return true ;
}
-void LLSnapshotLivePreview::generateThumbnailImage(BOOL force_update)
+void LLSnapshotLivePreview::generateThumbnailImage(bool force_update)
{
if(mThumbnailUpdateLock) //in the process of updating
{
@@ -519,17 +519,17 @@ void LLSnapshotLivePreview::generateThumbnailImage(BOOL force_update)
}
////lock updating
- mThumbnailUpdateLock = TRUE ;
+ mThumbnailUpdateLock = true ;
if(!setThumbnailImageSize())
{
- mThumbnailUpdateLock = FALSE ;
- mThumbnailUpToDate = TRUE ;
+ mThumbnailUpdateLock = false ;
+ mThumbnailUpToDate = true ;
return ;
}
// Invalidate the big thumbnail when we regenerate the small one
- mBigThumbnailUpToDate = FALSE;
+ mBigThumbnailUpToDate = false;
if(mThumbnailImage)
{
@@ -558,7 +558,7 @@ void LLSnapshotLivePreview::generateThumbnailImage(BOOL force_update)
mThumbnailWidth, mThumbnailHeight,
mAllowRenderUI && gSavedSettings.getBOOL("RenderUIInSnapshot"),
gSavedSettings.getBOOL("RenderHUDInSnapshot"),
- FALSE,
+ false,
gSavedSettings.getBOOL("RenderSnapshotNoPost"),
mSnapshotBufferType) )
{
@@ -585,12 +585,12 @@ void LLSnapshotLivePreview::generateThumbnailImage(BOOL force_update)
}
// Scale to a power of 2 so it can be mapped to a texture
raw->expandToPowerOfTwo();
- mThumbnailImage = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE);
- mThumbnailUpToDate = TRUE ;
+ mThumbnailImage = LLViewerTextureManager::getLocalTexture(raw.get(), false);
+ mThumbnailUpToDate = true ;
}
//unlock updating
- mThumbnailUpdateLock = FALSE ;
+ mThumbnailUpdateLock = false ;
}
LLViewerTexture* LLSnapshotLivePreview::getBigThumbnailImage()
@@ -633,38 +633,38 @@ LLViewerTexture* LLSnapshotLivePreview::getBigThumbnailImage()
}
// Scale to a power of 2 so it can be mapped to a texture
raw->expandToPowerOfTwo();
- mBigThumbnailImage = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE);
- mBigThumbnailUpToDate = TRUE ;
+ mBigThumbnailImage = LLViewerTextureManager::getLocalTexture(raw.get(), false);
+ mBigThumbnailUpToDate = true ;
}
return mBigThumbnailImage ;
}
// Called often. Checks whether it's time to grab a new snapshot and if so, does it.
-// Returns TRUE if new snapshot generated, FALSE otherwise.
+// Returns true if new snapshot generated, false otherwise.
//static
-BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
+bool LLSnapshotLivePreview::onIdle( void* snapshot_preview )
{
LLSnapshotLivePreview* previewp = (LLSnapshotLivePreview*)snapshot_preview;
if (previewp->getWidth() == 0 || previewp->getHeight() == 0)
{
LL_WARNS("Snapshot") << "Incorrect dimensions: " << previewp->getWidth() << "x" << previewp->getHeight() << LL_ENDL;
- return FALSE;
+ return false;
}
if (previewp->mSnapshotDelayTimer.getStarted()) // Wait for a snapshot delay timer
{
if (!previewp->mSnapshotDelayTimer.hasExpired())
{
- return FALSE;
+ return false;
}
previewp->mSnapshotDelayTimer.stop();
}
if (LLToolCamera::getInstance()->hasMouseCapture()) // Hide full-screen preview while camming, either don't take snapshots while ALT-zoom active
{
- previewp->setVisible(FALSE);
- return FALSE;
+ previewp->setVisible(false);
+ return false;
}
// If we're in freeze-frame and/or auto update mode and camera has moved, update snapshot.
@@ -678,18 +678,18 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
previewp->mCameraPos = new_camera_pos;
previewp->mCameraRot = new_camera_rot;
// request a new snapshot whenever the camera moves, with a time delay
- BOOL new_snapshot = gSavedSettings.getBOOL("AutoSnapshot") || previewp->mForceUpdateSnapshot;
+ bool new_snapshot = gSavedSettings.getBOOL("AutoSnapshot") || previewp->mForceUpdateSnapshot;
LL_DEBUGS("Snapshot") << "camera moved, updating thumbnail" << LL_ENDL;
previewp->updateSnapshot(
new_snapshot, // whether a new snapshot is needed or merely invalidate the existing one
- FALSE, // or if 1st arg is false, whether to produce a new thumbnail image.
+ false, // or if 1st arg is false, whether to produce a new thumbnail image.
new_snapshot ? AUTO_SNAPSHOT_TIME_DELAY : 0.f); // shutter delay if 1st arg is true.
- previewp->mForceUpdateSnapshot = FALSE;
+ previewp->mForceUpdateSnapshot = false;
}
if (previewp->getSnapshotUpToDate() && previewp->getThumbnailUpToDate())
{
- return FALSE;
+ return false;
}
// time to produce a snapshot
@@ -701,13 +701,13 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
previewp->mPreviewImage = new LLImageRaw;
}
- previewp->mSnapshotActive = TRUE;
+ previewp->mSnapshotActive = true;
- previewp->setVisible(FALSE);
- previewp->setEnabled(FALSE);
+ previewp->setVisible(false);
+ previewp->setEnabled(false);
previewp->getWindow()->incBusyCount();
- previewp->setImageScaled(FALSE);
+ previewp->setImageScaled(false);
// grab the raw image
if (gViewerWindow->rawSnapshot(
@@ -718,7 +718,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
previewp->getSnapshotType() == LLSnapshotModel::SNAPSHOT_TEXTURE,
previewp->mAllowRenderUI && gSavedSettings.getBOOL("RenderUIInSnapshot"),
gSavedSettings.getBOOL("RenderHUDInSnapshot"),
- FALSE,
+ false,
gSavedSettings.getBOOL("RenderSnapshotNoPost"),
previewp->mSnapshotBufferType,
previewp->getMaxImageSize()))
@@ -737,15 +737,15 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
}
// The snapshot is updated now...
- previewp->mSnapshotUpToDate = TRUE;
+ previewp->mSnapshotUpToDate = true;
// We need to update the thumbnail though
previewp->setThumbnailImageSize();
- previewp->generateThumbnailImage(TRUE) ;
+ previewp->generateThumbnailImage(true) ;
}
previewp->getWindow()->decBusyCount();
previewp->setVisible(gSavedSettings.getBOOL("UseFreezeFrame") && previewp->mAllowFullScreenPreview); // only show fullscreen preview when in freeze frame mode
- previewp->mSnapshotActive = FALSE;
+ previewp->mSnapshotActive = false;
LL_DEBUGS("Snapshot") << "done creating snapshot" << LL_ENDL;
}
@@ -760,7 +760,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
previewp->mViewContainer->notify(LLSD().with("snapshot-updated", true));
}
- return TRUE;
+ return true;
}
void LLSnapshotLivePreview::prepareFreezeFrame()
@@ -768,6 +768,8 @@ void LLSnapshotLivePreview::prepareFreezeFrame()
// Get the decoded version of the formatted image
getEncodedImage();
+ LLImageDataSharedLock lock(mPreviewImageEncoded);
+
// We need to scale that a bit for display...
LLPointer<LLImageRaw> scaled = new LLImageRaw(
mPreviewImageEncoded->getData(),
@@ -782,15 +784,15 @@ void LLSnapshotLivePreview::prepareFreezeFrame()
{
// go ahead and shrink image to appropriate power of 2 for display
scaled->biasedScaleToPowerOfTwo(1024);
- setImageScaled(TRUE);
+ setImageScaled(true);
}
else
{
// expand image but keep original image data intact
- scaled->expandToPowerOfTwo(1024, FALSE);
+ scaled->expandToPowerOfTwo(1024, false);
}
- mViewerImage[mCurImageIndex] = LLViewerTextureManager::getLocalTexture(scaled.get(), FALSE);
+ mViewerImage[mCurImageIndex] = LLViewerTextureManager::getLocalTexture(scaled.get(), false);
LLPointer<LLViewerTexture> curr_preview_image = mViewerImage[mCurImageIndex];
gGL.getTexUnit(0)->bind(curr_preview_image);
curr_preview_image->setFilteringOption(getSnapshotType() == LLSnapshotModel::SNAPSHOT_TEXTURE ? LLTexUnit::TFO_ANISOTROPIC : LLTexUnit::TFO_POINT);
@@ -827,13 +829,15 @@ LLPointer<LLImageRaw> LLSnapshotLivePreview::getEncodedImage()
{
if (!mPreviewImageEncoded)
{
+ LLImageDataSharedLock lock(mPreviewImage);
+
mPreviewImageEncoded = new LLImageRaw;
-
+
mPreviewImageEncoded->resize(
mPreviewImage->getWidth(),
mPreviewImage->getHeight(),
mPreviewImage->getComponents());
-
+
if (getSnapshotType() == LLSnapshotModel::SNAPSHOT_TEXTURE)
{
// We don't store the intermediate formatted image in mFormattedImage in the J2C case
@@ -847,7 +851,7 @@ LLPointer<LLImageRaw> LLSnapshotLivePreview::getEncodedImage()
mPreviewImage->getComponents());
// Scale it as required by J2C
scaled->biasedScaleToPowerOfTwo(MAX_TEXTURE_SIZE);
- setImageScaled(TRUE);
+ setImageScaled(true);
// Compress to J2C
if (formatted->encode(scaled, 0.f))
{
@@ -978,8 +982,10 @@ void LLSnapshotLivePreview::getSize(S32& w, S32& h) const
h = getHeight();
}
-void LLSnapshotLivePreview::saveTexture(BOOL outfit_snapshot, std::string name)
+void LLSnapshotLivePreview::saveTexture(bool outfit_snapshot, std::string name)
{
+ LLImageDataSharedLock lock(mPreviewImage);
+
LL_DEBUGS("Snapshot") << "saving texture: " << mPreviewImage->getWidth() << "x" << mPreviewImage->getHeight() << LL_ENDL;
// gen a new uuid for this asset
LLTransactionID tid;
@@ -1059,5 +1065,5 @@ void LLSnapshotLivePreview::saveLocal(LLPointer<LLImageFormatted> image, const s
{
sSaveLocalImage = image;
- gViewerWindow->saveImageNumbered(sSaveLocalImage, FALSE, success_cb, failure_cb);
+ gViewerWindow->saveImageNumbered(sSaveLocalImage, false, success_cb, failure_cb);
}
diff --git a/indra/newview/llsnapshotlivepreview.h b/indra/newview/llsnapshotlivepreview.h
index 6e38a957b4..2a4b7c020a 100644
--- a/indra/newview/llsnapshotlivepreview.h
+++ b/indra/newview/llsnapshotlivepreview.h
@@ -59,7 +59,7 @@ public:
void setContainer(LLView* container) { mViewContainer = container; }
/*virtual*/ void draw();
- /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent);
+ /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent);
void setSize(S32 w, S32 h);
void setWidth(S32 w) { mWidth[mCurImageIndex] = w; }
@@ -76,32 +76,32 @@ public:
LLSnapshotModel::ESnapshotType getSnapshotType() const { return mSnapshotType; }
LLSnapshotModel::ESnapshotFormat getSnapshotFormat() const { return mSnapshotFormat; }
- BOOL getSnapshotUpToDate() const { return mSnapshotUpToDate; }
- BOOL isSnapshotActive() { return mSnapshotActive; }
+ bool getSnapshotUpToDate() const { return mSnapshotUpToDate; }
+ bool isSnapshotActive() { return mSnapshotActive; }
LLViewerTexture* getThumbnailImage() const { return mThumbnailImage ; }
S32 getThumbnailWidth() const { return mThumbnailWidth ; }
S32 getThumbnailHeight() const { return mThumbnailHeight ; }
- BOOL getThumbnailLock() const { return mThumbnailUpdateLock ; }
- BOOL getThumbnailUpToDate() const { return mThumbnailUpToDate ;}
- void setThumbnailSubsampled(BOOL subsampled) { mThumbnailSubsampled = subsampled; }
+ bool getThumbnailLock() const { return mThumbnailUpdateLock ; }
+ bool getThumbnailUpToDate() const { return mThumbnailUpToDate ;}
+ void setThumbnailSubsampled(bool subsampled) { mThumbnailSubsampled = subsampled; }
LLViewerTexture* getCurrentImage();
F32 getImageAspect();
const LLRect& getImageRect() const { return mImageRect[mCurImageIndex]; }
- BOOL isImageScaled() const { return mImageScaled[mCurImageIndex]; }
- void setImageScaled(BOOL scaled) { mImageScaled[mCurImageIndex] = scaled; }
+ bool isImageScaled() const { return mImageScaled[mCurImageIndex]; }
+ void setImageScaled(bool scaled) { mImageScaled[mCurImageIndex] = scaled; }
const LLVector3d& getPosTakenGlobal() const { return mPosTakenGlobal; }
void setSnapshotType(LLSnapshotModel::ESnapshotType type) { mSnapshotType = type; }
void setSnapshotFormat(LLSnapshotModel::ESnapshotFormat format);
bool setSnapshotQuality(S32 quality, bool set_by_user = true);
void setSnapshotBufferType(LLSnapshotModel::ESnapshotLayerType type) { mSnapshotBufferType = type; }
- void setAllowRenderUI(BOOL allow) { mAllowRenderUI = allow; }
- void setAllowFullScreenPreview(BOOL allow) { mAllowFullScreenPreview = allow; }
+ void setAllowRenderUI(bool allow) { mAllowRenderUI = allow; }
+ void setAllowFullScreenPreview(bool allow) { mAllowFullScreenPreview = allow; }
void setFilter(std::string filter_name) { mFilterName = filter_name; }
std::string getFilter() const { return mFilterName; }
- void updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail = FALSE, F32 delay = 0.f);
- void saveTexture(BOOL outfit_snapshot = FALSE, std::string name = "");
+ void updateSnapshot(bool new_snapshot, bool new_thumbnail = false, F32 delay = 0.f);
+ void saveTexture(bool outfit_snapshot = false, std::string name = "");
void saveLocal(const snapshot_saved_signal_t::slot_type& success_cb, const snapshot_saved_signal_t::slot_type& failure_cb);
LLPointer<LLImageFormatted> getFormattedImage();
@@ -110,8 +110,8 @@ public:
/// Sets size of preview thumbnail image and the surrounding rect.
void setThumbnailPlaceholderRect(const LLRect& rect) {mThumbnailPlaceholderRect = rect; }
- BOOL setThumbnailImageSize() ;
- void generateThumbnailImage(BOOL force_update = FALSE) ;
+ bool setThumbnailImageSize() ;
+ void generateThumbnailImage(bool force_update = false) ;
void resetThumbnailImage() { mThumbnailImage = NULL ; }
void drawPreviewRect(S32 offset_x, S32 offset_y, LLColor4 alpha_color = LLColor4(0.5f, 0.5f, 0.5f, 0.8f));
void prepareFreezeFrame();
@@ -120,8 +120,8 @@ public:
S32 getBigThumbnailWidth() const { return mBigThumbnailWidth ; }
S32 getBigThumbnailHeight() const { return mBigThumbnailHeight ; }
- // Returns TRUE when snapshot generated, FALSE otherwise.
- static BOOL onIdle( void* snapshot_preview );
+ // Returns true when snapshot generated, false otherwise.
+ static bool onIdle( void* snapshot_preview );
private:
LLView* mViewContainer;
@@ -131,7 +131,7 @@ private:
LLRect mImageRect[2];
S32 mWidth[2];
S32 mHeight[2];
- BOOL mImageScaled[2];
+ bool mImageScaled[2];
S32 mMaxImageSize ;
//thumbnail image
@@ -139,38 +139,38 @@ private:
S32 mThumbnailWidth ;
S32 mThumbnailHeight ;
LLRect mPreviewRect ;
- BOOL mThumbnailUpdateLock ;
- BOOL mThumbnailUpToDate ;
+ bool mThumbnailUpdateLock ;
+ bool mThumbnailUpToDate ;
LLRect mThumbnailPlaceholderRect;
- BOOL mThumbnailSubsampled; // TRUE if the thumbnail is a subsampled version of the mPreviewImage
+ bool mThumbnailSubsampled; // true if the thumbnail is a subsampled version of the mPreviewImage
LLPointer<LLViewerTexture> mBigThumbnailImage ;
S32 mBigThumbnailWidth;
S32 mBigThumbnailHeight;
- BOOL mBigThumbnailUpToDate;
+ bool mBigThumbnailUpToDate;
S32 mCurImageIndex;
// The logic is mPreviewImage (raw frame) -> mFormattedImage (formatted / filtered) -> mPreviewImageEncoded (decoded back, to show artifacts)
LLPointer<LLImageRaw> mPreviewImage;
LLPointer<LLImageRaw> mPreviewImageEncoded;
LLPointer<LLImageFormatted> mFormattedImage;
- BOOL mAllowRenderUI;
- BOOL mAllowFullScreenPreview;
+ bool mAllowRenderUI;
+ bool mAllowFullScreenPreview;
LLFrameTimer mSnapshotDelayTimer;
S32 mShineCountdown;
LLFrameTimer mShineAnimTimer;
F32 mFlashAlpha;
- BOOL mNeedsFlash;
+ bool mNeedsFlash;
LLVector3d mPosTakenGlobal;
S32 mSnapshotQuality;
S32 mDataSize;
LLSnapshotModel::ESnapshotType mSnapshotType;
LLSnapshotModel::ESnapshotFormat mSnapshotFormat;
- BOOL mSnapshotUpToDate;
+ bool mSnapshotUpToDate;
LLFrameTimer mFallAnimTimer;
LLVector3 mCameraPos;
LLQuaternion mCameraRot;
- BOOL mSnapshotActive;
+ bool mSnapshotActive;
LLSnapshotModel::ESnapshotLayerType mSnapshotBufferType;
std::string mFilterName;
@@ -178,8 +178,8 @@ private:
public:
static std::set<LLSnapshotLivePreview*> sList;
- BOOL mKeepAspectRatio ;
- BOOL mForceUpdateSnapshot;
+ bool mKeepAspectRatio ;
+ bool mForceUpdateSnapshot;
};
#endif // LL_LLSNAPSHOTLIVEPREVIEW_H
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index faf6f15015..2498a54ada 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -47,6 +47,7 @@
#include "pipeline.h"
#include "llmeshrepository.h"
#include "llrender.h"
+#include "lldrawpool.h"
#include "lloctree.h"
#include "llphysicsshapebuilderutil.h"
#include "llvoavatar.h"
@@ -69,7 +70,7 @@ static F32 sCurMaxTexPriority = 1.f;
//static counter for frame to switch LOD on
-void sg_assert(BOOL expr)
+void sg_assert(bool expr)
{
#if LL_OCTREE_PARANOIA_CHECK
if (!expr)
@@ -135,7 +136,7 @@ void LLSpatialGroup::clearDrawMap()
mDrawMap.clear();
}
-BOOL LLSpatialGroup::isHUDGroup()
+bool LLSpatialGroup::isHUDGroup()
{
return getSpatialPartition() && getSpatialPartition()->isHUDPartition() ;
}
@@ -217,7 +218,7 @@ void LLSpatialGroup::validateDrawMap()
#endif
}
-BOOL LLSpatialGroup::updateInGroup(LLDrawable *drawablep, BOOL immediate)
+bool LLSpatialGroup::updateInGroup(LLDrawable *drawablep, bool immediate)
{
LL_PROFILE_ZONE_SCOPED;
drawablep->updateSpatialExtents();
@@ -232,10 +233,10 @@ BOOL LLSpatialGroup::updateInGroup(LLDrawable *drawablep, BOOL immediate)
unbound();
setState(OBJECT_DIRTY);
//setState(GEOM_DIRTY);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void LLSpatialGroup::expandExtents(const LLVector4a* addingExtents, const LLXformMatrix& currentTransform)
@@ -292,11 +293,11 @@ void LLSpatialGroup::expandExtents(const LLVector4a* addingExtents, const LLXfor
mBounds[1].mul(0.5f);
}
-BOOL LLSpatialGroup::addObject(LLDrawable *drawablep)
+bool LLSpatialGroup::addObject(LLDrawable *drawablep)
{
if(!drawablep)
{
- return FALSE;
+ return false;
}
{
drawablep->setGroup(this);
@@ -313,7 +314,7 @@ BOOL LLSpatialGroup::addObject(LLDrawable *drawablep)
}
}
- return TRUE;
+ return true;
}
void LLSpatialGroup::rebuildGeom()
@@ -406,13 +407,13 @@ LLSpatialGroup* LLSpatialGroup::getParent()
return (LLSpatialGroup*)LLViewerOctreeGroup::getParent();
}
-BOOL LLSpatialGroup::removeObject(LLDrawable *drawablep, BOOL from_octree)
+bool LLSpatialGroup::removeObject(LLDrawable *drawablep, bool from_octree)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL
if(!drawablep)
{
- return FALSE;
+ return false;
}
unbound();
@@ -443,7 +444,7 @@ BOOL LLSpatialGroup::removeObject(LLDrawable *drawablep, BOOL from_octree)
clearDrawMap();
}
}
- return TRUE;
+ return true;
}
void LLSpatialGroup::shift(const LLVector4a &offset)
@@ -726,14 +727,14 @@ F32 LLSpatialGroup::getUpdateUrgency() const
}
}
-BOOL LLSpatialGroup::changeLOD()
+bool LLSpatialGroup::changeLOD()
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL
if (hasState(ALPHA_DIRTY | OBJECT_DIRTY))
{
//a rebuild is going to happen, update distance and LoD
- return TRUE;
+ return true;
}
if (getSpatialPartition()->mSlopRatio > 0.f)
@@ -762,16 +763,16 @@ BOOL LLSpatialGroup::changeLOD()
<< " fab ratio " << fabsf(ratio)
<< " slop " << getSpatialPartition()->mSlopRatio << LL_ENDL;
- return TRUE;
+ return true;
}
}
if (needsUpdate())
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void LLSpatialGroup::handleInsertion(const TreeNode* node, LLViewerOctreeEntry* entry)
@@ -783,7 +784,7 @@ void LLSpatialGroup::handleInsertion(const TreeNode* node, LLViewerOctreeEntry*
void LLSpatialGroup::handleRemoval(const TreeNode* node, LLViewerOctreeEntry* entry)
{
- removeObject((LLDrawable*)entry->getDrawable(), TRUE);
+ removeObject((LLDrawable*)entry->getDrawable(), true);
LLViewerOctreeGroup::handleRemoval(node, entry);
}
@@ -910,15 +911,15 @@ void LLSpatialGroup::destroyGLState(bool keep_occlusion)
//==============================================
-LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, LLViewerRegion* regionp)
+LLSpatialPartition::LLSpatialPartition(U32 data_mask, bool render_by_group, LLViewerRegion* regionp)
: mRenderByGroup(render_by_group), mBridge(NULL)
{
mRegionp = regionp;
mPartitionType = LLViewerRegion::PARTITION_NONE;
mVertexDataMask = data_mask;
- mDepthMask = FALSE;
+ mDepthMask = false;
mSlopRatio = 0.25f;
- mInfiniteFarClip = FALSE;
+ mInfiniteFarClip = false;
new LLSpatialGroup(mOctree, this);
}
@@ -929,7 +930,7 @@ LLSpatialPartition::~LLSpatialPartition()
cleanup();
}
-LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible)
+LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, bool was_visible)
{
LL_PROFILE_ZONE_SCOPED;
drawablep->updateSpatialExtents();
@@ -955,7 +956,7 @@ LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible)
return group;
}
-BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp)
+bool LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp)
{
LL_PROFILE_ZONE_SCOPED;
if (!curp->removeObject(drawablep))
@@ -969,10 +970,10 @@ BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp)
assert_octree_valid(mOctree);
- return TRUE;
+ return true;
}
-void LLSpatialPartition::move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL immediate)
+void LLSpatialPartition::move(LLDrawable *drawablep, LLSpatialGroup *curp, bool immediate)
{
LL_PROFILE_ZONE_SCOPED;
// sanity check submitted by open source user bushing Spatula
@@ -983,7 +984,7 @@ void LLSpatialPartition::move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL
return;
}
- BOOL was_visible = curp ? curp->isVisible() : FALSE;
+ bool was_visible = curp ? curp->isVisible() : false;
if (curp && curp->getSpatialPartition() != this)
{
@@ -1132,7 +1133,7 @@ class LLOctreeCullVisExtents: public LLOctreeCullShadow
{
public:
LLOctreeCullVisExtents(LLCamera* camera, LLVector4a& min, LLVector4a& max)
- : LLOctreeCullShadow(camera), mMin(min), mMax(max), mEmpty(TRUE) { }
+ : LLOctreeCullShadow(camera), mMin(min), mMax(max), mEmpty(true) { }
virtual bool earlyFail(LLViewerOctreeGroup* base_group)
{
@@ -1185,7 +1186,7 @@ public:
{
if (AABBInFrustumObjectBounds(group) > 0)
{
- mEmpty = FALSE;
+ mEmpty = false;
const LLVector4a* exts = group->getObjectExtents();
update_min_max(mMin, mMax, exts[0]);
update_min_max(mMin, mMax, exts[1]);
@@ -1193,14 +1194,14 @@ public:
}
else
{
- mEmpty = FALSE;
+ mEmpty = false;
const LLVector4a* exts = group->getExtents();
update_min_max(mMin, mMax, exts[0]);
update_min_max(mMin, mMax, exts[1]);
}
}
- BOOL mEmpty;
+ bool mEmpty;
LLVector4a& mMin;
LLVector4a& mMax;
};
@@ -1209,7 +1210,7 @@ class LLOctreeCullDetectVisible: public LLOctreeCullShadow
{
public:
LLOctreeCullDetectVisible(LLCamera* camera)
- : LLOctreeCullShadow(camera), mResult(FALSE) { }
+ : LLOctreeCullShadow(camera), mResult(false) { }
virtual bool earlyFail(LLViewerOctreeGroup* base_group)
{
@@ -1230,11 +1231,11 @@ public:
{
if (base_group->isVisible())
{
- mResult = TRUE;
+ mResult = true;
}
}
- BOOL mResult;
+ bool mResult;
};
class LLOctreeSelect : public LLOctreeCull
@@ -1262,7 +1263,7 @@ public:
{
if (drawable->isSpatialBridge())
{
- drawable->setVisible(*mCamera, mResults, TRUE);
+ drawable->setVisible(*mCamera, mResults, true);
}
else
{
@@ -1378,7 +1379,7 @@ void LLSpatialPartition::restoreGL()
{
}
-BOOL LLSpatialPartition::getVisibleExtents(LLCamera& camera, LLVector3& visMin, LLVector3& visMax)
+bool LLSpatialPartition::getVisibleExtents(LLCamera& camera, LLVector3& visMin, LLVector3& visMax)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL;
LLVector4a visMina, visMaxa;
@@ -1398,14 +1399,14 @@ BOOL LLSpatialPartition::getVisibleExtents(LLCamera& camera, LLVector3& visMin,
return vis.mEmpty;
}
-BOOL LLSpatialPartition::visibleObjectsInFrustum(LLCamera& camera)
+bool LLSpatialPartition::visibleObjectsInFrustum(LLCamera& camera)
{
LLOctreeCullDetectVisible vis(&camera);
vis.traverse(mOctree);
return vis.mResult;
}
-S32 LLSpatialPartition::cull(LLCamera &camera, std::vector<LLDrawable *>* results, BOOL for_select)
+S32 LLSpatialPartition::cull(LLCamera &camera, std::vector<LLDrawable *>* results, bool for_select)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL;
#if LL_OCTREE_PARANOIA_CHECK
@@ -1426,7 +1427,7 @@ S32 LLSpatialPartition::cull(LLCamera &camera, std::vector<LLDrawable *>* result
return 0;
}
-extern BOOL gCubeSnapshot;
+extern bool gCubeSnapshot;
S32 LLSpatialPartition::cull(LLCamera &camera, bool do_occlusion)
{
@@ -1653,7 +1654,7 @@ void renderOctree(LLSpatialGroup* group)
col.setVec(0.1f,0.1f,1,0.1f);
{
- LLGLDepthTest gl_depth(FALSE, FALSE);
+ LLGLDepthTest gl_depth(false, false);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
gGL.diffuseColor4f(1,0,0,group->mBuilt);
@@ -1783,7 +1784,7 @@ std::set<LLSpatialGroup*> visible_selected_groups;
void renderXRay(LLSpatialGroup* group, LLCamera* camera)
{
- BOOL render_objects = (!LLPipeline::sUseOcclusion || !group->isOcclusionState(LLSpatialGroup::OCCLUDED)) && group->isVisible() &&
+ bool render_objects = (!LLPipeline::sUseOcclusion || !group->isOcclusionState(LLSpatialGroup::OCCLUDED)) && group->isVisible() &&
!group->isEmpty();
if (render_objects)
@@ -1875,7 +1876,7 @@ void renderUpdateType(LLDrawable* drawablep)
}
}
-void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE)
+void renderBoundingBox(LLDrawable* drawable, bool set_color = true)
{
if (set_color)
{
@@ -1990,7 +1991,11 @@ void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE)
drawBoxOutline(pos,size);
}
}
-
+// *TODO: LLDrawables which are not part of LLVOVolumes fall into a different
+// code path which uses a shader - it was tested to be faster than mapping a
+// vertex buffer in the terrain case. Consider using it for LLVOVolumes as well
+// to simplify and speed up this debug code. Alternatively, a compute shader is
+// likely faster. -Cosmic,2023-09-28
void renderNormals(LLDrawable *drawablep)
{
if (!drawablep->isVisible())
@@ -1998,11 +2003,13 @@ void renderNormals(LLDrawable *drawablep)
LLVertexBuffer::unbind();
+ LLViewerObject* obj = drawablep->getVObj();
LLVOVolume *vol = drawablep->getVOVolume();
- if (vol)
+ if (obj)
{
- LLVolume *volume = vol->getVolume();
+ LLGLEnable blend(GL_BLEND);
+ LLGLDepthTest gl_depth(GL_TRUE, GL_FALSE);
// Drawable's normals & tangents are stored in model space, i.e. before any scaling is applied.
//
@@ -2011,68 +2018,136 @@ void renderNormals(LLDrawable *drawablep)
// transform. We get that effect here by pre-applying the inverse scale (twice, because
// one forward scale will be re-applied via the MVP in the vertex shader)
- LLVector3 scale_v3 = vol->getScale();
- float scale_len = scale_v3.length();
- LLVector4a obj_scale(scale_v3.mV[VX], scale_v3.mV[VY], scale_v3.mV[VZ]);
- obj_scale.normalize3();
+ LLVector4a inv_scale;
+ float scale_len;
+ if (vol)
+ {
+ LLVector3 scale_v3 = vol->getScale();
+ LLVector4a obj_scale(scale_v3.mV[VX], scale_v3.mV[VY], scale_v3.mV[VZ]);
+ obj_scale.normalize3();
- // Normals &tangent line segments get scaled along with the object. Divide by scale length
- // to keep the as-viewed lengths (relatively) constant with the debug setting length
- float draw_length = gSavedSettings.getF32("RenderDebugNormalScale") / scale_len;
+ // Create inverse-scale vector for normals
+ inv_scale.set(1.0 / scale_v3.mV[VX], 1.0 / scale_v3.mV[VY], 1.0 / scale_v3.mV[VZ], 0.0);
+ inv_scale.mul(inv_scale); // Squared, to apply inverse scale twice
- // Create inverse-scale vector for normals
- LLVector4a inv_scale(1.0 / scale_v3.mV[VX], 1.0 / scale_v3.mV[VY], 1.0 / scale_v3.mV[VZ]);
- inv_scale.mul(inv_scale); // Squared, to apply inverse scale twice
- inv_scale.normalize3fast();
+ inv_scale.normalize3fast();
+ scale_len = scale_v3.length();
+ }
+ else
+ {
+ inv_scale.set(1.0, 1.0, 1.0, 0.0);
+ scale_len = 1.0;
+ }
gGL.pushMatrix();
- gGL.multMatrix((F32 *) vol->getRelativeXform().mMatrix);
+ if (vol)
+ {
+ gGL.multMatrix((F32 *) vol->getRelativeXform().mMatrix);
+ }
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- for (S32 i = 0; i < volume->getNumVolumeFaces(); ++i)
+ // Normals &tangent line segments get scaled along with the object. Divide by scale length
+ // to keep the as-viewed lengths (relatively) constant with the debug setting length
+ float draw_length = gSavedSettings.getF32("RenderDebugNormalScale") / scale_len;
+
+ std::vector<LLVolumeFace>* faces = nullptr;
+ std::vector<LLFace*>* drawable_faces = nullptr;
+ if (vol)
{
- const LLVolumeFace &face = volume->getVolumeFace(i);
+ LLVolume* volume = vol->getVolume();
+ faces = &volume->getVolumeFaces();
+ }
+ else
+ {
+ drawable_faces = &drawablep->getFaces();
+ }
- gGL.flush();
- gGL.diffuseColor4f(1, 1, 0, 1);
- gGL.begin(LLRender::LINES);
- for (S32 j = 0; j < face.mNumVertices; ++j)
- {
- LLVector4a n, p;
+ if (faces)
+ {
+ for (auto it = faces->begin(); it != faces->end(); ++it)
+ {
+ const LLVolumeFace& face = *it;
- n.setMul(face.mNormals[j], 1.0);
- n.mul(inv_scale); // Pre-scale normal, so it's left with an inverse-transpose xform after MVP
- n.normalize3fast();
- n.mul(draw_length);
- p.setAdd(face.mPositions[j], n);
+ gGL.flush();
+ gGL.diffuseColor4f(1, 1, 0, 1);
+ gGL.begin(LLRender::LINES);
+ for (S32 j = 0; j < face.mNumVertices; ++j)
+ {
+ LLVector4a n, p;
- gGL.vertex3fv(face.mPositions[j].getF32ptr());
- gGL.vertex3fv(p.getF32ptr());
- }
- gGL.end();
+ n.setMul(face.mNormals[j], 1.0);
+ n.mul(inv_scale); // Pre-scale normal, so it's left with an inverse-transpose xform after MVP
+ n.normalize3fast();
+ n.mul(draw_length);
+ p.setAdd(face.mPositions[j], n);
+
+ gGL.vertex3fv(face.mPositions[j].getF32ptr());
+ gGL.vertex3fv(p.getF32ptr());
+ }
+ gGL.end();
+
+ // Tangents are simple vectors and do not require reorientation via pre-scaling
+ if (face.mTangents)
+ {
+ gGL.flush();
+ gGL.diffuseColor4f(0, 1, 1, 1);
+ gGL.begin(LLRender::LINES);
+ for (S32 j = 0; j < face.mNumVertices; ++j)
+ {
+ LLVector4a t, p;
- // Tangents are simple vectors and do not require reorientation via pre-scaling
- if (face.mTangents)
+ t.setMul(face.mTangents[j], 1.0f);
+ t.normalize3fast();
+ t.mul(draw_length);
+ p.setAdd(face.mPositions[j], t);
+
+ gGL.vertex3fv(face.mPositions[j].getF32ptr());
+ gGL.vertex3fv(p.getF32ptr());
+ }
+ gGL.end();
+ }
+ }
+ }
+ else if (drawable_faces)
+ {
+ // *HACK: Prepare to restore previous shader as other debug code depends on a simpler shader being present
+ llassert(LLGLSLShader::sCurBoundShaderPtr == &gDebugProgram);
+ LLGLSLShader* prev_shader = LLGLSLShader::sCurBoundShaderPtr;
+ for (auto it = drawable_faces->begin(); it != drawable_faces->end(); ++it)
{
- gGL.flush();
- gGL.diffuseColor4f(0, 1, 1, 1);
- gGL.begin(LLRender::LINES);
- for (S32 j = 0; j < face.mNumVertices; ++j)
+ LLFace* facep = *it;
+ LLFace& face = **it;
+ LLVertexBuffer* buf = face.getVertexBuffer();
+ if (!buf) { continue; }
+ U32 mask_vn = LLVertexBuffer::TYPE_VERTEX | LLVertexBuffer::TYPE_NORMAL;
+ if ((buf->getTypeMask() & mask_vn) != mask_vn) { continue; }
+
+ LLGLSLShader* shader;
+ if ((buf->getTypeMask() & LLVertexBuffer::TYPE_TANGENT) != LLVertexBuffer::TYPE_TANGENT)
{
- LLVector4a t, p;
+ shader = &gNormalDebugProgram[NORMAL_DEBUG_SHADER_DEFAULT];
+ }
+ else
+ {
+ shader = &gNormalDebugProgram[NORMAL_DEBUG_SHADER_WITH_TANGENTS];
+ }
+ shader->bind();
- t.setMul(face.mTangents[j], 1.0f);
- t.normalize3fast();
- t.mul(draw_length);
- p.setAdd(face.mPositions[j], t);
+ shader->uniform1f(LLShaderMgr::DEBUG_NORMAL_DRAW_LENGTH, draw_length);
- gGL.vertex3fv(face.mPositions[j].getF32ptr());
- gGL.vertex3fv(p.getF32ptr());
- }
- gGL.end();
+ LLRenderPass::applyModelMatrix(&facep->getDrawable()->getRegion()->mRenderMatrix);
+
+ buf->setBuffer();
+ // *NOTE: The render type in the vertex shader is TRIANGLES, but gets converted to LINES in the geometry shader
+ // *NOTE: For terrain normal debug, this seems to also include vertices for water, which is technically not part of the terrain. Should fix that at some point.
+ buf->drawRange(LLRender::TRIANGLES, face.getGeomIndex(), face.getGeomIndex() + face.getGeomCount()-1, face.getIndicesCount(), face.getIndicesStart());
}
- }
+ if (prev_shader)
+ {
+ prev_shader->bind();
+ }
+ }
gGL.popMatrix();
}
@@ -2682,7 +2757,7 @@ void renderTexelDensity(LLDrawable* drawable)
checkerboard_matrix.initScale(LLVector3(texturep->getWidth(discard_level) / 8, texturep->getHeight(discard_level) / 8, 1.f));
- gGL.getTexUnit(0)->bind(LLViewerTexture::sCheckerBoardImagep, TRUE);
+ gGL.getTexUnit(0)->bind(LLViewerTexture::sCheckerBoardImagep, true);
gGL.matrixMode(LLRender::MM_TEXTURE);
gGL.loadMatrix((GLfloat*)&checkerboard_matrix.mMatrix);
@@ -2735,7 +2810,7 @@ void renderTexelDensity(LLDrawable* drawable)
// //gGL.matrixMode(LLRender::MM_TEXTURE);
// glLoadMatrixf((GLfloat*) checkboard_matrix.mMatrix);
- // gGL.getTexUnit(i)->bind(LLViewerTexture::sCheckerBoardImagep, TRUE);
+ // gGL.getTexUnit(i)->bind(LLViewerTexture::sCheckerBoardImagep, true);
// pushVerts(params, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_COLOR | LLVertexBuffer::MAP_NORMAL );
@@ -2791,10 +2866,8 @@ void renderLights(LLDrawable* drawablep)
class LLRenderOctreeRaycast : public LLOctreeTriangleRayIntersect
{
public:
-
-
LLRenderOctreeRaycast(const LLVector4a& start, const LLVector4a& dir, F32* closest_t)
- : LLOctreeTriangleRayIntersect(start, dir, NULL, closest_t, NULL, NULL, NULL, NULL)
+ : LLOctreeTriangleRayIntersect(start, dir, nullptr, closest_t, NULL, NULL, NULL, NULL)
{
}
@@ -2818,7 +2891,7 @@ public:
size.set(vl->mBounds[1].getF32ptr());
}
- drawBoxOutline(center, size);
+ drawBoxOutline(center, size);
for (U32 i = 0; i < 2; i++)
{
@@ -2862,6 +2935,13 @@ public:
}
};
+void renderOctreeRaycast(const LLVector4a& start, const LLVector4a& end, const LLVolumeOctree* octree)
+{
+ F32 t = 1.f;
+ LLRenderOctreeRaycast render(start, end, &t);
+ render.traverse(octree);
+}
+
void renderRaycast(LLDrawable* drawablep)
{
if (drawablep->getNumFaces())
@@ -2919,29 +2999,22 @@ void renderRaycast(LLDrawable* drawablep)
dir.setSub(end, start);
gGL.flush();
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+ glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
{
//render face positions
- LLVertexBuffer::unbind();
- gGL.diffuseColor4f(0,1,1,0.5f);
- glVertexPointer(3, GL_FLOAT, sizeof(LLVector4a), face.mPositions);
- gGL.syncMatrices();
- glDrawElements(GL_TRIANGLES, face.mNumIndices, GL_UNSIGNED_SHORT, face.mIndices);
+ //gGL.diffuseColor4f(0,1,1,0.5f);
+ //LLVertexBuffer::drawElements(LLRender::TRIANGLES, face.mPositions, nullptr, face.mNumIndices, face.mIndices);
}
if (!volume->isUnique())
{
- F32 t = 1.f;
-
if (!face.getOctree())
{
((LLVolumeFace*) &face)->createOctree();
}
- LLRenderOctreeRaycast render(start, dir, &t);
-
- render.traverse(face.getOctree());
+ renderOctreeRaycast(start, end, face.getOctree());
}
gGL.popMatrix();
@@ -3374,7 +3447,7 @@ public:
{
continue;
}
- renderBoundingBox(drawable, FALSE);
+ renderBoundingBox(drawable, false);
}
}
};
@@ -3563,14 +3636,14 @@ bool LLSpatialPartition::isHUDPartition()
return mPartitionType == LLViewerRegion::PARTITION_HUD ;
}
-BOOL LLSpatialPartition::isVisible(const LLVector3& v)
+bool LLSpatialPartition::isVisible(const LLVector3& v)
{
if (!LLViewerCamera::getInstance()->sphereInFrustum(v, 4.0f))
{
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
LL_ALIGN_PREFIX(16)
@@ -3586,12 +3659,12 @@ public:
LLVector4a *mNormal;
LLVector4a *mTangent;
LLDrawable* mHit;
- BOOL mPickTransparent;
- BOOL mPickRigged;
- BOOL mPickUnselectable;
- BOOL mPickReflectionProbe;
+ bool mPickTransparent;
+ bool mPickRigged;
+ bool mPickUnselectable;
+ bool mPickReflectionProbe;
- LLOctreeIntersect(const LLVector4a& start, const LLVector4a& end, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_unselectable, BOOL pick_reflection_probe,
+ LLOctreeIntersect(const LLVector4a& start, const LLVector4a& end, bool pick_transparent, bool pick_rigged, bool pick_unselectable, bool pick_reflection_probe,
S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent)
: mStart(start),
mEnd(end),
@@ -3712,7 +3785,7 @@ public:
}
if (!skip_check && vobj->lineSegmentIntersect(mStart, mEnd, -1,
- (mPickReflectionProbe && vobj->isReflectionProbe()) ? TRUE : mPickTransparent, // always pick transparent when picking selection probe
+ (mPickReflectionProbe && vobj->isReflectionProbe()) ? true : mPickTransparent, // always pick transparent when picking selection probe
mPickRigged, mPickUnselectable, mFaceHit, &intersection, mTexCoord, mNormal, mTangent))
{
mEnd = intersection; // shorten ray so we only find CLOSER hits
@@ -3731,10 +3804,10 @@ public:
} LL_ALIGN_POSTFIX(16);
LLDrawable* LLSpatialPartition::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
- BOOL pick_transparent,
- BOOL pick_rigged,
- BOOL pick_unselectable,
- BOOL pick_reflection_probe,
+ bool pick_transparent,
+ bool pick_rigged,
+ bool pick_unselectable,
+ bool pick_reflection_probe,
S32* face_hit, // return the face hit
LLVector4a* intersection, // return the intersection point
LLVector2* tex_coord, // return the texture coordinates of the intersection point
@@ -3750,10 +3823,10 @@ LLDrawable* LLSpatialPartition::lineSegmentIntersect(const LLVector4a& start, co
}
LLDrawable* LLSpatialGroup::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
- BOOL pick_transparent,
- BOOL pick_rigged,
- BOOL pick_unselectable,
- BOOL pick_reflection_probe,
+ bool pick_transparent,
+ bool pick_rigged,
+ bool pick_unselectable,
+ bool pick_reflection_probe,
S32* face_hit, // return the face hit
LLVector4a* intersection, // return the intersection point
LLVector2* tex_coord, // return the texture coordinates of the intersection point
diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h
index 758e716c00..42ad0e423c 100644
--- a/indra/newview/llspatialpartition.h
+++ b/indra/newview/llspatialpartition.h
@@ -218,7 +218,7 @@ public:
}
static U32 sNodeCount;
- static bool sNoDelete; //deletion of spatial groups and draw info not allowed if TRUE
+ static bool sNoDelete; //deletion of spatial groups and draw info not allowed if true
typedef std::vector<LLPointer<LLSpatialGroup> > sg_vector_t;
typedef std::vector<LLPointer<LLSpatialBridge> > bridge_list_t;
@@ -280,7 +280,7 @@ public:
LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part);
- BOOL isHUDGroup() ;
+ bool isHUDGroup() ;
void clearDrawMap();
void validate();
@@ -292,9 +292,9 @@ public:
LLSpatialGroup* getParent();
- BOOL addObject(LLDrawable *drawablep);
- BOOL removeObject(LLDrawable *drawablep, BOOL from_octree = FALSE);
- BOOL updateInGroup(LLDrawable *drawablep, BOOL immediate = FALSE); // Update position if it's in the group
+ bool addObject(LLDrawable *drawablep);
+ bool removeObject(LLDrawable *drawablep, bool from_octree = false);
+ bool updateInGroup(LLDrawable *drawablep, bool immediate = false); // Update position if it's in the group
void expandExtents(const LLVector4a* addingExtents, const LLXformMatrix& currentTransform);
void shift(const LLVector4a &offset);
@@ -303,7 +303,7 @@ public:
void updateDistance(LLCamera& camera);
F32 getUpdateUrgency() const;
- BOOL changeLOD();
+ bool changeLOD();
void rebuildGeom();
void rebuildMesh();
@@ -314,10 +314,10 @@ public:
void drawObjectBox(LLColor4 col);
LLDrawable* lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
- BOOL pick_transparent,
- BOOL pick_rigged,
- BOOL pick_unselectable,
- BOOL pick_reflection_probe,
+ bool pick_transparent,
+ bool pick_rigged,
+ bool pick_unselectable,
+ bool pick_reflection_probe,
S32* face_hit, // return the face hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
@@ -385,17 +385,17 @@ public:
class LLSpatialPartition: public LLViewerOctreePartition, public LLGeometryManager
{
public:
- LLSpatialPartition(U32 data_mask, BOOL render_by_group, LLViewerRegion* regionp);
+ LLSpatialPartition(U32 data_mask, bool render_by_group, LLViewerRegion* regionp);
virtual ~LLSpatialPartition();
- LLSpatialGroup *put(LLDrawable *drawablep, BOOL was_visible = FALSE);
- BOOL remove(LLDrawable *drawablep, LLSpatialGroup *curp);
+ LLSpatialGroup *put(LLDrawable *drawablep, bool was_visible = false);
+ bool remove(LLDrawable *drawablep, LLSpatialGroup *curp);
LLDrawable* lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
- BOOL pick_transparent,
- BOOL pick_rigged,
- BOOL pick_unselectable,
- BOOL pick_reflection_probe,
+ bool pick_transparent,
+ bool pick_rigged,
+ bool pick_unselectable,
+ bool pick_reflection_probe,
S32* face_hit, // return the face hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
@@ -405,7 +405,7 @@ public:
// If the drawable moves, move it here.
- virtual void move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL immediate = FALSE);
+ virtual void move(LLDrawable *drawablep, LLSpatialGroup *curp, bool immediate = false);
virtual void shift(const LLVector4a &offset);
virtual F32 calcDistance(LLSpatialGroup* group, LLCamera& camera);
@@ -414,33 +414,33 @@ public:
virtual void rebuildGeom(LLSpatialGroup* group);
virtual void rebuildMesh(LLSpatialGroup* group);
- BOOL visibleObjectsInFrustum(LLCamera& camera);
+ bool visibleObjectsInFrustum(LLCamera& camera);
/*virtual*/ S32 cull(LLCamera &camera, bool do_occlusion=false); // Cull on arbitrary frustum
- S32 cull(LLCamera &camera, std::vector<LLDrawable *>* results, BOOL for_select); // Cull on arbitrary frustum
+ S32 cull(LLCamera &camera, std::vector<LLDrawable *>* results, bool for_select); // Cull on arbitrary frustum
- BOOL isVisible(const LLVector3& v);
+ bool isVisible(const LLVector3& v);
bool isHUDPartition() ;
LLSpatialBridge* asBridge() { return mBridge; }
- BOOL isBridge() { return asBridge() != NULL; }
+ bool isBridge() { return asBridge() != NULL; }
void renderPhysicsShapes(bool depth_only);
void renderDebug();
void renderIntersectingBBoxes(LLCamera* camera);
void restoreGL();
- BOOL getVisibleExtents(LLCamera& camera, LLVector3& visMin, LLVector3& visMax);
+ bool getVisibleExtents(LLCamera& camera, LLVector3& visMin, LLVector3& visMax);
public:
LLSpatialBridge* mBridge; // NULL for non-LLSpatialBridge instances, otherwise, mBridge == this
// use a pointer instead of making "isBridge" and "asBridge" virtual so it's safe
// to call asBridge() from the destructor
- bool mInfiniteFarClip; // if TRUE, frustum culling ignores far clip plane
+ bool mInfiniteFarClip; // if true, frustum culling ignores far clip plane
const bool mRenderByGroup;
U32 mVertexDataMask;
F32 mSlopRatio; //percentage distance must change before drawables receive LOD update (default is 0.25);
- bool mDepthMask; //if TRUE, objects in this partition will be written to depth during alpha rendering
+ bool mDepthMask; //if true, objects in this partition will be written to depth during alpha rendering
};
// class for creating bridges between spatial partitions
@@ -452,18 +452,18 @@ protected:
public:
typedef std::vector<LLPointer<LLSpatialBridge> > bridge_vector_t;
- LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 data_mask, LLViewerRegion* regionp);
+ LLSpatialBridge(LLDrawable* root, bool render_by_group, U32 data_mask, LLViewerRegion* regionp);
void destroyTree();
- virtual BOOL isSpatialBridge() const { return TRUE; }
+ virtual bool isSpatialBridge() const { return true; }
virtual void updateSpatialExtents();
virtual void updateBinRadius();
- virtual void setVisible(LLCamera& camera_in, std::vector<LLDrawable*>* results = NULL, BOOL for_select = FALSE);
+ virtual void setVisible(LLCamera& camera_in, std::vector<LLDrawable*>* results = NULL, bool for_select = false);
virtual void updateDistance(LLCamera& camera_in, bool force_update);
virtual void makeActive();
- virtual void move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL immediate = FALSE);
- virtual BOOL updateMove();
+ virtual void move(LLDrawable *drawablep, LLSpatialGroup *curp, bool immediate = false);
+ virtual bool updateMove();
virtual void shiftPos(const LLVector4a& vec);
virtual void cleanupReferences();
virtual LLSpatialPartition* asPartition() { return this; }
@@ -678,7 +678,7 @@ class LLVolumeGeometryManager: public LLGeometryManager
virtual void rebuildMesh(LLSpatialGroup* group);
virtual void getGeometry(LLSpatialGroup* group);
virtual void addGeometryCount(LLSpatialGroup* group, U32& vertex_count, U32& index_count);
- U32 genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace** faces, U32 face_count, BOOL distance_sort = FALSE, BOOL batch_textures = FALSE, BOOL rigged = FALSE);
+ U32 genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace** faces, U32 face_count, bool distance_sort = false, bool batch_textures = false, bool rigged = false);
void registerFace(LLSpatialGroup* group, LLFace* facep, U32 type);
private:
@@ -729,7 +729,6 @@ class LLControlAVBridge : public LLVolumeBridge
using super = LLVolumeBridge;
public:
LLControlAVBridge(LLDrawable* drawablep, LLViewerRegion* regionp);
- virtual void updateSpatialExtents();
};
class LLHUDBridge : public LLVolumeBridge
diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp
index 60bada8f58..e521378e70 100644
--- a/indra/newview/llspeakers.cpp
+++ b/indra/newview/llspeakers.cpp
@@ -50,16 +50,16 @@ LLSpeaker::LLSpeaker(const LLUUID& id, const std::string& name, const ESpeakerTy
mStatus(LLSpeaker::STATUS_TEXT_ONLY),
mLastSpokeTime(0.f),
mSpeechVolume(0.f),
- mHasSpoken(FALSE),
- mHasLeftCurrentCall(FALSE),
+ mHasSpoken(false),
+ mHasLeftCurrentCall(false),
mDotColor(LLColor4::white),
mID(id),
- mTyping(FALSE),
+ mTyping(false),
mSortIndex(0),
mType(type),
- mIsModerator(FALSE),
- mModeratorMutedVoice(FALSE),
- mModeratorMutedText(FALSE)
+ mIsModerator(false),
+ mModeratorMutedVoice(false),
+ mModeratorMutedText(false)
{
if (name.empty() && type == SPEAKER_AGENT)
{
@@ -181,13 +181,13 @@ LLSpeakerActionTimer::LLSpeakerActionTimer(action_callback_t action_cb, F32 acti
{
}
-BOOL LLSpeakerActionTimer::tick()
+bool LLSpeakerActionTimer::tick()
{
if (mActionCallback)
{
- return (BOOL)mActionCallback(mSpeakerId);
+ return (bool)mActionCallback(mSpeakerId);
}
- return TRUE;
+ return true;
}
void LLSpeakerActionTimer::unset()
@@ -357,7 +357,7 @@ void LLSpeakerMgr::initVoiceModerateMode()
}
}
-void LLSpeakerMgr::update(BOOL resort_ok)
+void LLSpeakerMgr::update(bool resort_ok)
{
if (!LLVoiceClient::getInstance())
{
@@ -373,7 +373,7 @@ void LLSpeakerMgr::update(BOOL resort_ok)
}
// update status of all current speakers
- BOOL voice_channel_active = (!mVoiceChannel && LLVoiceClient::getInstance()->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive());
+ bool voice_channel_active = (!mVoiceChannel && LLVoiceClient::getInstance()->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive());
for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end(); speaker_it++)
{
LLUUID speaker_id = speaker_it->first;
@@ -382,7 +382,7 @@ void LLSpeakerMgr::update(BOOL resort_ok)
if (voice_channel_active && LLVoiceClient::getInstance()->getVoiceEnabled(speaker_id))
{
speakerp->mSpeechVolume = LLVoiceClient::getInstance()->getCurrentPower(speaker_id);
- BOOL moderator_muted_voice = LLVoiceClient::getInstance()->getIsModeratorMuted(speaker_id);
+ bool moderator_muted_voice = LLVoiceClient::getInstance()->getIsModeratorMuted(speaker_id);
if (moderator_muted_voice != speakerp->mModeratorMutedVoice)
{
speakerp->mModeratorMutedVoice = moderator_muted_voice;
@@ -400,7 +400,7 @@ void LLSpeakerMgr::update(BOOL resort_ok)
if (speakerp->mStatus != LLSpeaker::STATUS_SPEAKING)
{
speakerp->mLastSpokeTime = mSpeechTimer.getElapsedTimeF32();
- speakerp->mHasSpoken = TRUE;
+ speakerp->mHasSpoken = true;
fireEvent(new LLSpeakerUpdateSpeakerEvent(speakerp), "update_speaker");
}
speakerp->mStatus = LLSpeaker::STATUS_SPEAKING;
@@ -584,7 +584,7 @@ bool LLSpeakerMgr::removeSpeaker(const LLUUID& speaker_id)
LL_DEBUGS("Speakers") << "Removed speaker " << speaker_id << LL_ENDL;
fireEvent(new LLSpeakerListChangeEvent(this, speaker_id), "remove");
- update(TRUE);
+ update(true);
return false;
}
@@ -602,7 +602,7 @@ LLPointer<LLSpeaker> LLSpeakerMgr::findSpeaker(const LLUUID& speaker_id)
return found_it->second;
}
-void LLSpeakerMgr::getSpeakerList(speaker_list_t* speaker_list, BOOL include_text)
+void LLSpeakerMgr::getSpeakerList(speaker_list_t* speaker_list, bool include_text)
{
speaker_list->clear();
for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end(); ++speaker_it)
@@ -626,7 +626,7 @@ bool LLSpeakerMgr::isSpeakerToBeRemoved(const LLUUID& speaker_id)
return mSpeakerDelayRemover && mSpeakerDelayRemover->isTimerStarted(speaker_id);
}
-void LLSpeakerMgr::setSpeakerTyping(const LLUUID& speaker_id, BOOL typing)
+void LLSpeakerMgr::setSpeakerTyping(const LLUUID& speaker_id, bool typing)
{
LLPointer<LLSpeaker> speakerp = findSpeaker(speaker_id);
if (speakerp.notNull())
@@ -642,12 +642,12 @@ void LLSpeakerMgr::speakerChatted(const LLUUID& speaker_id)
if (speakerp.notNull())
{
speakerp->mLastSpokeTime = mSpeechTimer.getElapsedTimeF32();
- speakerp->mHasSpoken = TRUE;
+ speakerp->mHasSpoken = true;
fireEvent(new LLSpeakerUpdateSpeakerEvent(speakerp), "update_speaker");
}
}
-BOOL LLSpeakerMgr::isVoiceActive()
+bool LLSpeakerMgr::isVoiceActive()
{
// mVoiceChannel = NULL means current voice channel, whatever it is
return LLVoiceClient::getInstance()->voiceEnabled() && mVoiceChannel && mVoiceChannel->isActive();
@@ -692,7 +692,7 @@ void LLIMSpeakerMgr::setSpeakers(const LLSD& speakers)
if ( speaker_it->second.isMap() )
{
- BOOL is_moderator = speakerp->mIsModerator;
+ bool is_moderator = speakerp->mIsModerator;
speakerp->mIsModerator = speaker_it->second["is_moderator"];
speakerp->mModeratorMutedText =
speaker_it->second["mutes"]["text"];
@@ -767,7 +767,7 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update)
if (agent_info.has("is_moderator"))
{
- BOOL is_moderator = speakerp->mIsModerator;
+ bool is_moderator = speakerp->mIsModerator;
speakerp->mIsModerator = agent_info["is_moderator"];
// Fire event only if moderator changed
if ( is_moderator != speakerp->mIsModerator )
@@ -838,7 +838,7 @@ void LLIMSpeakerMgr::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmu
if (!speakerp) return;
// *NOTE: mantipov: probably this condition will be incorrect when avatar will be blocked for
- // text chat via moderation (LLSpeaker::mModeratorMutedText == TRUE)
+ // text chat via moderation (LLSpeaker::mModeratorMutedText == true)
bool is_in_voice = speakerp->mStatus <= LLSpeaker::STATUS_VOICE_ACTIVE || speakerp->mStatus == LLSpeaker::STATUS_MUTED;
// do not send voice moderation changes for avatars not in voice channel
diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h
index 22c9481687..671a3ebc9c 100644
--- a/indra/newview/llspeakers.h
+++ b/indra/newview/llspeakers.h
@@ -70,16 +70,16 @@ public:
F32 mLastSpokeTime; // timestamp when this speaker last spoke
F32 mSpeechVolume; // current speech amplitude (timea average rms amplitude?)
std::string mDisplayName; // cache user name for this speaker
- BOOL mHasSpoken; // has this speaker said anything this session?
- BOOL mHasLeftCurrentCall; // has this speaker left the current voice call?
+ bool mHasSpoken; // has this speaker said anything this session?
+ bool mHasLeftCurrentCall; // has this speaker left the current voice call?
LLColor4 mDotColor;
LLUUID mID;
- BOOL mTyping;
+ bool mTyping;
S32 mSortIndex;
ESpeakerType mType;
- BOOL mIsModerator;
- BOOL mModeratorMutedVoice;
- BOOL mModeratorMutedText;
+ bool mIsModerator;
+ bool mModeratorMutedVoice;
+ bool mModeratorMutedText;
};
class LLSpeakerUpdateSpeakerEvent : public LLOldEvents::LLEvent
@@ -98,7 +98,7 @@ public:
/*virtual*/ LLSD getValue();
private:
const LLUUID& mSpeakerID;
- BOOL mIsModerator;
+ bool mIsModerator;
};
class LLSpeakerTextModerationEvent : public LLOldEvents::LLEvent
@@ -159,7 +159,7 @@ public:
*
* If action callback is not specified returns true. Instance will be deleted by LLEventTimer::updateClass().
*/
- virtual BOOL tick();
+ virtual bool tick();
/**
* Clears the callback.
@@ -228,18 +228,18 @@ public:
virtual ~LLSpeakerMgr();
LLPointer<LLSpeaker> findSpeaker(const LLUUID& avatar_id);
- void update(BOOL resort_ok);
- void setSpeakerTyping(const LLUUID& speaker_id, BOOL typing);
+ void update(bool resort_ok);
+ void setSpeakerTyping(const LLUUID& speaker_id, bool typing);
void speakerChatted(const LLUUID& speaker_id);
LLPointer<LLSpeaker> setSpeaker(const LLUUID& id,
const std::string& name = LLStringUtil::null,
LLSpeaker::ESpeakerStatus status = LLSpeaker::STATUS_TEXT_ONLY,
LLSpeaker::ESpeakerType = LLSpeaker::SPEAKER_AGENT);
- BOOL isVoiceActive();
+ bool isVoiceActive();
typedef std::vector<LLPointer<LLSpeaker> > speaker_list_t;
- void getSpeakerList(speaker_list_t* speaker_list, BOOL include_text);
+ void getSpeakerList(speaker_list_t* speaker_list, bool include_text);
LLVoiceChannel* getVoiceChannel() { return mVoiceChannel; }
const LLUUID getSessionID();
bool isSpeakerToBeRemoved(const LLUUID& speaker_id);
diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp
index c4c9673be3..18b335fb21 100644
--- a/indra/newview/llspeakingindicatormanager.cpp
+++ b/indra/newview/llspeakingindicatormanager.cpp
@@ -109,9 +109,9 @@ private:
* Changes state of indicators specified by LLUUIDs
*
* @param speakers_uuids - avatars' LLUUIDs whose speaking indicators should be switched
- * @param switch_on - if TRUE specified indicator will be switched on, off otherwise.
+ * @param switch_on - if true specified indicator will be switched on, off otherwise.
*/
- void switchSpeakerIndicators(const speaker_ids_t& speakers_uuids, BOOL switch_on);
+ void switchSpeakerIndicators(const speaker_ids_t& speakers_uuids, bool switch_on);
/**
* Ensures that passed instance of Speaking Indicator does not exist among registered ones.
@@ -154,7 +154,7 @@ void SpeakingIndicatorManager::registerSpeakingIndicator(const LLUUID& speaker_i
mSpeakingIndicators.insert(value_type);
speaker_ids_t speakers_uuids;
- BOOL is_in_same_voice = LLVoiceClient::getInstance()->isParticipant(speaker_id);
+ bool is_in_same_voice = LLVoiceClient::getInstance()->isParticipant(speaker_id);
speakers_uuids.insert(speaker_id);
switchSpeakerIndicators(speakers_uuids, is_in_same_voice);
@@ -201,7 +201,7 @@ void SpeakingIndicatorManager::cleanupSingleton()
void SpeakingIndicatorManager::sOnCurrentChannelChanged(const LLUUID& /*session_id*/)
{
- switchSpeakerIndicators(mSwitchedIndicatorsOn, FALSE);
+ switchSpeakerIndicators(mSwitchedIndicatorsOn, false);
mSwitchedIndicatorsOn.clear();
}
@@ -214,15 +214,15 @@ void SpeakingIndicatorManager::onParticipantsChanged()
LL_DEBUGS("SpeakingIndicator") << "Switching all OFF, count: " << mSwitchedIndicatorsOn.size() << LL_ENDL;
// switch all indicators off
- switchSpeakerIndicators(mSwitchedIndicatorsOn, FALSE);
+ switchSpeakerIndicators(mSwitchedIndicatorsOn, false);
mSwitchedIndicatorsOn.clear();
LL_DEBUGS("SpeakingIndicator") << "Switching all ON, count: " << speakers_uuids.size() << LL_ENDL;
// then switch current voice participants indicators on
- switchSpeakerIndicators(speakers_uuids, TRUE);
+ switchSpeakerIndicators(speakers_uuids, true);
}
-void SpeakingIndicatorManager::switchSpeakerIndicators(const speaker_ids_t& speakers_uuids, BOOL switch_on)
+void SpeakingIndicatorManager::switchSpeakerIndicators(const speaker_ids_t& speakers_uuids, bool switch_on)
{
LLVoiceChannel* voice_channel = LLVoiceChannel::getCurrentVoiceChannel();
LLUUID session_id;
diff --git a/indra/newview/llsplitbutton.cpp b/indra/newview/llsplitbutton.cpp
index 790305103d..2e68696920 100644
--- a/indra/newview/llsplitbutton.cpp
+++ b/indra/newview/llsplitbutton.cpp
@@ -67,7 +67,7 @@ void LLSplitButton::onFocusLost()
LLUICtrl::onFocusLost();
}
-void LLSplitButton::setFocus(BOOL b)
+void LLSplitButton::setFocus(bool b)
{
LLUICtrl::setFocus(b);
@@ -75,12 +75,12 @@ void LLSplitButton::setFocus(BOOL b)
{
if (mItemsPanel && mItemsPanel->getVisible())
{
- mItemsPanel->setFocus(TRUE);
+ mItemsPanel->setFocus(true);
}
}
}
-void LLSplitButton::setEnabled(BOOL enabled)
+void LLSplitButton::setEnabled(bool enabled)
{
LLView::setEnabled(enabled);
mArrowBtn->setEnabled(enabled);
@@ -93,7 +93,7 @@ void LLSplitButton::onArrowBtnDown()
{
showButtons();
- setFocus(TRUE);
+ setFocus(true);
if (mArrowBtn->hasMouseCapture() || mShownItem->hasMouseCapture())
{
@@ -126,14 +126,14 @@ void LLSplitButton::onItemSelected(LLUICtrl* ctrl)
gFocusMgr.setKeyboardFocus(NULL);
}
-BOOL LLSplitButton::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLSplitButton::handleMouseUp(S32 x, S32 y, MASK mask)
{
gFocusMgr.setMouseCapture(NULL);
if (mShownItem->parentPointInView(x, y))
{
onItemSelected(mShownItem);
- return TRUE;
+ return true;
}
for (std::list<LLButton*>::const_iterator it = mHidenItems.begin(); it != mHidenItems.end(); ++it)
@@ -147,10 +147,10 @@ BOOL LLSplitButton::handleMouseUp(S32 x, S32 y, MASK mask)
if (item->parentPointInView(panel_x, panel_y))
{
onItemSelected(item);
- return TRUE;
+ return true;
}
}
- return TRUE;
+ return true;
}
void LLSplitButton::showButtons()
@@ -161,21 +161,21 @@ void LLSplitButton::showButtons()
// effectively putting us into a special draw layer
gViewerWindow->addPopup(this);
- mItemsPanel->setFocus(TRUE);
+ mItemsPanel->setFocus(true);
//push arrow button down and show the item buttons
- mArrowBtn->setToggleState(TRUE);
- mItemsPanel->setVisible(TRUE);
+ mArrowBtn->setToggleState(true);
+ mItemsPanel->setVisible(true);
- setUseBoundingRect(TRUE);
+ setUseBoundingRect(true);
}
void LLSplitButton::hideButtons()
{
- mItemsPanel->setVisible(FALSE);
- mArrowBtn->setToggleState(FALSE);
+ mItemsPanel->setVisible(false);
+ mArrowBtn->setToggleState(false);
- setUseBoundingRect(FALSE);
+ setUseBoundingRect(false);
gViewerWindow->removePopup(this);
}
diff --git a/indra/newview/llsplitbutton.h b/indra/newview/llsplitbutton.h
index 4f20c8b379..a4a6a179c1 100644
--- a/indra/newview/llsplitbutton.h
+++ b/indra/newview/llsplitbutton.h
@@ -71,8 +71,8 @@ public:
//Overridden
virtual void onFocusLost();
- virtual void setFocus(BOOL b);
- virtual void setEnabled(BOOL enabled);
+ virtual void setFocus(bool b);
+ virtual void setEnabled(bool enabled);
//Callbacks
void onArrowBtnDown();
@@ -80,7 +80,7 @@ public:
void onItemSelected(LLUICtrl* ctrl);
void setSelectionCallback(commit_callback_t cb) { mSelectionCallback = cb; }
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask);
virtual void showButtons();
virtual void hideButtons();
diff --git a/indra/newview/llsprite.cpp b/indra/newview/llsprite.cpp
index af0b5a40b4..866bb17820 100644
--- a/indra/newview/llsprite.cpp
+++ b/indra/newview/llsprite.cpp
@@ -60,8 +60,8 @@ LLSprite::LLSprite(const LLUUID &image_uuid) :
mPitch(0.f),
mYaw(0.f),
mPosition(0.0f, 0.0f, 0.0f),
- mFollow(TRUE),
- mUseCameraUp(TRUE),
+ mFollow(true),
+ mUseCameraUp(true),
mColor(0.5f, 0.5f, 0.5f, 1.0f),
mTexMode(GL_REPLACE)
{
@@ -266,12 +266,12 @@ void LLSprite::setYaw(F32 yaw)
mYaw = yaw;
}
-void LLSprite::setFollow(const BOOL follow)
+void LLSprite::setFollow(const bool follow)
{
mFollow = follow;
}
-void LLSprite::setUseCameraUp(const BOOL use_up)
+void LLSprite::setUseCameraUp(const bool use_up)
{
mUseCameraUp = use_up;
}
diff --git a/indra/newview/llsprite.h b/indra/newview/llsprite.h
index d00b8ef695..457c0230f7 100644
--- a/indra/newview/llsprite.h
+++ b/indra/newview/llsprite.h
@@ -61,8 +61,8 @@ public:
void setPitch(const F32 pitch);
void setSize(const F32 width, const F32 height);
void setYaw(const F32 yaw);
- void setFollow(const BOOL follow);
- void setUseCameraUp(const BOOL use_up);
+ void setFollow(const bool follow);
+ void setUseCameraUp(const bool use_up);
void setTexMode(LLGLenum mode);
void setColor(const LLColor4 &color);
@@ -85,8 +85,8 @@ private:
F32 mPitch;
F32 mYaw;
LLVector3 mPosition;
- BOOL mFollow;
- BOOL mUseCameraUp;
+ bool mFollow;
+ bool mUseCameraUp;
LLColor4 mColor;
LLGLenum mTexMode;
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index a0324ca82a..78276a170e 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -40,10 +40,6 @@
#include "llviewermedia_streamingaudio.h"
#include "llaudioengine.h"
-#ifdef LL_FMODSTUDIO
-# include "llaudioengine_fmodstudio.h"
-#endif
-
#ifdef LL_OPENAL
#include "llaudioengine_openal.h"
#endif
@@ -334,10 +330,18 @@ void update_texture_fetch()
void set_flags_and_update_appearance()
{
- LLAppearanceMgr::instance().setAttachmentInvLinkEnable(true);
- LLAppearanceMgr::instance().updateAppearanceFromCOF(true, true, no_op);
+ // this may be called from a coroutine but has many side effects
+ // in non-thread-safe classes, post to main loop
+ auto work = []()
+ {
+ LLAppearanceMgr::instance().setAttachmentInvLinkEnable(true);
+ LLAppearanceMgr::instance().updateAppearanceFromCOF(true, true, no_op);
+
+ LLInventoryModelBackgroundFetch::instance().start();
+ };
+
+ LLAppViewer::instance()->postToMainCoro(work);
- LLInventoryModelBackgroundFetch::instance().start();
}
// Returns false to skip other idle processing. Should only return
@@ -541,7 +545,7 @@ bool idle_startup()
LLVersionInfo::instance().getMajor(),
LLVersionInfo::instance().getMinor(),
LLVersionInfo::instance().getPatch(),
- FALSE,
+ false,
std::string(),
responder,
failure_is_fatal,
@@ -612,7 +616,7 @@ bool idle_startup()
F32 xfer_throttle_bps = gSavedSettings.getF32("XferThrottle");
if (xfer_throttle_bps > 1.f)
{
- gXferManager->setUseAckThrottling(TRUE);
+ gXferManager->setUseAckThrottling(true);
gXferManager->setAckThrottleBPS(xfer_throttle_bps);
}
gAssetStorage = new LLViewerAssetStorage(msg, gXferManager);
@@ -626,13 +630,13 @@ bool idle_startup()
if (inBandwidth != 0.f)
{
LL_DEBUGS("AppInit") << "Setting packetring incoming bandwidth to " << inBandwidth << LL_ENDL;
- msg->mPacketRing.setUseInThrottle(TRUE);
+ msg->mPacketRing.setUseInThrottle(true);
msg->mPacketRing.setInBandwidth(inBandwidth);
}
if (outBandwidth != 0.f)
{
LL_DEBUGS("AppInit") << "Setting packetring outgoing bandwidth to " << outBandwidth << LL_ENDL;
- msg->mPacketRing.setUseOutThrottle(TRUE);
+ msg->mPacketRing.setUseOutThrottle(true);
msg->mPacketRing.setOutBandwidth(outBandwidth);
}
}
@@ -644,20 +648,11 @@ bool idle_startup()
// or audio cues in connection UI.
//-------------------------------------------------
- if (FALSE == gSavedSettings.getBOOL("NoAudio"))
+ if (false == gSavedSettings.getBOOL("NoAudio"))
{
delete gAudiop;
gAudiop = NULL;
-#ifdef LL_FMODSTUDIO
-#if !LL_WINDOWS
- if (NULL == getenv("LL_BAD_FMODSTUDIO_DRIVER"))
-#endif // !LL_WINDOWS
- {
- gAudiop = (LLAudioEngine *) new LLAudioEngine_FMODSTUDIO(gSavedSettings.getBOOL("FMODExProfilerEnable"));
- }
-#endif
-
#ifdef LL_OPENAL
#if !LL_WINDOWS
if (NULL == getenv("LL_BAD_OPENAL_DRIVER"))
@@ -678,21 +673,10 @@ bool idle_startup()
#endif
if (gAudiop->init(window_handle, LLAppViewer::instance()->getSecondLifeTitle()))
{
- if (FALSE == gSavedSettings.getBOOL("UseMediaPluginsForStreamingAudio"))
- {
- LL_INFOS("AppInit") << "Using default impl to render streaming audio" << LL_ENDL;
- gAudiop->setStreamingAudioImpl(gAudiop->createDefaultStreamingAudioImpl());
- }
-
- // if the audio engine hasn't set up its own preferred handler for streaming audio
- // then set up the generic streaming audio implementation which uses media plugins
- if (NULL == gAudiop->getStreamingAudioImpl())
- {
- LL_INFOS("AppInit") << "Using media plugins to render streaming audio" << LL_ENDL;
- gAudiop->setStreamingAudioImpl(new LLStreamingAudio_MediaPlugins());
- }
+ LL_INFOS("AppInit") << "Using media plugins to render streaming audio" << LL_ENDL;
+ gAudiop->setStreamingAudioImpl(new LLStreamingAudio_MediaPlugins());
- gAudiop->setMuted(TRUE);
+ gAudiop->setMuted(true);
}
else
{
@@ -720,15 +704,15 @@ bool idle_startup()
// Previous initializeLoginInfo may have generated user credentials. Re-check them.
if (gUserCredential.isNull())
{
- show_connect_box = TRUE;
+ show_connect_box = true;
}
else if (gSavedSettings.getBOOL("AutoLogin"))
{
// Log into last account
gRememberPassword = true;
gRememberUser = true;
- gSavedSettings.setBOOL("RememberPassword", TRUE);
- gSavedSettings.setBOOL("RememberUser", TRUE);
+ gSavedSettings.setBOOL("RememberPassword", true);
+ gSavedSettings.setBOOL("RememberUser", true);
show_connect_box = false;
}
else if (gSavedSettings.getLLSD("UserLoginInfo").size() == 3)
@@ -742,7 +726,7 @@ bool idle_startup()
{
gRememberPassword = gSavedSettings.getBOOL("RememberPassword");
gRememberUser = gSavedSettings.getBOOL("RememberUser");
- show_connect_box = TRUE;
+ show_connect_box = true;
}
//setup map of datetime strings to codes and slt & local time offset from utc
@@ -751,7 +735,7 @@ bool idle_startup()
// Go to the next startup state
LLStartUp::setStartupState( STATE_BROWSER_INIT );
- return FALSE;
+ return false;
}
@@ -763,7 +747,7 @@ bool idle_startup()
display_startup();
// LLViewerMedia::initBrowser();
LLStartUp::setStartupState( STATE_LOGIN_SHOW );
- return FALSE;
+ return false;
}
@@ -805,7 +789,7 @@ bool idle_startup()
gUserCredential = gLoginHandler.initializeLoginInfo();
}
// Make sure the process dialog doesn't hide things
- gViewerWindow->setShowProgress(FALSE);
+ gViewerWindow->setShowProgress(false);
// Show the login dialog
login_show();
// connect dialog is already shown, so fill in the names
@@ -835,9 +819,9 @@ bool idle_startup()
LLStartUp::setStartupState( STATE_LOGIN_CLEANUP );
}
- gViewerWindow->setNormalControlsVisible( FALSE );
- gLoginMenuBarView->setVisible( TRUE );
- gLoginMenuBarView->setEnabled( TRUE );
+ gViewerWindow->setNormalControlsVisible( false );
+ gLoginMenuBarView->setVisible( true );
+ gLoginMenuBarView->setEnabled( true );
show_debug_menus();
// Hide the splash screen
@@ -858,7 +842,7 @@ bool idle_startup()
#endif
display_startup();
timeout.reset();
- return FALSE;
+ return false;
}
if (STATE_LOGIN_WAIT == LLStartUp::getStartupState())
@@ -874,7 +858,7 @@ bool idle_startup()
// display() function will be the one to run display_startup()
// Sleep so we don't spin the CPU
ms_sleep(1);
- return FALSE;
+ return false;
}
if (STATE_LOGIN_CLEANUP == LLStartUp::getStartupState())
@@ -890,7 +874,7 @@ bool idle_startup()
// could then change the preferences to fix the issue.
LLStartUp::setStartupState(STATE_LOGIN_SHOW);
- return FALSE;
+ return false;
}
// reset the values that could have come in from a slurl
@@ -1035,14 +1019,14 @@ bool idle_startup()
// Display the startup progress bar.
gViewerWindow->initTextures(agent_location_id);
- gViewerWindow->setShowProgress(TRUE);
- gViewerWindow->setProgressCancelButtonVisible(TRUE, LLTrans::getString("Quit"));
+ gViewerWindow->setShowProgress(true);
+ gViewerWindow->setProgressCancelButtonVisible(true, LLTrans::getString("Quit"));
gViewerWindow->revealIntroPanel();
LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT );
- return FALSE;
+ return false;
}
if(STATE_LOGIN_AUTH_INIT == LLStartUp::getStartupState())
@@ -1068,7 +1052,7 @@ bool idle_startup()
login->connect(gUserCredential);
LLStartUp::setStartupState( STATE_LOGIN_CURL_UNSTUCK );
- return FALSE;
+ return false;
}
if(STATE_LOGIN_CURL_UNSTUCK == LLStartUp::getStartupState())
@@ -1079,7 +1063,7 @@ bool idle_startup()
set_startup_status(progress, auth_desc, auth_message);
LLStartUp::setStartupState( STATE_LOGIN_PROCESS_RESPONSE );
- return FALSE;
+ return false;
}
if(STATE_LOGIN_PROCESS_RESPONSE == LLStartUp::getStartupState())
@@ -1197,7 +1181,7 @@ bool idle_startup()
general_cert_done);
reset_login();
- gSavedSettings.setBOOL("AutoLogin", FALSE);
+ gSavedSettings.setBOOL("AutoLogin", false);
show_connect_box = true;
}
if(certificate)
@@ -1224,7 +1208,7 @@ bool idle_startup()
general_cert_done);
reset_login();
- gSavedSettings.setBOOL("AutoLogin", FALSE);
+ gSavedSettings.setBOOL("AutoLogin", false);
show_connect_box = true;
}
@@ -1268,10 +1252,10 @@ bool idle_startup()
LLNotificationsUtil::add("ErrorMessage", args, LLSD(), login_alert_done);
transition_back_to_login_panel(emsg.str());
show_connect_box = true;
- return FALSE;
+ return false;
}
}
- return FALSE;
+ return false;
}
//---------------------------------------------------------------------
@@ -1293,7 +1277,7 @@ bool idle_startup()
// Since we connected, save off the settings so the user doesn't have to
// type the name/password again if we crash.
- gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE);
+ gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), true);
LLUIColorTable::instance().saveUserSettings();
display_startup();
@@ -1374,7 +1358,7 @@ bool idle_startup()
LLStartUp::setStartupState( STATE_MULTIMEDIA_INIT );
- return FALSE;
+ return false;
}
@@ -1387,7 +1371,7 @@ bool idle_startup()
LLStartUp::multimediaInit();
LLStartUp::setStartupState( STATE_FONT_INIT );
display_startup();
- return FALSE;
+ return false;
}
// Loading fonts takes several seconds
@@ -1396,7 +1380,7 @@ bool idle_startup()
LLStartUp::fontInit();
LLStartUp::setStartupState( STATE_SEED_GRANTED_WAIT );
display_startup();
- return FALSE;
+ return false;
}
//---------------------------------------------------------------------
@@ -1450,7 +1434,7 @@ bool idle_startup()
}
}
display_startup();
- return FALSE;
+ return false;
}
@@ -1475,10 +1459,10 @@ bool idle_startup()
if ( gViewerWindow != NULL)
{ // This isn't the first logon attempt, so show the UI
- gViewerWindow->setNormalControlsVisible( TRUE );
+ gViewerWindow->setNormalControlsVisible( true );
}
- gLoginMenuBarView->setVisible( FALSE );
- gLoginMenuBarView->setEnabled( FALSE );
+ gLoginMenuBarView->setVisible( false );
+ gLoginMenuBarView->setEnabled( false );
display_startup();
// direct logging to the debug console's line buffer
@@ -1503,7 +1487,7 @@ bool idle_startup()
display_startup();
#ifndef LL_RELEASE_FOR_DOWNLOAD
- gMessageSystem->setTimeDecodes( TRUE ); // Time the decode of each msg
+ gMessageSystem->setTimeDecodes( true ); // Time the decode of each msg
gMessageSystem->setTimeDecodesSpamThreshold( 0.05f ); // Spam if a single msg takes over 50ms to decode
#endif
display_startup();
@@ -1620,7 +1604,7 @@ bool idle_startup()
gUseCircuitCallbackCalled = false;
- msg->enableCircuit(gFirstSim, TRUE);
+ msg->enableCircuit(gFirstSim, true);
// now, use the circuit info to tell simulator about us!
LL_INFOS("AppInit") << "viewer: UserLoginLocationReply() Enabling " << gFirstSim << " with code " << msg->mOurCircuitCode << LL_ENDL;
msg->newMessageFast(_PREHASH_UseCircuitCode);
@@ -1631,7 +1615,7 @@ bool idle_startup()
msg->sendReliable(
gFirstSim,
gSavedSettings.getS32("UseCircuitCodeMaxRetries"),
- FALSE,
+ false,
(F32Seconds)gSavedSettings.getF32("UseCircuitCodeTimeout"),
use_circuit_callback,
NULL);
@@ -1639,7 +1623,7 @@ bool idle_startup()
timeout.reset();
display_startup();
- return FALSE;
+ return false;
}
//---------------------------------------------------------------------
@@ -1654,7 +1638,7 @@ bool idle_startup()
LLStartUp::setStartupState( STATE_AGENT_SEND );
}
pump_idle_startup_network();
- return FALSE;
+ return false;
}
//---------------------------------------------------------------------
@@ -1684,7 +1668,7 @@ bool idle_startup()
// But not on first login, because you can't see your avatar then
if (!gAgent.isFirstLogin())
{
- LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, TRUE);
+ LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, true);
effectp->setPositionGlobal(gAgent.getPositionGlobal());
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
LLHUDManager::getInstance()->sendEffects();
@@ -1694,7 +1678,7 @@ bool idle_startup()
timeout.reset();
display_startup();
- return FALSE;
+ return false;
}
//---------------------------------------------------------------------
@@ -1745,7 +1729,7 @@ bool idle_startup()
}
reset_login();
}
- return FALSE;
+ return false;
}
//---------------------------------------------------------------------
@@ -1799,7 +1783,7 @@ bool idle_startup()
display_startup();
LLStartUp::setStartupState(STATE_INVENTORY_SKEL);
display_startup();
- return FALSE;
+ return false;
}
if (STATE_INVENTORY_SKEL == LLStartUp::getStartupState())
@@ -1831,7 +1815,7 @@ bool idle_startup()
display_startup();
LLStartUp::setStartupState(STATE_INVENTORY_SEND2);
display_startup();
- return FALSE;
+ return false;
}
if (STATE_INVENTORY_SEND2 == LLStartUp::getStartupState())
@@ -1911,7 +1895,7 @@ bool idle_startup()
// visible. JC
if (show_hud || gSavedSettings.getBOOL("ShowTutorial"))
{
- LLFloaterReg::showInstance("hud", LLSD(), FALSE);
+ LLFloaterReg::showInstance("hud", LLSD(), false);
}
display_startup();
@@ -1948,7 +1932,7 @@ bool idle_startup()
LLStartUp::setStartupState(STATE_INVENTORY_CALLBACKS );
display_startup();
- return FALSE;
+ return false;
}
//---------------------------------------------------------------------
@@ -1959,7 +1943,7 @@ bool idle_startup()
if (!LLInventoryModel::isSysFoldersReady())
{
display_startup();
- return FALSE;
+ return false;
}
LLInventoryModelBackgroundFetch::instance().start();
LLUUID cof_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
@@ -2005,7 +1989,7 @@ bool idle_startup()
LLStartUp::setStartupState( STATE_MISC );
display_startup();
- return FALSE;
+ return false;
}
@@ -2045,12 +2029,12 @@ bool idle_startup()
if (gSavedSettings.getBOOL("ShowHelpOnFirstLogin"))
{
- gSavedSettings.setBOOL("HelpFloaterOpen", TRUE);
+ 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);
+ gSavedSettings.setBOOL("ShowStartLocation", true);
}
display_startup();
@@ -2072,7 +2056,7 @@ bool idle_startup()
display_startup();
// We're successfully logged in.
- gSavedSettings.setBOOL("FirstLoginThisInstall", FALSE);
+ gSavedSettings.setBOOL("FirstLoginThisInstall", false);
LLFloaterReg::showInitialVisibleInstances();
@@ -2106,8 +2090,8 @@ bool idle_startup()
if (item_id.notNull() && asset_id.notNull())
{
// Could schedule and delay these for later.
- const BOOL no_inform_server = FALSE;
- const BOOL no_deactivate_similar = FALSE;
+ const bool no_inform_server = false;
+ const bool no_deactivate_similar = false;
LLGestureMgr::instance().activateGestureWithAsset(item_id, asset_id,
no_inform_server,
no_deactivate_similar);
@@ -2120,7 +2104,7 @@ bool idle_startup()
LLGestureMgr::instance().setFetchIDs(item_ids);
LLGestureMgr::instance().startFetch();
}
- gDisplaySwapBuffers = TRUE;
+ gDisplaySwapBuffers = true;
display_startup();
LLMessageSystem* msg = gMessageSystem;
@@ -2163,13 +2147,13 @@ bool idle_startup()
&& gSavedSettings.getBOOL("RestoreCameraPosOnLogin"))
{
// restore old camera pos
- gAgentCamera.setFocusOnAvatar(FALSE, FALSE);
+ gAgentCamera.setFocusOnAvatar(false, false);
gAgentCamera.setCameraPosAndFocusGlobal(gSavedSettings.getVector3d("CameraPosOnLogout"), gSavedSettings.getVector3d("FocusPosOnLogout"), LLUUID::null);
- BOOL limit_hit = FALSE;
+ bool limit_hit = false;
gAgentCamera.calcCameraPositionTargetGlobal(&limit_hit);
if (limit_hit)
{
- gAgentCamera.setFocusOnAvatar(TRUE, FALSE);
+ gAgentCamera.setFocusOnAvatar(true, false);
}
gAgentCamera.stopCameraAnimation();
}
@@ -2206,7 +2190,7 @@ bool idle_startup()
LLStartUp::setStartupState( STATE_PRECACHE );
timeout.reset();
- return FALSE;
+ return false;
}
if (STATE_PRECACHE == LLStartUp::getStartupState())
@@ -2232,7 +2216,7 @@ bool idle_startup()
if (isAgentAvatarValid() && !gAgent.isFirstLogin() && !gAgent.isOutfitChosen())
{
gAgentWearables.notifyLoadingStarted();
- gAgent.setOutfitChosen(TRUE);
+ gAgent.setOutfitChosen(true);
gAgentWearables.sendDummyAgentWearablesUpdate();
callAfterCOFFetch(set_flags_and_update_appearance);
}
@@ -2265,7 +2249,7 @@ bool idle_startup()
display_startup();
}
- return TRUE;
+ return true;
}
if (STATE_WEARABLES_WAIT == LLStartUp::getStartupState())
@@ -2311,7 +2295,7 @@ bool idle_startup()
{
LL_DEBUGS("Avatar") << "avatar fully loaded" << LL_ENDL;
LLStartUp::setStartupState( STATE_CLEANUP );
- return TRUE;
+ return true;
}
}
else
@@ -2322,7 +2306,7 @@ bool idle_startup()
// We have our clothing, proceed.
LL_DEBUGS("Avatar") << "wearables loaded" << LL_ENDL;
LLStartUp::setStartupState( STATE_CLEANUP );
- return TRUE;
+ return true;
}
}
//fall through this frame to STATE_CLEANUP
@@ -2351,7 +2335,7 @@ bool idle_startup()
LL_DEBUGS("AppInit") << "Done releasing bitmap" << LL_ENDL;
//gViewerWindow->revealIntroPanel();
gViewerWindow->setStartupComplete();
- gViewerWindow->setProgressCancelButtonVisible(FALSE);
+ gViewerWindow->setProgressCancelButtonVisible(false);
display_startup();
// We're not away from keyboard, even though login might have taken
@@ -2419,10 +2403,10 @@ bool idle_startup()
LLPerfStats::StatsRecorder::setAutotuneInit();
- return TRUE;
+ return true;
}
- return TRUE;
+ return true;
}
//
@@ -2436,7 +2420,7 @@ void login_show()
// Hide the toolbars: may happen to come back here if login fails after login agent but before login in region
if (gToolBarView)
{
- gToolBarView->setVisible(FALSE);
+ gToolBarView->setVisible(false);
}
LLPanelLogin::show( gViewerWindow->getWindowRectScaled(), login_callback, NULL );
@@ -2458,7 +2442,7 @@ void login_callback(S32 option, void *userdata)
if (!gSavedSettings.getBOOL("RememberPassword"))
{
// turn off the setting and write out to disk
- gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile") , TRUE );
+ gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile") , true );
LLUIColorTable::instance().saveUserSettings();
}
@@ -2941,7 +2925,7 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
LL_DEBUGS() << "initial outfit category id: " << cat_id << LL_ENDL;
}
- gAgent.setOutfitChosen(TRUE);
+ gAgent.setOutfitChosen(true);
gAgentWearables.sendDummyAgentWearablesUpdate();
}
@@ -3036,13 +3020,18 @@ void reset_login()
if ( gViewerWindow )
{ // Hide menus and normal buttons
- gViewerWindow->setNormalControlsVisible( FALSE );
- gLoginMenuBarView->setVisible( TRUE );
- gLoginMenuBarView->setEnabled( TRUE );
+ gViewerWindow->setNormalControlsVisible( false );
+ gLoginMenuBarView->setVisible( true );
+ gLoginMenuBarView->setEnabled( true );
}
// Hide any other stuff
LLFloaterReg::hideVisibleInstances();
+
+ if (LLStartUp::getStartupState() > STATE_WORLD_INIT)
+ {
+ gViewerWindow->resetStatusBarContainer();
+ }
LLStartUp::setStartupState( STATE_BROWSER_INIT );
if (LLVoiceClient::instanceExists())
@@ -3423,8 +3412,8 @@ void trust_cert_done(const LLSD& notification, const LLSD& response)
}
case OPT_CANCEL_TRUST:
reset_login();
- gSavedSettings.setBOOL("AutoLogin", FALSE);
- LLStartUp::setStartupState( STATE_LOGIN_SHOW );
+ gSavedSettings.setBOOL("AutoLogin", false);
+ LLStartUp::setStartupState( STATE_LOGIN_SHOW );
default:
LLPanelLogin::giveFocus();
break;
@@ -3642,7 +3631,7 @@ bool process_login_success_response()
gFirstSim.set(sim_ip_str, sim_port);
if (gFirstSim.isOk())
{
- gMessageSystem->enableCircuit(gFirstSim, TRUE);
+ gMessageSystem->enableCircuit(gFirstSim, true);
}
}
std::string region_x_str = response["region_x"];
@@ -3741,7 +3730,7 @@ bool process_login_success_response()
// outfit is chosen on COF contents, initial outfit
// requested and available, etc.
- //gAgent.setGenderChosen(TRUE);
+ //gAgent.setGenderChosen(true);
}
bool pacific_daylight_time = false;
@@ -3887,6 +3876,6 @@ void transition_back_to_login_panel(const std::string& emsg)
{
// Bounce back to the login screen.
reset_login(); // calls LLStartUp::setStartupState( STATE_LOGIN_SHOW );
- gSavedSettings.setBOOL("AutoLogin", FALSE);
+ gSavedSettings.setBOOL("AutoLogin", false);
}
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 5bd203cb65..8717666a95 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -123,7 +123,7 @@ LLStatusBar::LLStatusBar(const LLRect& rect)
setRect(rect);
// status bar can possible overlay menus?
- setMouseOpaque(FALSE);
+ setMouseOpaque(false);
mBalanceTimer = new LLFrameTimer();
mHealthTimer = new LLFrameTimer();
@@ -153,13 +153,13 @@ void LLStatusBar::draw()
LLPanel::draw();
}
-BOOL LLStatusBar::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLStatusBar::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
show_navbar_context_menu(this,x,y);
- return TRUE;
+ return true;
}
-BOOL LLStatusBar::postBuild()
+bool LLStatusBar::postBuild()
{
gMenuBarView->setRightMouseDownCallback(boost::bind(&show_navbar_context_menu, _1, _2, _3));
@@ -242,22 +242,22 @@ BOOL LLStatusBar::postBuild()
mPanelPresetsCameraPulldown = new LLPanelPresetsCameraPulldown();
addChild(mPanelPresetsCameraPulldown);
mPanelPresetsCameraPulldown->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT);
- mPanelPresetsCameraPulldown->setVisible(FALSE);
+ mPanelPresetsCameraPulldown->setVisible(false);
mPanelPresetsPulldown = new LLPanelPresetsPulldown();
addChild(mPanelPresetsPulldown);
mPanelPresetsPulldown->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT);
- mPanelPresetsPulldown->setVisible(FALSE);
+ mPanelPresetsPulldown->setVisible(false);
mPanelVolumePulldown = new LLPanelVolumePulldown();
addChild(mPanelVolumePulldown);
mPanelVolumePulldown->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT);
- mPanelVolumePulldown->setVisible(FALSE);
+ mPanelVolumePulldown->setVisible(false);
mPanelNearByMedia = new LLPanelNearByMedia();
addChild(mPanelNearByMedia);
mPanelNearByMedia->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT);
- mPanelNearByMedia->setVisible(FALSE);
+ mPanelNearByMedia->setVisible(false);
updateBalancePanelPosition();
@@ -265,7 +265,7 @@ BOOL LLStatusBar::postBuild()
mFilterEdit = getChild<LLSearchEditor>( "search_menu_edit" );
mSearchPanel = getChild<LLPanel>( "menu_search_panel" );
- BOOL search_panel_visible = gSavedSettings.getBOOL("MenuSearch");
+ bool search_panel_visible = gSavedSettings.getBOOL("MenuSearch");
mSearchPanel->setVisible(search_panel_visible);
mFilterEdit->setKeystrokeCallback(boost::bind(&LLStatusBar::onUpdateFilterTerm, this));
mFilterEdit->setCommitCallback(boost::bind(&LLStatusBar::onUpdateFilterTerm, this));
@@ -277,7 +277,7 @@ BOOL LLStatusBar::postBuild()
updateMenuSearchPosition();
}
- return TRUE;
+ return true;
}
// Per-frame updates of visibility
@@ -436,7 +436,7 @@ void LLStatusBar::sendMoneyBalanceRequest()
}
// Double amount of retries due to this request initially happening during busy stage
// Ideally this should be turned into a capability
- gMessageSystem->sendReliable(gAgent.getRegionHost(), LL_DEFAULT_RELIABLE_RETRIES * 2, TRUE, LL_PING_BASED_TIMEOUT_DUMMY, NULL, NULL);
+ gMessageSystem->sendReliable(gAgent.getRegionHost(), LL_DEFAULT_RELIABLE_RETRIES * 2, true, LL_PING_BASED_TIMEOUT_DUMMY, NULL, NULL);
}
@@ -487,7 +487,7 @@ void LLStatusBar::setLandCommitted(S32 committed)
mSquareMetersCommitted = committed;
}
-BOOL LLStatusBar::isUserTiered() const
+bool LLStatusBar::isUserTiered() const
{
return (mSquareMetersCredit > 0);
}
@@ -533,10 +533,10 @@ void LLStatusBar::onMouseEnterPresetsCamera()
// show the master presets pull-down
LLUI::getInstance()->clearPopups();
LLUI::getInstance()->addPopup(mPanelPresetsCameraPulldown);
- mPanelNearByMedia->setVisible(FALSE);
- mPanelVolumePulldown->setVisible(FALSE);
- mPanelPresetsPulldown->setVisible(FALSE);
- mPanelPresetsCameraPulldown->setVisible(TRUE);
+ mPanelNearByMedia->setVisible(false);
+ mPanelVolumePulldown->setVisible(false);
+ mPanelPresetsPulldown->setVisible(false);
+ mPanelPresetsCameraPulldown->setVisible(true);
}
void LLStatusBar::onMouseEnterPresets()
@@ -557,9 +557,9 @@ void LLStatusBar::onMouseEnterPresets()
// show the master presets pull-down
LLUI::getInstance()->clearPopups();
LLUI::getInstance()->addPopup(mPanelPresetsPulldown);
- mPanelNearByMedia->setVisible(FALSE);
- mPanelVolumePulldown->setVisible(FALSE);
- mPanelPresetsPulldown->setVisible(TRUE);
+ mPanelNearByMedia->setVisible(false);
+ mPanelVolumePulldown->setVisible(false);
+ mPanelPresetsPulldown->setVisible(true);
}
void LLStatusBar::onMouseEnterVolume()
@@ -581,10 +581,10 @@ void LLStatusBar::onMouseEnterVolume()
// show the master volume pull-down
LLUI::getInstance()->clearPopups();
LLUI::getInstance()->addPopup(mPanelVolumePulldown);
- mPanelPresetsCameraPulldown->setVisible(FALSE);
- mPanelPresetsPulldown->setVisible(FALSE);
- mPanelNearByMedia->setVisible(FALSE);
- mPanelVolumePulldown->setVisible(TRUE);
+ mPanelPresetsCameraPulldown->setVisible(false);
+ mPanelPresetsPulldown->setVisible(false);
+ mPanelNearByMedia->setVisible(false);
+ mPanelVolumePulldown->setVisible(true);
}
void LLStatusBar::onMouseEnterNearbyMedia()
@@ -606,10 +606,10 @@ void LLStatusBar::onMouseEnterNearbyMedia()
LLUI::getInstance()->clearPopups();
LLUI::getInstance()->addPopup(mPanelNearByMedia);
- mPanelPresetsCameraPulldown->setVisible(FALSE);
- mPanelPresetsPulldown->setVisible(FALSE);
- mPanelVolumePulldown->setVisible(FALSE);
- mPanelNearByMedia->setVisible(TRUE);
+ mPanelPresetsCameraPulldown->setVisible(false);
+ mPanelPresetsPulldown->setVisible(false);
+ mPanelVolumePulldown->setVisible(false);
+ mPanelNearByMedia->setVisible(true);
}
@@ -637,7 +637,7 @@ void LLStatusBar::onClickMediaToggle(void* data)
LLViewerMedia::getInstance()->setAllMediaPaused(pause);
}
-BOOL can_afford_transaction(S32 cost)
+bool can_afford_transaction(S32 cost)
{
return((cost <= 0)||((gStatusBar) && (gStatusBar->getBalance() >=cost)));
}
diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h
index 3e9190652d..daa94fb6bd 100644
--- a/indra/newview/llstatusbar.h
+++ b/indra/newview/llstatusbar.h
@@ -64,8 +64,8 @@ public:
/*virtual*/ void draw();
- /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool postBuild();
// MANIPULATORS
void setBalance(S32 balance);
@@ -88,7 +88,7 @@ public:
S32 getBalance() const;
S32 getHealth() const;
- BOOL isUserTiered() const;
+ bool isUserTiered() const;
S32 getSquareMetersCredit() const;
S32 getSquareMetersCommitted() const;
S32 getSquareMetersLeft() const;
@@ -145,7 +145,7 @@ private:
};
// *HACK: Status bar owns your cached money balance. JC
-BOOL can_afford_transaction(S32 cost);
+bool can_afford_transaction(S32 cost);
extern LLStatusBar *gStatusBar;
diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp
index 1418499f8b..b4e5a5233d 100644
--- a/indra/newview/llsurface.cpp
+++ b/indra/newview/llsurface.cpp
@@ -90,7 +90,7 @@ LLSurface::LLSurface(U32 type, LLViewerRegion *regionp) :
// One of each for each camera
mVisiblePatchCount = 0;
- mHasZData = FALSE;
+ mHasZData = false;
// "uninitialized" min/max z
mMinZ = 10000.f;
mMaxZ = -10000.f;
@@ -243,7 +243,7 @@ void LLSurface::createSTexture()
}
}
- mSTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE);
+ mSTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), false);
mSTexturep->dontDiscard();
gGL.getTexUnit(0)->bind(mSTexturep);
mSTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
@@ -268,7 +268,7 @@ void LLSurface::createWaterTexture()
}
}
- mWaterTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE);
+ mWaterTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), false);
mWaterTexturep->dontDiscard();
gGL.getTexUnit(0)->bind(mWaterTexturep);
mWaterTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
@@ -643,17 +643,18 @@ void LLSurface::updatePatchVisibilities(LLAgent &agent)
}
}
-BOOL LLSurface::idleUpdate(F32 max_update_time)
+template<bool PBR>
+bool LLSurface::idleUpdate(F32 max_update_time)
{
if (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_TERRAIN))
{
- return FALSE;
+ return false;
}
// Perform idle time update of non-critical stuff.
// In this case, texture and normal updates.
LLTimer update_timer;
- BOOL did_update = FALSE;
+ bool did_update = false;
// If the Z height data has changed, we need to rebuild our
// property line vertex arrays.
@@ -669,13 +670,13 @@ BOOL LLSurface::idleUpdate(F32 max_update_time)
{
std::set<LLSurfacePatch *>::iterator curiter = iter++;
LLSurfacePatch *patchp = *curiter;
- patchp->updateNormals();
+ patchp->updateNormals<PBR>();
patchp->updateVerticalStats();
if (max_update_time == 0.f || update_timer.getElapsedTimeF32() < max_update_time)
{
if (patchp->updateTexture())
{
- did_update = TRUE;
+ did_update = true;
patchp->clearDirty();
mDirtyPatchList.erase(curiter);
}
@@ -691,7 +692,10 @@ BOOL LLSurface::idleUpdate(F32 max_update_time)
return did_update;
}
-void LLSurface::decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, BOOL b_large_patch)
+template bool LLSurface::idleUpdate</*PBR=*/false>(F32 max_update_time);
+template bool LLSurface::idleUpdate</*PBR=*/true>(F32 max_update_time);
+
+void LLSurface::decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, bool b_large_patch)
{
LLPatchHeader ph;
@@ -758,16 +762,16 @@ void LLSurface::decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, BOOL
}
-// Retrurns TRUE if "position" is within the bounds of surface.
+// Retrurns true if "position" is within the bounds of surface.
// "position" is region-local
-BOOL LLSurface::containsPosition(const LLVector3 &position)
+bool LLSurface::containsPosition(const LLVector3 &position)
{
if (position.mV[VX] < 0.0f || position.mV[VX] > mMetersPerEdge ||
position.mV[VY] < 0.0f || position.mV[VY] > mMetersPerEdge)
{
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
@@ -1030,8 +1034,8 @@ void LLSurface::createPatchData()
for (i=0; i<mPatchesPerEdge; i++)
{
patchp = getPatch(i, j);
- patchp->mHasReceivedData = FALSE;
- patchp->mSTexUpdate = TRUE;
+ patchp->mHasReceivedData = false;
+ patchp->mSTexUpdate = true;
S32 data_offset = i * mGridsPerPatchEdge + j * mGridsPerPatchEdge * mGridsPerEdge;
@@ -1218,13 +1222,13 @@ F32 LLSurface::getWaterHeight() const
}
-BOOL LLSurface::generateWaterTexture(const F32 x, const F32 y,
+bool LLSurface::generateWaterTexture(const F32 x, const F32 y,
const F32 width, const F32 height)
{
LL_PROFILE_ZONE_SCOPED
if (!getWaterTexture())
{
- return FALSE;
+ return false;
}
S32 tex_width = mWaterTexturep->getWidth();
@@ -1310,5 +1314,5 @@ BOOL LLSurface::generateWaterTexture(const F32 x, const F32 y,
}
mWaterTexturep->setSubImage(raw, x_begin, y_begin, x_end - x_begin, y_end - y_begin);
- return TRUE;
+ return true;
}
diff --git a/indra/newview/llsurface.h b/indra/newview/llsurface.h
index 33a64ae7d5..264080078c 100644
--- a/indra/newview/llsurface.h
+++ b/indra/newview/llsurface.h
@@ -84,7 +84,7 @@ public:
void disconnectNeighbor(LLSurface *neighborp);
void disconnectAllNeighbors();
- virtual void decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, BOOL b_large_patch);
+ virtual void decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, bool b_large_patch);
virtual void updatePatchVisibilities(LLAgent &agent);
inline F32 getZ(const U32 k) const { return mSurfaceZ[k]; }
@@ -112,9 +112,10 @@ public:
LLSurfacePatch *resolvePatchGlobal(const LLVector3d &position_global) const;
// Update methods (called during idle, normally)
- BOOL idleUpdate(F32 max_update_time);
+ template<bool PBR>
+ bool idleUpdate(F32 max_update_time);
- BOOL containsPosition(const LLVector3 &position);
+ bool containsPosition(const LLVector3 &position);
void moveZ(const S32 x, const S32 y, const F32 delta);
@@ -128,7 +129,7 @@ public:
LLViewerTexture *getSTexture();
LLViewerTexture *getWaterTexture();
- BOOL hasZData() const { return mHasZData; }
+ bool hasZData() const { return mHasZData; }
void dirtyAllPatches(); // Use this to dirty all patches when changing terrain parameters
@@ -178,7 +179,7 @@ protected:
void createPatchData(); // Allocates memory for patches.
void destroyPatchData(); // Deallocates memory for patches.
- BOOL generateWaterTexture(const F32 x, const F32 y,
+ bool generateWaterTexture(const F32 x, const F32 y,
const F32 width, const F32 height); // Generate texture from composition values.
//F32 updateTexture(LLSurfacePatch *ppatch);
@@ -213,7 +214,7 @@ protected:
LLPatchVertexArray mPVArray;
- BOOL mHasZData; // We've received any patch data for this surface.
+ bool mHasZData; // We've received any patch data for this surface.
F32 mMinZ; // min z for this region (during the session)
F32 mMaxZ; // max z for this region (during the session)
@@ -224,6 +225,9 @@ private:
static S32 sTextureSize; // Size of the surface texture
};
+extern template bool LLSurface::idleUpdate</*PBR=*/false>(F32 max_update_time);
+extern template bool LLSurface::idleUpdate</*PBR=*/true>(F32 max_update_time);
+
// . __.
diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp
index 449d3d95c8..9703e2ae27 100644
--- a/indra/newview/llsurfacepatch.cpp
+++ b/indra/newview/llsurfacepatch.cpp
@@ -47,11 +47,11 @@ extern U64MicrosecondsImplicit gFrameTime;
extern LLPipeline gPipeline;
LLSurfacePatch::LLSurfacePatch()
-: mHasReceivedData(FALSE),
- mSTexUpdate(FALSE),
- mDirty(FALSE),
- mDirtyZStats(TRUE),
- mHeightsGenerated(FALSE),
+: mHasReceivedData(false),
+ mSTexUpdate(false),
+ mDirty(false),
+ mDirtyZStats(true),
+ mHeightsGenerated(false),
mDataOffset(0),
mDataZ(NULL),
mDataNorm(NULL),
@@ -78,7 +78,7 @@ LLSurfacePatch::LLSurfacePatch()
}
for (i = 0; i < 9; i++)
{
- mNormalsInvalid[i] = TRUE;
+ mNormalsInvalid[i] = true;
}
}
@@ -102,12 +102,12 @@ void LLSurfacePatch::dirty()
LL_WARNS("Terrain") << "No viewer object for this surface patch!" << LL_ENDL;
}
- mDirtyZStats = TRUE;
- mHeightsGenerated = FALSE;
+ mDirtyZStats = true;
+ mHeightsGenerated = false;
if (!mDirty)
{
- mDirty = TRUE;
+ mDirty = true;
mSurfacep->dirtySurfacePatch(this);
}
}
@@ -137,7 +137,7 @@ void LLSurfacePatch::disconnectNeighbor(LLSurface *surfacep)
if (getNeighborPatch(i)->mSurfacep == surfacep)
{
setNeighborPatch(i, NULL);
- mNormalsInvalid[i] = TRUE;
+ mNormalsInvalid[i] = true;
}
}
}
@@ -221,7 +221,9 @@ void LLSurfacePatch::eval(const U32 x, const U32 y, const U32 stride, LLVector3
*vertex = pos_agent-mVObjp->getRegion()->getOriginAgent();
LLVector3 rel_pos = pos_agent - mSurfacep->getOriginAgent();
- LLVector3 tex_pos = rel_pos * (1.f/surface_stride);
+ // *NOTE: Only PBR terrain uses the UVs right now. Texture terrain just ignores it.
+ // *NOTE: In the future, UVs and horizontal position will no longer have a 1:1 relationship for PBR terrain
+ LLVector3 tex_pos = rel_pos;
tex0->mV[0] = tex_pos.mV[0];
tex0->mV[1] = tex_pos.mV[1];
tex1->mV[0] = mSurfacep->getRegion()->getCompositionXY(llfloor(mOriginRegion.mV[0])+x, llfloor(mOriginRegion.mV[1])+y);
@@ -241,7 +243,8 @@ void LLSurfacePatch::eval(const U32 x, const U32 y, const U32 stride, LLVector3
}
-void LLSurfacePatch::calcNormal(const U32 x, const U32 y, const U32 stride)
+template<>
+void LLSurfacePatch::calcNormal</*PBR=*/false>(const U32 x, const U32 y, const U32 stride)
{
U32 patch_width = mSurfacep->mPVArray.mPatchWidth;
U32 surface_stride = mSurfacep->getGridsPerEdge();
@@ -354,6 +357,166 @@ void LLSurfacePatch::calcNormal(const U32 x, const U32 y, const U32 stride)
*(mDataNorm + surface_stride * y + x) = normal;
}
+template<>
+void LLSurfacePatch::calcNormal</*PBR=*/true>(const U32 x, const U32 y, const U32 stride)
+{
+ llassert(mDataNorm);
+ constexpr U32 index = 0;
+
+ const U32 surface_stride = mSurfacep->getGridsPerEdge();
+ LLVector3& normal_out = *(mDataNorm + surface_stride * y + x);
+ calcNormalFlat(normal_out, x, y, index);
+}
+
+// Calculate the flat normal of a triangle whose least coordinate is specified by the given x,y values.
+// If index = 0, calculate the normal of the first triangle, otherwise calculate the normal of the second.
+void LLSurfacePatch::calcNormalFlat(LLVector3& normal_out, const U32 x, const U32 y, const U32 index)
+{
+ llassert(index == 0 || index == 1);
+
+ U32 patch_width = mSurfacep->mPVArray.mPatchWidth;
+ U32 surface_stride = mSurfacep->getGridsPerEdge();
+
+ // Vertex stride is always 1 because we want the flat surface of the current triangle face
+ constexpr U32 stride = 1;
+
+ const F32 mpg = mSurfacep->getMetersPerGrid() * stride;
+
+ S32 poffsets[2][2][2];
+ poffsets[0][0][0] = x;
+ poffsets[0][0][1] = y;
+
+ poffsets[0][1][0] = x;
+ poffsets[0][1][1] = y + stride;
+
+ poffsets[1][0][0] = x + stride;
+ poffsets[1][0][1] = y;
+
+ poffsets[1][1][0] = x + stride;
+ poffsets[1][1][1] = y + stride;
+
+ const LLSurfacePatch *ppatches[2][2];
+
+ // LLVector3 p1, p2, p3, p4;
+
+ ppatches[0][0] = this;
+ ppatches[0][1] = this;
+ ppatches[1][0] = this;
+ ppatches[1][1] = this;
+
+ U32 i, j;
+ for (i = 0; i < 2; i++)
+ {
+ for (j = 0; j < 2; j++)
+ {
+ if (poffsets[i][j][0] < 0)
+ {
+ if (!ppatches[i][j]->getNeighborPatch(WEST))
+ {
+ poffsets[i][j][0] = 0;
+ }
+ else
+ {
+ poffsets[i][j][0] += patch_width;
+ ppatches[i][j] = ppatches[i][j]->getNeighborPatch(WEST);
+ }
+ }
+ if (poffsets[i][j][1] < 0)
+ {
+ if (!ppatches[i][j]->getNeighborPatch(SOUTH))
+ {
+ poffsets[i][j][1] = 0;
+ }
+ else
+ {
+ poffsets[i][j][1] += patch_width;
+ ppatches[i][j] = ppatches[i][j]->getNeighborPatch(SOUTH);
+ }
+ }
+ if (poffsets[i][j][0] >= (S32)patch_width)
+ {
+ if (!ppatches[i][j]->getNeighborPatch(EAST))
+ {
+ poffsets[i][j][0] = patch_width - 1;
+ }
+ else
+ {
+ poffsets[i][j][0] -= patch_width;
+ ppatches[i][j] = ppatches[i][j]->getNeighborPatch(EAST);
+ }
+ }
+ if (poffsets[i][j][1] >= (S32)patch_width)
+ {
+ if (!ppatches[i][j]->getNeighborPatch(NORTH))
+ {
+ poffsets[i][j][1] = patch_width - 1;
+ }
+ else
+ {
+ poffsets[i][j][1] -= patch_width;
+ ppatches[i][j] = ppatches[i][j]->getNeighborPatch(NORTH);
+ }
+ }
+ }
+ }
+
+ LLVector3 p00(-mpg,-mpg,
+ *(ppatches[0][0]->mDataZ
+ + poffsets[0][0][0]
+ + poffsets[0][0][1]*surface_stride));
+ LLVector3 p01(-mpg,+mpg,
+ *(ppatches[0][1]->mDataZ
+ + poffsets[0][1][0]
+ + poffsets[0][1][1]*surface_stride));
+ LLVector3 p10(+mpg,-mpg,
+ *(ppatches[1][0]->mDataZ
+ + poffsets[1][0][0]
+ + poffsets[1][0][1]*surface_stride));
+ LLVector3 p11(+mpg,+mpg,
+ *(ppatches[1][1]->mDataZ
+ + poffsets[1][1][0]
+ + poffsets[1][1][1]*surface_stride));
+
+ // Triangle index / coordinate convention
+ // for a single surface patch
+ //
+ // p01 p11
+ //
+ // ^ ._____.
+ // | |\ |
+ // | | \ 1 |
+ // | | \ |
+ // | 0 \ |
+ // y |____\|
+ //
+ // p00 x ---> p10
+ //
+ // (z up / out of the screen due to right-handed coordinate system)
+
+ LLVector3 normal;
+ if (index == 0)
+ {
+ LLVector3 c1 = p10 - p00;
+ LLVector3 c2 = p01 - p00;
+
+ normal = c1;
+ normal %= c2;
+ normal.normVec();
+ }
+ else // index == 1
+ {
+ LLVector3 c1 = p11 - p01;
+ LLVector3 c2 = p11 - p10;
+
+ normal = c1;
+ normal %= c2;
+ normal.normVec();
+ }
+
+ llassert(&normal_out);
+ normal_out = normal;
+}
+
const LLVector3 &LLSurfacePatch::getNormal(const U32 x, const U32 y) const
{
U32 surface_stride = mSurfacep->getGridsPerEdge();
@@ -440,17 +603,18 @@ void LLSurfacePatch::updateVerticalStats()
mSurfacep->mMaxZ = llmax(mMaxZ, mSurfacep->mMaxZ);
mSurfacep->mMinZ = llmin(mMinZ, mSurfacep->mMinZ);
- mSurfacep->mHasZData = TRUE;
+ mSurfacep->mHasZData = true;
mSurfacep->getRegion()->calculateCenterGlobal();
if (mVObjp)
{
mVObjp->dirtyPatch();
}
- mDirtyZStats = FALSE;
+ mDirtyZStats = false;
}
+template<bool PBR>
void LLSurfacePatch::updateNormals()
{
if (mSurfacep->mType == 'w')
@@ -460,7 +624,7 @@ void LLSurfacePatch::updateNormals()
U32 grids_per_patch_edge = mSurfacep->getGridsPerPatchEdge();
U32 grids_per_edge = mSurfacep->getGridsPerEdge();
- BOOL dirty_patch = FALSE;
+ bool dirty_patch = false;
U32 i, j;
// update the east edge
@@ -468,12 +632,12 @@ void LLSurfacePatch::updateNormals()
{
for (j = 0; j <= grids_per_patch_edge; j++)
{
- calcNormal(grids_per_patch_edge, j, 2);
- calcNormal(grids_per_patch_edge - 1, j, 2);
- calcNormal(grids_per_patch_edge - 2, j, 2);
+ calcNormal<PBR>(grids_per_patch_edge, j, 2);
+ calcNormal<PBR>(grids_per_patch_edge - 1, j, 2);
+ calcNormal<PBR>(grids_per_patch_edge - 2, j, 2);
}
- dirty_patch = TRUE;
+ dirty_patch = true;
}
// update the north edge
@@ -481,12 +645,12 @@ void LLSurfacePatch::updateNormals()
{
for (i = 0; i <= grids_per_patch_edge; i++)
{
- calcNormal(i, grids_per_patch_edge, 2);
- calcNormal(i, grids_per_patch_edge - 1, 2);
- calcNormal(i, grids_per_patch_edge - 2, 2);
+ calcNormal<PBR>(i, grids_per_patch_edge, 2);
+ calcNormal<PBR>(i, grids_per_patch_edge - 1, 2);
+ calcNormal<PBR>(i, grids_per_patch_edge - 2, 2);
}
- dirty_patch = TRUE;
+ dirty_patch = true;
}
// update the west edge
@@ -494,10 +658,10 @@ void LLSurfacePatch::updateNormals()
{
for (j = 0; j < grids_per_patch_edge; j++)
{
- calcNormal(0, j, 2);
- calcNormal(1, j, 2);
+ calcNormal<PBR>(0, j, 2);
+ calcNormal<PBR>(1, j, 2);
}
- dirty_patch = TRUE;
+ dirty_patch = true;
}
// update the south edge
@@ -505,10 +669,10 @@ void LLSurfacePatch::updateNormals()
{
for (i = 0; i < grids_per_patch_edge; i++)
{
- calcNormal(i, 0, 2);
- calcNormal(i, 1, 2);
+ calcNormal<PBR>(i, 0, 2);
+ calcNormal<PBR>(i, 1, 2);
}
- dirty_patch = TRUE;
+ dirty_patch = true;
}
// Invalidating the northeast corner is different, because depending on what the adjacent neighbors are,
@@ -582,10 +746,10 @@ void LLSurfacePatch::updateNormals()
// We've got a northeast patch in the same surface.
// The z and normals will be handled by that patch.
}
- calcNormal(grids_per_patch_edge, grids_per_patch_edge, 2);
- calcNormal(grids_per_patch_edge, grids_per_patch_edge - 1, 2);
- calcNormal(grids_per_patch_edge - 1, grids_per_patch_edge, 2);
- calcNormal(grids_per_patch_edge - 1, grids_per_patch_edge - 1, 2);
+ calcNormal<PBR>(grids_per_patch_edge, grids_per_patch_edge, 2);
+ calcNormal<PBR>(grids_per_patch_edge, grids_per_patch_edge - 1, 2);
+ calcNormal<PBR>(grids_per_patch_edge - 1, grids_per_patch_edge, 2);
+ calcNormal<PBR>(grids_per_patch_edge - 1, grids_per_patch_edge - 1, 2);
dirty_patch = TRUE;
}
@@ -596,10 +760,10 @@ void LLSurfacePatch::updateNormals()
{
for (i=2; i < grids_per_patch_edge - 2; i++)
{
- calcNormal(i, j, 2);
+ calcNormal<PBR>(i, j, 2);
}
}
- dirty_patch = TRUE;
+ dirty_patch = true;
}
if (dirty_patch)
@@ -609,10 +773,13 @@ void LLSurfacePatch::updateNormals()
for (i = 0; i < 9; i++)
{
- mNormalsInvalid[i] = FALSE;
+ mNormalsInvalid[i] = false;
}
}
+template void LLSurfacePatch::updateNormals</*PBR=*/false>();
+template void LLSurfacePatch::updateNormals</*PBR=*/true>();
+
void LLSurfacePatch::updateEastEdge()
{
U32 grids_per_patch_edge = mSurfacep->getGridsPerPatchEdge();
@@ -677,7 +844,7 @@ void LLSurfacePatch::updateNorthEdge()
}
-BOOL LLSurfacePatch::updateTexture()
+bool LLSurfacePatch::updateTexture()
{
if (mSTexUpdate) // Update texture as needed
{
@@ -700,11 +867,11 @@ BOOL LLSurfacePatch::updateTexture()
if (comp->generateHeights((F32)origin_region[VX], (F32)origin_region[VY],
patch_size, patch_size))
{
- mHeightsGenerated = TRUE;
+ mHeightsGenerated = true;
}
else
{
- return FALSE;
+ return false;
}
}
@@ -718,11 +885,11 @@ BOOL LLSurfacePatch::updateTexture()
}
}
}
- return FALSE;
+ return false;
}
else
{
- return TRUE;
+ return true;
}
}
@@ -739,10 +906,10 @@ void LLSurfacePatch::updateGL()
updateCompositionStats();
F32 tex_patch_size = meters_per_grid*grids_per_patch_edge;
- if (comp->generateTexture((F32)origin_region[VX], (F32)origin_region[VY],
+ if (comp->generateMinimapTileLand((F32)origin_region[VX], (F32)origin_region[VY],
tex_patch_size, tex_patch_size))
{
- mSTexUpdate = FALSE;
+ mSTexUpdate = false;
// Also generate the water texture
mSurfacep->generateWaterTexture((F32)origin_region.mdV[VX], (F32)origin_region.mdV[VY],
@@ -752,13 +919,13 @@ void LLSurfacePatch::updateGL()
void LLSurfacePatch::dirtyZ()
{
- mSTexUpdate = TRUE;
+ mSTexUpdate = true;
// Invalidate all normals in this patch
U32 i;
for (i = 0; i < 9; i++)
{
- mNormalsInvalid[i] = TRUE;
+ mNormalsInvalid[i] = true;
}
// Invalidate normals in this and neighboring patches
@@ -766,12 +933,12 @@ void LLSurfacePatch::dirtyZ()
{
if (getNeighborPatch(i))
{
- getNeighborPatch(i)->mNormalsInvalid[gDirOpposite[i]] = TRUE;
+ getNeighborPatch(i)->mNormalsInvalid[gDirOpposite[i]] = true;
getNeighborPatch(i)->dirty();
if (i < 4)
{
- getNeighborPatch(i)->mNormalsInvalid[gDirAdjacent[gDirOpposite[i]][0]] = TRUE;
- getNeighborPatch(i)->mNormalsInvalid[gDirAdjacent[gDirOpposite[i]][1]] = TRUE;
+ getNeighborPatch(i)->mNormalsInvalid[gDirAdjacent[gDirOpposite[i]][0]] = true;
+ getNeighborPatch(i)->mNormalsInvalid[gDirAdjacent[gDirOpposite[i]][1]] = true;
}
}
}
@@ -807,7 +974,7 @@ void LLSurfacePatch::setOriginGlobal(const LLVector3d &origin_global)
mCenterRegion.mV[VX] = origin_region.mV[VX] + 0.5f*mSurfacep->getGridsPerPatchEdge()*mSurfacep->getMetersPerGrid();
mCenterRegion.mV[VY] = origin_region.mV[VY] + 0.5f*mSurfacep->getGridsPerPatchEdge()*mSurfacep->getMetersPerGrid();
- mVisInfo.mbIsVisible = FALSE;
+ mVisInfo.mbIsVisible = false;
mVisInfo.mDistance = 512.0f;
mVisInfo.mRenderLevel = 0;
mVisInfo.mRenderStride = mSurfacep->getGridsPerPatchEdge();
@@ -817,8 +984,8 @@ void LLSurfacePatch::setOriginGlobal(const LLVector3d &origin_global)
void LLSurfacePatch::connectNeighbor(LLSurfacePatch *neighbor_patchp, const U32 direction)
{
llassert(neighbor_patchp);
- mNormalsInvalid[direction] = TRUE;
- neighbor_patchp->mNormalsInvalid[gDirOpposite[direction]] = TRUE;
+ mNormalsInvalid[direction] = true;
+ neighbor_patchp->mNormalsInvalid[gDirOpposite[direction]] = true;
setNeighborPatch(direction, neighbor_patchp);
neighbor_patchp->setNeighborPatch(gDirOpposite[direction], this);
@@ -909,11 +1076,11 @@ void LLSurfacePatch::updateVisibility()
}
}
}
- mVisInfo.mbIsVisible = TRUE;
+ mVisInfo.mbIsVisible = true;
}
else
{
- mVisInfo.mbIsVisible = FALSE;
+ mVisInfo.mbIsVisible = false;
}
}
@@ -928,7 +1095,7 @@ LLVector3 LLSurfacePatch::getOriginAgent() const
return gAgent.getPosAgentFromGlobal(mOriginGlobal);
}
-BOOL LLSurfacePatch::getVisible() const
+bool LLSurfacePatch::getVisible() const
{
return mVisInfo.mbIsVisible;
}
@@ -945,10 +1112,10 @@ S32 LLSurfacePatch::getRenderLevel() const
void LLSurfacePatch::setHasReceivedData()
{
- mHasReceivedData = TRUE;
+ mHasReceivedData = true;
}
-BOOL LLSurfacePatch::getHasReceivedData() const
+bool LLSurfacePatch::getHasReceivedData() const
{
return mHasReceivedData;
}
@@ -1013,11 +1180,11 @@ F32 LLSurfacePatch::getMaxComposition() const
void LLSurfacePatch::setNeighborPatch(const U32 direction, LLSurfacePatch *neighborp)
{
mNeighborPatches[direction] = neighborp;
- mNormalsInvalid[direction] = TRUE;
+ mNormalsInvalid[direction] = true;
if (direction < 4)
{
- mNormalsInvalid[gDirAdjacent[direction][0]] = TRUE;
- mNormalsInvalid[gDirAdjacent[direction][1]] = TRUE;
+ mNormalsInvalid[gDirAdjacent[direction][0]] = true;
+ mNormalsInvalid[gDirAdjacent[direction][1]] = true;
}
}
diff --git a/indra/newview/llsurfacepatch.h b/indra/newview/llsurfacepatch.h
index 8c8f501dce..bb9128cf7e 100644
--- a/indra/newview/llsurfacepatch.h
+++ b/indra/newview/llsurfacepatch.h
@@ -44,13 +44,13 @@ class LLPatchVisibilityInfo
{
public:
LLPatchVisibilityInfo() :
- mbIsVisible(FALSE),
+ mbIsVisible(false),
mDistance(0.f),
mRenderLevel(0),
mRenderStride(0) { };
~LLPatchVisibilityInfo() { };
- BOOL mbIsVisible;
+ bool mbIsVisible;
F32 mDistance; // Distance from camera
S32 mRenderLevel;
U32 mRenderStride;
@@ -73,10 +73,11 @@ public:
void colorPatch(const U8 r, const U8 g, const U8 b);
- BOOL updateTexture();
+ bool updateTexture();
void updateVerticalStats();
void updateCompositionStats();
+ template<bool PBR>
void updateNormals();
void updateEastEdge();
@@ -88,7 +89,7 @@ public:
void dirtyZ(); // Dirty the z values of this patch
void setHasReceivedData();
- BOOL getHasReceivedData() const;
+ bool getHasReceivedData() const;
F32 getDistance() const;
F32 getMaxZ() const;
@@ -102,9 +103,18 @@ public:
LLVector3 getPointAgent(const U32 x, const U32 y) const; // get the point at the offset.
LLVector2 getTexCoords(const U32 x, const U32 y) const;
+ // Per-vertex normals
+ // *TODO: PBR=true is a test implementation solely for proof-of-concept.
+ // Final implementation would likely be very different and may not even use
+ // this function. If we decide to keep calcNormalFlat, remove index as it
+ // is a debug parameter for testing.
+ template<bool PBR>
void calcNormal(const U32 x, const U32 y, const U32 stride);
const LLVector3 &getNormal(const U32 x, const U32 y) const;
+ // Per-triangle normals for flat edges
+ void calcNormalFlat(LLVector3& normal_out, const U32 x, const U32 y, const U32 index /* 0 or 1 */);
+
void eval(const U32 x, const U32 y, const U32 stride,
LLVector3 *vertex, LLVector3 *normal, LLVector2 *tex0, LLVector2 *tex1);
@@ -124,7 +134,7 @@ public:
// +---+---+---+
- BOOL getVisible() const;
+ bool getVisible() const;
U32 getRenderStride() const;
S32 getRenderLevel() const;
@@ -134,21 +144,21 @@ public:
F32 *getDataZ() const { return mDataZ; }
void dirty(); // Mark this surface patch as dirty...
- void clearDirty() { mDirty = FALSE; }
+ void clearDirty() { mDirty = false; }
void clearVObj();
public:
- BOOL mHasReceivedData; // has the patch EVER received height data?
- BOOL mSTexUpdate; // Does the surface texture need to be updated?
+ bool mHasReceivedData; // has the patch EVER received height data?
+ bool mSTexUpdate; // Does the surface texture need to be updated?
protected:
LLSurfacePatch *mNeighborPatches[8]; // Adjacent patches
- BOOL mNormalsInvalid[9]; // Which normals are invalid
+ bool mNormalsInvalid[9]; // Which normals are invalid
- BOOL mDirty;
- BOOL mDirtyZStats;
- BOOL mHeightsGenerated;
+ bool mDirty;
+ bool mDirtyZStats;
+ bool mHeightsGenerated;
U32 mDataOffset;
F32 *mDataZ;
@@ -181,5 +191,8 @@ protected:
LLSurface *mSurfacep; // Pointer to "parent" surface
};
+extern template void LLSurfacePatch::updateNormals</*PBR=*/false>();
+extern template void LLSurfacePatch::updateNormals</*PBR=*/true>();
+
#endif // LL_LLSURFACEPATCH_H
diff --git a/indra/newview/llsyswellitem.cpp b/indra/newview/llsyswellitem.cpp
index 2a58f018e7..1a9efe93ed 100644
--- a/indra/newview/llsyswellitem.cpp
+++ b/indra/newview/llsyswellitem.cpp
@@ -68,9 +68,9 @@ void LLSysWellItem::onClickCloseBtn()
}
//---------------------------------------------------------------------------------
-BOOL LLSysWellItem::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLSysWellItem::handleMouseDown(S32 x, S32 y, MASK mask)
{
- BOOL res = LLPanel::handleMouseDown(x, y, mask);
+ bool res = LLPanel::handleMouseDown(x, y, mask);
if(!mCloseBtn->getRect().pointInRect(x, y))
mOnItemClick(this);
diff --git a/indra/newview/llsyswellitem.h b/indra/newview/llsyswellitem.h
index d961708a01..a735f6c389 100644
--- a/indra/newview/llsyswellitem.h
+++ b/indra/newview/llsyswellitem.h
@@ -55,7 +55,7 @@ public:
LLUUID getID() { return mID; }
// handlers
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask);
virtual void onMouseEnter(S32 x, S32 y, MASK mask);
virtual void onMouseLeave(S32 x, S32 y, MASK mask);
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp
index 8f64cff47c..faf28e68db 100644
--- a/indra/newview/llsyswellwindow.cpp
+++ b/indra/newview/llsyswellwindow.cpp
@@ -50,7 +50,7 @@ LLSysWellWindow::LLSysWellWindow(const LLSD& key) : LLTransientDockableFloater(N
}
//---------------------------------------------------------------------------------
-BOOL LLSysWellWindow::postBuild()
+bool LLSysWellWindow::postBuild()
{
mMessageList = getChild<LLFlatListView>("notification_list");
@@ -61,7 +61,7 @@ BOOL LLSysWellWindow::postBuild()
}
//---------------------------------------------------------------------------------
-void LLSysWellWindow::setMinimized(BOOL minimize)
+void LLSysWellWindow::setMinimized(bool minimize)
{
LLTransientDockableFloater::setMinimized(minimize);
}
@@ -77,7 +77,7 @@ void LLSysWellWindow::handleReshape(const LLRect& rect, bool by_user)
void LLSysWellWindow::onStartUpToastClick(S32 x, S32 y, MASK mask)
{
// just set floater visible. Screen channels will be cleared.
- setVisible(TRUE);
+ setVisible(true);
}
void LLSysWellWindow::setSysWellChiclet(LLSysWellChiclet* chiclet)
@@ -114,7 +114,7 @@ void LLSysWellWindow::removeItemByID(const LLUUID& id)
// hide chiclet window if there are no items left
if(isWindowEmpty())
{
- setVisible(FALSE);
+ setVisible(false);
}
}
@@ -137,7 +137,7 @@ void LLSysWellWindow::initChannel()
}
//---------------------------------------------------------------------------------
-void LLSysWellWindow::setVisible(BOOL visible)
+void LLSysWellWindow::setVisible(bool visible)
{
if (visible)
{
@@ -150,7 +150,7 @@ void LLSysWellWindow::setVisible(BOOL visible)
}
// do not show empty window
- if (NULL == mMessageList || isWindowEmpty()) visible = FALSE;
+ if (NULL == mMessageList || isWindowEmpty()) visible = false;
LLTransientDockableFloater::setVisible(visible);
@@ -198,7 +198,7 @@ void LLSysWellWindow::reshapeWindow()
S32 newWidth = curRect.getWidth() < MIN_WINDOW_WIDTH ? MIN_WINDOW_WIDTH : curRect.getWidth();
curRect.setLeftTopAndSize(curRect.mLeft, curRect.mTop, newWidth, new_window_height);
- reshape(curRect.getWidth(), curRect.getHeight(), TRUE);
+ reshape(curRect.getWidth(), curRect.getHeight(), true);
setRect(curRect);
}
@@ -277,20 +277,20 @@ void LLIMWellWindow::ObjectRowPanel::onMouseLeave(S32 x, S32 y, MASK mask)
//---------------------------------------------------------------------------------
// virtual
-BOOL LLIMWellWindow::ObjectRowPanel::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLIMWellWindow::ObjectRowPanel::handleMouseDown(S32 x, S32 y, MASK mask)
{
// Pass the mouse down event to the chiclet (EXT-596).
if (!mChiclet->pointInView(x, y) && !mCloseBtn->getRect().pointInRect(x, y)) // prevent double call of LLIMChiclet::onMouseDown()
{
mChiclet->onMouseDown();
- return TRUE;
+ return true;
}
return LLPanel::handleMouseDown(x, y, mask);
}
// virtual
-BOOL LLIMWellWindow::ObjectRowPanel::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLIMWellWindow::ObjectRowPanel::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
return mChiclet->handleRightMouseDown(x, y, mask);
}
@@ -323,9 +323,9 @@ LLIMWellWindow* LLIMWellWindow::findInstance(const LLSD& key /*= LLSD()*/)
return LLFloaterReg::findTypedInstance<LLIMWellWindow>("im_well_window", key);
}
-BOOL LLIMWellWindow::postBuild()
+bool LLIMWellWindow::postBuild()
{
- BOOL rv = LLSysWellWindow::postBuild();
+ bool rv = LLSysWellWindow::postBuild();
setTitle(getString("title_im_well_window"));
LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLIMWellWindow::findObjectChiclet, this, _1));
@@ -375,7 +375,7 @@ void LLIMWellWindow::removeObjectRow(const LLUUID& notification_id)
// hide chiclet window if there are no items left
if(isWindowEmpty())
{
- setVisible(FALSE);
+ setVisible(false);
}
}
diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h
index b96a2573a1..12c1de7626 100644
--- a/indra/newview/llsyswellwindow.h
+++ b/indra/newview/llsyswellwindow.h
@@ -48,7 +48,7 @@ public:
LLSysWellWindow(const LLSD& key);
virtual ~LLSysWellWindow();
- BOOL postBuild();
+ bool postBuild();
// other interface functions
// check is window empty
@@ -59,11 +59,11 @@ public:
LLPanel * findItemByID(const LLUUID& id);
// Operating with outfit
- virtual void setVisible(BOOL visible);
+ virtual void setVisible(bool visible);
void adjustWindowPosition();
/*virtual*/ void setDocked(bool docked, bool pop_on_undock = true);
// override LLFloater's minimization according to EXT-1216
- /*virtual*/ void setMinimized(BOOL minimize);
+ /*virtual*/ void setMinimized(bool minimize);
/*virtual*/ void handleReshape(const LLRect& rect, bool by_user);
void onStartUpToastClick(S32 x, S32 y, MASK mask);
@@ -71,8 +71,8 @@ public:
void setSysWellChiclet(LLSysWellChiclet* chiclet);
// size constants for the window and for its elements
- static const S32 MAX_WINDOW_HEIGHT = 200;
- static const S32 MIN_WINDOW_WIDTH = 318;
+ static constexpr S32 MAX_WINDOW_HEIGHT = 200;
+ static constexpr S32 MIN_WINDOW_WIDTH = 318;
protected:
// init Window's channel
@@ -111,7 +111,7 @@ public:
static LLIMWellWindow* findInstance(const LLSD& key = LLSD());
static void initClass() { getInstance(); }
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
void addObjectRow(const LLUUID& notification_id, bool new_message = false);
void removeObjectRow(const LLUUID& notification_id);
@@ -133,8 +133,8 @@ private:
virtual ~ObjectRowPanel();
/*virtual*/ void onMouseEnter(S32 x, S32 y, MASK mask);
/*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask);
private:
void onClosePanel();
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index a14d4f7a30..750b63eb5e 100644
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -96,7 +96,7 @@ private:
public:
LLTextureCacheWorker(LLTextureCache* cache, const LLUUID& id,
- U8* data, S32 datasize, S32 offset,
+ const U8* data, S32 datasize, S32 offset,
S32 imagesize, // for writes
LLTextureCache::Responder* responder)
: LLWorkerClass(cache, "LLTextureCacheWorker"),
@@ -108,7 +108,7 @@ public:
mOffset(offset),
mImageSize(imagesize),
mImageFormat(IMG_CODEC_J2C),
- mImageLocal(FALSE),
+ mImageLocal(false),
mResponder(responder),
mFileHandle(LLLFSThread::nullHandle()),
mBytesToRead(0),
@@ -145,12 +145,12 @@ protected:
LLUUID mID;
U8* mReadData;
- U8* mWriteData;
+ const U8* mWriteData;
S32 mDataSize;
S32 mOffset;
S32 mImageSize;
EImageCodec mImageFormat;
- BOOL mImageLocal;
+ bool mImageLocal;
LLPointer<LLTextureCache::Responder> mResponder;
LLLFSThread::handle_t mFileHandle;
S32 mBytesToRead;
@@ -224,7 +224,7 @@ bool LLTextureCacheLocalFileWorker::doRead()
else
{
mImageSize = local_size;
- mImageLocal = TRUE;
+ mImageLocal = true;
}
return true;
}
@@ -239,7 +239,7 @@ class LLTextureCacheRemoteWorker : public LLTextureCacheWorker
{
public:
LLTextureCacheRemoteWorker(LLTextureCache* cache, const LLUUID& id,
- U8* data, S32 datasize, S32 offset,
+ const U8* data, S32 datasize, S32 offset,
S32 imagesize, // for writes
LLPointer<LLImageRaw> raw, S32 discardlevel,
LLTextureCache::Responder* responder)
@@ -364,7 +364,7 @@ bool LLTextureCacheRemoteWorker::doRead()
else
{
mImageSize = local_size;
- mImageLocal = TRUE;
+ mImageLocal = true;
}
}
else
@@ -796,9 +796,9 @@ LLTextureCache::LLTextureCache(bool threaded)
mListMutex(),
mFastCacheMutex(),
mHeaderAPRFile(NULL),
- mReadOnly(TRUE), //do not allow to change the texture cache until setReadOnly() is called.
+ mReadOnly(true), //do not allow to change the texture cache until setReadOnly() is called.
mTexturesSizeTotal(0),
- mDoPurge(FALSE),
+ mDoPurge(false),
mFastCachep(NULL),
mFastCachePoolp(NULL),
mFastCachePadBuffer(NULL)
@@ -873,7 +873,7 @@ std::string LLTextureCache::getTextureFileName(const LLUUID& id)
}
//debug
-BOOL LLTextureCache::isInCache(const LLUUID& id)
+bool LLTextureCache::isInCache(const LLUUID& id)
{
LLMutexLock lock(&mHeaderMutex);
id_map_t::const_iterator iter = mHeaderIDMap.find(id);
@@ -882,7 +882,7 @@ BOOL LLTextureCache::isInCache(const LLUUID& id)
}
//debug
-BOOL LLTextureCache::isInLocal(const LLUUID& id)
+bool LLTextureCache::isInLocal(const LLUUID& id)
{
S32 local_size = 0;
std::string local_filename;
@@ -894,7 +894,7 @@ BOOL LLTextureCache::isInLocal(const LLUUID& id)
local_size = LLAPRFile::size(local_filename, getLocalAPRFilePool());
if (local_size > 0)
{
- return TRUE ;
+ return true ;
}
}
@@ -904,7 +904,7 @@ BOOL LLTextureCache::isInLocal(const LLUUID& id)
local_size = LLAPRFile::size(local_filename, getLocalAPRFilePool());
if (local_size > 0)
{
- return TRUE ;
+ return true ;
}
}
@@ -914,11 +914,11 @@ BOOL LLTextureCache::isInLocal(const LLUUID& id)
local_size = LLAPRFile::size(local_filename, getLocalAPRFilePool());
if (local_size > 0)
{
- return TRUE ;
+ return true ;
}
}
- return FALSE ;
+ return false ;
}
//////////////////////////////////////////////////////////////////////////////
@@ -982,14 +982,14 @@ void LLTextureCache::purgeCache(ELLPath location, bool remove_dir)
}
//is called in the main thread before initCache(...) is called.
-void LLTextureCache::setReadOnly(BOOL read_only)
+void LLTextureCache::setReadOnly(bool read_only)
{
mReadOnly = read_only ;
}
// Called in the main thread.
// Returns the unused amount of max_size if any
-S64 LLTextureCache::initCache(ELLPath location, S64 max_size, BOOL texture_cache_mismatch)
+S64 LLTextureCache::initCache(ELLPath location, S64 max_size, bool texture_cache_mismatch)
{
llassert_always(getPending() == 0) ; //should not start accessing the texture cache before initialized.
@@ -1314,7 +1314,7 @@ bool LLTextureCache::updateEntry(S32& idx, Entry& entry, S32 new_image_size, S32
if (purge)
{
- mDoPurge = TRUE;
+ mDoPurge = true;
}
}
@@ -1961,7 +1961,7 @@ bool LLTextureCache::readComplete(handle_t handle, bool abort)
}
LLTextureCache::handle_t LLTextureCache::writeToCache(const LLUUID& id,
- U8* data, S32 datasize, S32 imagesize,
+ const U8* data, S32 datasize, S32 imagesize,
LLPointer<LLImageRaw> rawimage, S32 discardlevel,
WriteResponder* responder)
{
@@ -2047,6 +2047,9 @@ LLPointer<LLImageRaw> LLTextureCache::readFromFastCache(const LLUUID& id, S32& d
bool LLTextureCache::writeToFastCache(LLUUID image_id, S32 id, LLPointer<LLImageRaw> raw, S32 discardlevel)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
+
+ LLImageDataSharedLock lock(raw);
+
//rescale image if needed
if (raw.isNull() || raw->isBufferInvalid() || !raw->getData())
{
@@ -2282,11 +2285,11 @@ bool LLTextureCache::removeFromCache(const LLUUID& id)
LLTextureCache::ReadResponder::ReadResponder()
: mImageSize(0),
- mImageLocal(FALSE)
+ mImageLocal(false)
{
}
-void LLTextureCache::ReadResponder::setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, BOOL imagelocal)
+void LLTextureCache::ReadResponder::setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, bool imagelocal)
{
if (mFormattedImage.notNull())
{
diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h
index 43e91b3e4c..3947cb850f 100644
--- a/indra/newview/lltexturecache.h
+++ b/indra/newview/lltexturecache.h
@@ -87,24 +87,24 @@ public:
class Responder : public LLResponder
{
public:
- virtual void setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, BOOL imagelocal) = 0;
+ virtual void setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, bool imagelocal) = 0;
};
class ReadResponder : public Responder
{
public:
ReadResponder();
- void setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, BOOL imagelocal);
+ void setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, bool imagelocal);
void setImage(LLImageFormatted* image) { mFormattedImage = image; }
protected:
LLPointer<LLImageFormatted> mFormattedImage;
S32 mImageSize;
- BOOL mImageLocal;
+ bool mImageLocal;
};
class WriteResponder : public Responder
{
- void setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, BOOL imagelocal)
+ void setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, bool imagelocal)
{
// not used
}
@@ -116,8 +116,8 @@ public:
/*virtual*/ size_t update(F32 max_time_ms);
void purgeCache(ELLPath location, bool remove_dir = true);
- void setReadOnly(BOOL read_only) ;
- S64 initCache(ELLPath location, S64 maxsize, BOOL texture_cache_mismatch);
+ void setReadOnly(bool read_only) ;
+ S64 initCache(ELLPath location, S64 maxsize, bool texture_cache_mismatch);
handle_t readFromCache(const std::string& local_filename, const LLUUID& id, S32 offset, S32 size,
ReadResponder* responder);
@@ -125,7 +125,7 @@ public:
handle_t readFromCache(const LLUUID& id, S32 offset, S32 size,
ReadResponder* responder);
bool readComplete(handle_t handle, bool abort);
- handle_t writeToCache(const LLUUID& id, U8* data, S32 datasize, S32 imagesize, LLPointer<LLImageRaw> rawimage, S32 discardlevel,
+ handle_t writeToCache(const LLUUID& id, const U8* data, S32 datasize, S32 imagesize, LLPointer<LLImageRaw> rawimage, S32 discardlevel,
WriteResponder* responder);
LLPointer<LLImageRaw> readFromFastCache(const LLUUID& id, S32& discardlevel);
bool writeComplete(handle_t handle, bool abort = false);
@@ -146,8 +146,8 @@ public:
S64Bytes getMaxUsage() { return S64Bytes(sCacheMaxTexturesSize); }
U32 getEntries() { return mHeaderEntriesInfo.mEntries; }
U32 getMaxEntries() { return sCacheMaxEntries; };
- BOOL isInCache(const LLUUID& id) ;
- BOOL isInLocal(const LLUUID& id) ; //not thread safe at the moment
+ bool isInCache(const LLUUID& id) ;
+ bool isInLocal(const LLUUID& id) ; //not thread safe at the moment
protected:
// Accessed by LLTextureCacheWorker
@@ -214,7 +214,7 @@ private:
typedef std::vector<std::pair<LLPointer<Responder>, bool> > responder_list_t;
responder_list_t mCompletedList;
- BOOL mReadOnly;
+ bool mReadOnly;
// HEADERS (Include first mip)
std::string mHeaderEntriesFileName;
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 62d3fa28bf..32f38de1e4 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -72,6 +72,7 @@
#include "llradiogroup.h"
#include "llfloaterreg.h"
+#include "llgltfmaterialpreviewmgr.h"
#include "lllocalbitmaps.h"
#include "lllocalgltfmaterials.h"
#include "llerror.h"
@@ -147,12 +148,12 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
LLUUID image_asset_id,
LLUUID default_image_asset_id,
LLUUID blank_image_asset_id,
- BOOL tentative,
- BOOL allow_no_texture,
+ bool tentative,
+ bool allow_no_texture,
const std::string& label,
PermissionMask immediate_filter_perm_mask,
PermissionMask dnd_filter_perm_mask,
- BOOL can_apply_immediately,
+ bool can_apply_immediately,
LLUIImagePtr fallback_image,
EPickInventoryType pick_type)
: LLFloater(LLSD()),
@@ -167,12 +168,12 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
mLabel(label),
mTentativeLabel(NULL),
mResolutionLabel(NULL),
- mActive( TRUE ),
+ mActive( true ),
mFilterEdit(NULL),
mImmediateFilterPermMask(immediate_filter_perm_mask),
mDnDFilterPermMask(dnd_filter_perm_mask),
mContextConeOpacity(0.f),
- mSelectedItemPinned( FALSE ),
+ mSelectedItemPinned( false ),
mCanApply(true),
mCanPreview(true),
mLimitsSet(false),
@@ -183,12 +184,12 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
mOnFloaterCloseCallback(NULL),
mSetImageAssetIDCallback(NULL),
mOnUpdateImageStatsCallback(NULL),
- mBakeTextureEnabled(FALSE),
+ mBakeTextureEnabled(false),
mInventoryPickType(pick_type)
{
mCanApplyImmediately = can_apply_immediately;
buildFromFile("floater_texture_ctrl.xml");
- setCanMinimize(FALSE);
+ setCanMinimize(false);
}
LLFloaterTexturePicker::~LLFloaterTexturePicker()
@@ -199,7 +200,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selecti
{
if( ((mImageAssetID != image_id) || mTentative) && mActive)
{
- mNoCopyTextureSelected = FALSE;
+ mNoCopyTextureSelected = false;
mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here?
mImageAssetID = image_id;
@@ -229,7 +230,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selecti
LLInventoryItem* itemp = gInventory.getItem(inv_view->getUUID());
if (mInventoryPickType == PICK_MATERIAL
- && mImageAssetID == LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID
+ && mImageAssetID == BLANK_MATERIAL_ASSET_ID
&& itemp && itemp->getAssetUUID().isNull())
{
item_id = inv_view->getUUID();
@@ -241,7 +242,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selecti
}
if (item_id.isNull())
{
- item_id = findItemID(mImageAssetID, FALSE);
+ item_id = findItemID(mImageAssetID, false);
}
if (item_id.isNull())
{
@@ -253,8 +254,8 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selecti
if (itemp && !itemp->getPermissions().allowCopyBy(gAgent.getID()))
{
// no copy texture
- getChild<LLUICtrl>("apply_immediate_check")->setValue(FALSE);
- mNoCopyTextureSelected = TRUE;
+ getChild<LLUICtrl>("apply_immediate_check")->setValue(false);
+ mNoCopyTextureSelected = true;
}
}
@@ -272,12 +273,12 @@ void LLFloaterTexturePicker::setImageIDFromItem(const LLInventoryItem* itemp, bo
if (mInventoryPickType == PICK_MATERIAL && asset_id.isNull())
{
// If an inventory item has a null asset, consider it a valid blank material(gltf)
- asset_id = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
+ asset_id = BLANK_MATERIAL_ASSET_ID;
}
setImageID(asset_id, set_selection);
}
-void LLFloaterTexturePicker::setActive( BOOL active )
+void LLFloaterTexturePicker::setActive( bool active )
{
if (!active && getChild<LLUICtrl>("Pipette")->getValue().asBoolean())
{
@@ -286,7 +287,7 @@ void LLFloaterTexturePicker::setActive( BOOL active )
mActive = active;
}
-void LLFloaterTexturePicker::setCanApplyImmediately(BOOL b)
+void LLFloaterTexturePicker::setCanApplyImmediately(bool b)
{
mCanApplyImmediately = b;
@@ -414,14 +415,14 @@ bool LLFloaterTexturePicker::updateImageStats()
}
// virtual
-BOOL LLFloaterTexturePicker::handleDragAndDrop(
+bool LLFloaterTexturePicker::handleDragAndDrop(
S32 x, S32 y, MASK mask,
- BOOL drop,
+ bool drop,
EDragAndDropType cargo_type, void *cargo_data,
EAcceptance *accept,
std::string& tooltip_msg)
{
- BOOL handled = FALSE;
+ bool handled = false;
bool is_mesh = cargo_type == DAD_MESH;
bool is_texture = cargo_type == DAD_TEXTURE;
@@ -445,9 +446,9 @@ BOOL LLFloaterTexturePicker::handleDragAndDrop(
{
LLInventoryItem *item = (LLInventoryItem *)cargo_data;
- BOOL copy = item->getPermissions().allowCopyBy(gAgent.getID());
- BOOL mod = item->getPermissions().allowModifyBy(gAgent.getID());
- BOOL xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER,
+ bool copy = item->getPermissions().allowCopyBy(gAgent.getID());
+ bool mod = item->getPermissions().allowModifyBy(gAgent.getID());
+ bool xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER,
gAgent.getID());
PermissionMask item_perm_mask = 0;
@@ -476,13 +477,13 @@ BOOL LLFloaterTexturePicker::handleDragAndDrop(
*accept = ACCEPT_NO;
}
- handled = TRUE;
+ handled = true;
LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFloaterTexturePicker " << getName() << LL_ENDL;
return handled;
}
-BOOL LLFloaterTexturePicker::handleKeyHere(KEY key, MASK mask)
+bool LLFloaterTexturePicker::handleKeyHere(KEY key, MASK mask)
{
LLFolderView* root_folder = mInventoryPanel->getRootFolder();
@@ -497,23 +498,23 @@ BOOL LLFloaterTexturePicker::handleKeyHere(KEY key, MASK mask)
LLFolderViewItem* itemp = mInventoryPanel->getItemByID(gInventory.getRootFolderID());
if (itemp)
{
- root_folder->setSelection(itemp, FALSE, FALSE);
+ root_folder->setSelection(itemp, false, false);
}
}
root_folder->scrollToShowSelection();
// move focus to inventory proper
- mInventoryPanel->setFocus(TRUE);
+ mInventoryPanel->setFocus(true);
// treat this as a user selection of the first filtered result
commitIfImmediateSet();
- return TRUE;
+ return true;
}
if (mInventoryPanel->hasFocus() && key == KEY_UP)
{
- mFilterEdit->focusFirstItem(TRUE);
+ mFilterEdit->focusFirstItem(true);
}
}
@@ -537,10 +538,12 @@ void LLFloaterTexturePicker::onClose(bool app_quitting)
}
stopUsingPipette();
sLastPickerMode = mModeSelector->getValue().asInteger();
+ // *NOTE: Vertex buffer for sphere preview is still cached
+ mGLTFPreview = nullptr;
}
// virtual
-BOOL LLFloaterTexturePicker::postBuild()
+bool LLFloaterTexturePicker::postBuild()
{
LLFloater::postBuild();
@@ -593,7 +596,7 @@ BOOL LLFloaterTexturePicker::postBuild()
// Disable auto selecting first filtered item because it takes away
// selection from the item set by LLTextureCtrl owning this floater.
- mInventoryPanel->getRootFolder()->setAutoSelectOverride(TRUE);
+ mInventoryPanel->getRootFolder()->setAutoSelectOverride(true);
// Commented out to scroll to currently selected texture. See EXT-5403.
// // store this filter as the default one
@@ -607,7 +610,7 @@ BOOL LLFloaterTexturePicker::postBuild()
if(!mImageAssetID.isNull() || mInventoryPickType == PICK_MATERIAL)
{
- mInventoryPanel->setSelection(findItemID(mImageAssetID, FALSE), TAKE_FOCUS_NO);
+ mInventoryPanel->setSelection(findItemID(mImageAssetID, false), TAKE_FOCUS_NO);
}
}
@@ -619,7 +622,7 @@ BOOL LLFloaterTexturePicker::postBuild()
mLocalScrollCtrl->setCommitCallback(onLocalScrollCommit, this);
refreshLocalList();
- mNoCopyTextureSelected = FALSE;
+ mNoCopyTextureSelected = false;
getChild<LLUICtrl>("apply_immediate_check")->setValue(mCanApplyImmediately && gSavedSettings.getBOOL("TextureLivePreview"));
childSetCommitCallback("apply_immediate_check", onApplyImmediateCheck, this);
@@ -629,14 +632,14 @@ BOOL LLFloaterTexturePicker::postBuild()
childSetAction("Cancel", LLFloaterTexturePicker::onBtnCancel,this);
childSetAction("Select", LLFloaterTexturePicker::onBtnSelect,this);
- mSavedFolderState.setApply(FALSE);
+ mSavedFolderState.setApply(false);
LLToolPipette::getInstance()->setToolSelectCallback(boost::bind(&LLFloaterTexturePicker::onTextureSelect, this, _1));
getChild<LLComboBox>("l_bake_use_texture_combo_box")->setCommitCallback(onBakeTextureSelect, this);
- setBakeTextureEnabled(TRUE);
- return TRUE;
+ setBakeTextureEnabled(true);
+ return true;
}
// virtual
@@ -655,10 +658,11 @@ void LLFloaterTexturePicker::draw()
mPipetteBtn->setEnabled(mActive);
mPipetteBtn->setValue(LLToolMgr::getInstance()->getCurrentTool() == LLToolPipette::getInstance());
- //BOOL allow_copy = FALSE;
+ //bool allow_copy = false;
if( mOwner )
{
mTexturep = NULL;
+ LLPointer<LLFetchedGLTFMaterial> old_material = mGLTFMaterial;
mGLTFMaterial = NULL;
if (mImageAssetID.notNull())
{
@@ -666,10 +670,27 @@ void LLFloaterTexturePicker::draw()
{
mGLTFMaterial = (LLFetchedGLTFMaterial*) gGLTFMaterialList.getMaterial(mImageAssetID);
llassert(mGLTFMaterial == nullptr || dynamic_cast<LLFetchedGLTFMaterial*>(gGLTFMaterialList.getMaterial(mImageAssetID)) != nullptr);
+ if (mGLTFPreview.isNull() || mGLTFMaterial.isNull() || (old_material.notNull() && (old_material.get() != mGLTFMaterial.get())))
+ {
+ // Only update the preview if needed, since gGLTFMaterialPreviewMgr does not cache the preview.
+ if (mGLTFMaterial.isNull())
+ {
+ mGLTFPreview = nullptr;
+ }
+ else
+ {
+ mGLTFPreview = gGLTFMaterialPreviewMgr.getPreview(mGLTFMaterial);
+ }
+ }
+ if (mGLTFPreview)
+ {
+ mGLTFPreview->setBoostLevel(LLGLTexture::BOOST_PREVIEW);
+ }
}
else
{
LLPointer<LLViewerFetchedTexture> texture = NULL;
+ mGLTFPreview = nullptr;
if (LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::isBakedImageId(mImageAssetID))
{
@@ -679,7 +700,7 @@ void LLFloaterTexturePicker::draw()
if (obj)
{
LLViewerTexture* viewerTexture = obj->getBakedTextureForMagicId(mImageAssetID);
- texture = viewerTexture ? dynamic_cast<LLViewerFetchedTexture*>(viewerTexture) : NULL;
+ texture = viewerTexture ? dynamic_cast<LLViewerFetchedTexture*>(viewerTexture) : NULL;
}
}
@@ -695,7 +716,7 @@ void LLFloaterTexturePicker::draw()
if (mTentativeLabel)
{
- mTentativeLabel->setVisible( FALSE );
+ mTentativeLabel->setVisible( false );
}
mDefaultBtn->setEnabled(mImageAssetID != mDefaultImageAssetID || mTentative);
@@ -711,7 +732,7 @@ void LLFloaterTexturePicker::draw()
// Border
LLRect border = getChildView("preview_widget")->getRect();
- gl_rect_2d( border, LLColor4::black, FALSE );
+ gl_rect_2d( border, LLColor4::black, false );
// Interior
@@ -720,27 +741,25 @@ void LLFloaterTexturePicker::draw()
// If the floater is focused, don't apply its alpha to the texture (STORM-677).
const F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency();
- LLViewerTexture* texture = nullptr;
+ LLViewerTexture* preview;
if (mGLTFMaterial)
{
- texture = mGLTFMaterial->getUITexture();
+ preview = mGLTFPreview.get();
}
else
{
- texture = mTexturep.get();
+ preview = mTexturep.get();
}
- if( texture )
+ if( preview )
{
- if( texture->getComponents() == 4 )
+ preview->addTextureStats( (F32)(interior.getWidth() * interior.getHeight()) );
+ if( preview->getComponents() == 4 )
{
gl_rect_2d_checkerboard( interior, alpha );
}
- gl_draw_scaled_image( interior.mLeft, interior.mBottom, interior.getWidth(), interior.getHeight(), texture, UI_VERTEX_COLOR % alpha );
-
- // Pump the priority
- texture->addTextureStats( (F32)(interior.getWidth() * interior.getHeight()) );
+ gl_draw_scaled_image( interior.mLeft, interior.mBottom, interior.getWidth(), interior.getHeight(), preview, UI_VERTEX_COLOR % alpha );
}
else if (!mFallbackImage.isNull())
{
@@ -748,7 +767,7 @@ void LLFloaterTexturePicker::draw()
}
else
{
- gl_rect_2d( interior, LLColor4::grey % alpha, TRUE );
+ gl_rect_2d( interior, LLColor4::grey % alpha, true );
// Draw X
gl_draw_x(interior, LLColor4::black );
@@ -757,7 +776,7 @@ void LLFloaterTexturePicker::draw()
// Draw Tentative Label over the image
if( mTentative && !mViewModel->isDirty() )
{
- mTentativeLabel->setVisible( TRUE );
+ mTentativeLabel->setVisible( true );
drawChild(mTentativeLabel);
}
@@ -773,19 +792,19 @@ void LLFloaterTexturePicker::draw()
// After inventory panel filter is applied we have to update
// constraint rect for the selected item because of folder view
- // AutoSelectOverride set to TRUE. We force PinningSelectedItem
- // flag to FALSE state and setting filter "dirty" to update
+ // AutoSelectOverride set to true. We force PinningSelectedItem
+ // flag to false state and setting filter "dirty" to update
// scroll container to show selected item (see LLFolderView::doIdle()).
if (!is_filter_active && !mSelectedItemPinned)
{
folder_view->setPinningSelectedItem(mSelectedItemPinned);
folder_view->getViewModelItem()->dirtyFilter();
- mSelectedItemPinned = TRUE;
+ mSelectedItemPinned = true;
}
}
}
-const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, BOOL copyable_only, BOOL ignore_library)
+const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, bool copyable_only, bool ignore_library)
{
if (asset_id.isNull())
{
@@ -794,7 +813,7 @@ const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, BOOL co
}
LLUUID loockup_id = asset_id;
- if (mInventoryPickType == PICK_MATERIAL && loockup_id == LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID)
+ if (mInventoryPickType == PICK_MATERIAL && loockup_id == BLANK_MATERIAL_ASSET_ID)
{
// default asset id means we are looking for an inventory item with a default asset UUID (null)
loockup_id = LLUUID::null;
@@ -889,7 +908,7 @@ void LLFloaterTexturePicker::commitCallback(LLTextureCtrl::ETexturePickOp op)
LLInventoryItem* itemp = gInventory.getItem(inv_view->getUUID());
if (mInventoryPickType == PICK_MATERIAL
- && mImageAssetID == LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID
+ && mImageAssetID == BLANK_MATERIAL_ASSET_ID
&& itemp && itemp->getAssetUUID().isNull())
{
inventory_id = inv_view->getUUID();
@@ -1019,7 +1038,7 @@ void LLFloaterTexturePicker::onBtnSelect(void* userdata)
void LLFloaterTexturePicker::onBtnPipette()
{
- BOOL pipette_active = getChild<LLUICtrl>("Pipette")->getValue().asBoolean();
+ bool pipette_active = getChild<LLUICtrl>("Pipette")->getValue().asBoolean();
pipette_active = !pipette_active;
if (pipette_active)
{
@@ -1031,13 +1050,13 @@ void LLFloaterTexturePicker::onBtnPipette()
}
}
-void LLFloaterTexturePicker::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action)
+void LLFloaterTexturePicker::onSelectionChange(const std::deque<LLFolderViewItem*> &items, bool user_action)
{
if (items.size())
{
LLFolderViewItem* first_item = items.front();
LLInventoryItem* itemp = gInventory.getItem(static_cast<LLFolderViewModelItemInventory*>(first_item->getViewModelItem())->getUUID());
- mNoCopyTextureSelected = FALSE;
+ mNoCopyTextureSelected = false;
if (itemp)
{
if (!mTextureSelectedCallback.empty())
@@ -1046,7 +1065,7 @@ void LLFloaterTexturePicker::onSelectionChange(const std::deque<LLFolderViewItem
}
if (!itemp->getPermissions().allowCopyBy(gAgent.getID()))
{
- mNoCopyTextureSelected = TRUE;
+ mNoCopyTextureSelected = true;
}
setImageIDFromItem(itemp, false);
mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here?
@@ -1110,7 +1129,7 @@ void LLFloaterTexturePicker::onBtnRemove(void* userdata)
LLScrollListItem* list_item = *iter;
if (list_item)
{
- LLSD data = self->mLocalScrollCtrl->getFirstSelected()->getValue();
+ LLSD data = list_item->getValue();
LLUUID tracking_id = data["id"];
S32 asset_type = data["type"].asInteger();
@@ -1328,7 +1347,7 @@ void LLFloaterTexturePicker::onFilterEdit(const std::string& search_string )
return;
}
- mSavedFolderState.setApply(TRUE);
+ mSavedFolderState.setApply(true);
mInventoryPanel->getRootFolder()->applyFunctorRecursively(mSavedFolderState);
// add folder with current item to list of previously opened folders
LLOpenFoldersWithSelection opener;
@@ -1341,7 +1360,7 @@ void LLFloaterTexturePicker::onFilterEdit(const std::string& search_string )
// first letter in search term, save existing folder open state
if (!mInventoryPanel->getFilter().isNotDefault())
{
- mSavedFolderState.setApply(FALSE);
+ mSavedFolderState.setApply(false);
mInventoryPanel->getRootFolder()->applyFunctorRecursively(mSavedFolderState);
}
}
@@ -1353,19 +1372,19 @@ void LLFloaterTexturePicker::changeMode()
{
int index = mModeSelector->getValue().asInteger();
- mDefaultBtn->setVisible(index == PICKER_INVENTORY ? TRUE : FALSE);
- mBlankBtn->setVisible(index == PICKER_INVENTORY ? TRUE : FALSE);
- mNoneBtn->setVisible(index == PICKER_INVENTORY ? TRUE : FALSE);
- mFilterEdit->setVisible(index == PICKER_INVENTORY ? TRUE : FALSE);
- mInventoryPanel->setVisible(index == PICKER_INVENTORY ? TRUE : FALSE);
+ mDefaultBtn->setVisible(index == PICKER_INVENTORY ? true : false);
+ mBlankBtn->setVisible(index == PICKER_INVENTORY ? true : false);
+ mNoneBtn->setVisible(index == PICKER_INVENTORY ? true : false);
+ mFilterEdit->setVisible(index == PICKER_INVENTORY ? true : false);
+ mInventoryPanel->setVisible(index == PICKER_INVENTORY ? true : false);
- getChild<LLButton>("l_add_btn")->setVisible(index == PICKER_LOCAL ? TRUE : FALSE);
- getChild<LLButton>("l_rem_btn")->setVisible(index == PICKER_LOCAL ? TRUE : FALSE);
- getChild<LLButton>("l_upl_btn")->setVisible(index == PICKER_LOCAL ? TRUE : FALSE);
- getChild<LLScrollListCtrl>("l_name_list")->setVisible(index == PICKER_LOCAL ? TRUE : FALSE);
+ getChild<LLButton>("l_add_btn")->setVisible(index == PICKER_LOCAL ? true : false);
+ getChild<LLButton>("l_rem_btn")->setVisible(index == PICKER_LOCAL ? true : false);
+ getChild<LLButton>("l_upl_btn")->setVisible(index == PICKER_LOCAL ? true : false);
+ getChild<LLScrollListCtrl>("l_name_list")->setVisible(index == PICKER_LOCAL ? true : false);
- getChild<LLComboBox>("l_bake_use_texture_combo_box")->setVisible(index == PICKER_BAKE ? TRUE : FALSE);
- getChild<LLCheckBoxCtrl>("hide_base_mesh_region")->setVisible(FALSE);// index == 2 ? TRUE : FALSE);
+ getChild<LLComboBox>("l_bake_use_texture_combo_box")->setVisible(index == PICKER_BAKE ? true : false);
+ getChild<LLCheckBoxCtrl>("hide_base_mesh_region")->setVisible(false);// index == 2 ? true : false);
bool pipette_visible = (index == PICKER_INVENTORY)
&& (mInventoryPickType != PICK_MATERIAL);
@@ -1423,7 +1442,7 @@ void LLFloaterTexturePicker::changeMode()
val = 10;
}
- getChild<LLComboBox>("l_bake_use_texture_combo_box")->setSelectedByValue(val, TRUE);
+ getChild<LLComboBox>("l_bake_use_texture_combo_box")->setSelectedByValue(val, true);
}
}
@@ -1469,14 +1488,14 @@ void LLFloaterTexturePicker::refreshInventoryFilter()
mInventoryPanel->setFilterTypes(filter_types);
}
-void LLFloaterTexturePicker::setLocalTextureEnabled(BOOL enabled)
+void LLFloaterTexturePicker::setLocalTextureEnabled(bool enabled)
{
mModeSelector->setEnabledByValue(1, enabled);
}
-void LLFloaterTexturePicker::setBakeTextureEnabled(BOOL enabled)
+void LLFloaterTexturePicker::setBakeTextureEnabled(bool enabled)
{
- BOOL changed = (enabled != mBakeTextureEnabled);
+ bool changed = (enabled != mBakeTextureEnabled);
mBakeTextureEnabled = enabled;
mModeSelector->setEnabledByValue(2, enabled);
@@ -1530,7 +1549,7 @@ void LLFloaterTexturePicker::setInventoryPickType(EPickInventoryType type)
// refresh selection
if (!mImageAssetID.isNull() || mInventoryPickType == PICK_MATERIAL)
{
- mInventoryPanel->setSelection(findItemID(mImageAssetID, FALSE), TAKE_FOCUS_NO);
+ mInventoryPanel->setSelection(findItemID(mImageAssetID, false), TAKE_FOCUS_NO);
}
}
@@ -1584,10 +1603,10 @@ void LLFloaterTexturePicker::onPickerCallback(const std::vector<std::string>& fi
void LLFloaterTexturePicker::onTextureSelect( const LLTextureEntry& te )
{
- LLUUID inventory_item_id = findItemID(te.getID(), TRUE);
+ LLUUID inventory_item_id = findItemID(te.getID(), true);
if (inventory_item_id.notNull())
{
- LLToolPipette::getInstance()->setResult(TRUE, "");
+ LLToolPipette::getInstance()->setResult(true, "");
if (mInventoryPickType == PICK_MATERIAL)
{
// tes have no data about material ids
@@ -1600,20 +1619,20 @@ void LLFloaterTexturePicker::onTextureSelect( const LLTextureEntry& te )
setImageID(te.getID());
}
- mNoCopyTextureSelected = FALSE;
+ mNoCopyTextureSelected = false;
LLInventoryItem* itemp = gInventory.getItem(inventory_item_id);
if (itemp && !itemp->getPermissions().allowCopyBy(gAgent.getID()))
{
// no copy texture
- mNoCopyTextureSelected = TRUE;
+ mNoCopyTextureSelected = true;
}
commitIfImmediateSet();
}
else
{
- LLToolPipette::getInstance()->setResult(FALSE, LLTrans::getString("InventoryNoTexture"));
+ LLToolPipette::getInstance()->setResult(false, LLTrans::getString("InventoryNoTexture"));
}
}
@@ -1631,15 +1650,15 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p)
mOnSelectCallback(NULL),
mBorderColor( p.border_color() ),
mAllowNoTexture( p.allow_no_texture ),
- mAllowLocalTexture( TRUE ),
+ mAllowLocalTexture( true ),
mImmediateFilterPermMask( PERM_NONE ),
- mCanApplyImmediately( FALSE ),
- mNeedsRawImageData( FALSE ),
- mValid( TRUE ),
- mShowLoadingPlaceholder( TRUE ),
+ mCanApplyImmediately( false ),
+ mNeedsRawImageData( false ),
+ mValid( true ),
+ mShowLoadingPlaceholder( true ),
mOpenTexPreview(false),
mBakeTextureEnabled(true),
- mInventoryPickType(PICK_TEXTURE),
+ mInventoryPickType(p.pick_type),
mImageAssetID(p.image_id),
mDefaultImageAssetID(p.default_image_id),
mDefaultImageName(p.default_image_name),
@@ -1697,7 +1716,7 @@ LLTextureCtrl::~LLTextureCtrl()
closeDependentFloater();
}
-void LLTextureCtrl::setShowLoadingPlaceholder(BOOL showLoadingPlaceholder)
+void LLTextureCtrl::setShowLoadingPlaceholder(bool showLoadingPlaceholder)
{
mShowLoadingPlaceholder = showLoadingPlaceholder;
}
@@ -1707,7 +1726,7 @@ void LLTextureCtrl::setCaption(const std::string& caption)
mCaption->setText( caption );
}
-void LLTextureCtrl::setCanApplyImmediately(BOOL b)
+void LLTextureCtrl::setCanApplyImmediately(bool b)
{
mCanApplyImmediately = b;
LLFloaterTexturePicker* floaterp = (LLFloaterTexturePicker*)mFloaterHandle.get();
@@ -1743,7 +1762,20 @@ void LLTextureCtrl::setFilterPermissionMasks(PermissionMask mask)
setDnDFilterPermMask(mask);
}
-void LLTextureCtrl::setVisible( BOOL visible )
+void LLTextureCtrl::onVisibilityChange(bool new_visibility)
+{
+ if (!new_visibility)
+ {
+ // *NOTE: Vertex buffer for sphere preview is still cached
+ mGLTFPreview = nullptr;
+ }
+ else
+ {
+ llassert(!mGLTFPreview);
+ }
+}
+
+void LLTextureCtrl::setVisible(bool visible )
{
if( !visible )
{
@@ -1752,7 +1784,7 @@ void LLTextureCtrl::setVisible( BOOL visible )
LLUICtrl::setVisible( visible );
}
-void LLTextureCtrl::setEnabled( BOOL enabled )
+void LLTextureCtrl::setEnabled( bool enabled )
{
LLFloaterTexturePicker* floaterp = (LLFloaterTexturePicker*)mFloaterHandle.get();
if( floaterp )
@@ -1778,7 +1810,7 @@ void LLTextureCtrl::setEnabled( BOOL enabled )
LLView::setEnabled( enabled );
}
-void LLTextureCtrl::setValid(BOOL valid )
+void LLTextureCtrl::setValid(bool valid )
{
mValid = valid;
if (!valid)
@@ -1786,7 +1818,7 @@ void LLTextureCtrl::setValid(BOOL valid )
LLFloaterTexturePicker* pickerp = (LLFloaterTexturePicker*)mFloaterHandle.get();
if (pickerp)
{
- pickerp->setActive(FALSE);
+ pickerp->setActive(false);
}
}
}
@@ -1804,7 +1836,7 @@ void LLTextureCtrl::setLabel(const std::string& label)
mCaption->setText(label);
}
-void LLTextureCtrl::showPicker(BOOL take_focus)
+void LLTextureCtrl::showPicker(bool take_focus)
{
// show hourglass cursor when loading inventory window
// because inventory construction is slooow
@@ -1867,7 +1899,7 @@ void LLTextureCtrl::showPicker(BOOL take_focus)
if (take_focus)
{
- floaterp->setFocus(TRUE);
+ floaterp->setFocus(true);
}
}
@@ -1878,7 +1910,7 @@ void LLTextureCtrl::closeDependentFloater()
if( floaterp && floaterp->isInVisibleChain())
{
floaterp->setOwner(NULL);
- floaterp->setVisible(FALSE);
+ floaterp->setVisible(false);
floaterp->closeFloater();
}
}
@@ -1897,22 +1929,22 @@ public:
}
};
-BOOL LLTextureCtrl::handleHover(S32 x, S32 y, MASK mask)
+bool LLTextureCtrl::handleHover(S32 x, S32 y, MASK mask)
{
getWindow()->setCursor(mBorder->parentPointInView(x,y) ? UI_CURSOR_HAND : UI_CURSOR_ARROW);
- return TRUE;
+ return true;
}
-BOOL LLTextureCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLTextureCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
{
- BOOL handled = LLUICtrl::handleMouseDown( x, y , mask );
+ bool handled = LLUICtrl::handleMouseDown( x, y , mask );
if (!handled && mBorder->parentPointInView(x, y))
{
if (!mOpenTexPreview)
{
- showPicker(FALSE);
+ showPicker(false);
if (mInventoryPickType == PICK_MATERIAL)
{
//grab materials first...
@@ -1928,7 +1960,7 @@ BOOL LLTextureCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
{
LLInventoryModelBackgroundFetch::instance().start();
}
- handled = TRUE;
+ handled = true;
}
else
{
@@ -1983,7 +2015,7 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op, LLPickerSource source, co
if(floaterp->isDirty() || asset_id.notNull()) // mModelView->setDirty does not work.
{
- setTentative( FALSE );
+ setTentative( false );
switch(source)
{
@@ -2004,7 +2036,7 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op, LLPickerSource source, co
break;
case PICKER_UNKNOWN:
default:
- mImageItemID = floaterp->findItemID(asset_id, FALSE);
+ mImageItemID = floaterp->findItemID(asset_id, false);
mImageAssetID = asset_id;
mLocalTrackingID.setNull();
break;
@@ -2094,12 +2126,12 @@ void LLTextureCtrl::setInventoryPickType(EPickInventoryType type)
}
}
-BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask,
- BOOL drop, EDragAndDropType cargo_type, void *cargo_data,
+bool LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask,
+ bool drop, EDragAndDropType cargo_type, void *cargo_data,
EAcceptance *accept,
std::string& tooltip_msg)
{
- BOOL handled = FALSE;
+ bool handled = false;
// this downcast may be invalid - but if the second test below
// returns true, then the cast was valid, and we can perform
@@ -2135,7 +2167,7 @@ BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask,
// This removes the 'Multiple' overlay, since
// there is now only one texture selected.
- setTentative( FALSE );
+ setTentative( false );
onCommit();
}
}
@@ -2147,7 +2179,7 @@ BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask,
*accept = ACCEPT_NO;
}
- handled = TRUE;
+ handled = true;
LL_DEBUGS("UserInput") << "dragAndDrop handled by LLTextureCtrl " << getName() << LL_ENDL;
return handled;
@@ -2157,53 +2189,75 @@ void LLTextureCtrl::draw()
{
mBorder->setKeyboardFocusHighlight(hasFocus());
+ LLPointer<LLViewerTexture> preview = NULL;
+
if (!mValid)
{
mTexturep = NULL;
+ mGLTFMaterial = NULL;
+ mGLTFPreview = NULL;
}
else if (!mImageAssetID.isNull())
{
- LLPointer<LLViewerFetchedTexture> texture = NULL;
-
if (LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::isBakedImageId(mImageAssetID))
{
LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getFirstObject();
if (obj)
{
LLViewerTexture* viewerTexture = obj->getBakedTextureForMagicId(mImageAssetID);
- texture = viewerTexture ? dynamic_cast<LLViewerFetchedTexture*>(viewerTexture) : NULL;
+ mTexturep = viewerTexture ? dynamic_cast<LLViewerFetchedTexture*>(viewerTexture) : NULL;
+ mGLTFMaterial = NULL;
+ mGLTFPreview = NULL;
+
+ preview = mTexturep;
}
}
- if (texture.isNull())
+ if (preview.isNull())
{
+ LLPointer<LLFetchedGLTFMaterial> old_material = mGLTFMaterial;
+ mGLTFMaterial = NULL;
+ mTexturep = NULL;
if (mInventoryPickType == PICK_MATERIAL)
{
- LLPointer<LLFetchedGLTFMaterial> material = gGLTFMaterialList.getMaterial(mImageAssetID);
- if (material)
+ mGLTFMaterial = gGLTFMaterialList.getMaterial(mImageAssetID);
+ if (mGLTFPreview.isNull() || mGLTFMaterial.isNull() || (old_material.notNull() && (old_material.get() != mGLTFMaterial.get())))
+ {
+ // Only update the preview if needed, since gGLTFMaterialPreviewMgr does not cache the preview.
+ if (mGLTFMaterial.isNull())
+ {
+ mGLTFPreview = nullptr;
+ }
+ else
+ {
+ mGLTFPreview = gGLTFMaterialPreviewMgr.getPreview(mGLTFMaterial);
+ }
+ }
+ if (mGLTFPreview)
{
- texture = material->getUITexture();
+ mGLTFPreview->setBoostLevel(LLGLTexture::BOOST_PREVIEW);
}
+
+ preview = mGLTFPreview;
}
else
{
- texture = LLViewerTextureManager::getFetchedTexture(mImageAssetID, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
- texture->setBoostLevel(LLGLTexture::BOOST_PREVIEW);
- texture->forceToSaveRawImage(0);
+ preview = LLViewerTextureManager::getFetchedTexture(mImageAssetID, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+ preview->setBoostLevel(LLGLTexture::BOOST_PREVIEW);
}
}
-
- mTexturep = texture;
}
else//mImageAssetID == LLUUID::null
{
mTexturep = NULL;
+ mGLTFMaterial = NULL;
+ mGLTFPreview = NULL;
}
// Border
LLRect border( 0, getRect().getHeight(), getRect().getWidth(), BTN_HEIGHT_SMALL );
- gl_rect_2d( border, mBorderColor.get(), FALSE );
+ gl_rect_2d( border, mBorderColor.get(), false );
// Interior
LLRect interior = border;
@@ -2211,15 +2265,15 @@ void LLTextureCtrl::draw()
// If we're in a focused floater, don't apply the floater's alpha to the texture (STORM-677).
const F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency();
- if( mTexturep )
+ if( preview )
{
- if( mTexturep->getComponents() == 4 )
+ if( preview->getComponents() == 4 )
{
gl_rect_2d_checkerboard( interior, alpha );
}
- gl_draw_scaled_image( interior.mLeft, interior.mBottom, interior.getWidth(), interior.getHeight(), mTexturep, UI_VERTEX_COLOR % alpha);
- mTexturep->addTextureStats( (F32)(interior.getWidth() * interior.getHeight()) );
+ gl_draw_scaled_image( interior.mLeft, interior.mBottom, interior.getWidth(), interior.getHeight(), preview, UI_VERTEX_COLOR % alpha);
+ preview->addTextureStats( (F32)(interior.getWidth() * interior.getHeight()) );
}
else if (!mFallbackImage.isNull())
{
@@ -2227,7 +2281,7 @@ void LLTextureCtrl::draw()
}
else
{
- gl_rect_2d( interior, LLColor4::grey % alpha, TRUE );
+ gl_rect_2d( interior, LLColor4::grey % alpha, true );
// Draw X
gl_draw_x( interior, LLColor4::black );
@@ -2240,7 +2294,7 @@ void LLTextureCtrl::draw()
// fully loaded.
if (mTexturep.notNull() &&
(!mTexturep->isFullyLoaded()) &&
- (mShowLoadingPlaceholder == TRUE))
+ (mShowLoadingPlaceholder == true))
{
U32 v_offset = 25;
LLFontGL* font = LLFontGL::getFontSansSerif();
@@ -2286,11 +2340,11 @@ void LLTextureCtrl::draw()
LLUICtrl::draw();
}
-BOOL LLTextureCtrl::allowDrop(LLInventoryItem* item, EDragAndDropType cargo_type, std::string& tooltip_msg)
+bool LLTextureCtrl::allowDrop(LLInventoryItem* item, EDragAndDropType cargo_type, std::string& tooltip_msg)
{
- BOOL copy = item->getPermissions().allowCopyBy(gAgent.getID());
- BOOL mod = item->getPermissions().allowModifyBy(gAgent.getID());
- BOOL xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER,
+ bool copy = item->getPermissions().allowCopyBy(gAgent.getID());
+ bool mod = item->getPermissions().allowModifyBy(gAgent.getID());
+ bool xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER,
gAgent.getID());
PermissionMask item_perm_mask = 0;
@@ -2307,7 +2361,7 @@ BOOL LLTextureCtrl::allowDrop(LLInventoryItem* item, EDragAndDropType cargo_type
}
else
{
- return TRUE;
+ return true;
}
}
else
@@ -2318,16 +2372,16 @@ BOOL LLTextureCtrl::allowDrop(LLInventoryItem* item, EDragAndDropType cargo_type
{
tooltip_msg.assign(LLTrans::getString("TooltipTextureRestrictedDrop"));
}
- return FALSE;
+ return false;
}
}
-BOOL LLTextureCtrl::doDrop(LLInventoryItem* item)
+bool LLTextureCtrl::doDrop(LLInventoryItem* item)
{
// call the callback if it exists.
if(mDropCallback)
{
- // if it returns TRUE, we return TRUE, and therefore the
+ // if it returns true, we return true, and therefore the
// commit is called above.
return mDropCallback(this, item);
}
@@ -2338,20 +2392,20 @@ BOOL LLTextureCtrl::doDrop(LLInventoryItem* item)
if (mInventoryPickType == PICK_MATERIAL && asset_id.isNull())
{
// If an inventory material has a null asset, consider it a valid blank material(gltf)
- asset_id = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
+ asset_id = BLANK_MATERIAL_ASSET_ID;
}
setImageAssetID(asset_id);
mImageItemID = item->getUUID();
- return TRUE;
+ return true;
}
-BOOL LLTextureCtrl::handleUnicodeCharHere(llwchar uni_char)
+bool LLTextureCtrl::handleUnicodeCharHere(llwchar uni_char)
{
if( ' ' == uni_char )
{
- showPicker(TRUE);
- return TRUE;
+ showPicker(true);
+ return true;
}
return LLUICtrl::handleUnicodeCharHere(uni_char);
}
@@ -2366,6 +2420,16 @@ LLSD LLTextureCtrl::getValue() const
return LLSD(getImageAssetID());
}
+namespace LLInitParam
+{
+ void TypeValues<EPickInventoryType>::declareValues()
+ {
+ declare("texture_material", PICK_TEXTURE_MATERIAL);
+ declare("texture", PICK_TEXTURE);
+ declare("material", PICK_MATERIAL);
+ }
+}
+
diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h
index cb6ce636e0..0361099b27 100644
--- a/indra/newview/lltexturectrl.h
+++ b/indra/newview/lltexturectrl.h
@@ -50,7 +50,7 @@ class LLViewerFetchedTexture;
class LLFetchedGLTFMaterial;
// used for setting drag & drop callbacks.
-typedef boost::function<BOOL (LLUICtrl*, LLInventoryItem*)> drag_n_drop_callback;
+typedef boost::function<bool (LLUICtrl*, LLInventoryItem*)> drag_n_drop_callback;
typedef boost::function<void (LLInventoryItem*)> texture_selected_callback;
// Helper functions for UI that work with picker
@@ -64,13 +64,6 @@ bool get_is_predefined_texture(LLUUID asset_id);
LLUUID get_copy_free_item_by_asset_id(LLUUID image_id, bool no_trans_perm = false);
bool get_can_copy_texture(LLUUID image_id);
-enum LLPickerSource
-{
- PICKER_INVENTORY,
- PICKER_LOCAL,
- PICKER_BAKE,
- PICKER_UNKNOWN, // on cancel, default ids
-};
typedef enum e_pick_inventory_type
{
@@ -79,6 +72,23 @@ typedef enum e_pick_inventory_type
PICK_MATERIAL = 2,
} EPickInventoryType;
+namespace LLInitParam
+{
+ template<>
+ struct TypeValues<EPickInventoryType> : public TypeValuesHelper<EPickInventoryType>
+ {
+ static void declareValues();
+ };
+}
+
+enum LLPickerSource
+{
+ PICKER_INVENTORY,
+ PICKER_LOCAL,
+ PICKER_BAKE,
+ PICKER_UNKNOWN, // on cancel, default ids
+};
+
//////////////////////////////////////////////////////////////////////////////////////////
// LLTextureCtrl
@@ -100,6 +110,7 @@ public:
Optional<LLUUID> image_id;
Optional<LLUUID> default_image_id;
Optional<std::string> default_image_name;
+ Optional<EPickInventoryType> pick_type;
Optional<bool> allow_no_texture;
Optional<bool> can_apply_immediately;
Optional<bool> no_commit_on_selection; // alternative mode: commit occurs and the widget gets dirty
@@ -117,6 +128,7 @@ public:
: image_id("image"),
default_image_id("default_image_id"),
default_image_name("default_image_name"),
+ pick_type("pick_type", PICK_TEXTURE),
allow_no_texture("allow_no_texture", false),
can_apply_immediately("can_apply_immediately"),
no_commit_on_selection("no_commit_on_selection", false),
@@ -136,39 +148,41 @@ public:
// LLView interface
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask,
- BOOL drop, EDragAndDropType cargo_type, void *cargo_data,
- EAcceptance *accept,
- std::string& tooltip_msg);
- virtual BOOL handleHover(S32 x, S32 y, MASK mask);
- virtual BOOL handleUnicodeCharHere(llwchar uni_char);
+ bool handleMouseDown(S32 x, S32 y, MASK mask) override;
+ bool handleDragAndDrop(S32 x, S32 y, MASK mask,
+ bool drop, EDragAndDropType cargo_type, void *cargo_data,
+ EAcceptance *accept,
+ std::string& tooltip_msg) override;
+ bool handleHover(S32 x, S32 y, MASK mask) override;
+ bool handleUnicodeCharHere(llwchar uni_char) override;
+
+ void draw() override;
+ void setVisible( bool visible ) override;
+ void setEnabled( bool enabled ) override;
- virtual void draw();
- virtual void setVisible( BOOL visible );
- virtual void setEnabled( BOOL enabled );
+ void onVisibilityChange(bool new_visibility) override;
- void setValid(BOOL valid);
+ void setValid(bool valid);
- // LLUICtrl interface
- virtual void clear();
+ // LLUICtrl interface
+ void clear() override;
- // Takes a UUID, wraps get/setImageAssetID
- virtual void setValue(const LLSD& value);
- virtual LLSD getValue() const;
+ // Takes a UUID, wraps get/setImageAssetID
+ void setValue(const LLSD& value) override;
+ LLSD getValue() const override;
// LLTextureCtrl interface
- void showPicker(BOOL take_focus);
+ void showPicker(bool take_focus);
bool isPickerShown() { return !mFloaterHandle.isDead(); }
void setLabel(const std::string& label);
void setLabelWidth(S32 label_width) {mLabelWidth =label_width;}
const std::string& getLabel() const { return mLabel; }
- void setAllowNoTexture( BOOL b ) { mAllowNoTexture = b; }
+ void setAllowNoTexture( bool b ) { mAllowNoTexture = b; }
bool getAllowNoTexture() const { return mAllowNoTexture; }
- void setAllowLocalTexture(BOOL b) { mAllowLocalTexture = b; }
- BOOL getAllowLocalTexture() const { return mAllowLocalTexture; }
+ void setAllowLocalTexture(bool b) { mAllowLocalTexture = b; }
+ bool getAllowLocalTexture() const { return mAllowLocalTexture; }
const LLUUID& getImageItemID() { return mImageItemID; }
@@ -188,7 +202,7 @@ public:
void setOpenTexPreview(bool open_preview) { mOpenTexPreview = open_preview; }
void setCaption(const std::string& caption);
- void setCanApplyImmediately(BOOL b);
+ void setCanApplyImmediately(bool b);
void setCanApply(bool can_preview, bool can_apply);
@@ -208,10 +222,10 @@ public:
const LLUUID& tracking_id);
// This call is returned when a drag is detected. Your callback
- // should return TRUE if the drag is acceptable.
+ // should return true if the drag is acceptable.
void setDragCallback(drag_n_drop_callback cb) { mDragCallback = cb; }
- // This callback is called when the drop happens. Return TRUE if
+ // This callback is called when the drop happens. Return true if
// the drop happened - resulting in an on commit callback, but not
// necessariliy any other change.
void setDropCallback(drag_n_drop_callback cb) { mDropCallback = cb; }
@@ -225,7 +239,7 @@ public:
*/
void setOnTextureSelectedCallback(texture_selected_callback cb);
- void setShowLoadingPlaceholder(BOOL showLoadingPlaceholder);
+ void setShowLoadingPlaceholder(bool showLoadingPlaceholder);
LLViewerFetchedTexture* getTexture() { return mTexturep; }
@@ -239,8 +253,8 @@ public:
LLUUID getLocalTrackingID() { return mLocalTrackingID; }
private:
- BOOL allowDrop(LLInventoryItem* item, EDragAndDropType cargo_type, std::string& tooltip_msg);
- BOOL doDrop(LLInventoryItem* item);
+ bool allowDrop(LLInventoryItem* item, EDragAndDropType cargo_type, std::string& tooltip_msg);
+ bool doDrop(LLInventoryItem* item);
private:
drag_n_drop_callback mDragCallback;
@@ -250,6 +264,8 @@ private:
commit_callback_t mOnCloseCallback;
texture_selected_callback mOnTextureSelectedCallback;
LLPointer<LLViewerFetchedTexture> mTexturep;
+ LLPointer<LLFetchedGLTFMaterial> mGLTFMaterial;
+ LLPointer<LLViewerTexture> mGLTFPreview;
LLUIColor mBorderColor;
LLUUID mImageItemID;
LLUUID mImageAssetID;
@@ -262,16 +278,16 @@ private:
LLTextBox* mTentativeLabel;
LLTextBox* mCaption;
std::string mLabel;
- BOOL mAllowNoTexture; // If true, the user can select "none" as an option
- BOOL mAllowLocalTexture;
+ bool mAllowNoTexture; // If true, the user can select "none" as an option
+ bool mAllowLocalTexture;
PermissionMask mImmediateFilterPermMask;
PermissionMask mDnDFilterPermMask;
- BOOL mCanApplyImmediately;
- BOOL mCommitOnSelection;
- BOOL mNeedsRawImageData;
+ bool mCanApplyImmediately;
+ bool mCommitOnSelection;
+ bool mNeedsRawImageData;
LLViewBorder* mBorder;
- BOOL mValid;
- BOOL mShowLoadingPlaceholder;
+ bool mValid;
+ bool mShowLoadingPlaceholder;
std::string mLoadingPlaceholderString;
S32 mLabelWidth;
bool mOpenTexPreview;
@@ -294,27 +310,27 @@ public:
LLUUID image_asset_id,
LLUUID default_image_asset_id,
LLUUID blank_image_asset_id,
- BOOL tentative,
- BOOL allow_no_texture,
+ bool tentative,
+ bool allow_no_texture,
const std::string& label,
PermissionMask immediate_filter_perm_mask,
PermissionMask dnd_filter_perm_mask,
- BOOL can_apply_immediately,
+ bool can_apply_immediately,
LLUIImagePtr fallback_image_name,
EPickInventoryType pick_type);
virtual ~LLFloaterTexturePicker();
// LLView overrides
- /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask,
- BOOL drop, EDragAndDropType cargo_type, void *cargo_data,
+ /*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();
- /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
+ /*virtual*/ bool handleKeyHere(KEY key, MASK mask);
// LLFloater overrides
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ void onClose(bool app_settings);
@@ -322,10 +338,10 @@ public:
void setImageID(const LLUUID& image_asset_id, bool set_selection = true);
bool updateImageStats(); // true if within limits
const LLUUID& getAssetID() { return mImageAssetID; }
- const LLUUID& findItemID(const LLUUID& asset_id, BOOL copyable_only, BOOL ignore_library = FALSE);
- void setCanApplyImmediately(BOOL b);
+ const LLUUID& findItemID(const LLUUID& asset_id, bool copyable_only, bool ignore_library = false);
+ void setCanApplyImmediately(bool b);
- void setActive(BOOL active);
+ void setActive(bool active);
LLView* getOwner() const { return mOwner; }
void setOwner(LLView* owner) { mOwner = owner; }
@@ -354,7 +370,7 @@ public:
//static void onBtnRevert( void* userdata );
static void onBtnBlank(void* userdata);
static void onBtnNone(void* userdata);
- void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action);
+ void onSelectionChange(const std::deque<LLFolderViewItem*> &items, bool user_action);
static void onApplyImmediateCheck(LLUICtrl* ctrl, void* userdata);
void onTextureSelect(const LLTextureEntry& te);
@@ -366,8 +382,8 @@ public:
static void onBakeTextureSelect(LLUICtrl* ctrl, void *userdata);
- void setLocalTextureEnabled(BOOL enabled);
- void setBakeTextureEnabled(BOOL enabled);
+ void setLocalTextureEnabled(bool enabled);
+ void setBakeTextureEnabled(bool enabled);
void setInventoryPickType(EPickInventoryType type);
void setImmediateFilterPermMask(PermissionMask mask);
@@ -382,14 +398,15 @@ protected:
LLPointer<LLViewerTexture> mTexturep;
LLPointer<LLFetchedGLTFMaterial> mGLTFMaterial;
+ LLPointer<LLViewerTexture> mGLTFPreview;
LLView* mOwner;
LLUUID mImageAssetID; // Currently selected texture
LLUIImagePtr mFallbackImage; // What to show if currently selected texture is null.
LLUUID mDefaultImageAssetID;
LLUUID mBlankImageAssetID;
- BOOL mTentative;
- BOOL mAllowNoTexture;
+ bool mTentative;
+ bool mAllowNoTexture;
LLUUID mSpecialCurrentImageAssetID; // Used when the asset id has no corresponding texture in the user's inventory.
LLUUID mOriginalImageAssetID;
@@ -400,17 +417,17 @@ protected:
LLTextBox* mResolutionWarning;
std::string mPendingName;
- BOOL mActive;
+ bool mActive;
LLFilterEditor* mFilterEdit;
LLInventoryPanel* mInventoryPanel;
PermissionMask mImmediateFilterPermMask;
PermissionMask mDnDFilterPermMask;
- BOOL mCanApplyImmediately;
- BOOL mNoCopyTextureSelected;
+ bool mCanApplyImmediately;
+ bool mNoCopyTextureSelected;
F32 mContextConeOpacity;
LLSaveFolderState mSavedFolderState;
- BOOL mSelectedItemPinned;
+ bool mSelectedItemPinned;
LLComboBox* mModeSelector;
LLScrollListCtrl* mLocalScrollCtrl;
@@ -437,7 +454,7 @@ private:
set_image_asset_id_callback mSetImageAssetIDCallback;
set_on_update_image_stats_callback mOnUpdateImageStatsCallback;
- BOOL mBakeTextureEnabled;
+ bool mBakeTextureEnabled;
static S32 sLastPickerMode;
};
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 40bbe2b934..5fd3fb6e29 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -392,7 +392,7 @@ public:
// Threads: Ttc
void callbackCacheRead(bool success, LLImageFormatted* image,
- S32 imagesize, BOOL islocal);
+ S32 imagesize, bool islocal);
// Threads: Ttc
void callbackCacheWrite(bool success);
@@ -571,13 +571,13 @@ private:
mCachedSize;
e_request_state mSentRequest;
handle_t mDecodeHandle;
- BOOL mLoaded;
- BOOL mDecoded;
- BOOL mWritten;
- BOOL mNeedsAux;
- BOOL mHaveAllData;
- BOOL mInLocalCache;
- BOOL mInCache;
+ bool mLoaded;
+ bool mDecoded;
+ bool mWritten;
+ bool mNeedsAux;
+ bool mHaveAllData;
+ bool mInLocalCache;
+ bool mInCache;
bool mCanUseHTTP;
S32 mRetryAttempt;
S32 mActiveCount;
@@ -909,15 +909,15 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher,
mFileSize(0),
mSkippedStatesTime(0),
mCachedSize(0),
- mLoaded(FALSE),
+ mLoaded(false),
mSentRequest(UNSENT),
mDecodeHandle(0),
- mDecoded(FALSE),
- mWritten(FALSE),
- mNeedsAux(FALSE),
- mHaveAllData(FALSE),
- mInLocalCache(FALSE),
- mInCache(FALSE),
+ mDecoded(false),
+ mWritten(false),
+ mNeedsAux(false),
+ mHaveAllData(false),
+ mInLocalCache(false),
+ mInCache(false),
mCanUseHTTP(true),
mRetryAttempt(0),
mActiveCount(0),
@@ -1054,7 +1054,7 @@ void LLTextureFetchWorker::resetFormattedData()
}
mHttpReplySize = 0;
mHttpReplyOffset = 0;
- mHaveAllData = FALSE;
+ mHaveAllData = false;
}
F32 LLTextureFetchWorker::getImagePriority() const
@@ -1152,10 +1152,10 @@ bool LLTextureFetchWorker::doWork(S32 param)
mRequestedOffset = 0;
mFileSize = 0;
mCachedSize = 0;
- mLoaded = FALSE;
+ mLoaded = false;
mSentRequest = UNSENT;
- mDecoded = FALSE;
- mWritten = FALSE;
+ mDecoded = false;
+ mWritten = false;
if (mHttpBufferArray)
{
mHttpBufferArray->release();
@@ -1163,12 +1163,12 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
mHttpReplySize = 0;
mHttpReplyOffset = 0;
- mHaveAllData = FALSE;
+ mHaveAllData = false;
clearPackets(); // TODO: Shouldn't be necessary
mCacheReadHandle = LLTextureCache::nullHandle();
mCacheWriteHandle = LLTextureCache::nullHandle();
setState(LOAD_FROM_TEXTURE_CACHE);
- mInCache = FALSE;
+ mInCache = false;
mDesiredSize = llmax(mDesiredSize, TEXTURE_CACHE_ENTRY_SIZE); // min desired size is TEXTURE_CACHE_ENTRY_SIZE
LL_DEBUGS(LOG_TXT) << mID << ": Priority: " << llformat("%8.0f",mImagePriority)
<< " Desired Discard: " << mDesiredDiscard << " Desired Size: " << mDesiredSize << LL_ENDL;
@@ -1190,7 +1190,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
// return false;
}
mFileSize = 0;
- mLoaded = FALSE;
+ mLoaded = false;
add(LLTextureFetch::sCacheAttempt, 1.0);
@@ -1264,7 +1264,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
<< ", should be >=0" << LL_ENDL;
}
setState(DECODE_IMAGE);
- mInCache = TRUE;
+ mInCache = true;
mWriteToCacheState = NOT_WRITE ;
LL_DEBUGS(LOG_TXT) << mID << ": Cached. Bytes: " << mFormattedImage->getDataSize()
<< " Size: " << llformat("%dx%d",mFormattedImage->getWidth(),mFormattedImage->getHeight())
@@ -1476,7 +1476,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
mRequestedDeltaTimer.reset();
- mLoaded = FALSE;
+ mLoaded = false;
mGetStatus = LLCore::HttpStatus();
mGetReason.clear();
LL_DEBUGS(LOG_TXT) << "HTTP GET: " << mID << " Offset: " << mRequestedOffset
@@ -1593,7 +1593,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
else if (http_not_sat == mGetStatus)
{
// Allowed, we'll accept whatever data we have as complete.
- mHaveAllData = TRUE;
+ mHaveAllData = true;
}
else
{
@@ -1699,7 +1699,9 @@ bool LLTextureFetchWorker::doWork(S32 param)
mFormattedImage = new LLImageJ2C; // default
}
}
-
+
+ LLImageDataLock lock(mFormattedImage);
+
if (mHaveAllData) //the image file is fully loaded.
{
mFileSize = total_size;
@@ -1796,7 +1798,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
mAuxImage = NULL;
llassert_always(mFormattedImage.notNull());
S32 discard = mHaveAllData ? 0 : mLoadedDiscard;
- mDecoded = FALSE;
+ mDecoded = false;
setState(DECODE_IMAGE_UPDATE);
LL_DEBUGS(LOG_TXT) << mID << ": Decoding. Bytes: " << mFormattedImage->getDataSize() << " Discard: " << discard
<< " All Data: " << mHaveAllData << LL_ENDL;
@@ -1871,6 +1873,9 @@ bool LLTextureFetchWorker::doWork(S32 param)
//return false;
return doWork(param);
}
+
+ LLImageDataSharedLock lock(mFormattedImage);
+
S32 datasize = mFormattedImage->getDataSize();
if(mFileSize < datasize)//This could happen when http fetching and sim fetching mixed.
{
@@ -1884,7 +1889,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
}
llassert_always(datasize);
- mWritten = FALSE;
+ mWritten = false;
setState(WAIT_ON_WRITE);
++mCacheWriteCount;
CacheWriteResponder* responder = new CacheWriteResponder(mFetcher, mID);
@@ -2234,19 +2239,19 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response,
<< mFileSize << " datasize: " << mFormattedImage->getDataSize()
<< LL_ENDL;
}
- mHaveAllData = TRUE;
+ mHaveAllData = true;
llassert_always(mDecodeHandle == 0);
mFormattedImage = NULL; // discard any previous data we had
}
else if (data_size < mRequestedSize)
{
- mHaveAllData = TRUE;
+ mHaveAllData = true;
}
else if (data_size > mRequestedSize)
{
// *TODO: This shouldn't be happening any more (REALLY don't expect this anymore)
LL_WARNS(LOG_TXT) << "data_size = " << data_size << " > requested: " << mRequestedSize << LL_ENDL;
- mHaveAllData = TRUE;
+ mHaveAllData = true;
llassert_always(mDecodeHandle == 0);
mFormattedImage = NULL; // discard any previous data we had
}
@@ -2255,7 +2260,7 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response,
{
// We requested data but received none (and no error),
// so presumably we have all of it
- mHaveAllData = TRUE;
+ mHaveAllData = true;
}
mRequestedSize = data_size;
@@ -2271,7 +2276,7 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response,
mRequestedSize = -1; // error
}
- mLoaded = TRUE;
+ mLoaded = true;
return data_size ;
}
@@ -2280,7 +2285,7 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response,
// Threads: Ttc
void LLTextureFetchWorker::callbackCacheRead(bool success, LLImageFormatted* image,
- S32 imagesize, BOOL islocal)
+ S32 imagesize, bool islocal)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
LLMutexLock lock(&mWorkMutex); // +Mw
@@ -2298,10 +2303,10 @@ void LLTextureFetchWorker::callbackCacheRead(bool success, LLImageFormatted* ima
mInLocalCache = islocal;
if (mFileSize != 0 && mFormattedImage->getDataSize() >= mFileSize)
{
- mHaveAllData = TRUE;
+ mHaveAllData = true;
}
}
- mLoaded = TRUE;
+ mLoaded = true;
} // -Mw
// Threads: Ttc
@@ -2313,7 +2318,7 @@ void LLTextureFetchWorker::callbackCacheWrite(bool success)
// LL_WARNS(LOG_TXT) << "Write callback for " << mID << " with state = " << mState << LL_ENDL;
return;
}
- mWritten = TRUE;
+ mWritten = true;
} // -Mw
//////////////////////////////////////////////////////////////////////////////
@@ -2358,7 +2363,7 @@ void LLTextureFetchWorker::callbackDecoded(bool success, LLImageRaw* raw, LLImag
removeFromCache();
mDecodedDiscard = -1; // Redundant, here for clarity and paranoia
}
- mDecoded = TRUE;
+ mDecoded = true;
// LL_INFOS(LOG_TXT) << mID << " : DECODE COMPLETE " << LL_ENDL;
} // -Mw
@@ -2435,7 +2440,7 @@ std::string LLTextureFetch::getStateString(S32 state)
LLTextureFetch::LLTextureFetch(LLTextureCache* cache, bool threaded, bool qa_mode)
: LLWorkerThread("TextureFetch", threaded, true),
mDebugCount(0),
- mDebugPause(FALSE),
+ mDebugPause(false),
mPacketCount(0),
mBadPacketCount(0),
mQueueMutex(),
@@ -3144,9 +3149,9 @@ LLViewerRegion* LLTextureFetchWorker::getRegion()
//////////////////////////////////////////////////////////////////////////////
// Threads: T*
-BOOL LLTextureFetch::isFromLocalCache(const LLUUID& id)
+bool LLTextureFetch::isFromLocalCache(const LLUUID& id)
{
- BOOL from_cache = FALSE ;
+ bool from_cache = false ;
LLTextureFetchWorker* worker = getWorker(id);
if (worker)
diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h
index 9ff6468bb2..38191de648 100644
--- a/indra/newview/lltexturefetch.h
+++ b/indra/newview/lltexturefetch.h
@@ -109,7 +109,7 @@ public:
F32 getTextureBandwidth() { return mTextureBandwidth; }
// Threads: T*
- BOOL isFromLocalCache(const LLUUID& id);
+ bool isFromLocalCache(const LLUUID& id);
// get the current fetch state, if any, from the given UUID
S32 getFetchState(const LLUUID& id);
@@ -292,7 +292,7 @@ private:
public:
LLUUID mDebugID;
S32 mDebugCount;
- BOOL mDebugPause;
+ bool mDebugPause;
S32 mPacketCount;
S32 mBadPacketCount;
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index 84cd6e2da7..f410217387 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -107,7 +107,7 @@ public:
{}
virtual void draw();
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask);
virtual LLRect getRequiredRect(); // Return the height of this object, given the set options.
// Used for sorting
@@ -343,12 +343,12 @@ void LLTextureBar::draw()
}
-BOOL LLTextureBar::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLTextureBar::handleMouseDown(S32 x, S32 y, MASK mask)
{
if ((mask & (MASK_CONTROL|MASK_SHIFT|MASK_ALT)) == MASK_ALT)
{
LLAppViewer::getTextureFetch()->mDebugID = mImagep->getID();
- return TRUE;
+ return true;
}
return LLView::handleMouseDown(x,y,mask);
}
@@ -384,7 +384,7 @@ public:
{}
virtual void draw();
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask);
virtual LLRect getRequiredRect(); // Return the height of this object, given the set options.
private:
@@ -440,9 +440,9 @@ void LLAvatarTexBar::draw()
header_color, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT);
}
-BOOL LLAvatarTexBar::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLAvatarTexBar::handleMouseDown(S32 x, S32 y, MASK mask)
{
- return FALSE;
+ return false;
}
LLRect LLAvatarTexBar::getRequiredRect()
@@ -475,7 +475,7 @@ public:
{}
virtual void draw();
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask);
virtual LLRect getRequiredRect(); // Return the height of this object, given the set options.
private:
@@ -529,11 +529,12 @@ void LLGLTexMemBar::draw()
U32 texFetchLatMed = U32(recording.getMean(LLTextureFetch::sTexFetchLatency).value() * 1000.0f);
U32 texFetchLatMax = U32(recording.getMax(LLTextureFetch::sTexFetchLatency).value() * 1000.0f);
- text = llformat("GL Free: %d MB Sys Free: %d MB FBO: %d MB Bias: %.2f Cache: %.1f/%.1f MB",
+ text = llformat("GL Free: %d MB Sys Free: %d MB FBO: %d MB Bias: %.2f(%d MB) Cache: %.1f/%.1f MB",
gViewerWindow->getWindow()->getAvailableVRAMMegabytes(),
LLMemory::getAvailableMemKB()/1024,
LLRenderTarget::sBytesAllocated/(1024*1024),
discard_bias,
+ (S32)LLViewerTexture::sFreeVRAMMegabytes,
cache_usage,
cache_max_usage);
//, cache_entries, cache_max_entries
@@ -642,9 +643,9 @@ void LLGLTexMemBar::draw()
text_color, LLFontGL::LEFT, LLFontGL::TOP);
}
-BOOL LLGLTexMemBar::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLGLTexMemBar::handleMouseDown(S32 x, S32 y, MASK mask)
{
- return FALSE;
+ return false;
}
LLRect LLGLTexMemBar::getRequiredRect()
@@ -673,7 +674,7 @@ public:
void setTop(S32 loaded, S32 bound, F32 scale) {mTopLoaded = loaded ; mTopBound = bound; mScale = scale ;}
void draw();
- BOOL handleHover(S32 x, S32 y, MASK mask, BOOL set_pick_size) ;
+ bool handleHover(S32 x, S32 y, MASK mask, bool set_pick_size) ;
private:
S32 mIndex ;
@@ -686,13 +687,13 @@ private:
F32 mScale ;
};
-BOOL LLGLTexSizeBar::handleHover(S32 x, S32 y, MASK mask, BOOL set_pick_size)
+bool LLGLTexSizeBar::handleHover(S32 x, S32 y, MASK mask, bool set_pick_size)
{
if(y > mBottom && (y < mBottom + (S32)(mTopLoaded * mScale) || y < mBottom + (S32)(mTopBound * mScale)))
{
LLImageGL::setCurTexSizebar(mIndex, set_pick_size);
}
- return TRUE ;
+ return true ;
}
void LLGLTexSizeBar::draw()
{
@@ -721,14 +722,14 @@ void LLGLTexSizeBar::draw()
LLTextureView::LLTextureView(const LLTextureView::Params& p)
: LLContainerView(p),
- mFreezeView(FALSE),
- mOrderFetch(FALSE),
- mPrintList(FALSE),
+ mFreezeView(false),
+ mOrderFetch(false),
+ mPrintList(false),
mNumTextureBars(0)
{
- setVisible(FALSE);
+ setVisible(false);
- setDisplayChildren(TRUE);
+ setDisplayChildren(true);
mGLTexMemBar = 0;
mAvatarTexBar = 0;
}
@@ -900,7 +901,7 @@ void LLTextureView::draw()
if (mPrintList)
{
- mPrintList = FALSE;
+ mPrintList = false;
}
static S32 max_count = 50;
@@ -949,7 +950,7 @@ void LLTextureView::draw()
addChild(mAvatarTexBar);
sendChildToFront(mAvatarTexBar);
- reshape(getRect().getWidth(), getRect().getHeight(), TRUE);
+ reshape(getRect().getWidth(), getRect().getHeight(), true);
LLUI::popMatrix();
LLUI::pushMatrix();
@@ -961,7 +962,7 @@ void LLTextureView::draw()
LLView *viewp = *child_iter;
if (viewp->getRect().mBottom < 0)
{
- viewp->setVisible(FALSE);
+ viewp->setVisible(false);
}
}
}
@@ -970,7 +971,7 @@ void LLTextureView::draw()
}
-BOOL LLTextureView::addBar(LLViewerFetchedTexture *imagep, S32 hilite)
+bool LLTextureView::addBar(LLViewerFetchedTexture *imagep, S32 hilite)
{
llassert(imagep);
@@ -990,42 +991,42 @@ BOOL LLTextureView::addBar(LLViewerFetchedTexture *imagep, S32 hilite)
addChild(barp);
mTextureBars.push_back(barp);
- return TRUE;
+ return true;
}
-BOOL LLTextureView::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLTextureView::handleMouseDown(S32 x, S32 y, MASK mask)
{
if ((mask & (MASK_CONTROL|MASK_SHIFT|MASK_ALT)) == (MASK_ALT|MASK_SHIFT))
{
- mPrintList = TRUE;
- return TRUE;
+ mPrintList = true;
+ return true;
}
if ((mask & (MASK_CONTROL|MASK_SHIFT|MASK_ALT)) == (MASK_CONTROL|MASK_SHIFT))
{
LLAppViewer::getTextureFetch()->mDebugPause = !LLAppViewer::getTextureFetch()->mDebugPause;
- return TRUE;
+ return true;
}
if (mask & MASK_SHIFT)
{
mFreezeView = !mFreezeView;
- return TRUE;
+ return true;
}
if (mask & MASK_CONTROL)
{
mOrderFetch = !mOrderFetch;
- return TRUE;
+ return true;
}
return LLView::handleMouseDown(x,y,mask);
}
-BOOL LLTextureView::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLTextureView::handleMouseUp(S32 x, S32 y, MASK mask)
{
- return FALSE;
+ return false;
}
-BOOL LLTextureView::handleKey(KEY key, MASK mask, BOOL called_from_parent)
+bool LLTextureView::handleKey(KEY key, MASK mask, bool called_from_parent)
{
- return FALSE;
+ return false;
}
diff --git a/indra/newview/lltextureview.h b/indra/newview/lltextureview.h
index 900b4e17d8..8e7aa34e78 100644
--- a/indra/newview/lltextureview.h
+++ b/indra/newview/lltextureview.h
@@ -45,23 +45,22 @@ protected:
public:
~LLTextureView();
- /*virtual*/ void draw();
- /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
+ void draw() override;
+ bool handleMouseDown(S32 x, S32 y, MASK mask) override;
+ bool handleMouseUp(S32 x, S32 y, MASK mask) override;
+ bool handleKey(KEY key, MASK mask, bool called_from_parent) override;
static void addDebugImage(LLViewerFetchedTexture* image) { sDebugImages.insert(image); }
static void removeDebugImage(LLViewerFetchedTexture* image) { sDebugImages.insert(image); }
static void clearDebugImages() { sDebugImages.clear(); }
private:
- BOOL addBar(LLViewerFetchedTexture *image, BOOL hilight = FALSE);
- void removeAllBars();
+ bool addBar(LLViewerFetchedTexture *image, S32 hilight = 0);
private:
- BOOL mFreezeView;
- BOOL mOrderFetch;
- BOOL mPrintList;
+ bool mFreezeView;
+ bool mOrderFetch;
+ bool mPrintList;
LLTextBox *mInfoTextp;
diff --git a/indra/newview/llthumbnailctrl.cpp b/indra/newview/llthumbnailctrl.cpp
index b558c249cb..787f242565 100644
--- a/indra/newview/llthumbnailctrl.cpp
+++ b/indra/newview/llthumbnailctrl.cpp
@@ -95,7 +95,7 @@ void LLThumbnailCtrl::draw()
{
mBorder->setKeyboardFocusHighlight(hasFocus());
- gl_rect_2d( draw_rect, mBorderColor.get(), FALSE );
+ gl_rect_2d( draw_rect, mBorderColor.get(), false );
draw_rect.stretch( -1 );
}
@@ -106,7 +106,7 @@ void LLThumbnailCtrl::draw()
if( mTexturep->getComponents() == 4 )
{
const LLColor4 color(.098f, .098f, .098f);
- gl_rect_2d( draw_rect, color, TRUE);
+ gl_rect_2d( draw_rect, color, true);
}
gl_draw_scaled_image( draw_rect.mLeft, draw_rect.mBottom, draw_rect.getWidth(), draw_rect.getHeight(), mTexturep, UI_VERTEX_COLOR % alpha);
@@ -142,7 +142,7 @@ void LLThumbnailCtrl::draw()
}
else
{
- gl_rect_2d( draw_rect, LLColor4::grey % alpha, TRUE );
+ gl_rect_2d( draw_rect, LLColor4::grey % alpha, true );
// Draw X
gl_draw_x( draw_rect, LLColor4::black );
@@ -176,7 +176,7 @@ void LLThumbnailCtrl::draw()
LLUICtrl::draw();
}
-void LLThumbnailCtrl::setVisible(BOOL visible)
+void LLThumbnailCtrl::setVisible(bool visible)
{
if (!visible && mInited)
{
@@ -212,12 +212,12 @@ void LLThumbnailCtrl::setValue(const LLSD& value)
}
}
-BOOL LLThumbnailCtrl::handleHover(S32 x, S32 y, MASK mask)
+bool LLThumbnailCtrl::handleHover(S32 x, S32 y, MASK mask)
{
if (mInteractable && getEnabled())
{
getWindow()->setCursor(UI_CURSOR_HAND);
- return TRUE;
+ return true;
}
return LLUICtrl::handleHover(x, y, mask);
}
diff --git a/indra/newview/llthumbnailctrl.h b/indra/newview/llthumbnailctrl.h
index f84a583271..330dc1d9b9 100644
--- a/indra/newview/llthumbnailctrl.h
+++ b/indra/newview/llthumbnailctrl.h
@@ -64,13 +64,13 @@ public:
virtual ~LLThumbnailCtrl();
virtual void draw() override;
- void setVisible(BOOL visible) override;
+ void setVisible(bool visible) override;
virtual void setValue(const LLSD& value ) override;
void setInitImmediately(bool val) { mInitImmediately = val; }
void clearTexture();
- virtual BOOL handleHover(S32 x, S32 y, MASK mask) override;
+ virtual bool handleHover(S32 x, S32 y, MASK mask) override;
protected:
void initImage();
diff --git a/indra/newview/lltinygltfhelper.cpp b/indra/newview/lltinygltfhelper.cpp
index 5b75db37d0..7b4f47e567 100644
--- a/indra/newview/lltinygltfhelper.cpp
+++ b/indra/newview/lltinygltfhelper.cpp
@@ -31,7 +31,7 @@
#include "llviewertexture.h"
#include "llviewertexturelist.h"
-void strip_alpha_channel(LLPointer<LLImageRaw>& img)
+static void strip_alpha_channel(LLPointer<LLImageRaw>& img)
{
if (img->getComponents() == 4)
{
@@ -45,13 +45,13 @@ void strip_alpha_channel(LLPointer<LLImageRaw>& img)
// PRECONDITIONS:
// dst_img must be 3 component
// src_img and dst_image must have the same dimensions
-void copy_red_channel(LLPointer<LLImageRaw>& src_img, LLPointer<LLImageRaw>& dst_img)
+static void copy_red_channel(const LLPointer<LLImageRaw>& src_img, LLPointer<LLImageRaw>& dst_img)
{
llassert(src_img->getWidth() == dst_img->getWidth() && src_img->getHeight() == dst_img->getHeight());
llassert(dst_img->getComponents() == 3);
U32 pixel_count = dst_img->getWidth() * dst_img->getHeight();
- U8* src = src_img->getData();
+ const U8* src = src_img->getData();
U8* dst = dst_img->getData();
S8 src_components = src_img->getComponents();
@@ -87,23 +87,36 @@ void LLTinyGLTFHelper::initFetchedTextures(tinygltf::Material& material,
{
strip_alpha_channel(mr_img);
- if (occlusion_img && material.pbrMetallicRoughness.metallicRoughnessTexture.index != material.occlusionTexture.index)
+ if (occlusion_img)
{
- // occlusion is a distinct texture from pbrMetallicRoughness
- // pack into mr red channel
- int occlusion_idx = material.occlusionTexture.index;
- int mr_idx = material.pbrMetallicRoughness.metallicRoughnessTexture.index;
- if (occlusion_idx != mr_idx)
+ if (material.pbrMetallicRoughness.metallicRoughnessTexture.index != material.occlusionTexture.index)
{
- //scale occlusion image to match resolution of mr image
- occlusion_img->scale(mr_img->getWidth(), mr_img->getHeight());
-
- copy_red_channel(occlusion_img, mr_img);
+ LLImageDataLock lockIn(occlusion_img);
+ LLImageDataLock lockOut(mr_img);
+ // occlusion is a distinct texture from pbrMetallicRoughness
+ // pack into mr red channel
+ int occlusion_idx = material.occlusionTexture.index;
+ int mr_idx = material.pbrMetallicRoughness.metallicRoughnessTexture.index;
+ if (occlusion_idx != mr_idx)
+ {
+ //scale occlusion image to match resolution of mr image
+ occlusion_img->scale(mr_img->getWidth(), mr_img->getHeight());
+
+ copy_red_channel(occlusion_img, mr_img);
+ }
}
}
+ else if (material.occlusionTexture.index == -1)
+ {
+ // no occlusion, make sure red channel of ORM is all 255
+ occlusion_img = new LLImageRaw(mr_img->getWidth(), mr_img->getHeight(), 3);
+ occlusion_img->clear(255, 255, 255);
+ copy_red_channel(occlusion_img, mr_img);
+ }
}
else if (occlusion_img)
{
+ LLImageDataSharedLock lock(occlusion_img);
//no mr but occlusion exists, make a white mr_img and copy occlusion red channel over
mr_img = new LLImageRaw(occlusion_img->getWidth(), occlusion_img->getHeight(), 3);
mr_img->clear(255, 255, 255);
@@ -147,7 +160,7 @@ const tinygltf::Image * LLTinyGLTFHelper::getImageFromTextureIndex(const tinyglt
return nullptr;
}
-LLImageRaw * LLTinyGLTFHelper::getTexture(const std::string & folder, const tinygltf::Model & model, S32 texture_index, std::string & name)
+LLImageRaw * LLTinyGLTFHelper::getTexture(const std::string & folder, const tinygltf::Model & model, S32 texture_index, std::string & name, bool flip)
{
const tinygltf::Image* image = getImageFromTextureIndex(model, texture_index);
LLImageRaw* rawImage = nullptr;
@@ -159,14 +172,17 @@ LLImageRaw * LLTinyGLTFHelper::getTexture(const std::string & folder, const tiny
{
name = image->name;
rawImage = new LLImageRaw(&image->image[0], image->width, image->height, image->component);
- rawImage->verticalFlip();
+ if (flip)
+ {
+ rawImage->verticalFlip();
+ }
rawImage->optimizeAwayAlpha();
}
return rawImage;
}
-LLImageRaw * LLTinyGLTFHelper::getTexture(const std::string & folder, const tinygltf::Model & model, S32 texture_index)
+LLImageRaw * LLTinyGLTFHelper::getTexture(const std::string & folder, const tinygltf::Model & model, S32 texture_index, bool flip)
{
const tinygltf::Image* image = getImageFromTextureIndex(model, texture_index);
LLImageRaw* rawImage = nullptr;
@@ -177,7 +193,10 @@ LLImageRaw * LLTinyGLTFHelper::getTexture(const std::string & folder, const tiny
image->component <= 4)
{
rawImage = new LLImageRaw(&image->image[0], image->width, image->height, image->component);
- rawImage->verticalFlip();
+ if (flip)
+ {
+ rawImage->verticalFlip();
+ }
rawImage->optimizeAwayAlpha();
}
@@ -232,12 +251,50 @@ bool LLTinyGLTFHelper::loadModel(const std::string& filename, tinygltf::Model& m
return false;
}
+bool LLTinyGLTFHelper::saveModel(const std::string& filename, tinygltf::Model& model_in)
+{
+ std::string exten = gDirUtilp->getExtension(filename);
+
+ bool success = false;
+
+ if (exten == "gltf" || exten == "glb")
+ {
+ tinygltf::TinyGLTF writer;
+
+ std::string filename_lc = filename;
+ LLStringUtil::toLower(filename_lc);
+
+
+ bool embed_images = false;
+ bool embed_buffers = false;
+ bool pretty_print = true;
+ bool write_binary = false;
+
+
+ if (std::string::npos == filename_lc.rfind(".gltf"))
+ { // file is binary
+ embed_images = embed_buffers = write_binary = true;
+ }
+
+ success = writer.WriteGltfSceneToFile(&model_in, filename, embed_images, embed_buffers, pretty_print, write_binary);
+
+ if (!success)
+ {
+ LL_WARNS("GLTF") << "Failed to save" << LL_ENDL;
+ return false;
+ }
+ }
+
+ return success;
+}
+
bool LLTinyGLTFHelper::getMaterialFromModel(
const std::string& filename,
const tinygltf::Model& model_in,
S32 mat_index,
LLFetchedGLTFMaterial* material,
- std::string& material_name)
+ std::string& material_name,
+ bool flip)
{
llassert(material);
@@ -256,18 +313,18 @@ bool LLTinyGLTFHelper::getMaterialFromModel(
material_name = material_in.name;
// get base color texture
- LLPointer<LLImageRaw> base_img = LLTinyGLTFHelper::getTexture(folder, model_in, material_in.pbrMetallicRoughness.baseColorTexture.index);
+ LLPointer<LLImageRaw> base_img = LLTinyGLTFHelper::getTexture(folder, model_in, material_in.pbrMetallicRoughness.baseColorTexture.index, flip);
// get normal map
- LLPointer<LLImageRaw> normal_img = LLTinyGLTFHelper::getTexture(folder, model_in, material_in.normalTexture.index);
+ LLPointer<LLImageRaw> normal_img = LLTinyGLTFHelper::getTexture(folder, model_in, material_in.normalTexture.index, flip);
// get metallic-roughness texture
- LLPointer<LLImageRaw> mr_img = LLTinyGLTFHelper::getTexture(folder, model_in, material_in.pbrMetallicRoughness.metallicRoughnessTexture.index);
+ LLPointer<LLImageRaw> mr_img = LLTinyGLTFHelper::getTexture(folder, model_in, material_in.pbrMetallicRoughness.metallicRoughnessTexture.index, flip);
// get emissive texture
- LLPointer<LLImageRaw> emissive_img = LLTinyGLTFHelper::getTexture(folder, model_in, material_in.emissiveTexture.index);
+ LLPointer<LLImageRaw> emissive_img = LLTinyGLTFHelper::getTexture(folder, model_in, material_in.emissiveTexture.index, flip);
// get occlusion map if needed
LLPointer<LLImageRaw> occlusion_img;
if (material_in.occlusionTexture.index != material_in.pbrMetallicRoughness.metallicRoughnessTexture.index)
{
- occlusion_img = LLTinyGLTFHelper::getTexture(folder, model_in, material_in.occlusionTexture.index);
+ occlusion_img = LLTinyGLTFHelper::getTexture(folder, model_in, material_in.occlusionTexture.index, flip);
}
LLPointer<LLViewerFetchedTexture> base_color_tex;
@@ -282,7 +339,7 @@ bool LLTinyGLTFHelper::getMaterialFromModel(
if (base_color_tex)
{
- base_color_tex->addTextureStats(64.f * 64.f, TRUE);
+ base_color_tex->addTextureStats(64.f * 64.f, true);
material->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR] = base_color_tex->getID();
material->mBaseColorTexture = base_color_tex;
}
@@ -294,7 +351,7 @@ bool LLTinyGLTFHelper::getMaterialFromModel(
if (normal_tex)
{
- normal_tex->addTextureStats(64.f * 64.f, TRUE);
+ normal_tex->addTextureStats(64.f * 64.f, true);
material->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_NORMAL] = normal_tex->getID();
material->mNormalTexture = normal_tex;
}
@@ -306,7 +363,7 @@ bool LLTinyGLTFHelper::getMaterialFromModel(
if (mr_tex)
{
- mr_tex->addTextureStats(64.f * 64.f, TRUE);
+ mr_tex->addTextureStats(64.f * 64.f, true);
material->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_METALLIC_ROUGHNESS] = mr_tex->getID();
material->mMetallicRoughnessTexture = mr_tex;
}
@@ -318,7 +375,7 @@ bool LLTinyGLTFHelper::getMaterialFromModel(
if (emissive_tex)
{
- emissive_tex->addTextureStats(64.f * 64.f, TRUE);
+ emissive_tex->addTextureStats(64.f * 64.f, true);
material->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_EMISSIVE] = emissive_tex->getID();
material->mEmissiveTexture = emissive_tex;
}
diff --git a/indra/newview/lltinygltfhelper.h b/indra/newview/lltinygltfhelper.h
index 256f6c854f..a259609404 100644
--- a/indra/newview/lltinygltfhelper.h
+++ b/indra/newview/lltinygltfhelper.h
@@ -38,19 +38,19 @@ namespace LLTinyGLTFHelper
{
LLColor4 getColor(const std::vector<double>& in);
const tinygltf::Image* getImageFromTextureIndex(const tinygltf::Model& model, S32 texture_index);
- LLImageRaw* getTexture(const std::string& folder, const tinygltf::Model& model, S32 texture_index, std::string& name);
- LLImageRaw* getTexture(const std::string& folder, const tinygltf::Model& model, S32 texture_index);
-
- LLImageRaw* getTexture(const std::string& folder, const tinygltf::Model& model, S32 texture_index);
+ LLImageRaw* getTexture(const std::string& folder, const tinygltf::Model& model, S32 texture_index, std::string& name, bool flip = true);
+ LLImageRaw* getTexture(const std::string& folder, const tinygltf::Model& model, S32 texture_index, bool flip = true);
bool loadModel(const std::string& filename, tinygltf::Model& model_out);
+ bool saveModel(const std::string& filename, tinygltf::Model& model_in);
bool getMaterialFromModel(
const std::string& filename,
const tinygltf::Model& model,
S32 mat_index,
LLFetchedGLTFMaterial* material,
- std::string& material_name);
+ std::string& material_name,
+ bool flip = true);
void initFetchedTextures(tinygltf::Material& material,
LLPointer<LLImageRaw>& base_color_img,
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index 223aaad811..5cf2e89c63 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -44,13 +44,13 @@ LLToastLifeTimer::LLToastLifeTimer(LLToast* toast, F32 period)
}
/*virtual*/
-BOOL LLToastLifeTimer::tick()
+bool LLToastLifeTimer::tick()
{
if (mEventTimer.hasExpired())
{
mToast->expire();
}
- return FALSE;
+ return false;
}
void LLToastLifeTimer::stop()
@@ -68,7 +68,7 @@ void LLToastLifeTimer::restart()
mEventTimer.reset();
}
-BOOL LLToastLifeTimer::getStarted()
+bool LLToastLifeTimer::getStarted()
{
return mEventTimer.getStarted();
}
@@ -119,13 +119,13 @@ LLToast::LLToast(const LLToast::Params& p)
{
mTimer.reset(new LLToastLifeTimer(this, p.lifetime_secs));
- buildFromFile("panel_toast.xml");
+ buildFromFile("panel_toast.xml", true);
- setCanDrag(FALSE);
+ setCanDrag(false);
mWrapperPanel = getChild<LLPanel>("wrapper_panel");
- setBackgroundOpaque(TRUE); // *TODO: obsolete
+ setBackgroundOpaque(true); // *TODO: obsolete
updateTransparency();
if(p.panel())
@@ -151,7 +151,7 @@ LLToast::LLToast(const LLToast::Params& p)
}
}
-void LLToast::reshape(S32 width, S32 height, BOOL called_from_parent)
+void LLToast::reshape(S32 width, S32 height, bool called_from_parent)
{
// We shouldn't use reshape from LLModalDialog since it changes toasts position.
// Toasts position should be controlled only by toast screen channel, see LLScreenChannelBase.
@@ -160,14 +160,14 @@ void LLToast::reshape(S32 width, S32 height, BOOL called_from_parent)
}
//--------------------------------------------------------------------------
-BOOL LLToast::postBuild()
+bool LLToast::postBuild()
{
if(!mCanFade)
{
mTimer->stop();
}
- return TRUE;
+ return true;
}
//--------------------------------------------------------------------------
@@ -209,7 +209,7 @@ void LLToast::hide()
{
if (!mIsHidden)
{
- setVisible(FALSE);
+ setVisible(false);
setFading(false);
mTimer->stop();
mIsHidden = true;
@@ -218,7 +218,7 @@ void LLToast::hide()
}
/*virtual*/
-void LLToast::setFocus(BOOL b)
+void LLToast::setFocus(bool b)
{
if (b
&& !hasFocus()
@@ -226,9 +226,9 @@ void LLToast::setFocus(BOOL b)
&& mWrapperPanel
&& !mWrapperPanel->getChildList()->empty())
{
- LLModalDialog::setFocus(TRUE);
+ LLModalDialog::setFocus(true);
// mostly for buttons
- mPanel->setFocus(TRUE);
+ mPanel->setFocus(true);
}
else
{
@@ -391,7 +391,7 @@ void LLToast::draw()
}
//--------------------------------------------------------------------------
-void LLToast::setVisible(BOOL show)
+void LLToast::setVisible(bool show)
{
if(mIsHidden)
{
@@ -495,7 +495,7 @@ void LLToast::updateHoveredState()
sendChildToFront(mHideBtn);
if(mHideBtn && mHideBtn->getEnabled())
{
- mHideBtn->setVisible(TRUE);
+ mHideBtn->setVisible(true);
}
mToastMouseEnterSignal(this, getValue());
@@ -518,7 +518,7 @@ void LLToast::updateHoveredState()
mHideBtnPressed = false;
return;
}
- mHideBtn->setVisible(FALSE);
+ mHideBtn->setVisible(false);
}
mToastMouseLeaveSignal(this, getValue());
@@ -526,7 +526,7 @@ void LLToast::updateHoveredState()
}
}
-void LLToast::setBackgroundOpaque(BOOL b)
+void LLToast::setBackgroundOpaque(bool b)
{
if(mWrapperPanel && !isBackgroundVisible())
{
@@ -583,7 +583,7 @@ void LLNotificationsUI::LLToast::startTimer()
//--------------------------------------------------------------------------
-BOOL LLToast::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLToast::handleMouseDown(S32 x, S32 y, MASK mask)
{
if(mHideBtn && mHideBtn->getEnabled())
{
diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h
index ab559f1e6f..9c9b623faa 100644
--- a/indra/newview/lltoast.h
+++ b/indra/newview/lltoast.h
@@ -53,11 +53,11 @@ public:
LLToastLifeTimer(LLToast* toast, F32 period);
/*virtual*/
- BOOL tick();
+ bool tick();
void stop();
void start();
void restart();
- BOOL getStarted();
+ bool getStarted();
void setPeriod(F32 period);
F32 getRemainingTimeF32();
@@ -109,16 +109,16 @@ public:
static void updateClass();
static void cleanupToasts();
- static BOOL isAlertToastShown() { return sModalToastsList.size() > 0; }
+ static bool isAlertToastShown() { return sModalToastsList.size() > 0; }
LLToast(const LLToast::Params& p);
virtual ~LLToast();
- BOOL postBuild();
+ bool postBuild();
- /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+ /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true);
// Toast handlers
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask);
//Fading
@@ -147,13 +147,13 @@ public:
//
virtual void draw();
//
- virtual void setVisible(BOOL show);
+ virtual void setVisible(bool show);
- /*virtual*/ void setBackgroundOpaque(BOOL b);
+ /*virtual*/ void setBackgroundOpaque(bool b);
//
virtual void hide();
- /*virtual*/ void setFocus(BOOL b);
+ /*virtual*/ void setFocus(bool b);
/*virtual*/ void onFocusLost();
@@ -236,7 +236,7 @@ private:
bool mCanBeStored;
bool mHideBtnEnabled;
bool mHideBtnPressed;
- bool mIsHidden; // this flag is TRUE when a toast has faded or was hidden with (x) button (EXT-1849)
+ bool mIsHidden; // this flag is true when a toast has faded or was hidden with (x) button (EXT-1849)
bool mIsTip;
bool mIsFading;
bool mIsHovered;
diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp
index 8bf078477a..7be68fb300 100644
--- a/indra/newview/lltoastalertpanel.cpp
+++ b/indra/newview/lltoastalertpanel.cpp
@@ -91,8 +91,8 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
S32 edit_text_max_chars = 0;
bool is_password = false;
- LLToastPanel::setBackgroundVisible(FALSE);
- LLToastPanel::setBackgroundOpaque(TRUE);
+ LLToastPanel::setBackgroundVisible(false);
+ LLToastPanel::setBackgroundOpaque(true);
typedef std::vector<std::pair<std::string, std::string> > options_t;
@@ -247,7 +247,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
dialog_width += 32 + HPAD;
}
- LLToastPanel::reshape( dialog_width, dialog_height, FALSE );
+ LLToastPanel::reshape( dialog_width, dialog_height, false );
S32 msg_y = LLToastPanel::getRect().getHeight() - VPAD;
S32 msg_x = HPAD;
@@ -369,7 +369,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
if( i == mDefaultOption )
{
- btn->setFocus(TRUE);
+ btn->setFocus(true);
}
}
button_left += ((mButtonData[i].mWidth == 0) ? button_width : mButtonData[i].mWidth) + BTN_HPAD;
@@ -378,11 +378,11 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
setCheckBoxes(HPAD, VPAD);
// *TODO: check necessity of this code
- //gFloaterView->adjustToFitScreen(this, FALSE);
+ //gFloaterView->adjustToFitScreen(this, false);
if (mLineEditor)
{
mLineEditor->selectAll();
- mLineEditor->setFocus(TRUE);
+ mLineEditor->setFocus(true);
}
if(mDefaultOption >= 0)
{
@@ -395,7 +395,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
LLTransientFloaterMgr::GLOBAL, this);
}
-void LLToastAlertPanel::setVisible( BOOL visible )
+void LLToastAlertPanel::setVisible( bool visible )
{
// only make the "ding" sound if it's newly visible
if( visible && !LLToastPanel::getVisible() )
@@ -428,16 +428,16 @@ LLToastAlertPanel::~LLToastAlertPanel()
if (current_selection)
{
// If the focus moved to some other view though, move the focus there
- current_selection->setFocus(TRUE);
+ current_selection->setFocus(true);
}
else
{
- mPreviouslyFocusedView.get()->setFocus(TRUE);
+ mPreviouslyFocusedView.get()->setFocus(true);
}
}
}
-BOOL LLToastAlertPanel::hasTitleBar() const
+bool LLToastAlertPanel::hasTitleBar() const
{
// *TODO: check necessity of this code
/*
@@ -448,7 +448,7 @@ BOOL LLToastAlertPanel::hasTitleBar() const
return false;
}
-BOOL LLToastAlertPanel::handleKeyHere(KEY key, MASK mask )
+bool LLToastAlertPanel::handleKeyHere(KEY key, MASK mask )
{
if( KEY_RETURN == key && mask == MASK_NONE )
{
@@ -458,31 +458,31 @@ BOOL LLToastAlertPanel::handleKeyHere(KEY key, MASK mask )
// If we have a default button, click it when return is pressed
defaultBtn->onCommit();
}
- return TRUE;
+ return true;
}
else if (KEY_RIGHT == key)
{
- LLToastPanel::focusNextItem(FALSE);
- return TRUE;
+ LLToastPanel::focusNextItem(false);
+ return true;
}
else if (KEY_LEFT == key)
{
- LLToastPanel::focusPrevItem(FALSE);
- return TRUE;
+ LLToastPanel::focusPrevItem(false);
+ return true;
}
else if (KEY_TAB == key && mask == MASK_NONE)
{
- LLToastPanel::focusNextItem(FALSE);
- return TRUE;
+ LLToastPanel::focusNextItem(false);
+ return true;
}
else if (KEY_TAB == key && mask == MASK_SHIFT)
{
- LLToastPanel::focusPrevItem(FALSE);
- return TRUE;
+ LLToastPanel::focusPrevItem(false);
+ return true;
}
else
{
- return TRUE;
+ return true;
}
}
diff --git a/indra/newview/lltoastalertpanel.h b/indra/newview/lltoastalertpanel.h
index bd34e40642..458d9b422e 100644
--- a/indra/newview/lltoastalertpanel.h
+++ b/indra/newview/lltoastalertpanel.h
@@ -56,14 +56,14 @@ public:
// User's responsibility to call show() after creating these.
LLToastAlertPanel( LLNotificationPtr notep, bool is_modal );
- virtual BOOL handleKeyHere(KEY key, MASK mask );
+ virtual bool handleKeyHere(KEY key, MASK mask );
virtual void draw();
- virtual void setVisible( BOOL visible );
+ virtual void setVisible( bool visible );
- void setCaution(BOOL val = TRUE) { mCaution = val; }
- // If mUnique==TRUE only one copy of this message should exist
- void setUnique(BOOL val = TRUE) { mUnique = val; }
+ void setCaution(bool val = true) { mCaution = val; }
+ // If mUnique==true only one copy of this message should exist
+ void setUnique(bool val = true) { mUnique = val; }
void setEditTextArgs(const LLSD& edit_args);
void onButtonPressed(const LLSD& data, S32 button);
@@ -75,7 +75,7 @@ private:
// No you can't kill it. It can only kill itself.
// Does it have a readable title label, or minimize or close buttons?
- BOOL hasTitleBar() const;
+ bool hasTitleBar() const;
private:
static LLControlGroup* sSettings;
@@ -94,8 +94,8 @@ private:
std::vector<ButtonData> mButtonData;
S32 mDefaultOption;
- BOOL mCaution;
- BOOL mUnique;
+ bool mCaution;
+ bool mUnique;
LLUIString mLabel;
LLFrameTimer mDefaultBtnTimer;
// For Dialogs that take a line as text as input:
diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp
index 817d1dd7b4..047aa5192c 100644
--- a/indra/newview/lltoastgroupnotifypanel.cpp
+++ b/indra/newview/lltoastgroupnotifypanel.cpp
@@ -64,7 +64,7 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(const LLNotificationPtr& notifi
}
//group icon
- LLGroupIconCtrl* pGroupIcon = getChild<LLGroupIconCtrl>("group_icon", TRUE);
+ LLGroupIconCtrl* pGroupIcon = getChild<LLGroupIconCtrl>("group_icon", true);
// We should already have this data preloaded, so no sense in setting icon through setValue(group_id)
pGroupIcon->setIconId(groupData.mInsigniaID);
@@ -106,23 +106,23 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(const LLNotificationPtr& notifi
LLFontGL* subject_font = LLFontGL::getFontByName(getString("subject_font"));
if (subject_font)
style.font = subject_font;
- pMessageText->appendText(subject, FALSE, style);
+ pMessageText->appendText(subject, false, style);
LLFontGL* date_font = LLFontGL::getFontByName(getString("date_font"));
if (date_font)
style.font = date_font;
- pMessageText->appendText(timeStr + "\n", TRUE, style);
+ pMessageText->appendText(timeStr + "\n", true, style);
style.font = pMessageText->getFont();
- pMessageText->appendText(message, TRUE, style);
+ pMessageText->appendText(message, true, style);
//attachment
- BOOL hasInventory = payload["inventory_offer"].isDefined();
+ bool hasInventory = payload["inventory_offer"].isDefined();
//attachment text
LLTextBox * pAttachLink = getChild<LLTextBox>("attachment");
//attachment icon
- LLIconCtrl* pAttachIcon = getChild<LLIconCtrl>("attachment_icon", TRUE);
+ LLIconCtrl* pAttachIcon = getChild<LLIconCtrl>("attachment_icon", true);
//If attachment is empty let it be invisible and not take place at the panel
pAttachLink->setVisible(hasInventory);
@@ -190,8 +190,8 @@ void LLToastGroupNotifyPanel::onClickAttachment()
pAttachLink->setColor(textColor);
LLIconCtrl* pAttachIcon =
- getChild<LLIconCtrl> ("attachment_icon", TRUE);
- pAttachIcon->setEnabled(FALSE);
+ getChild<LLIconCtrl> ("attachment_icon", true);
+ pAttachIcon->setEnabled(false);
//if attachment isn't openable - notify about saving
if (!isAttachmentOpenable(mInventoryOffer->mType)) {
diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp
index c4c4b13a2f..e4f4a94bf1 100644
--- a/indra/newview/lltoastimpanel.cpp
+++ b/indra/newview/lltoastimpanel.cpp
@@ -76,10 +76,10 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif
mMessage->clear();
style_params.font.style ="ITALIC";
- mMessage->appendText(p.from, FALSE, style_params);
+ mMessage->appendText(p.from, false, style_params);
style_params.font.style = "ITALIC";
- mMessage->appendText(p.message.substr(3), FALSE, style_params);
+ mMessage->appendText(p.message.substr(3), false, style_params);
}
else
{
@@ -117,18 +117,18 @@ LLToastIMPanel::~LLToastIMPanel()
}
//virtual
-BOOL LLToastIMPanel::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLToastIMPanel::handleMouseUp(S32 x, S32 y, MASK mask)
{
- if (LLPanel::handleMouseUp(x,y,mask) == FALSE)
+ if (LLPanel::handleMouseUp(x,y,mask) == false)
{
mNotification->respond(mNotification->getResponseTemplate());
}
- return TRUE;
+ return true;
}
//virtual
-BOOL LLToastIMPanel::handleToolTip(S32 x, S32 y, MASK mask)
+bool LLToastIMPanel::handleToolTip(S32 x, S32 y, MASK mask)
{
// It's not our direct child, so parentPointInView() doesn't work.
LLRect ctrl_rect;
@@ -137,14 +137,14 @@ BOOL LLToastIMPanel::handleToolTip(S32 x, S32 y, MASK mask)
if (ctrl_rect.pointInRect(x, y))
{
spawnNameToolTip();
- return TRUE;
+ return true;
}
mGroupIcon->localRectToOtherView(mGroupIcon->getLocalRect(), &ctrl_rect, this);
if(mGroupIcon->getVisible() && ctrl_rect.pointInRect(x, y))
{
spawnGroupIconToolTip();
- return TRUE;
+ return true;
}
return LLToastPanel::handleToolTip(x, y, mask);
@@ -162,11 +162,11 @@ void LLToastIMPanel::spawnNameToolTip()
params.background_visible(false);
if(!mIsGroupMsg)
{
- params.click_callback(boost::bind(&LLFloaterReg::showInstance, "inspect_avatar", LLSD().with("avatar_id", mAvatarID), FALSE));
+ params.click_callback(boost::bind(&LLFloaterReg::showInstance, "inspect_avatar", LLSD().with("avatar_id", mAvatarID), false));
}
else
{
- params.click_callback(boost::bind(&LLFloaterReg::showInstance, "inspect_group", LLSD().with("group_id", mSessionID), FALSE));
+ params.click_callback(boost::bind(&LLFloaterReg::showInstance, "inspect_group", LLSD().with("group_id", mSessionID), false));
}
params.delay_time(0.0f); // spawn instantly on hover
params.image(LLUI::getUIImage("Info_Small"));
@@ -192,7 +192,7 @@ void LLToastIMPanel::spawnGroupIconToolTip()
LLInspector::Params params;
params.fillFrom(LLUICtrlFactory::instance().getDefaultParams<LLInspector>());
- params.click_callback(boost::bind(&LLFloaterReg::showInstance, "inspect_group", LLSD().with("group_id", mSessionID), FALSE));
+ params.click_callback(boost::bind(&LLFloaterReg::showInstance, "inspect_group", LLSD().with("group_id", mSessionID), false));
params.delay_time(0.100f);
params.image(LLUI::getUIImage("Info_Small"));
params.message(g_data.mName);
@@ -205,9 +205,9 @@ void LLToastIMPanel::spawnGroupIconToolTip()
void LLToastIMPanel::initIcon()
{
- mAvatarIcon->setVisible(FALSE);
- mGroupIcon->setVisible(FALSE);
- mAdhocIcon->setVisible(FALSE);
+ mAvatarIcon->setVisible(false);
+ mGroupIcon->setVisible(false);
+ mAdhocIcon->setVisible(false);
if(mAvatarName->getValue().asString() == SYSTEM_FROM)
{
@@ -227,15 +227,15 @@ void LLToastIMPanel::initIcon()
switch(im_session->mSessionType)
{
case LLIMModel::LLIMSession::P2P_SESSION:
- mAvatarIcon->setVisible(TRUE);
+ mAvatarIcon->setVisible(true);
mAvatarIcon->setValue(mAvatarID);
break;
case LLIMModel::LLIMSession::GROUP_SESSION:
- mGroupIcon->setVisible(TRUE);
+ mGroupIcon->setVisible(true);
mGroupIcon->setValue(mSessionID);
break;
case LLIMModel::LLIMSession::ADHOC_SESSION:
- mAdhocIcon->setVisible(TRUE);
+ mAdhocIcon->setVisible(true);
mAdhocIcon->setValue(im_session->mOtherParticipantID);
mAdhocIcon->setToolTip(im_session->mName);
break;
diff --git a/indra/newview/lltoastimpanel.h b/indra/newview/lltoastimpanel.h
index 767617dabc..1d95a12d1a 100644
--- a/indra/newview/lltoastimpanel.h
+++ b/indra/newview/lltoastimpanel.h
@@ -52,8 +52,8 @@ public:
LLToastIMPanel(LLToastIMPanel::Params &p);
virtual ~LLToastIMPanel();
- /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleToolTip(S32 x, S32 y, MASK mask);
private:
void showInspector();
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp
index bf3f4c1e88..f7bebf08aa 100644
--- a/indra/newview/lltoastnotifypanel.cpp
+++ b/indra/newview/lltoastnotifypanel.cpp
@@ -65,7 +65,7 @@ void LLToastNotifyPanel::addDefaultButton()
{
LLSD form_element;
form_element.with("name", "OK").with("text", LLTrans::getString("ok")).with("default", true);
- LLButton* ok_btn = createButton(form_element, FALSE);
+ LLButton* ok_btn = createButton(form_element, false);
LLRect new_btn_rect(ok_btn->getRect());
new_btn_rect.setOriginAndSize(llabs(getRect().getWidth() - BUTTON_WIDTH)/ 2, BOTTOM_PAD,
@@ -76,7 +76,7 @@ void LLToastNotifyPanel::addDefaultButton()
mNumButtons = 1;
mAddedDefaultBtn = true;
}
-LLButton* LLToastNotifyPanel::createButton(const LLSD& form_element, BOOL is_option)
+LLButton* LLToastNotifyPanel::createButton(const LLSD& form_element, bool is_option)
{
InstanceAndS32* userdata = new InstanceAndS32;
userdata->mSelf = this;
@@ -219,7 +219,7 @@ void LLToastNotifyPanel::adjustPanelForScriptNotice(S32 button_panel_width, S32
void LLToastNotifyPanel::adjustPanelForTipNotice()
{
//we don't need display ControlPanel for tips because they doesn't contain any buttons.
- mControlPanel->setVisible(FALSE);
+ mControlPanel->setVisible(false);
reshape(getRect().getWidth(), mInfoPanel->getRect().getHeight());
if (mNotification->getPayload().has("respond_on_mousedown")
@@ -246,7 +246,7 @@ void LLToastNotifyPanel::onClickButton(void* data)
}
// disable all buttons
- self->mControlPanel->setEnabled(FALSE);
+ self->mControlPanel->setEnabled(false);
// this might repost notification with new form data/enabled buttons
self->mNotification->respond(response);
@@ -266,9 +266,9 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images )
LLRect current_rect = getRect();
setXMLFilename("");
- buildFromFile("panel_notification.xml");
+ buildFromFile("panel_notification.xml", true);
- if(rect != LLRect::null)
+ if (rect != LLRect::null)
{
this->setShape(rect);
}
@@ -325,7 +325,7 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images )
}
mTextBox->setMaxTextLength(LLToastPanel::MAX_TEXT_LENGTH);
- mTextBox->setVisible(TRUE);
+ mTextBox->setVisible(true);
mTextBox->setPlainText(!show_images);
mTextBox->setContentTrusted(is_content_trusted);
mTextBox->setValue(mNotification->getMessage());
@@ -356,7 +356,7 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images )
// a textbox pretending to be a button.
continue;
}
- LLButton* new_button = createButton(form_element, TRUE);
+ LLButton* new_button = createButton(form_element, true);
buttons_width += new_button->getRect().getWidth();
S32 index = form_element["index"].asInteger();
buttons.push_back(index_button_pair_t(index,new_button));
@@ -474,7 +474,7 @@ LLIMToastNotifyPanel::~LLIMToastNotifyPanel()
{
}
-void LLIMToastNotifyPanel::reshape(S32 width, S32 height, BOOL called_from_parent /* = TRUE */)
+void LLIMToastNotifyPanel::reshape(S32 width, S32 height, bool called_from_parent /* = true */)
{
LLToastPanel::reshape(width, height, called_from_parent);
snapToMessageHeight();
diff --git a/indra/newview/lltoastnotifypanel.h b/indra/newview/lltoastnotifypanel.h
index a5a637c6fa..3593022a7d 100644
--- a/indra/newview/lltoastnotifypanel.h
+++ b/indra/newview/lltoastnotifypanel.h
@@ -72,7 +72,7 @@ public:
bool isControlPanelEnabled() const;
protected:
- LLButton* createButton(const LLSD& form_element, BOOL is_option);
+ LLButton* createButton(const LLSD& form_element, bool is_option);
// Used for callbacks
struct InstanceAndS32
@@ -154,7 +154,7 @@ public:
~LLIMToastNotifyPanel();
- /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+ /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true);
protected:
LLTextBase* mParentText;
diff --git a/indra/newview/lltoastpanel.cpp b/indra/newview/lltoastpanel.cpp
index d43da93c61..28e7ce43d8 100644
--- a/indra/newview/lltoastpanel.cpp
+++ b/indra/newview/lltoastpanel.cpp
@@ -219,7 +219,7 @@ bool LLCheckBoxToastPanel::setCheckBox(const std::string& check_title,
dialog_height += LINE_HEIGHT * lines.size();
dialog_height += LINE_HEIGHT / 2;
- LLToastPanel::reshape(dialog_width, dialog_height, FALSE);
+ LLToastPanel::reshape(dialog_width, dialog_height, false);
S32 msg_x = (LLToastPanel::getRect().getWidth() - max_msg_width) / 2;
@@ -246,7 +246,7 @@ bool LLCheckBoxToastPanel::setCheckBox(const std::string& check_title,
void LLCheckBoxToastPanel::onCommitCheckbox(LLUICtrl* ctrl)
{
- BOOL check = ctrl->getValue().asBoolean();
+ bool check = ctrl->getValue().asBoolean();
if (mNotification->getForm()->getIgnoreType() == LLNotificationForm::IGNORE_SHOW_AGAIN)
{
// question was "show again" so invert value to get "ignore"
diff --git a/indra/newview/lltoastscriptquestion.cpp b/indra/newview/lltoastscriptquestion.cpp
index 7a3a1d8fd7..49fbf885eb 100644
--- a/indra/newview/lltoastscriptquestion.cpp
+++ b/indra/newview/lltoastscriptquestion.cpp
@@ -37,10 +37,10 @@ LLToastScriptQuestion::LLToastScriptQuestion(const LLNotificationPtr& notificati
:
LLToastPanel(notification)
{
- buildFromFile("panel_script_question_toast.xml");
+ buildFromFile("panel_script_question_toast.xml", true);
}
-BOOL LLToastScriptQuestion::postBuild()
+bool LLToastScriptQuestion::postBuild()
{
createButtons();
@@ -52,11 +52,11 @@ BOOL LLToastScriptQuestion::postBuild()
snapToMessageHeight();
- return TRUE;
+ return true;
}
// virtual
-void LLToastScriptQuestion::setFocus(BOOL b)
+void LLToastScriptQuestion::setFocus(bool b)
{
LLToastPanel::setFocus(b);
// toast can fade out and disappear with focus ON, so reset to default anyway
@@ -134,7 +134,7 @@ void LLToastScriptQuestion::createButtons()
if (form_element.has("default") && form_element["default"].asBoolean())
{
- button->setFocus(TRUE);
+ button->setFocus(true);
setDefaultBtn(button);
}
}
diff --git a/indra/newview/lltoastscriptquestion.h b/indra/newview/lltoastscriptquestion.h
index a756f88415..34abc14df9 100644
--- a/indra/newview/lltoastscriptquestion.h
+++ b/indra/newview/lltoastscriptquestion.h
@@ -36,10 +36,10 @@ class LLToastScriptQuestion : public LLToastPanel
public:
LLToastScriptQuestion(const LLNotificationPtr& notification);
- virtual BOOL postBuild();
+ bool postBuild() override;
virtual ~LLToastScriptQuestion(){};
- /*virtual*/ void setFocus(BOOL b);
+ void setFocus(bool b) override;
private:
void snapToMessageHeight();
diff --git a/indra/newview/lltoastscripttextbox.cpp b/indra/newview/lltoastscripttextbox.cpp
index eb86a44055..b5f18f7502 100644
--- a/indra/newview/lltoastscripttextbox.cpp
+++ b/indra/newview/lltoastscripttextbox.cpp
@@ -58,7 +58,7 @@ LLToastScriptTextbox::LLToastScriptTextbox(const LLNotificationPtr& notification
LLStyle::Params style;
style.font = pMessageText->getFont();
- pMessageText->appendText(message, TRUE, style);
+ pMessageText->appendText(message, true, style);
//submit button
LLButton* pSubmitBtn = getChild<LLButton>("btn_submit");
diff --git a/indra/newview/lltool.cpp b/indra/newview/lltool.cpp
index 5235914c34..18dd695ec1 100644
--- a/indra/newview/lltool.cpp
+++ b/indra/newview/lltool.cpp
@@ -40,7 +40,7 @@
#include "llagent.h"
#include "llviewerjoystick.h"
-extern BOOL gDebugClicks;
+extern bool gDebugClicks;
//static
const std::string LLTool::sNameNull("null");
@@ -60,9 +60,9 @@ LLTool::~LLTool()
}
}
-BOOL LLTool::handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClickType clicktype, BOOL down)
+bool LLTool::handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClickType clicktype, bool down)
{
- BOOL result = LLMouseHandler::handleAnyMouseClick(x, y, mask, clicktype, down);
+ bool result = LLMouseHandler::handleAnyMouseClick(x, y, mask, clicktype, down);
// This behavior was moved here from LLViewerWindow::handleAnyMouseClick, so it can be selectively overridden by LLTool subclasses.
if(down && result)
@@ -76,7 +76,7 @@ BOOL LLTool::handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClickType clickt
return result;
}
-BOOL LLTool::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLTool::handleMouseDown(S32 x, S32 y, MASK mask)
{
if (gDebugClicks)
{
@@ -85,10 +85,10 @@ BOOL LLTool::handleMouseDown(S32 x, S32 y, MASK mask)
// by default, didn't handle it
// AGENT_CONTROL_LBUTTON_DOWN is handled by scanMouse() and scanKey()
// LL_INFOS() << "LLTool::handleMouseDown" << LL_ENDL;
- return FALSE;
+ return false;
}
-BOOL LLTool::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLTool::handleMouseUp(S32 x, S32 y, MASK mask)
{
if (gDebugClicks)
{
@@ -97,73 +97,73 @@ BOOL LLTool::handleMouseUp(S32 x, S32 y, MASK mask)
// by default, didn't handle it
// AGENT_CONTROL_LBUTTON_UP is handled by scanMouse() and scanKey()
// LL_INFOS() << "LLTool::handleMouseUp" << LL_ENDL;
- return TRUE;
+ return true;
}
-BOOL LLTool::handleHover(S32 x, S32 y, MASK mask)
+bool LLTool::handleHover(S32 x, S32 y, MASK mask)
{
gViewerWindow->setCursor(UI_CURSOR_ARROW);
LL_DEBUGS("UserInput") << "hover handled by a tool" << LL_ENDL;
// by default, do nothing, say we handled it
- return TRUE;
+ return true;
}
-BOOL LLTool::handleScrollWheel(S32 x, S32 y, S32 clicks)
+bool LLTool::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
// by default, didn't handle it
// LL_INFOS() << "LLTool::handleScrollWheel" << LL_ENDL;
- return FALSE;
+ return false;
}
-BOOL LLTool::handleScrollHWheel(S32 x, S32 y, S32 clicks)
+bool LLTool::handleScrollHWheel(S32 x, S32 y, S32 clicks)
{
// by default, didn't handle it
- return FALSE;
+ return false;
}
-BOOL LLTool::handleDoubleClick(S32 x,S32 y,MASK mask)
+bool LLTool::handleDoubleClick(S32 x,S32 y,MASK mask)
{
// LL_INFOS() << "LLTool::handleDoubleClick" << LL_ENDL;
// by default, pretend it's a left click
- return FALSE;
+ return false;
}
-BOOL LLTool::handleRightMouseDown(S32 x,S32 y,MASK mask)
+bool LLTool::handleRightMouseDown(S32 x,S32 y,MASK mask)
{
// by default, didn't handle it
// LL_INFOS() << "LLTool::handleRightMouseDown" << LL_ENDL;
- return FALSE;
+ return false;
}
-BOOL LLTool::handleRightMouseUp(S32 x, S32 y, MASK mask)
+bool LLTool::handleRightMouseUp(S32 x, S32 y, MASK mask)
{
// by default, didn't handle it
// LL_INFOS() << "LLTool::handleRightMouseDown" << LL_ENDL;
- return FALSE;
+ return false;
}
-BOOL LLTool::handleMiddleMouseDown(S32 x,S32 y,MASK mask)
+bool LLTool::handleMiddleMouseDown(S32 x,S32 y,MASK mask)
{
// by default, didn't handle it
// LL_INFOS() << "LLTool::handleMiddleMouseDown" << LL_ENDL;
- return FALSE;
+ return false;
}
-BOOL LLTool::handleMiddleMouseUp(S32 x, S32 y, MASK mask)
+bool LLTool::handleMiddleMouseUp(S32 x, S32 y, MASK mask)
{
// by default, didn't handle it
// LL_INFOS() << "LLTool::handleMiddleMouseUp" << LL_ENDL;
- return FALSE;
+ return false;
}
-BOOL LLTool::handleToolTip(S32 x, S32 y, MASK mask)
+bool LLTool::handleToolTip(S32 x, S32 y, MASK mask)
{
// by default, didn't handle it
// LL_INFOS() << "LLTool::handleToolTip" << LL_ENDL;
- return FALSE;
+ return false;
}
-void LLTool::setMouseCapture( BOOL b )
+void LLTool::setMouseCapture( bool b )
{
if( b )
{
@@ -180,14 +180,14 @@ void LLTool::setMouseCapture( BOOL b )
void LLTool::draw()
{ }
-BOOL LLTool::hasMouseCapture()
+bool LLTool::hasMouseCapture()
{
return gFocusMgr.getMouseCapture() == (mComposite ? mComposite : this);
}
-BOOL LLTool::handleKey(KEY key, MASK mask)
+bool LLTool::handleKey(KEY key, MASK mask)
{
- return FALSE;
+ return false;
}
LLTool* LLTool::getOverrideTool(MASK mask)
diff --git a/indra/newview/lltool.h b/indra/newview/lltool.h
index 41a38804ce..2e22bcfdb9 100644
--- a/indra/newview/lltool.h
+++ b/indra/newview/lltool.h
@@ -46,24 +46,24 @@ public:
virtual ~LLTool();
// Hack to support LLFocusMgr
- virtual BOOL isView() const { return FALSE; }
+ virtual bool isView() const { return false; }
// Virtual functions inherited from LLMouseHandler
- virtual BOOL handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClickType clicktype, BOOL down);
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- virtual BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask);
- virtual BOOL handleMiddleMouseUp(S32 x, S32 y, MASK mask);
-
- virtual BOOL handleHover(S32 x, S32 y, MASK mask);
- virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
- virtual BOOL handleScrollHWheel(S32 x, S32 y, S32 clicks);
- virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
- virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
- virtual BOOL handleRightMouseUp(S32 x, S32 y, MASK mask);
- virtual BOOL handleToolTip(S32 x, S32 y, MASK mask);
-
- // Return FALSE to allow context menu to be shown.
+ virtual bool handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClickType clicktype, bool down);
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask);
+ virtual bool handleMiddleMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleMiddleMouseUp(S32 x, S32 y, MASK mask);
+
+ virtual bool handleHover(S32 x, S32 y, MASK mask);
+ virtual bool handleScrollWheel(S32 x, S32 y, S32 clicks);
+ virtual bool handleScrollHWheel(S32 x, S32 y, S32 clicks);
+ virtual bool handleDoubleClick(S32 x, S32 y, MASK mask);
+ virtual bool handleRightMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleRightMouseUp(S32 x, S32 y, MASK mask);
+ virtual bool handleToolTip(S32 x, S32 y, MASK mask);
+
+ // Return false to allow context menu to be shown.
virtual void screenPointToLocal(S32 screen_x, S32 screen_y, S32* local_x, S32* local_y) const
{ *local_x = screen_x; *local_y = screen_y; }
virtual void localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const
@@ -74,10 +74,10 @@ public:
// New virtual functions
virtual LLViewerObject* getEditingObject() { return NULL; }
virtual LLVector3d getEditingPointGlobal() { return LLVector3d(); }
- virtual BOOL isEditing() { return (getEditingObject() != NULL); }
+ virtual bool isEditing() { return (getEditingObject() != NULL); }
virtual void stopEditing() {}
- virtual BOOL clipMouseWhenDown() { return TRUE; }
+ virtual bool clipMouseWhenDown() { return true; }
virtual void handleSelect() { } // do stuff when your tool is selected
virtual void handleDeselect() { } // clean up when your tool is deselected
@@ -86,16 +86,16 @@ public:
// isAlwaysRendered() - return true if this is a tool that should
// always be rendered regardless of selection.
- virtual BOOL isAlwaysRendered() { return FALSE; }
+ virtual bool isAlwaysRendered() { return false; }
virtual void render() {} // draw tool specific 3D content in world
virtual void draw(); // draw tool specific 2D overlay
- virtual BOOL handleKey(KEY key, MASK mask);
+ virtual bool handleKey(KEY key, MASK mask);
// Note: NOT virtual. Subclasses should call this version.
- void setMouseCapture(BOOL b);
- BOOL hasMouseCapture();
+ void setMouseCapture(bool b);
+ bool hasMouseCapture();
virtual void onMouseCaptureLost() {} // override this one as needed.
protected:
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index 9157d20f98..75ea1046a9 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -93,7 +93,7 @@ LLToolBarView::~LLToolBarView()
saveToolbars();
}
-BOOL LLToolBarView::postBuild()
+bool LLToolBarView::postBuild()
{
mToolbars[LLToolBarEnums::TOOLBAR_LEFT] = getChild<LLToolBar>("toolbar_left");
mToolbars[LLToolBarEnums::TOOLBAR_LEFT]->getCenterLayoutPanel()->setLocationId(LLToolBarEnums::TOOLBAR_LEFT);
@@ -115,7 +115,7 @@ BOOL LLToolBarView::postBuild()
mToolbars[i]->setButtonRemoveCallback(boost::bind(LLToolBarView::onToolBarButtonRemoved,_1));
}
- return TRUE;
+ return true;
}
S32 LLToolBarView::hasCommand(const LLCommandId& commandId) const
@@ -570,7 +570,7 @@ void LLToolBarView::draw()
for (S32 i = LLToolBarEnums::TOOLBAR_FIRST; i <= LLToolBarEnums::TOOLBAR_LAST; i++)
{
- gl_rect_2d(toolbar_rects[i], drop_color, TRUE);
+ gl_rect_2d(toolbar_rects[i], drop_color, true);
}
}
@@ -591,7 +591,7 @@ void LLToolBarView::startDragTool(S32 x, S32 y, LLToolBarButton* toolbarButton)
LLToolDragAndDrop::getInstance()->setDragStart( x, y );
}
-BOOL LLToolBarView::handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type)
+bool LLToolBarView::handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type)
{
if (LLToolDragAndDrop::getInstance()->isOverThreshold( x, y ))
{
@@ -613,7 +613,7 @@ BOOL LLToolBarView::handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetTyp
gToolBarView->stopCommandInProgress(command_id);
gToolBarView->mDragStarted = true;
- return TRUE;
+ return true;
}
else
{
@@ -621,18 +621,18 @@ BOOL LLToolBarView::handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetTyp
return LLToolDragAndDrop::getInstance()->handleHover( x, y, mask );
}
}
- return FALSE;
+ return false;
}
-BOOL LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* toolbar)
+bool LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* toolbar)
{
- BOOL handled = FALSE;
+ bool handled = false;
LLInventoryObject* inv_item = static_cast<LLInventoryObject*>(cargo_data);
LLAssetType::EType type = inv_item->getType();
if (type == LLAssetType::AT_WIDGET)
{
- handled = TRUE;
+ handled = true;
// Get the command from its uuid
LLCommandManager& mgr = LLCommandManager::instance();
LLCommandId command_id(inv_item->getUUID());
diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h
index a230c2fdee..aa306c64d4 100644
--- a/indra/newview/lltoolbarview.h
+++ b/indra/newview/lltoolbarview.h
@@ -67,8 +67,8 @@ public:
// Derived methods
virtual ~LLToolBarView();
- virtual BOOL postBuild();
- virtual void draw();
+ bool postBuild() override;
+ void draw() override;
// Toolbar view interface with the rest of the world
// Checks if the commandId is being used somewhere in one of the toolbars, returns LLToolBarEnums::EToolBarLocation
@@ -91,8 +91,8 @@ public:
static bool clearAllToolbars();
static void startDragTool(S32 x, S32 y, LLToolBarButton* toolbarButton);
- static BOOL handleDragTool(S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type);
- static BOOL handleDropTool(void* cargo_data, S32 x, S32 y, LLToolBar* toolbar);
+ static bool handleDragTool(S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type);
+ static bool handleDropTool(void* cargo_data, S32 x, S32 y, LLToolBar* toolbar);
static void resetDragTool(LLToolBarButton* toolbarButton);
LLInventoryObject* getDragItem();
LLView* getBottomToolbar() { return mBottomToolbarPanel; }
diff --git a/indra/newview/lltoolbrush.cpp b/indra/newview/lltoolbrush.cpp
index 0a0bfaf58b..19eb8b8d58 100644
--- a/indra/newview/lltoolbrush.cpp
+++ b/indra/newview/lltoolbrush.cpp
@@ -88,8 +88,8 @@ LLToolBrushLand::LLToolBrushLand()
mStartingZ( 0.0f ),
mMouseX( 0 ),
mMouseY(0),
- mGotHover(FALSE),
- mBrushSelected(FALSE)
+ mGotHover(false),
+ mBrushSelected(false)
{
mBrushSize = gSavedSettings.getF32("LandBrushSize");
}
@@ -122,7 +122,7 @@ void LLToolBrushLand::modifyLandAtPointGlobal(const LLVector3d &pos_global,
iter != mLastAffectedRegions.end(); ++iter)
{
LLViewerRegion* regionp = *iter;
- //BOOL is_changed = FALSE;
+ //bool is_changed = false;
LLVector3 pos_region = regionp->getPosRegionFromGlobal(pos_global);
LLSurface &land = regionp->getLand();
char action = E_LAND_LEVEL;
@@ -249,7 +249,7 @@ void LLToolBrushLand::modifyLandInSelectionGlobal()
iter != mLastAffectedRegions.end(); ++iter)
{
LLViewerRegion* regionp = *iter;
- //BOOL is_changed = FALSE;
+ //bool is_changed = false;
LLVector3 min_region = regionp->getPosRegionFromGlobal(min);
LLVector3 max_region = regionp->getPosRegionFromGlobal(max);
@@ -318,7 +318,7 @@ void LLToolBrushLand::modifyLandInSelectionGlobal()
msg->addF32Fast(_PREHASH_Seconds, seconds);
msg->addF32Fast(_PREHASH_Height, mStartingZ);
- BOOL parcel_selected = LLViewerParcelMgr::getInstance()->getParcelSelection()->getWholeParcelSelected();
+ bool parcel_selected = LLViewerParcelMgr::getInstance()->getParcelSelection()->getWholeParcelSelected();
LLParcel* selected_parcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel();
if (parcel_selected && selected_parcel)
@@ -356,13 +356,13 @@ void LLToolBrushLand::brush( void )
spot.mdV[VX] = floor( spot.mdV[VX] + 0.5 );
spot.mdV[VY] = floor( spot.mdV[VY] + 0.5 );
- modifyLandAtPointGlobal(spot, gKeyboard->currentMask(TRUE));
+ modifyLandAtPointGlobal(spot, gKeyboard->currentMask(true));
}
}
-BOOL LLToolBrushLand::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLToolBrushLand::handleMouseDown(S32 x, S32 y, MASK mask)
{
- BOOL handled = FALSE;
+ bool handled = false;
// Find the z value of the initial click.
LLVector3d spot;
@@ -378,7 +378,7 @@ BOOL LLToolBrushLand::handleMouseDown(S32 x, S32 y, MASK mask)
if (!canTerraformRegion(regionp))
{
alertNoTerraformRegion(regionp);
- return TRUE;
+ return true;
}
if (!canTerraformParcel(regionp))
@@ -394,23 +394,23 @@ BOOL LLToolBrushLand::handleMouseDown(S32 x, S32 y, MASK mask)
mMouseX = x;
mMouseY = y;
gIdleCallbacks.addFunction( &LLToolBrushLand::onIdle, (void*)this );
- setMouseCapture( TRUE );
+ setMouseCapture( true );
- LLViewerParcelMgr::getInstance()->setSelectionVisible(FALSE);
- handled = TRUE;
+ LLViewerParcelMgr::getInstance()->setSelectionVisible(false);
+ handled = true;
}
return handled;
}
-BOOL LLToolBrushLand::handleHover( S32 x, S32 y, MASK mask )
+bool LLToolBrushLand::handleHover( S32 x, S32 y, MASK mask )
{
LL_DEBUGS("UserInput") << "hover handled by LLToolBrushLand ("
<< (hasMouseCapture() ? "active":"inactive")
<< ")" << LL_ENDL;
mMouseX = x;
mMouseY = y;
- mGotHover = TRUE;
+ mGotHover = true;
gViewerWindow->setCursor(UI_CURSOR_TOOLLAND);
LLVector3d spot;
@@ -422,22 +422,22 @@ BOOL LLToolBrushLand::handleHover( S32 x, S32 y, MASK mask )
LLViewerParcelMgr::getInstance()->setHoverParcel(spot);
}
- return TRUE;
+ return true;
}
-BOOL LLToolBrushLand::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLToolBrushLand::handleMouseUp(S32 x, S32 y, MASK mask)
{
- BOOL handled = FALSE;
+ bool handled = false;
mLastAffectedRegions.clear();
if( hasMouseCapture() )
{
// Release the mouse
- setMouseCapture( FALSE );
+ setMouseCapture( false );
- LLViewerParcelMgr::getInstance()->setSelectionVisible(TRUE);
+ LLViewerParcelMgr::getInstance()->setSelectionVisible(true);
gIdleCallbacks.deleteFunction( &LLToolBrushLand::onIdle, (void*)this );
- handled = TRUE;
+ handled = true;
}
return handled;
@@ -450,7 +450,7 @@ void LLToolBrushLand::handleSelect()
gFloaterTools->setStatusText("modifyland");
// if (!mBrushSelected)
{
- mBrushSelected = TRUE;
+ mBrushSelected = true;
}
}
@@ -461,8 +461,8 @@ void LLToolBrushLand::handleDeselect()
{
gEditMenuHandler = NULL;
}
- LLViewerParcelMgr::getInstance()->setSelectionVisible(TRUE);
- mBrushSelected = FALSE;
+ LLViewerParcelMgr::getInstance()->setSelectionVisible(true);
+ mBrushSelected = false;
}
// Draw the area that will be affected.
@@ -493,7 +493,7 @@ void LLToolBrushLand::render()
pos_world);
}
}
- mGotHover = FALSE;
+ mGotHover = false;
}
}
@@ -681,7 +681,7 @@ bool LLToolBrushLand::canTerraformParcel(LLViewerRegion* regionp) const
bool is_terraform_allowed = false;
if (selected_parcel)
{
- BOOL owner_release = LLViewerParcelMgr::isParcelOwnedByAgent(selected_parcel, GP_LAND_ALLOW_EDIT_LAND);
+ bool owner_release = LLViewerParcelMgr::isParcelOwnedByAgent(selected_parcel, GP_LAND_ALLOW_EDIT_LAND);
is_terraform_allowed = ( gAgent.canManageEstate() || (selected_parcel->getOwnerID() == regionp->getOwner()) || owner_release);
}
diff --git a/indra/newview/lltoolbrush.h b/indra/newview/lltoolbrush.h
index 6545ee3611..c4f7c50ecb 100644
--- a/indra/newview/lltoolbrush.h
+++ b/indra/newview/lltoolbrush.h
@@ -49,15 +49,15 @@ class LLToolBrushLand : public LLTool, public LLEditMenuHandler, public LLSingle
public:
// x,y in window coords, 0,0 = left,bot
- virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask ) override;
- virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask ) override;
- virtual BOOL handleHover( S32 x, S32 y, MASK mask ) override;
+ virtual bool handleMouseDown( S32 x, S32 y, MASK mask ) override;
+ virtual bool handleMouseUp( S32 x, S32 y, MASK mask ) override;
+ virtual bool handleHover( S32 x, S32 y, MASK mask ) override;
virtual void handleSelect() override;
virtual void handleDeselect() override;
// isAlwaysRendered() - return true if this is a tool that should
// always be rendered regardless of selection.
- virtual BOOL isAlwaysRendered() override { return TRUE; }
+ virtual bool isAlwaysRendered() override { return true; }
// Draw the area that will be affected.
virtual void render() override;
@@ -69,7 +69,7 @@ public:
void modifyLandInSelectionGlobal();
virtual void undo() override;
- virtual BOOL canUndo() const override { return TRUE; }
+ virtual bool canUndo() const override { return true; }
protected:
void brush( void );
@@ -95,8 +95,8 @@ protected:
S32 mMouseX;
S32 mMouseY;
F32 mBrushSize;
- BOOL mGotHover;
- BOOL mBrushSelected;
+ bool mGotHover;
+ bool mBrushSelected;
// Order doesn't matter and we do check for existance of regions, so use a set
region_list_t mLastAffectedRegions;
diff --git a/indra/newview/lltoolcomp.cpp b/indra/newview/lltoolcomp.cpp
index aaf2bacc7b..999b16ad22 100644
--- a/indra/newview/lltoolcomp.cpp
+++ b/indra/newview/lltoolcomp.cpp
@@ -83,15 +83,15 @@ LLToolComposite::LLToolComposite(const std::string& name)
: LLTool(name),
mCur(sNullTool),
mDefault(sNullTool),
- mSelected(FALSE),
- mMouseDown(FALSE), mManip(NULL), mSelectRect(NULL)
+ mSelected(false),
+ mMouseDown(false), mManip(NULL), mSelectRect(NULL)
{
}
// Returns to the default tool
-BOOL LLToolComposite::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLToolComposite::handleMouseUp(S32 x, S32 y, MASK mask)
{
- BOOL handled = mCur->handleMouseUp( x, y, mask );
+ bool handled = mCur->handleMouseUp( x, y, mask );
if( handled )
{
setCurrentTool( mDefault );
@@ -105,7 +105,7 @@ void LLToolComposite::onMouseCaptureLost()
setCurrentTool( mDefault );
}
-BOOL LLToolComposite::isSelecting()
+bool LLToolComposite::isSelecting()
{
return mCur == mSelectRect;
}
@@ -118,14 +118,14 @@ void LLToolComposite::handleSelect()
}
mCur = mDefault;
mCur->handleSelect();
- mSelected = TRUE;
+ mSelected = true;
}
void LLToolComposite::handleDeselect()
{
mCur->handleDeselect();
mCur = mDefault;
- mSelected = FALSE;
+ mSelected = false;
}
//----------------------------------------------------------------------------
@@ -134,7 +134,7 @@ void LLToolComposite::handleDeselect()
LLToolCompInspect::LLToolCompInspect()
: LLToolComposite(std::string("Inspect")),
- mIsToolCameraActive(FALSE)
+ mIsToolCameraActive(false)
{
mSelectRect = new LLToolSelectRect(this);
mDefault = mSelectRect;
@@ -147,9 +147,9 @@ LLToolCompInspect::~LLToolCompInspect()
mSelectRect = NULL;
}
-BOOL LLToolCompInspect::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLToolCompInspect::handleMouseDown(S32 x, S32 y, MASK mask)
{
- BOOL handled = FALSE;
+ bool handled = false;
if (mCur == LLToolCamera::getInstance())
{
@@ -157,17 +157,17 @@ BOOL LLToolCompInspect::handleMouseDown(S32 x, S32 y, MASK mask)
}
else
{
- mMouseDown = TRUE;
+ mMouseDown = true;
gViewerWindow->pickAsync(x, y, mask, pickCallback);
- handled = TRUE;
+ handled = true;
}
return handled;
}
-BOOL LLToolCompInspect::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLToolCompInspect::handleMouseUp(S32 x, S32 y, MASK mask)
{
- BOOL handled = LLToolComposite::handleMouseUp(x, y, mask);
+ bool handled = LLToolComposite::handleMouseUp(x, y, mask);
mIsToolCameraActive = getCurrentTool() == LLToolCamera::getInstance();
return handled;
}
@@ -180,7 +180,7 @@ void LLToolCompInspect::pickCallback(const LLPickInfo& pick_info)
if (!tool_inspectp->mMouseDown)
{
// fast click on object, but mouse is already up...just do select
- tool_inspectp->mSelectRect->handleObjectSelection(pick_info, gSavedSettings.getBOOL("EditLinkedParts"), FALSE);
+ tool_inspectp->mSelectRect->handleObjectSelection(pick_info, gSavedSettings.getBOOL("EditLinkedParts"), false);
return;
}
@@ -190,24 +190,24 @@ void LLToolCompInspect::pickCallback(const LLPickInfo& pick_info)
}
tool_inspectp->setCurrentTool( tool_inspectp->mSelectRect );
- tool_inspectp->mIsToolCameraActive = FALSE;
+ tool_inspectp->mIsToolCameraActive = false;
tool_inspectp->mSelectRect->handlePick( pick_info );
}
-BOOL LLToolCompInspect::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLToolCompInspect::handleDoubleClick(S32 x, S32 y, MASK mask)
{
- return TRUE;
+ return true;
}
-BOOL LLToolCompInspect::handleKey(KEY key, MASK mask)
+bool LLToolCompInspect::handleKey(KEY key, MASK mask)
{
- BOOL handled = FALSE;
+ bool handled = false;
if(KEY_ALT == key)
{
setCurrentTool(LLToolCamera::getInstance());
- mIsToolCameraActive = TRUE;
- handled = TRUE;
+ mIsToolCameraActive = true;
+ handled = true;
}
else
{
@@ -220,7 +220,7 @@ BOOL LLToolCompInspect::handleKey(KEY key, MASK mask)
void LLToolCompInspect::onMouseCaptureLost()
{
LLToolComposite::onMouseCaptureLost();
- mIsToolCameraActive = FALSE;
+ mIsToolCameraActive = false;
}
void LLToolCompInspect::keyUp(KEY key, MASK mask)
@@ -228,7 +228,7 @@ void LLToolCompInspect::keyUp(KEY key, MASK mask)
if (KEY_ALT == key && mCur == LLToolCamera::getInstance())
{
setCurrentTool(mDefault);
- mIsToolCameraActive = FALSE;
+ mIsToolCameraActive = false;
}
}
@@ -255,7 +255,7 @@ LLToolCompTranslate::~LLToolCompTranslate()
mSelectRect = NULL;
}
-BOOL LLToolCompTranslate::handleHover(S32 x, S32 y, MASK mask)
+bool LLToolCompTranslate::handleHover(S32 x, S32 y, MASK mask)
{
if( !mCur->hasMouseCapture() )
{
@@ -265,12 +265,12 @@ BOOL LLToolCompTranslate::handleHover(S32 x, S32 y, MASK mask)
}
-BOOL LLToolCompTranslate::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLToolCompTranslate::handleMouseDown(S32 x, S32 y, MASK mask)
{
- mMouseDown = TRUE;
- gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ FALSE, LLFloaterReg::instanceVisible("build"), FALSE,
+ mMouseDown = true;
+ gViewerWindow->pickAsync(x, y, mask, pickCallback, /*bool pick_transparent*/ false, LLFloaterReg::instanceVisible("build"), false,
gSavedSettings.getBOOL("SelectReflectionProbes"));;
- return TRUE;
+ return true;
}
void LLToolCompTranslate::pickCallback(const LLPickInfo& pick_info)
@@ -281,7 +281,7 @@ void LLToolCompTranslate::pickCallback(const LLPickInfo& pick_info)
if (!LLToolCompTranslate::getInstance()->mMouseDown)
{
// fast click on object, but mouse is already up...just do select
- LLToolCompTranslate::getInstance()->mSelectRect->handleObjectSelection(pick_info, gSavedSettings.getBOOL("EditLinkedParts"), FALSE);
+ LLToolCompTranslate::getInstance()->mSelectRect->handleObjectSelection(pick_info, gSavedSettings.getBOOL("EditLinkedParts"), false);
return;
}
@@ -292,7 +292,7 @@ void LLToolCompTranslate::pickCallback(const LLPickInfo& pick_info)
LLEditMenuHandler::gEditMenuHandler = LLSelectMgr::getInstance();
}
- BOOL can_move = LLToolCompTranslate::getInstance()->mManip->canAffectSelection();
+ bool can_move = LLToolCompTranslate::getInstance()->mManip->canAffectSelection();
if( LLManip::LL_NO_PART != LLToolCompTranslate::getInstance()->mManip->getHighlightedPart() && can_move)
{
@@ -315,9 +315,9 @@ void LLToolCompTranslate::pickCallback(const LLPickInfo& pick_info)
}
}
-BOOL LLToolCompTranslate::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLToolCompTranslate::handleMouseUp(S32 x, S32 y, MASK mask)
{
- mMouseDown = FALSE;
+ mMouseDown = false;
return LLToolComposite::handleMouseUp(x, y, mask);
}
@@ -334,14 +334,14 @@ LLTool* LLToolCompTranslate::getOverrideTool(MASK mask)
return LLToolComposite::getOverrideTool(mask);
}
-BOOL LLToolCompTranslate::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLToolCompTranslate::handleDoubleClick(S32 x, S32 y, MASK mask)
{
if (mManip->getSelection()->isEmpty() && mManip->getHighlightedPart() == LLManip::LL_NO_PART)
{
// You should already have an object selected from the mousedown.
// If so, show its properties
LLFloaterReg::showInstance("build", "Content");
- return TRUE;
+ return true;
}
// Nothing selected means the first mouse click was probably
// bad, so try again.
@@ -382,7 +382,7 @@ LLToolCompScale::~LLToolCompScale()
delete mSelectRect;
}
-BOOL LLToolCompScale::handleHover(S32 x, S32 y, MASK mask)
+bool LLToolCompScale::handleHover(S32 x, S32 y, MASK mask)
{
if( !mCur->hasMouseCapture() )
{
@@ -392,11 +392,11 @@ BOOL LLToolCompScale::handleHover(S32 x, S32 y, MASK mask)
}
-BOOL LLToolCompScale::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLToolCompScale::handleMouseDown(S32 x, S32 y, MASK mask)
{
- mMouseDown = TRUE;
+ mMouseDown = true;
gViewerWindow->pickAsync(x, y, mask, pickCallback);
- return TRUE;
+ return true;
}
void LLToolCompScale::pickCallback(const LLPickInfo& pick_info)
@@ -407,7 +407,7 @@ void LLToolCompScale::pickCallback(const LLPickInfo& pick_info)
if (!LLToolCompScale::getInstance()->mMouseDown)
{
// fast click on object, but mouse is already up...just do select
- LLToolCompScale::getInstance()->mSelectRect->handleObjectSelection(pick_info, gSavedSettings.getBOOL("EditLinkedParts"), FALSE);
+ LLToolCompScale::getInstance()->mSelectRect->handleObjectSelection(pick_info, gSavedSettings.getBOOL("EditLinkedParts"), false);
return;
}
@@ -436,9 +436,9 @@ void LLToolCompScale::pickCallback(const LLPickInfo& pick_info)
}
}
-BOOL LLToolCompScale::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLToolCompScale::handleMouseUp(S32 x, S32 y, MASK mask)
{
- mMouseDown = FALSE;
+ mMouseDown = false;
return LLToolComposite::handleMouseUp(x, y, mask);
}
@@ -453,14 +453,14 @@ LLTool* LLToolCompScale::getOverrideTool(MASK mask)
}
-BOOL LLToolCompScale::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLToolCompScale::handleDoubleClick(S32 x, S32 y, MASK mask)
{
if (!mManip->getSelection()->isEmpty() && mManip->getHighlightedPart() == LLManip::LL_NO_PART)
{
// You should already have an object selected from the mousedown.
// If so, show its properties
LLFloaterReg::showInstance("build", "Content");
- return TRUE;
+ return true;
}
else
{
@@ -493,7 +493,7 @@ LLToolCompCreate::LLToolCompCreate()
mCur = mPlacer;
mDefault = mPlacer;
- mObjectPlacedOnMouseDown = FALSE;
+ mObjectPlacedOnMouseDown = false;
}
@@ -504,15 +504,15 @@ LLToolCompCreate::~LLToolCompCreate()
}
-BOOL LLToolCompCreate::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLToolCompCreate::handleMouseDown(S32 x, S32 y, MASK mask)
{
- BOOL handled = FALSE;
- mMouseDown = TRUE;
+ bool handled = false;
+ mMouseDown = true;
if ( (mask == MASK_SHIFT) || (mask == MASK_CONTROL) )
{
gViewerWindow->pickAsync(x, y, mask, pickCallback);
- handled = TRUE;
+ handled = true;
}
else
{
@@ -520,7 +520,7 @@ BOOL LLToolCompCreate::handleMouseDown(S32 x, S32 y, MASK mask)
handled = mPlacer->placeObject( x, y, mask );
}
- mObjectPlacedOnMouseDown = TRUE;
+ mObjectPlacedOnMouseDown = true;
return handled;
}
@@ -536,14 +536,14 @@ void LLToolCompCreate::pickCallback(const LLPickInfo& pick_info)
LLToolCompCreate::getInstance()->mSelectRect->handlePick( pick_info );
}
-BOOL LLToolCompCreate::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLToolCompCreate::handleDoubleClick(S32 x, S32 y, MASK mask)
{
return handleMouseDown(x, y, mask);
}
-BOOL LLToolCompCreate::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLToolCompCreate::handleMouseUp(S32 x, S32 y, MASK mask)
{
- BOOL handled = FALSE;
+ bool handled = false;
if ( mMouseDown && !mObjectPlacedOnMouseDown && !(mask == MASK_SHIFT) && !(mask == MASK_CONTROL) )
{
@@ -551,8 +551,8 @@ BOOL LLToolCompCreate::handleMouseUp(S32 x, S32 y, MASK mask)
handled = mPlacer->placeObject( x, y, mask );
}
- mObjectPlacedOnMouseDown = FALSE;
- mMouseDown = FALSE;
+ mObjectPlacedOnMouseDown = false;
+ mMouseDown = false;
if (!handled)
{
@@ -582,7 +582,7 @@ LLToolCompRotate::~LLToolCompRotate()
delete mSelectRect;
}
-BOOL LLToolCompRotate::handleHover(S32 x, S32 y, MASK mask)
+bool LLToolCompRotate::handleHover(S32 x, S32 y, MASK mask)
{
if( !mCur->hasMouseCapture() )
{
@@ -592,11 +592,11 @@ BOOL LLToolCompRotate::handleHover(S32 x, S32 y, MASK mask)
}
-BOOL LLToolCompRotate::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLToolCompRotate::handleMouseDown(S32 x, S32 y, MASK mask)
{
- mMouseDown = TRUE;
+ mMouseDown = true;
gViewerWindow->pickAsync(x, y, mask, pickCallback);
- return TRUE;
+ return true;
}
void LLToolCompRotate::pickCallback(const LLPickInfo& pick_info)
@@ -607,7 +607,7 @@ void LLToolCompRotate::pickCallback(const LLPickInfo& pick_info)
if (!LLToolCompRotate::getInstance()->mMouseDown)
{
// fast click on object, but mouse is already up...just do select
- LLToolCompRotate::getInstance()->mSelectRect->handleObjectSelection(pick_info, gSavedSettings.getBOOL("EditLinkedParts"), FALSE);
+ LLToolCompRotate::getInstance()->mSelectRect->handleObjectSelection(pick_info, gSavedSettings.getBOOL("EditLinkedParts"), false);
return;
}
@@ -635,9 +635,9 @@ void LLToolCompRotate::pickCallback(const LLPickInfo& pick_info)
}
}
-BOOL LLToolCompRotate::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLToolCompRotate::handleMouseUp(S32 x, S32 y, MASK mask)
{
- mMouseDown = FALSE;
+ mMouseDown = false;
return LLToolComposite::handleMouseUp(x, y, mask);
}
@@ -650,14 +650,14 @@ LLTool* LLToolCompRotate::getOverrideTool(MASK mask)
return LLToolComposite::getOverrideTool(mask);
}
-BOOL LLToolCompRotate::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLToolCompRotate::handleDoubleClick(S32 x, S32 y, MASK mask)
{
if (!mManip->getSelection()->isEmpty() && mManip->getHighlightedPart() == LLManip::LL_NO_PART)
{
// You should already have an object selected from the mousedown.
// If so, show its properties
LLFloaterReg::showInstance("build", "Content");
- return TRUE;
+ return true;
}
else
{
@@ -708,7 +708,7 @@ LLToolCompGun::~LLToolCompGun()
mNull = NULL;
}
-BOOL LLToolCompGun::handleHover(S32 x, S32 y, MASK mask)
+bool LLToolCompGun::handleHover(S32 x, S32 y, MASK mask)
{
// *NOTE: This hack is here to make mouselook kick in again after
// item selected from context menu.
@@ -736,21 +736,21 @@ BOOL LLToolCompGun::handleHover(S32 x, S32 y, MASK mask)
else if ( mCur == mGrab && !(mask & MASK_ALT) )
{
setCurrentTool( (LLTool*) mGun );
- setMouseCapture(TRUE);
+ setMouseCapture(true);
}
}
- return TRUE;
+ return true;
}
-BOOL LLToolCompGun::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLToolCompGun::handleMouseDown(S32 x, S32 y, MASK mask)
{
// if the left button is grabbed, don't put up the pie menu
if (gAgent.leftButtonGrabbed() && gViewerInput.isLMouseHandlingDefault(MODE_FIRST_PERSON))
{
gAgent.setControlFlags(AGENT_CONTROL_ML_LBUTTON_DOWN);
- return FALSE;
+ return false;
}
// On mousedown, start grabbing
@@ -761,13 +761,13 @@ BOOL LLToolCompGun::handleMouseDown(S32 x, S32 y, MASK mask)
}
-BOOL LLToolCompGun::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLToolCompGun::handleDoubleClick(S32 x, S32 y, MASK mask)
{
// if the left button is grabbed, don't put up the pie menu
if (gAgent.leftButtonGrabbed() && gViewerInput.isLMouseHandlingDefault(MODE_FIRST_PERSON))
{
gAgent.setControlFlags(AGENT_CONTROL_ML_LBUTTON_DOWN);
- return FALSE;
+ return false;
}
// On mousedown, start grabbing
@@ -778,7 +778,7 @@ BOOL LLToolCompGun::handleDoubleClick(S32 x, S32 y, MASK mask)
}
-BOOL LLToolCompGun::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLToolCompGun::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
/* JC - suppress context menu 8/29/2002
@@ -786,24 +786,24 @@ BOOL LLToolCompGun::handleRightMouseDown(S32 x, S32 y, MASK mask)
// make the build menu appear.
setCurrentTool( (LLTool*) mNull );
- // This should return FALSE, meaning the context menu will
+ // This should return false, meaning the context menu will
// be shown.
- return FALSE;
+ return false;
*/
// Returning true will suppress the context menu
- return TRUE;
+ return true;
}
-BOOL LLToolCompGun::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLToolCompGun::handleMouseUp(S32 x, S32 y, MASK mask)
{
if (gViewerInput.isLMouseHandlingDefault(MODE_FIRST_PERSON))
{
gAgent.setControlFlags(AGENT_CONTROL_ML_LBUTTON_UP);
}
setCurrentTool( (LLTool*) mGun );
- return TRUE;
+ return true;
}
void LLToolCompGun::onMouseCaptureLost()
@@ -819,22 +819,22 @@ void LLToolCompGun::onMouseCaptureLost()
void LLToolCompGun::handleSelect()
{
LLToolComposite::handleSelect();
- setMouseCapture(TRUE);
+ setMouseCapture(true);
}
void LLToolCompGun::handleDeselect()
{
LLToolComposite::handleDeselect();
- setMouseCapture(FALSE);
+ setMouseCapture(false);
}
-BOOL LLToolCompGun::handleScrollWheel(S32 x, S32 y, S32 clicks)
+bool LLToolCompGun::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
if (clicks > 0)
{
gAgentCamera.changeCameraToDefault();
}
- return TRUE;
+ return true;
}
diff --git a/indra/newview/lltoolcomp.h b/indra/newview/lltoolcomp.h
index f539a045b7..7507984d08 100644
--- a/indra/newview/lltoolcomp.h
+++ b/indra/newview/lltoolcomp.h
@@ -45,21 +45,21 @@ class LLToolComposite : public LLTool
public:
LLToolComposite(const std::string& name);
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask) = 0; // Sets the current tool
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); // Returns to the default tool
- virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask) = 0;
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask) = 0; // Sets the current tool
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask); // Returns to the default tool
+ virtual bool handleDoubleClick(S32 x, S32 y, MASK mask) = 0;
// Map virtual functions to the currently active internal tool
- virtual BOOL handleHover(S32 x, S32 y, MASK mask) { return mCur->handleHover( x, y, mask ); }
- virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks) { return mCur->handleScrollWheel( x, y, clicks ); }
- virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask) { return mCur->handleRightMouseDown( x, y, mask ); }
+ virtual bool handleHover(S32 x, S32 y, MASK mask) { return mCur->handleHover( x, y, mask ); }
+ virtual bool handleScrollWheel(S32 x, S32 y, S32 clicks) { return mCur->handleScrollWheel( x, y, clicks ); }
+ virtual bool handleRightMouseDown(S32 x, S32 y, MASK mask) { return mCur->handleRightMouseDown( x, y, mask ); }
virtual LLViewerObject* getEditingObject() { return mCur->getEditingObject(); }
virtual LLVector3d getEditingPointGlobal() { return mCur->getEditingPointGlobal(); }
- virtual BOOL isEditing() { return mCur->isEditing(); }
+ virtual bool isEditing() { return mCur->isEditing(); }
virtual void stopEditing() { mCur->stopEditing(); mCur = mDefault; }
- virtual BOOL clipMouseWhenDown() { return mCur->clipMouseWhenDown(); }
+ virtual bool clipMouseWhenDown() { return mCur->clipMouseWhenDown(); }
virtual void handleSelect();
virtual void handleDeselect();
@@ -67,7 +67,7 @@ public:
virtual void render() { mCur->render(); }
virtual void draw() { mCur->draw(); }
- virtual BOOL handleKey(KEY key, MASK mask) { return mCur->handleKey( key, mask ); }
+ virtual bool handleKey(KEY key, MASK mask) { return mCur->handleKey( key, mask ); }
virtual void onMouseCaptureLost();
@@ -77,7 +77,7 @@ public:
virtual void localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const
{ mCur->localPointToScreen(local_x, local_y, screen_x, screen_y); }
- BOOL isSelecting();
+ bool isSelecting();
LLTool* getCurrentTool() { return mCur; }
protected:
@@ -88,8 +88,8 @@ protected:
protected:
LLTool* mCur; // The tool to which we're delegating.
LLTool* mDefault;
- BOOL mSelected;
- BOOL mMouseDown;
+ bool mSelected;
+ bool mMouseDown;
LLManip* mManip;
LLToolSelectRect* mSelectRect;
@@ -108,19 +108,19 @@ class LLToolCompInspect : public LLToolComposite, public LLSingleton<LLToolCompI
public:
// Overridden from LLToolComposite
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleKey(KEY key, MASK mask) override;
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask) override;
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask) override;
+ virtual bool handleDoubleClick(S32 x, S32 y, MASK mask) override;
+ virtual bool handleKey(KEY key, MASK mask) override;
virtual void onMouseCaptureLost() override;
void keyUp(KEY key, MASK mask);
static void pickCallback(const LLPickInfo& pick_info);
- BOOL isToolCameraActive() const { return mIsToolCameraActive; }
+ bool isToolCameraActive() const { return mIsToolCameraActive; }
private:
- BOOL mIsToolCameraActive;
+ bool mIsToolCameraActive;
};
//-----------------------------------------------------------------------
@@ -133,10 +133,10 @@ class LLToolCompTranslate : public LLToolComposite, public LLSingleton<LLToolCom
public:
// Overridden from LLToolComposite
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleHover(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask) override; // Returns to the default tool
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask) override;
+ virtual bool handleDoubleClick(S32 x, S32 y, MASK mask) override;
+ virtual bool handleHover(S32 x, S32 y, MASK mask) override;
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask) override; // Returns to the default tool
virtual void render() override;
virtual LLTool* getOverrideTool(MASK mask) override;
@@ -154,10 +154,10 @@ class LLToolCompScale : public LLToolComposite, public LLSingleton<LLToolCompSca
public:
// Overridden from LLToolComposite
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleHover(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask) override; // Returns to the default tool
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask) override;
+ virtual bool handleDoubleClick(S32 x, S32 y, MASK mask) override;
+ virtual bool handleHover(S32 x, S32 y, MASK mask) override;
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask) override; // Returns to the default tool
virtual void render() override;
virtual LLTool* getOverrideTool(MASK mask) override;
@@ -176,10 +176,10 @@ class LLToolCompRotate : public LLToolComposite, public LLSingleton<LLToolCompRo
public:
// Overridden from LLToolComposite
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleHover(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask) override;
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask) override;
+ virtual bool handleDoubleClick(S32 x, S32 y, MASK mask) override;
+ virtual bool handleHover(S32 x, S32 y, MASK mask) override;
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask) override;
virtual void render() override;
virtual LLTool* getOverrideTool(MASK mask) override;
@@ -199,14 +199,14 @@ class LLToolCompCreate : public LLToolComposite, public LLSingleton<LLToolCompCr
public:
// Overridden from LLToolComposite
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask) override;
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask) override;
+ virtual bool handleDoubleClick(S32 x, S32 y, MASK mask) override;
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask) override;
static void pickCallback(const LLPickInfo& pick_info);
protected:
LLToolPlacer* mPlacer;
- BOOL mObjectPlacedOnMouseDown;
+ bool mObjectPlacedOnMouseDown;
};
@@ -224,12 +224,12 @@ class LLToolCompGun : public LLToolComposite, public LLSingleton<LLToolCompGun>
public:
// Overridden from LLToolComposite
- virtual BOOL handleHover(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks) override;
+ virtual bool handleHover(S32 x, S32 y, MASK mask) override;
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask) override;
+ virtual bool handleDoubleClick(S32 x, S32 y, MASK mask) override;
+ virtual bool handleRightMouseDown(S32 x, S32 y, MASK mask) override;
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask) override;
+ virtual bool handleScrollWheel(S32 x, S32 y, S32 clicks) override;
virtual void onMouseCaptureLost() override;
virtual void handleSelect() override;
virtual void handleDeselect() override;
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index bfa9386cd4..4b9f29bca8 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -47,6 +47,7 @@
#include "llinventorybridge.h"
#include "llinventorydefines.h"
#include "llinventoryfunctions.h"
+#include "llinventorymodelbackgroundfetch.h"
#include "llpreviewnotecard.h"
#include "llrootview.h"
#include "llselectmgr.h"
@@ -102,7 +103,7 @@ public:
class LLDroppableItem : public LLInventoryCollectFunctor
{
public:
- LLDroppableItem(BOOL is_transfer) :
+ LLDroppableItem(bool is_transfer) :
mCountLosing(0), mIsTransfer(is_transfer) {}
virtual ~LLDroppableItem() {}
virtual bool operator()(LLInventoryCategory* cat,
@@ -111,7 +112,7 @@ public:
protected:
S32 mCountLosing;
- BOOL mIsTransfer;
+ bool mIsTransfer;
};
bool LLDroppableItem::operator()(LLInventoryCategory* cat,
@@ -287,7 +288,7 @@ LLToolDragAndDrop::LLToolDragAndDrop()
mSource(SOURCE_AGENT),
mCursor(UI_CURSOR_NO),
mLastAccept(ACCEPT_NO),
- mDrop(FALSE),
+ mDrop(false),
mCurItemIndex(0)
{
@@ -299,7 +300,7 @@ void LLToolDragAndDrop::setDragStart(S32 x, S32 y)
mDragStartY = y;
}
-BOOL LLToolDragAndDrop::isOverThreshold(S32 x,S32 y)
+bool LLToolDragAndDrop::isOverThreshold(S32 x,S32 y)
{
static LLCachedControl<S32> drag_and_drop_threshold(gSavedSettings,"DragAndDropDistanceThreshold", 3);
@@ -320,6 +321,16 @@ void LLToolDragAndDrop::beginDrag(EDragAndDropType type,
LL_WARNS() << "Attempted to start drag without a cargo type" << LL_ENDL;
return;
}
+
+ if (type != DAD_CATEGORY)
+ {
+ LLViewerInventoryItem* item = gInventory.getItem(cargo_id);
+ if (item && !item->isFinished())
+ {
+ LLInventoryModelBackgroundFetch::instance().start(item->getUUID(), false);
+ }
+ }
+
mCargoTypes.clear();
mCargoTypes.push_back(type);
mCargoIDs.clear();
@@ -328,7 +339,7 @@ void LLToolDragAndDrop::beginDrag(EDragAndDropType type,
mSourceID = source_id;
mObjectID = object_id;
- setMouseCapture( TRUE );
+ setMouseCapture( true );
LLToolMgr::getInstance()->setTransientTool( this );
mCursor = UI_CURSOR_NO;
if ((mCargoTypes[0] == DAD_CATEGORY)
@@ -398,7 +409,7 @@ void LLToolDragAndDrop::beginMultiDrag(
mSource = source;
mSourceID = source_id;
- setMouseCapture( TRUE );
+ setMouseCapture( true );
LLToolMgr::getInstance()->setTransientTool( this );
mCursor = UI_CURSOR_NO;
if ((mSource == SOURCE_AGENT) || (mSource == SOURCE_LIBRARY))
@@ -447,7 +458,7 @@ void LLToolDragAndDrop::endDrag()
{
mEndDragSignal();
LLSelectMgr::getInstance()->unhighlightAll();
- setMouseCapture(FALSE);
+ setMouseCapture(false);
}
void LLToolDragAndDrop::onMouseCaptureLost()
@@ -462,15 +473,15 @@ void LLToolDragAndDrop::onMouseCaptureLost()
mCustomMsg.clear();
}
-BOOL LLToolDragAndDrop::handleMouseUp( S32 x, S32 y, MASK mask )
+bool LLToolDragAndDrop::handleMouseUp( S32 x, S32 y, MASK mask )
{
if (hasMouseCapture())
{
EAcceptance acceptance = ACCEPT_NO;
- dragOrDrop( x, y, mask, TRUE, &acceptance );
+ dragOrDrop( x, y, mask, true, &acceptance );
endDrag();
}
- return TRUE;
+ return true;
}
ECursorType LLToolDragAndDrop::acceptanceToCursor( EAcceptance acceptance )
@@ -537,37 +548,37 @@ ECursorType LLToolDragAndDrop::acceptanceToCursor( EAcceptance acceptance )
case ACCEPT_POSTPONED:
break;
default:
- llassert( FALSE );
+ llassert( false );
}
return mCursor;
}
-BOOL LLToolDragAndDrop::handleHover( S32 x, S32 y, MASK mask )
+bool LLToolDragAndDrop::handleHover( S32 x, S32 y, MASK mask )
{
EAcceptance acceptance = ACCEPT_NO;
- dragOrDrop( x, y, mask, FALSE, &acceptance );
+ dragOrDrop( x, y, mask, false, &acceptance );
ECursorType cursor = acceptanceToCursor(acceptance);
gViewerWindow->getWindow()->setCursor( cursor );
LL_DEBUGS("UserInput") << "hover handled by LLToolDragAndDrop" << LL_ENDL;
- return TRUE;
+ return true;
}
-BOOL LLToolDragAndDrop::handleKey(KEY key, MASK mask)
+bool LLToolDragAndDrop::handleKey(KEY key, MASK mask)
{
if (key == KEY_ESCAPE)
{
// cancel drag and drop operation
endDrag();
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-BOOL LLToolDragAndDrop::handleToolTip(S32 x, S32 y, MASK mask)
+bool LLToolDragAndDrop::handleToolTip(S32 x, S32 y, MASK mask)
{
if (!mToolTipMsg.empty())
{
@@ -575,9 +586,9 @@ BOOL LLToolDragAndDrop::handleToolTip(S32 x, S32 y, MASK mask)
LLToolTipMgr::instance().show(LLToolTip::Params()
.message(mToolTipMsg)
.delay_time(gSavedSettings.getF32( "DragAndDropToolTipDelay" )));
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void LLToolDragAndDrop::handleDeselect()
@@ -589,12 +600,12 @@ void LLToolDragAndDrop::handleDeselect()
}
// protected
-void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop,
+void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, bool drop,
EAcceptance* acceptance)
{
*acceptance = ACCEPT_YES_MULTI;
- BOOL handled = FALSE;
+ bool handled = false;
LLView* top_view = gFocusMgr.getTopCtrl();
LLViewerInventoryItem* item;
@@ -614,7 +625,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop,
if (top_view)
{
- handled = TRUE;
+ handled = true;
for (mCurItemIndex = 0; mCurItemIndex < (S32)mCargoIDs.size(); mCurItemIndex++)
{
@@ -625,7 +636,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop,
LLInventoryObject* cargo = locateInventory(item, cat);
if (cargo)
{
- handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, FALSE,
+ handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, false,
mCargoTypes[mCurItemIndex],
(void*)cargo,
&item_acceptance,
@@ -633,7 +644,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop,
}
else if (is_uuid_dragged)
{
- handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, FALSE,
+ handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, false,
mCargoTypes[mCurItemIndex],
(void*)&mCargoIDs[mCurItemIndex],
&item_acceptance,
@@ -666,7 +677,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop,
LLInventoryObject* cargo = locateInventory(item, cat);
if (cargo)
{
- handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, TRUE,
+ handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, true,
mCargoTypes[mCurItemIndex],
(void*)cargo,
&item_acceptance,
@@ -674,7 +685,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop,
}
else if (is_uuid_dragged)
{
- handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, FALSE,
+ handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, false,
mCargoTypes[mCurItemIndex],
(void*)&mCargoIDs[mCurItemIndex],
&item_acceptance,
@@ -690,7 +701,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop,
if (!handled)
{
- handled = TRUE;
+ handled = true;
LLRootView* root_view = gViewerWindow->getRootView();
@@ -703,7 +714,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop,
// fix for EXT-3191
if (cargo)
{
- handled = handled && root_view->handleDragAndDrop(x, y, mask, FALSE,
+ handled = handled && root_view->handleDragAndDrop(x, y, mask, false,
mCargoTypes[mCurItemIndex],
(void*)cargo,
&item_acceptance,
@@ -711,7 +722,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop,
}
else if (is_uuid_dragged)
{
- handled = handled && root_view->handleDragAndDrop(x, y, mask, FALSE,
+ handled = handled && root_view->handleDragAndDrop(x, y, mask, false,
mCargoTypes[mCurItemIndex],
(void*)&mCargoIDs[mCurItemIndex],
&item_acceptance,
@@ -741,7 +752,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop,
LLInventoryObject* cargo = locateInventory(item, cat);
if (cargo)
{
- handled = handled && root_view->handleDragAndDrop(x, y, mask, TRUE,
+ handled = handled && root_view->handleDragAndDrop(x, y, mask, true,
mCargoTypes[mCurItemIndex],
(void*)cargo,
&item_acceptance,
@@ -749,7 +760,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop,
}
else if (is_uuid_dragged)
{
- handled = handled && root_view->handleDragAndDrop(x, y, mask, TRUE,
+ handled = handled && root_view->handleDragAndDrop(x, y, mask, true,
mCargoTypes[mCurItemIndex],
(void*)&mCargoIDs[mCurItemIndex],
&item_acceptance,
@@ -785,18 +796,18 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop,
}
}
-void LLToolDragAndDrop::dragOrDrop3D( S32 x, S32 y, MASK mask, BOOL drop, EAcceptance* acceptance )
+void LLToolDragAndDrop::dragOrDrop3D( S32 x, S32 y, MASK mask, bool drop, EAcceptance* acceptance )
{
mDrop = drop;
if (mDrop)
{
// don't allow drag and drop onto rigged or transparent objects
- pick(gViewerWindow->pickImmediate(x, y, FALSE, FALSE));
+ pick(gViewerWindow->pickImmediate(x, y, false, false));
}
else
{
// don't allow drag and drop onto transparent objects
- gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, FALSE);
+ gViewerWindow->pickAsync(x, y, mask, pickCallback, false, false);
}
*acceptance = mLastAccept;
@@ -879,7 +890,7 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info)
(U32)mLastAccept,
(U32)callMemberFunction(*this,
LLDragAndDropDictionary::instance().get(dad_type, target))
- (hit_obj, hit_face, pick_info.mKeyMask, FALSE));
+ (hit_obj, hit_face, pick_info.mKeyMask, false));
}
if (mDrop && ((U32)mLastAccept >= ACCEPT_YES_COPY_SINGLE))
@@ -894,7 +905,7 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info)
const EDragAndDropType dad_type = mCargoTypes[item_index];
// Call the right implementation function
callMemberFunction(*this, LLDragAndDropDictionary::instance().get(dad_type, target))
- (hit_obj, hit_face, pick_info.mKeyMask, TRUE);
+ (hit_obj, hit_face, pick_info.mKeyMask, true);
}
}
else
@@ -925,12 +936,12 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info)
}
// static
-BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj,
+bool LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj,
LLInventoryItem* item,
LLToolDragAndDrop::ESource source,
const LLUUID& src_id)
{
- if (!item) return FALSE;
+ if (!item) return false;
// Always succeed if....
// material is from the library
@@ -938,7 +949,7 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj,
if (SOURCE_LIBRARY == source)
{
// dropping a material from the library always just works.
- return TRUE;
+ return true;
}
// In case the inventory has not been loaded (e.g. due to some recent operation
@@ -959,7 +970,7 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj,
args["ERROR_MESSAGE"] = "Unable to add texture.\nPlease wait a few seconds and try again.";
}
LLNotificationsUtil::add("ErrorMessage", args);
- return FALSE;
+ return false;
}
// Make sure to verify both id and type since 'null'
// is a shared default for some asset types.
@@ -969,7 +980,7 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj,
// then it can always be added to a side.
// This saves some work if the task's inventory is already loaded
// and ensures that the asset item is only added once.
- return TRUE;
+ return true;
}
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
@@ -978,7 +989,7 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj,
// Check that we can add the material as inventory to the object
if (willObjectAcceptInventory(hit_obj,item) < ACCEPT_YES_COPY_SINGLE )
{
- return FALSE;
+ return false;
}
// make sure the object has the material in it's inventory.
if (SOURCE_AGENT == source)
@@ -1001,7 +1012,7 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj,
else
{
LL_WARNS() << "Unable to find source object." << LL_ENDL;
- return FALSE;
+ return false;
}
}
// Add the asset item to the target object's inventory.
@@ -1027,7 +1038,7 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj,
// Check that we can add the asset as inventory to the object
if (willObjectAcceptInventory(hit_obj,item) < ACCEPT_YES_COPY_SINGLE )
{
- return FALSE;
+ return false;
}
// *FIX: may want to make sure agent can paint hit_obj.
@@ -1054,7 +1065,7 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj,
// Check that we can add the material as inventory to the object
if (willObjectAcceptInventory(hit_obj,item) < ACCEPT_YES_COPY_SINGLE )
{
- return FALSE;
+ return false;
}
// *FIX: may want to make sure agent can paint hit_obj.
@@ -1068,7 +1079,7 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj,
// we should return false here. This will requre a separate listener
// since without listener, we have no way to receive update
}
- return TRUE;
+ return true;
}
void set_texture_to_material(LLViewerObject* hit_obj,
@@ -1077,51 +1088,71 @@ void set_texture_to_material(LLViewerObject* hit_obj,
LLGLTFMaterial::TextureInfo drop_channel)
{
LLTextureEntry* te = hit_obj->getTE(hit_face);
- if (te)
+ if (!te)
{
- LLPointer<LLGLTFMaterial> material = te->getGLTFMaterialOverride();
+ return;
+ }
- // make a copy to not invalidate existing
- // material for multiple objects
- if (material.isNull())
- {
- // Start with a material override which does not make any changes
- material = new LLGLTFMaterial();
- }
- else
- {
- material = new LLGLTFMaterial(*material);
- }
+ const LLUUID base_mat_id = hit_obj->getRenderMaterialID(hit_face);
+ if (base_mat_id.isNull())
+ {
+ return;
+ }
- switch (drop_channel)
- {
- case LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR:
- default:
- {
- material->setBaseColorId(asset_id);
- }
- break;
+ if (hit_obj->isInventoryDirty() && hit_obj->hasInventoryListeners())
+ {
+ hit_obj->requestInventory();
+ return;
+ }
- case LLGLTFMaterial::GLTF_TEXTURE_INFO_METALLIC_ROUGHNESS:
- {
- material->setOcclusionRoughnessMetallicId(asset_id);
- }
- break;
+ LLViewerInventoryItem* mat_item = hit_obj->getInventoryItemByAsset(base_mat_id);
+ if (mat_item && !mat_item->getPermissions().allowModifyBy(gAgentID))
+ {
+ return;
+ }
- case LLGLTFMaterial::GLTF_TEXTURE_INFO_EMISSIVE:
- {
- material->setEmissiveId(asset_id);
- }
- break;
+ LLPointer<LLGLTFMaterial> material = te->getGLTFMaterialOverride();
- case LLGLTFMaterial::GLTF_TEXTURE_INFO_NORMAL:
- {
- material->setNormalId(asset_id);
- }
- break;
- }
- LLGLTFMaterialList::queueModify(hit_obj, hit_face, material);
+ // make a copy to not invalidate existing
+ // material for multiple objects
+ if (material.isNull())
+ {
+ // Start with a material override which does not make any changes
+ material = new LLGLTFMaterial();
}
+ else
+ {
+ material = new LLGLTFMaterial(*material);
+ }
+
+ switch (drop_channel)
+ {
+ case LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR:
+ default:
+ {
+ material->setBaseColorId(asset_id);
+ }
+ break;
+
+ case LLGLTFMaterial::GLTF_TEXTURE_INFO_METALLIC_ROUGHNESS:
+ {
+ material->setOcclusionRoughnessMetallicId(asset_id);
+ }
+ break;
+
+ case LLGLTFMaterial::GLTF_TEXTURE_INFO_EMISSIVE:
+ {
+ material->setEmissiveId(asset_id);
+ }
+ break;
+
+ case LLGLTFMaterial::GLTF_TEXTURE_INFO_NORMAL:
+ {
+ material->setNormalId(asset_id);
+ }
+ break;
+ }
+ LLGLTFMaterialList::queueModify(hit_obj, hit_face, material);
}
void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj,
@@ -1148,7 +1179,7 @@ void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj,
if (has_non_pbr_faces || remove_pbr)
{
- BOOL res = handleDropMaterialProtections(hit_obj, item, source, src_id);
+ bool res = handleDropMaterialProtections(hit_obj, item, source, src_id);
if (!res)
{
return;
@@ -1253,7 +1284,7 @@ void LLToolDragAndDrop::dropMaterialOneFace(LLViewerObject* hit_obj,
// SL-20013 must save asset_id before handleDropMaterialProtections since our item instance
// may be deleted if it is moved into task inventory
LLUUID asset_id = item->getAssetUUID();
- BOOL success = handleDropMaterialProtections(hit_obj, item, source, src_id);
+ bool success = handleDropMaterialProtections(hit_obj, item, source, src_id);
if (!success)
{
return;
@@ -1262,7 +1293,7 @@ void LLToolDragAndDrop::dropMaterialOneFace(LLViewerObject* hit_obj,
if (asset_id.isNull())
{
// use blank material
- asset_id = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
+ asset_id = BLANK_MATERIAL_ASSET_ID;
}
hit_obj->setRenderMaterialID(hit_face, asset_id);
@@ -1288,7 +1319,7 @@ void LLToolDragAndDrop::dropMaterialAllFaces(LLViewerObject* hit_obj,
// SL-20013 must save asset_id before handleDropMaterialProtections since our item instance
// may be deleted if it is moved into task inventory
LLUUID asset_id = item->getAssetUUID();
- BOOL success = handleDropMaterialProtections(hit_obj, item, source, src_id);
+ bool success = handleDropMaterialProtections(hit_obj, item, source, src_id);
if (!success)
{
@@ -1298,7 +1329,7 @@ void LLToolDragAndDrop::dropMaterialAllFaces(LLViewerObject* hit_obj,
if (asset_id.isNull())
{
// use blank material
- asset_id = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
+ asset_id = BLANK_MATERIAL_ASSET_ID;
}
hit_obj->setRenderMaterialIDs(asset_id);
@@ -1319,7 +1350,7 @@ void LLToolDragAndDrop::dropMesh(LLViewerObject* hit_obj,
return;
}
LLUUID asset_id = item->getAssetUUID();
- BOOL success = handleDropMaterialProtections(hit_obj, item, source, src_id);
+ bool success = handleDropMaterialProtections(hit_obj, item, source, src_id);
if(!success)
{
return;
@@ -1327,7 +1358,7 @@ void LLToolDragAndDrop::dropMesh(LLViewerObject* hit_obj,
LLSculptParams sculpt_params;
sculpt_params.setSculptTexture(asset_id, LL_SCULPT_TYPE_MESH);
- hit_obj->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, TRUE);
+ hit_obj->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, true);
dialog_refresh_all();
}
@@ -1470,7 +1501,7 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj,
}
return;
}
- BOOL success = handleDropMaterialProtections(hit_obj, item, source, src_id);
+ bool success = handleDropMaterialProtections(hit_obj, item, source, src_id);
if (!success)
{
return;
@@ -1540,7 +1571,7 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj,
void LLToolDragAndDrop::dropScript(LLViewerObject* hit_obj,
LLInventoryItem* item,
- BOOL active,
+ bool active,
ESource source,
const LLUUID& src_id)
{
@@ -1586,7 +1617,7 @@ void LLToolDragAndDrop::dropScript(LLViewerObject* hit_obj,
gFloaterTools->dirty();
// VEFFECT: SetScript
- LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
+ LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, true);
effectp->setSourceObject(gAgentAvatarp);
effectp->setTargetObject(hit_obj);
effectp->setDuration(LL_HUD_DUR_SHORT);
@@ -1595,9 +1626,9 @@ void LLToolDragAndDrop::dropScript(LLViewerObject* hit_obj,
}
void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target,
- BOOL bypass_sim_raycast,
- BOOL from_task_inventory,
- BOOL remove_from_inventory)
+ bool bypass_sim_raycast,
+ bool from_task_inventory,
+ bool remove_from_inventory)
{
LLViewerRegion* regionp = LLWorld::getInstance()->getRegionFromPosGlobal(mLastHitPos);
if (!regionp)
@@ -1625,7 +1656,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target,
if (!remove_from_inventory
&& !item->getPermissions().allowCopyBy(gAgent.getID()))
{
- remove_from_inventory = TRUE;
+ remove_from_inventory = true;
}
// Limit raycast to a single object.
@@ -1653,7 +1684,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target,
LLUUID source_id = from_task_inventory ? mSourceID : LLUUID::null;
// Select the object only if we're editing.
- BOOL rez_selected = LLToolMgr::getInstance()->inEdit();
+ bool rez_selected = LLToolMgr::getInstance()->inEdit();
LLVector3 ray_start = regionp->getPosRegionFromGlobal(mLastCameraPos);
@@ -1661,7 +1692,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target,
// currently the ray's end point is an approximation,
// and is sometimes too short (causing failure.) so we
// double the ray's length:
- if (bypass_sim_raycast == FALSE)
+ if (bypass_sim_raycast == false)
{
LLVector3 ray_direction = ray_start - ray_end;
ray_end = ray_end - ray_direction;
@@ -1696,7 +1727,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target,
msg->addVector3Fast(_PREHASH_RayStart, ray_start);
msg->addVector3Fast(_PREHASH_RayEnd, ray_end);
msg->addUUIDFast(_PREHASH_RayTargetID, ray_target_id );
- msg->addBOOLFast(_PREHASH_RayEndIsIntersection, FALSE);
+ msg->addBOOLFast(_PREHASH_RayEndIsIntersection, false);
msg->addBOOLFast(_PREHASH_RezSelected, rez_selected);
msg->addBOOLFast(_PREHASH_RemoveItem, remove_from_inventory);
@@ -1748,7 +1779,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target,
}
// VEFFECT: DropObject
- LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
+ LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, true);
effectp->setSourceObject(gAgentAvatarp);
effectp->setPositionGlobal(mLastHitPos);
effectp->setDuration(LL_HUD_DUR_SHORT);
@@ -1811,7 +1842,7 @@ void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj,
}
// VEFFECT: AddToInventory
- LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
+ LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, true);
effectp->setSourceObject(gAgentAvatarp);
effectp->setTargetObject(hit_obj);
effectp->setDuration(LL_HUD_DUR_SHORT);
@@ -1846,10 +1877,10 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL
return ACCEPT_NO;
}
- //BOOL copy = (perm.allowCopyBy(gAgent.getID(),
+ //bool copy = (perm.allowCopyBy(gAgent.getID(),
// gAgent.getGroupID())
// && (obj->mPermModify || obj->mFlagAllowInventoryAdd));
- BOOL worn = FALSE;
+ bool worn = false;
LLVOAvatarSelf* my_avatar = NULL;
switch(item->getType())
{
@@ -1857,14 +1888,14 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL
my_avatar = gAgentAvatarp;
if(my_avatar && my_avatar->isWearingAttachment(item->getUUID()))
{
- worn = TRUE;
+ worn = true;
}
break;
case LLAssetType::AT_BODYPART:
case LLAssetType::AT_CLOTHING:
if(gAgentWearables.isWearingItem(item->getUUID()))
{
- worn = TRUE;
+ worn = true;
}
break;
case LLAssetType::AT_CALLINGCARD:
@@ -1875,16 +1906,16 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL
break;
}
const LLPermissions& perm = item->getPermissions();
- BOOL modify = (obj->permModify() || obj->flagAllowInventoryAdd());
- BOOL transfer = FALSE;
+ bool modify = (obj->permModify() || obj->flagAllowInventoryAdd());
+ bool transfer = false;
if((obj->permYouOwner() && (perm.getOwner() == gAgent.getID()))
|| perm.allowOperationBy(PERM_TRANSFER, gAgent.getID()))
{
- transfer = TRUE;
+ transfer = true;
}
- BOOL volume = (LL_PCODE_VOLUME == obj->getPCode());
- BOOL attached = obj->isAttachment();
- BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE;
+ bool volume = (LL_PCODE_VOLUME == obj->getPCode());
+ bool attached = obj->isAttachment();
+ bool unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? true : false;
if(attached && !unrestricted)
{
// Attachments are in world and in inventory simultaneously,
@@ -1919,7 +1950,7 @@ static void give_inventory_cb(const LLSD& notification, const LLSD& response)
LLViewerInventoryCategory * inv_cat = gInventory.getCategory(payload["item_id"]);
if (NULL == inv_item && NULL == inv_cat)
{
- llassert( FALSE );
+ llassert( false );
return;
}
bool successfully_shared;
@@ -1978,7 +2009,7 @@ static void get_name_cb(const LLUUID& id,
// function used as drag-and-drop handler for simple agent give inventory requests
//static
-bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_id, BOOL drop,
+bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_id, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
@@ -2056,7 +2087,7 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_
break;
}
- return TRUE;
+ return true;
}
@@ -2066,14 +2097,14 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_
///
EAcceptance LLToolDragAndDrop::dad3dNULL(
- LLViewerObject*, S32, MASK, BOOL)
+ LLViewerObject*, S32, MASK, bool)
{
LL_DEBUGS() << "LLToolDragAndDrop::dad3dNULL()" << LL_ENDL;
return ACCEPT_NO;
}
EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv(
- LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
+ LLViewerObject* obj, S32 face, MASK mask, bool drop)
{
LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezAttachmentFromInv()" << LL_ENDL;
// must be in the user's inventory
@@ -2132,7 +2163,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv(
EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand(
- LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
+ LLViewerObject* obj, S32 face, MASK mask, bool drop)
{
if (mSource == SOURCE_WORLD)
{
@@ -2152,21 +2183,21 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand(
}
EAcceptance accept;
- BOOL remove_inventory;
+ bool remove_inventory;
// Get initial settings based on shift key
if (mask & MASK_SHIFT)
{
// For now, always make copy
//accept = ACCEPT_YES_SINGLE;
- //remove_inventory = TRUE;
+ //remove_inventory = true;
accept = ACCEPT_YES_COPY_SINGLE;
- remove_inventory = FALSE;
+ remove_inventory = false;
}
else
{
accept = ACCEPT_YES_COPY_SINGLE;
- remove_inventory = FALSE;
+ remove_inventory = false;
}
// check if the item can be copied. If not, send that to the sim
@@ -2174,7 +2205,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand(
if(!item->getPermissions().allowCopyBy(gAgent.getID()))
{
accept = ACCEPT_YES_SINGLE;
- remove_inventory = TRUE;
+ remove_inventory = true;
}
// Check if it's in the trash.
@@ -2186,14 +2217,14 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand(
if(drop)
{
- dropObject(obj, TRUE, FALSE, remove_inventory);
+ dropObject(obj, true, false, remove_inventory);
}
return accept;
}
EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject(
- LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
+ LLViewerObject* obj, S32 face, MASK mask, bool drop)
{
// handle objects coming from object inventory
if (mSource == SOURCE_WORLD)
@@ -2230,20 +2261,20 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject(
}
EAcceptance accept;
- BOOL remove_inventory;
+ bool remove_inventory;
if (mask & MASK_SHIFT)
{
// For now, always make copy
//accept = ACCEPT_YES_SINGLE;
- //remove_inventory = TRUE;
+ //remove_inventory = true;
accept = ACCEPT_YES_COPY_SINGLE;
- remove_inventory = FALSE;
+ remove_inventory = false;
}
else
{
accept = ACCEPT_YES_COPY_SINGLE;
- remove_inventory = FALSE;
+ remove_inventory = false;
}
// check if the item can be copied. If not, send that to the sim
@@ -2251,7 +2282,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject(
if(!item->getPermissions().allowCopyBy(gAgent.getID()))
{
accept = ACCEPT_YES_SINGLE;
- remove_inventory = TRUE;
+ remove_inventory = true;
}
// Check if it's in the trash.
@@ -2259,19 +2290,19 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject(
if(gInventory.isObjectDescendentOf(item->getUUID(), trash_id))
{
accept = ACCEPT_YES_SINGLE;
- remove_inventory = TRUE;
+ remove_inventory = true;
}
if(drop)
{
- dropObject(obj, FALSE, FALSE, remove_inventory);
+ dropObject(obj, false, false, remove_inventory);
}
return accept;
}
EAcceptance LLToolDragAndDrop::dad3dRezScript(
- LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
+ LLViewerObject* obj, S32 face, MASK mask, bool drop)
{
LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezScript()" << LL_ENDL;
@@ -2291,7 +2322,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezScript(
{
// rez in the script active by default, rez in inactive if the
// control key is being held down.
- BOOL active = ((mask & MASK_CONTROL) == 0);
+ bool active = ((mask & MASK_CONTROL) == 0);
LLViewerObject* root_object = obj;
if (obj && obj->getParent())
@@ -2309,7 +2340,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezScript(
}
EAcceptance LLToolDragAndDrop::dad3dApplyToObject(
- LLViewerObject* obj, S32 face, MASK mask, BOOL drop, EDragAndDropType cargo_type)
+ LLViewerObject* obj, S32 face, MASK mask, bool drop, EDragAndDropType cargo_type)
{
LL_DEBUGS() << "LLToolDragAndDrop::dad3dApplyToObject()" << LL_ENDL;
@@ -2428,7 +2459,7 @@ EAcceptance LLToolDragAndDrop::dad3dApplyToObject(
}
// VEFFECT: SetTexture
- LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
+ LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, true);
effectp->setSourceObject(gAgentAvatarp);
effectp->setTargetObject(obj);
effectp->setDuration(LL_HUD_DUR_SHORT);
@@ -2441,25 +2472,42 @@ EAcceptance LLToolDragAndDrop::dad3dApplyToObject(
EAcceptance LLToolDragAndDrop::dad3dTextureObject(
- LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
+ LLViewerObject* obj, S32 face, MASK mask, bool drop)
{
return dad3dApplyToObject(obj, face, mask, drop, DAD_TEXTURE);
}
EAcceptance LLToolDragAndDrop::dad3dMaterialObject(
- LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
+ LLViewerObject* obj, S32 face, MASK mask, bool drop)
{
return dad3dApplyToObject(obj, face, mask, drop, DAD_MATERIAL);
}
EAcceptance LLToolDragAndDrop::dad3dMeshObject(
- LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
+ LLViewerObject* obj, S32 face, MASK mask, bool drop)
{
return dad3dApplyToObject(obj, face, mask, drop, DAD_MESH);
}
+
+/*
+EAcceptance LLToolDragAndDrop::dad3dTextureSelf(
+ LLViewerObject* obj, S32 face, MASK mask, bool drop)
+{
+ LL_DEBUGS() << "LLToolDragAndDrop::dad3dTextureAvatar()" << LL_ENDL;
+ if(drop)
+ {
+ if( !(mask & MASK_SHIFT) )
+ {
+ dropTextureOneFaceAvatar( (LLVOAvatar*)obj, face, (LLInventoryItem*)mCargoData);
+ }
+ }
+ return (mask & MASK_SHIFT) ? ACCEPT_NO : ACCEPT_YES_SINGLE;
+}
+*/
+
EAcceptance LLToolDragAndDrop::dad3dWearItem(
- LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
+ LLViewerObject* obj, S32 face, MASK mask, bool drop)
{
LL_DEBUGS() << "LLToolDragAndDrop::dad3dWearItem()" << LL_ENDL;
LLViewerInventoryItem* item;
@@ -2492,7 +2540,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearItem(
}
EAcceptance LLToolDragAndDrop::dad3dActivateGesture(
- LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
+ LLViewerObject* obj, S32 face, MASK mask, bool drop)
{
LL_DEBUGS() << "LLToolDragAndDrop::dad3dActivateGesture()" << LL_ENDL;
LLViewerInventoryItem* item;
@@ -2541,7 +2589,7 @@ EAcceptance LLToolDragAndDrop::dad3dActivateGesture(
}
EAcceptance LLToolDragAndDrop::dad3dWearCategory(
- LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
+ LLViewerObject* obj, S32 face, MASK mask, bool drop)
{
LL_DEBUGS() << "LLToolDragAndDrop::dad3dWearCategory()" << LL_ENDL;
LLViewerInventoryItem* item;
@@ -2588,7 +2636,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory(
if(drop)
{
- BOOL append = ( (mask & MASK_SHIFT) ? TRUE : FALSE );
+ bool append = ( (mask & MASK_SHIFT) ? true : false );
LLAppearanceMgr::instance().wearInventoryCategory(category, false, append);
}
return ACCEPT_YES_MULTI;
@@ -2610,7 +2658,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory(
EAcceptance LLToolDragAndDrop::dad3dUpdateInventory(
- LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
+ LLViewerObject* obj, S32 face, MASK mask, bool drop)
{
LL_DEBUGS() << "LLToolDragAndDrop::dadUpdateInventory()" << LL_ENDL;
@@ -2643,14 +2691,14 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventory(
return rv;
}
-BOOL LLToolDragAndDrop::dadUpdateInventory(LLViewerObject* obj, BOOL drop)
+bool LLToolDragAndDrop::dadUpdateInventory(LLViewerObject* obj, bool drop)
{
EAcceptance rv = dad3dUpdateInventory(obj, -1, MASK_NONE, drop);
return (rv >= ACCEPT_YES_COPY_SINGLE);
}
EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory(
- LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
+ LLViewerObject* obj, S32 face, MASK mask, bool drop)
{
LL_DEBUGS() << "LLToolDragAndDrop::dad3dUpdateInventoryCategory()" << LL_ENDL;
if (obj == NULL)
@@ -2766,7 +2814,7 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory(
EAcceptance LLToolDragAndDrop::dad3dRezCategoryOnObject(
- LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
+ LLViewerObject* obj, S32 face, MASK mask, bool drop)
{
if ((mask & MASK_CONTROL))
{
@@ -2779,15 +2827,15 @@ EAcceptance LLToolDragAndDrop::dad3dRezCategoryOnObject(
}
-BOOL LLToolDragAndDrop::dadUpdateInventoryCategory(LLViewerObject* obj,
- BOOL drop)
+bool LLToolDragAndDrop::dadUpdateInventoryCategory(LLViewerObject* obj,
+ bool drop)
{
EAcceptance rv = dad3dUpdateInventoryCategory(obj, -1, MASK_NONE, drop);
return (rv >= ACCEPT_YES_COPY_SINGLE);
}
EAcceptance LLToolDragAndDrop::dad3dGiveInventoryObject(
- LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
+ LLViewerObject* obj, S32 face, MASK mask, bool drop)
{
LL_DEBUGS() << "LLToolDragAndDrop::dad3dGiveInventoryObject()" << LL_ENDL;
@@ -2825,7 +2873,7 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventoryObject(
EAcceptance LLToolDragAndDrop::dad3dGiveInventory(
- LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
+ LLViewerObject* obj, S32 face, MASK mask, bool drop)
{
LL_DEBUGS() << "LLToolDragAndDrop::dad3dGiveInventory()" << LL_ENDL;
// item has to be in agent inventory.
@@ -2848,7 +2896,7 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventory(
}
EAcceptance LLToolDragAndDrop::dad3dGiveInventoryCategory(
- LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
+ LLViewerObject* obj, S32 face, MASK mask, bool drop)
{
LL_DEBUGS() << "LLToolDragAndDrop::dad3dGiveInventoryCategory()" << LL_ENDL;
if(drop && obj)
@@ -2866,7 +2914,7 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventoryCategory(
EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnLand(
- LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
+ LLViewerObject* obj, S32 face, MASK mask, bool drop)
{
LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezFromObjectOnLand()" << LL_ENDL;
LLViewerInventoryItem* item = NULL;
@@ -2881,13 +2929,13 @@ EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnLand(
}
if(drop)
{
- dropObject(obj, TRUE, TRUE, FALSE);
+ dropObject(obj, true, true, false);
}
return ACCEPT_YES_SINGLE;
}
EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnObject(
- LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
+ LLViewerObject* obj, S32 face, MASK mask, bool drop)
{
LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezFromObjectOnObject()" << LL_ENDL;
LLViewerInventoryItem* item;
@@ -2916,13 +2964,13 @@ EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnObject(
}
if(drop)
{
- dropObject(obj, FALSE, TRUE, FALSE);
+ dropObject(obj, false, true, false);
}
return ACCEPT_YES_SINGLE;
}
EAcceptance LLToolDragAndDrop::dad3dCategoryOnLand(
- LLViewerObject *obj, S32 face, MASK mask, BOOL drop)
+ LLViewerObject *obj, S32 face, MASK mask, bool drop)
{
return ACCEPT_NO;
/*
@@ -2960,7 +3008,7 @@ EAcceptance LLToolDragAndDrop::dad3dCategoryOnLand(
// This shortcuts alot of steps to make a basic object
// w/ an inventory and a special permissions set
EAcceptance LLToolDragAndDrop::dad3dAssetOnLand(
- LLViewerObject *obj, S32 face, MASK mask, BOOL drop)
+ LLViewerObject *obj, S32 face, MASK mask, bool drop)
{
return ACCEPT_NO;
/*
diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h
index 60a2f01107..d918a70267 100644
--- a/indra/newview/lltooldraganddrop.h
+++ b/indra/newview/lltooldraganddrop.h
@@ -48,15 +48,15 @@ public:
typedef boost::signals2::signal<void ()> enddrag_signal_t;
// overridden from LLTool
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleHover(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleKey(KEY key, MASK mask) override;
- virtual BOOL handleToolTip(S32 x, S32 y, MASK mask) override;
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask) override;
+ virtual bool handleHover(S32 x, S32 y, MASK mask) override;
+ virtual bool handleKey(KEY key, MASK mask) override;
+ virtual bool handleToolTip(S32 x, S32 y, MASK mask) override;
virtual void onMouseCaptureLost() override;
virtual void handleDeselect() override;
void setDragStart( S32 x, S32 y ); // In screen space
- BOOL isOverThreshold( S32 x, S32 y ); // In screen space
+ bool isOverThreshold( S32 x, S32 y ); // In screen space
enum ESource
{
@@ -92,9 +92,9 @@ public:
static S32 getOperationId() { return sOperationId; }
- // deal with permissions of object, etc. returns TRUE if drop can
- // proceed, otherwise FALSE.
- static BOOL handleDropMaterialProtections(LLViewerObject* hit_obj,
+ // deal with permissions of object, etc. returns true if drop can
+ // proceed, otherwise false.
+ static bool handleDropMaterialProtections(LLViewerObject* hit_obj,
LLInventoryItem* item,
LLToolDragAndDrop::ESource source,
const LLUUID& src_id);
@@ -112,14 +112,14 @@ protected:
protected:
// dragOrDrop3dImpl points to a member of LLToolDragAndDrop that
- // takes parameters (LLViewerObject* obj, S32 face, MASK, BOOL
- // drop) and returns a BOOL if drop is ok
+ // takes parameters (LLViewerObject* obj, S32 face, MASK, bool
+ // drop) and returns a bool if drop is ok
typedef EAcceptance (LLToolDragAndDrop::*dragOrDrop3dImpl)
- (LLViewerObject*, S32, MASK, BOOL);
+ (LLViewerObject*, S32, MASK, bool);
- void dragOrDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ void dragOrDrop(S32 x, S32 y, MASK mask, bool drop,
EAcceptance* acceptance);
- void dragOrDrop3D(S32 x, S32 y, MASK mask, BOOL drop,
+ void dragOrDrop3D(S32 x, S32 y, MASK mask, bool drop,
EAcceptance* acceptance);
static void pickCallback(const LLPickInfo& pick_info);
@@ -146,7 +146,7 @@ protected:
ECursorType mCursor;
EAcceptance mLastAccept;
- BOOL mDrop;
+ bool mDrop;
S32 mCurItemIndex;
std::string mToolTipMsg;
std::string mCustomMsg;
@@ -155,57 +155,57 @@ protected:
protected:
// 3d drop functions. these call down into the static functions
- // named drop<ThingToDrop> if drop is TRUE and permissions allow
+ // named drop<ThingToDrop> if drop is true and permissions allow
// that behavior.
- EAcceptance dad3dNULL(LLViewerObject*, S32, MASK, BOOL);
+ EAcceptance dad3dNULL(LLViewerObject*, S32, MASK, bool);
EAcceptance dad3dRezObjectOnLand(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dRezObjectOnObject(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dRezCategoryOnObject(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dRezScript(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dTextureObject(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dMaterialObject(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dMeshObject(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
// EAcceptance dad3dTextureSelf(LLViewerObject* obj, S32 face,
-// MASK mask, BOOL drop);
+// MASK mask, bool drop);
EAcceptance dad3dWearItem(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dWearCategory(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dUpdateInventory(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dUpdateInventoryCategory(LLViewerObject* obj,
S32 face,
MASK mask,
- BOOL drop);
+ bool drop);
EAcceptance dad3dGiveInventoryObject(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dGiveInventory(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dGiveInventoryCategory(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dRezFromObjectOnLand(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dRezFromObjectOnObject(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dRezAttachmentFromInv(LLViewerObject* obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dCategoryOnLand(LLViewerObject *obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dAssetOnLand(LLViewerObject *obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
EAcceptance dad3dActivateGesture(LLViewerObject *obj, S32 face,
- MASK mask, BOOL drop);
+ MASK mask, bool drop);
// helper called by methods above to handle "application" of an item
// to an object (texture applied to face, mesh applied to shape, etc.)
- EAcceptance dad3dApplyToObject(LLViewerObject* obj, S32 face, MASK mask, BOOL drop, EDragAndDropType cargo_type);
+ EAcceptance dad3dApplyToObject(LLViewerObject* obj, S32 face, MASK mask, bool drop, EDragAndDropType cargo_type);
// set the LLToolDragAndDrop's cursor based on the given acceptance
@@ -222,9 +222,9 @@ protected:
// LLViewerInventoryItem::item_array_t& items);
void dropObject(LLViewerObject* raycast_target,
- BOOL bypass_sim_raycast,
- BOOL from_task_inventory,
- BOOL remove_from_inventory);
+ bool bypass_sim_raycast,
+ bool from_task_inventory,
+ bool remove_from_inventory);
// accessor that looks at permissions, copyability, and names of
// inventory items to determine if a drop would be ok.
@@ -232,15 +232,15 @@ protected:
public:
// helper functions
- static BOOL isInventoryDropAcceptable(LLViewerObject* obj, LLInventoryItem* item) { return (ACCEPT_YES_COPY_SINGLE <= willObjectAcceptInventory(obj, item)); }
+ static bool isInventoryDropAcceptable(LLViewerObject* obj, LLInventoryItem* item) { return (ACCEPT_YES_COPY_SINGLE <= willObjectAcceptInventory(obj, item)); }
- BOOL dadUpdateInventory(LLViewerObject* obj, BOOL drop);
- BOOL dadUpdateInventoryCategory(LLViewerObject* obj, BOOL drop);
+ bool dadUpdateInventory(LLViewerObject* obj, bool drop);
+ bool dadUpdateInventoryCategory(LLViewerObject* obj, bool drop);
// methods that act on the simulator state.
static void dropScript(LLViewerObject* hit_obj,
LLInventoryItem* item,
- BOOL active,
+ bool active,
ESource source,
const LLUUID& src_id);
static void dropTexture(LLViewerObject* hit_obj,
@@ -291,7 +291,7 @@ public:
ESource source,
const LLUUID& src_id);
- static bool handleGiveDragAndDrop(LLUUID agent, LLUUID session, BOOL drop,
+ static bool handleGiveDragAndDrop(LLUUID agent, LLUUID session, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
diff --git a/indra/newview/lltoolface.cpp b/indra/newview/lltoolface.cpp
index a00ac10698..3d1dbed650 100644
--- a/indra/newview/lltoolface.cpp
+++ b/indra/newview/lltoolface.cpp
@@ -53,28 +53,28 @@ LLToolFace::~LLToolFace()
{ }
-BOOL LLToolFace::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLToolFace::handleDoubleClick(S32 x, S32 y, MASK mask)
{
if (!LLSelectMgr::getInstance()->getSelection()->isEmpty())
{
// You should already have an object selected from the mousedown.
// If so, show its properties
LLFloaterReg::showInstance("build", "Texture");
- return TRUE;
+ return true;
}
else
{
// Nothing selected means the first mouse click was probably
// bad, so try again.
- return FALSE;
+ return false;
}
}
-BOOL LLToolFace::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLToolFace::handleMouseDown(S32 x, S32 y, MASK mask)
{
gViewerWindow->pickAsync(x, y, mask, pickCallback);
- return TRUE;
+ return true;
}
void LLToolFace::pickCallback(const LLPickInfo& pick_info)
@@ -134,14 +134,14 @@ void LLToolFace::pickCallback(const LLPickInfo& pick_info)
void LLToolFace::handleSelect()
{
// From now on, draw faces
- LLSelectMgr::getInstance()->setTEMode(TRUE);
+ LLSelectMgr::getInstance()->setTEMode(true);
}
void LLToolFace::handleDeselect()
{
// Stop drawing faces
- LLSelectMgr::getInstance()->setTEMode(FALSE);
+ LLSelectMgr::getInstance()->setTEMode(false);
}
diff --git a/indra/newview/lltoolface.h b/indra/newview/lltoolface.h
index 7c8ff20480..4d3a51c40f 100644
--- a/indra/newview/lltoolface.h
+++ b/indra/newview/lltoolface.h
@@ -39,8 +39,8 @@ class LLToolFace
virtual ~LLToolFace();
public:
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask) override;
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask) override;
+ virtual bool handleDoubleClick(S32 x, S32 y, MASK mask) override;
virtual void handleSelect() override;
virtual void handleDeselect() override;
virtual void render() override; // draw face highlights
diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp
index 4e94895a3e..ef3d92ca54 100644
--- a/indra/newview/lltoolfocus.cpp
+++ b/indra/newview/lltoolfocus.cpp
@@ -56,9 +56,9 @@
#include "llmenugl.h"
// Globals
-BOOL gCameraBtnZoom = TRUE;
-BOOL gCameraBtnOrbit = FALSE;
-BOOL gCameraBtnPan = FALSE;
+bool gCameraBtnZoom = true;
+bool gCameraBtnOrbit = false;
+bool gCameraBtnPan = false;
const S32 SLOP_RANGE = 4;
@@ -72,12 +72,12 @@ LLToolCamera::LLToolCamera()
mAccumY(0),
mMouseDownX(0),
mMouseDownY(0),
- mOutsideSlopX(FALSE),
- mOutsideSlopY(FALSE),
- mValidClickPoint(FALSE),
+ mOutsideSlopX(false),
+ mOutsideSlopY(false),
+ mValidClickPoint(false),
mClickPickPending(false),
- mValidSelection(FALSE),
- mMouseSteering(FALSE),
+ mValidSelection(false),
+ mMouseSteering(false),
mMouseUpX(0),
mMouseUpY(0),
mMouseUpMask(MASK_NONE)
@@ -101,10 +101,10 @@ void LLToolCamera::handleSelect()
// virtual
void LLToolCamera::handleDeselect()
{
-// gAgent.setLookingAtAvatar(FALSE);
+// gAgent.setLookingAtAvatar(false);
// Make sure that temporary selection won't pass anywhere except pie tool.
- MASK override_mask = gKeyboard ? gKeyboard->currentMask(TRUE) : 0;
+ MASK override_mask = gKeyboard ? gKeyboard->currentMask(true) : 0;
if (!mValidSelection && (override_mask != MASK_NONE || (gFloaterTools && gFloaterTools->getVisible())))
{
LLMenuGL::sMenuContainer->hideMenus();
@@ -112,10 +112,10 @@ void LLToolCamera::handleDeselect()
}
}
-BOOL LLToolCamera::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLToolCamera::handleMouseDown(S32 x, S32 y, MASK mask)
{
// Ensure a mouseup
- setMouseCapture(TRUE);
+ setMouseCapture(true);
// call the base class to propogate info to sim
LLTool::handleMouseDown(x, y, mask);
@@ -123,10 +123,10 @@ BOOL LLToolCamera::handleMouseDown(S32 x, S32 y, MASK mask)
mAccumX = 0;
mAccumY = 0;
- mOutsideSlopX = FALSE;
- mOutsideSlopY = FALSE;
+ mOutsideSlopX = false;
+ mOutsideSlopY = false;
- mValidClickPoint = FALSE;
+ mValidClickPoint = false;
// Sometimes Windows issues down and up events near simultaneously
// without giving async pick a chance to trigged
@@ -141,9 +141,9 @@ BOOL LLToolCamera::handleMouseDown(S32 x, S32 y, MASK mask)
gViewerWindow->hideCursor();
- gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ FALSE, /*BOOL pick_rigged*/ FALSE, /*BOOL pick_unselectable*/ TRUE);
+ gViewerWindow->pickAsync(x, y, mask, pickCallback, /*bool pick_transparent*/ false, /*bool pick_rigged*/ false, /*bool pick_unselectable*/ true);
- return TRUE;
+ return true;
}
void LLToolCamera::pickCallback(const LLPickInfo& pick_info)
@@ -166,7 +166,7 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info)
// Check for hit the sky, or some other invalid point
if (!hit_obj && pick_info.mPosGlobal.isExactlyZero())
{
- camera->mValidClickPoint = FALSE;
+ camera->mValidClickPoint = false;
return;
}
@@ -176,37 +176,37 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info)
LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
if (!selection->getObjectCount() || selection->getSelectType() != SELECT_TYPE_HUD)
{
- camera->mValidClickPoint = FALSE;
+ camera->mValidClickPoint = false;
return;
}
}
if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode() )
{
- BOOL good_customize_avatar_hit = FALSE;
+ bool good_customize_avatar_hit = false;
if( hit_obj )
{
if (isAgentAvatarValid() && (hit_obj == gAgentAvatarp))
{
// It's you
- good_customize_avatar_hit = TRUE;
+ good_customize_avatar_hit = true;
}
else if (hit_obj->isAttachment() && hit_obj->permYouOwner())
{
// It's an attachment that you're wearing
- good_customize_avatar_hit = TRUE;
+ good_customize_avatar_hit = true;
}
}
if( !good_customize_avatar_hit )
{
- camera->mValidClickPoint = FALSE;
+ camera->mValidClickPoint = false;
return;
}
if( gMorphView )
{
- gMorphView->setCameraDrivenByKeys( FALSE );
+ gMorphView->setCameraDrivenByKeys( false );
}
}
//RN: check to see if this is mouse-driving as opposed to ALT-zoom or Focus tool
@@ -219,18 +219,18 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info)
// ...clicked on a world object, so focus at its position
if (!hit_obj->isHUDAttachment())
{
- gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE);
+ gAgentCamera.setFocusOnAvatar(false, ANIMATE);
gAgentCamera.setFocusGlobal(pick_info);
}
}
else if (!pick_info.mPosGlobal.isExactlyZero())
{
// Hit the ground
- gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE);
+ gAgentCamera.setFocusOnAvatar(false, ANIMATE);
gAgentCamera.setFocusGlobal(pick_info);
}
- BOOL zoom_tool = gCameraBtnZoom && (LLToolMgr::getInstance()->getBaseTool() == LLToolCamera::getInstance());
+ bool zoom_tool = gCameraBtnZoom && (LLToolMgr::getInstance()->getBaseTool() == LLToolCamera::getInstance());
if (!(pick_info.mKeyMask & MASK_ALT) &&
!LLFloaterCamera::inFreeCameraMode() &&
!zoom_tool &&
@@ -240,16 +240,16 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info)
(hit_obj == gAgentAvatarp ||
(hit_obj && hit_obj->isAttachment() && LLVOAvatar::findAvatarFromAttachment(hit_obj)->isSelf())))
{
- LLToolCamera::getInstance()->mMouseSteering = TRUE;
+ LLToolCamera::getInstance()->mMouseSteering = true;
}
}
- camera->mValidClickPoint = TRUE;
+ camera->mValidClickPoint = true;
if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode() )
{
- gAgentCamera.setFocusOnAvatar(FALSE, FALSE);
+ gAgentCamera.setFocusOnAvatar(false, false);
LLVector3d cam_pos = gAgentCamera.getCameraPositionGlobal();
@@ -276,14 +276,14 @@ void LLToolCamera::releaseMouse()
LLToolMgr::getInstance()->clearTransientTool();
}
- mMouseSteering = FALSE;
- mValidClickPoint = FALSE;
- mOutsideSlopX = FALSE;
- mOutsideSlopY = FALSE;
+ mMouseSteering = false;
+ mValidClickPoint = false;
+ mOutsideSlopX = false;
+ mOutsideSlopY = false;
}
-BOOL LLToolCamera::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLToolCamera::handleMouseUp(S32 x, S32 y, MASK mask)
{
// Claim that we're mousing up somewhere
mMouseUpX = x;
@@ -301,7 +301,7 @@ BOOL LLToolCamera::handleMouseUp(S32 x, S32 y, MASK mask)
{
LLCoordGL mouse_pos;
LLVector3 focus_pos = gAgent.getPosAgentFromGlobal(gAgentCamera.getFocusGlobal());
- BOOL success = LLViewerCamera::getInstance()->projectPosAgentToScreen(focus_pos, mouse_pos);
+ bool success = LLViewerCamera::getInstance()->projectPosAgentToScreen(focus_pos, mouse_pos);
if (success)
{
LLUI::getInstance()->setMousePositionScreen(mouse_pos.mX, mouse_pos.mY);
@@ -324,18 +324,18 @@ BOOL LLToolCamera::handleMouseUp(S32 x, S32 y, MASK mask)
}
// calls releaseMouse() internally
- setMouseCapture(FALSE);
+ setMouseCapture(false);
}
else
{
releaseMouse();
}
- return TRUE;
+ return true;
}
-BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
+bool LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
{
S32 dx = gViewerWindow->getCurrentMouseDX();
S32 dy = gViewerWindow->getCurrentMouseDY();
@@ -347,12 +347,12 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
if (mAccumX >= SLOP_RANGE)
{
- mOutsideSlopX = TRUE;
+ mOutsideSlopX = true;
}
if (mAccumY >= SLOP_RANGE)
{
- mOutsideSlopY = TRUE;
+ mOutsideSlopY = true;
}
}
@@ -363,7 +363,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
LL_DEBUGS("UserInput") << "hover handled by LLToolFocus [invalid point]" << LL_ENDL;
gViewerWindow->setCursor(UI_CURSOR_NO);
gViewerWindow->showCursor();
- return TRUE;
+ return true;
}
if (gCameraBtnOrbit ||
@@ -468,7 +468,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
gViewerWindow->setCursor(UI_CURSOR_TOOLZOOMIN);
}
- return TRUE;
+ return true;
}
diff --git a/indra/newview/lltoolfocus.h b/indra/newview/lltoolfocus.h
index 54d9827ae6..ada619703d 100644
--- a/indra/newview/lltoolfocus.h
+++ b/indra/newview/lltoolfocus.h
@@ -38,9 +38,9 @@ class LLToolCamera
virtual ~LLToolCamera();
public:
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleHover(S32 x, S32 y, MASK mask) override;
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask) override;
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask) override;
+ virtual bool handleHover(S32 x, S32 y, MASK mask) override;
virtual void onMouseCaptureLost() override;
@@ -51,7 +51,7 @@ public:
void setClickPickPending() { mClickPickPending = true; }
static void pickCallback(const LLPickInfo& pick_info);
- BOOL mouseSteerMode() { return mMouseSteering; }
+ bool mouseSteerMode() { return mMouseSteering; }
protected:
// called from handleMouseUp and onMouseCaptureLost to "let go"
@@ -63,20 +63,20 @@ protected:
S32 mAccumY;
S32 mMouseDownX;
S32 mMouseDownY;
- BOOL mOutsideSlopX;
- BOOL mOutsideSlopY;
- BOOL mValidClickPoint;
+ bool mOutsideSlopX;
+ bool mOutsideSlopY;
+ bool mValidClickPoint;
bool mClickPickPending;
- BOOL mValidSelection;
- BOOL mMouseSteering;
+ bool mValidSelection;
+ bool mMouseSteering;
S32 mMouseUpX; // needed for releaseMouse()
S32 mMouseUpY;
MASK mMouseUpMask;
};
-extern BOOL gCameraBtnOrbit;
-extern BOOL gCameraBtnPan;
-extern BOOL gCameraBtnZoom;
+extern bool gCameraBtnOrbit;
+extern bool gCameraBtnPan;
+extern bool gCameraBtnZoom;
#endif
diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp
index 897f8c1e5f..be713cf83f 100644
--- a/indra/newview/lltoolgrab.cpp
+++ b/indra/newview/lltoolgrab.cpp
@@ -62,10 +62,10 @@
const S32 SLOP_DIST_SQ = 4;
// Override modifier key behavior with these buttons
-BOOL gGrabBtnVertical = FALSE;
-BOOL gGrabBtnSpin = FALSE;
+bool gGrabBtnVertical = false;
+bool gGrabBtnSpin = false;
LLTool* gGrabTransientTool = NULL;
-extern BOOL gDebugClicks;
+extern bool gDebugClicks;
//
// Methods
@@ -73,20 +73,20 @@ extern BOOL gDebugClicks;
LLToolGrabBase::LLToolGrabBase( LLToolComposite* composite )
: LLTool( std::string("Grab"), composite ),
mMode( GRAB_INACTIVE ),
- mVerticalDragging( FALSE ),
- mHitLand(FALSE),
+ mVerticalDragging( false ),
+ mHitLand(false),
mLastMouseX(0),
mLastMouseY(0),
mAccumDeltaX(0),
mAccumDeltaY(0),
- mHasMoved( FALSE ),
- mOutsideSlop(FALSE),
- mDeselectedThisClick(FALSE),
+ mHasMoved( false ),
+ mOutsideSlop(false),
+ mDeselectedThisClick(false),
mLastFace(0),
- mSpinGrabbing( FALSE ),
+ mSpinGrabbing( false ),
mSpinRotation(),
- mClickedInMouselook( FALSE ),
- mHideBuildHighlight(FALSE)
+ mClickedInMouselook( false ),
+ mHideBuildHighlight(false)
{ }
LLToolGrabBase::~LLToolGrabBase()
@@ -103,19 +103,19 @@ void LLToolGrabBase::handleSelect()
// in case we start from tools floater, we count any selection as valid
mValidSelection = gFloaterTools->getVisible();
}
- gGrabBtnVertical = FALSE;
- gGrabBtnSpin = FALSE;
+ gGrabBtnVertical = false;
+ gGrabBtnSpin = false;
}
void LLToolGrabBase::handleDeselect()
{
if( hasMouseCapture() )
{
- setMouseCapture( FALSE );
+ setMouseCapture( false );
}
// Make sure that temporary(invalid) selection won't pass anywhere except pie tool.
- MASK override_mask = gKeyboard ? gKeyboard->currentMask(TRUE) : 0;
+ MASK override_mask = gKeyboard ? gKeyboard->currentMask(true) : 0;
if (!mValidSelection && (override_mask != MASK_NONE || (gFloaterTools && gFloaterTools->getVisible())))
{
LLMenuGL::sMenuContainer->hideMenus();
@@ -124,17 +124,17 @@ void LLToolGrabBase::handleDeselect()
}
-BOOL LLToolGrabBase::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLToolGrabBase::handleDoubleClick(S32 x, S32 y, MASK mask)
{
if (gDebugClicks)
{
LL_INFOS() << "LLToolGrab handleDoubleClick (becoming mouseDown)" << LL_ENDL;
}
- return FALSE;
+ return false;
}
-BOOL LLToolGrabBase::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLToolGrabBase::handleMouseDown(S32 x, S32 y, MASK mask)
{
if (gDebugClicks)
{
@@ -147,7 +147,7 @@ BOOL LLToolGrabBase::handleMouseDown(S32 x, S32 y, MASK mask)
if (!gAgent.leftButtonGrabbed() || ((mask & DEFAULT_GRAB_MASK) != 0 && !gAgentCamera.cameraMouselook()))
{
// can grab transparent objects (how touch event propagates, scripters rely on this)
- gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ TRUE);
+ gViewerWindow->pickAsync(x, y, mask, pickCallback, /*bool pick_transparent*/ true);
}
mClickedInMouselook = gAgentCamera.cameraMouselook();
@@ -163,7 +163,7 @@ BOOL LLToolGrabBase::handleMouseDown(S32 x, S32 y, MASK mask)
// Todo: LLToolGrabBase probably shouldn't consume the event if there is nothing
// to grab in Mouselook, it intercepts handling in scanMouse
}
- return TRUE;
+ return true;
}
void LLToolGrabBase::pickCallback(const LLPickInfo& pick_info)
@@ -171,22 +171,22 @@ void LLToolGrabBase::pickCallback(const LLPickInfo& pick_info)
LLToolGrab::getInstance()->mGrabPick = pick_info;
LLViewerObject *objectp = pick_info.getObject();
- BOOL extend_select = (pick_info.mKeyMask & MASK_SHIFT);
+ bool extend_select = (pick_info.mKeyMask & MASK_SHIFT);
if (!extend_select && !LLSelectMgr::getInstance()->getSelection()->isEmpty())
{
LLSelectMgr::getInstance()->deselectAll();
- LLToolGrab::getInstance()->mDeselectedThisClick = TRUE;
+ LLToolGrab::getInstance()->mDeselectedThisClick = true;
}
else
{
- LLToolGrab::getInstance()->mDeselectedThisClick = FALSE;
+ LLToolGrab::getInstance()->mDeselectedThisClick = false;
}
// if not over object, do nothing
if (!objectp)
{
- LLToolGrab::getInstance()->setMouseCapture(TRUE);
+ LLToolGrab::getInstance()->setMouseCapture(true);
LLToolGrab::getInstance()->mMode = GRAB_NOOBJECT;
LLToolGrab::getInstance()->mGrabPick.mObjectID.setNull();
}
@@ -196,7 +196,7 @@ void LLToolGrabBase::pickCallback(const LLPickInfo& pick_info)
}
}
-BOOL LLToolGrabBase::handleObjectHit(const LLPickInfo& info)
+bool LLToolGrabBase::handleObjectHit(const LLPickInfo& info)
{
mGrabPick = info;
LLViewerObject* objectp = mGrabPick.getObject();
@@ -208,8 +208,8 @@ BOOL LLToolGrabBase::handleObjectHit(const LLPickInfo& info)
if (NULL == objectp) // unexpected
{
- LL_WARNS() << "objectp was NULL; returning FALSE" << LL_ENDL;
- return FALSE;
+ LL_WARNS() << "objectp was NULL; returning false" << LL_ENDL;
+ return false;
}
if (objectp->isAvatar())
@@ -219,16 +219,16 @@ BOOL LLToolGrabBase::handleObjectHit(const LLPickInfo& info)
gBasicToolset->selectTool( gGrabTransientTool );
gGrabTransientTool = NULL;
}
- return TRUE;
+ return true;
}
- setMouseCapture( TRUE );
+ setMouseCapture( true );
// Grabs always start from the root
// objectp = (LLViewerObject *)objectp->getRoot();
LLViewerObject* parent = objectp->getRootEdit();
- BOOL script_touch = (objectp->flagHandleTouch()) || (parent && parent->flagHandleTouch());
+ bool script_touch = (objectp->flagHandleTouch()) || (parent && parent->flagHandleTouch());
// Clicks on scripted or physical objects are temporary grabs, so
// not "Build mode"
@@ -291,8 +291,8 @@ BOOL LLToolGrabBase::handleObjectHit(const LLPickInfo& info)
mLastMouseY = gViewerWindow->getCurrentMouseY();
mAccumDeltaX = 0;
mAccumDeltaY = 0;
- mHasMoved = FALSE;
- mOutsideSlop = FALSE;
+ mHasMoved = false;
+ mOutsideSlop = false;
mVerticalDragging = (info.mKeyMask == MASK_VERTICAL) || gGrabBtnVertical;
@@ -325,7 +325,7 @@ BOOL LLToolGrabBase::handleObjectHit(const LLPickInfo& info)
gGrabTransientTool = NULL;
}
- return TRUE;
+ return true;
}
@@ -336,7 +336,7 @@ void LLToolGrabBase::startSpin()
{
return;
}
- mSpinGrabbing = TRUE;
+ mSpinGrabbing = true;
// Was saveSelectedObjectTransform()
LLViewerObject *root = (LLViewerObject *)objectp->getRoot();
@@ -355,7 +355,7 @@ void LLToolGrabBase::startSpin()
void LLToolGrabBase::stopSpin()
{
- mSpinGrabbing = FALSE;
+ mSpinGrabbing = false;
LLViewerObject* objectp = mGrabPick.getObject();
if (!objectp)
@@ -436,13 +436,13 @@ void LLToolGrabBase::startGrab()
}
-BOOL LLToolGrabBase::handleHover(S32 x, S32 y, MASK mask)
+bool LLToolGrabBase::handleHover(S32 x, S32 y, MASK mask)
{
if (!gViewerWindow->getLeftMouseDown())
{
gViewerWindow->setCursor(UI_CURSOR_TOOLGRAB);
- setMouseCapture(FALSE);
- return TRUE;
+ setMouseCapture(false);
+ return true;
}
// Do the right hover based on mode
@@ -470,7 +470,7 @@ BOOL LLToolGrabBase::handleHover(S32 x, S32 y, MASK mask)
mLastMouseX = x;
mLastMouseY = y;
- return TRUE;
+ return true;
}
const F32 GRAB_SENSITIVITY_X = 0.0075f;
@@ -487,7 +487,7 @@ void LLToolGrabBase::handleHoverActive(S32 x, S32 y, MASK mask)
if (objectp->isDead())
{
// Bail out of drag because object has been killed
- setMouseCapture(FALSE);
+ setMouseCapture(false);
return;
}
@@ -499,12 +499,12 @@ void LLToolGrabBase::handleHoverActive(S32 x, S32 y, MASK mask)
if ((mask == MASK_VERTICAL)
|| (gGrabBtnVertical && (mask != MASK_SPIN)))
{
- vertical_dragging = TRUE;
+ vertical_dragging = true;
}
else if ((mask == MASK_SPIN)
|| (gGrabBtnSpin && (mask != MASK_VERTICAL)))
{
- spin_grabbing = TRUE;
+ spin_grabbing = true;
}
//--------------------------------------------------
@@ -552,11 +552,11 @@ void LLToolGrabBase::handleHoverActive(S32 x, S32 y, MASK mask)
S32 dist_sq = mAccumDeltaX * mAccumDeltaX + mAccumDeltaY * mAccumDeltaY;
if (dist_sq > SLOP_DIST_SQ)
{
- mOutsideSlop = TRUE;
+ mOutsideSlop = true;
}
// mouse has moved outside center
- mHasMoved = TRUE;
+ mHasMoved = true;
if (mSpinGrabbing)
{
@@ -628,7 +628,7 @@ void LLToolGrabBase::handleHoverActive(S32 x, S32 y, MASK mask)
/* Snap to grid disabled for grab tool - very confusing
// Handle snapping to grid, but only when the tool is formally selected.
- BOOL snap_on = gSavedSettings.getBOOL("SnapEnabled");
+ bool snap_on = gSavedSettings.getBOOL("SnapEnabled");
if (snap_on && !gGrabTransientTool)
{
F64 snap_size = gSavedSettings.getF32("GridResolution");
@@ -741,7 +741,7 @@ void LLToolGrabBase::handleHoverActive(S32 x, S32 y, MASK mask)
// force focus to point in space where we were looking previously
// Example of use: follow cam scripts shouldn't affect you when movng objects arouns
gAgentCamera.setFocusGlobal(gAgentCamera.calcFocusPositionTargetGlobal(), LLUUID::null);
- gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE);
+ gAgentCamera.setFocusOnAvatar(false, ANIMATE);
}
}
else
@@ -764,7 +764,7 @@ void LLToolGrabBase::handleHoverNonPhysical(S32 x, S32 y, MASK mask)
if (objectp->isDead())
{
// Bail out of drag because object has been killed
- setMouseCapture(FALSE);
+ setMouseCapture(false);
return;
}
@@ -782,7 +782,7 @@ void LLToolGrabBase::handleHoverNonPhysical(S32 x, S32 y, MASK mask)
LLVector3 grab_pos_region(0,0,0);
- const BOOL SUPPORT_LLDETECTED_GRAB = TRUE;
+ const bool SUPPORT_LLDETECTED_GRAB = true;
if (SUPPORT_LLDETECTED_GRAB)
{
//--------------------------------------------------
@@ -790,13 +790,13 @@ void LLToolGrabBase::handleHoverNonPhysical(S32 x, S32 y, MASK mask)
//--------------------------------------------------
if (!(mask == MASK_VERTICAL) && !gGrabBtnVertical)
{
- mVerticalDragging = FALSE;
+ mVerticalDragging = false;
}
else if ((gGrabBtnVertical && (mask != MASK_SPIN))
|| (mask == MASK_VERTICAL))
{
- mVerticalDragging = TRUE;
+ mVerticalDragging = true;
}
S32 dx = x - mLastMouseX;
@@ -810,11 +810,11 @@ void LLToolGrabBase::handleHoverNonPhysical(S32 x, S32 y, MASK mask)
S32 dist_sq = mAccumDeltaX * mAccumDeltaX + mAccumDeltaY * mAccumDeltaY;
if (dist_sq > SLOP_DIST_SQ)
{
- mOutsideSlop = TRUE;
+ mOutsideSlop = true;
}
// mouse has moved
- mHasMoved = TRUE;
+ mHasMoved = true;
//------------------------------------------------------
// Handle grabbing
@@ -853,7 +853,7 @@ void LLToolGrabBase::handleHoverNonPhysical(S32 x, S32 y, MASK mask)
// only send message if something has changed since last message
- BOOL changed_since_last_update = FALSE;
+ bool changed_since_last_update = false;
// test if touch data needs to be updated
if ((pick.mObjectFace != mLastFace) ||
@@ -864,7 +864,7 @@ void LLToolGrabBase::handleHoverNonPhysical(S32 x, S32 y, MASK mask)
(pick.mBinormal != mLastBinormal) ||
(grab_pos_region != mLastGrabPos))
{
- changed_since_last_update = TRUE;
+ changed_since_last_update = true;
}
if (changed_since_last_update)
@@ -935,7 +935,7 @@ void LLToolGrabBase::handleHoverFailed(S32 x, S32 y, MASK mask)
S32 dist_sq = (x-mGrabPick.mMousePt.mX) * (x-mGrabPick.mMousePt.mX) + (y-mGrabPick.mMousePt.mY) * (y-mGrabPick.mMousePt.mY);
if( mOutsideSlop || dist_sq > SLOP_DIST_SQ )
{
- mOutsideSlop = TRUE;
+ mOutsideSlop = true;
switch( mMode )
{
@@ -964,7 +964,7 @@ void LLToolGrabBase::handleHoverFailed(S32 x, S32 y, MASK mask)
-BOOL LLToolGrabBase::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLToolGrabBase::handleMouseUp(S32 x, S32 y, MASK mask)
{
LLTool::handleMouseUp(x, y, mask);
@@ -980,14 +980,14 @@ BOOL LLToolGrabBase::handleMouseUp(S32 x, S32 y, MASK mask)
if( hasMouseCapture() )
{
- setMouseCapture( FALSE );
+ setMouseCapture( false );
}
mMode = GRAB_INACTIVE;
if(mClickedInMouselook && !gAgentCamera.cameraMouselook())
{
- mClickedInMouselook = FALSE;
+ mClickedInMouselook = false;
}
else
{
@@ -1001,14 +1001,14 @@ BOOL LLToolGrabBase::handleMouseUp(S32 x, S32 y, MASK mask)
//gAgent.setObjectTracking(gSavedSettings.getBOOL("TrackFocusObject"));
- return TRUE;
+ return true;
}
void LLToolGrabBase::stopEditing()
{
if( hasMouseCapture() )
{
- setMouseCapture( FALSE );
+ setMouseCapture( false );
}
}
@@ -1057,7 +1057,7 @@ void LLToolGrabBase::onMouseCaptureLost()
mMode = GRAB_INACTIVE;
- mHideBuildHighlight = FALSE;
+ mHideBuildHighlight = false;
mGrabPick.mObjectID.setNull();
@@ -1096,7 +1096,7 @@ void LLToolGrabBase::stopGrab()
case GRAB_NONPHYSICAL:
case GRAB_LOCKED:
send_ObjectDeGrab_message(objectp, pick);
- mVerticalDragging = FALSE;
+ mVerticalDragging = false;
break;
case GRAB_NOOBJECT:
@@ -1106,7 +1106,7 @@ void LLToolGrabBase::stopGrab()
break;
}
- mHideBuildHighlight = FALSE;
+ mHideBuildHighlight = false;
}
@@ -1116,7 +1116,7 @@ void LLToolGrabBase::draw()
void LLToolGrabBase::render()
{ }
-BOOL LLToolGrabBase::isEditing()
+bool LLToolGrabBase::isEditing()
{
return (mGrabPick.getObject().notNull());
}
diff --git a/indra/newview/lltoolgrab.h b/indra/newview/lltoolgrab.h
index ce0de0f946..99a67d45c8 100644
--- a/indra/newview/lltoolgrab.h
+++ b/indra/newview/lltoolgrab.h
@@ -58,10 +58,10 @@ public:
LLToolGrabBase(LLToolComposite* composite=NULL);
~LLToolGrabBase();
- /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleDoubleClick(S32 x, S32 y, MASK mask);
/*virtual*/ void render(); // 3D elements
/*virtual*/ void draw(); // 2D elements
@@ -70,21 +70,21 @@ public:
virtual LLViewerObject* getEditingObject();
virtual LLVector3d getEditingPointGlobal();
- virtual BOOL isEditing();
+ virtual bool isEditing();
virtual void stopEditing();
virtual void onMouseCaptureLost();
- BOOL hasGrabOffset() { return TRUE; } // HACK
+ bool hasGrabOffset() { return true; } // HACK
LLVector3 getGrabOffset(S32 x, S32 y); // HACK
// Capture the mouse and start grabbing.
- BOOL handleObjectHit(const LLPickInfo& info);
+ bool handleObjectHit(const LLPickInfo& info);
// Certain grabs should not highlight the "Build" toolbar button
- BOOL getHideBuildHighlight() { return mHideBuildHighlight; }
+ bool getHideBuildHighlight() { return mHideBuildHighlight; }
- void setClickedInMouselook(BOOL is_clickedInMouselook) {mClickedInMouselook = is_clickedInMouselook;}
+ void setClickedInMouselook(bool is_clickedInMouselook) {mClickedInMouselook = is_clickedInMouselook;}
static void pickCallback(const LLPickInfo& pick_info);
private:
@@ -106,9 +106,9 @@ private:
EGrabMode mMode;
- BOOL mVerticalDragging;
+ bool mVerticalDragging;
- BOOL mHitLand;
+ bool mHitLand;
LLTimer mGrabTimer; // send simulator time between hover movements
@@ -124,10 +124,10 @@ private:
S32 mLastMouseY;
S32 mAccumDeltaX; // since cursor hidden, how far have you moved?
S32 mAccumDeltaY;
- BOOL mHasMoved; // has mouse moved off center at all?
- BOOL mOutsideSlop; // has mouse moved outside center 5 pixels?
- BOOL mDeselectedThisClick;
- BOOL mValidSelection;
+ bool mHasMoved; // has mouse moved off center at all?
+ bool mOutsideSlop; // has mouse moved outside center 5 pixels?
+ bool mDeselectedThisClick;
+ bool mValidSelection;
S32 mLastFace;
LLVector2 mLastUVCoords;
@@ -138,12 +138,12 @@ private:
LLVector3 mLastGrabPos;
- BOOL mSpinGrabbing;
+ bool mSpinGrabbing;
LLQuaternion mSpinRotation;
- BOOL mHideBuildHighlight;
+ bool mHideBuildHighlight;
- BOOL mClickedInMouselook;
+ bool mClickedInMouselook;
};
/// This is the LLSingleton instance of LLToolGrab.
@@ -152,8 +152,8 @@ class LLToolGrab : public LLToolGrabBase, public LLSingleton<LLToolGrab>
LLSINGLETON_EMPTY_CTOR(LLToolGrab);
};
-extern BOOL gGrabBtnVertical;
-extern BOOL gGrabBtnSpin;
+extern bool gGrabBtnVertical;
+extern bool gGrabBtnSpin;
extern LLTool* gGrabTransientTool;
#endif // LL_TOOLGRAB_H
diff --git a/indra/newview/lltoolgun.cpp b/indra/newview/lltoolgun.cpp
index 9539081f30..0dc6356a59 100644
--- a/indra/newview/lltoolgun.cpp
+++ b/indra/newview/lltoolgun.cpp
@@ -48,7 +48,7 @@
LLToolGun::LLToolGun( LLToolComposite* composite )
: LLTool( std::string("gun"), composite ),
- mIsSelected(FALSE)
+ mIsSelected(false)
{
}
@@ -56,19 +56,19 @@ void LLToolGun::handleSelect()
{
gViewerWindow->hideCursor();
gViewerWindow->moveCursorToCenter();
- gViewerWindow->getWindow()->setMouseClipping(TRUE);
- mIsSelected = TRUE;
+ gViewerWindow->getWindow()->setMouseClipping(true);
+ mIsSelected = true;
}
void LLToolGun::handleDeselect()
{
gViewerWindow->moveCursorToCenter();
gViewerWindow->showCursor();
- gViewerWindow->getWindow()->setMouseClipping(FALSE);
- mIsSelected = FALSE;
+ gViewerWindow->getWindow()->setMouseClipping(false);
+ mIsSelected = false;
}
-BOOL LLToolGun::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLToolGun::handleMouseDown(S32 x, S32 y, MASK mask)
{
gGrabTransientTool = this;
LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolGrab::getInstance() );
@@ -76,7 +76,7 @@ BOOL LLToolGun::handleMouseDown(S32 x, S32 y, MASK mask)
return LLToolGrab::getInstance()->handleMouseDown(x, y, mask);
}
-BOOL LLToolGun::handleHover(S32 x, S32 y, MASK mask)
+bool LLToolGun::handleHover(S32 x, S32 y, MASK mask)
{
if( gAgentCamera.cameraMouselook() && mIsSelected )
{
@@ -133,7 +133,7 @@ BOOL LLToolGun::handleHover(S32 x, S32 y, MASK mask)
// HACK to avoid assert: error checking system makes sure that the cursor is set during every handleHover. This is actually a no-op since the cursor is hidden.
gViewerWindow->setCursor(UI_CURSOR_ARROW);
- return TRUE;
+ return true;
}
void LLToolGun::draw()
diff --git a/indra/newview/lltoolgun.h b/indra/newview/lltoolgun.h
index 8ae926b741..8870a8fda3 100644
--- a/indra/newview/lltoolgun.h
+++ b/indra/newview/lltoolgun.h
@@ -41,13 +41,13 @@ public:
virtual void handleSelect();
virtual void handleDeselect();
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- virtual BOOL handleHover(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleHover(S32 x, S32 y, MASK mask);
virtual LLTool* getOverrideTool(MASK mask) { return NULL; }
- virtual BOOL clipMouseWhenDown() { return FALSE; }
+ virtual bool clipMouseWhenDown() { return false; }
private:
- BOOL mIsSelected;
+ bool mIsSelected;
};
#endif
diff --git a/indra/newview/lltoolindividual.cpp b/indra/newview/lltoolindividual.cpp
index 885c1442a0..bf31f77f49 100644
--- a/indra/newview/lltoolindividual.cpp
+++ b/indra/newview/lltoolindividual.cpp
@@ -66,10 +66,10 @@ LLToolIndividual::~LLToolIndividual()
{
}
-BOOL LLToolIndividual::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLToolIndividual::handleMouseDown(S32 x, S32 y, MASK mask)
{
gViewerWindow->pickAsync(x, y, mask, pickCallback);
- return TRUE;
+ return true;
}
void LLToolIndividual::pickCallback(const LLPickInfo& pick_info)
@@ -82,26 +82,26 @@ void LLToolIndividual::pickCallback(const LLPickInfo& pick_info)
}
}
-BOOL LLToolIndividual::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLToolIndividual::handleDoubleClick(S32 x, S32 y, MASK mask)
{
if(!LLSelectMgr::getInstance()->getSelection()->isEmpty())
{
// You should already have an object selected from the mousedown.
// If so, show its inventory.
LLFloaterReg::showInstance("build", "Content");
- return TRUE;
+ return true;
}
else
{
// Nothing selected means the first mouse click was probably
// bad, so try again.
- return FALSE;
+ return false;
}
}
void LLToolIndividual::handleSelect()
{
- const BOOL children_ok = TRUE;
+ const bool children_ok = true;
LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(children_ok);
LLSelectMgr::getInstance()->deselectAll();
if(obj)
diff --git a/indra/newview/lltoolindividual.h b/indra/newview/lltoolindividual.h
index 89dd9d9796..73ab6bd1af 100644
--- a/indra/newview/lltoolindividual.h
+++ b/indra/newview/lltoolindividual.h
@@ -43,8 +43,8 @@ class LLToolIndividual : public LLTool, public LLSingleton<LLToolIndividual>
virtual ~LLToolIndividual();
public:
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask) override;
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask) override;
+ virtual bool handleDoubleClick(S32 x, S32 y, MASK mask) override;
virtual void handleSelect() override;
static void pickCallback(const LLPickInfo& pick_info);
diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp
index fa2dd60ee0..63545ee5b0 100644
--- a/indra/newview/lltoolmgr.cpp
+++ b/indra/newview/lltoolmgr.cpp
@@ -102,12 +102,12 @@ LLToolMgr::LLToolMgr()
void LLToolMgr::initTools()
{
- static BOOL initialized = FALSE;
+ static bool initialized = false;
if(initialized)
{
return;
}
- initialized = TRUE;
+ initialized = true;
gBasicToolset->addTool( LLToolPie::getInstance() );
gBasicToolset->addTool( LLToolCamera::getInstance() );
gCameraToolset->addTool( LLToolCamera::getInstance() );
@@ -143,9 +143,9 @@ LLToolMgr::~LLToolMgr()
gToolNull = NULL;
}
-BOOL LLToolMgr::usingTransientTool()
+bool LLToolMgr::usingTransientTool()
{
- return mTransientTool ? TRUE : FALSE;
+ return mTransientTool ? true : false;
}
void LLToolMgr::setCurrentToolset(LLToolset* current)
@@ -188,7 +188,7 @@ void LLToolMgr::setCurrentTool( LLTool* tool )
LLTool* LLToolMgr::getCurrentTool()
{
- MASK override_mask = gKeyboard ? gKeyboard->currentMask(TRUE) : 0;
+ MASK override_mask = gKeyboard ? gKeyboard->currentMask(true) : 0;
LLTool* cur_tool = NULL;
// always use transient tools if available
@@ -301,7 +301,7 @@ void LLToolMgr::toggleBuildMode(const LLSD& sdname)
if (gAgentCamera.getFocusOnAvatar())
{
// zoom in if we're looking at the avatar
- gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE);
+ gAgentCamera.setFocusOnAvatar(false, ANIMATE);
gAgentCamera.setFocusGlobal(gAgent.getPositionGlobal() + 2.0 * LLVector3d(gAgent.getAtAxis()));
gAgentCamera.cameraZoomIn(0.666f);
gAgentCamera.cameraOrbitOver( 30.f * DEG_TO_RAD );
@@ -459,7 +459,7 @@ void LLToolset::selectToolByIndex( S32 index )
}
}
-BOOL LLToolset::isToolSelected( S32 index )
+bool LLToolset::isToolSelected( S32 index )
{
LLTool *tool = (index >= 0 && index < (S32)mToolList.size()) ? mToolList[index] : NULL;
return (tool == mSelectedTool);
diff --git a/indra/newview/lltoolmgr.h b/indra/newview/lltoolmgr.h
index 28465d5d2c..1bcc8c50e2 100644
--- a/indra/newview/lltoolmgr.h
+++ b/indra/newview/lltoolmgr.h
@@ -64,7 +64,7 @@ public:
void setTransientTool(LLTool* tool);
void clearTransientTool();
- BOOL usingTransientTool();
+ bool usingTransientTool();
void setCurrentToolset(LLToolset* current);
LLToolset* getCurrentToolset();
@@ -106,7 +106,7 @@ public:
void handleScrollWheel(S32 clicks);
- BOOL isToolSelected( S32 index );
+ bool isToolSelected( S32 index );
void setShowFloaterTools(bool pShowFloaterTools) {mIsShowFloaterTools = pShowFloaterTools;};
bool isShowFloaterTools() const {return mIsShowFloaterTools;};
diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp
index d99c0ba2a6..35b2076ede 100644
--- a/indra/newview/lltoolmorph.cpp
+++ b/indra/newview/lltoolmorph.cpp
@@ -62,7 +62,7 @@
//static
LLVisualParamHint::instance_list_t LLVisualParamHint::sInstances;
-BOOL LLVisualParamReset::sDirty = FALSE;
+bool LLVisualParamReset::sDirty = false;
//-----------------------------------------------------------------------------
// LLVisualParamHint()
@@ -78,14 +78,14 @@ LLVisualParamHint::LLVisualParamHint(
F32 param_weight,
LLJoint* jointp)
:
- LLViewerDynamicTexture(width, height, 3, LLViewerDynamicTexture::ORDER_MIDDLE, TRUE ),
- mNeedsUpdate( TRUE ),
- mIsVisible( FALSE ),
+ LLViewerDynamicTexture(width, height, 3, LLViewerDynamicTexture::ORDER_MIDDLE, true ),
+ mNeedsUpdate( true ),
+ mIsVisible( false ),
mJointMesh( mesh ),
mVisualParam( param ),
mWearablePtr( wearable ),
mVisualParamWeight( param_weight ),
- mAllowsUpdates( TRUE ),
+ mAllowsUpdates( true ),
mDelayFrames( 0 ),
mRect( pos_x, pos_y + height, pos_x + width, pos_y ),
mLastParamWeight(0.f),
@@ -128,30 +128,30 @@ void LLVisualParamHint::requestHintUpdates( LLVisualParamHint* exception1, LLVis
{
if( instance->mAllowsUpdates )
{
- instance->mNeedsUpdate = TRUE;
+ instance->mNeedsUpdate = true;
instance->mDelayFrames = delay_frames;
delay_frames++;
}
else
{
- instance->mNeedsUpdate = TRUE;
+ instance->mNeedsUpdate = true;
instance->mDelayFrames = 0;
}
}
}
}
-BOOL LLVisualParamHint::needsRender()
+bool LLVisualParamHint::needsRender()
{
return mNeedsUpdate && mDelayFrames-- <= 0 && !gAgentAvatarp->getIsAppearanceAnimating() && mAllowsUpdates;
}
-void LLVisualParamHint::preRender(BOOL clear_depth)
+void LLVisualParamHint::preRender(bool clear_depth)
{
LLViewerWearable* wearable = (LLViewerWearable*)mWearablePtr;
if (wearable)
{
- wearable->setVolatile(TRUE);
+ wearable->setVolatile(true);
}
mLastParamWeight = mVisualParam->getWeight();
mWearablePtr->setVisualParamWeight(mVisualParam->getID(), mVisualParamWeight);
@@ -179,9 +179,9 @@ void LLVisualParamHint::preRender(BOOL clear_depth)
//-----------------------------------------------------------------------------
// render()
//-----------------------------------------------------------------------------
-BOOL LLVisualParamHint::render()
+bool LLVisualParamHint::render()
{
- LLVisualParamReset::sDirty = TRUE;
+ LLVisualParamReset::sDirty = true;
gGL.pushUIMatrix();
gGL.loadUIIdentity();
@@ -198,7 +198,7 @@ BOOL LLVisualParamHint::render()
gUIProgram.bind();
LLGLSUIDefault gls_ui;
- //LLGLState::verify(TRUE);
+ //LLGLState::verify(true);
mBackgroundp->draw(0, 0, mFullWidth, mFullHeight);
gGL.matrixMode(LLRender::MM_PROJECTION);
@@ -207,8 +207,8 @@ BOOL LLVisualParamHint::render()
gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.popMatrix();
- mNeedsUpdate = FALSE;
- mIsVisible = TRUE;
+ mNeedsUpdate = false;
+ mIsVisible = true;
LLQuaternion avatar_rotation;
LLJoint* root_joint = gAgentAvatarp->getRootJoint();
@@ -237,7 +237,7 @@ BOOL LLVisualParamHint::render()
LLVector3::z_axis, // up
target_pos ); // point of interest
- LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, FALSE);
+ LLViewerCamera::getInstance()->setPerspective(false, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, false);
if (gAgentAvatarp->mDrawable.notNull())
{
@@ -254,7 +254,7 @@ BOOL LLVisualParamHint::render()
LLViewerWearable* wearable = (LLViewerWearable*)mWearablePtr;
if (wearable)
{
- wearable->setVolatile(FALSE);
+ wearable->setVolatile(false);
}
gAgentAvatarp->updateVisualParams();
@@ -262,7 +262,7 @@ BOOL LLVisualParamHint::render()
mGLTexturep->setGLTextureCreated(true);
gGL.popUIMatrix();
- return TRUE;
+ return true;
}
@@ -297,7 +297,7 @@ void LLVisualParamHint::draw(F32 alpha)
//-----------------------------------------------------------------------------
// LLVisualParamReset()
//-----------------------------------------------------------------------------
-LLVisualParamReset::LLVisualParamReset() : LLViewerDynamicTexture(1, 1, 1, ORDER_RESET, FALSE)
+LLVisualParamReset::LLVisualParamReset() : LLViewerDynamicTexture(1, 1, 1, ORDER_RESET, false)
{
}
@@ -310,15 +310,15 @@ S8 LLVisualParamReset::getType() const
//-----------------------------------------------------------------------------
// render()
//-----------------------------------------------------------------------------
-BOOL LLVisualParamReset::render()
+bool LLVisualParamReset::render()
{
if (sDirty)
{
gAgentAvatarp->updateComposites();
gAgentAvatarp->updateVisualParams();
gAgentAvatarp->updateGeometry(gAgentAvatarp->mDrawable);
- sDirty = FALSE;
+ sDirty = false;
}
- return FALSE;
+ return false;
}
diff --git a/indra/newview/lltoolmorph.h b/indra/newview/lltoolmorph.h
index a6889be151..7bcb8b4e02 100644
--- a/indra/newview/lltoolmorph.h
+++ b/indra/newview/lltoolmorph.h
@@ -63,18 +63,18 @@ public:
/*virtual*/ S8 getType() const ;
- BOOL needsRender();
- void preRender(BOOL clear_depth);
- BOOL render();
- void requestUpdate( S32 delay_frames ) {mNeedsUpdate = TRUE; mDelayFrames = delay_frames; }
+ bool needsRender();
+ void preRender(bool clear_depth);
+ bool render();
+ void requestUpdate( S32 delay_frames ) {mNeedsUpdate = true; mDelayFrames = delay_frames; }
void setUpdateDelayFrames( S32 delay_frames ) { mDelayFrames = delay_frames; }
void draw(F32 alpha);
LLViewerVisualParam* getVisualParam() { return mVisualParam; }
F32 getVisualParamWeight() { return mVisualParamWeight; }
- BOOL getVisible() { return mIsVisible; }
+ bool getVisible() { return mIsVisible; }
- void setAllowsUpdates( BOOL b ) { mAllowsUpdates = b; }
+ void setAllowsUpdates( bool b ) { mAllowsUpdates = b; }
const LLRect& getRect() { return mRect; }
@@ -82,13 +82,13 @@ public:
static void requestHintUpdates( LLVisualParamHint* exception1 = NULL, LLVisualParamHint* exception2 = NULL );
protected:
- BOOL mNeedsUpdate; // does this texture need to be re-rendered?
- BOOL mIsVisible; // is this distortion hint visible?
+ bool mNeedsUpdate; // does this texture need to be re-rendered?
+ bool mIsVisible; // is this distortion hint visible?
LLViewerJointMesh* mJointMesh; // mesh that this distortion applies to
LLViewerVisualParam* mVisualParam; // visual param applied by this hint
LLWearable* mWearablePtr; // wearable we're editing
F32 mVisualParamWeight; // weight for this visual parameter
- BOOL mAllowsUpdates; // updates are blocked unless this is true
+ bool mAllowsUpdates; // updates are blocked unless this is true
S32 mDelayFrames; // updates are blocked for this many frames
LLRect mRect;
F32 mLastParamWeight;
@@ -107,10 +107,10 @@ protected:
/*virtual */ ~LLVisualParamReset(){}
public:
LLVisualParamReset();
- /*virtual */ BOOL render();
+ /*virtual */ bool render();
/*virtual*/ S8 getType() const ;
- static BOOL sDirty;
+ static bool sDirty;
};
#endif
diff --git a/indra/newview/lltoolobjpicker.cpp b/indra/newview/lltoolobjpicker.cpp
index 0d9fe9e577..3d3855030e 100644
--- a/indra/newview/lltoolobjpicker.cpp
+++ b/indra/newview/lltoolobjpicker.cpp
@@ -47,18 +47,18 @@
LLToolObjPicker::LLToolObjPicker()
: LLTool( std::string("ObjPicker"), NULL ),
- mPicked( FALSE ),
+ mPicked( false ),
mHitObjectID( LLUUID::null ),
mExitCallback( NULL ),
mExitCallbackData( NULL )
{ }
-// returns TRUE if an object was selected
-BOOL LLToolObjPicker::handleMouseDown(S32 x, S32 y, MASK mask)
+// returns true if an object was selected
+bool LLToolObjPicker::handleMouseDown(S32 x, S32 y, MASK mask)
{
LLRootView* viewp = gViewerWindow->getRootView();
- BOOL handled = viewp->handleMouseDown(x, y, mask);
+ bool handled = viewp->handleMouseDown(x, y, mask);
mHitObjectID.setNull();
@@ -66,13 +66,13 @@ BOOL LLToolObjPicker::handleMouseDown(S32 x, S32 y, MASK mask)
{
// didn't click in any UI object, so must have clicked in the world
gViewerWindow->pickAsync(x, y, mask, pickCallback);
- handled = TRUE;
+ handled = true;
}
else
{
if (hasMouseCapture())
{
- setMouseCapture(FALSE);
+ setMouseCapture(false);
}
else
{
@@ -93,10 +93,10 @@ void LLToolObjPicker::pickCallback(const LLPickInfo& pick_info)
}
-BOOL LLToolObjPicker::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLToolObjPicker::handleMouseUp(S32 x, S32 y, MASK mask)
{
LLView* viewp = gViewerWindow->getRootView();
- BOOL handled = viewp->handleHover(x, y, mask);
+ bool handled = viewp->handleHover(x, y, mask);
if (handled)
{
// let UI handle this
@@ -105,7 +105,7 @@ BOOL LLToolObjPicker::handleMouseUp(S32 x, S32 y, MASK mask)
LLTool::handleMouseUp(x, y, mask);
if (hasMouseCapture())
{
- setMouseCapture(FALSE);
+ setMouseCapture(false);
}
else
{
@@ -115,10 +115,10 @@ BOOL LLToolObjPicker::handleMouseUp(S32 x, S32 y, MASK mask)
}
-BOOL LLToolObjPicker::handleHover(S32 x, S32 y, MASK mask)
+bool LLToolObjPicker::handleHover(S32 x, S32 y, MASK mask)
{
LLView *viewp = gViewerWindow->getRootView();
- BOOL handled = viewp->handleHover(x, y, mask);
+ bool handled = viewp->handleHover(x, y, mask);
if (!handled)
{
// Used to do pick on hover. Now we just always display the cursor.
@@ -142,7 +142,7 @@ void LLToolObjPicker::onMouseCaptureLost()
mExitCallbackData = NULL;
}
- mPicked = FALSE;
+ mPicked = false;
mHitObjectID.setNull();
}
@@ -157,7 +157,7 @@ void LLToolObjPicker::setExitCallback(void (*callback)(void *), void *callback_d
void LLToolObjPicker::handleSelect()
{
LLTool::handleSelect();
- setMouseCapture(TRUE);
+ setMouseCapture(true);
}
// virtual
@@ -166,7 +166,7 @@ void LLToolObjPicker::handleDeselect()
if (hasMouseCapture())
{
LLTool::handleDeselect();
- setMouseCapture(FALSE);
+ setMouseCapture(false);
}
}
diff --git a/indra/newview/lltoolobjpicker.h b/indra/newview/lltoolobjpicker.h
index a55cd223de..4d120009e3 100644
--- a/indra/newview/lltoolobjpicker.h
+++ b/indra/newview/lltoolobjpicker.h
@@ -38,9 +38,9 @@ class LLToolObjPicker : public LLTool, public LLSingleton<LLToolObjPicker>
LLSINGLETON(LLToolObjPicker);
public:
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleHover(S32 x, S32 y, MASK mask) override;
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask) override;
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask) override;
+ virtual bool handleHover(S32 x, S32 y, MASK mask) override;
virtual void handleSelect() override;
virtual void handleDeselect() override;
@@ -54,7 +54,7 @@ public:
static void pickCallback(const LLPickInfo& pick_info);
protected:
- BOOL mPicked;
+ bool mPicked;
LLUUID mHitObjectID;
void (*mExitCallback)(void *callback_data);
void *mExitCallbackData;
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 83a707472e..884b619208 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -73,7 +73,7 @@
#include "pipeline.h" // setHighlightObject
#include "lluiusage.h"
-extern BOOL gDebugClicks;
+extern bool gDebugClicks;
static void handle_click_action_play();
static void handle_click_action_open_media(LLPointer<LLViewerObject> objectp);
@@ -92,9 +92,9 @@ LLToolPie::LLToolPie()
{
}
-BOOL LLToolPie::handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClickType clicktype, BOOL down)
+bool LLToolPie::handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClickType clicktype, bool down)
{
- BOOL result = LLMouseHandler::handleAnyMouseClick(x, y, mask, clicktype, down);
+ bool result = LLMouseHandler::handleAnyMouseClick(x, y, mask, clicktype, down);
// This override DISABLES the keyboard focus reset that LLTool::handleAnyMouseClick adds.
// LLToolPie will do the right thing in its pick callback.
@@ -102,20 +102,20 @@ BOOL LLToolPie::handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClickType cli
return result;
}
-BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask)
{
if (mDoubleClickTimer.getStarted())
{
mDoubleClickTimer.stop();
}
- mMouseOutsideSlop = FALSE;
+ mMouseOutsideSlop = false;
mMouseDownX = x;
mMouseDownY = y;
LLTimer pick_timer;
- BOOL pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick");
- LLPickInfo transparent_pick = gViewerWindow->pickImmediate(x, y, TRUE /*includes transparent*/, pick_rigged, FALSE, TRUE, FALSE);
- LLPickInfo visible_pick = gViewerWindow->pickImmediate(x, y, FALSE, pick_rigged);
+ bool pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick");
+ LLPickInfo transparent_pick = gViewerWindow->pickImmediate(x, y, true /*includes transparent*/, pick_rigged, false, true, false);
+ LLPickInfo visible_pick = gViewerWindow->pickImmediate(x, y, false, pick_rigged);
LLViewerObject *transp_object = transparent_pick.getObject();
LLViewerObject *visible_object = visible_pick.getObject();
@@ -179,16 +179,16 @@ BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask)
// Spawn context menus on right mouse down so you can drag over and select
// an item.
-BOOL LLToolPie::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLToolPie::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
- BOOL pick_reflection_probe = gSavedSettings.getBOOL("SelectReflectionProbes");
+ bool pick_reflection_probe = gSavedSettings.getBOOL("SelectReflectionProbes");
// don't pick transparent so users can't "pay" transparent objects
mPick = gViewerWindow->pickImmediate(x, y,
- /*BOOL pick_transparent*/ FALSE,
- /*BOOL pick_rigged*/ TRUE,
- /*BOOL pick_particle*/ TRUE,
- /*BOOL pick_unselectable*/ TRUE,
+ /*bool pick_transparent*/ false,
+ /*bool pick_rigged*/ true,
+ /*bool pick_particle*/ true,
+ /*bool pick_unselectable*/ true,
pick_reflection_probe);
mPick.mKeyMask = mask;
@@ -197,18 +197,18 @@ BOOL LLToolPie::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
handleRightClickPick();
}
- return FALSE;
+ return false;
}
-BOOL LLToolPie::handleRightMouseUp(S32 x, S32 y, MASK mask)
+bool LLToolPie::handleRightMouseUp(S32 x, S32 y, MASK mask)
{
LLToolMgr::getInstance()->clearTransientTool();
return LLTool::handleRightMouseUp(x, y, mask);
}
-BOOL LLToolPie::handleScrollWheelAny(S32 x, S32 y, S32 clicks_x, S32 clicks_y)
+bool LLToolPie::handleScrollWheelAny(S32 x, S32 y, S32 clicks_x, S32 clicks_y)
{
- BOOL res = FALSE;
+ bool res = false;
// mHoverPick should have updated on its own and we should have a face
// in LLViewerMediaFocus in case of media, so just reuse mHoverPick
if (mHoverPick.mUVCoords.mV[VX] >= 0.f && mHoverPick.mUVCoords.mV[VY] >= 0.f)
@@ -223,18 +223,18 @@ BOOL LLToolPie::handleScrollWheelAny(S32 x, S32 y, S32 clicks_x, S32 clicks_y)
return res;
}
-BOOL LLToolPie::handleScrollWheel(S32 x, S32 y, S32 clicks)
+bool LLToolPie::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
return handleScrollWheelAny(x, y, 0, clicks);
}
-BOOL LLToolPie::handleScrollHWheel(S32 x, S32 y, S32 clicks)
+bool LLToolPie::handleScrollHWheel(S32 x, S32 y, S32 clicks)
{
return handleScrollWheelAny(x, y, clicks, 0);
}
// True if you selected an object.
-BOOL LLToolPie::handleLeftClickPick()
+bool LLToolPie::handleLeftClickPick()
{
S32 x = mPick.mMousePt.mX;
S32 y = mPick.mMousePt.mY;
@@ -249,7 +249,7 @@ BOOL LLToolPie::handleLeftClickPick()
&& !LLViewerParcelMgr::getInstance()->isCollisionBanned())
{
// if selling passes, just buy one
- void* deselect_when_done = (void*)TRUE;
+ void* deselect_when_done = (void*)true;
LLPanelLandGeneral::onClickBuyPass(deselect_when_done);
}
else
@@ -279,7 +279,7 @@ BOOL LLToolPie::handleLeftClickPick()
if (handleMediaClick(mPick))
{
- return TRUE;
+ return true;
}
// If it's a left-click, and we have a special action, do it.
@@ -307,7 +307,7 @@ BOOL LLToolPie::handleLeftClickPick()
handle_object_sit_or_stand();
// put focus in world when sitting on an object
gFocusMgr.setKeyboardFocus(NULL);
- return TRUE;
+ return true;
} // else nothing (fall through to touch)
}
case CLICK_ACTION_PAY:
@@ -318,13 +318,13 @@ BOOL LLToolPie::handleLeftClickPick()
{
// pay event goes to object actually clicked on
mClickActionObject = object;
- mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE);
+ mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, false, true);
if (LLSelectMgr::getInstance()->selectGetAllValid())
{
// call this right away, since we have all the info we need to continue the action
selectionPropertiesReceived();
}
- return TRUE;
+ return true;
}
}
break;
@@ -332,34 +332,34 @@ BOOL LLToolPie::handleLeftClickPick()
if ( mClickActionBuyEnabled )
{
mClickActionObject = parent;
- mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE, TRUE);
+ mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, false, true, true);
if (LLSelectMgr::getInstance()->selectGetAllValid())
{
// call this right away, since we have all the info we need to continue the action
selectionPropertiesReceived();
}
- return TRUE;
+ return true;
}
break;
case CLICK_ACTION_OPEN:
if (parent && parent->allowOpen())
{
mClickActionObject = parent;
- mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE, TRUE);
+ mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, false, true, true);
if (LLSelectMgr::getInstance()->selectGetAllValid())
{
// call this right away, since we have all the info we need to continue the action
selectionPropertiesReceived();
}
}
- return TRUE;
+ return true;
case CLICK_ACTION_PLAY:
handle_click_action_play();
- return TRUE;
+ return true;
case CLICK_ACTION_OPEN_MEDIA:
// mClickActionObject = object;
handle_click_action_open_media(object);
- return TRUE;
+ return true;
case CLICK_ACTION_ZOOM:
{
const F32 PADDING_FACTOR = 2.f;
@@ -367,7 +367,7 @@ BOOL LLToolPie::handleLeftClickPick()
if (object)
{
- gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE);
+ gAgentCamera.setFocusOnAvatar(false, ANIMATE);
LLBBox bbox = object->getBoundingBoxAgent() ;
F32 angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getAspect() > 1.f ? LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect() : LLViewerCamera::getInstance()->getView());
@@ -382,9 +382,9 @@ BOOL LLToolPie::handleLeftClickPick()
mPick.mObjectID );
}
}
- return TRUE;
+ return true;
case CLICK_ACTION_DISABLED:
- return TRUE;
+ return true;
default:
// nothing
break;
@@ -444,12 +444,12 @@ BOOL LLToolPie::handleLeftClickPick()
mMouseButtonDown = false;
LLToolMgr::getInstance()->setTransientTool(LLToolCamera::getInstance());
gViewerWindow->hideCursor();
- LLToolCamera::getInstance()->setMouseCapture(TRUE);
+ LLToolCamera::getInstance()->setMouseCapture(true);
LLToolCamera::getInstance()->setClickPickPending();
LLToolCamera::getInstance()->pickCallback(mPick);
- gAgentCamera.setFocusOnAvatar(TRUE, TRUE);
+ gAgentCamera.setFocusOnAvatar(true, true);
- return TRUE;
+ return true;
}
//////////
// // Could be first left-click on nothing
@@ -459,7 +459,7 @@ BOOL LLToolPie::handleLeftClickPick()
return LLTool::handleMouseDown(x, y, mask);
}
-BOOL LLToolPie::useClickAction(MASK mask,
+bool LLToolPie::useClickAction(MASK mask,
LLViewerObject* object,
LLViewerObject* parent)
{
@@ -578,9 +578,9 @@ bool LLToolPie::walkToClickedLocation()
if (gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK)
{
mPick = gViewerWindow->pickImmediate(mHoverPick.mMousePt.mX, mHoverPick.mMousePt.mY,
- FALSE /* ignore transparent */,
- FALSE /* ignore rigged */,
- FALSE /* ignore particles */);
+ false /* ignore transparent */,
+ false /* ignore rigged */,
+ false /* ignore particles */);
}
else
{
@@ -588,9 +588,9 @@ bool LLToolPie::walkToClickedLocation()
// use croshair's position to do a pick
mPick = gViewerWindow->pickImmediate(gViewerWindow->getWorldViewRectScaled().getWidth() / 2,
gViewerWindow->getWorldViewRectScaled().getHeight() / 2,
- FALSE /* ignore transparent */,
- FALSE /* ignore rigged */,
- FALSE /* ignore particles */);
+ false /* ignore transparent */,
+ false /* ignore rigged */,
+ false /* ignore particles */);
}
if (mPick.mPickType == LLPickInfo::PICK_OBJECT)
@@ -620,17 +620,17 @@ bool LLToolPie::walkToClickedLocation()
if ((mPick.mPickType == LLPickInfo::PICK_LAND && !mPick.mPosGlobal.isExactlyZero()) ||
(mPick.mObjectID.notNull() && !mPick.mPosGlobal.isExactlyZero()))
{
- gAgentCamera.setFocusOnAvatar(TRUE, TRUE);
+ gAgentCamera.setFocusOnAvatar(true, true);
if (mAutoPilotDestination) { mAutoPilotDestination->markDead(); }
- mAutoPilotDestination = (LLHUDEffectBlob *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BLOB, FALSE);
+ mAutoPilotDestination = (LLHUDEffectBlob *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BLOB, false);
mAutoPilotDestination->setPositionGlobal(mPick.mPosGlobal);
mAutoPilotDestination->setPixelSize(5);
mAutoPilotDestination->setColor(LLColor4U(170, 210, 190));
mAutoPilotDestination->setDuration(3.f);
LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal;
- gAgent.startAutoPilotGlobal(pos, std::string(), NULL, NULL, NULL, 0.f, 0.03f, FALSE);
+ gAgent.startAutoPilotGlobal(pos, std::string(), NULL, NULL, NULL, 0.f, 0.03f, false);
LLFirstUse::notMoving(false);
showVisualContextMenuEffect();
return true;
@@ -653,10 +653,10 @@ bool LLToolPie::teleportToClickedLocation()
{
// We do not handle hover in mouselook as we do in other modes, so
// use croshair's position to do a pick
- BOOL pick_rigged = false;
+ bool pick_rigged = false;
mHoverPick = gViewerWindow->pickImmediate(gViewerWindow->getWorldViewRectScaled().getWidth() / 2,
gViewerWindow->getWorldViewRectScaled().getHeight() / 2,
- FALSE,
+ false,
pick_rigged);
}
LLViewerObject* objp = mHoverPick.getObject();
@@ -736,10 +736,10 @@ void LLToolPie::selectionPropertiesReceived()
LLToolPie::getInstance()->resetSelection();
}
-BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
+bool LLToolPie::handleHover(S32 x, S32 y, MASK mask)
{
- BOOL pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick");
- mHoverPick = gViewerWindow->pickImmediate(x, y, FALSE, pick_rigged);
+ bool pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick");
+ mHoverPick = gViewerWindow->pickImmediate(x, y, false, pick_rigged);
LLViewerObject *parent = NULL;
LLViewerObject *object = mHoverPick.getObject();
LLSelectMgr::getInstance()->setHoverObject(object, mHoverPick.mObjectFace);
@@ -776,7 +776,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
else
{
// perform a separate pick that detects transparent objects since they respond to 1-click actions
- LLPickInfo click_action_pick = gViewerWindow->pickImmediate(x, y, FALSE, pick_rigged);
+ LLPickInfo click_action_pick = gViewerWindow->pickImmediate(x, y, false, pick_rigged);
LLViewerObject* click_action_object = click_action_pick.getObject();
@@ -812,10 +812,10 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
LLViewerMediaFocus::getInstance()->clearHover();
}
- return TRUE;
+ return true;
}
-BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask)
{
if (!mDoubleClickTimer.getStarted())
{
@@ -833,7 +833,7 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask)
gViewerWindow->setCursor(UI_CURSOR_ARROW);
if (hasMouseCapture())
{
- setMouseCapture(FALSE);
+ setMouseCapture(false);
}
LLToolMgr::getInstance()->clearTransientTool();
@@ -852,7 +852,7 @@ void LLToolPie::stopClickToWalk()
}
}
-BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask)
{
if (gDebugClicks)
{
@@ -861,17 +861,17 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask)
if (handleMediaDblClick(mPick))
{
- return TRUE;
+ return true;
}
if (!mDoubleClickTimer.getStarted() || (mDoubleClickTimer.getElapsedTimeF32() > 0.3f))
{
mDoubleClickTimer.stop();
- return FALSE;
+ return false;
}
mDoubleClickTimer.stop();
- return FALSE;
+ return false;
}
static bool needs_tooltip(LLSelectNode* nodep)
@@ -882,10 +882,10 @@ static bool needs_tooltip(LLSelectNode* nodep)
}
-BOOL LLToolPie::handleTooltipLand(std::string line, std::string tooltip_msg)
+bool LLToolPie::handleTooltipLand(std::string line, std::string tooltip_msg)
{
// Do not show hover for land unless prefs are set to allow it.
- if (!gSavedSettings.getBOOL("ShowLandHoverTip")) return TRUE;
+ if (!gSavedSettings.getBOOL("ShowLandHoverTip")) return true;
LLViewerParcelMgr::getInstance()->setHoverParcel( mHoverPick.mPosGlobal );
@@ -1039,16 +1039,16 @@ BOOL LLToolPie::handleTooltipLand(std::string line, std::string tooltip_msg)
LLToolTipMgr::instance().show(tooltip_msg);
}
- return TRUE;
+ return true;
}
-BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string line, std::string tooltip_msg)
+bool LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string line, std::string tooltip_msg)
{
if ( hover_object->isHUDAttachment() )
{
// no hover tips for HUD elements, since they can obscure
// what the HUD is displaying
- return TRUE;
+ return true;
}
if ( hover_object->isAttachment() )
@@ -1058,13 +1058,13 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l
if (!root_edit)
{
// Strange parenting issue, don't show any text
- return TRUE;
+ return true;
}
hover_object = (LLViewerObject*)root_edit->getParent();
if (!hover_object)
{
// another strange parenting issue, bail out
- return TRUE;
+ return true;
}
}
@@ -1220,14 +1220,14 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l
}
}
- return TRUE;
+ return true;
}
-BOOL LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask)
+bool LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask)
{
static LLCachedControl<bool> show_hover_tips(*LLUI::getInstance()->mSettingGroups["config"], "ShowHoverTips", true);
- if (!show_hover_tips) return TRUE;
- if (!mHoverPick.isValid()) return TRUE;
+ if (!show_hover_tips) return true;
+ if (!mHoverPick.isValid()) return true;
LLViewerObject* hover_object = mHoverPick.getObject();
@@ -1247,7 +1247,7 @@ BOOL LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask)
handleTooltipLand(line, tooltip_msg);
}
- return TRUE;
+ return true;
}
static void show_inspector(const char* inspector, const char* param, const LLUUID& source_id)
@@ -1405,14 +1405,14 @@ void LLToolPie::handleDeselect()
{
if( hasMouseCapture() )
{
- setMouseCapture( FALSE ); // Calls onMouseCaptureLost() indirectly
+ setMouseCapture( false ); // Calls onMouseCaptureLost() indirectly
}
// remove temporary selection for pie menu
LLSelectMgr::getInstance()->setHoverObject(NULL);
// Menu may be still up during transfer to different tool.
// toolfocus and toolgrab should retain menu, they will clear it if needed
- MASK override_mask = gKeyboard ? gKeyboard->currentMask(TRUE) : 0;
+ MASK override_mask = gKeyboard ? gKeyboard->currentMask(true) : 0;
if (gMenuHolder && (!gMenuHolder->getVisible() || (override_mask & (MASK_ALT | MASK_CONTROL)) == 0))
{
// in most cases menu is useless without correct selection, so either keep both or discard both
@@ -1441,7 +1441,7 @@ void LLToolPie::stopEditing()
{
if( hasMouseCapture() )
{
- setMouseCapture( FALSE ); // Calls onMouseCaptureLost() indirectly
+ setMouseCapture( false ); // Calls onMouseCaptureLost() indirectly
}
}
@@ -1463,7 +1463,7 @@ bool LLToolPie::inCameraSteerMode()
}
// true if x,y outside small box around start_x,start_y
-BOOL LLToolPie::outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y)
+bool LLToolPie::outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y)
{
S32 dx = x - start_x;
S32 dy = y - start_y;
@@ -1540,9 +1540,9 @@ bool LLToolPie::handleMediaClick(const LLPickInfo& pick)
gFocusMgr.setKeyboardFocus(LLViewerMediaFocus::getInstance());
LLEditMenuHandler::gEditMenuHandler = LLViewerMediaFocus::instance().getFocusedMediaImpl();
- media_impl->mouseDown(pick.mUVCoords, gKeyboard->currentMask(TRUE));
+ media_impl->mouseDown(pick.mUVCoords, gKeyboard->currentMask(true));
mMediaMouseCaptureID = mep->getMediaID();
- setMouseCapture(TRUE); // This object will send a mouse-up to the media when it loses capture.
+ setMouseCapture(true); // This object will send a mouse-up to the media when it loses capture.
}
return true;
@@ -1594,9 +1594,9 @@ bool LLToolPie::handleMediaDblClick(const LLPickInfo& pick)
gFocusMgr.setKeyboardFocus(LLViewerMediaFocus::getInstance());
LLEditMenuHandler::gEditMenuHandler = LLViewerMediaFocus::instance().getFocusedMediaImpl();
- media_impl->mouseDoubleClick(pick.mUVCoords, gKeyboard->currentMask(TRUE));
+ media_impl->mouseDoubleClick(pick.mUVCoords, gKeyboard->currentMask(true));
mMediaMouseCaptureID = mep->getMediaID();
- setMouseCapture(TRUE); // This object will send a mouse-up to the media when it loses capture.
+ setMouseCapture(true); // This object will send a mouse-up to the media when it loses capture.
}
return true;
@@ -1647,7 +1647,7 @@ bool LLToolPie::handleMediaHover(const LLPickInfo& pick)
// If this is the focused media face, send mouse move events.
if (LLViewerMediaFocus::getInstance()->isFocusedOnFace(objectp, pick.mObjectFace))
{
- media_impl->mouseMove(pick.mUVCoords, gKeyboard->currentMask(TRUE));
+ media_impl->mouseMove(pick.mUVCoords, gKeyboard->currentMask(true));
gViewerWindow->setCursor(media_impl->getLastSetCursor());
}
else
@@ -1743,7 +1743,7 @@ static ECursorType cursor_from_parcel_media(U8 click_action)
// True if we handled the event.
-BOOL LLToolPie::handleRightClickPick()
+bool LLToolPie::handleRightClickPick()
{
S32 x = mPick.mMousePt.mX;
S32 y = mPick.mMousePt.mY;
@@ -1758,7 +1758,7 @@ BOOL LLToolPie::handleRightClickPick()
LLViewerObject *object = mPick.getObject();
// Can't ignore children here.
- LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE);
+ LLToolSelect::handleObjectSelection(mPick, false, true);
// Spawn pie menu
if (mPick.mPickType == LLPickInfo::PICK_LAND)
@@ -1776,7 +1776,7 @@ BOOL LLToolPie::handleRightClickPick()
{
//either at very early startup stage or at late quitting stage,
//this event is ignored.
- return TRUE ;
+ return true ;
}
gMenuAvatarSelf->show(x, y);
@@ -1797,7 +1797,7 @@ BOOL LLToolPie::handleRightClickPick()
if (!object)
{
- return TRUE; // unexpected, but escape
+ return true; // unexpected, but escape
}
// Object is an avatar, so check for mute by id.
@@ -1859,13 +1859,13 @@ BOOL LLToolPie::handleRightClickPick()
LLTool::handleRightMouseDown(x, y, mask);
// We handled the event.
- return TRUE;
+ return true;
}
void LLToolPie::showVisualContextMenuEffect()
{
// VEFFECT: ShowPie
- LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_SPHERE, TRUE);
+ LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_SPHERE, true);
effectp->setPositionGlobal(mPick.mPosGlobal);
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
effectp->setDuration(0.25f);
@@ -1937,7 +1937,7 @@ void LLToolPie::startCameraSteering()
LLViewerCamera::instance().getOrigin() + gViewerWindow->mouseDirectionGlobal(mSteerPick.mMousePt.mX, mSteerPick.mMousePt.mY) * 100.f);
}
- setMouseCapture(TRUE);
+ setMouseCapture(true);
mMouseSteerX = mMouseDownX;
mMouseSteerY = mMouseDownY;
@@ -1946,7 +1946,7 @@ void LLToolPie::startCameraSteering()
mClockwise = camera_to_rotation_center * rotation_center_to_pick < 0.f;
if (mMouseSteerGrabPoint) { mMouseSteerGrabPoint->markDead(); }
- mMouseSteerGrabPoint = (LLHUDEffectBlob *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BLOB, FALSE);
+ mMouseSteerGrabPoint = (LLHUDEffectBlob *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BLOB, false);
mMouseSteerGrabPoint->setPositionGlobal(mSteerPick.mPosGlobal);
mMouseSteerGrabPoint->setColor(LLColor4U(170, 210, 190));
mMouseSteerGrabPoint->setPixelSize(5);
diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h
index dca0d12cf6..39cca0ffa7 100644
--- a/indra/newview/lltoolpie.h
+++ b/indra/newview/lltoolpie.h
@@ -42,17 +42,17 @@ class LLToolPie : public LLTool, public LLSingleton<LLToolPie>
public:
// Virtual functions inherited from LLMouseHandler
- virtual BOOL handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClickType clicktype, BOOL down) override;
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleRightMouseUp(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleHover(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask) override;
- BOOL handleScrollWheelAny(S32 x, S32 y, S32 clicks_x, S32 clicks_y);
- virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks) override;
- virtual BOOL handleScrollHWheel(S32 x, S32 y, S32 clicks) override;
- virtual BOOL handleToolTip(S32 x, S32 y, MASK mask) override;
+ virtual bool handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClickType clicktype, bool down) override;
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask) override;
+ virtual bool handleRightMouseDown(S32 x, S32 y, MASK mask) override;
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask) override;
+ virtual bool handleRightMouseUp(S32 x, S32 y, MASK mask) override;
+ virtual bool handleHover(S32 x, S32 y, MASK mask) override;
+ virtual bool handleDoubleClick(S32 x, S32 y, MASK mask) override;
+ bool handleScrollWheelAny(S32 x, S32 y, S32 clicks_x, S32 clicks_y);
+ virtual bool handleScrollWheel(S32 x, S32 y, S32 clicks) override;
+ virtual bool handleScrollHWheel(S32 x, S32 y, S32 clicks) override;
+ virtual bool handleToolTip(S32 x, S32 y, MASK mask) override;
virtual void render() override;
@@ -81,10 +81,10 @@ public:
static void VisitHomePage(const LLPickInfo& info);
private:
- BOOL outsideSlop (S32 x, S32 y, S32 start_x, S32 start_y);
- BOOL handleLeftClickPick();
- BOOL handleRightClickPick();
- BOOL useClickAction (MASK mask, LLViewerObject* object,LLViewerObject* parent);
+ bool outsideSlop (S32 x, S32 y, S32 start_x, S32 start_y);
+ bool handleLeftClickPick();
+ bool handleRightClickPick();
+ bool useClickAction (MASK mask, LLViewerObject* object,LLViewerObject* parent);
void showVisualContextMenuEffect();
ECursorType cursorFromObject(LLViewerObject* object);
@@ -93,8 +93,8 @@ private:
bool handleMediaDblClick(const LLPickInfo& info);
bool handleMediaHover(const LLPickInfo& info);
bool handleMediaMouseUp();
- BOOL handleTooltipLand(std::string line, std::string tooltip_msg);
- BOOL handleTooltipObject( LLViewerObject* hover_object, std::string line, std::string tooltip_msg);
+ bool handleTooltipLand(std::string line, std::string tooltip_msg);
+ bool handleTooltipObject( LLViewerObject* hover_object, std::string line, std::string tooltip_msg);
void steerCameraWithMouse(S32 x, S32 y);
void startCameraSteering();
@@ -118,8 +118,8 @@ private:
LLPointer<LLViewerObject> mClickActionObject;
U8 mClickAction;
LLSafeHandle<LLObjectSelection> mLeftClickSelection;
- BOOL mClickActionBuyEnabled;
- BOOL mClickActionPayEnabled;
+ bool mClickActionBuyEnabled;
+ bool mClickActionPayEnabled;
LLFrameTimer mDoubleClickTimer;
};
diff --git a/indra/newview/lltoolpipette.cpp b/indra/newview/lltoolpipette.cpp
index ff3dad2675..36ac20bc59 100644
--- a/indra/newview/lltoolpipette.cpp
+++ b/indra/newview/lltoolpipette.cpp
@@ -48,7 +48,7 @@
LLToolPipette::LLToolPipette()
: LLTool(std::string("Pipette")),
- mSuccess(TRUE)
+ mSuccess(true)
{
}
@@ -57,41 +57,41 @@ LLToolPipette::~LLToolPipette()
{ }
-BOOL LLToolPipette::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLToolPipette::handleMouseDown(S32 x, S32 y, MASK mask)
{
- mSuccess = TRUE;
+ mSuccess = true;
mTooltipMsg.clear();
- setMouseCapture(TRUE);
+ setMouseCapture(true);
gViewerWindow->pickAsync(x, y, mask, pickCallback);
- return TRUE;
+ return true;
}
-BOOL LLToolPipette::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLToolPipette::handleMouseUp(S32 x, S32 y, MASK mask)
{
- mSuccess = TRUE;
+ mSuccess = true;
LLSelectMgr::getInstance()->unhighlightAll();
// *NOTE: This assumes the pipette tool is a transient tool.
LLToolMgr::getInstance()->clearTransientTool();
- setMouseCapture(FALSE);
- return TRUE;
+ setMouseCapture(false);
+ return true;
}
-BOOL LLToolPipette::handleHover(S32 x, S32 y, MASK mask)
+bool LLToolPipette::handleHover(S32 x, S32 y, MASK mask)
{
gViewerWindow->setCursor(mSuccess ? UI_CURSOR_PIPETTE : UI_CURSOR_NO);
if (hasMouseCapture()) // mouse button is down
{
gViewerWindow->pickAsync(x, y, mask, pickCallback);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-BOOL LLToolPipette::handleToolTip(S32 x, S32 y, MASK mask)
+bool LLToolPipette::handleToolTip(S32 x, S32 y, MASK mask)
{
if (mTooltipMsg.empty())
{
- return FALSE;
+ return false;
}
LLRect sticky_rect;
@@ -100,7 +100,7 @@ BOOL LLToolPipette::handleToolTip(S32 x, S32 y, MASK mask)
.message(mTooltipMsg)
.sticky_rect(sticky_rect));
- return TRUE;
+ return true;
}
void LLToolPipette::setTextureEntry(const LLTextureEntry* entry)
@@ -129,7 +129,7 @@ void LLToolPipette::pickCallback(const LLPickInfo& pick_info)
}
}
-void LLToolPipette::setResult(BOOL success, const std::string& msg)
+void LLToolPipette::setResult(bool success, const std::string& msg)
{
mTooltipMsg = msg;
mSuccess = success;
diff --git a/indra/newview/lltoolpipette.h b/indra/newview/lltoolpipette.h
index 2636811c66..ade06ba78d 100644
--- a/indra/newview/lltoolpipette.h
+++ b/indra/newview/lltoolpipette.h
@@ -47,15 +47,15 @@ class LLToolPipette
virtual ~LLToolPipette();
public:
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleHover(S32 x, S32 y, MASK mask) override;
- virtual BOOL handleToolTip(S32 x, S32 y, MASK mask) override;
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask) override;
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask) override;
+ virtual bool handleHover(S32 x, S32 y, MASK mask) override;
+ virtual bool handleToolTip(S32 x, S32 y, MASK mask) override;
// Note: Don't return connection; use boost::bind + boost::signals2::trackable to disconnect slots
typedef boost::signals2::signal<void (const LLTextureEntry& te)> signal_t;
void setToolSelectCallback(const signal_t::slot_type& cb) { mSignal.connect(cb); }
- void setResult(BOOL success, const std::string& msg);
+ void setResult(bool success, const std::string& msg);
void setTextureEntry(const LLTextureEntry* entry);
static void pickCallback(const LLPickInfo& pick_info);
@@ -63,7 +63,7 @@ public:
protected:
LLTextureEntry mTextureEntry;
signal_t mSignal;
- BOOL mSuccess;
+ bool mSuccess;
std::string mTooltipMsg;
};
diff --git a/indra/newview/lltoolplacer.cpp b/indra/newview/lltoolplacer.cpp
index 7cdd7cc5c8..47bc4df4e5 100644
--- a/indra/newview/lltoolplacer.cpp
+++ b/indra/newview/lltoolplacer.cpp
@@ -74,14 +74,14 @@ LLToolPlacer::LLToolPlacer()
{
}
-BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj, S32* hit_face,
- BOOL* b_hit_land, LLVector3* ray_start_region, LLVector3* ray_end_region, LLViewerRegion** region )
+bool LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj, S32* hit_face,
+ bool* b_hit_land, LLVector3* ray_start_region, LLVector3* ray_end_region, LLViewerRegion** region )
{
F32 max_dist_from_camera = gSavedSettings.getF32( "MaxSelectDistance" ) - 1.f;
// Viewer-side pick to find the right sim to create the object on.
// First find the surface the object will be created on.
- LLPickInfo pick = gViewerWindow->pickImmediate(x, y, FALSE, FALSE);
+ LLPickInfo pick = gViewerWindow->pickImmediate(x, y, false, false);
// Note: use the frontmost non-flora version because (a) plants usually have lots of alpha and (b) pants' Havok
// representations (if any) are NOT the same as their viewer representation.
@@ -99,12 +99,12 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj,
LLVector3d land_pos_global = pick.mPosGlobal;
// Make sure there's a surface to place the new object on.
- BOOL bypass_sim_raycast = FALSE;
+ bool bypass_sim_raycast = false;
LLVector3d surface_pos_global;
if (*b_hit_land)
{
surface_pos_global = land_pos_global;
- bypass_sim_raycast = TRUE;
+ bypass_sim_raycast = true;
}
else
if (*hit_obj)
@@ -113,7 +113,7 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj,
}
else
{
- return FALSE;
+ return false;
}
// Make sure the surface isn't too far away.
@@ -121,7 +121,7 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj,
F32 dist_to_surface_sq = (F32)((surface_pos_global - ray_start_global).magVecSquared());
if( dist_to_surface_sq > (max_dist_from_camera * max_dist_from_camera) )
{
- return FALSE;
+ return false;
}
// Find the sim where the surface lives.
@@ -129,7 +129,7 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj,
if (!regionp)
{
LL_WARNS() << "Trying to add object outside of all known regions!" << LL_ENDL;
- return FALSE;
+ return false;
}
// Find the simulator-side ray that will be used to place the object accurately
@@ -152,35 +152,35 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj,
*ray_end_region = regionp->getPosRegionFromGlobal( ray_end_global );
}
- return TRUE;
+ return true;
}
-BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics )
+bool LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics )
{
LLVector3 ray_start_region;
LLVector3 ray_end_region;
LLViewerRegion* regionp = NULL;
- BOOL b_hit_land = FALSE;
+ bool b_hit_land = false;
S32 hit_face = -1;
LLViewerObject* hit_obj = NULL;
U8 state = 0;
- BOOL success = raycastForNewObjPos( x, y, &hit_obj, &hit_face, &b_hit_land, &ray_start_region, &ray_end_region, &regionp );
+ bool success = raycastForNewObjPos( x, y, &hit_obj, &hit_face, &b_hit_land, &ray_start_region, &ray_end_region, &regionp );
if( !success )
{
- return FALSE;
+ return false;
}
if( hit_obj && (hit_obj->isAvatar() || hit_obj->isAttachment()) )
{
// Can't create objects on avatars or attachments
- return FALSE;
+ return false;
}
if (NULL == regionp)
{
LL_WARNS() << "regionp was NULL; aborting function." << LL_ENDL;
- return FALSE;
+ return false;
}
if (regionp->getRegionFlag(REGION_FLAGS_SANDBOX))
@@ -192,7 +192,7 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics )
LLQuaternion rotation;
LLVector3 scale = DEFAULT_OBJECT_SCALE;
U8 material = LL_MCODE_WOOD;
- BOOL create_selected = FALSE;
+ bool create_selected = false;
LLVolumeParams volume_params;
switch (pcode)
@@ -217,7 +217,7 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics )
case LLViewerObject::LL_VO_SQUARE_TORUS:
case LLViewerObject::LL_VO_TRIANGLE_TORUS:
default:
- create_selected = TRUE;
+ create_selected = true;
break;
}
@@ -401,7 +401,7 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics )
gMessageSystem->addVector3Fast(_PREHASH_RayStart, ray_start_region );
gMessageSystem->addVector3Fast(_PREHASH_RayEnd, ray_end_region );
gMessageSystem->addU8Fast(_PREHASH_BypassRaycast, (U8)b_hit_land );
- gMessageSystem->addU8Fast(_PREHASH_RayEndIsIntersection, (U8)FALSE );
+ gMessageSystem->addU8Fast(_PREHASH_RayEndIsIntersection, (U8)false );
gMessageSystem->addU8Fast(_PREHASH_State, state);
// Limit raycast to a single object.
@@ -429,7 +429,7 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics )
}
// VEFFECT: AddObject
- LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
+ LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, true);
effectp->setSourceObject((LLViewerObject*)gAgentAvatarp);
effectp->setPositionGlobal(regionp->getPosGlobalFromRegion(ray_end_region));
effectp->setDuration(LL_HUD_DUR_SHORT);
@@ -437,30 +437,30 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics )
add(LLStatViewer::OBJECT_CREATE, 1);
- return TRUE;
+ return true;
}
// Used by the placer tool to add copies of the current selection.
// Inspired by add_object(). JC
-BOOL LLToolPlacer::addDuplicate(S32 x, S32 y)
+bool LLToolPlacer::addDuplicate(S32 x, S32 y)
{
LLVector3 ray_start_region;
LLVector3 ray_end_region;
LLViewerRegion* regionp = NULL;
- BOOL b_hit_land = FALSE;
+ bool b_hit_land = false;
S32 hit_face = -1;
LLViewerObject* hit_obj = NULL;
- BOOL success = raycastForNewObjPos( x, y, &hit_obj, &hit_face, &b_hit_land, &ray_start_region, &ray_end_region, &regionp );
+ bool success = raycastForNewObjPos( x, y, &hit_obj, &hit_face, &b_hit_land, &ray_start_region, &ray_end_region, &regionp );
if( !success )
{
make_ui_sound("UISndInvalidOp");
- return FALSE;
+ return false;
}
if( hit_obj && (hit_obj->isAvatar() || hit_obj->isAttachment()) )
{
// Can't create objects on avatars or attachments
make_ui_sound("UISndInvalidOp");
- return FALSE;
+ return false;
}
@@ -480,11 +480,11 @@ BOOL LLToolPlacer::addDuplicate(S32 x, S32 y)
LLSelectMgr::getInstance()->selectDuplicateOnRay(ray_start_region,
ray_end_region,
b_hit_land, // suppress raycast
- FALSE, // intersection
+ false, // intersection
ray_target_id,
gSavedSettings.getBOOL("CreateToolCopyCenters"),
gSavedSettings.getBOOL("CreateToolCopyRotates"),
- FALSE); // select copy
+ false); // select copy
if (regionp
&& (regionp->getRegionFlag(REGION_FLAGS_SANDBOX)))
@@ -492,13 +492,13 @@ BOOL LLToolPlacer::addDuplicate(S32 x, S32 y)
//LLFirstUse::useSandbox();
}
- return TRUE;
+ return true;
}
-BOOL LLToolPlacer::placeObject(S32 x, S32 y, MASK mask)
+bool LLToolPlacer::placeObject(S32 x, S32 y, MASK mask)
{
- BOOL added = TRUE;
+ bool added = true;
if (gSavedSettings.getBOOL("CreateToolCopySelection"))
{
@@ -506,7 +506,7 @@ BOOL LLToolPlacer::placeObject(S32 x, S32 y, MASK mask)
}
else
{
- added = addObject( sObjectType, x, y, FALSE );
+ added = addObject( sObjectType, x, y, false );
}
// ...and go back to the default tool
@@ -518,11 +518,11 @@ BOOL LLToolPlacer::placeObject(S32 x, S32 y, MASK mask)
return added;
}
-BOOL LLToolPlacer::handleHover(S32 x, S32 y, MASK mask)
+bool LLToolPlacer::handleHover(S32 x, S32 y, MASK mask)
{
LL_DEBUGS("UserInput") << "hover handled by LLToolPlacer" << LL_ENDL;
gViewerWindow->setCursor(UI_CURSOR_TOOLCREATE);
- return TRUE;
+ return true;
}
void LLToolPlacer::handleSelect()
diff --git a/indra/newview/lltoolplacer.h b/indra/newview/lltoolplacer.h
index ad59cb0daa..d9161711cb 100644
--- a/indra/newview/lltoolplacer.h
+++ b/indra/newview/lltoolplacer.h
@@ -42,8 +42,8 @@ class LLToolPlacer
public:
LLToolPlacer();
- virtual BOOL placeObject(S32 x, S32 y, MASK mask);
- virtual BOOL handleHover(S32 x, S32 y, MASK mask);
+ virtual bool placeObject(S32 x, S32 y, MASK mask);
+ virtual bool handleHover(S32 x, S32 y, MASK mask);
virtual void handleSelect(); // do stuff when your tool is selected
virtual void handleDeselect(); // clean up when your tool is deselected
@@ -54,10 +54,10 @@ protected:
static LLPCode sObjectType;
private:
- BOOL addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics );
- BOOL raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj, S32* hit_face,
- BOOL* b_hit_land, LLVector3* ray_start_region, LLVector3* ray_end_region, LLViewerRegion** region );
- BOOL addDuplicate(S32 x, S32 y);
+ bool addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics );
+ bool raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj, S32* hit_face,
+ bool* b_hit_land, LLVector3* ray_start_region, LLVector3* ray_end_region, LLViewerRegion** region );
+ bool addDuplicate(S32 x, S32 y);
};
#endif
diff --git a/indra/newview/lltoolselect.cpp b/indra/newview/lltoolselect.cpp
index f7455c6cb8..6c9ef89d39 100644
--- a/indra/newview/lltoolselect.cpp
+++ b/indra/newview/lltoolselect.cpp
@@ -49,26 +49,26 @@
#include "llworld.h"
// Globals
-//extern BOOL gAllowSelectAvatar;
+//extern bool gAllowSelectAvatar;
const F32 SELECTION_ROTATION_TRESHOLD = 0.1f;
const F32 SELECTION_SITTING_ROTATION_TRESHOLD = 3.2f; //radian
LLToolSelect::LLToolSelect( LLToolComposite* composite )
: LLTool( std::string("Select"), composite ),
- mIgnoreGroup( FALSE )
+ mIgnoreGroup( false )
{
}
// True if you selected an object.
-BOOL LLToolSelect::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLToolSelect::handleMouseDown(S32 x, S32 y, MASK mask)
{
// do immediate pick query
- BOOL pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick");
- BOOL pick_transparent = gSavedSettings.getBOOL("SelectInvisibleObjects");
- BOOL pick_reflection_probe = gSavedSettings.getBOOL("SelectReflectionProbes");
+ bool pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick");
+ bool pick_transparent = gSavedSettings.getBOOL("SelectInvisibleObjects");
+ bool pick_reflection_probe = gSavedSettings.getBOOL("SelectReflectionProbes");
- mPick = gViewerWindow->pickImmediate(x, y, pick_transparent, pick_rigged, FALSE, TRUE, pick_reflection_probe);
+ mPick = gViewerWindow->pickImmediate(x, y, pick_transparent, pick_rigged, false, true, pick_reflection_probe);
// Pass mousedown to agent
LLTool::handleMouseDown(x, y, mask);
@@ -78,25 +78,25 @@ BOOL LLToolSelect::handleMouseDown(S32 x, S32 y, MASK mask)
// static
-LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pick, BOOL ignore_group, BOOL temp_select, BOOL select_root)
+LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pick, bool ignore_group, bool temp_select, bool select_root)
{
LLViewerObject* object = pick.getObject();
if (select_root)
{
object = object->getRootEdit();
}
- BOOL select_owned = gSavedSettings.getBOOL("SelectOwnedOnly");
- BOOL select_movable = gSavedSettings.getBOOL("SelectMovableOnly");
+ bool select_owned = gSavedSettings.getBOOL("SelectOwnedOnly");
+ bool select_movable = gSavedSettings.getBOOL("SelectMovableOnly");
// *NOTE: These settings must be cleaned up at bottom of function.
if (temp_select || LLSelectMgr::getInstance()->mAllowSelectAvatar)
{
- gSavedSettings.setBOOL("SelectOwnedOnly", FALSE);
- gSavedSettings.setBOOL("SelectMovableOnly", FALSE);
- LLSelectMgr::getInstance()->setForceSelection(TRUE);
+ gSavedSettings.setBOOL("SelectOwnedOnly", false);
+ gSavedSettings.setBOOL("SelectMovableOnly", false);
+ LLSelectMgr::getInstance()->setForceSelection(true);
}
- BOOL extend_select = (pick.mKeyMask == MASK_SHIFT) || (pick.mKeyMask == MASK_CONTROL);
+ bool extend_select = (pick.mKeyMask == MASK_SHIFT) || (pick.mKeyMask == MASK_CONTROL);
// If no object, check for icon, then just deselect
if (!object)
@@ -114,7 +114,7 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi
}
else
{
- BOOL already_selected = object->isSelected();
+ bool already_selected = object->isSelected();
if (already_selected &&
object->getNumTEs() > 0 &&
@@ -141,7 +141,7 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi
}
else
{
- LLSelectMgr::getInstance()->deselectObjectAndFamily(object, TRUE, TRUE);
+ LLSelectMgr::getInstance()->deselectObjectAndFamily(object, true, true);
}
}
else
@@ -173,7 +173,7 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi
if ( ignore_group )
{
- LLSelectMgr::getInstance()->selectObjectOnly(object, SELECT_ALL_TES);
+ LLSelectMgr::getInstance()->selectObjectOnly(object, SELECT_ALL_TES, pick.mGLTFNodeIndex, pick.mGLTFPrimitiveIndex);
}
else
{
@@ -220,7 +220,7 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi
LLSelectNode* select_node = selection->findNode(root_object);
if (select_node)
{
- select_node->setTransient(TRUE);
+ select_node->setTransient(true);
}
LLViewerObject::const_child_list_t& child_list = root_object->getChildren();
@@ -231,7 +231,7 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi
select_node = selection->findNode(child);
if (select_node)
{
- select_node->setTransient(TRUE);
+ select_node->setTransient(true);
}
}
@@ -244,17 +244,17 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi
{
gSavedSettings.setBOOL("SelectOwnedOnly", select_owned);
gSavedSettings.setBOOL("SelectMovableOnly", select_movable);
- LLSelectMgr::getInstance()->setForceSelection(FALSE);
+ LLSelectMgr::getInstance()->setForceSelection(false);
}
return LLSelectMgr::getInstance()->getSelection();
}
-BOOL LLToolSelect::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLToolSelect::handleMouseUp(S32 x, S32 y, MASK mask)
{
mIgnoreGroup = gSavedSettings.getBOOL("EditLinkedParts");
- handleObjectSelection(mPick, mIgnoreGroup, FALSE);
+ handleObjectSelection(mPick, mIgnoreGroup, false);
return LLTool::handleMouseUp(x, y, mask);
}
@@ -263,7 +263,7 @@ void LLToolSelect::handleDeselect()
{
if( hasMouseCapture() )
{
- setMouseCapture( FALSE ); // Calls onMouseCaptureLost() indirectly
+ setMouseCapture( false ); // Calls onMouseCaptureLost() indirectly
}
}
@@ -272,7 +272,7 @@ void LLToolSelect::stopEditing()
{
if( hasMouseCapture() )
{
- setMouseCapture( FALSE ); // Calls onMouseCaptureLost() indirectly
+ setMouseCapture( false ); // Calls onMouseCaptureLost() indirectly
}
}
@@ -280,10 +280,10 @@ void LLToolSelect::onMouseCaptureLost()
{
// Finish drag
- LLSelectMgr::getInstance()->enableSilhouette(TRUE);
+ LLSelectMgr::getInstance()->enableSilhouette(true);
// Clean up drag-specific variables
- mIgnoreGroup = FALSE;
+ mIgnoreGroup = false;
}
diff --git a/indra/newview/lltoolselect.h b/indra/newview/lltoolselect.h
index 74dababe8c..3a8055fe3e 100644
--- a/indra/newview/lltoolselect.h
+++ b/indra/newview/lltoolselect.h
@@ -39,18 +39,18 @@ class LLToolSelect : public LLTool
public:
LLToolSelect( LLToolComposite* composite );
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask);
virtual void stopEditing();
- static LLSafeHandle<LLObjectSelection> handleObjectSelection(const LLPickInfo& pick, BOOL ignore_group, BOOL temp_select, BOOL select_root = FALSE);
+ static LLSafeHandle<LLObjectSelection> handleObjectSelection(const LLPickInfo& pick, bool ignore_group, bool temp_select, bool select_root = false);
virtual void onMouseCaptureLost();
virtual void handleDeselect();
protected:
- BOOL mIgnoreGroup;
+ bool mIgnoreGroup;
LLUUID mSelectObjectID;
LLPickInfo mPick;
};
diff --git a/indra/newview/lltoolselectland.cpp b/indra/newview/lltoolselectland.cpp
index ff991dc9fd..674882b0cc 100644
--- a/indra/newview/lltoolselectland.cpp
+++ b/indra/newview/lltoolselectland.cpp
@@ -47,12 +47,12 @@ LLToolSelectLand::LLToolSelectLand( )
: LLTool( std::string("Parcel") ),
mDragStartGlobal(),
mDragEndGlobal(),
- mDragEndValid(FALSE),
+ mDragEndValid(false),
mDragStartX(0),
mDragStartY(0),
mDragEndX(0),
mDragEndY(0),
- mMouseOutsideSlop(FALSE),
+ mMouseOutsideSlop(false),
mWestSouthBottom(),
mEastNorthTop()
{ }
@@ -62,19 +62,19 @@ LLToolSelectLand::~LLToolSelectLand()
}
-BOOL LLToolSelectLand::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLToolSelectLand::handleMouseDown(S32 x, S32 y, MASK mask)
{
- BOOL hit_land = gViewerWindow->mousePointOnLandGlobal(x, y, &mDragStartGlobal);
+ bool hit_land = gViewerWindow->mousePointOnLandGlobal(x, y, &mDragStartGlobal);
if (hit_land)
{
- setMouseCapture( TRUE );
+ setMouseCapture( true );
mDragStartX = x;
mDragStartY = y;
mDragEndX = x;
mDragEndY = y;
- mDragEndValid = TRUE;
+ mDragEndValid = true;
mDragEndGlobal = mDragStartGlobal;
sanitize_corners(mDragStartGlobal, mDragEndGlobal, mWestSouthBottom, mEastNorthTop);
@@ -85,7 +85,7 @@ BOOL LLToolSelectLand::handleMouseDown(S32 x, S32 y, MASK mask)
roundXY(mWestSouthBottom);
roundXY(mEastNorthTop);
- mMouseOutsideSlop = TRUE; //FALSE;
+ mMouseOutsideSlop = true; //false;
LLViewerParcelMgr::getInstance()->deselectLand();
}
@@ -94,25 +94,25 @@ BOOL LLToolSelectLand::handleMouseDown(S32 x, S32 y, MASK mask)
}
-BOOL LLToolSelectLand::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLToolSelectLand::handleDoubleClick(S32 x, S32 y, MASK mask)
{
LLVector3d pos_global;
- BOOL hit_land = gViewerWindow->mousePointOnLandGlobal(x, y, &pos_global);
+ bool hit_land = gViewerWindow->mousePointOnLandGlobal(x, y, &pos_global);
if (hit_land)
{
// Auto-select this parcel
LLViewerParcelMgr::getInstance()->selectParcelAt( pos_global );
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-BOOL LLToolSelectLand::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLToolSelectLand::handleMouseUp(S32 x, S32 y, MASK mask)
{
if( hasMouseCapture() )
{
- setMouseCapture( FALSE );
+ setMouseCapture( false );
if (mMouseOutsideSlop && mDragEndValid)
{
@@ -129,35 +129,35 @@ BOOL LLToolSelectLand::handleMouseUp(S32 x, S32 y, MASK mask)
roundXY(mEastNorthTop);
// Don't auto-select entire parcel.
- mSelection = LLViewerParcelMgr::getInstance()->selectLand( mWestSouthBottom, mEastNorthTop, FALSE );
+ mSelection = LLViewerParcelMgr::getInstance()->selectLand( mWestSouthBottom, mEastNorthTop, false );
}
- mMouseOutsideSlop = FALSE;
- mDragEndValid = FALSE;
+ mMouseOutsideSlop = false;
+ mDragEndValid = false;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-BOOL LLToolSelectLand::handleHover(S32 x, S32 y, MASK mask)
+bool LLToolSelectLand::handleHover(S32 x, S32 y, MASK mask)
{
if( hasMouseCapture() )
{
if (mMouseOutsideSlop || outsideSlop(x, y, mDragStartX, mDragStartY))
{
- mMouseOutsideSlop = TRUE;
+ mMouseOutsideSlop = true;
// Must do this every frame, in case the camera moved or the land moved
// since last frame.
// If doesn't hit land, doesn't change old value
LLVector3d land_global;
- BOOL hit_land = gViewerWindow->mousePointOnLandGlobal(x, y, &land_global);
+ bool hit_land = gViewerWindow->mousePointOnLandGlobal(x, y, &land_global);
if (hit_land)
{
- mDragEndValid = TRUE;
+ mDragEndValid = true;
mDragEndGlobal = land_global;
sanitize_corners(mDragStartGlobal, mDragEndGlobal, mWestSouthBottom, mEastNorthTop);
@@ -173,7 +173,7 @@ BOOL LLToolSelectLand::handleHover(S32 x, S32 y, MASK mask)
}
else
{
- mDragEndValid = FALSE;
+ mDragEndValid = false;
LL_DEBUGS("UserInput") << "hover handled by LLToolSelectLand (active, no land)" << LL_ENDL;
gViewerWindow->setCursor(UI_CURSOR_NO);
}
@@ -193,7 +193,7 @@ BOOL LLToolSelectLand::handleHover(S32 x, S32 y, MASK mask)
gViewerWindow->setCursor(UI_CURSOR_ARROW);
}
- return TRUE;
+ return true;
}
@@ -225,7 +225,7 @@ void LLToolSelectLand::roundXY(LLVector3d &vec)
// true if x,y outside small box around start_x,start_y
-BOOL LLToolSelectLand::outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y)
+bool LLToolSelectLand::outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y)
{
S32 dx = x - start_x;
S32 dy = y - start_y;
diff --git a/indra/newview/lltoolselectland.h b/indra/newview/lltoolselectland.h
index 88bc4e2e3d..893bf970d1 100644
--- a/indra/newview/lltoolselectland.h
+++ b/indra/newview/lltoolselectland.h
@@ -39,24 +39,24 @@ class LLToolSelectLand
virtual ~LLToolSelectLand();
public:
- /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask) override;
- /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask) override;
- /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask) override;
- /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask) override;
+ /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask) override;
+ /*virtual*/ bool handleDoubleClick(S32 x, S32 y, MASK mask) override;
+ /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask) override;
+ /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask) override;
/*virtual*/ void render() override; // draw the select rectangle
- /*virtual*/ BOOL isAlwaysRendered() override { return TRUE; }
+ /*virtual*/ bool isAlwaysRendered() override { return true; }
/*virtual*/ void handleSelect() override;
/*virtual*/ void handleDeselect() override;
protected:
- BOOL outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y);
+ bool outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y);
void roundXY(LLVector3d& vec);
protected:
LLVector3d mDragStartGlobal; // global coords
LLVector3d mDragEndGlobal; // global coords
- BOOL mDragEndValid; // is drag end a valid point in the world?
+ bool mDragEndValid; // is drag end a valid point in the world?
S32 mDragStartX; // screen coords, from left
S32 mDragStartY; // screen coords, from bottom
@@ -64,7 +64,7 @@ protected:
S32 mDragEndX;
S32 mDragEndY;
- BOOL mMouseOutsideSlop; // has mouse ever gone outside slop region?
+ bool mMouseOutsideSlop; // has mouse ever gone outside slop region?
LLVector3d mWestSouthBottom; // global coords, from drag
LLVector3d mEastNorthTop; // global coords, from drag
diff --git a/indra/newview/lltoolselectrect.cpp b/indra/newview/lltoolselectrect.cpp
index bae32f7bc0..feba24c2b3 100644
--- a/indra/newview/lltoolselectrect.cpp
+++ b/indra/newview/lltoolselectrect.cpp
@@ -62,17 +62,17 @@ LLToolSelectRect::LLToolSelectRect( LLToolComposite* composite )
mDragEndY(0),
mDragLastWidth(0),
mDragLastHeight(0),
- mMouseOutsideSlop(FALSE)
+ mMouseOutsideSlop(false)
{ }
void dialog_refresh_all(void);
-BOOL LLToolSelectRect::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLToolSelectRect::handleMouseDown(S32 x, S32 y, MASK mask)
{
- BOOL pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick");
- handlePick(gViewerWindow->pickImmediate(x, y, TRUE /* pick_transparent */, pick_rigged));
+ bool pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick");
+ handlePick(gViewerWindow->pickImmediate(x, y, true /* pick_transparent */, pick_rigged));
LLTool::handleMouseDown(x, y, mask);
@@ -84,27 +84,27 @@ void LLToolSelectRect::handlePick(const LLPickInfo& pick)
mPick = pick;
// start dragging rectangle
- setMouseCapture( TRUE );
+ setMouseCapture( true );
mDragStartX = pick.mMousePt.mX;
mDragStartY = pick.mMousePt.mY;
mDragEndX = pick.mMousePt.mX;
mDragEndY = pick.mMousePt.mY;
- mMouseOutsideSlop = FALSE;
+ mMouseOutsideSlop = false;
}
-BOOL LLToolSelectRect::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLToolSelectRect::handleMouseUp(S32 x, S32 y, MASK mask)
{
- setMouseCapture( FALSE );
+ setMouseCapture( false );
if( mMouseOutsideSlop )
{
mDragLastWidth = 0;
mDragLastHeight = 0;
- mMouseOutsideSlop = FALSE;
+ mMouseOutsideSlop = false;
if (mask == MASK_CONTROL)
{
@@ -114,7 +114,7 @@ BOOL LLToolSelectRect::handleMouseUp(S32 x, S32 y, MASK mask)
{
LLSelectMgr::getInstance()->selectHighlightedObjects();
}
- return TRUE;
+ return true;
}
else
{
@@ -123,7 +123,7 @@ BOOL LLToolSelectRect::handleMouseUp(S32 x, S32 y, MASK mask)
}
-BOOL LLToolSelectRect::handleHover(S32 x, S32 y, MASK mask)
+bool LLToolSelectRect::handleHover(S32 x, S32 y, MASK mask)
{
if( hasMouseCapture() )
{
@@ -134,7 +134,7 @@ BOOL LLToolSelectRect::handleHover(S32 x, S32 y, MASK mask)
// just started rect select, and not adding to current selection
LLSelectMgr::getInstance()->deselectAll();
}
- mMouseOutsideSlop = TRUE;
+ mMouseOutsideSlop = true;
mDragEndX = x;
mDragEndY = y;
@@ -153,7 +153,7 @@ BOOL LLToolSelectRect::handleHover(S32 x, S32 y, MASK mask)
}
gViewerWindow->setCursor(UI_CURSOR_ARROW);
- return TRUE;
+ return true;
}
@@ -161,7 +161,7 @@ void LLToolSelectRect::draw()
{
if( hasMouseCapture() && mMouseOutsideSlop)
{
- if (gKeyboard->currentMask(TRUE) == MASK_CONTROL)
+ if (gKeyboard->currentMask(true) == MASK_CONTROL)
{
gGL.color4f(1.f, 0.f, 0.f, 1.f);
}
@@ -175,8 +175,8 @@ void LLToolSelectRect::draw()
llmax(mDragStartY, mDragEndY),
llmax(mDragStartX, mDragEndX),
llmin(mDragStartY, mDragEndY),
- FALSE);
- if (gKeyboard->currentMask(TRUE) == MASK_CONTROL)
+ false);
+ if (gKeyboard->currentMask(true) == MASK_CONTROL)
{
gGL.color4f(1.f, 0.f, 0.f, 0.1f);
}
@@ -193,7 +193,7 @@ void LLToolSelectRect::draw()
}
// true if x,y outside small box around start_x,start_y
-BOOL LLToolSelectRect::outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y)
+bool LLToolSelectRect::outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y)
{
S32 dx = x - start_x;
S32 dy = y - start_y;
diff --git a/indra/newview/lltoolselectrect.h b/indra/newview/lltoolselectrect.h
index 5fdf622b49..bdde50fb3d 100644
--- a/indra/newview/lltoolselectrect.h
+++ b/indra/newview/lltoolselectrect.h
@@ -36,16 +36,16 @@ class LLToolSelectRect
public:
LLToolSelectRect( LLToolComposite* composite );
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- virtual BOOL handleHover(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask);
+ virtual bool handleHover(S32 x, S32 y, MASK mask);
virtual void draw(); // draw the select rectangle
void handlePick(const LLPickInfo& pick);
protected:
void handleRectangleSelection(S32 x, S32 y, MASK mask); // true if you selected one
- BOOL outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y);
+ bool outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y);
protected:
S32 mDragStartX; // screen coords, from left
@@ -57,7 +57,7 @@ protected:
S32 mDragLastWidth;
S32 mDragLastHeight;
- BOOL mMouseOutsideSlop; // has mouse ever gone outside slop region?
+ bool mMouseOutsideSlop; // has mouse ever gone outside slop region?
};
diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp
index 4c55ea1fc6..6c91c8a316 100644
--- a/indra/newview/lltracker.cpp
+++ b/indra/newview/lltracker.cpp
@@ -75,7 +75,7 @@ const S32 HUD_ARROW_SIZE = 32;
// static
LLTracker *LLTracker::sTrackerp = NULL;
-BOOL LLTracker::sCheesyBeacon = FALSE;
+bool LLTracker::sCheesyBeacon = false;
LLTracker::LLTracker()
: mTrackingStatus(TRACKING_NOTHING),
@@ -84,12 +84,12 @@ LLTracker::LLTracker()
mHUDArrowCenterY(0),
mToolTip( "" ),
mTrackedLandmarkName(""),
- mHasReachedLandmark(FALSE),
- mHasLandmarkPosition(FALSE),
- mLandmarkHasBeenVisited(FALSE),
+ mHasReachedLandmark(false),
+ mHasLandmarkPosition(false),
+ mLandmarkHasBeenVisited(false),
mTrackedLocationName( "" ),
- mIsTrackingLocation(FALSE),
- mHasReachedLocation(FALSE)
+ mIsTrackingLocation(false),
+ mHasReachedLocation(false)
{ }
@@ -182,7 +182,7 @@ void LLTracker::render3D()
if (!instance()->mBeaconText)
{
instance()->mBeaconText = (LLHUDText *)LLHUDObject::addHUDObject(LLHUDObject::LL_HUD_TEXT);
- instance()->mBeaconText->setDoFade(FALSE);
+ instance()->mBeaconText->setDoFade(false);
}
LLVector3d pos_global = instance()->mTrackedPositionGlobal;
@@ -206,7 +206,7 @@ void LLTracker::render3D()
if (!instance()->mBeaconText)
{
instance()->mBeaconText = (LLHUDText *)LLHUDObject::addHUDObject(LLHUDObject::LL_HUD_TEXT);
- instance()->mBeaconText->setDoFade(FALSE);
+ instance()->mBeaconText->setDoFade(false);
}
if (instance()->mHasLandmarkPosition)
@@ -235,7 +235,7 @@ void LLTracker::render3D()
// disappear when they're created only a few meters
// away, yet disappear when the agent wanders away
// and back again
- instance()->mHasReachedLandmark = FALSE;
+ instance()->mHasReachedLandmark = false;
}
renderBeacon( instance()->mTrackedPositionGlobal, map_track_color, map_track_color_under,
instance()->mBeaconText, instance()->mTrackedLandmarkName );
@@ -256,7 +256,7 @@ void LLTracker::render3D()
if (!instance()->mBeaconText)
{
instance()->mBeaconText = (LLHUDText *)LLHUDObject::addHUDObject(LLHUDObject::LL_HUD_TEXT);
- instance()->mBeaconText->setDoFade(FALSE);
+ instance()->mBeaconText->setDoFade(false);
}
F32 dist = gFloaterWorldMap->getDistanceToDestination(instance()->getTrackedPositionGlobal(), 0.0f);
@@ -272,22 +272,22 @@ void LLTracker::render3D()
}
else
{
- BOOL stop_tracking = FALSE;
+ bool stop_tracking = false;
const LLUUID& avatar_id = av_tracker.getAvatarID();
if(avatar_id.isNull())
{
- stop_tracking = TRUE;
+ stop_tracking = true;
}
else
{
const LLRelationship* buddy = av_tracker.getBuddyInfo(avatar_id);
if(buddy && !buddy->isOnline() && !gAgent.isGodlike())
{
- stop_tracking = TRUE;
+ stop_tracking = true;
}
if(!buddy && !gAgent.isGodlike())
{
- stop_tracking = TRUE;
+ stop_tracking = true;
}
}
if(stop_tracking)
@@ -336,7 +336,7 @@ void LLTracker::trackLocation(const LLVector3d& pos_global, const std::string& f
instance()->mTrackedPositionGlobal = pos_global;
instance()->mTrackedLocationName = full_name;
- instance()->mIsTrackingLocation = TRUE;
+ instance()->mIsTrackingLocation = true;
instance()->mTrackingStatus = TRACKING_LOCATION;
instance()->mTrackingLocationType = location_type;
instance()->mLabel = full_name;
@@ -345,9 +345,9 @@ void LLTracker::trackLocation(const LLVector3d& pos_global, const std::string& f
// static
-BOOL LLTracker::handleMouseDown(S32 x, S32 y)
+bool LLTracker::handleMouseDown(S32 x, S32 y)
{
- BOOL eat_mouse_click = FALSE;
+ bool eat_mouse_click = false;
// fortunately, we can always compute the tracking arrow center
S32 dist_sqrd = (x - instance()->mHUDArrowCenterX) * (x - instance()->mHUDArrowCenterX) +
(y - instance()->mHUDArrowCenterY) * (y - instance()->mHUDArrowCenterY);
@@ -358,14 +358,14 @@ BOOL LLTracker::handleMouseDown(S32 x, S32 y)
// turn off tracking
if (gAgent.getAutoPilot())
{
- gAgent.stopAutoPilot(TRUE); // TRUE because cancelled by user
- eat_mouse_click = TRUE;
+ gAgent.stopAutoPilot(true); // true because cancelled by user
+ eat_mouse_click = true;
}
*/
if (getTrackingStatus())
{
instance()->stopTrackingAll();
- eat_mouse_click = TRUE;
+ eat_mouse_click = true;
}
}
return eat_mouse_click;
@@ -403,7 +403,7 @@ LLVector3d LLTracker::getTrackedPositionGlobal()
// static
-BOOL LLTracker::hasLandmarkPosition()
+bool LLTracker::hasLandmarkPosition()
{
if (!instance()->mHasLandmarkPosition)
{
@@ -605,7 +605,7 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
str += text;
hud_textp->setFont(LLFontGL::getFontSansSerif());
- hud_textp->setZCompare(FALSE);
+ hud_textp->setZCompare(false);
hud_textp->setColor(LLColor4(1.f, 1.f, 1.f, llmax(0.2f, llmin(1.f,(dist-FADE_DIST)/FADE_DIST))));
hud_textp->setString(str);
@@ -655,9 +655,9 @@ void LLTracker::stopTrackingLandmark(bool clear_ui)
mTrackedLandmarkItemID.setNull();
mTrackedLandmarkName.assign("");
mTrackedPositionGlobal.zeroVec();
- mHasLandmarkPosition = FALSE;
- mHasReachedLandmark = FALSE;
- mLandmarkHasBeenVisited = TRUE;
+ mHasLandmarkPosition = false;
+ mHasReachedLandmark = false;
+ mLandmarkHasBeenVisited = true;
gFloaterWorldMap->clearLandmarkSelection(clear_ui);
mTrackingStatus = TRACKING_NOTHING;
}
@@ -667,7 +667,7 @@ void LLTracker::stopTrackingLocation(bool clear_ui, bool dest_reached)
{
purgeBeaconText();
mTrackedLocationName.assign("");
- mIsTrackingLocation = FALSE;
+ mIsTrackingLocation = false;
mTrackedPositionGlobal.zeroVec();
gFloaterWorldMap->clearLocationSelection(clear_ui, dest_reached);
mTrackingStatus = TRACKING_NOTHING;
@@ -688,7 +688,7 @@ void LLTracker::drawMarker(const LLVector3d& pos_global, const LLColor4& color)
LLCoordGL screen;
S32 x = 0;
S32 y = 0;
- const BOOL CLAMP = TRUE;
+ const bool CLAMP = true;
if (LLViewerCamera::getInstance()->projectPosAgentToScreen(pos_local, screen, CLAMP)
|| LLViewerCamera::getInstance()->projectPosAgentToScreenEdge(pos_local, screen) )
@@ -802,13 +802,13 @@ void LLTracker::cacheLandmarkPosition()
{
// the landmark asset download may have finished, in which case
// we'll now be able to figure out where we're trying to go
- BOOL found_landmark = FALSE;
+ bool found_landmark = false;
if( mTrackedLandmarkAssetID == LLFloaterWorldMap::getHomeID())
{
LLVector3d pos_global;
if ( gAgent.getHomePosGlobal( &mTrackedPositionGlobal ))
{
- found_landmark = TRUE;
+ found_landmark = true;
}
else
{
@@ -822,27 +822,27 @@ void LLTracker::cacheLandmarkPosition()
LLLandmark* landmark = gLandmarkList.getAsset(mTrackedLandmarkAssetID);
if(landmark && landmark->getGlobalPos(mTrackedPositionGlobal))
{
- found_landmark = TRUE;
+ found_landmark = true;
// cache the object's visitation status
- mLandmarkHasBeenVisited = FALSE;
+ mLandmarkHasBeenVisited = false;
LLInventoryItem* item = gInventory.getItem(mTrackedLandmarkItemID);
if ( item
&& item->getFlags()&LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED)
{
- mLandmarkHasBeenVisited = TRUE;
+ mLandmarkHasBeenVisited = true;
}
}
}
if ( found_landmark && gFloaterWorldMap )
{
- mHasReachedLandmark = FALSE;
+ mHasReachedLandmark = false;
F32 dist = gFloaterWorldMap->getDistanceToDestination(mTrackedPositionGlobal, 1.0f);
if ( dist < DESTINATION_UNVISITED_RADIUS )
{
- mHasReachedLandmark = TRUE;
+ mHasReachedLandmark = true;
}
- mHasLandmarkPosition = TRUE;
+ mHasLandmarkPosition = true;
}
mHasLandmarkPosition = found_landmark;
}
diff --git a/indra/newview/lltracker.h b/indra/newview/lltracker.h
index 4a6f10b767..1b5e5d8a73 100644
--- a/indra/newview/lltracker.h
+++ b/indra/newview/lltracker.h
@@ -88,7 +88,7 @@ public:
// returns global pos of tracked thing
static LLVector3d getTrackedPositionGlobal();
- static BOOL hasLandmarkPosition();
+ static bool hasLandmarkPosition();
static const std::string& getTrackedLocationName();
static void drawHUDArrow();
@@ -96,10 +96,10 @@ public:
// Draw in-world 3D tracking stuff
static void render3D();
- static BOOL handleMouseDown(S32 x, S32 y);
+ static bool handleMouseDown(S32 x, S32 y);
static LLTracker* sTrackerp;
- static BOOL sCheesyBeacon;
+ static bool sCheesyBeacon;
static const std::string& getLabel() { return instance()->mLabel; }
static const std::string& getToolTip() { return instance()->mToolTip; }
@@ -141,13 +141,13 @@ protected:
LLUUID mTrackedLandmarkItemID;
std::vector<LLUUID> mLandmarkAssetIDList;
std::vector<LLUUID> mLandmarkItemIDList;
- BOOL mHasReachedLandmark;
- BOOL mHasLandmarkPosition;
- BOOL mLandmarkHasBeenVisited;
+ bool mHasReachedLandmark;
+ bool mHasLandmarkPosition;
+ bool mLandmarkHasBeenVisited;
std::string mTrackedLocationName;
- BOOL mIsTrackingLocation;
- BOOL mHasReachedLocation;
+ bool mIsTrackingLocation;
+ bool mHasReachedLocation;
};
diff --git a/indra/newview/lltrackpicker.cpp b/indra/newview/lltrackpicker.cpp
index fe6256a8a9..72e12a7192 100644
--- a/indra/newview/lltrackpicker.cpp
+++ b/indra/newview/lltrackpicker.cpp
@@ -57,11 +57,11 @@ LLFloaterTrackPicker::~LLFloaterTrackPicker()
{
}
-BOOL LLFloaterTrackPicker::postBuild()
+bool LLFloaterTrackPicker::postBuild()
{
childSetAction(BTN_CANCEL, [this](LLUICtrl*, const LLSD& param){ onButtonCancel(); });
childSetAction(BTN_SELECT, [this](LLUICtrl*, const LLSD& param){ onButtonSelect(); });
- return TRUE;
+ return true;
}
void LLFloaterTrackPicker::onClose(bool app_quitting)
@@ -72,7 +72,7 @@ void LLFloaterTrackPicker::onClose(bool app_quitting)
LLView *owner = mOwnerHandle.get();
if (owner)
{
- owner->setFocus(TRUE);
+ owner->setFocus(true);
}
}
@@ -94,12 +94,12 @@ void LLFloaterTrackPicker::showPicker(const LLSD &args)
if (can_enable && select_item)
{
select_item = false;
- getChild<LLRadioGroup>(RDO_TRACK_SELECTION, true)->setSelectedByValue(LLSD(track_id), TRUE);
+ getChild<LLRadioGroup>(RDO_TRACK_SELECTION, true)->setSelectedByValue(LLSD(track_id), true);
}
}
openFloater(getKey());
- setFocus(TRUE);
+ setFocus(true);
}
void LLFloaterTrackPicker::draw()
diff --git a/indra/newview/lltrackpicker.h b/indra/newview/lltrackpicker.h
index dab3b72915..49cc1a5c64 100644
--- a/indra/newview/lltrackpicker.h
+++ b/indra/newview/lltrackpicker.h
@@ -39,7 +39,7 @@ public:
LLFloaterTrackPicker(LLView * owner, const LLSD &params = LLSD());
virtual ~LLFloaterTrackPicker() override;
- virtual BOOL postBuild() override;
+ virtual bool postBuild() override;
virtual void onClose(bool app_quitting) override;
void showPicker(const LLSD &args);
diff --git a/indra/newview/lltransientdockablefloater.cpp b/indra/newview/lltransientdockablefloater.cpp
index c108f1dfdc..21c4769a5d 100644
--- a/indra/newview/lltransientdockablefloater.cpp
+++ b/indra/newview/lltransientdockablefloater.cpp
@@ -52,7 +52,7 @@ LLTransientDockableFloater::~LLTransientDockableFloater()
}
}
-void LLTransientDockableFloater::setVisible(BOOL visible)
+void LLTransientDockableFloater::setVisible(bool visible)
{
LLView* dock = getDockWidget();
if(visible && isDocked())
diff --git a/indra/newview/lltransientdockablefloater.h b/indra/newview/lltransientdockablefloater.h
index 5fb79597f4..94c0f68de5 100644
--- a/indra/newview/lltransientdockablefloater.h
+++ b/indra/newview/lltransientdockablefloater.h
@@ -45,9 +45,9 @@ public:
const LLSD& key, const Params& params = getDefaultParams());
virtual ~LLTransientDockableFloater();
- /*virtual*/ void setVisible(BOOL visible);
- /* virtual */void setDocked(bool docked, bool pop_on_undock = true);
- virtual LLTransientFloaterMgr::ETransientGroup getGroup() { return LLTransientFloaterMgr::GLOBAL; }
+ void setVisible(bool visible) override;
+ void setDocked(bool docked, bool pop_on_undock = true) override;
+ virtual LLTransientFloaterMgr::ETransientGroup getGroup() override { return LLTransientFloaterMgr::GLOBAL; }
};
#endif /* LL_TRANSIENTDOCKABLEFLOATER_H */
diff --git a/indra/newview/lltransientfloatermgr.cpp b/indra/newview/lltransientfloatermgr.cpp
index 3d68c10489..129c7e1b6d 100644
--- a/indra/newview/lltransientfloatermgr.cpp
+++ b/indra/newview/lltransientfloatermgr.cpp
@@ -96,7 +96,7 @@ void LLTransientFloaterMgr::hideTransientFloaters(S32 x, S32 y)
bool hide = isControlClicked(group, mGroupControls.find(group)->second, x, y);
if (hide)
{
- floater->setTransientVisible(FALSE);
+ floater->setTransientVisible(false);
}
}
}
diff --git a/indra/newview/lltransientfloatermgr.h b/indra/newview/lltransientfloatermgr.h
index d126543f15..fda96cfd64 100644
--- a/indra/newview/lltransientfloatermgr.h
+++ b/indra/newview/lltransientfloatermgr.h
@@ -80,7 +80,7 @@ protected:
public:
virtual LLTransientFloaterMgr::ETransientGroup getGroup() = 0;
bool isTransientDocked() { return mFloater->isDocked(); };
- void setTransientVisible(BOOL visible) {mFloater->setVisible(visible); }
+ void setTransientVisible(bool visible) {mFloater->setVisible(visible); }
private:
LLFloater* mFloater;
diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp
index 979b495906..e099fd8769 100644
--- a/indra/newview/lltranslate.cpp
+++ b/indra/newview/lltranslate.cpp
@@ -36,11 +36,11 @@
#include "llversioninfo.h"
#include "llviewercontrol.h"
#include "llcoros.h"
-#include "json/reader.h"
#include "llcorehttputil.h"
#include "llurlregistry.h"
#include "stringize.h"
+#include <boost/json.hpp>
static const std::string AZURE_NOTRANSLATE_OPENING_TAG("<div translate=\"no\">");
static const std::string AZURE_NOTRANSLATE_CLOSING_TAG("</div>");
@@ -344,11 +344,11 @@ public:
private:
static void parseErrorResponse(
- const Json::Value& root,
+ const boost::json::value& root,
int& status,
std::string& err_msg);
static bool parseTranslation(
- const Json::Value& root,
+ const boost::json::value& root,
std::string& translation,
std::string& detected_lang);
static std::string getAPIKey();
@@ -396,28 +396,25 @@ bool LLGoogleTranslationHandler::parseResponse(
std::string& detected_lang,
std::string& err_msg) const
{
- const std::string& text = !body.empty() ? body : http_response["error_body"].asStringRef();
+ const std::string& text = !body.empty() ? body : http_response["error_body"].asStringRef();
- Json::Value root;
- Json::Reader reader;
+ boost::json::error_code ec;
+ boost::json::value root = boost::json::parse(text, ec);
+ if (ec.failed())
+ {
+ err_msg = ec.what();
+ return false;
+ }
- if (reader.parse(text, root))
- {
- if (root.isObject())
- {
- // Request succeeded, extract translation from the XML body.
- if (parseTranslation(root, translation, detected_lang))
- return true;
-
- // Request failed. Extract error message from the XML body.
- parseErrorResponse(root, status, err_msg);
- }
- }
- else
- {
- // XML parsing failed. Extract error message from the XML parser.
- err_msg = reader.getFormatedErrorMessages();
- }
+ if (root.is_object())
+ {
+ // Request succeeded, extract translation from the XML body.
+ if (parseTranslation(root, translation, detected_lang))
+ return true;
+
+ // Request failed. Extract error message from the XML body.
+ parseErrorResponse(root, status, err_msg);
+ }
return false;
}
@@ -430,48 +427,55 @@ bool LLGoogleTranslationHandler::isConfigured() const
// static
void LLGoogleTranslationHandler::parseErrorResponse(
- const Json::Value& root,
+ const boost::json::value& root,
int& status,
std::string& err_msg)
{
- const Json::Value& error = root.get("error", 0);
- if (!error.isObject() || !error.isMember("message") || !error.isMember("code"))
- {
- return;
- }
+ boost::json::error_code ec;
+ auto message = root.find_pointer("/data/message", ec);
+ auto code = root.find_pointer("/data/code", ec);
+ if (!message || !code)
+ {
+ return;
+ }
- err_msg = error["message"].asString();
- status = error["code"].asInt();
+ auto message_val = boost::json::try_value_to<std::string>(*message);
+ auto code_val = boost::json::try_value_to<int>(*code);
+ if (!message_val || !code_val)
+ {
+ return;
+ }
+
+ err_msg = message_val.value();
+ status = code_val.value();
}
// static
bool LLGoogleTranslationHandler::parseTranslation(
- const Json::Value& root,
+ const boost::json::value& root,
std::string& translation,
std::string& detected_lang)
{
- // JsonCpp is prone to aborting the program on failed assertions,
- // so be super-careful and verify the response format.
- const Json::Value& data = root.get("data", 0);
- if (!data.isObject() || !data.isMember("translations"))
- {
- return false;
- }
+ boost::json::error_code ec;
+ auto translated_text = root.find_pointer("/data/translations/0/translatedText", ec);
+ if (!translated_text) return false;
- const Json::Value& translations = data["translations"];
- if (!translations.isArray() || translations.size() == 0)
- {
- return false;
- }
+ auto text_val = boost::json::try_value_to<std::string>(*translated_text);
+ if (!text_val)
+ {
+ LL_WARNS() << "Failed to parse translation" << text_val.error() << LL_ENDL;
+ return false;
+ }
- const Json::Value& first = translations[0U];
- if (!first.isObject() || !first.isMember("translatedText"))
- {
- return false;
- }
+ translation = text_val.value();
+
+ auto language = root.find_pointer("/data/translations/0/detectedSourceLanguage", ec);
+ if (language)
+ {
+ auto lang_val = boost::json::try_value_to<std::string>(*language);
+ detected_lang = lang_val ? lang_val.value() : "";
+ }
- translation = first["translatedText"].asString();
- detected_lang = first.get("detectedSourceLanguage", "").asString();
return true;
}
@@ -652,12 +656,11 @@ bool LLAzureTranslationHandler::checkVerificationResponse(
// Expected: "{\"error\":{\"code\":400000,\"message\":\"One of the request inputs is not valid.\"}}"
// But for now just verify response is a valid json
- Json::Value root;
- Json::Reader reader;
-
- if (!reader.parse(response["error_body"].asString(), root))
+ boost::json::error_code ec;
+ boost::json::value root = boost::json::parse(response["error_body"].asString(), ec);
+ if (ec.failed())
{
- LL_DEBUGS("Translate") << "Failed to parse error_body:" << reader.getFormatedErrorMessages() << LL_ENDL;
+ LL_DEBUGS("Translate") << "Failed to parse error_body:" << ec.what() << LL_ENDL;
return false;
}
@@ -676,57 +679,36 @@ bool LLAzureTranslationHandler::parseResponse(
if (status != HTTP_OK)
{
if (http_response.has("error_body"))
- err_msg = parseErrorResponse(http_response["error_body"].asString());
+ err_msg = parseErrorResponse(http_response["error_body"].asString());
return false;
}
//Example:
// "[{\"detectedLanguage\":{\"language\":\"en\",\"score\":1.0},\"translations\":[{\"text\":\"Hello, what is your name?\",\"to\":\"en\"}]}]"
- Json::Value root;
- Json::Reader reader;
-
- if (!reader.parse(body, root))
- {
- err_msg = reader.getFormatedErrorMessages();
- return false;
- }
-
- if (!root.isArray()) // empty response? should not happen
+ boost::json::error_code ec;
+ boost::json::value root = boost::json::parse(body, ec);
+ if (ec.failed())
{
+ err_msg = ec.what();
return false;
}
+ auto language = root.find_pointer("/0/detectedLanguage/language", ec);
+ if (!language) return false;
- // Request succeeded, extract translation from the response.
+ auto translated_text = root.find_pointer("/0/translations/0/text", ec);
+ if (!translated_text) return false;
- const Json::Value& data = root[0U];
- if (!data.isObject()
- || !data.isMember("detectedLanguage")
- || !data.isMember("translations"))
+ auto lang_val = boost::json::try_value_to<std::string>(*language);
+ auto text_val = boost::json::try_value_to<std::string>(*translated_text);
+ if (!lang_val || !text_val)
{
+ LL_WARNS() << "Failed to parse translation" << lang_val.error() << text_val.error() << LL_ENDL;
return false;
}
- const Json::Value& detectedLanguage = data["detectedLanguage"];
- if (!detectedLanguage.isObject() || !detectedLanguage.isMember("language"))
- {
- return false;
- }
- detected_lang = detectedLanguage["language"].asString();
-
- const Json::Value& translations = data["translations"];
- if (!translations.isArray() || translations.size() == 0)
- {
- return false;
- }
-
- const Json::Value& first = translations[0U];
- if (!first.isObject() || !first.isMember("text"))
- {
- return false;
- }
-
- translation = LLURI::unescape(first["text"].asString());
+ detected_lang = lang_val.value();
+ translation = text_val.value();
return true;
}
@@ -744,27 +726,25 @@ std::string LLAzureTranslationHandler::parseErrorResponse(
// Expected: "{\"error\":{\"code\":400000,\"message\":\"One of the request inputs is not valid.\"}}"
// But for now just verify response is a valid json with an error
- Json::Value root;
- Json::Reader reader;
-
- if (!reader.parse(body, root))
+ boost::json::error_code ec;
+ boost::json::value root = boost::json::parse(body, ec);
+ if (ec.failed())
{
- return std::string();
+ return {};
}
- if (!root.isObject() || !root.isMember("error"))
+ auto err_msg = root.find_pointer("/error/message", ec);
+ if (!err_msg)
{
- return std::string();
+ return {};
}
- const Json::Value& error_map = root["error"];
-
- if (!error_map.isObject() || !error_map.isMember("message"))
+ auto err_msg_val = boost::json::try_value_to<std::string>(*err_msg);
+ if (!err_msg_val)
{
- return std::string();
+ return {};
}
-
- return error_map["message"].asString();
+ return err_msg_val.value();
}
// static
@@ -976,39 +956,39 @@ bool LLDeepLTranslationHandler::parseResponse(
//Example:
// "{\"translations\":[{\"detected_source_language\":\"EN\",\"text\":\"test\"}]}"
- Json::Value root;
- Json::Reader reader;
-
- if (!reader.parse(body, root))
+ boost::json::error_code ec;
+ boost::json::value root = boost::json::parse(body, ec);
+ if (ec.failed())
{
- err_msg = reader.getFormatedErrorMessages();
+ err_msg = ec.message();
return false;
}
- if (!root.isObject()
- || !root.isMember("translations")) // empty response? should not happen
+ auto detected_langp = root.find_pointer("/translations/0/detected_source_language", ec);
+ if (!detected_langp || ec.failed()) // empty response? should not happen
{
+ err_msg = ec.message();
return false;
}
// Request succeeded, extract translation from the response.
- const Json::Value& translations = root["translations"];
- if (!translations.isArray() || translations.size() == 0)
+ auto text_valp = root.find_pointer("/translations/0/text", ec);
+ if (!text_valp || ec.failed())
{
+ err_msg = ec.message();
return false;
}
- const Json::Value& data= translations[0U];
- if (!data.isObject()
- || !data.isMember("detected_source_language")
- || !data.isMember("text"))
+ auto lang_result = boost::json::try_value_to<std::string>(*detected_langp);
+ auto text_result = boost::json::try_value_to<std::string>(*text_valp);
+ if (!lang_result || !text_result)
{
return false;
}
- detected_lang = data["detected_source_language"].asString();
+ detected_lang = lang_result.value();
LLStringUtil::toLower(detected_lang);
- translation = data["text"].asString();
+ translation = text_result.value();
return true;
}
@@ -1024,21 +1004,24 @@ std::string LLDeepLTranslationHandler::parseErrorResponse(
const std::string& body)
{
// Example: "{\"message\":\"One of the request inputs is not valid.\"}"
-
- Json::Value root;
- Json::Reader reader;
-
- if (!reader.parse(body, root))
- {
- return std::string();
+ boost::json::error_code ec;
+ boost::json::value root = boost::json::parse(body, ec);
+ if (ec.failed())
+ {
+ return {};
}
- if (!root.isObject() || !root.isMember("message"))
+ auto message_ptr = root.find_pointer("/message", ec);
+ if (!message_ptr || ec.failed())
{
- return std::string();
+ return {};
}
- return root["message"].asString();
+ auto message_val = boost::json::try_value_to<std::string>(*message_ptr);
+ if (!message_val)
+ return {};
+
+ return message_val.value();
}
// static
diff --git a/indra/newview/lltranslate.h b/indra/newview/lltranslate.h
index 4a5d80737c..30fb8d74df 100644
--- a/indra/newview/lltranslate.h
+++ b/indra/newview/lltranslate.h
@@ -32,11 +32,6 @@
#include "llsingleton.h"
-namespace Json
-{
- class Value;
-}
-
class LLTranslationAPIHandler;
/**
* Entry point for machine translation services.
diff --git a/indra/newview/lluiavatar.cpp b/indra/newview/lluiavatar.cpp
index e4e266c92a..264d39c559 100644
--- a/indra/newview/lluiavatar.cpp
+++ b/indra/newview/lluiavatar.cpp
@@ -37,7 +37,7 @@
LLUIAvatar::LLUIAvatar(const LLUUID& id, const LLPCode pcode, LLViewerRegion* regionp) :
LLVOAvatar(id, pcode, regionp)
{
- mIsDummy = TRUE;
+ mIsDummy = true;
mIsUIAvatar = true;
}
diff --git a/indra/newview/lluploaddialog.cpp b/indra/newview/lluploaddialog.cpp
index e59064c074..98672b7e7b 100644
--- a/indra/newview/lluploaddialog.cpp
+++ b/indra/newview/lluploaddialog.cpp
@@ -61,7 +61,7 @@ void LLUploadDialog::modalUploadFinished()
LLUploadDialog::LLUploadDialog( const std::string& msg)
: LLPanel()
{
- setBackgroundVisible( TRUE );
+ setBackgroundVisible( true );
if( LLUploadDialog::sDialog )
{
@@ -119,7 +119,7 @@ void LLUploadDialog::setMessage( const std::string& msg)
S32 dialog_width = max_msg_width + 2 * HPAD;
S32 dialog_height = line_height * msg_lines.size() + 2 * VPAD;
- reshape( dialog_width, dialog_height, FALSE );
+ reshape( dialog_width, dialog_height, false );
// Message
S32 msg_x = (getRect().getWidth() - max_msg_width) / 2;
@@ -127,7 +127,7 @@ void LLUploadDialog::setMessage( const std::string& msg)
int line_num;
for (line_num=0; line_num<16; ++line_num)
{
- mLabelBox[line_num]->setVisible(FALSE);
+ mLabelBox[line_num]->setVisible(false);
}
line_num = 0;
for (std::list<std::string>::iterator iter = msg_lines.begin();
@@ -139,7 +139,7 @@ void LLUploadDialog::setMessage( const std::string& msg)
mLabelBox[line_num]->setRect(msg_rect);
mLabelBox[line_num]->setText(cur_line);
mLabelBox[line_num]->setColor( LLUIColorTable::instance().getColor( "LabelTextColor" ) );
- mLabelBox[line_num]->setVisible(TRUE);
+ mLabelBox[line_num]->setVisible(true);
msg_y -= line_height;
++line_num;
}
diff --git a/indra/newview/llurl.cpp b/indra/newview/llurl.cpp
index 01a81c5f83..840a76d50d 100644
--- a/indra/newview/llurl.cpp
+++ b/indra/newview/llurl.cpp
@@ -161,9 +161,9 @@ bool LLURL::operator==(const LLURL &rhs) const
|| (strcmp(mTag, rhs.mTag))
)
{
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
bool LLURL::operator!=(const LLURL& rhs) const
diff --git a/indra/newview/llurl.h b/indra/newview/llurl.h
index 01ab3bdfc2..208f1a7562 100644
--- a/indra/newview/llurl.h
+++ b/indra/newview/llurl.h
@@ -77,7 +77,7 @@ public:
virtual const char *updateRelativePath(const LLURL &url);
- virtual BOOL isExtension(const char *compare) {return (!strcmp(mExtension,compare));};
+ virtual bool isExtension(const char *compare) {return (!strcmp(mExtension,compare));};
public:
diff --git a/indra/newview/llurllineeditorctrl.cpp b/indra/newview/llurllineeditorctrl.cpp
index 2b7e598a59..14a658827e 100644
--- a/indra/newview/llurllineeditorctrl.cpp
+++ b/indra/newview/llurllineeditorctrl.cpp
@@ -62,7 +62,7 @@ void LLURLLineEditor::cut()
deleteSelection();
// Validate new string and rollback the if needed.
- BOOL need_to_rollback = ( mPrevalidateFunc && !mPrevalidateFunc( mText.getWString() ) );
+ bool need_to_rollback = ( mPrevalidateFunc && !mPrevalidateFunc( mText.getWString() ) );
if( need_to_rollback )
{
rollback.doRollback( this );
diff --git a/indra/newview/llurllineeditorctrl.h b/indra/newview/llurllineeditorctrl.h
index b9540dd571..ed9671d314 100644
--- a/indra/newview/llurllineeditorctrl.h
+++ b/indra/newview/llurllineeditorctrl.h
@@ -82,7 +82,7 @@ private:
std::string mText;
S32 mCursorPos;
S32 mScrollHPos;
- BOOL mIsSelecting;
+ bool mIsSelecting;
S32 mSelectionStart;
S32 mSelectionEnd;
}; // end class LLURLLineEditorRollback
diff --git a/indra/newview/llvectorperfoptions.h b/indra/newview/llvectorperfoptions.h
deleted file mode 100644
index e7a5748256..0000000000
--- a/indra/newview/llvectorperfoptions.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * @file llvectorperfoptions.h
- * @brief SSE/SSE2 vector math performance options.
- *
- * $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_VECTORPERFOPTIONS_H
-#define LL_VECTORPERFOPTIONS_H
-
-// Deprecated - moved into llviewerjointmesh
-
-#endif
diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp
index aa9ff012c3..7277dbeff8 100644
--- a/indra/newview/llviewerassetstorage.cpp
+++ b/indra/newview/llviewerassetstorage.cpp
@@ -199,12 +199,12 @@ void LLViewerAssetStorage::storeAssetData(
// Read the data from the cache if it'll fit in this packet.
if (asset_size + 100 < MTUBYTES)
{
- BOOL res = vfile.read(buffer, asset_size); /* Flawfinder: ignore */
+ bool res = vfile.read(buffer, asset_size); /* Flawfinder: ignore */
S32 bytes_read = res ? vfile.getLastBytesRead() : 0;
if( bytes_read == asset_size )
{
- req->mDataSentInFirstPacket = TRUE;
+ req->mDataSentInFirstPacket = true;
//LL_INFOS() << "LLViewerAssetStorage::createAsset sending data in first packet" << LL_ENDL;
}
else
@@ -361,8 +361,8 @@ void LLViewerAssetStorage::_queueDataRequest(
LLAssetType::EType atype,
LLGetAssetCallback callback,
void *user_data,
- BOOL duplicate,
- BOOL is_priority)
+ bool duplicate,
+ bool is_priority)
{
mCountRequests++;
queueRequestHttp(uuid, atype, callback, user_data, duplicate, is_priority);
@@ -373,8 +373,8 @@ void LLViewerAssetStorage::queueRequestHttp(
LLAssetType::EType atype,
LLGetAssetCallback callback,
void *user_data,
- BOOL duplicate,
- BOOL is_priority)
+ bool duplicate,
+ bool is_priority)
{
LL_DEBUGS("ViewerAsset") << "Request asset via HTTP " << uuid << " type " << LLAssetType::lookup(atype) << LL_ENDL;
diff --git a/indra/newview/llviewerassetstorage.h b/indra/newview/llviewerassetstorage.h
index c3719d0918..216ade8b7a 100644
--- a/indra/newview/llviewerassetstorage.h
+++ b/indra/newview/llviewerassetstorage.h
@@ -51,7 +51,7 @@ public:
bool temp_file = false,
bool is_priority = false,
bool store_local = false,
- bool user_waiting=FALSE,
+ bool user_waiting=false,
F64Seconds timeout=LL_ASSET_STORAGE_TIMEOUT) override;
void storeAssetData(
@@ -62,7 +62,7 @@ public:
void* user_data,
bool temp_file = false,
bool is_priority = false,
- bool user_waiting=FALSE,
+ bool user_waiting=false,
F64Seconds timeout=LL_ASSET_STORAGE_TIMEOUT) override;
protected:
@@ -70,15 +70,15 @@ protected:
LLAssetType::EType type,
LLGetAssetCallback callback,
void *user_data,
- BOOL duplicate,
- BOOL is_priority) override;
+ bool duplicate,
+ bool is_priority) override;
void queueRequestHttp(const LLUUID& uuid,
LLAssetType::EType type,
LLGetAssetCallback callback,
void *user_data,
- BOOL duplicate,
- BOOL is_priority);
+ bool duplicate,
+ bool is_priority);
void capsRecvForRegion(const LLUUID& region_id, std::string pumpname);
diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp
index e2e321af0d..68ed7633b9 100644
--- a/indra/newview/llviewerassetupload.cpp
+++ b/indra/newview/llviewerassetupload.cpp
@@ -156,9 +156,9 @@ LLSD LLResourceUploadInfo::generatePostBody()
body["next_owner_mask"] = LLSD::Integer(mNextOwnerPerms);
body["group_mask"] = LLSD::Integer(mGroupPerms);
body["everyone_mask"] = LLSD::Integer(mEveryonePerms);
+ body["expected_upload_cost"] = mExpectedUploadCost;
return body;
-
}
void LLResourceUploadInfo::logPreparedUpload()
@@ -409,7 +409,7 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile()
// Unknown extension
errorMessage = llformat(LLTrans::getString("UnknownFileExtension").c_str(), exten.c_str());
errorLabel = "ErrorMessage";
- error = TRUE;;
+ error = true;;
}
else if (assetType == LLAssetType::AT_TEXTURE)
{
@@ -508,7 +508,7 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile()
// Unknown extension
errorMessage = llformat(LLTrans::getString("UnknownFileExtension").c_str(), exten.c_str());
errorLabel = "ErrorMessage";
- error = TRUE;;
+ error = true;;
}
if (error)
@@ -654,6 +654,8 @@ LLBufferedAssetUploadInfo::LLBufferedAssetUploadInfo(LLUUID itemId, LLPointer<LL
{
setItemId(itemId);
+ LLImageDataSharedLock lock(image);
+
EImageCodec codec = static_cast<EImageCodec>(image->getCodec());
switch (codec)
@@ -930,7 +932,7 @@ void LLViewerAssetUpload::AssetInventoryUploadCoproc(LLCoreHttpUtil::HttpCorouti
// Show the preview panel for textures and sounds to let
// user know that the image (or snapshot) arrived intact.
- LLInventoryPanel* panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
+ LLInventoryPanel* panel = LLInventoryPanel::getActiveInventoryPanel(false);
LLInventoryPanel::openInventoryPanelAndSetSelection(true, serverInventoryItem, false, false, !panel);
// restore keyboard focus
diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp
index 6a0edbecb1..66184abd37 100644
--- a/indra/newview/llvieweraudio.cpp
+++ b/indra/newview/llvieweraudio.cpp
@@ -353,9 +353,9 @@ void init_audio()
// load up our initial set of sounds we'll want so they're in memory and ready to be played
- BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio");
+ bool mute_audio = gSavedSettings.getBOOL("MuteAudio");
- if (!mute_audio && FALSE == gSavedSettings.getBOOL("NoPreload"))
+ if (!mute_audio && false == gSavedSettings.getBOOL("NoPreload"))
{
gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndAlert")));
gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndBadKeystroke")));
@@ -396,10 +396,10 @@ void init_audio()
void audio_update_volume(bool force_update)
{
F32 master_volume = gSavedSettings.getF32("AudioLevelMaster");
- BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio");
+ bool mute_audio = gSavedSettings.getBOOL("MuteAudio");
LLProgressView* progress = gViewerWindow->getProgressView();
- BOOL progress_view_visible = FALSE;
+ bool progress_view_visible = false;
if (progress)
{
@@ -408,7 +408,7 @@ void audio_update_volume(bool force_update)
if (!gViewerWindow->getActive() && gSavedSettings.getBOOL("MuteWhenMinimized"))
{
- mute_audio = TRUE;
+ mute_audio = true;
}
F32 mute_volume = mute_audio ? 0.0f : 1.0f;
@@ -455,7 +455,7 @@ void audio_update_volume(bool force_update)
}
F32 music_volume = gSavedSettings.getF32("AudioLevelMusic");
- BOOL music_muted = gSavedSettings.getBOOL("MuteMusic");
+ bool music_muted = gSavedSettings.getBOOL("MuteMusic");
F32 fade_volume = LLViewerAudio::getInstance()->getFadeVolume();
music_volume = mute_volume * master_volume * music_volume * fade_volume;
@@ -464,7 +464,7 @@ void audio_update_volume(bool force_update)
// Streaming Media
F32 media_volume = gSavedSettings.getF32("AudioLevelMedia");
- BOOL media_muted = gSavedSettings.getBOOL("MuteMedia");
+ bool media_muted = gSavedSettings.getBOOL("MuteMedia");
media_volume = mute_volume * master_volume * media_volume;
LLViewerMedia::getInstance()->setVolume( media_muted ? 0.0f : media_volume );
@@ -473,7 +473,7 @@ void audio_update_volume(bool force_update)
{
F32 voice_volume = gSavedSettings.getF32("AudioLevelVoice");
voice_volume = mute_volume * master_volume * voice_volume;
- BOOL voice_mute = gSavedSettings.getBOOL("MuteVoice");
+ bool voice_mute = gSavedSettings.getBOOL("MuteVoice");
LLVoiceClient *voice_inst = LLVoiceClient::getInstance();
voice_inst->setVoiceVolume(voice_mute ? 0.f : voice_volume);
voice_inst->setMicGain(voice_mute ? 0.f : gSavedSettings.getF32("AudioLevelMic"));
@@ -545,8 +545,13 @@ void audio_update_wind(bool force_update)
// don't use the setter setMaxWindGain() because we don't
// want to screw up the fade-in on startup by setting actual source gain
// outside the fade-in.
- F32 master_volume = gSavedSettings.getBOOL("MuteAudio") ? 0.f : gSavedSettings.getF32("AudioLevelMaster");
- F32 ambient_volume = gSavedSettings.getBOOL("MuteAmbient") ? 0.f : gSavedSettings.getF32("AudioLevelAmbient");
+ static LLCachedControl<bool> mute_audio(gSavedSettings, "MuteAudio");
+ static LLCachedControl<bool> mute_ambient(gSavedSettings, "MuteAmbient");
+ static LLCachedControl<F32> level_master(gSavedSettings, "AudioLevelMaster");
+ static LLCachedControl<F32> level_ambient(gSavedSettings, "AudioLevelAmbient");
+
+ F32 master_volume = mute_audio() ? 0.f : level_master();
+ F32 ambient_volume = mute_ambient() ? 0.f : level_ambient();
F32 max_wind_volume = master_volume * ambient_volume;
const F32 WIND_SOUND_TRANSITION_TIME = 2.f;
diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp
index 4134e35f87..f54b6f799e 100644
--- a/indra/newview/llviewercamera.cpp
+++ b/indra/newview/llviewercamera.cpp
@@ -196,7 +196,7 @@ void LLViewerCamera::calcProjection(const F32 far_distance) const
// height.
//static
-void LLViewerCamera::updateFrustumPlanes(LLCamera& camera, BOOL ortho, BOOL zflip, BOOL no_hacks)
+void LLViewerCamera::updateFrustumPlanes(LLCamera& camera, bool ortho, bool zflip, bool no_hacks)
{
GLint* viewport = (GLint*) gGLViewport;
F64 model[16];
@@ -292,17 +292,17 @@ void LLViewerCamera::updateFrustumPlanes(LLCamera& camera, BOOL ortho, BOOL zfli
camera.calcAgentFrustumPlanes(frust);
}
-void LLViewerCamera::setPerspective(BOOL for_selection,
+void LLViewerCamera::setPerspective(bool for_selection,
S32 x, S32 y_from_bot, S32 width, S32 height,
- BOOL limit_select_distance,
+ bool limit_select_distance,
F32 z_near, F32 z_far)
{
F32 fov_y, aspect;
fov_y = RAD_TO_DEG * getView();
- BOOL z_default_far = FALSE;
+ bool z_default_far = false;
if (z_far <= 0)
{
- z_default_far = TRUE;
+ z_default_far = true;
z_far = getFar();
}
if (z_near <= 0)
@@ -442,11 +442,11 @@ void LLViewerCamera::projectScreenToPosAgent(const S32 screen_x, const S32 scree
}
// Uses the last GL matrices set in set_perspective to project a point from
-// the agent's region space to screen coordinates. Returns TRUE if point in within
+// the agent's region space to screen coordinates. Returns true if point in within
// the current window.
-BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoordGL &out_point, const BOOL clamp) const
+bool LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoordGL &out_point, const bool clamp) const
{
- BOOL in_front = TRUE;
+ bool in_front = true;
GLdouble x, y, z; // object's window coords, GL-style
LLVector3 dir_to_point = pos_agent - getOrigin();
@@ -456,11 +456,11 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord
{
if (clamp)
{
- return FALSE;
+ return false;
}
else
{
- in_front = FALSE;
+ in_front = false;
}
}
@@ -495,19 +495,19 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord
S32 int_x = lltrunc(x);
S32 int_y = lltrunc(y);
- BOOL valid = TRUE;
+ bool valid = true;
if (clamp)
{
if (int_x < world_rect.mLeft)
{
out_point.mX = world_rect.mLeft;
- valid = FALSE;
+ valid = false;
}
else if (int_x > world_rect.mRight)
{
out_point.mX = world_rect.mRight;
- valid = FALSE;
+ valid = false;
}
else
{
@@ -517,12 +517,12 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord
if (int_y < world_rect.mBottom)
{
out_point.mY = world_rect.mBottom;
- valid = FALSE;
+ valid = false;
}
else if (int_y > world_rect.mTop)
{
out_point.mY = world_rect.mTop;
- valid = FALSE;
+ valid = false;
}
else
{
@@ -537,19 +537,19 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord
if (int_x < world_rect.mLeft)
{
- valid = FALSE;
+ valid = false;
}
else if (int_x > world_rect.mRight)
{
- valid = FALSE;
+ valid = false;
}
if (int_y < world_rect.mBottom)
{
- valid = FALSE;
+ valid = false;
}
else if (int_y > world_rect.mTop)
{
- valid = FALSE;
+ valid = false;
}
return in_front && valid;
@@ -557,23 +557,23 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord
}
else
{
- return FALSE;
+ return false;
}
}
// Uses the last GL matrices set in set_perspective to project a point from
// the agent's region space to the nearest edge in screen coordinates.
-// Returns TRUE if projection succeeds.
-BOOL LLViewerCamera::projectPosAgentToScreenEdge(const LLVector3 &pos_agent,
+// Returns true if projection succeeds.
+bool LLViewerCamera::projectPosAgentToScreenEdge(const LLVector3 &pos_agent,
LLCoordGL &out_point) const
{
LLVector3 dir_to_point = pos_agent - getOrigin();
dir_to_point /= dir_to_point.magVec();
- BOOL in_front = TRUE;
+ bool in_front = true;
if (dir_to_point * getAtAxis() < 0.f)
{
- in_front = FALSE;
+ in_front = false;
}
LLRect world_view_rect = gViewerWindow->getWorldViewRectRaw();
@@ -614,7 +614,7 @@ BOOL LLViewerCamera::projectPosAgentToScreenEdge(const LLVector3 &pos_agent,
if (x == center_x && y == center_y)
{
// can't project to edge from exact center
- return FALSE;
+ return false;
}
// find the line from center to local
@@ -711,9 +711,9 @@ BOOL LLViewerCamera::projectPosAgentToScreenEdge(const LLVector3 &pos_agent,
out_point.mX = int_x + world_rect.mLeft;
out_point.mY = int_y + world_rect.mBottom;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -738,7 +738,7 @@ LLVector3 LLViewerCamera::roundToPixel(const LLVector3 &pos_agent)
F32 dist = (pos_agent - getOrigin()).magVec();
// Convert to screen space and back, preserving the depth.
LLCoordGL screen_point;
- if (!projectPosAgentToScreen(pos_agent, screen_point, FALSE))
+ if (!projectPosAgentToScreen(pos_agent, screen_point, false))
{
// Off the screen, just return the original position.
return pos_agent;
@@ -760,10 +760,16 @@ LLVector3 LLViewerCamera::roundToPixel(const LLVector3 &pos_agent)
return pos_agent_rounded;
}
-BOOL LLViewerCamera::cameraUnderWater() const
+bool LLViewerCamera::cameraUnderWater() const
{
LLViewerRegion* regionp = LLWorld::instance().getRegionFromPosAgent(getOrigin());
+ if (gPipeline.mHeroProbeManager.isMirrorPass())
+ {
+ // TODO: figure out how to handle this case
+ return FALSE;
+ }
+
if (!regionp)
{
regionp = gAgent.getRegion();
@@ -771,26 +777,26 @@ BOOL LLViewerCamera::cameraUnderWater() const
if(!regionp)
{
- return FALSE ;
+ return false ;
}
return getOrigin().mV[VZ] < regionp->getWaterHeight();
}
-BOOL LLViewerCamera::areVertsVisible(LLViewerObject* volumep, BOOL all_verts)
+bool LLViewerCamera::areVertsVisible(LLViewerObject* volumep, bool all_verts)
{
S32 i, num_faces;
LLDrawable* drawablep = volumep->mDrawable;
if (!drawablep)
{
- return FALSE;
+ return false;
}
LLVolume* volume = volumep->getVolume();
if (!volume)
{
- return FALSE;
+ return false;
}
LLVOVolume* vo_volume = (LLVOVolume*) volumep;
@@ -822,7 +828,7 @@ BOOL LLViewerCamera::areVertsVisible(LLViewerObject* volumep, BOOL all_verts)
render_mata.affineTransform(t, vec);
}
- BOOL in_frustum = pointInFrustum(LLVector3(vec.getF32ptr())) > 0;
+ bool in_frustum = pointInFrustum(LLVector3(vec.getF32ptr())) > 0;
if (( !in_frustum && all_verts) ||
(in_frustum && !all_verts))
@@ -834,7 +840,7 @@ BOOL LLViewerCamera::areVertsVisible(LLViewerObject* volumep, BOOL all_verts)
return all_verts;
}
-extern BOOL gCubeSnapshot;
+extern bool gCubeSnapshot;
// changes local camera and broadcasts change
/* virtual */ void LLViewerCamera::setView(F32 vertical_fov_rads)
@@ -879,14 +885,14 @@ void LLViewerCamera::setDefaultFOV(F32 vertical_fov_rads)
mCosHalfCameraFOV = cosf(mCameraFOVDefault * 0.5f);
}
-BOOL LLViewerCamera::isDefaultFOVChanged()
+bool LLViewerCamera::isDefaultFOVChanged()
{
if(mPrevCameraFOVDefault != mCameraFOVDefault)
{
mPrevCameraFOVDefault = mCameraFOVDefault;
return !gSavedSettings.getBOOL("IgnoreFOVZoomForLODs");
}
- return FALSE;
+ return false;
}
// static
diff --git a/indra/newview/llviewercamera.h b/indra/newview/llviewercamera.h
index 78ca2b3076..f65a2017bf 100644
--- a/indra/newview/llviewercamera.h
+++ b/indra/newview/llviewercamera.h
@@ -35,8 +35,8 @@
#include "lltrace.h"
class LLViewerObject;
-const BOOL FOR_SELECTION = TRUE;
-const BOOL NOT_FOR_SELECTION = FALSE;
+const bool FOR_SELECTION = true;
+const bool NOT_FOR_SELECTION = false;
class alignas(16) LLViewerCamera : public LLCamera, public LLSimpleton<LLViewerCamera>
{
@@ -64,17 +64,17 @@ public:
const LLVector3 &up_direction,
const LLVector3 &point_of_interest);
- static void updateFrustumPlanes(LLCamera& camera, BOOL ortho = FALSE, BOOL zflip = FALSE, BOOL no_hacks = FALSE);
+ static void updateFrustumPlanes(LLCamera& camera, bool ortho = false, bool zflip = false, bool no_hacks = false);
static void updateCameraAngle(void* user_data, const LLSD& value);
- void setPerspective(BOOL for_selection, S32 x, S32 y_from_bot, S32 width, S32 height, BOOL limit_select_distance, F32 z_near = 0, F32 z_far = 0);
+ void setPerspective(bool for_selection, S32 x, S32 y_from_bot, S32 width, S32 height, bool limit_select_distance, F32 z_near = 0, F32 z_far = 0);
const LLMatrix4 &getProjection() const;
const LLMatrix4 &getModelview() const;
// Warning! These assume the current global matrices are correct
void projectScreenToPosAgent(const S32 screen_x, const S32 screen_y, LLVector3* pos_agent ) const;
- BOOL projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoordGL &out_point, const BOOL clamp = TRUE) const;
- BOOL projectPosAgentToScreenEdge(const LLVector3 &pos_agent, LLCoordGL &out_point) const;
+ bool projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoordGL &out_point, const bool clamp = true) const;
+ bool projectPosAgentToScreenEdge(const LLVector3 &pos_agent, LLCoordGL &out_point) const;
LLVector3 getVelocityDir() const {return mVelocityDir;}
static LLTrace::CountStatHandle<>* getVelocityStat() {return &sVelocityStat; }
@@ -92,10 +92,10 @@ public:
void setDefaultFOV(F32 fov) ;
F32 getDefaultFOV() { return mCameraFOVDefault; }
- BOOL isDefaultFOVChanged();
+ bool isDefaultFOVChanged();
- BOOL cameraUnderWater() const;
- BOOL areVertsVisible(LLViewerObject* volumep, BOOL all_verts);
+ bool cameraUnderWater() const;
+ bool areVertsVisible(LLViewerObject* volumep, bool all_verts);
const LLVector3 &getPointOfInterest() { return mLastPointOfInterest; }
F32 getPixelMeterRatio() const { return mPixelMeterRatio; }
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 7738cb904e..5a2c74e86a 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -54,6 +54,7 @@
#include "llvotree.h"
#include "llvovolume.h"
#include "llworld.h"
+#include "llvlcomposition.h"
#include "pipeline.h"
#include "llviewerjoystick.h"
#include "llviewerobjectlist.h"
@@ -80,7 +81,7 @@
#include <boost/algorithm/string.hpp>
#ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-BOOL gHackGodmode = FALSE;
+bool gHackGodmode = false;
#endif
// Should you contemplate changing the name "Global", please first grep for
@@ -93,9 +94,9 @@ LLControlGroup gWarningSettings("Warnings"); // persists ignored dialogs/warning
std::string gLastRunVersion;
-extern BOOL gResizeScreenTexture;
-extern BOOL gResizeShadowTexture;
-extern BOOL gDebugGL;
+extern bool gResizeScreenTexture;
+extern bool gResizeShadowTexture;
+extern bool gDebugGL;
////////////////////////////////////////////////////////////////////////////
// Listeners
@@ -117,12 +118,25 @@ static bool handleRenderFarClipChanged(const LLSD& newvalue)
return false;
}
-static bool handleTerrainDetailChanged(const LLSD& newvalue)
+static bool handleTerrainScaleChanged(const LLSD& newvalue)
{
- LLDrawPoolTerrain::sDetailMode = newvalue.asInteger();
+ F64 scale = newvalue.asReal();
+ if (scale != 0.0)
+ {
+ LLDrawPoolTerrain::sDetailScale = F32(1.0 / scale);
+ }
return true;
}
+static bool handlePBRTerrainScaleChanged(const LLSD& newvalue)
+{
+ F64 scale = newvalue.asReal();
+ if (scale != 0.0)
+ {
+ LLDrawPoolTerrain::sPBRDetailScale = F32(1.0 / scale);
+ }
+ return true;
+}
static bool handleDebugAvatarJointsChanged(const LLSD& newvalue)
{
@@ -370,7 +384,7 @@ static void handleAudioVolumeChanged(const LLSD& newvalue)
static bool handleJoystickChanged(const LLSD& newvalue)
{
- LLViewerJoystick::getInstance()->setCameraNeedsUpdate(TRUE);
+ LLViewerJoystick::getInstance()->setCameraNeedsUpdate(true);
return true;
}
@@ -423,6 +437,19 @@ static bool handleReflectionProbeDetailChanged(const LLSD& newvalue)
gPipeline.createGLBuffers();
LLViewerShaderMgr::instance()->setShaders();
gPipeline.mReflectionMapManager.reset();
+ gPipeline.mHeroProbeManager.reset();
+ }
+ return true;
+}
+
+static bool handleHeroProbeResolutionChanged(const LLSD &newvalue)
+{
+ if (gPipeline.isInit())
+ {
+ LLPipeline::refreshCachedSettings();
+ gPipeline.mHeroProbeManager.reset();
+ gPipeline.releaseGLBuffers();
+ gPipeline.createGLBuffers();
}
return true;
}
@@ -435,7 +462,7 @@ static bool handleRenderDebugPipelineChanged(const LLSD& newvalue)
static bool handleRenderResolutionDivisorChanged(const LLSD&)
{
- gResizeScreenTexture = TRUE;
+ gResizeScreenTexture = true;
return true;
}
@@ -450,6 +477,7 @@ static bool handleLogFileChanged(const LLSD& newvalue)
std::string log_filename = newvalue.asString();
LLFile::remove(log_filename);
LLError::logToFile(log_filename);
+ LL_INFOS() << "Logging switched to " << log_filename << LL_ENDL;
return true;
}
@@ -470,7 +498,7 @@ bool handleHighResSnapshotChanged(const LLSD& newvalue)
// High Res Snapshot active, must uncheck RenderUIInSnapshot
if (newvalue.asBoolean())
{
- gSavedSettings.setBOOL( "RenderUIInSnapshot", FALSE );
+ gSavedSettings.setBOOL( "RenderUIInSnapshot", false);
}
return true;
}
@@ -637,8 +665,13 @@ void handlePerformanceStatsEnabledChanged(const LLSD& newValue)
}
void handleUserImpostorByDistEnabledChanged(const LLSD& newValue)
{
- const auto newval = gSavedSettings.getBOOL("AutoTuneImpostorByDistEnabled");
- LLPerfStats::tunables.userImpostorDistanceTuningEnabled = newval;
+ bool auto_tune_newval = false;
+ S32 mode = gSavedSettings.getS32("RenderAvatarComplexityMode");
+ if (mode != LLVOAvatar::AV_RENDER_ONLY_SHOW_FRIENDS)
+ {
+ auto_tune_newval = gSavedSettings.getBOOL("AutoTuneImpostorByDistEnabled");
+ }
+ LLPerfStats::tunables.userImpostorDistanceTuningEnabled = auto_tune_newval;
}
void handleUserImpostorDistanceChanged(const LLSD& newValue)
{
@@ -650,6 +683,16 @@ void handleFPSTuningStrategyChanged(const LLSD& newValue)
const auto newval = gSavedSettings.getU32("TuningFPSStrategy");
LLPerfStats::tunables.userFPSTuningStrategy = newval;
}
+
+void handleLocalTerrainChanged(const LLSD& newValue)
+{
+ for (U32 i = 0; i < LLTerrainMaterials::ASSET_COUNT; ++i)
+ {
+ const auto setting = gSavedSettings.getString(std::string("LocalTerrainAsset") + std::to_string(i + 1));
+ const LLUUID materialID(setting);
+ gLocalTerrainMaterials.setDetailAssetID(i, materialID);
+ }
+}
////////////////////////////////////////////////////////////////////////////
LLPointer<LLControlVariable> setting_get_control(LLControlGroup& group, const std::string& setting)
@@ -684,7 +727,11 @@ void settings_setup_listeners()
{
setting_setup_signal_listener(gSavedSettings, "FirstPersonAvatarVisible", handleRenderAvatarMouselookChanged);
setting_setup_signal_listener(gSavedSettings, "RenderFarClip", handleRenderFarClipChanged);
- setting_setup_signal_listener(gSavedSettings, "RenderTerrainDetail", handleTerrainDetailChanged);
+ setting_setup_signal_listener(gSavedSettings, "RenderTerrainScale", handleTerrainScaleChanged);
+ setting_setup_signal_listener(gSavedSettings, "RenderTerrainPBRScale", handlePBRTerrainScaleChanged);
+ setting_setup_signal_listener(gSavedSettings, "RenderTerrainPBRDetail", handleSetShaderChanged);
+ setting_setup_signal_listener(gSavedSettings, "RenderTerrainPBRPlanarSampleCount", handleSetShaderChanged);
+ setting_setup_signal_listener(gSavedSettings, "RenderTerrainPBRTriplanarBlendFactor", handleSetShaderChanged);
setting_setup_signal_listener(gSavedSettings, "OctreeStaticObjectSizeFactor", handleRepartition);
setting_setup_signal_listener(gSavedSettings, "OctreeDistanceFactor", handleRepartition);
setting_setup_signal_listener(gSavedSettings, "OctreeMaxNodeCapacity", handleRepartition);
@@ -707,6 +754,7 @@ void settings_setup_listeners()
setting_setup_signal_listener(gSavedSettings, "RenderGlowNoise", handleSetShaderChanged);
setting_setup_signal_listener(gSavedSettings, "RenderGammaFull", handleSetShaderChanged);
setting_setup_signal_listener(gSavedSettings, "RenderVolumeLODFactor", handleVolumeLODChanged);
+ setting_setup_signal_listener(gSavedSettings, "RenderAvatarComplexityMode", handleUserImpostorByDistEnabledChanged);
setting_setup_signal_listener(gSavedSettings, "RenderAvatarLODFactor", handleAvatarLODChanged);
setting_setup_signal_listener(gSavedSettings, "RenderAvatarPhysicsLODFactor", handleAvatarPhysicsLODChanged);
setting_setup_signal_listener(gSavedSettings, "RenderTerrainLODFactor", handleTerrainLODChanged);
@@ -724,6 +772,7 @@ void settings_setup_listeners()
setting_setup_signal_listener(gSavedSettings, "RenderReflectionProbeDetail", handleReflectionProbeDetailChanged);
setting_setup_signal_listener(gSavedSettings, "RenderReflectionsEnabled", handleReflectionProbeDetailChanged);
setting_setup_signal_listener(gSavedSettings, "RenderScreenSpaceReflections", handleReflectionProbeDetailChanged);
+ setting_setup_signal_listener(gSavedSettings, "RenderHeroProbeResolution", handleHeroProbeResolutionChanged);
setting_setup_signal_listener(gSavedSettings, "RenderShadowDetail", handleSetShaderChanged);
setting_setup_signal_listener(gSavedSettings, "RenderDeferredSSAO", handleSetShaderChanged);
setting_setup_signal_listener(gSavedSettings, "RenderPerformanceTest", handleRenderPerfTestChanged);
@@ -830,6 +879,10 @@ void settings_setup_listeners()
setting_setup_signal_listener(gSavedSettings, "AutoTuneImpostorFarAwayDistance", handleUserImpostorDistanceChanged);
setting_setup_signal_listener(gSavedSettings, "AutoTuneImpostorByDistEnabled", handleUserImpostorByDistEnabledChanged);
setting_setup_signal_listener(gSavedSettings, "TuningFPSStrategy", handleFPSTuningStrategyChanged);
+ setting_setup_signal_listener(gSavedSettings, "LocalTerrainAsset1", handleLocalTerrainChanged);
+ setting_setup_signal_listener(gSavedSettings, "LocalTerrainAsset2", handleLocalTerrainChanged);
+ setting_setup_signal_listener(gSavedSettings, "LocalTerrainAsset3", handleLocalTerrainChanged);
+ setting_setup_signal_listener(gSavedSettings, "LocalTerrainAsset4", handleLocalTerrainChanged);
setting_setup_signal_listener(gSavedPerAccountSettings, "AvatarHoverOffsetZ", handleAvatarHoverOffsetChanged);
}
@@ -841,7 +894,7 @@ DECL_LLCC(U32, (U32)666);
DECL_LLCC(S32, (S32)-666);
DECL_LLCC(F32, (F32)-666.666);
DECL_LLCC(bool, true);
-DECL_LLCC(BOOL, FALSE);
+DECL_LLCC(bool, false);
static LLCachedControl<std::string> mySetting_string("TestCachedControlstring", "Default String Value");
DECL_LLCC(LLVector3, LLVector3(1.0f, 2.0f, 3.0f));
DECL_LLCC(LLVector3d, LLVector3d(6.0f, 5.0f, 4.0f));
@@ -862,7 +915,7 @@ void test_cached_control()
TEST_LLCC(S32, (S32)-666);
TEST_LLCC(F32, (F32)-666.666);
TEST_LLCC(bool, true);
- TEST_LLCC(BOOL, FALSE);
+ TEST_LLCC(bool, false);
if((std::string)mySetting_string != "Default String Value") LL_ERRS() << "Fail string" << LL_ENDL;
TEST_LLCC(LLVector3, LLVector3(1.0f, 2.0f, 3.0f));
TEST_LLCC(LLVector3d, LLVector3d(6.0f, 5.0f, 4.0f));
diff --git a/indra/newview/llviewercontrol.h b/indra/newview/llviewercontrol.h
index d7191f5c8d..866c929f71 100644
--- a/indra/newview/llviewercontrol.h
+++ b/indra/newview/llviewercontrol.h
@@ -34,7 +34,7 @@
// allows a hacked godmode to be toggled on and off.
#define TOGGLE_HACKED_GODLIKE_VIEWER
#ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-extern BOOL gHackGodmode;
+extern bool gHackGodmode;
#endif
bool toggle_show_navigation_panel(const LLSD& newvalue);
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index e1d6f71cce..0a0bda63ba 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -87,21 +87,21 @@ extern bool gShiftFrame;
LLPointer<LLViewerTexture> gDisconnectedImagep = NULL;
// used to toggle renderer back on after teleport
-BOOL gTeleportDisplay = FALSE;
+bool gTeleportDisplay = false;
LLFrameTimer gTeleportDisplayTimer;
LLFrameTimer gTeleportArrivalTimer;
const F32 RESTORE_GL_TIME = 5.f; // Wait this long while reloading textures before we raise the curtain
-BOOL gForceRenderLandFence = FALSE;
-BOOL gDisplaySwapBuffers = FALSE;
-BOOL gDepthDirty = FALSE;
-BOOL gResizeScreenTexture = FALSE;
-BOOL gResizeShadowTexture = FALSE;
-BOOL gWindowResized = FALSE;
-BOOL gSnapshot = FALSE;
-BOOL gCubeSnapshot = FALSE;
-BOOL gSnapshotNoPost = FALSE;
-BOOL gShaderProfileFrame = FALSE;
+bool gForceRenderLandFence = false;
+bool gDisplaySwapBuffers = false;
+bool gDepthDirty = false;
+bool gResizeScreenTexture = false;
+bool gResizeShadowTexture = false;
+bool gWindowResized = false;
+bool gSnapshot = false;
+bool gCubeSnapshot = false;
+bool gSnapshotNoPost = false;
+bool gShaderProfileFrame = false;
// This is how long the sim will try to teleport you before giving up.
const F32 TELEPORT_EXPIRY = 15.0f;
@@ -230,7 +230,7 @@ void display_stats()
gMemoryAllocated = U64Bytes(LLMemory::getCurrentRSS());
U32Megabytes memory = gMemoryAllocated;
LL_INFOS() << "MEMORY: " << memory << LL_ENDL;
- LLMemory::logMemoryInfo(TRUE) ;
+ LLMemory::logMemoryInfo(true) ;
gRecentMemoryTime.reset();
}
F32 asset_storage_log_freq = gSavedSettings.getF32("AssetStorageLogFrequency");
@@ -267,7 +267,7 @@ static void update_tp_display(bool minimized)
// is minimized *during* a TP. HB
if (minimized)
{
- gViewerWindow->setShowProgress(FALSE);
+ gViewerWindow->setShowProgress(false);
}
const std::string& message = gAgent.getTeleportMessage();
@@ -279,7 +279,7 @@ static void update_tp_display(bool minimized)
const std::string& msg = LLAgent::sTeleportProgressMessages["pending"];
if (!minimized)
{
- gViewerWindow->setShowProgress(TRUE);
+ gViewerWindow->setShowProgress(true);
gViewerWindow->setProgressPercent(llmin(teleport_percent, 0.0f));
gViewerWindow->setProgressString(msg);
}
@@ -298,7 +298,7 @@ static void update_tp_display(bool minimized)
gAgent.setTeleportMessage(msg);
if (!minimized)
{
- gViewerWindow->setShowProgress(TRUE);
+ gViewerWindow->setShowProgress(true);
gViewerWindow->setProgressPercent(llmin(teleport_percent, 0.0f));
gViewerWindow->setProgressString(msg);
gViewerWindow->setProgressMessage(gAgent.mMOTD);
@@ -332,11 +332,11 @@ static void update_tp_display(bool minimized)
gAgent.setTeleportState(LLAgent::TELEPORT_ARRIVING);
gAgent.setTeleportMessage(LLAgent::sTeleportProgressMessages["arriving"]);
gAgent.sheduleTeleportIM();
- gTextureList.mForceResetTextureStats = TRUE;
- gAgentCamera.resetView(TRUE, TRUE);
+ gTextureList.mForceResetTextureStats = true;
+ gAgentCamera.resetView(true, true);
if (!minimized)
{
- gViewerWindow->setProgressCancelButtonVisible(FALSE, LLTrans::getString("Cancel"));
+ gViewerWindow->setProgressCancelButtonVisible(false, LLTrans::getString("Cancel"));
gViewerWindow->setProgressPercent(75.f);
}
break;
@@ -354,7 +354,7 @@ static void update_tp_display(bool minimized)
}
if (!minimized)
{
- gViewerWindow->setProgressCancelButtonVisible(FALSE, LLTrans::getString("Cancel"));
+ gViewerWindow->setProgressCancelButtonVisible(false, LLTrans::getString("Cancel"));
gViewerWindow->setProgressPercent(arrival_fraction * 25.f + 75.f);
gViewerWindow->setProgressString(message);
}
@@ -379,13 +379,13 @@ static void update_tp_display(bool minimized)
case LLAgent::TELEPORT_NONE:
// No teleport in progress
- gViewerWindow->setShowProgress(FALSE);
- gTeleportDisplay = FALSE;
+ gViewerWindow->setShowProgress(false);
+ gTeleportDisplay = false;
}
}
// Paint the display!
-void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
+void display(bool rebuild, F32 zoom_factor, int subfield, bool for_snapshot)
{
LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("Render");
@@ -400,22 +400,22 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
gViewerWindow->getWindow()->swapBuffers();
LLPipeline::refreshCachedSettings();
gPipeline.resizeScreenTexture();
- gResizeScreenTexture = FALSE;
- gWindowResized = FALSE;
+ gResizeScreenTexture = false;
+ gWindowResized = false;
return;
}
if (gResizeShadowTexture)
{ //skip render on frames where window has been resized
gPipeline.resizeShadowTexture();
- gResizeShadowTexture = FALSE;
+ gResizeShadowTexture = false;
}
gSnapshot = for_snapshot;
if (LLPipeline::sRenderDeferred)
{ //hack to make sky show up in deferred snapshots
- for_snapshot = FALSE;
+ for_snapshot = false;
}
LLGLSDefault gls_default;
@@ -480,7 +480,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
static F32 last_update_time = 0.f;
if ((gFrameTimeSeconds - last_update_time) > 1.f)
{
- InvalidateRect((HWND)gViewerWindow->getPlatformWindow(), NULL, FALSE);
+ InvalidateRect((HWND)gViewerWindow->getPlatformWindow(), NULL, false);
last_update_time = gFrameTimeSeconds;
}
#elif LL_DARWIN
@@ -508,7 +508,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLGLSLShader::initProfile();
}
- //LLGLState::verify(FALSE);
+ //LLGLState::verify(false);
/////////////////////////////////////////////////
//
@@ -523,7 +523,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLVOAvatar::sRenderName = gSavedSettings.getS32("AvatarNameTagMode");
LLVOAvatar::sRenderGroupTitles = (gSavedSettings.getBOOL("NameTagShowGroupTitles") && gSavedSettings.getS32("AvatarNameTagMode"));
- gPipeline.mBackfaceCull = TRUE;
+ gPipeline.mBackfaceCull = true;
gFrameCount++;
gRecentFrameCount++;
if (gFocusMgr.getAppHasFocus())
@@ -567,8 +567,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
F32 percent_done = gRestoreGLTimer.getElapsedTimeF32() * 100.f / RESTORE_GL_TIME;
if( percent_done > 100.f )
{
- gViewerWindow->setShowProgress(FALSE);
- gRestoreGL = FALSE;
+ gViewerWindow->setShowProgress(false);
+ gRestoreGL = false;
}
else
{
@@ -656,6 +656,14 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
if (!gDisconnected)
{
+ // Render mirrors and associated hero probes before we render the rest of the scene.
+ // This ensures the scene state in the hero probes are exactly the same as the rest of the scene before we render it.
+ if (gPipeline.RenderMirrors && !gSnapshot && (gPipeline.RenderHeroProbeUpdateRate == 0 || (gFrameCount % gPipeline.RenderHeroProbeUpdateRate) == 0))
+ {
+ LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("Update hero probes");
+ gPipeline.mHeroProbeManager.update();
+ }
+
LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("display - 1");
LLAppViewer::instance()->pingMainloopTimeout("Display:Update");
if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_HUD))
@@ -696,7 +704,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
}
gPipeline.updateGL();
-
+
stop_glerror();
LLAppViewer::instance()->pingMainloopTimeout("Display:Cull");
@@ -704,7 +712,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
//Increment drawable frame counter
LLDrawable::incrementVisible();
- LLSpatialGroup::sNoDelete = TRUE;
+ LLSpatialGroup::sNoDelete = true;
LLTexUnit::sWhiteTexture = LLViewerFetchedTexture::sWhiteImagep->getTexName();
S32 occlusion = LLPipeline::sUseOcclusion;
@@ -712,7 +720,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
{ //depth buffer is invalid, don't overwrite occlusion state
LLPipeline::sUseOcclusion = llmin(occlusion, 1);
}
- gDepthDirty = FALSE;
+ gDepthDirty = false;
LLGLState::checkStates();
@@ -731,7 +739,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
if (gResizeScreenTexture)
{
gPipeline.resizeScreenTexture();
- gResizeScreenTexture = FALSE;
+ gResizeScreenTexture = false;
}
gGL.setColorMask(true, true);
@@ -892,7 +900,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
// gGL.popMatrix();
//}
- LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? TRUE : FALSE;
+ LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? true : false;
LLGLState::checkStates();
@@ -949,7 +957,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
gOcclusionProgram.bind();
for (U32 i = 0; i < num_types; i++)
{
- gPipeline.renderObjects(types[i], LLVertexBuffer::MAP_VERTEX, FALSE);
+ gPipeline.renderObjects(types[i], LLVertexBuffer::MAP_VERTEX, false);
}
gOcclusionProgram.unbind();
@@ -982,7 +990,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
gPipeline.renderDeferredLighting();
}
- LLPipeline::sUnderWaterRender = FALSE;
+ LLPipeline::sUnderWaterRender = false;
{
//capture the frame buffer.
@@ -997,7 +1005,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
}
- LLSpatialGroup::sNoDelete = FALSE;
+ LLSpatialGroup::sNoDelete = false;
gPipeline.clearReferences();
}
@@ -1013,7 +1021,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
if (gShaderProfileFrame)
{
- gShaderProfileFrame = FALSE;
+ gShaderProfileFrame = false;
LLGLSLShader::finishProfile();
}
}
@@ -1039,7 +1047,7 @@ void display_cube_face()
gPipeline.disableLights();
- gPipeline.mBackfaceCull = TRUE;
+ gPipeline.mBackfaceCull = true;
gViewerWindow->setup3DViewport();
@@ -1061,11 +1069,11 @@ void display_cube_face()
LLEnvironment::instance().update(LLViewerCamera::getInstance());
}
- LLSpatialGroup::sNoDelete = TRUE;
+ LLSpatialGroup::sNoDelete = true;
S32 occlusion = LLPipeline::sUseOcclusion;
LLPipeline::sUseOcclusion = 0; // occlusion data is from main camera point of view, don't read or write it during cube snapshots
- //gDepthDirty = TRUE; //let "real" render pipe know it can't trust the depth buffer for occlusion data
+ //gDepthDirty = true; //let "real" render pipe know it can't trust the depth buffer for occlusion data
static LLCullResult result;
LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
@@ -1099,7 +1107,7 @@ void display_cube_face()
LLAppViewer::instance()->pingMainloopTimeout("Display:RenderStart");
- LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? TRUE : FALSE;
+ LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? true : false;
gGL.setColorMask(true, true);
@@ -1122,12 +1130,12 @@ void display_cube_face()
gPipeline.renderDeferredLighting();
- LLPipeline::sUnderWaterRender = FALSE;
+ LLPipeline::sUnderWaterRender = false;
// Finalize scene
//gPipeline.renderFinalize();
- LLSpatialGroup::sNoDelete = FALSE;
+ LLSpatialGroup::sNoDelete = false;
gPipeline.clearReferences();
}
@@ -1149,11 +1157,11 @@ void render_hud_attachments()
if (LLPipeline::sShowHUDAttachments && !gDisconnected && setup_hud_matrices())
{
- LLPipeline::sRenderingHUDs = TRUE;
+ LLPipeline::sRenderingHUDs = true;
LLCamera hud_cam = *LLViewerCamera::getInstance();
hud_cam.setOrigin(-1.f,0,0);
hud_cam.setAxes(LLVector3(1,0,0), LLVector3(0,1,0), LLVector3(0,0,1));
- LLViewerCamera::updateFrustumPlanes(hud_cam, TRUE);
+ LLViewerCamera::updateFrustumPlanes(hud_cam, true);
bool render_particles = gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_PARTICLES) && gSavedSettings.getBOOL("RenderHUDParticles");
@@ -1185,7 +1193,7 @@ void render_hud_attachments()
//cull, sort, and render hud objects
static LLCullResult result;
- LLSpatialGroup::sNoDelete = TRUE;
+ LLSpatialGroup::sNoDelete = true;
LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
gPipeline.updateCull(hud_cam, result);
@@ -1220,7 +1228,7 @@ void render_hud_attachments()
gPipeline.renderGeomPostDeferred(hud_cam);
- LLSpatialGroup::sNoDelete = FALSE;
+ LLSpatialGroup::sNoDelete = false;
//gPipeline.clearReferences();
render_hud_elements();
@@ -1233,7 +1241,7 @@ void render_hud_attachments()
gPipeline.toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI);
}
LLPipeline::sUseOcclusion = use_occlusion;
- LLPipeline::sRenderingHUDs = FALSE;
+ LLPipeline::sRenderingHUDs = false;
}
gGL.matrixMode(LLRender::MM_PROJECTION);
gGL.popMatrix();
@@ -1294,11 +1302,11 @@ bool get_hud_matrices(const LLRect& screen_region, glh::matrix4f &proj, glh::mat
tmp_model *= mat;
model = tmp_model;
- return TRUE;
+ return true;
}
else
{
- return FALSE;
+ return false;
}
}
@@ -1328,7 +1336,7 @@ bool setup_hud_matrices(const LLRect& screen_region)
gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.loadMatrix(model.m);
set_current_modelview(model);
- return TRUE;
+ return true;
}
void render_ui(F32 zoom_factor, int subfield)
@@ -1420,7 +1428,7 @@ void swap()
{
gViewerWindow->getWindow()->swapBuffers();
}
- gDisplaySwapBuffers = TRUE;
+ gDisplaySwapBuffers = true;
}
void renderCoordinateAxes()
@@ -1521,7 +1529,7 @@ void render_ui_3d()
draw_axes();
}
- gViewerWindow->renderSelections(FALSE, FALSE, TRUE); // Non HUD call in render_hud_elements
+ gViewerWindow->renderSelections(false, false, true); // Non HUD call in render_hud_elements
if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
{
@@ -1575,7 +1583,7 @@ void render_ui_2d()
F32 zoom = gAgentCamera.mHUDCurZoom;
gGL.scalef(zoom,zoom,1.f);
gGL.color4fv(LLColor4::white.mV);
- gl_rect_2d(-half_width, half_height, half_width, -half_height, FALSE);
+ gl_rect_2d(-half_width, half_height, half_width, -half_height, false);
gGL.popMatrix();
gUIProgram.unbind();
stop_glerror();
@@ -1695,7 +1703,7 @@ void render_disconnected_background()
raw->expandToPowerOfTwo();
- gDisconnectedImagep = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE );
+ gDisconnectedImagep = LLViewerTextureManager::getLocalTexture(raw.get(), false );
gStartTexture = gDisconnectedImagep;
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
}
diff --git a/indra/newview/llviewerdisplay.h b/indra/newview/llviewerdisplay.h
index e8072193ea..00c4c2ac6b 100644
--- a/indra/newview/llviewerdisplay.h
+++ b/indra/newview/llviewerdisplay.h
@@ -32,15 +32,15 @@ class LLPostProcess;
void display_startup();
void display_cleanup();
-void display(BOOL rebuild = TRUE, F32 zoom_factor = 1.f, int subfield = 0, BOOL for_snapshot = FALSE);
+void display(bool rebuild = true, F32 zoom_factor = 1.f, int subfield = 0, bool for_snapshot = false);
-extern BOOL gDisplaySwapBuffers;
-extern BOOL gDepthDirty;
-extern BOOL gTeleportDisplay;
+extern bool gDisplaySwapBuffers;
+extern bool gDepthDirty;
+extern bool gTeleportDisplay;
extern LLFrameTimer gTeleportDisplayTimer;
-extern BOOL gForceRenderLandFence;
-extern BOOL gResizeScreenTexture;
-extern BOOL gResizeShadowTexture;
-extern BOOL gWindowResized;
+extern bool gForceRenderLandFence;
+extern bool gResizeScreenTexture;
+extern bool gResizeShadowTexture;
+extern bool gWindowResized;
#endif // LL_LLVIEWERDISPLAY_H
diff --git a/indra/newview/llviewerfoldertype.cpp b/indra/newview/llviewerfoldertype.cpp
index c8d4aae8fd..a26acc2bf6 100644
--- a/indra/newview/llviewerfoldertype.cpp
+++ b/indra/newview/llviewerfoldertype.cpp
@@ -42,7 +42,7 @@ struct ViewerFolderEntry : public LLDictionaryEntry
ViewerFolderEntry(const std::string &new_category_name, // default name when creating a new category of this type
const std::string &icon_name_open, // name of the folder icon
const std::string &icon_name_closed,
- BOOL is_quiet, // folder doesn't need a UI update when changed
+ bool is_quiet, // folder doesn't need a UI update when changed
bool hide_if_empty, // folder not shown if empty
const std::string &dictionary_name = empty_string // no reverse lookup needed on non-ensembles, so in most cases just leave this blank
)
@@ -71,7 +71,7 @@ struct ViewerFolderEntry : public LLDictionaryEntry
*/
mIconNameOpen("Inv_FolderOpen"), mIconNameClosed("Inv_FolderClosed"),
mNewCategoryName(new_category_name),
- mIsQuiet(FALSE),
+ mIsQuiet(false),
mHideIfEmpty(false)
{
const std::string delims (",");
@@ -96,7 +96,7 @@ struct ViewerFolderEntry : public LLDictionaryEntry
const std::string mNewCategoryName;
typedef std::vector<std::string> name_vec_t;
name_vec_t mAllowedNames;
- BOOL mIsQuiet;
+ bool mIsQuiet;
bool mHideIfEmpty;
};
@@ -112,45 +112,45 @@ LLViewerFolderDictionary::LLViewerFolderDictionary()
{
// NEW CATEGORY NAME FOLDER OPEN FOLDER CLOSED QUIET? HIDE IF EMPTY?
// |-------------------------|-----------------------|----------------------|-----------|--------------|
- addEntry(LLFolderType::FT_TEXTURE, new ViewerFolderEntry("Textures", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
- addEntry(LLFolderType::FT_SOUND, new ViewerFolderEntry("Sounds", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
- addEntry(LLFolderType::FT_CALLINGCARD, new ViewerFolderEntry("Calling Cards", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
- addEntry(LLFolderType::FT_LANDMARK, new ViewerFolderEntry("Landmarks", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
- addEntry(LLFolderType::FT_CLOTHING, new ViewerFolderEntry("Clothing", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
- addEntry(LLFolderType::FT_OBJECT, new ViewerFolderEntry("Objects", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
- addEntry(LLFolderType::FT_NOTECARD, new ViewerFolderEntry("Notecards", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
- addEntry(LLFolderType::FT_ROOT_INVENTORY, new ViewerFolderEntry("My Inventory", "Inv_SysOpen", "Inv_SysClosed", FALSE, false));
- addEntry(LLFolderType::FT_LSL_TEXT, new ViewerFolderEntry("Scripts", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
- addEntry(LLFolderType::FT_BODYPART, new ViewerFolderEntry("Body Parts", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
- addEntry(LLFolderType::FT_TRASH, new ViewerFolderEntry("Trash", "Inv_TrashOpen", "Inv_TrashClosed", TRUE, false));
- addEntry(LLFolderType::FT_SNAPSHOT_CATEGORY, new ViewerFolderEntry("Photo Album", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
- addEntry(LLFolderType::FT_LOST_AND_FOUND, new ViewerFolderEntry("Lost And Found", "Inv_LostOpen", "Inv_LostClosed", TRUE, true));
- addEntry(LLFolderType::FT_ANIMATION, new ViewerFolderEntry("Animations", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
- addEntry(LLFolderType::FT_GESTURE, new ViewerFolderEntry("Gestures", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
- addEntry(LLFolderType::FT_FAVORITE, new ViewerFolderEntry("Favorites", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
-
- addEntry(LLFolderType::FT_CURRENT_OUTFIT, new ViewerFolderEntry("Current Outfit", "Inv_SysOpen", "Inv_SysClosed", TRUE, false));
- addEntry(LLFolderType::FT_OUTFIT, new ViewerFolderEntry("New Outfit", "Inv_LookFolderOpen", "Inv_LookFolderClosed", TRUE, false));
- addEntry(LLFolderType::FT_MY_OUTFITS, new ViewerFolderEntry("My Outfits", "Inv_SysOpen", "Inv_SysClosed", TRUE, true));
- addEntry(LLFolderType::FT_MESH, new ViewerFolderEntry("Meshes", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
- addEntry(LLFolderType::FT_SETTINGS, new ViewerFolderEntry("Settings", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
- addEntry(LLFolderType::FT_MATERIAL, new ViewerFolderEntry("Materials", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_TEXTURE, new ViewerFolderEntry("Textures", "Inv_SysOpen", "Inv_SysClosed", false, true));
+ addEntry(LLFolderType::FT_SOUND, new ViewerFolderEntry("Sounds", "Inv_SysOpen", "Inv_SysClosed", false, true));
+ addEntry(LLFolderType::FT_CALLINGCARD, new ViewerFolderEntry("Calling Cards", "Inv_SysOpen", "Inv_SysClosed", false, true));
+ addEntry(LLFolderType::FT_LANDMARK, new ViewerFolderEntry("Landmarks", "Inv_SysOpen", "Inv_SysClosed", false, true));
+ addEntry(LLFolderType::FT_CLOTHING, new ViewerFolderEntry("Clothing", "Inv_SysOpen", "Inv_SysClosed", false, true));
+ addEntry(LLFolderType::FT_OBJECT, new ViewerFolderEntry("Objects", "Inv_SysOpen", "Inv_SysClosed", false, true));
+ addEntry(LLFolderType::FT_NOTECARD, new ViewerFolderEntry("Notecards", "Inv_SysOpen", "Inv_SysClosed", false, true));
+ addEntry(LLFolderType::FT_ROOT_INVENTORY, new ViewerFolderEntry("My Inventory", "Inv_SysOpen", "Inv_SysClosed", false, false));
+ addEntry(LLFolderType::FT_LSL_TEXT, new ViewerFolderEntry("Scripts", "Inv_SysOpen", "Inv_SysClosed", false, true));
+ addEntry(LLFolderType::FT_BODYPART, new ViewerFolderEntry("Body Parts", "Inv_SysOpen", "Inv_SysClosed", false, true));
+ addEntry(LLFolderType::FT_TRASH, new ViewerFolderEntry("Trash", "Inv_TrashOpen", "Inv_TrashClosed", true, false));
+ addEntry(LLFolderType::FT_SNAPSHOT_CATEGORY, new ViewerFolderEntry("Photo Album", "Inv_SysOpen", "Inv_SysClosed", false, true));
+ addEntry(LLFolderType::FT_LOST_AND_FOUND, new ViewerFolderEntry("Lost And Found", "Inv_LostOpen", "Inv_LostClosed", true, true));
+ addEntry(LLFolderType::FT_ANIMATION, new ViewerFolderEntry("Animations", "Inv_SysOpen", "Inv_SysClosed", false, true));
+ addEntry(LLFolderType::FT_GESTURE, new ViewerFolderEntry("Gestures", "Inv_SysOpen", "Inv_SysClosed", false, true));
+ addEntry(LLFolderType::FT_FAVORITE, new ViewerFolderEntry("Favorites", "Inv_SysOpen", "Inv_SysClosed", false, true));
+
+ addEntry(LLFolderType::FT_CURRENT_OUTFIT, new ViewerFolderEntry("Current Outfit", "Inv_SysOpen", "Inv_SysClosed", true, false));
+ addEntry(LLFolderType::FT_OUTFIT, new ViewerFolderEntry("New Outfit", "Inv_LookFolderOpen", "Inv_LookFolderClosed", true, false));
+ addEntry(LLFolderType::FT_MY_OUTFITS, new ViewerFolderEntry("My Outfits", "Inv_SysOpen", "Inv_SysClosed", true, true));
+ addEntry(LLFolderType::FT_MESH, new ViewerFolderEntry("Meshes", "Inv_SysOpen", "Inv_SysClosed", false, true));
+ addEntry(LLFolderType::FT_SETTINGS, new ViewerFolderEntry("Settings", "Inv_SysOpen", "Inv_SysClosed", false, true));
+ addEntry(LLFolderType::FT_MATERIAL, new ViewerFolderEntry("Materials", "Inv_SysOpen", "Inv_SysClosed", false, true));
bool boxes_invisible = !gSavedSettings.getBOOL("InventoryOutboxMakeVisible");
- addEntry(LLFolderType::FT_INBOX, new ViewerFolderEntry("Received Items", "Inv_SysOpen", "Inv_SysClosed", FALSE, boxes_invisible));
- addEntry(LLFolderType::FT_OUTBOX, new ViewerFolderEntry("Merchant Outbox", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_INBOX, new ViewerFolderEntry("Received Items", "Inv_SysOpen", "Inv_SysClosed", false, boxes_invisible));
+ addEntry(LLFolderType::FT_OUTBOX, new ViewerFolderEntry("Merchant Outbox", "Inv_SysOpen", "Inv_SysClosed", false, true));
- addEntry(LLFolderType::FT_BASIC_ROOT, new ViewerFolderEntry("Basic Root", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_BASIC_ROOT, new ViewerFolderEntry("Basic Root", "Inv_SysOpen", "Inv_SysClosed", false, true));
- addEntry(LLFolderType::FT_MARKETPLACE_LISTINGS, new ViewerFolderEntry("Marketplace Listings", "Inv_SysOpen", "Inv_SysClosed", FALSE, boxes_invisible));
- addEntry(LLFolderType::FT_MARKETPLACE_STOCK, new ViewerFolderEntry("New Stock", "Inv_StockFolderOpen", "Inv_StockFolderClosed", FALSE, false, "default"));
- addEntry(LLFolderType::FT_MARKETPLACE_VERSION, new ViewerFolderEntry("New Version", "Inv_VersionFolderOpen","Inv_VersionFolderClosed", FALSE, false, "default"));
+ addEntry(LLFolderType::FT_MARKETPLACE_LISTINGS, new ViewerFolderEntry("Marketplace Listings", "Inv_SysOpen", "Inv_SysClosed", false, boxes_invisible));
+ addEntry(LLFolderType::FT_MARKETPLACE_STOCK, new ViewerFolderEntry("New Stock", "Inv_StockFolderOpen", "Inv_StockFolderClosed", false, false, "default"));
+ addEntry(LLFolderType::FT_MARKETPLACE_VERSION, new ViewerFolderEntry("New Version", "Inv_VersionFolderOpen","Inv_VersionFolderClosed", false, false, "default"));
- addEntry(LLFolderType::FT_NONE, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", FALSE, false, "default"));
+ addEntry(LLFolderType::FT_NONE, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", false, false, "default"));
for (U32 type = (U32)LLFolderType::FT_ENSEMBLE_START; type <= (U32)LLFolderType::FT_ENSEMBLE_END; ++type)
{
- addEntry((LLFolderType::EType)type, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", FALSE, false));
+ addEntry((LLFolderType::EType)type, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", false, false));
}
}
@@ -236,7 +236,7 @@ LLFolderType::EType LLViewerFolderType::lookupTypeFromXUIName(const std::string
return LLViewerFolderDictionary::getInstance()->lookup(name);
}
-const std::string &LLViewerFolderType::lookupIconName(LLFolderType::EType folder_type, BOOL is_open)
+const std::string &LLViewerFolderType::lookupIconName(LLFolderType::EType folder_type, bool is_open)
{
const ViewerFolderEntry *entry = LLViewerFolderDictionary::getInstance()->lookup(folder_type);
if (entry)
@@ -258,14 +258,14 @@ const std::string &LLViewerFolderType::lookupIconName(LLFolderType::EType folder
return badLookup();
}
-BOOL LLViewerFolderType::lookupIsQuietType(LLFolderType::EType folder_type)
+bool LLViewerFolderType::lookupIsQuietType(LLFolderType::EType folder_type)
{
const ViewerFolderEntry *entry = LLViewerFolderDictionary::getInstance()->lookup(folder_type);
if (entry)
{
return entry->mIsQuiet;
}
- return FALSE;
+ return false;
}
bool LLViewerFolderType::lookupIsHiddenIfEmpty(LLFolderType::EType folder_type)
diff --git a/indra/newview/llviewerfoldertype.h b/indra/newview/llviewerfoldertype.h
index 13d5a8fbbd..31d2f39311 100644
--- a/indra/newview/llviewerfoldertype.h
+++ b/indra/newview/llviewerfoldertype.h
@@ -38,8 +38,8 @@ public:
static const std::string& lookupXUIName(EType folder_type); // name used by the UI
static LLFolderType::EType lookupTypeFromXUIName(const std::string& name);
- static const std::string& lookupIconName(EType folder_type, BOOL is_open = FALSE); // folder icon name
- static BOOL lookupIsQuietType(EType folder_type); // folder doesn't require UI update when changes have occured
+ static const std::string& lookupIconName(EType folder_type, bool is_open = false); // folder icon name
+ static bool lookupIsQuietType(EType folder_type); // folder doesn't require UI update when changes have occured
static bool lookupIsHiddenIfEmpty(EType folder_type); // folder is not displayed if empty
static const std::string& lookupNewCategoryName(EType folder_type); // default name when creating new category
static LLFolderType::EType lookupTypeFromNewCategoryName(const std::string& name); // default name when creating new category
diff --git a/indra/newview/llviewergesture.cpp b/indra/newview/llviewergesture.cpp
index f30279d1e9..9000d3a428 100644
--- a/indra/newview/llviewergesture.cpp
+++ b/indra/newview/llviewergesture.cpp
@@ -70,37 +70,37 @@ LLViewerGesture::LLViewerGesture(const LLViewerGesture &rhs)
{
}
-BOOL LLViewerGesture::trigger(KEY key, MASK mask)
+bool LLViewerGesture::trigger(KEY key, MASK mask)
{
if (mKey == key && mMask == mask)
{
- doTrigger( TRUE );
- return TRUE;
+ doTrigger( true );
+ return true;
}
else
{
- return FALSE;
+ return false;
}
}
-BOOL LLViewerGesture::trigger(const std::string &trigger_string)
+bool LLViewerGesture::trigger(const std::string &trigger_string)
{
// Assumes trigger_string is lowercase
if (mTriggerLower == trigger_string)
{
- doTrigger( FALSE );
- return TRUE;
+ doTrigger( false );
+ return true;
}
else
{
- return FALSE;
+ return false;
}
}
// private
-void LLViewerGesture::doTrigger( BOOL send_chat )
+void LLViewerGesture::doTrigger( bool send_chat )
{
if (mSoundItemID != LLUUID::null)
{
@@ -132,7 +132,7 @@ void LLViewerGesture::doTrigger( BOOL send_chat )
// Don't play nodding animation, since that might not blend
// with the gesture animation.
(LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"))->
- sendChatFromViewer(mOutputString, CHAT_TYPE_NORMAL, FALSE);
+ sendChatFromViewer(mOutputString, CHAT_TYPE_NORMAL, false);
}
}
@@ -140,7 +140,7 @@ void LLViewerGesture::doTrigger( BOOL send_chat )
LLViewerGestureList::LLViewerGestureList()
: LLGestureList()
{
- mIsLoaded = FALSE;
+ mIsLoaded = false;
}
@@ -151,10 +151,10 @@ LLGesture *LLViewerGestureList::create_gesture(U8 **buffer, S32 max_size)
}
-// See if the prefix matches any gesture. If so, return TRUE
+// See if the prefix matches any gesture. If so, return true
// and place the full text of the gesture trigger into
// output_str
-BOOL LLViewerGestureList::matchPrefix(const std::string& in_str, std::string* out_str)
+bool LLViewerGestureList::matchPrefix(const std::string& in_str, std::string* out_str)
{
S32 in_len = in_str.length();
@@ -177,10 +177,10 @@ BOOL LLViewerGestureList::matchPrefix(const std::string& in_str, std::string* ou
if (in_str_lc == trigger_trunc)
{
*out_str = trigger;
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
@@ -197,7 +197,7 @@ void LLViewerGestureList::xferCallback(void *data, S32 size, void** /*user_data*
LL_ERRS() << "Read off of end of array, error in serialization" << LL_ENDL;
}
- gGestureList.mIsLoaded = TRUE;
+ gGestureList.mIsLoaded = true;
}
else
{
diff --git a/indra/newview/llviewergesture.h b/indra/newview/llviewergesture.h
index 8b621850ea..5b08a487f0 100644
--- a/indra/newview/llviewergesture.h
+++ b/indra/newview/llviewergesture.h
@@ -46,12 +46,12 @@ public:
LLViewerGesture(const LLViewerGesture &gesture);
// Triggers if a key/mask matches it
- virtual BOOL trigger(KEY key, MASK mask);
+ virtual bool trigger(KEY key, MASK mask);
// Triggers if case-insensitive substring matches (assumes string is lowercase)
- virtual BOOL trigger(const std::string &string);
+ virtual bool trigger(const std::string &string);
- void doTrigger( BOOL send_chat );
+ void doTrigger( bool send_chat );
protected:
static const F32 SOUND_VOLUME;
@@ -63,14 +63,14 @@ public:
LLViewerGestureList();
//void requestFromServer();
- BOOL getIsLoaded() { return mIsLoaded; }
+ bool getIsLoaded() { return mIsLoaded; }
- //void requestResetFromServer( BOOL is_male );
+ //void requestResetFromServer( bool is_male );
- // See if the prefix matches any gesture. If so, return TRUE
+ // See if the prefix matches any gesture. If so, return true
// and place the full text of the gesture trigger into
// output_str
- BOOL matchPrefix(const std::string& in_str, std::string* out_str);
+ bool matchPrefix(const std::string& in_str, std::string* out_str);
static void xferCallback(void *data, S32 size, void** /*user_data*/, S32 status);
@@ -78,7 +78,7 @@ protected:
LLGesture *create_gesture(U8 **buffer, S32 max_size);
protected:
- BOOL mIsLoaded;
+ bool mIsLoaded;
};
extern LLViewerGestureList gGestureList;
diff --git a/indra/newview/llviewerinput.cpp b/indra/newview/llviewerinput.cpp
index 97e180df71..ce763181c3 100644
--- a/indra/newview/llviewerinput.cpp
+++ b/indra/newview/llviewerinput.cpp
@@ -84,10 +84,10 @@ LLViewerInput gViewerInput;
bool agent_jump( EKeystate s )
{
- static BOOL first_fly_attempt(TRUE);
+ static bool first_fly_attempt(true);
if (KEYSTATE_UP == s)
{
- first_fly_attempt = TRUE;
+ first_fly_attempt = true;
return true;
}
F32 time = gKeyboard->getCurKeyElapsedTime();
@@ -102,8 +102,8 @@ bool agent_jump( EKeystate s )
}
else
{
- gAgent.setFlying(TRUE, first_fly_attempt);
- first_fly_attempt = FALSE;
+ gAgent.setFlying(true, first_fly_attempt);
+ first_fly_attempt = false;
gAgent.moveUp(1);
}
return true;
@@ -567,7 +567,7 @@ bool camera_move_backward_fast( EKeystate s )
bool edit_avatar_spin_ccw( EKeystate s )
{
if( KEYSTATE_UP == s ) return true;
- gMorphView->setCameraDrivenByKeys( TRUE );
+ gMorphView->setCameraDrivenByKeys( true );
gAgentCamera.setOrbitLeftKey( get_orbit_rate() );
//gMorphView->orbitLeft( get_orbit_rate() );
return true;
@@ -577,7 +577,7 @@ bool edit_avatar_spin_ccw( EKeystate s )
bool edit_avatar_spin_cw( EKeystate s )
{
if( KEYSTATE_UP == s ) return true;
- gMorphView->setCameraDrivenByKeys( TRUE );
+ gMorphView->setCameraDrivenByKeys( true );
gAgentCamera.setOrbitRightKey( get_orbit_rate() );
//gMorphView->orbitRight( get_orbit_rate() );
return true;
@@ -586,7 +586,7 @@ bool edit_avatar_spin_cw( EKeystate s )
bool edit_avatar_spin_over( EKeystate s )
{
if( KEYSTATE_UP == s ) return true;
- gMorphView->setCameraDrivenByKeys( TRUE );
+ gMorphView->setCameraDrivenByKeys( true );
gAgentCamera.setOrbitUpKey( get_orbit_rate() );
//gMorphView->orbitUp( get_orbit_rate() );
return true;
@@ -596,7 +596,7 @@ bool edit_avatar_spin_over( EKeystate s )
bool edit_avatar_spin_under( EKeystate s )
{
if( KEYSTATE_UP == s ) return true;
- gMorphView->setCameraDrivenByKeys( TRUE );
+ gMorphView->setCameraDrivenByKeys( true );
gAgentCamera.setOrbitDownKey( get_orbit_rate() );
//gMorphView->orbitDown( get_orbit_rate() );
return true;
@@ -605,7 +605,7 @@ bool edit_avatar_spin_under( EKeystate s )
bool edit_avatar_move_forward( EKeystate s )
{
if( KEYSTATE_UP == s ) return true;
- gMorphView->setCameraDrivenByKeys( TRUE );
+ gMorphView->setCameraDrivenByKeys( true );
gAgentCamera.setOrbitInKey( get_orbit_rate() );
//gMorphView->orbitIn();
return true;
@@ -615,7 +615,7 @@ bool edit_avatar_move_forward( EKeystate s )
bool edit_avatar_move_backward( EKeystate s )
{
if( KEYSTATE_UP == s ) return true;
- gMorphView->setCameraDrivenByKeys( TRUE );
+ gMorphView->setCameraDrivenByKeys( true );
gAgentCamera.setOrbitOutKey( get_orbit_rate() );
//gMorphView->orbitOut();
return true;
@@ -978,7 +978,7 @@ LLViewerInput::LLViewerInput()
for (S32 i = 0; i < KEY_COUNT; i++)
{
- mKeyHandledByUI[i] = FALSE;
+ mKeyHandledByUI[i] = false;
}
for (S32 i = 0; i < CLICK_COUNT; i++)
{
@@ -1038,41 +1038,41 @@ bool LLViewerInput::modeFromString(const std::string& string, S32 *mode)
}
// static
-BOOL LLViewerInput::mouseFromString(const std::string& string, EMouseClickType *mode)
+bool LLViewerInput::mouseFromString(const std::string& string, EMouseClickType *mode)
{
if (string == "LMB")
{
*mode = CLICK_LEFT;
- return TRUE;
+ return true;
}
else if (string == "Double LMB")
{
*mode = CLICK_DOUBLELEFT;
- return TRUE;
+ return true;
}
else if (string == "MMB")
{
*mode = CLICK_MIDDLE;
- return TRUE;
+ return true;
}
else if (string == "MB4")
{
*mode = CLICK_BUTTON4;
- return TRUE;
+ return true;
}
else if (string == "MB5")
{
*mode = CLICK_BUTTON5;
- return TRUE;
+ return true;
}
else
{
*mode = CLICK_NONE;
- return FALSE;
+ return false;
}
}
-BOOL LLViewerInput::handleKey(KEY translated_key, MASK translated_mask, BOOL repeated)
+bool LLViewerInput::handleKey(KEY translated_key, MASK translated_mask, bool repeated)
{
// check for re-map
EKeyboardMode mode = gViewerInput.getMode();
@@ -1085,17 +1085,17 @@ BOOL LLViewerInput::handleKey(KEY translated_key, MASK translated_mask, BOOL rep
}
// No repeats of F-keys
- BOOL repeatable_key = (translated_key < KEY_F1 || translated_key > KEY_F12);
+ bool repeatable_key = (translated_key < KEY_F1 || translated_key > KEY_F12);
if (!repeatable_key && repeated)
{
- return FALSE;
+ return false;
}
LL_DEBUGS("UserInput") << "keydown -" << translated_key << "-" << LL_ENDL;
// skip skipped keys
if(mKeysSkippedByUI.find(translated_key) != mKeysSkippedByUI.end())
{
- mKeyHandledByUI[translated_key] = FALSE;
+ mKeyHandledByUI[translated_key] = false;
LL_INFOS("KeyboardHandling") << "Key wasn't handled by UI!" << LL_ENDL;
}
else
@@ -1110,7 +1110,7 @@ BOOL LLViewerInput::handleKey(KEY translated_key, MASK translated_mask, BOOL rep
return mKeyHandledByUI[translated_key];
}
-BOOL LLViewerInput::handleKeyUp(KEY translated_key, MASK translated_mask)
+bool LLViewerInput::handleKeyUp(KEY translated_key, MASK translated_mask)
{
return gViewerWindow->handleKeyUp(translated_key, translated_mask);
}
@@ -1124,7 +1124,7 @@ bool LLViewerInput::handleGlobalBindsKeyDown(KEY key, MASK mask)
return false;
}
S32 mode = getMode();
- return scanKey(mGlobalKeyBindings[mode], mGlobalKeyBindings[mode].size(), key, mask, TRUE, FALSE, FALSE, FALSE);
+ return scanKey(mGlobalKeyBindings[mode], mGlobalKeyBindings[mode].size(), key, mask, true, false, false, false);
}
bool LLViewerInput::handleGlobalBindsKeyUp(KEY key, MASK mask)
@@ -1137,7 +1137,7 @@ bool LLViewerInput::handleGlobalBindsKeyUp(KEY key, MASK mask)
}
S32 mode = getMode();
- return scanKey(mGlobalKeyBindings[mode], mGlobalKeyBindings[mode].size(), key, mask, FALSE, TRUE, FALSE, FALSE);
+ return scanKey(mGlobalKeyBindings[mode], mGlobalKeyBindings[mode].size(), key, mask, false, true, false, false);
}
bool LLViewerInput::handleGlobalBindsMouse(EMouseClickType clicktype, MASK mask, bool down)
@@ -1162,7 +1162,7 @@ bool LLViewerInput::handleGlobalBindsMouse(EMouseClickType clicktype, MASK mask,
return res;
}
-BOOL LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, const std::string& function_name)
+bool LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, const std::string& function_name)
{
S32 index;
typedef boost::function<bool(EKeystate)> function_t;
@@ -1183,7 +1183,7 @@ BOOL LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, cons
{
U32 keyidx = ((mask<<16)|key);
(mRemapKeys[mode])[keyidx] = ((0<<16)|(KEY_F1+(idx-1)));
- return TRUE;
+ return true;
}
}
}
@@ -1199,13 +1199,13 @@ BOOL LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, cons
if (!function)
{
LL_WARNS_ONCE() << "Can't bind key to function " << function_name << ", no function with this name found" << LL_ENDL;
- return FALSE;
+ return false;
}
if (mode >= MODE_COUNT)
{
LL_ERRS() << "LLKeyboard::bindKey() - unknown mode passed" << mode << LL_ENDL;
- return FALSE;
+ return false;
}
// check for duplicate first and overwrite
@@ -1217,7 +1217,7 @@ BOOL LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, cons
if (key == mGlobalKeyBindings[mode][index].mKey && mask == mGlobalKeyBindings[mode][index].mMask)
{
mGlobalKeyBindings[mode][index].mFunction = function;
- return TRUE;
+ return true;
}
}
}
@@ -1229,7 +1229,7 @@ BOOL LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, cons
if (key == mKeyBindings[mode][index].mKey && mask == mKeyBindings[mode][index].mMask)
{
mKeyBindings[mode][index].mFunction = function;
- return TRUE;
+ return true;
}
}
}
@@ -1249,10 +1249,10 @@ BOOL LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, cons
mKeyBindings[mode].push_back(bind);
}
- return TRUE;
+ return true;
}
-BOOL LLViewerInput::bindMouse(const S32 mode, const EMouseClickType mouse, const MASK mask, const std::string& function_name)
+bool LLViewerInput::bindMouse(const S32 mode, const EMouseClickType mouse, const MASK mask, const std::string& function_name)
{
S32 index;
typedef boost::function<bool(EKeystate)> function_t;
@@ -1269,7 +1269,7 @@ BOOL LLViewerInput::bindMouse(const S32 mode, const EMouseClickType mouse, const
// priority even over UI and is handled in LLToolCompGun::handleMouseDown
// so just mark it as having default handler
mLMouseDefaultHandling[mode] = true;
- return TRUE;
+ return true;
}
LLKeybindFunctionData* result = LLKeyboardActionRegistry::getValue(function_name);
@@ -1281,13 +1281,13 @@ BOOL LLViewerInput::bindMouse(const S32 mode, const EMouseClickType mouse, const
if (!function)
{
LL_WARNS_ONCE() << "Can't bind mouse key to function " << function_name << ", no function with this name found" << LL_ENDL;
- return FALSE;
+ return false;
}
if (mode >= MODE_COUNT)
{
LL_ERRS() << "LLKeyboard::bindKey() - unknown mode passed" << mode << LL_ENDL;
- return FALSE;
+ return false;
}
// check for duplicate first and overwrite
@@ -1331,7 +1331,7 @@ BOOL LLViewerInput::bindMouse(const S32 mode, const EMouseClickType mouse, const
mMouseBindings[mode].push_back(bind);
}
- return TRUE;
+ return true;
}
LLViewerInput::KeyBinding::KeyBinding()
@@ -1551,9 +1551,9 @@ bool LLViewerInput::scanKey(const std::vector<LLKeyboardBinding> &binding,
S32 binding_count,
KEY key,
MASK mask,
- BOOL key_down,
- BOOL key_up,
- BOOL key_level,
+ bool key_down,
+ bool key_up,
+ bool key_level,
bool repeat) const
{
for (S32 i = 0; i < binding_count; i++)
@@ -1589,7 +1589,7 @@ bool LLViewerInput::scanKey(const std::vector<LLKeyboardBinding> &binding,
}
// Called from scanKeyboard.
-bool LLViewerInput::scanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level) const
+bool LLViewerInput::scanKey(KEY key, bool key_down, bool key_up, bool key_level) const
{
if (LLApp::isExiting())
{
@@ -1598,7 +1598,7 @@ bool LLViewerInput::scanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level)
S32 mode = getMode();
// Consider keyboard scanning as NOT mouse event. JC
- MASK mask = gKeyboard->currentMask(FALSE);
+ MASK mask = gKeyboard->currentMask(false);
if (mKeyHandledByUI[key])
{
@@ -1606,17 +1606,17 @@ bool LLViewerInput::scanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level)
}
// don't process key down on repeated keys
- BOOL repeat = gKeyboard->getKeyRepeated(key);
+ bool repeat = gKeyboard->getKeyRepeated(key);
bool res = scanKey(mKeyBindings[mode], mKeyBindings[mode].size(), key, mask, key_down, key_up, key_level, repeat);
return res;
}
-BOOL LLViewerInput::handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down)
+bool LLViewerInput::handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask, EMouseClickType clicktype, bool down)
{
bool is_toolmgr_action = false;
- BOOL handled = gViewerWindow->handleAnyMouseClick(window_impl, pos, mask, clicktype, down, is_toolmgr_action);
+ bool handled = gViewerWindow->handleAnyMouseClick(window_impl, pos, mask, clicktype, down, is_toolmgr_action);
if (clicktype != CLICK_NONE)
{
@@ -1743,7 +1743,7 @@ bool LLViewerInput::scanMouse(EMouseClickType click, EMouseState state) const
{
bool res = false;
S32 mode = getMode();
- MASK mask = gKeyboard->currentMask(TRUE);
+ MASK mask = gKeyboard->currentMask(true);
res = scanMouse(mMouseBindings[mode], mMouseBindings[mode].size(), click, mask, state, false);
// No user defined actions found or those actions can't handle the key/button,
diff --git a/indra/newview/llviewerinput.h b/indra/newview/llviewerinput.h
index 41e289ac1d..68afa33a6a 100644
--- a/indra/newview/llviewerinput.h
+++ b/indra/newview/llviewerinput.h
@@ -108,8 +108,8 @@ public:
LLViewerInput();
virtual ~LLViewerInput();
- BOOL handleKey(KEY key, MASK mask, BOOL repeated);
- BOOL handleKeyUp(KEY key, MASK mask);
+ bool handleKey(KEY key, MASK mask, bool repeated);
+ bool handleKeyUp(KEY key, MASK mask);
// Handle 'global' keybindings that do not consume event,
// yet need to be processed early
@@ -122,15 +122,15 @@ public:
EKeyboardMode getMode() const;
static bool modeFromString(const std::string& string, S32 *mode); // False on failure
- static BOOL mouseFromString(const std::string& string, EMouseClickType *mode);// False on failure
+ static bool mouseFromString(const std::string& string, EMouseClickType *mode);// False on failure
bool scanKey(KEY key,
- BOOL key_down,
- BOOL key_up,
- BOOL key_level) const;
+ bool key_down,
+ bool key_up,
+ bool key_level) const;
// handleMouse() records state, scanMouse() goes through states, scanMouse(click) processes individual saved states after UI is done with them
- BOOL handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down);
+ bool handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask, EMouseClickType clicktype, bool down);
void scanMouse();
bool isMouseBindUsed(const EMouseClickType mouse, const MASK mask, const S32 mode) const;
@@ -144,9 +144,9 @@ private:
S32 binding_count,
KEY key,
MASK mask,
- BOOL key_down,
- BOOL key_up,
- BOOL key_level,
+ bool key_down,
+ bool key_up,
+ bool key_level,
bool repeat) const;
enum EMouseState
@@ -166,8 +166,8 @@ private:
bool ignore_additional_masks) const;
S32 loadBindingMode(const LLViewerInput::KeyMode& keymode, S32 mode);
- BOOL bindKey(const S32 mode, const KEY key, const MASK mask, const std::string& function_name);
- BOOL bindMouse(const S32 mode, const EMouseClickType mouse, const MASK mask, const std::string& function_name);
+ bool bindKey(const S32 mode, const KEY key, const MASK mask, const std::string& function_name);
+ bool bindMouse(const S32 mode, const EMouseClickType mouse, const MASK mask, const std::string& function_name);
void resetBindings();
// Hold all the ugly stuff torn out to make LLKeyboard non-viewer-specific here
@@ -186,7 +186,7 @@ private:
typedef std::map<U32, U32> key_remap_t;
key_remap_t mRemapKeys[MODE_COUNT];
std::set<KEY> mKeysSkippedByUI;
- BOOL mKeyHandledByUI[KEY_COUNT]; // key processed successfully by UI
+ bool mKeyHandledByUI[KEY_COUNT]; // key processed successfully by UI
// This is indentical to what llkeyboard does (mKeyRepeated, mKeyLevel, mKeyDown e t c),
// just instead of remembering individually as bools, we record state as enum
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index b9a7c9448f..937f016e16 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -298,7 +298,7 @@ public:
return false;
}
LLUUID inventory_id;
- if (!inventory_id.set(params[0], FALSE))
+ if (!inventory_id.set(params[0], false))
{
return false;
}
@@ -406,7 +406,7 @@ void LLViewerInventoryItem::cloneViewerItem(LLPointer<LLViewerInventoryItem>& ne
}
}
-void LLViewerInventoryItem::updateServer(BOOL is_new) const
+void LLViewerInventoryItem::updateServer(bool is_new) const
{
if(!mIsComplete)
{
@@ -494,24 +494,24 @@ void LLViewerInventoryItem::fetchFromServer(void) const
}
// virtual
-BOOL LLViewerInventoryItem::unpackMessage(const LLSD& item)
+bool LLViewerInventoryItem::unpackMessage(const LLSD& item)
{
- BOOL rv = LLInventoryItem::fromLLSD(item);
+ bool rv = LLInventoryItem::fromLLSD(item);
LLLocalizedInventoryItemsDictionary::getInstance()->localizeInventoryObjectName(mName);
- mIsComplete = TRUE;
+ mIsComplete = true;
return rv;
}
// virtual
-BOOL LLViewerInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num)
+bool LLViewerInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num)
{
- BOOL rv = LLInventoryItem::unpackMessage(msg, block, block_num);
+ bool rv = LLInventoryItem::unpackMessage(msg, block, block_num);
LLLocalizedInventoryItemsDictionary::getInstance()->localizeInventoryObjectName(mName);
- mIsComplete = TRUE;
+ mIsComplete = true;
return rv;
}
@@ -540,14 +540,14 @@ void LLViewerInventoryItem::packMessage(LLMessageSystem* msg) const
}
// virtual
-BOOL LLViewerInventoryItem::importLegacyStream(std::istream& input_stream)
+bool LLViewerInventoryItem::importLegacyStream(std::istream& input_stream)
{
- BOOL rv = LLInventoryItem::importLegacyStream(input_stream);
- mIsComplete = TRUE;
+ bool rv = LLInventoryItem::importLegacyStream(input_stream);
+ mIsComplete = true;
return rv;
}
-void LLViewerInventoryItem::updateParentOnServer(BOOL restamp) const
+void LLViewerInventoryItem::updateParentOnServer(bool restamp) const
{
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_MoveInventoryItem);
@@ -628,7 +628,7 @@ void LLViewerInventoryCategory::packMessage(LLMessageSystem* msg) const
msg->addStringFast(_PREHASH_Name, mName);
}
-void LLViewerInventoryCategory::updateParentOnServer(BOOL restamp) const
+void LLViewerInventoryCategory::updateParentOnServer(bool restamp) const
{
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_MoveInventoryFolder);
@@ -643,7 +643,7 @@ void LLViewerInventoryCategory::updateParentOnServer(BOOL restamp) const
gAgent.sendReliableMessage();
}
-void LLViewerInventoryCategory::updateServer(BOOL is_new) const
+void LLViewerInventoryCategory::updateServer(bool is_new) const
{
// communicate that change with the server.
@@ -807,7 +807,7 @@ bool LLViewerInventoryCategory::acceptItem(LLInventoryItem* inv_item)
void LLViewerInventoryCategory::determineFolderType()
{
/* Do NOT uncomment this code. This is for future 2.1 support of ensembles.
- llassert(FALSE);
+ llassert(false);
LLFolderType::EType original_type = getPreferredType();
if (LLFolderType::lookupIsProtectedType(original_type))
return;
@@ -816,7 +816,7 @@ void LLViewerInventoryCategory::determineFolderType()
U64 folder_invalid = 0;
LLInventoryModel::cat_array_t category_array;
LLInventoryModel::item_array_t item_array;
- gInventory.collectDescendents(getUUID(),category_array,item_array,FALSE);
+ gInventory.collectDescendents(getUUID(),category_array,item_array,false);
// For ensembles
if (category_array.empty())
@@ -851,7 +851,7 @@ void LLViewerInventoryCategory::determineFolderType()
{
changeType(LLFolderType::FT_NONE);
}
- llassert(FALSE);
+ llassert(false);
*/
}
@@ -882,9 +882,9 @@ void LLViewerInventoryCategory::localizeName()
}
// virtual
-BOOL LLViewerInventoryCategory::unpackMessage(const LLSD& category)
+bool LLViewerInventoryCategory::unpackMessage(const LLSD& category)
{
- BOOL rv = LLInventoryCategory::fromLLSD(category);
+ bool rv = LLInventoryCategory::fromLLSD(category);
localizeName();
return rv;
}
@@ -1003,7 +1003,7 @@ void set_default_permissions(LLViewerInventoryItem* item, std::string perm_type)
item->setPermissions(perm);
- item->updateServer(FALSE);
+ item->updateServer(false);
}
}
@@ -1039,7 +1039,7 @@ void create_gesture_cb(const LLUUID& inv_item)
LLPreviewGesture* preview = LLPreviewGesture::show(inv_item, LLUUID::null);
// Force to be entirely onscreen.
- gFloaterView->adjustToFitScreen(preview, FALSE);
+ gFloaterView->adjustToFitScreen(preview, false);
}
}
}
@@ -1375,7 +1375,7 @@ void move_inventory_item(
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, agent_id);
msg->addUUIDFast(_PREHASH_SessionID, session_id);
- msg->addBOOLFast(_PREHASH_Stamp, FALSE);
+ msg->addBOOLFast(_PREHASH_Stamp, false);
msg->nextBlockFast(_PREHASH_InventoryData);
msg->addUUIDFast(_PREHASH_ItemID, item_id);
msg->addUUIDFast(_PREHASH_FolderID, parent_id);
@@ -1594,7 +1594,7 @@ void purge_descendents_of(const LLUUID& id, LLPointer<LLInventoryCallback> cb)
// Remove items from clipboard or it will remain active even if there is nothing to paste/copy
LLInventoryModel::cat_array_t categories;
LLInventoryModel::item_array_t items;
- gInventory.collectDescendents(id, categories, items, TRUE);
+ gInventory.collectDescendents(id, categories, items, true);
for (LLInventoryModel::cat_array_t::const_iterator it = categories.begin(); it != categories.end(); ++it)
{
@@ -1837,7 +1837,7 @@ void menu_create_inventory_item(LLInventoryPanel* panel, LLUUID dest_id, const L
LLInventoryPanel* panel = static_cast<LLInventoryPanel*>(handle.get());
if (panel)
{
- panel->setSelectionByID(new_category_id, TRUE);
+ panel->setSelectionByID(new_category_id, true);
}
LL_DEBUGS(LOG_INV) << "Done creating inventory: " << new_category_id << LL_ENDL;
};
@@ -1934,7 +1934,7 @@ void menu_create_inventory_item(LLInventoryPanel* panel, LLUUID dest_id, const L
}
if(panel)
{
- panel->getRootFolder()->setNeedsAutoRename(TRUE);
+ panel->getRootFolder()->setNeedsAutoRename(true);
}
}
@@ -2146,7 +2146,7 @@ U32 LLViewerInventoryItem::getCRC32() const
// *TODO: mantipov: should be removed with LMSortPrefix patch in llinventorymodel.cpp, EXT-3985
static char getSeparator() { return '@'; }
-BOOL LLViewerInventoryItem::extractSortFieldAndDisplayName(const std::string& name, S32* sortField, std::string* displayName)
+bool LLViewerInventoryItem::extractSortFieldAndDisplayName(const std::string& name, S32* sortField, std::string* displayName)
{
using std::string;
using std::stringstream;
@@ -2154,7 +2154,7 @@ BOOL LLViewerInventoryItem::extractSortFieldAndDisplayName(const std::string& na
const char separator = getSeparator();
const string::size_type separatorPos = name.find(separator, 0);
- BOOL result = FALSE;
+ bool result = false;
if (separatorPos < string::npos)
{
@@ -2175,7 +2175,7 @@ BOOL LLViewerInventoryItem::extractSortFieldAndDisplayName(const std::string& na
*displayName = name.substr(separatorPos + 1, string::npos);
}
- result = TRUE;
+ result = true;
}
return result;
@@ -2240,9 +2240,9 @@ PermissionMask LLViewerInventoryItem::getPermissionMask() const
{
const LLPermissions& permissions = getPermissions();
- BOOL copy = permissions.allowCopyBy(gAgent.getID());
- BOOL mod = permissions.allowModifyBy(gAgent.getID());
- BOOL xfer = permissions.allowOperationBy(PERM_TRANSFER, gAgent.getID());
+ bool copy = permissions.allowCopyBy(gAgent.getID());
+ bool mod = permissions.allowModifyBy(gAgent.getID());
+ bool xfer = permissions.allowOperationBy(PERM_TRANSFER, gAgent.getID());
PermissionMask perm_mask = 0;
if (copy) perm_mask |= PERM_COPY;
if (mod) perm_mask |= PERM_MODIFY;
@@ -2305,11 +2305,11 @@ LLUUID find_possible_item_for_regeneration(const LLViewerInventoryItem *target_i
// This currently dosen't work, because the sim does not allow us
// to change an item's assetID.
-BOOL LLViewerInventoryItem::regenerateLink()
+bool LLViewerInventoryItem::regenerateLink()
{
const LLUUID target_item_id = find_possible_item_for_regeneration(this);
if (target_item_id.isNull())
- return FALSE;
+ return false;
LLViewerInventoryCategory::cat_array_t cats;
LLViewerInventoryItem::item_array_t items;
LLAssetIDMatches asset_id_matches(getAssetUUID());
@@ -2324,9 +2324,9 @@ BOOL LLViewerInventoryItem::regenerateLink()
{
LLViewerInventoryItem *item = (*item_iter);
item->setAssetUUID(target_item_id);
- item->updateServer(FALSE);
+ item->updateServer(false);
gInventory.addChangedMask(LLInventoryObserver::REBUILD, item->getUUID());
}
gInventory.notifyObservers();
- return TRUE;
+ return true;
}
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index 0d0ccc6643..bb6a6edf55 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -56,7 +56,7 @@ public:
protected:
~LLViewerInventoryItem( void ); // ref counted
- BOOL extractSortFieldAndDisplayName(S32* sortField, std::string* displayName) const { return extractSortFieldAndDisplayName(mName, sortField, displayName); }
+ bool extractSortFieldAndDisplayName(S32* sortField, std::string* displayName) const { return extractSortFieldAndDisplayName(mName, sortField, displayName); }
mutable std::string mDisplayName;
public:
@@ -83,7 +83,7 @@ public:
virtual time_t getCreationDate() const;
virtual U32 getCRC32() const; // really more of a checksum.
- static BOOL extractSortFieldAndDisplayName(const std::string& name, S32* sortField, std::string* displayName);
+ static bool extractSortFieldAndDisplayName(const std::string& name, S32* sortField, std::string* displayName);
// construct a complete viewer inventory item
LLViewerInventoryItem(const LLUUID& uuid, const LLUUID& parent_uuid,
@@ -125,14 +125,14 @@ public:
void cloneViewerItem(LLPointer<LLViewerInventoryItem>& newitem) const;
// virtual methods
- virtual void updateParentOnServer(BOOL restamp) const;
- virtual void updateServer(BOOL is_new) const;
+ virtual void updateParentOnServer(bool restamp) const;
+ virtual void updateServer(bool is_new) const;
void fetchFromServer(void) const;
virtual void packMessage(LLMessageSystem* msg) const;
- virtual BOOL unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num = 0);
- virtual BOOL unpackMessage(const LLSD& item);
- virtual BOOL importLegacyStream(std::istream& input_stream);
+ virtual bool unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num = 0);
+ virtual bool unpackMessage(const LLSD& item);
+ virtual bool importLegacyStream(std::istream& input_stream);
// new methods
bool isFinished() const { return mIsComplete; }
@@ -161,7 +161,7 @@ public:
void onCallingCardNameLookup(const LLUUID& id, const LLAvatarName& name);
// If this is a broken link, try to fix it and any other identical link.
- BOOL regenerateLink();
+ bool regenerateLink();
public:
bool mIsComplete;
@@ -197,8 +197,8 @@ public:
LLViewerInventoryCategory(const LLViewerInventoryCategory* other);
void copyViewerCategory(const LLViewerInventoryCategory* other);
- virtual void updateParentOnServer(BOOL restamp_children) const;
- virtual void updateServer(BOOL is_new) const;
+ virtual void updateParentOnServer(bool restamp_children) const;
+ virtual void updateServer(bool is_new) const;
virtual void packMessage(LLMessageSystem* msg) const;
@@ -238,7 +238,7 @@ public:
void determineFolderType();
void changeType(LLFolderType::EType new_folder_type);
virtual void unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num = 0);
- virtual BOOL unpackMessage(const LLSD& category);
+ virtual bool unpackMessage(const LLSD& category);
// returns true if the category object will accept the incoming item
bool acceptItem(LLInventoryItem* inv_item);
diff --git a/indra/newview/llviewerjoint.cpp b/indra/newview/llviewerjoint.cpp
index 9653e80b53..08b47d9df3 100644
--- a/indra/newview/llviewerjoint.cpp
+++ b/indra/newview/llviewerjoint.cpp
@@ -38,7 +38,7 @@
#include "llvoavatar.h"
#include "pipeline.h"
-static const S32 MIN_PIXEL_AREA_3PASS_HAIR = 64*64;
+static constexpr S32 MIN_PIXEL_AREA_3PASS_HAIR = 64*64;
//-----------------------------------------------------------------------------
// LLViewerJoint()
@@ -67,7 +67,7 @@ LLViewerJoint::~LLViewerJoint()
//--------------------------------------------------------------------
// render()
//--------------------------------------------------------------------
-U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
+U32 LLViewerJoint::render( F32 pixelArea, bool first_pass, bool is_dummy )
{
stop_glerror();
@@ -107,13 +107,13 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
// second pass writes to z buffer only
gGL.setColorMask(false, false);
{
- triangle_count += drawShape( pixelArea, FALSE, is_dummy );
+ triangle_count += drawShape( pixelArea, false, is_dummy );
}
// third past respects z buffer and writes color
gGL.setColorMask(true, false);
{
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
- triangle_count += drawShape( pixelArea, FALSE, is_dummy );
+ triangle_count += drawShape( pixelArea, false, is_dummy );
}
}
else
@@ -127,7 +127,7 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
// Render Outside (write to the Z buffer)
glCullFace(GL_BACK);
{
- triangle_count += drawShape( pixelArea, FALSE, is_dummy );
+ triangle_count += drawShape( pixelArea, false, is_dummy );
}
}
}
@@ -149,7 +149,7 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
F32 jointLOD = joint->getLOD();
if (pixelArea >= jointLOD || sDisableLOD)
{
- triangle_count += joint->render( pixelArea, TRUE, is_dummy );
+ triangle_count += joint->render( pixelArea, true, is_dummy );
if (jointLOD != DEFAULT_AVATAR_JOINT_LOD)
{
@@ -164,7 +164,7 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
//--------------------------------------------------------------------
// drawShape()
//--------------------------------------------------------------------
-U32 LLViewerJoint::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
+U32 LLViewerJoint::drawShape( F32 pixelArea, bool first_pass, bool is_dummy )
{
return 0;
}
diff --git a/indra/newview/llviewerjoint.h b/indra/newview/llviewerjoint.h
index abe11bbf5c..dec6b3d2a7 100644
--- a/indra/newview/llviewerjoint.h
+++ b/indra/newview/llviewerjoint.h
@@ -54,11 +54,11 @@ public:
// Traverses the entire joint hierarchy, setting up
// transforms and calling the drawShape().
// Derived classes may add text/graphic output.
- virtual U32 render( F32 pixelArea, BOOL first_pass = TRUE, BOOL is_dummy = FALSE ); // Returns triangle count
+ virtual U32 render( F32 pixelArea, bool first_pass = true, bool is_dummy = false ); // Returns triangle count
// Draws the shape attached to a joint.
// Called by render().
- virtual U32 drawShape( F32 pixelArea, BOOL first_pass = TRUE, BOOL is_dummy = FALSE );
+ virtual U32 drawShape( F32 pixelArea, bool first_pass = true, bool is_dummy = false );
virtual void drawNormals() {}
};
diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp
index b3bfb86b99..3016370427 100644
--- a/indra/newview/llviewerjointattachment.cpp
+++ b/indra/newview/llviewerjointattachment.cpp
@@ -45,19 +45,19 @@
#include "llglheaders.h"
extern LLPipeline gPipeline;
-const F32 MAX_ATTACHMENT_DIST = 3.5f; // meters
+constexpr F32 MAX_ATTACHMENT_DIST = 3.5f; // meters
//-----------------------------------------------------------------------------
// LLViewerJointAttachment()
//-----------------------------------------------------------------------------
LLViewerJointAttachment::LLViewerJointAttachment() :
- mVisibleInFirst(FALSE),
+ mVisibleInFirst(false),
mGroup(0),
- mIsHUDAttachment(FALSE),
+ mIsHUDAttachment(false),
mPieSlice(-1)
{
- mValid = FALSE;
- mUpdateXform = FALSE;
+ mValid = false;
+ mUpdateXform = false;
mAttachedObjects.clear();
}
@@ -71,15 +71,15 @@ LLViewerJointAttachment::~LLViewerJointAttachment()
//-----------------------------------------------------------------------------
// isTransparent()
//-----------------------------------------------------------------------------
-BOOL LLViewerJointAttachment::isTransparent()
+bool LLViewerJointAttachment::isTransparent()
{
- return FALSE;
+ return false;
}
//-----------------------------------------------------------------------------
// drawShape()
//-----------------------------------------------------------------------------
-U32 LLViewerJointAttachment::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
+U32 LLViewerJointAttachment::drawShape( F32 pixelArea, bool first_pass, bool is_dummy )
{
if (LLVOAvatar::sShowAttachmentPoints)
{
@@ -103,7 +103,7 @@ void LLViewerJointAttachment::setupDrawable(LLViewerObject *object)
return;
if (object->mDrawable->isActive())
{
- object->mDrawable->makeStatic(FALSE);
+ object->mDrawable->makeStatic(false);
}
object->mDrawable->mXform.setParent(getXform()); // LLViewerJointAttachment::lazyAttach
@@ -162,7 +162,7 @@ void LLViewerJointAttachment::setupDrawable(LLViewerObject *object)
//-----------------------------------------------------------------------------
// addObject()
//-----------------------------------------------------------------------------
-BOOL LLViewerJointAttachment::addObject(LLViewerObject* object)
+bool LLViewerJointAttachment::addObject(LLViewerObject* object)
{
object->extractAttachmentItemID();
@@ -184,7 +184,7 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object)
// If this happens to be attached to self, then detach.
LLVOAvatarSelf::detachAttachmentIntoInventory(object->getAttachmentItemID());
- return FALSE;
+ return false;
}
mAttachedObjects.push_back(object);
@@ -194,7 +194,7 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object)
{
if (object->mText.notNull())
{
- object->mText->setOnHUDAttachment(TRUE);
+ object->mText->setOnHUDAttachment(true);
}
LLViewerObject::const_child_list_t& child_list = object->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
@@ -203,14 +203,14 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object)
LLViewerObject* childp = *iter;
if (childp && childp->mText.notNull())
{
- childp->mText->setOnHUDAttachment(TRUE);
+ childp->mText->setOnHUDAttachment(true);
}
}
}
calcLOD();
- mUpdateXform = TRUE;
+ mUpdateXform = true;
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
@@ -236,7 +236,7 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object)
}
// force object visibile
- setAttachmentVisibility(TRUE);
+ setAttachmentVisibility(true);
mAttachedObjects.erase(iter);
if (object->mDrawable.notNull())
@@ -244,7 +244,7 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object)
//if object is active, make it static
if(object->mDrawable->isActive())
{
- object->mDrawable->makeStatic(FALSE);
+ object->mDrawable->makeStatic(false);
}
LLVector3 cur_position = object->getRenderPosition();
@@ -252,7 +252,7 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object)
object->mDrawable->mXform.setPosition(cur_position);
object->mDrawable->mXform.setRotation(cur_rotation);
- gPipeline.markMoved(object->mDrawable, TRUE);
+ gPipeline.markMoved(object->mDrawable, true);
gPipeline.markTextured(object->mDrawable); // face may need to change draw pool to/from POOL_HUD
if (mIsHUDAttachment)
@@ -294,7 +294,7 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object)
{
if (object->mText.notNull())
{
- object->mText->setOnHUDAttachment(FALSE);
+ object->mText->setOnHUDAttachment(false);
}
LLViewerObject::const_child_list_t& child_list = object->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
@@ -303,13 +303,13 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object)
LLViewerObject* childp = *iter;
if (childp->mText.notNull())
{
- childp->mText->setOnHUDAttachment(FALSE);
+ childp->mText->setOnHUDAttachment(false);
}
}
}
if (mAttachedObjects.size() == 0)
{
- mUpdateXform = FALSE;
+ mUpdateXform = false;
}
object->setAttachmentItemID(LLUUID::null);
}
@@ -317,7 +317,7 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object)
//-----------------------------------------------------------------------------
// setAttachmentVisibility()
//-----------------------------------------------------------------------------
-void LLViewerJointAttachment::setAttachmentVisibility(BOOL visible)
+void LLViewerJointAttachment::setAttachmentVisibility(bool visible)
{
for (attachedobjs_vec_t::const_iterator iter = mAttachedObjects.begin();
iter != mAttachedObjects.end();
@@ -424,18 +424,18 @@ void LLViewerJointAttachment::calcLOD()
//-----------------------------------------------------------------------------
// updateLOD()
//-----------------------------------------------------------------------------
-BOOL LLViewerJointAttachment::updateLOD(F32 pixel_area, BOOL activate)
+bool LLViewerJointAttachment::updateLOD(F32 pixel_area, bool activate)
{
- BOOL res = FALSE;
+ bool res{ false };
if (!mValid)
{
- setValid(TRUE, TRUE);
- res = TRUE;
+ setValid(true, true);
+ res = true;
}
return res;
}
-BOOL LLViewerJointAttachment::isObjectAttached(const LLViewerObject *viewer_object) const
+bool LLViewerJointAttachment::isObjectAttached(const LLViewerObject *viewer_object) const
{
for (attachedobjs_vec_t::const_iterator iter = mAttachedObjects.begin();
iter != mAttachedObjects.end();
@@ -444,10 +444,10 @@ BOOL LLViewerJointAttachment::isObjectAttached(const LLViewerObject *viewer_obje
const LLViewerObject* attached_object = iter->get();
if (attached_object == viewer_object)
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
const LLViewerObject *LLViewerJointAttachment::getAttachedObject(const LLUUID &object_id) const
@@ -462,7 +462,7 @@ const LLViewerObject *LLViewerJointAttachment::getAttachedObject(const LLUUID &o
return attached_object;
}
}
- return NULL;
+ return nullptr;
}
LLViewerObject *LLViewerJointAttachment::getAttachedObject(const LLUUID &object_id)
@@ -477,5 +477,5 @@ LLViewerObject *LLViewerJointAttachment::getAttachedObject(const LLUUID &object_
return attached_object;
}
}
- return NULL;
+ return nullptr;
}
diff --git a/indra/newview/llviewerjointattachment.h b/indra/newview/llviewerjointattachment.h
index e5edf2c06b..980ac3a7ca 100644
--- a/indra/newview/llviewerjointattachment.h
+++ b/indra/newview/llviewerjointattachment.h
@@ -47,32 +47,30 @@ public:
LLViewerJointAttachment();
virtual ~LLViewerJointAttachment();
- //virtual U32 render( F32 pixelArea ); // Returns triangle count
-
// Returns true if this object is transparent.
// This is used to determine in which order to draw objects.
- /*virtual*/ BOOL isTransparent();
+ bool isTransparent() override;
// Draws the shape attached to a joint.
// Called by render().
- /*virtual*/ U32 drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy );
+ U32 drawShape( F32 pixelArea, bool first_pass, bool is_dummy ) override;
- /*virtual*/ BOOL updateLOD(F32 pixel_area, BOOL activate);
+ bool updateLOD(F32 pixel_area, bool activate) override;
//
// accessors
//
void setPieSlice(S32 pie_slice) { mPieSlice = pie_slice; }
- void setVisibleInFirstPerson(BOOL visibility) { mVisibleInFirst = visibility; }
- BOOL getVisibleInFirstPerson() const { return mVisibleInFirst; }
+ void setVisibleInFirstPerson(bool visibility) { mVisibleInFirst = visibility; }
+ bool getVisibleInFirstPerson() const { return mVisibleInFirst; }
void setGroup(S32 group) { mGroup = group; }
void setOriginalPosition(LLVector3 &position);
- void setAttachmentVisibility(BOOL visible);
- void setIsHUDAttachment(BOOL is_hud) { mIsHUDAttachment = is_hud; }
- BOOL getIsHUDAttachment() const { return mIsHUDAttachment; }
+ void setAttachmentVisibility(bool visible);
+ void setIsHUDAttachment(bool is_hud) { mIsHUDAttachment = is_hud; }
+ bool getIsHUDAttachment() const { return mIsHUDAttachment; }
- BOOL isAnimatable() const { return FALSE; }
+ bool isAnimatable() const override { return false; }
S32 getGroup() const { return mGroup; }
S32 getPieSlice() const { return mPieSlice; }
@@ -84,13 +82,13 @@ public:
//
// unique methods
//
- BOOL addObject(LLViewerObject* object);
+ bool addObject(LLViewerObject* object);
void removeObject(LLViewerObject *object);
//
// attachments operations
//
- BOOL isObjectAttached(const LLViewerObject *viewer_object) const;
+ bool isObjectAttached(const LLViewerObject *viewer_object) const;
const LLViewerObject *getAttachedObject(const LLUUID &object_id) const;
LLViewerObject *getAttachedObject(const LLUUID &object_id);
@@ -103,10 +101,10 @@ protected:
void setupDrawable(LLViewerObject *object);
private:
- BOOL mVisibleInFirst;
+ bool mVisibleInFirst;
LLVector3 mOriginalPos;
S32 mGroup;
- BOOL mIsHUDAttachment;
+ bool mIsHUDAttachment;
S32 mPieSlice;
};
diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp
index 5d46c695b7..4714046248 100644
--- a/indra/newview/llviewerjointmesh.cpp
+++ b/indra/newview/llviewerjointmesh.cpp
@@ -108,7 +108,7 @@ void LLViewerJointMesh::uploadJointMatrices()
S32 joint_num;
LLPolyMesh *reference_mesh = mMesh->getReferenceMesh();
LLDrawPool *poolp = mFace ? mFace->getPool() : NULL;
- BOOL hardware_skinning = (poolp && poolp->getShaderLevel() > 0) ? TRUE : FALSE;
+ bool hardware_skinning = (poolp && poolp->getShaderLevel() > 0);
//calculate joint matrices
for (joint_num = 0; joint_num < reference_mesh->mJointRenderData.size(); joint_num++)
@@ -123,7 +123,7 @@ void LLViewerJointMesh::uploadJointMatrices()
gJointRotUnaligned[joint_num] = joint_mat.getMat3();
}
- BOOL last_pivot_uploaded = FALSE;
+ bool last_pivot_uploaded{ false };
S32 j = 0;
//upload joint pivots
@@ -144,11 +144,11 @@ void LLViewerJointMesh::uploadJointMatrices()
gJointPivot[j++] = child_pivot;
- last_pivot_uploaded = TRUE;
+ last_pivot_uploaded = true;
}
else
{
- last_pivot_uploaded = FALSE;
+ last_pivot_uploaded = false;
}
}
@@ -216,7 +216,7 @@ int compare_int(const void *a, const void *b)
//--------------------------------------------------------------------
// LLViewerJointMesh::drawShape()
//--------------------------------------------------------------------
-U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy)
+U32 LLViewerJointMesh::drawShape( F32 pixelArea, bool first_pass, bool is_dummy)
{
if (!mValid || !mMesh || !mFace || !mVisible ||
!mFace->getVertexBuffer() ||
@@ -346,7 +346,7 @@ void LLViewerJointMesh::updateFaceSizes(U32 &num_vertices, U32& num_indices, F32
// updateFaceData()
//-----------------------------------------------------------------------------
-void LLViewerJointMesh::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind, bool terse_update)
+void LLViewerJointMesh::updateFaceData(LLFace *face, F32 pixel_area, bool damp_wind, bool terse_update)
{
//IF THIS FUNCTION BREAKS, SEE LLPOLYMESH CONSTRUCTOR AND CHECK ALIGNMENT OF INPUT ARRAYS
@@ -358,7 +358,7 @@ void LLViewerJointMesh::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_w
}
LLDrawPool *poolp = mFace->getPool();
- BOOL hardware_skinning = (poolp && poolp->getShaderLevel() > 0) ? TRUE : FALSE;
+ bool hardware_skinning = (poolp && poolp->getShaderLevel() > 0);
if (!hardware_skinning && terse_update)
{ //no need to do terse updates if we're doing software vertex skinning
@@ -436,10 +436,10 @@ void LLViewerJointMesh::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_w
//-----------------------------------------------------------------------------
// updateLOD()
//-----------------------------------------------------------------------------
-BOOL LLViewerJointMesh::updateLOD(F32 pixel_area, BOOL activate)
+bool LLViewerJointMesh::updateLOD(F32 pixel_area, bool activate)
{
- BOOL valid = mValid;
- setValid(activate, TRUE);
+ bool valid = mValid;
+ setValid(activate, true);
return (valid != activate);
}
diff --git a/indra/newview/llviewerjointmesh.h b/indra/newview/llviewerjointmesh.h
index 0db2836e15..1b4fa397ac 100644
--- a/indra/newview/llviewerjointmesh.h
+++ b/indra/newview/llviewerjointmesh.h
@@ -54,19 +54,19 @@ public:
void uploadJointMatrices();
// overloaded from base class
- /*virtual*/ U32 drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy );
+ U32 drawShape( F32 pixelArea, bool first_pass, bool is_dummy ) override;
// necessary because MS's compiler warns on function inheritance via dominance in the diamond inheritance here.
// warns even though LLViewerJoint holds the only non virtual implementation.
- /*virtual*/ U32 render( F32 pixelArea, BOOL first_pass = TRUE, BOOL is_dummy = FALSE ) { return LLViewerJoint::render(pixelArea,first_pass,is_dummy);}
+ U32 render(F32 pixelArea, bool first_pass = true, bool is_dummy = false) override { return LLViewerJoint::render(pixelArea, first_pass, is_dummy); }
- /*virtual*/ void updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pixel_area);
- /*virtual*/ void updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind = FALSE, bool terse_update = false);
- /*virtual*/ BOOL updateLOD(F32 pixel_area, BOOL activate);
- /*virtual*/ void updateJointGeometry();
- /*virtual*/ void dump();
+ void updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pixel_area) override;
+ void updateFaceData(LLFace *face, F32 pixel_area, bool damp_wind = false, bool terse_update = false) override;
+ bool updateLOD(F32 pixel_area, bool activate) override;
+ void updateJointGeometry() override;
+ void dump() override;
- /*virtual*/ BOOL isAnimatable() const { return FALSE; }
+ bool isAnimatable() const override { return false; }
private:
diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp
index e35cb26ce1..a53b8ebd88 100644
--- a/indra/newview/llviewerjoystick.cpp
+++ b/indra/newview/llviewerjoystick.cpp
@@ -234,19 +234,19 @@ void LLViewerJoystick::updateEnabled(bool autoenable)
{
if (mDriverState == JDS_UNINITIALIZED)
{
- gSavedSettings.setBOOL("JoystickEnabled", FALSE );
+ gSavedSettings.setBOOL("JoystickEnabled", false);
}
else
{
// autoenable if user specifically chose this device
if (autoenable && (isLikeSpaceNavigator() || isDeviceUUIDSet()))
{
- gSavedSettings.setBOOL("JoystickEnabled", TRUE );
+ gSavedSettings.setBOOL("JoystickEnabled", true );
}
}
if (!gSavedSettings.getBOOL("JoystickEnabled"))
{
- mOverrideCamera = FALSE;
+ mOverrideCamera = false;
}
}
@@ -254,7 +254,7 @@ void LLViewerJoystick::setOverrideCamera(bool val)
{
if (!gSavedSettings.getBOOL("JoystickEnabled"))
{
- mOverrideCamera = FALSE;
+ mOverrideCamera = false;
}
else
{
@@ -882,7 +882,7 @@ void LLViewerJoystick::moveAvatar(bool reset)
else if (!button_held)
{
button_held = true;
- gAgent.setFlying(FALSE);
+ gAgent.setFlying(false);
}
}
else if (!button_held)
@@ -1414,7 +1414,7 @@ void LLViewerJoystick::setSNDefaults()
#if LL_DARWIN || LL_LINUX
const float platformScale = 20.f;
const float platformScaleAvXZ = 1.f;
- // The SpaceNavigator doesn't act as a 3D cursor on OS X / Linux.
+ // The SpaceNavigator doesn't act as a 3D cursor on macOS / Linux.
const bool is_3d_cursor = false;
#else
const float platformScale = 1.f;
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 02108e861a..f32bbdf3c2 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -79,10 +79,10 @@
#include <boost/bind.hpp> // for SkinFolder listener
#include <boost/signals2.hpp>
-extern BOOL gCubeSnapshot;
+extern bool gCubeSnapshot;
// *TODO: Consider enabling mipmaps (they have been disabled for a long time). Likely has a significant performance impact for tiled/high texture repeat media. Mip generation in a shader may also be an option if necessary.
-constexpr BOOL USE_MIPMAPS = FALSE;
+constexpr bool USE_MIPMAPS = false;
void init_threaded_picker_load_dialog(LLPluginClassMedia* plugin, LLFilePicker::ELoadFilter filter, bool get_multiple)
{
@@ -1661,13 +1661,13 @@ void LLViewerMediaImpl::destroyMediaSource()
LLViewerMediaTexture* oldImage = LLViewerTextureManager::findMediaTexture( mTextureId );
if (oldImage)
{
- oldImage->setPlaying(FALSE) ;
+ oldImage->setPlaying(false) ;
}
cancelMimeTypeProbe();
{
- LLMutexLock lock(&mLock); // Delay tear-down while bg thread is updating
+ LLCoros::LockType lock(mLock); // Delay tear-down while bg thread is updating
if(mMediaSource)
{
mMediaSource->setDeleteOK(true) ;
@@ -2337,7 +2337,7 @@ void LLViewerMediaImpl::onMouseCaptureLost()
}
//////////////////////////////////////////////////////////////////////////////////////////
-BOOL LLViewerMediaImpl::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLViewerMediaImpl::handleMouseUp(S32 x, S32 y, MASK mask)
{
// NOTE: this is called when the mouse is released when we have capture.
// Due to the way mouse coordinates are mapped to the object, we can't use the x and y coordinates that come in with the event.
@@ -2345,10 +2345,10 @@ BOOL LLViewerMediaImpl::handleMouseUp(S32 x, S32 y, MASK mask)
if(hasMouseCapture())
{
// Release the mouse -- this will also send a mouseup to the media
- gFocusMgr.setMouseCapture( FALSE );
+ gFocusMgr.setMouseCapture( nullptr );
}
- return TRUE;
+ return true;
}
//////////////////////////////////////////////////////////////////////////////////////////
@@ -2757,7 +2757,7 @@ bool LLViewerMediaImpl::handleUnicodeCharHere(llwchar uni_char)
{
LLSD native_key_data = gViewerWindow->getWindow()->getNativeKeyData();
- mMediaSource->textInput(wstring_to_utf8str(LLWString(1, uni_char)), gKeyboard->currentMask(FALSE), native_key_data);
+ mMediaSource->textInput(wstring_to_utf8str(LLWString(1, uni_char)), gKeyboard->currentMask(false), native_key_data);
}
}
@@ -2767,7 +2767,7 @@ bool LLViewerMediaImpl::handleUnicodeCharHere(llwchar uni_char)
//////////////////////////////////////////////////////////////////////////////////////////
bool LLViewerMediaImpl::canNavigateForward()
{
- BOOL result = FALSE;
+ bool result = false;
if (mMediaSource)
{
result = mMediaSource->getHistoryForwardAvailable();
@@ -2778,7 +2778,7 @@ bool LLViewerMediaImpl::canNavigateForward()
//////////////////////////////////////////////////////////////////////////////////////////
bool LLViewerMediaImpl::canNavigateBack()
{
- BOOL result = FALSE;
+ bool result = false;
if (mMediaSource)
{
result = mMediaSource->getHistoryBackAvailable();
@@ -2933,7 +2933,7 @@ bool LLViewerMediaImpl::preMediaTexUpdate(LLViewerMediaTexture*& media_tex, U8*&
//S32 media_depth = mMediaSource->getTextureDepth();
// Since we're updating this texture, we know it's playing. Tell the texture to do its replacement magic so it gets rendered.
- media_tex->setPlaying(TRUE);
+ media_tex->setPlaying(true);
if (mMediaSource->getDirty(&dirty_rect))
{
@@ -2968,7 +2968,7 @@ bool LLViewerMediaImpl::preMediaTexUpdate(LLViewerMediaTexture*& media_tex, U8*&
void LLViewerMediaImpl::doMediaTexUpdate(LLViewerMediaTexture* media_tex, U8* data, S32 data_width, S32 data_height, S32 x_pos, S32 y_pos, S32 width, S32 height, bool sync)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_MEDIA;
- LLMutexLock lock(&mLock); // don't allow media source tear-down during update
+ LLCoros::LockType lock(mLock); // don't allow media source tear-down during update
// wrap "data" in an LLImageRaw but do NOT make a copy
LLPointer<LLImageRaw> raw = new LLImageRaw(data, media_tex->getWidth(), media_tex->getHeight(), media_tex->getComponents(), true);
@@ -2980,7 +2980,7 @@ void LLViewerMediaImpl::doMediaTexUpdate(LLViewerMediaTexture* media_tex, U8* da
// -Cosmic,2023-04-04
// Allocate GL texture based on LLImageRaw but do NOT copy to GL
LLGLuint tex_name = 0;
- media_tex->createGLTexture(0, raw, 0, TRUE, LLGLTexture::OTHER, true, &tex_name);
+ media_tex->createGLTexture(0, raw, 0, true, LLGLTexture::OTHER, true, &tex_name);
// copy just the subimage covered by the image raw to GL
media_tex->setSubImage(data, data_width, data_height, x_pos, y_pos, width, height, tex_name);
@@ -3498,13 +3498,13 @@ LLViewerMediaImpl::cut()
////////////////////////////////////////////////////////////////////////////////
// virtual
-BOOL
+bool
LLViewerMediaImpl::canCut() const
{
if (mMediaSource)
return mMediaSource->canCut();
else
- return FALSE;
+ return false;
}
////////////////////////////////////////////////////////////////////////////////
@@ -3518,13 +3518,13 @@ LLViewerMediaImpl::copy()
////////////////////////////////////////////////////////////////////////////////
// virtual
-BOOL
+bool
LLViewerMediaImpl::canCopy() const
{
if (mMediaSource)
return mMediaSource->canCopy();
else
- return FALSE;
+ return false;
}
////////////////////////////////////////////////////////////////////////////////
@@ -3538,21 +3538,21 @@ LLViewerMediaImpl::paste()
////////////////////////////////////////////////////////////////////////////////
// virtual
-BOOL
+bool
LLViewerMediaImpl::canPaste() const
{
if (mMediaSource)
return mMediaSource->canPaste();
else
- return FALSE;
+ return false;
}
-void LLViewerMediaImpl::setUpdated(BOOL updated)
+void LLViewerMediaImpl::setUpdated(bool updated)
{
mIsUpdated = updated ;
}
-BOOL LLViewerMediaImpl::isUpdated()
+bool LLViewerMediaImpl::isUpdated()
{
return mIsUpdated ;
}
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index 03899b6b8f..3e9513f3cd 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -182,7 +182,7 @@ private:
// Implementation functions not exported into header file
class LLViewerMediaImpl
- : public LLMouseHandler, public LLRefCount, public LLPluginClassMediaOwner, public LLViewerMediaEventEmitter, public LLEditMenuHandler
+ : public LLMouseHandler, public LLThreadSafeRefCount, public LLPluginClassMediaOwner, public LLViewerMediaEventEmitter, public LLEditMenuHandler
{
LOG_CLASS(LLViewerMediaImpl);
public:
@@ -317,45 +317,45 @@ public:
// need these to handle mouseup...
/*virtual*/ void onMouseCaptureLost();
- /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
+ /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask);
// Grr... the only thing I want as an LLMouseHandler are the onMouseCaptureLost and handleMouseUp calls.
// Sadly, these are all pure virtual, so I have to supply implementations here:
- /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask) { return FALSE; };
- /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask) { return FALSE; };
- /*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks) { return FALSE; };
- /*virtual*/ BOOL handleScrollHWheel(S32 x, S32 y, S32 clicks) { return FALSE; };
- /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask) { return FALSE; };
- /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask) { return FALSE; };
- /*virtual*/ BOOL handleRightMouseUp(S32 x, S32 y, MASK mask) { return FALSE; };
- /*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask) { return FALSE; };
- /*virtual*/ BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask) { return FALSE; };
- /*virtual*/ BOOL handleMiddleMouseUp(S32 x, S32 y, MASK mask) {return FALSE; };
+ /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask) { return false; };
+ /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask) { return false; };
+ /*virtual*/ bool handleScrollWheel(S32 x, S32 y, S32 clicks) { return false; };
+ /*virtual*/ bool handleScrollHWheel(S32 x, S32 y, S32 clicks) { return false; };
+ /*virtual*/ bool handleDoubleClick(S32 x, S32 y, MASK mask) { return false; };
+ /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask) { return false; };
+ /*virtual*/ bool handleRightMouseUp(S32 x, S32 y, MASK mask) { return false; };
+ /*virtual*/ bool handleToolTip(S32 x, S32 y, MASK mask) { return false; };
+ /*virtual*/ bool handleMiddleMouseDown(S32 x, S32 y, MASK mask) { return false; };
+ /*virtual*/ bool handleMiddleMouseUp(S32 x, S32 y, MASK mask) {return false; };
/*virtual*/ const std::string& getName() const;
/*virtual*/ void screenPointToLocal(S32 screen_x, S32 screen_y, S32* local_x, S32* local_y) const {};
/*virtual*/ void localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const {};
- /*virtual*/ BOOL hasMouseCapture() { return gFocusMgr.getMouseCapture() == this; };
+ /*virtual*/ bool hasMouseCapture() { return gFocusMgr.getMouseCapture() == this; };
// Inherited from LLPluginClassMediaOwner
/*virtual*/ void handleMediaEvent(LLPluginClassMedia* plugin, LLPluginClassMediaOwner::EMediaEvent);
// LLEditMenuHandler overrides
/*virtual*/ void cut();
- /*virtual*/ BOOL canCut() const;
+ /*virtual*/ bool canCut() const;
/*virtual*/ void copy();
- /*virtual*/ BOOL canCopy() const;
+ /*virtual*/ bool canCopy() const;
/*virtual*/ void paste();
- /*virtual*/ BOOL canPaste() const;
+ /*virtual*/ bool canPaste() const;
void addObject(LLVOVolume* obj) ;
void removeObject(LLVOVolume* obj) ;
const std::list< LLVOVolume* >* getObjectList() const ;
LLVOVolume *getSomeObject();
- void setUpdated(BOOL updated) ;
- BOOL isUpdated() ;
+ void setUpdated(bool updated) ;
+ bool isUpdated() ;
// updates the javascript object in the embedded browser with viewer values
void updateJavascriptObject();
@@ -432,7 +432,7 @@ private:
private:
// a single media url with some data and an impl.
std::shared_ptr<LLPluginClassMedia> mMediaSource;
- LLMutex mLock;
+ LLCoros::Mutex mLock;
F64 mZoomFactor;
LLUUID mTextureId;
bool mMovieImageHasMips;
@@ -488,7 +488,7 @@ private:
static std::vector<std::string> sMimeTypesFailed;
LLPointer<LLImageRaw> mRawImage; //backing buffer for texture updates
private:
- BOOL mIsUpdated ;
+ bool mIsUpdated ;
std::list< LLVOVolume* > mObjectList ;
void mimeDiscoveryCoro(std::string url);
diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp
index e914e2121c..bd309a340e 100644
--- a/indra/newview/llviewermediafocus.cpp
+++ b/indra/newview/llviewermediafocus.cpp
@@ -125,7 +125,7 @@ void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 fac
if(mMediaControls.get())
{
- if(face_auto_zoom && ! parcel->getMediaPreventCameraZoom())
+ if(face_auto_zoom && !static_cast<bool>(parcel->getMediaPreventCameraZoom()))
{
// Zoom in on this face
mMediaControls.get()->resetZoomLevel(false);
@@ -211,7 +211,7 @@ LLVector3d LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 n
LLVector3d camera_pos;
if (object)
{
- gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE);
+ gAgentCamera.setFocusOnAvatar(false, ANIMATE);
LLBBox bbox = object->getBoundingBoxAgent();
LLVector3d center = gAgent.getPosGlobalFromAgent(bbox.getCenterAgent());
@@ -298,7 +298,7 @@ LLVector3d LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 n
else
{
// If we have no object, focus back on the avatar.
- gAgentCamera.setFocusOnAvatar(TRUE, ANIMATE);
+ gAgentCamera.setFocusOnAvatar(true, ANIMATE);
}
return camera_pos;
}
@@ -321,7 +321,7 @@ void LLViewerMediaFocus::onFocusLost()
LLFocusableElement::onFocusLost();
}
-BOOL LLViewerMediaFocus::handleKey(KEY key, MASK mask, BOOL called_from_parent)
+bool LLViewerMediaFocus::handleKey(KEY key, MASK mask, bool called_from_parent)
{
LLViewerMediaImpl* media_impl = getFocusedMediaImpl();
if(media_impl)
@@ -346,7 +346,7 @@ BOOL LLViewerMediaFocus::handleKey(KEY key, MASK mask, BOOL called_from_parent)
return true;
}
-BOOL LLViewerMediaFocus::handleKeyUp(KEY key, MASK mask, BOOL called_from_parent)
+bool LLViewerMediaFocus::handleKeyUp(KEY key, MASK mask, bool called_from_parent)
{
LLViewerMediaImpl* media_impl = getFocusedMediaImpl();
if (media_impl)
@@ -358,7 +358,7 @@ BOOL LLViewerMediaFocus::handleKeyUp(KEY key, MASK mask, BOOL called_from_parent
-BOOL LLViewerMediaFocus::handleUnicodeChar(llwchar uni_char, BOOL called_from_parent)
+bool LLViewerMediaFocus::handleUnicodeChar(llwchar uni_char, bool called_from_parent)
{
LLViewerMediaImpl* media_impl = getFocusedMediaImpl();
if(media_impl)
@@ -366,26 +366,26 @@ BOOL LLViewerMediaFocus::handleUnicodeChar(llwchar uni_char, BOOL called_from_pa
return true;
}
-BOOL LLViewerMediaFocus::handleScrollWheel(const LLVector2& texture_coords, S32 clicks_x, S32 clicks_y)
+bool LLViewerMediaFocus::handleScrollWheel(const LLVector2& texture_coords, S32 clicks_x, S32 clicks_y)
{
- BOOL retval = FALSE;
+ bool retval = false;
LLViewerMediaImpl* media_impl = getFocusedMediaImpl();
if (media_impl && media_impl->hasMedia())
{
- media_impl->scrollWheel(texture_coords, clicks_x, clicks_y, gKeyboard->currentMask(TRUE));
- retval = TRUE;
+ media_impl->scrollWheel(texture_coords, clicks_x, clicks_y, gKeyboard->currentMask(true));
+ retval = true;
}
return retval;
}
-BOOL LLViewerMediaFocus::handleScrollWheel(S32 x, S32 y, S32 clicks_x, S32 clicks_y)
+bool LLViewerMediaFocus::handleScrollWheel(S32 x, S32 y, S32 clicks_x, S32 clicks_y)
{
- BOOL retval = FALSE;
+ bool retval = false;
LLViewerMediaImpl* media_impl = getFocusedMediaImpl();
if(media_impl && media_impl->hasMedia())
{
- media_impl->scrollWheel(x, y, clicks_x, clicks_y, gKeyboard->currentMask(TRUE));
- retval = TRUE;
+ media_impl->scrollWheel(x, y, clicks_x, clicks_y, gKeyboard->currentMask(true));
+ retval = true;
}
return retval;
}
diff --git a/indra/newview/llviewermediafocus.h b/indra/newview/llviewermediafocus.h
index 2310e4dbfc..08774c2c98 100644
--- a/indra/newview/llviewermediafocus.h
+++ b/indra/newview/llviewermediafocus.h
@@ -55,11 +55,11 @@ public:
void clearHover();
bool getFocus();
- /*virtual*/ BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent) override;
- /*virtual*/ BOOL handleKeyUp(KEY key, MASK mask, BOOL called_from_parent) override;
- /*virtual*/ BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent) override;
- BOOL handleScrollWheel(const LLVector2& texture_coords, S32 clicks_x, S32 clicks_y);
- BOOL handleScrollWheel(S32 x, S32 y, S32 clicks_x, S32 clicks_y);
+ /*virtual*/ bool handleKey(KEY key, MASK mask, bool called_from_parent) override;
+ /*virtual*/ bool handleKeyUp(KEY key, MASK mask, bool called_from_parent) override;
+ /*virtual*/ bool handleUnicodeChar(llwchar uni_char, bool called_from_parent) override;
+ bool handleScrollWheel(const LLVector2& texture_coords, S32 clicks_x, S32 clicks_y);
+ bool handleScrollWheel(S32 x, S32 y, S32 clicks_x, S32 clicks_y);
void update();
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 625d32f59d..33bfbe4134 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -141,6 +141,7 @@
#include <boost/algorithm/string.hpp>
#include "llcleanup.h"
#include "llviewershadermgr.h"
+#include "gltfscenemanager.h"
using namespace LLAvatarAppearanceDefines;
@@ -148,8 +149,8 @@ typedef LLPointer<LLViewerObject> LLViewerObjectPtr;
static boost::unordered_map<std::string, LLStringExplicit> sDefaultItemLabels;
-BOOL enable_land_build(void*);
-BOOL enable_object_build(void*);
+bool enable_land_build(void*);
+bool enable_object_build(void*);
LLVOAvatar* find_avatar_from_object( LLViewerObject* object );
LLVOAvatar* find_avatar_from_object( const LLUUID& object_id );
@@ -159,15 +160,15 @@ void handle_test_load_url(void*);
//
// Evil hackish imported globals
-//extern BOOL gHideSelectedObjects;
-//extern BOOL gAllowSelectAvatar;
-//extern BOOL gDebugAvatarRotation;
-extern BOOL gDebugClicks;
-extern BOOL gDebugWindowProc;
-extern BOOL gShaderProfileFrame;
+//extern bool gHideSelectedObjects;
+//extern bool gAllowSelectAvatar;
+//extern bool gDebugAvatarRotation;
+extern bool gDebugClicks;
+extern bool gDebugWindowProc;
+extern bool gShaderProfileFrame;
-//extern BOOL gDebugTextEditorTips;
-//extern BOOL gDebugSelectMgr;
+//extern bool gDebugTextEditorTips;
+//extern bool gDebugSelectMgr;
//
// Globals
@@ -222,24 +223,25 @@ void handle_region_dump_temp_asset_data(void*);
void handle_region_clear_temp_asset_data(void*);
// Object pie menu
-BOOL sitting_on_selection();
+bool sitting_on_selection();
void near_sit_object();
//void label_sit_or_stand(std::string& label, void*);
// buy and take alias into the same UI positions, so these
// declarations handle this mess.
-BOOL is_selection_buy_not_take();
+bool is_selection_buy_not_take();
S32 selection_price();
-BOOL enable_take();
+bool enable_take();
void handle_object_show_inspector();
void handle_avatar_show_inspector();
bool confirm_take(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle selection_handle);
+bool confirm_take_separate(const LLSD &notification, const LLSD &response, LLObjectSelectionHandle selection_handle);
void handle_buy_object(LLSaleInfo sale_info);
void handle_buy_contents(LLSaleInfo sale_info);
// Land pie menu
-void near_sit_down_point(BOOL success, void *);
+void near_sit_down_point(bool success, void *);
// Avatar pie menu
@@ -249,16 +251,16 @@ void near_sit_down_point(BOOL success, void *);
void velocity_interpolate( void* );
void handle_visual_leak_detector_toggle(void*);
void handle_rebake_textures(void*);
-BOOL check_admin_override(void*);
+bool check_admin_override(void*);
void handle_admin_override_toggle(void*);
#ifdef TOGGLE_HACKED_GODLIKE_VIEWER
void handle_toggle_hacked_godmode(void*);
-BOOL check_toggle_hacked_godmode(void*);
+bool check_toggle_hacked_godmode(void*);
bool enable_toggle_hacked_godmode(void*);
#endif
void toggle_show_xui_names(void *);
-BOOL check_show_xui_names(void *);
+bool check_show_xui_names(void *);
// Debug UI
@@ -308,7 +310,7 @@ void dump_select_mgr(void*);
void dump_inventory(void*);
void toggle_visibility(void*);
-BOOL get_visibility(void*);
+bool get_visibility(void*);
// Avatar Pie menu
void request_friendship(const LLUUID& agent_id);
@@ -321,7 +323,7 @@ void handle_dump_followcam(void*);
void handle_viewer_enable_message_log(void*);
void handle_viewer_disable_message_log(void*);
-BOOL enable_buy_land(void*);
+bool enable_buy_land(void*);
// Help menu
@@ -331,13 +333,13 @@ void handle_dump_attachments(void *);
void handle_dump_avatar_local_textures(void*);
void handle_debug_avatar_textures(void*);
void handle_grab_baked_texture(void*);
-BOOL enable_grab_baked_texture(void*);
+bool enable_grab_baked_texture(void*);
void handle_dump_region_object_cache(void*);
void handle_reset_interest_lists(void *);
-BOOL enable_save_into_task_inventory(void*);
+bool enable_save_into_task_inventory(void*);
-BOOL enable_detach(const LLSD& = LLSD());
+bool enable_detach(const LLSD& = LLSD());
void menu_toggle_attached_lights(void* user_data);
void menu_toggle_attached_particles(void* user_data);
@@ -377,7 +379,7 @@ void LLMenuParcelObserver::changed()
child = gMenuLand->findChild<LLView>("Land Buy");
if (child)
{
- BOOL buyable = enable_buy_land(NULL);
+ bool buyable = enable_buy_land(NULL);
child->setEnabled(buyable);
}
}
@@ -401,7 +403,7 @@ void initialize_menus();
void set_merchant_SLM_menu()
{
// All other cases (new merchant, not merchant, migrated merchant): show the new Marketplace Listings menu and enable the tool
- gMenuHolder->getChild<LLView>("MarketplaceListings")->setVisible(TRUE);
+ gMenuHolder->getChild<LLView>("MarketplaceListings")->setVisible(true);
LLCommand* command = LLCommandManager::instance().getCommand("marketplacelistings");
gToolBarView->enableCommand(command->id(), true);
@@ -426,7 +428,7 @@ void check_merchant_status(bool force)
LLMarketplaceData::instance().setSLMStatus(MarketplaceStatusCodes::MARKET_PLACE_NOT_INITIALIZED);
}
// Hide SLM related menu item
- gMenuHolder->getChild<LLView>("MarketplaceListings")->setVisible(FALSE);
+ gMenuHolder->getChild<LLView>("MarketplaceListings")->setVisible(false);
// Also disable the toolbar button for Marketplace Listings
LLCommand* command = LLCommandManager::instance().getCommand("marketplacelistings");
@@ -528,24 +530,22 @@ void init_menus()
LLGridManager::getInstance()->isInProductionGrid());
// *TODO:Also fix cost in llfolderview.cpp for Inventory menus
- const std::string texture_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost());
const std::string sound_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getSoundUploadCost());
const std::string animation_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getAnimationUploadCost());
- gMenuHolder->childSetLabelArg("Upload Image", "[COST]", texture_upload_cost_str);
gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", sound_upload_cost_str);
gMenuHolder->childSetLabelArg("Upload Animation", "[COST]", animation_upload_cost_str);
- gAttachSubMenu = gMenuBarView->findChildMenuByName("Attach Object", TRUE);
- gDetachSubMenu = gMenuBarView->findChildMenuByName("Detach Object", TRUE);
+ gAttachSubMenu = gMenuBarView->findChildMenuByName("Attach Object", true);
+ gDetachSubMenu = gMenuBarView->findChildMenuByName("Detach Object", true);
gDetachAvatarMenu = gMenuHolder->getChild<LLMenuGL>("Avatar Detach", true);
gDetachHUDAvatarMenu = gMenuHolder->getChild<LLMenuGL>("Avatar Detach HUD", true);
// Don't display the Memory console menu if the feature is turned off
- LLMenuItemCheckGL *memoryMenu = gMenuBarView->getChild<LLMenuItemCheckGL>("Memory", TRUE);
+ LLMenuItemCheckGL *memoryMenu = gMenuBarView->getChild<LLMenuItemCheckGL>("Memory", true);
if (memoryMenu)
{
- memoryMenu->setVisible(FALSE);
+ memoryMenu->setVisible(false);
}
gMenuBarView->createJumpKeys();
@@ -640,7 +640,7 @@ class LLAdvancedDumpInfoToConsole : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- gDebugView->mDebugConsolep->setVisible(TRUE);
+ gDebugView->mDebugConsolep->setVisible(true);
std::string info_type = userdata.asString();
if ("region" == info_type)
{
@@ -742,10 +742,30 @@ U32 render_type_from_string(std::string render_type)
{
return LLPipeline::RENDER_TYPE_SIMPLE;
}
+ if ("materials" == render_type)
+ {
+ return LLPipeline::RENDER_TYPE_MATERIALS;
+ }
else if ("alpha" == render_type)
{
return LLPipeline::RENDER_TYPE_ALPHA;
}
+ else if ("alpha_mask" == render_type)
+ {
+ return LLPipeline::RENDER_TYPE_ALPHA_MASK;
+ }
+ else if ("fullbright_alpha_mask" == render_type)
+ {
+ return LLPipeline::RENDER_TYPE_FULLBRIGHT_ALPHA_MASK;
+ }
+ else if ("fullbright" == render_type)
+ {
+ return LLPipeline::RENDER_TYPE_FULLBRIGHT;
+ }
+ else if ("glow" == render_type)
+ {
+ return LLPipeline::RENDER_TYPE_GLOW;
+ }
else if ("tree" == render_type)
{
return LLPipeline::RENDER_TYPE_TREE;
@@ -937,7 +957,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t
std::string mode = userdata.asString();
if (mode == "none")
{
- if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == TRUE)
+ if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == true)
{
gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY);
}
@@ -945,7 +965,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t
}
else if (mode == "current")
{
- if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == FALSE)
+ if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == false)
{
gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY);
}
@@ -953,7 +973,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t
}
else if (mode == "desired")
{
- if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == FALSE)
+ if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == false)
{
gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY);
}
@@ -962,7 +982,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t
}
else if (mode == "full")
{
- if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == FALSE)
+ if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == false)
{
gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY);
}
@@ -998,6 +1018,10 @@ U64 info_display_from_string(std::string info_display)
{
return LLPipeline::RENDER_DEBUG_OCTREE;
}
+ else if ("nodes" == info_display)
+ {
+ return LLPipeline::RENDER_DEBUG_NODES;
+ }
else if ("shadow frusta" == info_display)
{
return LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA;
@@ -1264,13 +1288,13 @@ public:
bool handleEvent(const LLSD &userdata)
{
// Toggle the mode - regions will get updated
- if (gAgent.getInterestListMode() == LLViewerRegion::IL_MODE_360)
+ if (gAgent.getInterestListMode() == IL_MODE_360)
{
- gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_DEFAULT);
+ gAgent.changeInterestListMode(IL_MODE_DEFAULT);
}
else
{
- gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_360);
+ gAgent.changeInterestListMode(IL_MODE_360);
}
return true;
}
@@ -1280,7 +1304,7 @@ class LLAdvancedCheckInterestList360Mode : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- return (gAgent.getInterestListMode() == LLViewerRegion::IL_MODE_360);
+ return (gAgent.getInterestListMode() == IL_MODE_360);
}
};
@@ -2174,6 +2198,20 @@ class LLAdvancedPurgeShaderCache : public view_listener_t
}
};
+/////////////////////
+// REBUILD TERRAIN //
+/////////////////////
+
+
+class LLAdvancedRebuildTerrain : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ gPipeline.rebuildTerrain();
+ return true;
+ }
+};
+
////////////////////
// EVENT Recorder //
///////////////////
@@ -2983,7 +3021,7 @@ class LLObjectBuild : public view_listener_t
if (gAgentCamera.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit() && gSavedSettings.getBOOL("EditCameraMovement") )
{
// zoom in if we're looking at the avatar
- gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE);
+ gAgentCamera.setFocusOnAvatar(false, ANIMATE);
gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick());
gAgentCamera.cameraZoomIn(0.666f);
gAgentCamera.cameraOrbitOver( 30.f * DEG_TO_RAD );
@@ -3018,11 +3056,11 @@ void update_camera()
// always freeze camera in space, even if camera doesn't move
// so, for example, follow cam scripts can't affect you when in build mode
gAgentCamera.setFocusGlobal(gAgentCamera.calcFocusPositionTargetGlobal(), LLUUID::null);
- gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE);
+ gAgentCamera.setFocusOnAvatar(false, ANIMATE);
}
else
{
- gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE);
+ gAgentCamera.setFocusOnAvatar(false, ANIMATE);
LLViewerObject* selected_objectp = selection->getFirstRootObject();
if (selected_objectp)
{
@@ -3099,7 +3137,7 @@ void handle_attachment_touch(const LLUUID& inv_item_id)
{
bool apply(LLSelectNode* node)
{
- node->setTransient(TRUE);
+ node->setTransient(true);
return true;
}
} f;
@@ -3148,7 +3186,7 @@ class LLLandBuild : public view_listener_t
if (gAgentCamera.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit() && gSavedSettings.getBOOL("EditCameraMovement") )
{
// zoom in if we're looking at the avatar
- gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE);
+ gAgentCamera.setFocusOnAvatar(false, ANIMATE);
gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick());
gAgentCamera.cameraZoomIn(0.666f);
gAgentCamera.cameraOrbitOver( 30.f * DEG_TO_RAD );
@@ -3175,7 +3213,7 @@ class LLLandBuyPass : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- LLPanelLandGeneral::onClickBuyPass((void *)FALSE);
+ LLPanelLandGeneral::onClickBuyPass((void *)false);
return true;
}
};
@@ -3190,12 +3228,12 @@ class LLLandEnableBuyPass : public view_listener_t
};
// BUG: Should really check if CLICK POINT is in a parcel where you can build.
-BOOL enable_land_build(void*)
+bool enable_land_build(void*)
{
- if (gAgent.isGodlike()) return TRUE;
- if (gAgent.inPrelude()) return FALSE;
+ if (gAgent.isGodlike()) return true;
+ if (gAgent.inPrelude()) return false;
- BOOL can_build = FALSE;
+ bool can_build = false;
LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if (agent_parcel)
{
@@ -3205,12 +3243,12 @@ BOOL enable_land_build(void*)
}
// BUG: Should really check if OBJECT is in a parcel where you can build.
-BOOL enable_object_build(void*)
+bool enable_object_build(void*)
{
- if (gAgent.isGodlike()) return TRUE;
- if (gAgent.inPrelude()) return FALSE;
+ if (gAgent.isGodlike()) return true;
+ if (gAgent.inPrelude()) return false;
- BOOL can_build = FALSE;
+ bool can_build = false;
LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if (agent_parcel)
{
@@ -3311,10 +3349,10 @@ class LLSelfEnableRemoveAllAttachments : public view_listener_t
}
};
-BOOL enable_has_attachments(void*)
+bool enable_has_attachments(void*)
{
- return FALSE;
+ return false;
}
//---------------------------------------------------------------------------
@@ -3451,7 +3489,7 @@ class LLObjectMute : public view_listener_t
LLVOAvatar* avatar = find_avatar_from_object(object);
if (avatar)
{
- avatar->mNeedsImpostorUpdate = TRUE;
+ avatar->mNeedsImpostorUpdate = true;
avatar->mLastImpostorUpdateReason = 9;
id = avatar->getID();
@@ -3518,7 +3556,7 @@ bool handle_go_to()
else
{
// Snap camera back to behind avatar
- gAgentCamera.setFocusOnAvatar(TRUE, ANIMATE);
+ gAgentCamera.setFocusOnAvatar(true, ANIMATE);
}
// Could be first use
@@ -3893,7 +3931,7 @@ void handle_buy_object(LLSaleInfo sale_info)
LLUUID owner_id;
std::string owner_name;
- BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name);
+ bool owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name);
if (!owners_identical)
{
LLNotificationsUtil::add("CannotBuyObjectsFromDifferentOwners");
@@ -3901,7 +3939,7 @@ void handle_buy_object(LLSaleInfo sale_info)
}
LLPermissions perm;
- BOOL valid = LLSelectMgr::getInstance()->selectGetPermissions(perm);
+ bool valid = LLSelectMgr::getInstance()->selectGetPermissions(perm);
LLAggregatePermissions ag_perm;
valid &= LLSelectMgr::getInstance()->selectGetAggregatePermissions(ag_perm);
if(!valid || !sale_info.isForSale() || !perm.allowTransferTo(gAgent.getID()))
@@ -4117,7 +4155,7 @@ class LLTogglePanelPeopleTab : public view_listener_t
}
};
-BOOL check_admin_override(void*)
+bool check_admin_override(void*)
{
return gAgent.getAdminOverride();
}
@@ -4217,7 +4255,7 @@ void handle_toggle_hacked_godmode(void*)
set_god_level(gHackGodmode ? GOD_MAINTENANCE : GOD_NOT);
}
-BOOL check_toggle_hacked_godmode(void*)
+bool check_toggle_hacked_godmode(void*)
{
return gHackGodmode;
}
@@ -4254,15 +4292,15 @@ public:
virtual ~LLHaveCallingcard() {}
virtual bool operator()(LLInventoryCategory* cat,
LLInventoryItem* item);
- BOOL isThere() const { return mIsThere;}
+ bool isThere() const { return mIsThere;}
protected:
LLUUID mID;
- BOOL mIsThere;
+ bool mIsThere;
};
LLHaveCallingcard::LLHaveCallingcard(const LLUUID& agent_id) :
mID(agent_id),
- mIsThere(FALSE)
+ mIsThere(false)
{
}
@@ -4274,14 +4312,14 @@ bool LLHaveCallingcard::operator()(LLInventoryCategory* cat,
if((item->getType() == LLAssetType::AT_CALLINGCARD)
&& (item->getCreatorUUID() == mID))
{
- mIsThere = TRUE;
+ mIsThere = true;
}
}
- return FALSE;
+ return false;
}
*/
-BOOL is_agent_mappable(const LLUUID& agent_id)
+bool is_agent_mappable(const LLUUID& agent_id)
{
const LLRelationship* buddy_info = NULL;
bool is_friend = LLAvatarActions::isFriend(agent_id);
@@ -4362,7 +4400,7 @@ class LLEnableEditPhysics : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
//return gAgentWearables.isWearableModifiable(LLWearableType::WT_SHAPE, 0);
- return TRUE;
+ return true;
}
};
@@ -4430,11 +4468,11 @@ void handle_object_sit(const LLUUID& object_id)
handle_object_sit(obj, offset);
}
-void near_sit_down_point(BOOL success, void *)
+void near_sit_down_point(bool success, void *)
{
if (success)
{
- gAgent.setFlying(FALSE);
+ gAgent.setFlying(false);
gAgent.clearControlFlags(AGENT_CONTROL_STAND_UP); // might have been set by autopilot
gAgent.setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
}
@@ -4480,7 +4518,7 @@ class LLLandCanSit : public view_listener_t
//
// Major mode switching
//
-void reset_view_final( BOOL proceed );
+void reset_view_final( bool proceed );
void handle_reset_view()
{
@@ -4489,8 +4527,8 @@ void handle_reset_view()
// switching to outfit selector should automagically save any currently edited wearable
LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "my_outfits"));
}
- gAgentCamera.setFocusOnAvatar(TRUE, FALSE, FALSE);
- reset_view_final( TRUE );
+ gAgentCamera.setFocusOnAvatar(true, false, false);
+ reset_view_final( true );
LLFloaterCamera::resetCameraMode();
}
@@ -4504,14 +4542,14 @@ class LLViewResetView : public view_listener_t
};
// Note: extra parameters allow this function to be called from dialog.
-void reset_view_final( BOOL proceed )
+void reset_view_final( bool proceed )
{
if( !proceed )
{
return;
}
- gAgentCamera.resetView(TRUE, TRUE);
+ gAgentCamera.resetView(true, true);
gAgentCamera.setLookAt(LOOKAT_TARGET_CLEAR);
}
@@ -4545,7 +4583,7 @@ class LLViewDefaultUISize : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
gSavedSettings.setF32("UIScaleFactor", 1.0f);
- gSavedSettings.setBOOL("UIAutoScale", FALSE);
+ gSavedSettings.setBOOL("UIAutoScale", false);
gViewerWindow->reshape(gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw());
return true;
}
@@ -4597,7 +4635,7 @@ void handle_duplicate_in_place(void*)
LL_INFOS() << "handle_duplicate_in_place" << LL_ENDL;
LLVector3 offset(0.f, 0.f, 0.f);
- LLSelectMgr::getInstance()->selectDuplicate(offset, TRUE);
+ LLSelectMgr::getInstance()->selectDuplicate(offset, true);
}
@@ -4645,8 +4683,8 @@ void handle_object_owner_permissive(void*)
if(gAgent.isGodlike())
{
// do the objects.
- LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_BASE, TRUE, PERM_ALL, TRUE);
- LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_OWNER, TRUE, PERM_ALL, TRUE);
+ LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_BASE, true, PERM_ALL, true);
+ LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_OWNER, true, PERM_ALL, true);
}
}
@@ -4655,14 +4693,14 @@ void handle_object_owner_self(void*)
// only send this if they're a god.
if(gAgent.isGodlike())
{
- LLSelectMgr::getInstance()->sendOwner(gAgent.getID(), gAgent.getGroupID(), TRUE);
+ LLSelectMgr::getInstance()->sendOwner(gAgent.getID(), gAgent.getGroupID(), true);
}
}
// Shortcut to set owner permissions to not editable.
void handle_object_lock(void*)
{
- LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_OWNER, FALSE, PERM_MODIFY);
+ LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_OWNER, false, PERM_MODIFY);
}
void handle_object_asset_ids(void*)
@@ -4787,11 +4825,11 @@ static bool get_derezzable_objects(
LL_WARNS() << "Attempt to derez deprecated AssetContainer object type not supported." << LL_ENDL;
/*
object->requestInventory(container_inventory_arrived,
- (void *)(BOOL)(DRD_TAKE_INTO_AGENT_INVENTORY == dest));
+ (void *)(bool)(DRD_TAKE_INTO_AGENT_INVENTORY == dest));
*/
continue;
}
- BOOL can_derez_current = FALSE;
+ bool can_derez_current = false;
switch(dest)
{
case DRD_TAKE_INTO_AGENT_INVENTORY:
@@ -4800,14 +4838,14 @@ static bool get_derezzable_objects(
((node->mPermissions->allowTransferTo(gAgent.getID()) && object->permModify())
|| (node->allowOperationOnNode(PERM_OWNER, GP_OBJECT_MANIPULATE))))
{
- can_derez_current = TRUE;
+ can_derez_current = true;
}
break;
case DRD_RETURN_TO_OWNER:
if(!object->isAttachment())
{
- can_derez_current = TRUE;
+ can_derez_current = true;
}
break;
@@ -4816,7 +4854,7 @@ static bool get_derezzable_objects(
&& object->permCopy())
|| gAgent.isGodlike())
{
- can_derez_current = TRUE;
+ can_derez_current = true;
}
break;
}
@@ -4917,7 +4955,7 @@ static void derez_objects(
msg->nextBlockFast(_PREHASH_ObjectData);
msg->addU32Fast(_PREHASH_ObjectLocalID, object->getLocalID());
// VEFFECT: DerezObject
- LLHUDEffectSpiral* effectp = (LLHUDEffectSpiral*)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, TRUE);
+ LLHUDEffectSpiral* effectp = (LLHUDEffectSpiral*)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, true);
effectp->setPositionGlobal(object->getPositionGlobal());
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
}
@@ -4945,6 +4983,24 @@ static void derez_objects(EDeRezDestination dest, const LLUUID& dest_id)
derez_objects(dest, dest_id, first_region, error, NULL);
}
+static void derez_objects_separate(EDeRezDestination dest, const LLUUID &dest_id)
+{
+ std::vector<LLViewerObjectPtr> derez_object_list;
+ std::string error;
+ LLViewerRegion* first_region = NULL;
+ if (!get_derezzable_objects(dest, error, first_region, &derez_object_list, false))
+ {
+ LL_WARNS() << "No objects to derez" << LL_ENDL;
+ return;
+ }
+ for (LLViewerObject *opjectp : derez_object_list)
+ {
+ std::vector<LLViewerObjectPtr> buf_list;
+ buf_list.push_back(opjectp);
+ derez_objects(dest, dest_id, first_region, error, &buf_list);
+ }
+}
+
void handle_take_copy()
{
if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return;
@@ -4953,6 +5009,15 @@ void handle_take_copy()
derez_objects(DRD_ACQUIRE_TO_AGENT_INVENTORY, category_id);
}
+void handle_take_separate_copy()
+{
+ if (LLSelectMgr::getInstance()->getSelection()->isEmpty())
+ return;
+
+ const LLUUID category_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OBJECT);
+ derez_objects_separate(DRD_ACQUIRE_TO_AGENT_INVENTORY, category_id);
+}
+
void handle_link_objects()
{
if (LLSelectMgr::getInstance()->getSelection()->isEmpty())
@@ -5046,7 +5111,7 @@ void force_take_copy(void*)
derez_objects(DRD_FORCE_TO_GOD_INVENTORY, category_id);
}
-void handle_take()
+void handle_take(bool take_separate)
{
// we want to use the folder this was derezzed from if it's
// available. Otherwise, derez to the normal place.
@@ -5055,8 +5120,8 @@ void handle_take()
return;
}
- BOOL you_own_everything = TRUE;
- BOOL locked_but_takeable_object = FALSE;
+ bool you_own_everything = true;
+ bool locked_but_takeable_object = false;
LLUUID category_id;
for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin();
@@ -5068,12 +5133,12 @@ void handle_take()
{
if(!object->permYouOwner())
{
- you_own_everything = FALSE;
+ you_own_everything = false;
}
if(!object->permMove())
{
- locked_but_takeable_object = TRUE;
+ locked_but_takeable_object = true;
}
}
if(node->mFolderID.notNull())
@@ -5135,7 +5200,17 @@ void handle_take()
// MAINT-290
// Reason: Showing the confirmation dialog resets object selection, thus there is nothing to derez.
// Fix: pass selection to the confirm_take, so that selection doesn't "die" after confirmation dialog is opened
- params.functor.function(boost::bind(confirm_take, _1, _2, LLSelectMgr::instance().getSelection()));
+ params.functor.function([take_separate](const LLSD &notification, const LLSD &response)
+ {
+ if (take_separate)
+ {
+ confirm_take_separate(notification, response, LLSelectMgr::instance().getSelection());
+ }
+ else
+ {
+ confirm_take(notification, response, LLSelectMgr::instance().getSelection());
+ }
+ });
if(locked_but_takeable_object ||
!you_own_everything)
@@ -5164,7 +5239,7 @@ void handle_take()
void handle_object_show_inspector()
{
LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
- LLViewerObject* objectp = selection->getFirstRootObject(TRUE);
+ LLViewerObject* objectp = selection->getFirstRootObject(true);
if (!objectp)
{
return;
@@ -5198,14 +5273,24 @@ bool confirm_take(const LLSD& notification, const LLSD& response, LLObjectSelect
return false;
}
+bool confirm_take_separate(const LLSD &notification, const LLSD &response, LLObjectSelectionHandle selection_handle)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if (enable_take() && (option == 0))
+ {
+ derez_objects_separate(DRD_TAKE_INTO_AGENT_INVENTORY, notification["payload"]["folder_id"].asUUID());
+ }
+ return false;
+}
+
// You can take an item when it is public and transferrable, or when
// you own it. We err on the side of enabling the item when at least
// one item selected can be copied to inventory.
-BOOL enable_take()
+bool enable_take()
{
if (sitting_on_selection())
{
- return FALSE;
+ return false;
}
for (LLObjectSelection::valid_root_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_root_begin();
@@ -5220,13 +5305,13 @@ BOOL enable_take()
}
#ifdef HACKED_GODLIKE_VIEWER
- return TRUE;
+ return true;
#else
# ifdef TOGGLE_HACKED_GODLIKE_VIEWER
if (!LLGridManager::getInstance()->isInProductionGrid()
&& gAgent.isGodlike())
{
- return TRUE;
+ return true;
}
# endif
if(!object->isPermanentEnforced() &&
@@ -5238,7 +5323,7 @@ BOOL enable_take()
}
#endif
}
- return FALSE;
+ return false;
}
@@ -5280,6 +5365,21 @@ bool visible_take_object()
return !is_selection_buy_not_take() && enable_take();
}
+bool is_multiple_selection()
+{
+ return (LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() > 1);
+}
+
+bool is_single_selection()
+{
+ return !is_multiple_selection();
+}
+
+bool enable_take_objects()
+{
+ return visible_take_object() && is_multiple_selection();
+}
+
bool tools_visible_buy_object()
{
return is_selection_buy_not_take();
@@ -5314,9 +5414,9 @@ class LLToolsEnableBuyOrTake : public view_listener_t
// exception is if you own everything in the selection that is for
// sale, in this case, you can't buy stuff from yourself, so you can
// take it.
-// return value = TRUE if selection is a 'buy'.
-// FALSE if selection is a 'take'
-BOOL is_selection_buy_not_take()
+// return value = true if selection is a 'buy'.
+// false if selection is a 'take'
+bool is_selection_buy_not_take()
{
for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin();
iter != LLSelectMgr::getInstance()->getSelection()->root_end(); iter++)
@@ -5327,10 +5427,10 @@ BOOL is_selection_buy_not_take()
{
// you do not own the object and it is for sale, thus,
// it's a buy
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
S32 selection_price()
@@ -5388,7 +5488,7 @@ void handle_buy()
if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return;
LLSaleInfo sale_info;
- BOOL valid = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info);
+ bool valid = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info);
if (!valid) return;
S32 price = sale_info.getSalePrice();
@@ -5426,27 +5526,27 @@ bool for_sale_selection(LLSelectNode* nodep)
|| nodep->mSaleInfo.getSaleType() != LLSaleInfo::FS_COPY);
}
-BOOL sitting_on_selection()
+bool sitting_on_selection()
{
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
if (!node)
{
- return FALSE;
+ return false;
}
if (!node->mValid)
{
- return FALSE;
+ return false;
}
LLViewerObject* root_object = node->getObject();
if (!root_object)
{
- return FALSE;
+ return false;
}
// Need to determine if avatar is sitting on this object
- if (!isAgentAvatarValid()) return FALSE;
+ if (!isAgentAvatarValid()) return false;
return (gAgentAvatarp->isSitting() && gAgentAvatarp->getRoot() == root_object);
}
@@ -5549,7 +5649,7 @@ class LLToolsSnapObjectXY : public view_listener_t
pos_global.mdV[VY] += snap_size;
}
- obj->setPositionGlobal(pos_global, FALSE);
+ obj->setPositionGlobal(pos_global, false);
}
}
LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_POSITION);
@@ -5930,7 +6030,7 @@ bool enable_object_delete()
{
bool new_value =
#ifdef HACKED_GODLIKE_VIEWER
- TRUE;
+ true;
#else
# ifdef TOGGLE_HACKED_GODLIKE_VIEWER
(!LLGridManager::getInstance()->isInProductionGrid()
@@ -6142,8 +6242,8 @@ void show_debug_menus()
// this might get called at login screen where there is no menu so only toggle it if one exists
if ( gMenuBarView )
{
- BOOL debug = gSavedSettings.getBOOL("UseDebugMenus");
- BOOL qamode = gSavedSettings.getBOOL("QAMode");
+ bool debug = gSavedSettings.getBOOL("UseDebugMenus");
+ bool qamode = gSavedSettings.getBOOL("QAMode");
gMenuBarView->setItemVisible("Advanced", debug);
// gMenuBarView->setItemEnabled("Advanced", debug); // Don't disable Advanced keyboard shortcuts when hidden
@@ -6161,7 +6261,7 @@ void show_debug_menus()
}
if (gLoginMenuBarView)
{
- BOOL debug = gSavedSettings.getBOOL("UseDebugMenus");
+ bool debug = gSavedSettings.getBOOL("UseDebugMenus");
gLoginMenuBarView->setItemVisible("Debug", debug);
gLoginMenuBarView->setItemEnabled("Debug", debug);
}
@@ -6169,7 +6269,7 @@ void show_debug_menus()
void toggle_debug_menus(void*)
{
- BOOL visible = ! gSavedSettings.getBOOL("UseDebugMenus");
+ bool visible = ! gSavedSettings.getBOOL("UseDebugMenus");
gSavedSettings.setBOOL("UseDebugMenus", visible);
show_debug_menus();
}
@@ -6356,10 +6456,10 @@ class LLWorldPlaceProfile : public view_listener_t
void handle_look_at_selection(const LLSD& param)
{
const F32 PADDING_FACTOR = 1.75f;
- BOOL zoom = (param.asString() == "zoom");
+ bool zoom = (param.asString() == "zoom");
if (!LLSelectMgr::getInstance()->getSelection()->isEmpty())
{
- gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE);
+ gAgentCamera.setFocusOnAvatar(false, ANIMATE);
LLBBox selection_bbox = LLSelectMgr::getInstance()->getBBoxOfSelection();
F32 angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getAspect() > 1.f ? LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect() : LLViewerCamera::getInstance()->getView());
@@ -6399,7 +6499,7 @@ void handle_zoom_to_object(LLUUID object_id)
if (object)
{
- gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE);
+ gAgentCamera.setFocusOnAvatar(false, ANIMATE);
LLBBox bbox = object->getBoundingBoxAgent() ;
F32 angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getAspect() > 1.f ? LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect() : LLViewerCamera::getInstance()->getView());
@@ -6451,8 +6551,8 @@ class LLAvatarToggleMyProfile : public view_listener_t
LLFloater* instance = LLAvatarActions::getProfileFloater(gAgent.getID());
if (LLFloater::isMinimized(instance))
{
- instance->setMinimized(FALSE);
- instance->setFocus(TRUE);
+ instance->setMinimized(false);
+ instance->setFocus(true);
}
else if (!LLFloater::isShown(instance))
{
@@ -6460,7 +6560,7 @@ class LLAvatarToggleMyProfile : public view_listener_t
}
else if (!instance->hasFocus() && !instance->getIsChrome())
{
- instance->setFocus(TRUE);
+ instance->setFocus(true);
}
else
{
@@ -6477,8 +6577,8 @@ class LLAvatarTogglePicks : public view_listener_t
LLFloater * instance = LLAvatarActions::getProfileFloater(gAgent.getID());
if (LLFloater::isMinimized(instance) || (instance && !instance->hasFocus() && !instance->getIsChrome()))
{
- instance->setMinimized(FALSE);
- instance->setFocus(TRUE);
+ instance->setMinimized(false);
+ instance->setFocus(true);
LLAvatarActions::showPicks(gAgent.getID());
}
else if (picks_tab_visible())
@@ -6500,8 +6600,8 @@ class LLAvatarToggleSearch : public view_listener_t
LLFloater* instance = LLFloaterReg::findInstance("search");
if (LLFloater::isMinimized(instance))
{
- instance->setMinimized(FALSE);
- instance->setFocus(TRUE);
+ instance->setMinimized(false);
+ instance->setFocus(true);
}
else if (!LLFloater::isShown(instance))
{
@@ -6509,7 +6609,7 @@ class LLAvatarToggleSearch : public view_listener_t
}
else if (!instance->hasFocus() && !instance->getIsChrome())
{
- instance->setFocus(TRUE);
+ instance->setFocus(true);
}
else
{
@@ -7022,7 +7122,7 @@ class LLLandEdit : public view_listener_t
if (gAgentCamera.getFocusOnAvatar() && gSavedSettings.getBOOL("EditCameraMovement") )
{
// zoom in if we're looking at the avatar
- gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE);
+ gAgentCamera.setFocusOnAvatar(false, ANIMATE);
gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick());
gAgentCamera.cameraOrbitOver( F_PI * 0.25f );
@@ -7085,7 +7185,7 @@ class LLWorldEnableBuyLand : public view_listener_t
}
};
-BOOL enable_buy_land(void*)
+bool enable_buy_land(void*)
{
return LLViewerParcelMgr::getInstance()->canAgentBuyParcel(
LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel(), false);
@@ -7123,7 +7223,7 @@ private:
return true;
}
- static void onNearAttachObject(BOOL success, void *user_data);
+ static void onNearAttachObject(bool success, void *user_data);
void confirmReplaceAttachment(S32 option, LLViewerJointAttachment* attachment_point);
class CallbackData : public LLSelectionCallbackData
{
@@ -7142,7 +7242,7 @@ protected:
LLObjectSelectionHandle LLObjectAttachToAvatar::sObjectSelection;
// static
-void LLObjectAttachToAvatar::onNearAttachObject(BOOL success, void *user_data)
+void LLObjectAttachToAvatar::onNearAttachObject(bool success, void *user_data)
{
if (!user_data) return;
CallbackData* cb_data = static_cast<CallbackData*>(user_data);
@@ -7402,7 +7502,7 @@ class LLAttachmentEnableDrop : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- BOOL can_build = gAgent.isGodlike() || (LLViewerParcelMgr::getInstance()->allowAgentBuild());
+ bool can_build = gAgent.isGodlike() || (LLViewerParcelMgr::getInstance()->allowAgentBuild());
//Add an inventory observer to only allow dropping the newly attached item
//once it exists in your inventory. Look at Jira 2422.
@@ -7454,7 +7554,7 @@ class LLAttachmentEnableDrop : public view_listener_t
}
};
-BOOL enable_detach(const LLSD&)
+bool enable_detach(const LLSD&)
{
LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
@@ -7463,7 +7563,7 @@ BOOL enable_detach(const LLSD&)
!object->isAttachment() ||
!LLSelectMgr::getInstance()->getSelection()->contains(object,SELECT_ALL_TES ))
{
- return FALSE;
+ return false;
}
// Find the avatar who owns this attachment
@@ -7473,13 +7573,13 @@ BOOL enable_detach(const LLSD&)
// ...if it's you, good to detach
if (avatar->getID() == gAgent.getID())
{
- return TRUE;
+ return true;
}
avatar = (LLViewerObject*)avatar->getParent();
}
- return FALSE;
+ return false;
}
class LLAttachmentEnableDetach : public view_listener_t
@@ -7492,7 +7592,7 @@ class LLAttachmentEnableDetach : public view_listener_t
};
// Used to tell if the selected object can be attached to your avatar.
-BOOL object_selected_and_point_valid()
+bool object_selected_and_point_valid()
{
LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
for (LLObjectSelection::root_iterator iter = selection->root_begin();
@@ -7507,7 +7607,7 @@ BOOL object_selected_and_point_valid()
LLViewerObject* child = *iter;
if (child->isAvatar())
{
- return FALSE;
+ return false;
}
}
}
@@ -7522,23 +7622,23 @@ BOOL object_selected_and_point_valid()
}
-BOOL object_is_wearable()
+bool object_is_wearable()
{
if (!isAgentAvatarValid())
{
- return FALSE;
+ return false;
}
if (!object_selected_and_point_valid())
{
- return FALSE;
+ return false;
}
if (sitting_on_selection())
{
- return FALSE;
+ return false;
}
if (!gAgentAvatarp->canAttachMoreObjects())
{
- return FALSE;
+ return false;
}
LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
for (LLObjectSelection::valid_root_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_root_begin();
@@ -7547,10 +7647,10 @@ BOOL object_is_wearable()
LLSelectNode* node = *iter;
if (node->mPermissions->getOwner() == gAgent.getID())
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
@@ -7598,10 +7698,10 @@ namespace
{
struct QueueObjects : public LLSelectedNodeFunctor
{
- BOOL scripted;
- BOOL modifiable;
+ bool scripted;
+ bool modifiable;
LLFloaterScriptQueue* mQueue;
- QueueObjects(LLFloaterScriptQueue* q) : mQueue(q), scripted(FALSE), modifiable(FALSE) {}
+ QueueObjects(LLFloaterScriptQueue* q) : mQueue(q), scripted(false), modifiable(false) {}
virtual bool apply(LLSelectNode* node)
{
LLViewerObject* obj = node->getObject();
@@ -7808,13 +7908,13 @@ void handle_selected_material_info()
void handle_test_male(void*)
{
LLAppearanceMgr::instance().wearOutfitByName("Male Shape & Outfit");
- //gGestureList.requestResetFromServer( TRUE );
+ //gGestureList.requestResetFromServer( true );
}
void handle_test_female(void*)
{
LLAppearanceMgr::instance().wearOutfitByName("Female Shape & Outfit");
- //gGestureList.requestResetFromServer( FALSE );
+ //gGestureList.requestResetFromServer( false );
}
void handle_dump_attachments(void*)
@@ -7832,7 +7932,7 @@ void handle_dump_attachments(void*)
++attachment_iter)
{
LLViewerObject *attached_object = attachment_iter->get();
- BOOL visible = (attached_object != NULL &&
+ bool visible = (attached_object != NULL &&
attached_object->mDrawable.notNull() &&
!attached_object->mDrawable->isRenderType(0));
LLVector3 pos;
@@ -7856,7 +7956,7 @@ protected:
bool handleEvent(const LLSD& userdata)
{
std::string control_name = userdata.asString();
- BOOL checked = gSavedSettings.getBOOL( control_name );
+ bool checked = gSavedSettings.getBOOL( control_name );
gSavedSettings.setBOOL( control_name, !checked );
return true;
}
@@ -7913,7 +8013,7 @@ class LLAdvancedClickRenderProfile: public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- gShaderProfileFrame = TRUE;
+ gShaderProfileFrame = true;
return true;
}
};
@@ -7929,13 +8029,57 @@ class LLAdvancedClickRenderBenchmark: public view_listener_t
}
};
+void hdri_preview();
+
+class LLAdvancedClickHDRIPreview: public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ // open personal lighting floater when previewing an HDRI (keeps HDRI from implicitly unloading when opening build tools)
+ LLFloaterReg::showInstance("env_adjust_snapshot");
+ hdri_preview();
+ return true;
+ }
+};
+
+
+class LLAdvancedClickGLTFOpen: public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ // open personal lighting floater when previewing an HDRI (keeps HDRI from implicitly unloading when opening build tools)
+ LL::GLTFSceneManager::instance().load();
+ return true;
+ }
+};
+
+class LLAdvancedClickGLTFSaveAs : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ // open personal lighting floater when previewing an HDRI (keeps HDRI from implicitly unloading when opening build tools)
+ LL::GLTFSceneManager::instance().saveAs();
+ return true;
+ }
+};
+
+class LLAdvancedClickGLTFDecompose : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ // open personal lighting floater when previewing an HDRI (keeps HDRI from implicitly unloading when opening build tools)
+ LL::GLTFSceneManager::instance().decomposeSelection();
+ return true;
+ }
+};
+
// these are used in the gl menus to set control values that require shader recompilation
class LLToggleShaderControl : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
std::string control_name = userdata.asString();
- BOOL checked = gSavedSettings.getBOOL( control_name );
+ bool checked = gSavedSettings.getBOOL( control_name );
gSavedSettings.setBOOL( control_name, !checked );
LLPipeline::refreshCachedSettings();
LLViewerShaderMgr::instance()->setShaders();
@@ -8055,19 +8199,23 @@ bool enable_object_take_copy()
return all_valid;
}
+bool enable_take_copy_objects()
+{
+ return enable_object_take_copy() && is_multiple_selection();
+}
class LLHasAsset : public LLInventoryCollectFunctor
{
public:
- LLHasAsset(const LLUUID& id) : mAssetID(id), mHasAsset(FALSE) {}
+ LLHasAsset(const LLUUID& id) : mAssetID(id), mHasAsset(false) {}
virtual ~LLHasAsset() {}
virtual bool operator()(LLInventoryCategory* cat,
LLInventoryItem* item);
- BOOL hasAsset() const { return mHasAsset; }
+ bool hasAsset() const { return mHasAsset; }
protected:
LLUUID mAssetID;
- BOOL mHasAsset;
+ bool mHasAsset;
};
bool LLHasAsset::operator()(LLInventoryCategory* cat,
@@ -8075,13 +8223,13 @@ bool LLHasAsset::operator()(LLInventoryCategory* cat,
{
if(item && item->getAssetUUID() == mAssetID)
{
- mHasAsset = TRUE;
+ mHasAsset = true;
}
- return FALSE;
+ return false;
}
-BOOL enable_save_into_task_inventory(void*)
+bool enable_save_into_task_inventory(void*)
{
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
if(node && (node->mValid) && (!node->mFromTaskID.isNull()))
@@ -8090,10 +8238,10 @@ BOOL enable_save_into_task_inventory(void*)
LLViewerObject* obj = node->getObject();
if( obj && !obj->isAttachment() )
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
class LLToolsEnableSaveToObjectInventory : public view_listener_t
@@ -8163,12 +8311,12 @@ class LLWorldEnableTeleportHome : public view_listener_t
}
};
-BOOL enable_god_full(void*)
+bool enable_god_full(void*)
{
return gAgent.getGodLevel() >= GOD_FULL;
}
-BOOL enable_god_liaison(void*)
+bool enable_god_liaison(void*)
{
return gAgent.getGodLevel() >= GOD_LIAISON;
}
@@ -8178,7 +8326,7 @@ bool is_god_customer_service()
return gAgent.getGodLevel() >= GOD_CUSTOMER_SERVICE;
}
-BOOL enable_god_basic(void*)
+bool enable_god_basic(void*)
{
return gAgent.getGodLevel() > GOD_NOT;
}
@@ -8189,7 +8337,7 @@ void toggle_show_xui_names(void *)
gSavedSettings.setBOOL("DebugShowXUINames", !gSavedSettings.getBOOL("DebugShowXUINames"));
}
-BOOL check_show_xui_names(void *)
+bool check_show_xui_names(void *)
{
return gSavedSettings.getBOOL("DebugShowXUINames");
}
@@ -8198,7 +8346,7 @@ class LLToolsSelectOnlyMyObjects : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- BOOL cur_val = gSavedSettings.getBOOL("SelectOwnedOnly");
+ bool cur_val = gSavedSettings.getBOOL("SelectOwnedOnly");
gSavedSettings.setBOOL("SelectOwnedOnly", ! cur_val );
@@ -8210,7 +8358,7 @@ class LLToolsSelectOnlyMovableObjects : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- BOOL cur_val = gSavedSettings.getBOOL("SelectMovableOnly");
+ bool cur_val = gSavedSettings.getBOOL("SelectMovableOnly");
gSavedSettings.setBOOL("SelectMovableOnly", ! cur_val );
@@ -8222,7 +8370,7 @@ class LLToolsSelectInvisibleObjects : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- BOOL cur_val = gSavedSettings.getBOOL("SelectInvisibleObjects");
+ bool cur_val = gSavedSettings.getBOOL("SelectInvisibleObjects");
gSavedSettings.setBOOL("SelectInvisibleObjects", !cur_val);
@@ -8234,7 +8382,7 @@ class LLToolsSelectReflectionProbes: public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- BOOL cur_val = gSavedSettings.getBOOL("SelectReflectionProbes");
+ bool cur_val = gSavedSettings.getBOOL("SelectReflectionProbes");
gSavedSettings.setBOOL("SelectReflectionProbes", !cur_val);
@@ -8281,7 +8429,7 @@ class LLToolsEditLinkedParts : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- BOOL select_individuals = !gSavedSettings.getBOOL("EditLinkedParts");
+ bool select_individuals = !gSavedSettings.getBOOL("EditLinkedParts");
gSavedSettings.setBOOL( "EditLinkedParts", select_individuals );
if (select_individuals)
{
@@ -8361,7 +8509,7 @@ void handle_grab_baked_texture(void* data)
LLInventoryItemFlags::II_FLAGS_NONE,
creation_date_now);
- item->updateServer(TRUE);
+ item->updateServer(true);
gInventory.updateItem(item);
gInventory.notifyObservers();
@@ -8385,14 +8533,14 @@ void handle_grab_baked_texture(void* data)
}
}
-BOOL enable_grab_baked_texture(void* data)
+bool enable_grab_baked_texture(void* data)
{
EBakedTextureIndex index = (EBakedTextureIndex)((intptr_t)data);
if (isAgentAvatarValid())
{
return gAgentAvatarp->canGrabBakedTexture(index);
}
- return FALSE;
+ return false;
}
// Returns a pointer to the avatar give the UUID of the avatar OR of an attachment the avatar is wearing.
@@ -8519,18 +8667,18 @@ LLViewerMenuHolderGL::LLViewerMenuHolderGL(const LLViewerMenuHolderGL::Params& p
: LLMenuHolderGL(p)
{}
-BOOL LLViewerMenuHolderGL::hideMenus()
+bool LLViewerMenuHolderGL::hideMenus()
{
- BOOL handled = FALSE;
+ bool handled = false;
if (LLMenuHolderGL::hideMenus())
{
- handled = TRUE;
+ handled = true;
}
// drop pie menu selection
- mParcelSelection = NULL;
- mObjectSelection = NULL;
+ mParcelSelection = nullptr;
+ mObjectSelection = nullptr;
if (gMenuBarView)
{
@@ -8646,7 +8794,7 @@ void toggle_visibility(void* user_data)
viewp->setVisible(!viewp->getVisible());
}
-BOOL get_visibility(void* user_data)
+bool get_visibility(void* user_data)
{
LLView* viewp = (LLView*)user_data;
return viewp->getVisible();
@@ -8978,9 +9126,9 @@ class LLToolsSelectTool : public view_listener_t
// attempt to open it, but it won't bring it to front or de-minimize.
if (gFloaterTools && (gFloaterTools->isMinimized() || !gFloaterTools->isShown() || !gFloaterTools->isFrontmost()))
{
- gFloaterTools->setMinimized(FALSE);
+ gFloaterTools->setMinimized(false);
gFloaterTools->openFloater();
- gFloaterTools->setVisibleAndFrontmost(TRUE);
+ gFloaterTools->setVisibleAndFrontmost(true);
}
return true;
}
@@ -8998,7 +9146,7 @@ class LLWorldEnvSettings : public view_listener_t
LLFloater* env_floater = LLFloaterReg::findTypedInstance<LLFloater>(*it);
if (env_floater)
{
- env_floater->setFocus(FALSE);
+ env_floater->setFocus(false);
}
}
}
@@ -9276,6 +9424,8 @@ void LLUploadCostCalculator::calculateCost(const std::string& asset_type_str)
if (asset_type_str == "texture")
{
+ // This use minimal texture cost to allow bulk and
+ // texture upload menu options to be visible
upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
}
else if (asset_type_str == "animation")
@@ -9520,6 +9670,7 @@ void initialize_menus()
enable.add("Tools.EnableUnlink", boost::bind(&LLSelectMgr::enableUnlinkObjects, LLSelectMgr::getInstance()));
view_listener_t::addMenu(new LLToolsEnableBuyOrTake(), "Tools.EnableBuyOrTake");
enable.add("Tools.EnableTakeCopy", boost::bind(&enable_object_take_copy));
+ enable.add("Tools.EnableCopySeparate", boost::bind(&enable_take_copy_objects));
enable.add("Tools.VisibleBuyObject", boost::bind(&tools_visible_buy_object));
enable.add("Tools.VisibleTakeObject", boost::bind(&tools_visible_take_object));
view_listener_t::addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.EnableSaveToObjectInventory");
@@ -9573,7 +9724,12 @@ void initialize_menus()
view_listener_t::addMenu(new LLAdvancedClickRenderShadowOption(), "Advanced.ClickRenderShadowOption");
view_listener_t::addMenu(new LLAdvancedClickRenderProfile(), "Advanced.ClickRenderProfile");
view_listener_t::addMenu(new LLAdvancedClickRenderBenchmark(), "Advanced.ClickRenderBenchmark");
+ view_listener_t::addMenu(new LLAdvancedClickHDRIPreview(), "Advanced.ClickHDRIPreview");
+ view_listener_t::addMenu(new LLAdvancedClickGLTFOpen(), "Advanced.ClickGLTFOpen");
+ view_listener_t::addMenu(new LLAdvancedClickGLTFSaveAs(), "Advanced.ClickGLTFSaveAs");
+ view_listener_t::addMenu(new LLAdvancedClickGLTFDecompose(), "Advanced.ClickGLTFDecompose");
view_listener_t::addMenu(new LLAdvancedPurgeShaderCache(), "Advanced.ClearShaderCache");
+ view_listener_t::addMenu(new LLAdvancedRebuildTerrain(), "Advanced.RebuildTerrain");
#ifdef TOGGLE_HACKED_GODLIKE_VIEWER
view_listener_t::addMenu(new LLAdvancedHandleToggleHackedGodmode(), "Advanced.HandleToggleHackedGodmode");
@@ -9790,6 +9946,9 @@ void initialize_menus()
view_listener_t::addMenu(new LLObjectMute(), "Object.Mute");
enable.add("Object.VisibleTake", boost::bind(&visible_take_object));
+ enable.add("Object.VisibleTakeMultiple", boost::bind(&is_multiple_selection));
+ enable.add("Object.VisibleTakeSingle", boost::bind(&is_single_selection));
+ enable.add("Object.EnableTakeMultiple", boost::bind(&enable_take_objects));
enable.add("Object.VisibleBuy", boost::bind(&visible_buy_object));
commit.add("Object.Buy", boost::bind(&handle_buy));
@@ -9798,7 +9957,9 @@ void initialize_menus()
commit.add("Object.EditGLTFMaterial", boost::bind(&handle_object_edit_gltf_material));
commit.add("Object.Inspect", boost::bind(&handle_object_inspect));
commit.add("Object.Open", boost::bind(&handle_object_open));
- commit.add("Object.Take", boost::bind(&handle_take));
+ commit.add("Object.Take", boost::bind(&handle_take, false));
+ commit.add("Object.TakeSeparate", boost::bind(&handle_take, true));
+ commit.add("Object.TakeSeparateCopy", boost::bind(&handle_take_separate_copy));
commit.add("Object.ShowInspector", boost::bind(&handle_object_show_inspector));
enable.add("Object.EnableInspect", boost::bind(&enable_object_inspect));
enable.add("Object.EnableEditGLTFMaterial", boost::bind(&enable_object_edit_gltf_material));
diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h
index 7142763451..8c87a1d389 100644
--- a/indra/newview/llviewermenu.h
+++ b/indra/newview/llviewermenu.h
@@ -61,27 +61,27 @@ void handle_deselect(void*);
void handle_delete_object();
void handle_duplicate(void*);
void handle_duplicate_in_place(void*);
-BOOL enable_not_have_card(void *userdata);
+bool enable_not_have_card(void *userdata);
void process_grant_godlike_powers(LLMessageSystem* msg, void**);
-BOOL enable_cut(void*);
-BOOL enable_copy(void*);
-BOOL enable_paste(void*);
-BOOL enable_select_all(void*);
-BOOL enable_deselect(void*);
-BOOL enable_undo(void*);
-BOOL enable_redo(void*);
+bool enable_cut(void*);
+bool enable_copy(void*);
+bool enable_paste(void*);
+bool enable_select_all(void*);
+bool enable_deselect(void*);
+bool enable_undo(void*);
+bool enable_redo(void*);
-BOOL is_agent_mappable(const LLUUID& agent_id);
+bool is_agent_mappable(const LLUUID& agent_id);
void confirm_replace_attachment(S32 option, void* user_data);
void handle_detach_from_avatar(const LLSD& user_data);
void attach_label(std::string& label, const LLSD&);
void detach_label(std::string& label, const LLSD&);
void handle_detach(void*);
-BOOL enable_god_full(void* user_data);
-BOOL enable_god_liaison(void* user_data);
-BOOL enable_god_basic(void* user_data);
+bool enable_god_full(void* user_data);
+bool enable_god_liaison(void* user_data);
+bool enable_god_basic(void* user_data);
void check_merchant_status(bool force = false);
void exchange_callingcard(const LLUUID& dest_id);
@@ -103,7 +103,7 @@ bool enable_object_delete();
// Buy either contents or object itself
void handle_buy();
-void handle_take();
+void handle_take(bool take_separate = false);
void handle_take_copy();
void handle_look_at_selection(const LLSD& param);
void handle_zoom_to_object(LLUUID object_id);
@@ -160,7 +160,7 @@ public:
LLViewerMenuHolderGL(const Params& p);
- virtual BOOL hideMenus();
+ virtual bool hideMenus();
void setParcelSelection(LLSafeHandle<LLParcelSelection> selection);
void setObjectSelection(LLSafeHandle<LLObjectSelection> selection);
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 5461e0f362..f322b36226 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -188,7 +188,7 @@ void LLFilePickerThread::run()
void LLFilePickerThread::runModeless()
{
- BOOL result = FALSE;
+ bool result = false;
LLFilePicker picker;
if (mIsSaveDialog)
@@ -440,7 +440,7 @@ const bool check_file_extension(const std::string& filename, LLFilePicker::ELoad
//now grab the set of valid file extensions
std::string valid_extensions = build_extensions_string(type);
- BOOL ext_valid = FALSE;
+ bool ext_valid = false;
typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
boost::char_separator<char> sep(" ");
@@ -451,7 +451,7 @@ const bool check_file_extension(const std::string& filename, LLFilePicker::ELoad
//and compare them to the extension of the file
//to be uploaded
for (token_iter = tokens.begin();
- token_iter != tokens.end() && ext_valid != TRUE;
+ token_iter != tokens.end() && ext_valid != true;
++token_iter)
{
const std::string& cur_token = *token_iter;
@@ -460,11 +460,11 @@ const bool check_file_extension(const std::string& filename, LLFilePicker::ELoad
{
//valid extension
//or the acceptable extension is any
- ext_valid = TRUE;
+ ext_valid = true;
}
}//end for (loop over all tokens)
- if (ext_valid == FALSE)
+ if (ext_valid == false)
{
//should only get here if the extension exists
//but is invalid
@@ -546,21 +546,39 @@ void do_bulk_upload(std::vector<std::string> filenames, const LLSD& notification
std::string ext = gDirUtilp->getExtension(filename);
LLAssetType::EType asset_type;
U32 codec;
- S32 expected_upload_cost;
- if (LLResourceUploadInfo::findAssetTypeAndCodecOfExtension(ext, asset_type, codec) &&
- LLAgentBenefitsMgr::current().findUploadCost(asset_type, expected_upload_cost))
- {
- LLResourceUploadInfo::ptr_t uploadInfo(new LLNewFileResourceUploadInfo(
- filename,
- asset_name,
- asset_name, 0,
- LLFolderType::FT_NONE, LLInventoryType::IT_NONE,
- LLFloaterPerms::getNextOwnerPerms("Uploads"),
- LLFloaterPerms::getGroupPerms("Uploads"),
- LLFloaterPerms::getEveryonePerms("Uploads"),
- expected_upload_cost));
-
- upload_new_resource(uploadInfo);
+ S32 expected_upload_cost = 0;
+
+ if (LLResourceUploadInfo::findAssetTypeAndCodecOfExtension(ext, asset_type, codec))
+ {
+ bool resource_upload = false;
+ if (asset_type == LLAssetType::AT_TEXTURE)
+ {
+ LLPointer<LLImageFormatted> image_frmted = LLImageFormatted::createFromType(codec);
+ if (gDirUtilp->fileExists(filename) && image_frmted->load(filename))
+ {
+ expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(image_frmted);
+ resource_upload = true;
+ }
+ }
+ else if (LLAgentBenefitsMgr::current().findUploadCost(asset_type, expected_upload_cost))
+ {
+ resource_upload = true;
+ }
+
+ if (resource_upload)
+ {
+ LLResourceUploadInfo::ptr_t uploadInfo(new LLNewFileResourceUploadInfo(
+ filename,
+ asset_name,
+ asset_name, 0,
+ LLFolderType::FT_NONE, LLInventoryType::IT_NONE,
+ LLFloaterPerms::getNextOwnerPerms("Uploads"),
+ LLFloaterPerms::getGroupPerms("Uploads"),
+ LLFloaterPerms::getEveryonePerms("Uploads"),
+ expected_upload_cost));
+
+ upload_new_resource(uploadInfo);
+ }
}
// gltf does not use normal upload procedure
@@ -602,17 +620,26 @@ bool get_bulk_upload_expected_cost(const std::vector<std::string>& filenames, S3
U32 codec;
S32 cost;
- if (LLResourceUploadInfo::findAssetTypeAndCodecOfExtension(ext, asset_type, codec) &&
- LLAgentBenefitsMgr::current().findUploadCost(asset_type, cost))
+ if (LLResourceUploadInfo::findAssetTypeAndCodecOfExtension(ext, asset_type, codec))
{
- total_cost += cost;
- file_count++;
- }
+ if (asset_type == LLAssetType::AT_TEXTURE)
+ {
+ LLPointer<LLImageFormatted> image_frmted = LLImageFormatted::createFromType(codec);
+ if (gDirUtilp->fileExists(filename) && image_frmted->load(filename))
+ {
+ total_cost += LLAgentBenefitsMgr::current().getTextureUploadCost(image_frmted);
+ file_count++;
+ }
+ }
+ else if (LLAgentBenefitsMgr::current().findUploadCost(asset_type, cost))
+ {
+ total_cost += cost;
+ file_count++;
+ }
+ }
if (ext == "gltf" || ext == "glb")
{
- S32 texture_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
-
tinygltf::Model model;
if (LLTinyGLTFHelper::loadModel(filename, model))
@@ -629,24 +656,22 @@ bool get_bulk_upload_expected_cost(const std::vector<std::string>& filenames, S3
{
// Todo: make it account for possibility of same texture in different
// materials and even in scope of same material
- S32 texture_count = 0;
- if (material->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR].notNull())
+ if (material->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR].notNull() && material->mBaseColorTexture)
{
- texture_count++;
+ total_cost += LLAgentBenefitsMgr::current().getTextureUploadCost(material->mBaseColorTexture);
}
- if (material->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_METALLIC_ROUGHNESS].notNull())
+ if (material->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_METALLIC_ROUGHNESS].notNull() && material->mMetallicRoughnessTexture)
{
- texture_count++;
+ total_cost += LLAgentBenefitsMgr::current().getTextureUploadCost(material->mMetallicRoughnessTexture);
}
- if (material->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_NORMAL].notNull())
+ if (material->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_NORMAL].notNull() && material->mNormalTexture)
{
- texture_count++;
+ total_cost += LLAgentBenefitsMgr::current().getTextureUploadCost(material->mNormalTexture);
}
- if (material->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_EMISSIVE].notNull())
+ if (material->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_EMISSIVE].notNull() && material->mEmissiveTexture)
{
- texture_count++;
+ total_cost += LLAgentBenefitsMgr::current().getTextureUploadCost(material->mEmissiveTexture);
}
- total_cost += texture_count * texture_upload_cost;
file_count++;
}
}
@@ -731,7 +756,7 @@ class LLFileUploadModel : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
LLFloaterModelPreview::showModelPreview();
- return TRUE;
+ return true;
}
};
@@ -740,7 +765,7 @@ class LLFileUploadMaterial : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
LLMaterialEditor::importMaterial();
- return TRUE;
+ return true;
}
};
@@ -863,11 +888,11 @@ class LLFileTakeSnapshotToDisk : public view_listener_t
S32 width = gViewerWindow->getWindowWidthRaw();
S32 height = gViewerWindow->getWindowHeightRaw();
- BOOL render_ui = gSavedSettings.getBOOL("RenderUIInSnapshot");
- BOOL render_hud = gSavedSettings.getBOOL("RenderHUDInSnapshot");
- BOOL render_no_post = gSavedSettings.getBOOL("RenderSnapshotNoPost");
+ bool render_ui = gSavedSettings.getBOOL("RenderUIInSnapshot");
+ bool render_hud = gSavedSettings.getBOOL("RenderHUDInSnapshot");
+ bool render_no_post = gSavedSettings.getBOOL("RenderSnapshotNoPost");
- BOOL high_res = gSavedSettings.getBOOL("HighResSnapshot");
+ bool high_res = gSavedSettings.getBOOL("HighResSnapshot");
if (high_res)
{
width *= 2;
@@ -880,11 +905,11 @@ class LLFileTakeSnapshotToDisk : public view_listener_t
if (gViewerWindow->rawSnapshot(raw,
width,
height,
- TRUE,
- FALSE,
+ true,
+ false,
render_ui,
render_hud,
- FALSE,
+ false,
render_no_post,
LLSnapshotModel::SNAPSHOT_TYPE_COLOR,
high_res ? S32_MAX : MAX_SNAPSHOT_IMAGE_SIZE)) //per side
@@ -937,7 +962,7 @@ void handle_compress_image(void*)
LL_INFOS() << "Input: " << infile << LL_ENDL;
LL_INFOS() << "Output: " << outfile << LL_ENDL;
- BOOL success;
+ bool success;
success = LLViewerTextureList::createUploadFile(infile, outfile, IMG_CODEC_TGA);
@@ -987,7 +1012,7 @@ void handle_compress_file_test(void*)
S64Bytes initial_size = S64Bytes(get_file_size(infile));
- BOOL success;
+ bool success;
F64 total_seconds = LLTimer::getTotalSeconds();
success = gzip_file(infile, packfile);
@@ -1081,7 +1106,7 @@ void upload_done_callback(
LLResourceData* data = (LLResourceData*)user_data;
S32 expected_upload_cost = data ? data->mExpectedUploadCost : 0;
//LLAssetType::EType pref_loc = data->mPreferredLocation;
- BOOL is_balance_sufficient = TRUE;
+ bool is_balance_sufficient = true;
if(data)
{
@@ -1099,7 +1124,7 @@ void upload_done_callback(
if(!(can_afford_transaction(expected_upload_cost)))
{
LLBuyCurrencyHTML::openCurrencyFloater( "", expected_upload_cost );
- is_balance_sufficient = FALSE;
+ is_balance_sufficient = false;
}
else if(region)
{
@@ -1260,7 +1285,7 @@ void upload_new_resource(
data->mAssetInfo.mType,
asset_callback,
(void*)data,
- FALSE);
+ false);
}
}
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index ff2753d240..5fc5be1075 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -127,7 +127,7 @@
extern void on_new_message(const LLSD& msg);
-extern BOOL gCubeSnapshot;
+extern bool gCubeSnapshot;
//
// Constants
@@ -139,7 +139,7 @@ const F32 CAMERA_POSITION_THRESHOLD_SQUARED = 0.001f * 0.001f;
static const U32 LLREQUEST_PERMISSION_THROTTLE_LIMIT = 5; // requests
static const F32 LLREQUEST_PERMISSION_THROTTLE_INTERVAL = 10.0f; // seconds
-extern BOOL gDebugClicks;
+extern bool gDebugClicks;
extern bool gShiftFrame;
// function prototypes
@@ -371,7 +371,7 @@ static LLNotificationFunctorRegistration friendship_offer_callback_reg_nm("Offer
// Functions
//
-void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, BOOL is_group,
+void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, bool is_group,
S32 trx_type, const std::string& desc)
{
if(0 == amount || !region) return;
@@ -393,7 +393,7 @@ void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, BOOL is_
msg->nextBlockFast(_PREHASH_MoneyData);
msg->addUUIDFast(_PREHASH_SourceID, gAgent.getID() );
msg->addUUIDFast(_PREHASH_DestID, uuid);
- msg->addU8Fast(_PREHASH_Flags, pack_transaction_flags(FALSE, is_group));
+ msg->addU8Fast(_PREHASH_Flags, pack_transaction_flags(false, is_group));
msg->addS32Fast(_PREHASH_Amount, amount);
msg->addU8Fast(_PREHASH_AggregatePermNextOwner, (U8)LLAggregatePermissions::AP_EMPTY);
msg->addU8Fast(_PREHASH_AggregatePermInventory, (U8)LLAggregatePermissions::AP_EMPTY);
@@ -974,13 +974,13 @@ static void highlight_inventory_objects_in_panel(const std::vector<LLUUID>& item
// Parent folders can be different in case of 2 consecutive drag and drop
// operations when the second one is started before the first one completes.
LL_DEBUGS("Inventory_Move") << "Open folder: " << fv_folder->getName() << LL_ENDL;
- fv_folder->setOpen(TRUE);
+ fv_folder->setOpen(true);
if (fv_folder->isSelected())
{
- fv->changeSelection(fv_folder, FALSE);
+ fv->changeSelection(fv_folder, false);
}
}
- fv->changeSelection(fv_item, TRUE);
+ fv->changeSelection(fv_item, true);
}
}
}
@@ -1344,7 +1344,7 @@ protected:
};
-//Returns TRUE if we are OK, FALSE if we are throttled
+//Returns true if we are OK, false if we are throttled
//Set check_only true if you want to know the throttle status
//without registering a hit
bool check_offer_throttle(const std::string& from_name, bool check_only)
@@ -1465,7 +1465,7 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam
{
LL_DEBUGS("Messaging") << "Highlighting inventory item: " << item->getUUID() << LL_ENDL;
// If we opened this ourselves, focus it
- const BOOL take_focus = from_name.empty() ? TAKE_FOCUS_YES : TAKE_FOCUS_NO;
+ const bool take_focus = from_name.empty() ? TAKE_FOCUS_YES : TAKE_FOCUS_NO;
switch(asset_type)
{
case LLAssetType::AT_NOTECARD:
@@ -1564,7 +1564,7 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam
// Highlight item
bool show_in_inventory = gSavedSettings.get<bool>("ShowInInventory");
bool auto_open =
- show_in_inventory && // don't open if ShowInInventory is FALSE
+ show_in_inventory && // don't open if ShowInInventory is false
!from_name.empty(); // don't open if it's not from anyone
// SL-20419 : Don't change active tab if floater is visible
@@ -1646,7 +1646,7 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id,
{
return (notification->getPayload()["from_id"].asUUID() == blocked_id);
}
- return FALSE;
+ return false;
}
private:
const LLUUID& blocked_id;
@@ -1668,8 +1668,8 @@ std::string LLOfferInfo::mResponderType = "offer_info";
LLOfferInfo::LLOfferInfo()
: LLNotificationResponderInterface()
- , mFromGroup(FALSE)
- , mFromObject(FALSE)
+ , mFromGroup(false)
+ , mFromObject(false)
, mIM(IM_NOTHING_SPECIAL)
, mType(LLAssetType::AT_NONE)
, mPersist(false)
@@ -1752,7 +1752,7 @@ void LLOfferInfo::sendReceiveResponse(bool accept, const LLUUID &destination_fol
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_MessageBlock);
- msg->addBOOLFast(_PREHASH_FromGroup, FALSE);
+ msg->addBOOLFast(_PREHASH_FromGroup, false);
msg->addUUIDFast(_PREHASH_ToAgentID, mFromID);
msg->addU8Fast(_PREHASH_Offline, IM_ONLINE);
msg->addUUIDFast(_PREHASH_ID, mTransactionID);
@@ -1946,7 +1946,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
chat.mText = log_message;
if( LLMuteList::getInstance()->isMuted(mFromID ) && ! LLMuteList::isLinden(mFromName) ) // muting for SL-42269
{
- chat.mMuted = TRUE;
+ chat.mMuted = true;
accept_to_trash = false; // will send decline message
}
@@ -2041,7 +2041,7 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
std::string from_string; // Used in the pop-up.
std::string chatHistory_string; // Used in chat history.
- if (mFromObject == TRUE)
+ if (mFromObject == true)
{
if (mFromGroup)
{
@@ -2167,7 +2167,7 @@ bool lure_callback(const LLSD& notification, const LLSD& response)
LLUUID from_id = notification["payload"]["from_id"].asUUID();
LLUUID lure_id = notification["payload"]["lure_id"].asUUID();
- BOOL godlike = notification["payload"]["godlike"].asBoolean();
+ bool godlike = notification["payload"]["godlike"].asBoolean();
switch(option)
{
@@ -2216,7 +2216,7 @@ bool mature_lure_callback(const LLSD& notification, const LLSD& response)
LLUUID from_id = notification["payload"]["from_id"].asUUID();
LLUUID lure_id = notification["payload"]["lure_id"].asUUID();
- BOOL godlike = notification["payload"]["godlike"].asBoolean();
+ bool godlike = notification["payload"]["godlike"].asBoolean();
U8 region_access = static_cast<U8>(notification["payload"]["region_maturity"].asInteger());
switch(option)
@@ -2281,7 +2281,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
LL_PROFILE_ZONE_SCOPED;
LLUUID from_id;
- BOOL from_group;
+ bool from_group;
LLUUID to_id;
U8 offline;
U8 d = 0;
@@ -2341,7 +2341,7 @@ void send_do_not_disturb_message (LLMessageSystem* msg, const LLUUID& from_id, c
pack_instant_message(
msg,
gAgent.getID(),
- FALSE,
+ false,
gAgent.getSessionID(),
from_id,
my_name,
@@ -2541,10 +2541,10 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
chat.mFromName = from_name;
}
- BOOL is_do_not_disturb = gAgent.isDoNotDisturb();
+ bool is_do_not_disturb = gAgent.isDoNotDisturb();
- BOOL is_muted = FALSE;
- BOOL is_linden = FALSE;
+ bool is_muted = false;
+ bool is_linden = false;
is_muted = LLMuteList::getInstance()->isMuted(
from_id,
from_name,
@@ -2558,7 +2558,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
return;
}
- BOOL is_audible = (CHAT_AUDIBLE_FULLY == chat.mAudible);
+ bool is_audible = (CHAT_AUDIBLE_FULLY == chat.mAudible);
chatter = gObjectList.findObject(from_id);
if (chatter)
{
@@ -2592,25 +2592,25 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
if (is_audible)
{
- //BOOL visible_in_chat_bubble = FALSE;
+ //bool visible_in_chat_bubble = false;
color.setVec(1.f,1.f,1.f,1.f);
msg->getStringFast(_PREHASH_ChatData, _PREHASH_Message, mesg);
- BOOL ircstyle = FALSE;
+ bool ircstyle = false;
// Look for IRC-style emotes here so chatbubbles work
std::string prefix = mesg.substr(0, 4);
if (prefix == "/me " || prefix == "/me'")
{
- ircstyle = TRUE;
+ ircstyle = true;
}
chat.mText = mesg;
// Look for the start of typing so we can put "..." in the bubbles.
if (CHAT_TYPE_START == chat.mChatType)
{
- LLLocalSpeakerMgr::getInstance()->setSpeakerTyping(from_id, TRUE);
+ LLLocalSpeakerMgr::getInstance()->setSpeakerTyping(from_id, true);
// Might not have the avatar constructed yet, eg on login.
if (chatter && chatter->isAvatar())
@@ -2621,7 +2621,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
}
else if (CHAT_TYPE_STOP == chat.mChatType)
{
- LLLocalSpeakerMgr::getInstance()->setSpeakerTyping(from_id, FALSE);
+ LLLocalSpeakerMgr::getInstance()->setSpeakerTyping(from_id, false);
// Might not have the avatar constructed yet, eg on login.
if (chatter && chatter->isAvatar())
@@ -2670,7 +2670,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
// We have a real utterance now, so can stop showing "..." and proceed.
if (chatter && chatter->isAvatar())
{
- LLLocalSpeakerMgr::getInstance()->setSpeakerTyping(from_id, FALSE);
+ LLLocalSpeakerMgr::getInstance()->setSpeakerTyping(from_id, false);
((LLVOAvatar*)chatter)->stopTyping();
if (!is_muted && !is_do_not_disturb)
@@ -2777,11 +2777,11 @@ void process_teleport_start(LLMessageSystem *msg, void**)
if (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL)
{
- gViewerWindow->setProgressCancelButtonVisible(FALSE);
+ gViewerWindow->setProgressCancelButtonVisible(false);
}
else
{
- gViewerWindow->setProgressCancelButtonVisible(TRUE, LLTrans::getString("Cancel"));
+ gViewerWindow->setProgressCancelButtonVisible(true, LLTrans::getString("Cancel"));
}
// Freeze the UI and show progress bar
@@ -2789,7 +2789,7 @@ void process_teleport_start(LLMessageSystem *msg, void**)
if( gAgent.getTeleportState() == LLAgent::TELEPORT_NONE )
{
- gTeleportDisplay = TRUE;
+ gTeleportDisplay = true;
gAgent.setTeleportState( LLAgent::TELEPORT_START );
make_ui_sound("UISndTeleportOut");
@@ -2819,11 +2819,11 @@ void process_teleport_progress(LLMessageSystem* msg, void**)
msg->getU32("Info", "TeleportFlags", teleport_flags);
if (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL)
{
- gViewerWindow->setProgressCancelButtonVisible(FALSE);
+ gViewerWindow->setProgressCancelButtonVisible(false);
}
else
{
- gViewerWindow->setProgressCancelButtonVisible(TRUE, LLTrans::getString("Cancel"));
+ gViewerWindow->setProgressCancelButtonVisible(true, LLTrans::getString("Cancel"));
}
std::string buffer;
msg->getString("Info", "Message", buffer);
@@ -2890,7 +2890,7 @@ public:
virtual ~LLPostTeleportNotifiers();
//function to be called at the supplied frequency
- virtual BOOL tick();
+ virtual bool tick();
};
LLPostTeleportNotifiers::LLPostTeleportNotifiers() : LLEventTimer( 2.0 )
@@ -2901,9 +2901,9 @@ LLPostTeleportNotifiers::~LLPostTeleportNotifiers()
{
}
-BOOL LLPostTeleportNotifiers::tick()
+bool LLPostTeleportNotifiers::tick()
{
- BOOL all_done = FALSE;
+ bool all_done = false;
if ( gAgent.getTeleportState() == LLAgent::TELEPORT_NONE )
{
// get callingcards and landmarks available to the user arriving.
@@ -2927,7 +2927,7 @@ BOOL LLPostTeleportNotifiers::tick()
gInventory.addObserver(fetcher);
}
}
- all_done = TRUE;
+ all_done = true;
}
return all_done;
@@ -2961,7 +2961,7 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
{
// Race condition? Make sure all variables are set correctly for teleport to work
LL_WARNS("Teleport","Messaging") << "Teleport 'finish' message without 'start'. Setting state to TELEPORT_REQUESTED" << LL_ENDL;
- gTeleportDisplay = TRUE;
+ gTeleportDisplay = true;
LLViewerMessage::getInstance()->mTeleportStartedSignal();
gAgent.setTeleportState(LLAgent::TELEPORT_REQUESTED);
make_ui_sound("UISndTeleportOut");
@@ -2973,11 +2973,11 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
}
// Teleport is finished; it can't be cancelled now.
- gViewerWindow->setProgressCancelButtonVisible(FALSE);
+ gViewerWindow->setProgressCancelButtonVisible(false);
// Do teleport effect for where you're leaving
// VEFFECT: TeleportStart
- LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, TRUE);
+ LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, true);
effectp->setPositionGlobal(gAgent.getPositionGlobal());
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
LLHUDManager::getInstance()->sendEffects();
@@ -3021,7 +3021,7 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
LLHost sim_host(sim_ip, sim_port);
// Viewer trusts the simulator.
- gMessageSystem->enableCircuit(sim_host, TRUE);
+ gMessageSystem->enableCircuit(sim_host, true);
LLViewerRegion* regionp = LLWorld::getInstance()->addRegion(region_handle, sim_host);
/*
@@ -3029,7 +3029,7 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
gAgentCamera.updateCamera();
// likewise make sure the camera is behind the avatar
- gAgentCamera.resetView(TRUE);
+ gAgentCamera.resetView(true);
LLVector3 shift_vector = regionp->getPosRegionFromGlobal(gAgent.getRegion()->getOriginGlobal());
gAgent.setRegion(regionp);
gObjectList.shiftObjects(shift_vector);
@@ -3072,15 +3072,15 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
// Now do teleport effect for where you're going.
// VEFFECT: TeleportEnd
- effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, TRUE);
+ effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, true);
effectp->setPositionGlobal(gAgent.getPositionGlobal());
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
LLHUDManager::getInstance()->sendEffects();
-// gTeleportDisplay = TRUE;
+// gTeleportDisplay = true;
// gTeleportDisplayTimer.reset();
-// gViewerWindow->setShowProgress(TRUE);
+// gViewerWindow->setShowProgress(true);
}
// stuff we have to do every time we get an AvatarInitComplete from a sim
@@ -3177,7 +3177,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
look_at = LLViewerCamera::getInstance()->getAtAxis();
}
// Force the camera back onto the agent, don't animate.
- gAgentCamera.setFocusOnAvatar(TRUE, FALSE);
+ gAgentCamera.setFocusOnAvatar(true, false);
gAgentCamera.slamLookAt(look_at);
gAgentCamera.updateCamera();
@@ -3237,15 +3237,15 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
/*
if (teleport_flags & TELEPORT_FLAGS_IS_FLYING)
{
- gAgent.setFlying(TRUE);
+ gAgent.setFlying(true);
}
else
{
- gAgent.setFlying(FALSE);
+ gAgent.setFlying(false);
}
*/
- send_agent_update(TRUE, TRUE);
+ send_agent_update(true, true);
if (gAgent.getRegion()->getBlockFly())
{
@@ -3324,7 +3324,7 @@ const F32 THRESHOLD_HEAD_ROT_QDOT = 0.9997f; // ~= 2.5 degrees -- if its less th
const F32 MAX_HEAD_ROT_QDOT = 0.99999f; // ~= 0.5 degrees -- if its greater than this then no need to update head_rot
// between these values we delay the updates (but no more than one second)
-void send_agent_update(BOOL force_send, BOOL send_reliable)
+void send_agent_update(bool force_send, bool send_reliable)
{
LL_PROFILE_ZONE_SCOPED;
llassert(!gCubeSnapshot);
@@ -3395,7 +3395,7 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
// trigger a control event.
U32 control_flags = gAgent.getControlFlags();
- MASK key_mask = gKeyboard->currentMask(TRUE);
+ MASK key_mask = gKeyboard->currentMask(true);
if (key_mask & MASK_ALT || key_mask & MASK_CONTROL)
{
@@ -3969,7 +3969,7 @@ void process_preload_sound(LLMessageSystem *msg, void **user_data)
if (gAgent.canAccessMaturityAtGlobal(pos_global))
{
// Add audioData starts a transfer internally.
- sourcep->addAudioData(datap, FALSE);
+ sourcep->addAudioData(datap, false);
}
}
@@ -4084,7 +4084,7 @@ void process_sim_stats(LLMessageSystem *msg, void **user_data)
LLViewerRegion* regionp = gAgent.getRegion();
if (regionp)
{
- BOOL was_flying = gAgent.getFlying();
+ bool was_flying = gAgent.getFlying();
regionp->setRegionFlags(region_flags);
regionp->setMaxTasks(max_tasks_per_region);
// HACK: This makes agents drop from the sky if the region is
@@ -4147,7 +4147,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
// See EXT-2781.
if (animation_id == ANIM_AGENT_STANDUP && gAgent.getFlying())
{
- gAgent.setFlying(FALSE);
+ gAgent.setFlying(false);
}
if (i < num_source_blocks)
@@ -4157,9 +4157,9 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
LLViewerObject* object = gObjectList.findObject(object_id);
if (object)
{
- object->setFlagsWithoutUpdate(FLAGS_ANIM_SOURCE, TRUE);
+ object->setFlagsWithoutUpdate(FLAGS_ANIM_SOURCE, true);
- BOOL anim_found = FALSE;
+ bool anim_found = false;
LLVOAvatar::AnimSourceIterator anim_it = avatarp->mAnimationSources.find(object_id);
for (;anim_it != avatarp->mAnimationSources.end(); ++anim_it)
{
@@ -4171,7 +4171,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
}
if (anim_it->second == animation_id)
{
- anim_found = TRUE;
+ anim_found = true;
break;
}
}
@@ -4298,7 +4298,7 @@ void process_camera_constraint(LLMessageSystem *mesgsys, void **user_data)
gAgentCamera.setCameraCollidePlane(cameraCollidePlane);
}
-void near_sit_object(BOOL success, void *data)
+void near_sit_object(bool success, void *data)
{
if (success)
{
@@ -4316,7 +4316,7 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data)
LLVector3 sitPosition;
LLQuaternion sitRotation;
LLUUID sitObjectID;
- BOOL use_autopilot;
+ bool use_autopilot;
mesgsys->getUUIDFast(_PREHASH_SitObject, _PREHASH_ID, sitObjectID);
mesgsys->getBOOLFast(_PREHASH_SitTransform, _PREHASH_AutoPilot, use_autopilot);
mesgsys->getVector3Fast(_PREHASH_SitTransform, _PREHASH_SitPosition, sitPosition);
@@ -4325,7 +4325,7 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data)
mesgsys->getVector3Fast(_PREHASH_SitTransform, _PREHASH_CameraEyeOffset, camera_eye);
LLVector3 camera_at;
mesgsys->getVector3Fast(_PREHASH_SitTransform, _PREHASH_CameraAtOffset, camera_at);
- BOOL force_mouselook;
+ bool force_mouselook;
mesgsys->getBOOLFast(_PREHASH_SitTransform, _PREHASH_ForceMouselook, force_mouselook);
if (isAgentAvatarValid() && dist_vec_squared(camera_eye, camera_at) > CAMERA_POSITION_THRESHOLD_SQUARED)
@@ -4336,7 +4336,7 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data)
gAgentCamera.setForceMouselook(force_mouselook);
// Forcing turning off flying here to prevent flying after pressing "Stand"
// to stand up from an object. See EXT-1655.
- gAgent.setFlying(FALSE);
+ gAgent.setFlying(false);
LLViewerObject* object = gObjectList.findObject(sitObjectID);
if (object)
@@ -4384,7 +4384,7 @@ void process_set_follow_cam_properties(LLMessageSystem *mesgsys, void **user_dat
LLViewerObject* objectp = gObjectList.findObject(source_id);
if (objectp)
{
- objectp->setFlagsWithoutUpdate(FLAGS_CAMERA_SOURCE, TRUE);
+ objectp->setFlagsWithoutUpdate(FLAGS_CAMERA_SOURCE, true);
}
S32 num_objects = mesgsys->getNumberOfBlocks("CameraProperty");
@@ -4569,11 +4569,11 @@ void process_user_list_reply(LLMessageSystem *msg, void **user_data)
if (status & 0x01)
{
- dialog_friends_add_friend(buffer, TRUE);
+ dialog_friends_add_friend(buffer, true);
}
else
{
- dialog_friends_add_friend(buffer, FALSE);
+ dialog_friends_add_friend(buffer, false);
}
}
@@ -4750,12 +4750,12 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg)
// and agent ids for name lookup.
S32 transaction_type = 0;
LLUUID source_id;
- BOOL is_source_group = FALSE;
+ bool is_source_group = false;
LLUUID dest_id;
- BOOL is_dest_group = FALSE;
+ bool is_dest_group = false;
S32 amount = 0;
std::string item_description;
- BOOL success = FALSE;
+ bool success = false;
msg->getS32("TransactionInfo", "TransactionType", transaction_type);
msg->getUUID("TransactionInfo", "SourceID", source_id);
@@ -5217,9 +5217,9 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
gViewerWindow->saveSnapshot(snap_filename,
gViewerWindow->getWindowWidthRaw(),
gViewerWindow->getWindowHeightRaw(),
- FALSE, //UI
+ false, //UI
gSavedSettings.getBOOL("RenderHUDInSnapshot"),
- FALSE,
+ false,
LLSnapshotModel::SNAPSHOT_TYPE_COLOR,
LLSnapshotModel::SNAPSHOT_FORMAT_PNG);
}
@@ -5322,9 +5322,9 @@ static void process_special_alert_messages(const std::string & message)
gViewerWindow->saveSnapshot(snap_filename,
gViewerWindow->getWindowWidthRaw(),
gViewerWindow->getWindowHeightRaw(),
- FALSE,
+ false,
gSavedSettings.getBOOL("RenderHUDInSnapshot"),
- FALSE,
+ false,
LLSnapshotModel::SNAPSHOT_TYPE_COLOR,
LLSnapshotModel::SNAPSHOT_FORMAT_PNG);
}
@@ -5345,7 +5345,7 @@ void process_agent_alert_message(LLMessageSystem* msgsystem, void** user_data)
if (!attempt_standard_notification(msgsystem))
{
- BOOL modal = FALSE;
+ bool modal = false;
msgsystem->getBOOL("AlertData", "Modal", modal);
process_alert_core(message, modal);
}
@@ -5368,7 +5368,7 @@ void process_alert_message(LLMessageSystem *msgsystem, void **user_data)
if (!attempt_standard_notification(msgsystem))
{
- BOOL modal = FALSE;
+ bool modal = false;
process_alert_core(message, modal);
static LLCachedControl<S32> ban_lines_mode(gSavedSettings , "ShowBanLines" , LLViewerParcelMgr::PARCEL_BAN_LINES_ON_COLLISION);
@@ -5403,7 +5403,7 @@ bool handle_special_alerts(const std::string &pAlertName)
return isHandled;
}
-void process_alert_core(const std::string& message, BOOL modal)
+void process_alert_core(const std::string& message, bool modal)
{
const std::string ALERT_PREFIX("ALERT: ");
const std::string NOTIFY_PREFIX("NOTIFY: ");
@@ -5527,7 +5527,7 @@ void process_mean_collision_alert_message(LLMessageSystem *msgsystem, void **use
type = (EMeanCollisionType)u8type;
- BOOL b_found = FALSE;
+ bool b_found = false;
for (mean_collision_list_t::iterator iter = gMeanCollisionList.begin();
iter != gMeanCollisionList.end(); ++iter)
@@ -5537,7 +5537,7 @@ void process_mean_collision_alert_message(LLMessageSystem *msgsystem, void **use
{
mcd->mTime = time;
mcd->mMag = mag;
- b_found = TRUE;
+ b_found = true;
break;
}
}
@@ -5561,7 +5561,7 @@ void process_frozen_message(LLMessageSystem *msgsystem, void **user_data)
// make sure the cursor is back to the usual default since the
// alert is probably due to some kind of error.
gViewerWindow->getWindow()->resetBusyCount();
- BOOL b_frozen;
+ bool b_frozen;
msgsystem->getBOOL("FrozenData", "Data", b_frozen);
@@ -5580,7 +5580,7 @@ void process_economy_data(LLMessageSystem *msg, void** /*user_data*/)
LL_DEBUGS("Benefits") << "Received economy data, not currently used" << LL_ENDL;
}
-void notify_cautioned_script_question(const LLSD& notification, const LLSD& response, S32 orig_questions, BOOL granted)
+void notify_cautioned_script_question(const LLSD& notification, const LLSD& response, S32 orig_questions, bool granted)
{
// only continue if at least some permissions were requested
if (orig_questions)
@@ -5599,7 +5599,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp
// try to lookup viewerobject that corresponds to the object that
// requested permissions (here, taskid->requesting object id)
- BOOL foundpos = FALSE;
+ bool foundpos = false;
LLViewerObject* viewobj = gObjectList.findObject(notification["payload"]["task_id"].asUUID());
if (viewobj)
{
@@ -5615,7 +5615,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp
std::string formatpos = llformat("%.1f, %.1f,%.1f", objpos[VX], objpos[VY], objpos[VZ]);
notice.setArg("[REGIONPOS]", formatpos);
- foundpos = TRUE;
+ foundpos = true;
}
}
@@ -5628,7 +5628,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp
// check each permission that was requested, and list each
// permission that has been flagged as a caution permission
- BOOL caution = FALSE;
+ bool caution = false;
S32 count = 0;
std::string perms;
for (const script_perm_t& script_perm : SCRIPT_PERMISSIONS)
@@ -5637,7 +5637,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp
&& script_perm.caution)
{
count++;
- caution = TRUE;
+ caution = true;
// add a comma before the permission description if it is not the first permission
// added to the list or the last permission to check
@@ -5657,7 +5657,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp
if (caution)
{
LLChat chat(notice.getString());
- // LLFloaterChat::addChat(chat, FALSE, FALSE);
+ // LLFloaterChat::addChat(chat, false, false);
}
}
}
@@ -5698,13 +5698,13 @@ bool script_question_cb(const LLSD& notification, const LLSD& response)
}
// check whether permissions were granted or denied
- BOOL allowed = TRUE;
+ bool allowed = true;
// the "yes/accept" button is the first button in the template, making it button 0
// if any other button was clicked, the permissions were denied
if (option != 0)
{
new_questions = 0;
- allowed = FALSE;
+ allowed = false;
}
else if(experience.notNull())
{
@@ -5989,7 +5989,7 @@ void container_inventory_arrived(LLViewerObject* object,
LLSaleInfo::DEFAULT,
item->getFlags(),
creation_date_utc);
- new_item->updateServer(TRUE);
+ new_item->updateServer(true);
gInventory.updateItem(new_item);
}
}
@@ -6030,7 +6030,7 @@ void container_inventory_arrived(LLViewerObject* object,
LLSaleInfo::DEFAULT,
item->getFlags(),
creation_date_utc);
- new_item->updateServer(TRUE);
+ new_item->updateServer(true);
gInventory.updateItem(new_item);
gInventory.notifyObservers();
if(active_panel)
@@ -6040,7 +6040,7 @@ void container_inventory_arrived(LLViewerObject* object,
}
// we've got the inventory, now delete this object if this was a take
- BOOL delete_object = (BOOL)(intptr_t)data;
+ bool delete_object = (bool)(intptr_t)data;
LLViewerRegion *region = gAgent.getRegion();
if (delete_object && region)
{
@@ -6190,7 +6190,7 @@ void process_teleport_local(LLMessageSystem *msg,void**)
// after tp, keep the teleport state and let progress screen clear it after a short delay
// (progress screen is active but not visible) *TODO: remove when SVC-5290 is fixed
gTeleportDisplayTimer.reset();
- gTeleportDisplay = TRUE;
+ gTeleportDisplay = true;
}
else
{
@@ -6203,11 +6203,11 @@ void process_teleport_local(LLMessageSystem *msg,void**)
// Sim tells us whether the new position is off the ground
if (teleport_flags & TELEPORT_FLAGS_IS_FLYING)
{
- gAgent.setFlying(TRUE);
+ gAgent.setFlying(true);
}
else
{
- gAgent.setFlying(FALSE);
+ gAgent.setFlying(false);
}
gAgent.setPositionAgent(pos);
@@ -6215,13 +6215,13 @@ void process_teleport_local(LLMessageSystem *msg,void**)
if ( !(gAgent.getTeleportKeepsLookAt() && LLViewerJoystick::getInstance()->getOverrideCamera()) )
{
- gAgentCamera.resetView(TRUE, TRUE);
+ gAgentCamera.resetView(true, true);
}
// send camera update to new region
gAgentCamera.updateCamera();
- send_agent_update(TRUE, TRUE);
+ send_agent_update(true, true);
// Let the interested parties know we've teleported.
// Vadim *HACK: Agent position seems to get reset (to render position?)
@@ -6467,7 +6467,7 @@ void send_improved_im(const LLUUID& to_id,
pack_instant_message(
gMessageSystem,
gAgent.getID(),
- FALSE,
+ false,
gAgent.getSessionID(),
to_id,
name,
@@ -6738,7 +6738,7 @@ void process_load_url(LLMessageSystem* msg, void**)
{
LLUUID object_id;
LLUUID owner_id;
- BOOL owner_is_group;
+ bool owner_is_group;
char object_name[256]; /* Flawfinder: ignore */
char message[256]; /* Flawfinder: ignore */
char url[256]; /* Flawfinder: ignore */
@@ -6816,7 +6816,7 @@ void process_initiate_download(LLMessageSystem* msg, void**)
sim_filename,
LL_PATH_NONE,
msg->getSender(),
- FALSE, // don't delete remote
+ false, // don't delete remote
callback_download_complete,
(void**)new std::string(viewer_filename));
}
@@ -6850,7 +6850,7 @@ void process_script_teleport_request(LLMessageSystem* msg, void**)
// remove above two lines and replace with below line
// to re-enable parcel browser for llMapDestination()
- // LLURLDispatcher::dispatch(LLSLURL::buildSLURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]), FALSE);
+ // LLURLDispatcher::dispatch(LLSLURL::buildSLURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]), false);
}
@@ -6909,7 +6909,7 @@ void process_covenant_reply(LLMessageSystem* msg, void**)
LLFloaterBuyLand::updateLastModified(last_modified);
// load the actual covenant asset data
- const BOOL high_priority = TRUE;
+ const bool high_priority = true;
if (covenant_id.notNull())
{
gAssetStorage->getEstateAsset(gAgent.getRegionHost(),
diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h
index 1e5a69ae13..b5f7390ce5 100644
--- a/indra/newview/llviewermessage.h
+++ b/indra/newview/llviewermessage.h
@@ -62,8 +62,8 @@ enum InventoryOfferResponse
IOR_SHOW
};
-BOOL can_afford_transaction(S32 cost);
-void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, BOOL is_group = FALSE,
+bool can_afford_transaction(S32 cost);
+void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, bool is_group = false,
S32 trx_type = TRANS_GIFT, const std::string& desc = LLStringUtil::null);
void send_join_group_response(LLUUID group_id,
LLUUID transaction_id,
@@ -81,7 +81,7 @@ void process_script_question(LLMessageSystem *msg, void **user_data);
void process_chat_from_simulator(LLMessageSystem *mesgsys, void **user_data);
//void process_agent_to_new_region(LLMessageSystem *mesgsys, void **user_data);
-void send_agent_update(BOOL force_send, BOOL send_reliable = FALSE);
+void send_agent_update(bool force_send, bool send_reliable = false);
void process_object_update(LLMessageSystem *mesgsys, void **user_data);
void process_compressed_object_update(LLMessageSystem *mesgsys, void **user_data);
void process_cached_object_update(LLMessageSystem *mesgsys, void **user_data);
@@ -117,7 +117,7 @@ void process_adjust_balance(LLMessageSystem* msg_system, void**);
bool attempt_standard_notification(LLMessageSystem* msg);
void process_alert_message(LLMessageSystem* msg, void**);
void process_agent_alert_message(LLMessageSystem* msgsystem, void** user_data);
-void process_alert_core(const std::string& message, BOOL modal);
+void process_alert_core(const std::string& message, bool modal);
// "Mean" or player-vs-player abuse
typedef std::list<LLMeanCollisionData*> mean_collision_list_t;
@@ -236,8 +236,8 @@ public:
static std::string mResponderType;
EInstantMessage mIM;
LLUUID mFromID;
- BOOL mFromGroup;
- BOOL mFromObject;
+ bool mFromGroup;
+ bool mFromObject;
LLUUID mTransactionID;
LLUUID mFolderID;
LLUUID mObjectID;
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index f1fac106c7..d50cb43cb0 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -107,22 +107,23 @@
#include "llmeshrepository.h"
#include "llgltfmateriallist.h"
#include "llgl.h"
+#include "gltf/asset.h"
//#define DEBUG_UPDATE_TYPE
-BOOL LLViewerObject::sVelocityInterpolate = TRUE;
-BOOL LLViewerObject::sPingInterpolate = TRUE;
+bool LLViewerObject::sVelocityInterpolate = true;
+bool LLViewerObject::sPingInterpolate = true;
U32 LLViewerObject::sNumZombieObjects = 0;
S32 LLViewerObject::sNumObjects = 0;
-BOOL LLViewerObject::sMapDebug = TRUE;
+bool LLViewerObject::sMapDebug = true;
LLColor4 LLViewerObject::sEditSelectColor( 1.0f, 1.f, 0.f, 0.3f); // Edit OK
LLColor4 LLViewerObject::sNoEditSelectColor( 1.0f, 0.f, 0.f, 0.3f); // Can't edit
S32 LLViewerObject::sAxisArrowLength(50);
-BOOL LLViewerObject::sPulseEnabled(FALSE);
-BOOL LLViewerObject::sUseSharedDrawables(FALSE); // TRUE
+bool LLViewerObject::sPulseEnabled(false);
+bool LLViewerObject::sUseSharedDrawables(false); // true
// sMaxUpdateInterpolationTime must be greater than sPhaseOutUpdateInterpolationTime
F64Seconds LLViewerObject::sMaxUpdateInterpolationTime(3.0); // For motion interpolation: after X seconds with no updates, don't predict object motion
@@ -246,7 +247,7 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco
return res;
}
-LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp, BOOL is_global)
+LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp, bool is_global)
: LLPrimitive(),
mChildList(),
mID(id),
@@ -256,7 +257,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe
mTEImages(NULL),
mTENormalMaps(NULL),
mTESpecularMaps(NULL),
- mbCanSelect(TRUE),
+ mbCanSelect(true),
mFlags(0),
mPhysicsShapeType(0),
mPhysicsGravity(0),
@@ -264,8 +265,8 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe
mPhysicsDensity(0),
mPhysicsRestitution(0),
mDrawable(),
- mCreateSelected(FALSE),
- mRenderMedia(FALSE),
+ mCreateSelected(false),
+ mRenderMedia(false),
mBestUpdatePrecision(0),
mText(),
mHudText(""),
@@ -286,14 +287,14 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe
mExpectedInventorySerialNum(0),
mInvRequestState(INVENTORY_REQUEST_STOPPED),
mInvRequestXFerId(0),
- mInventoryDirty(FALSE),
+ mInventoryDirty(false),
mRegionp(regionp),
- mDead(FALSE),
- mOrphaned(FALSE),
- mUserSelected(FALSE),
- mOnActiveList(FALSE),
- mOnMap(FALSE),
- mStatic(FALSE),
+ mDead(false),
+ mOrphaned(false),
+ mUserSelected(false),
+ mOnActiveList(false),
+ mOnMap(false),
+ mStatic(false),
mSeatCount(0),
mNumFaces(0),
mRotTime(0.f),
@@ -310,7 +311,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe
mPhysicsShapeUnknown(true),
mAttachmentItemID(LLUUID::null),
mLastUpdateType(OUT_UNKNOWN),
- mLastUpdateCached(FALSE),
+ mLastUpdateCached(false),
mCachedMuteListUpdateTime(0),
mCachedOwnerInMuteList(false),
mRiggedAttachedWarned(false)
@@ -447,7 +448,7 @@ void LLViewerObject::markDead()
}
// Mark itself as dead
- mDead = TRUE;
+ mDead = true;
if(mRegionp)
{
mRegionp->removeFromCreatedList(getLocalID());
@@ -751,7 +752,7 @@ void LLViewerObject::setNameValueList(const std::string& name_value_list)
}
}
-BOOL LLViewerObject::isAnySelected() const
+bool LLViewerObject::isAnySelected() const
{
bool any_selected = isSelected();
for (child_list_t::const_iterator iter = mChildList.begin();
@@ -763,7 +764,7 @@ BOOL LLViewerObject::isAnySelected() const
return any_selected;
}
-void LLViewerObject::setSelected(BOOL sel)
+void LLViewerObject::setSelected(bool sel)
{
mUserSelected = sel;
resetRot();
@@ -900,12 +901,12 @@ bool LLViewerObject::crossesParcelBounds()
return mRegionp && mRegionp->objectsCrossParcel(boxes);
}
-BOOL LLViewerObject::setParent(LLViewerObject* parent)
+bool LLViewerObject::setParent(LLViewerObject* parent)
{
if(mParent != parent)
{
LLViewerObject* old_parent = (LLViewerObject*)mParent ;
- BOOL ret = LLPrimitive::setParent(parent);
+ bool ret = LLPrimitive::setParent(parent);
if(ret && old_parent && parent)
{
old_parent->removeChild(this) ;
@@ -913,7 +914,7 @@ BOOL LLViewerObject::setParent(LLViewerObject* parent)
return ret ;
}
- return FALSE ;
+ return false ;
}
void LLViewerObject::addChild(LLViewerObject *childp)
@@ -981,7 +982,7 @@ void LLViewerObject::removeChild(LLViewerObject *childp)
if (childp->isSelected())
{
LLSelectMgr::getInstance()->deselectObjectAndFamily(childp);
- BOOL add_to_end = TRUE;
+ bool add_to_end = true;
LLSelectMgr::getInstance()->selectObjectAndFamily(childp, add_to_end);
}
}
@@ -1019,35 +1020,35 @@ void LLViewerObject::addThisAndNonJointChildren(std::vector<LLViewerObject*>& ob
}
}
-BOOL LLViewerObject::isChild(LLViewerObject *childp) const
+bool LLViewerObject::isChild(LLViewerObject *childp) const
{
for (child_list_t::const_iterator iter = mChildList.begin();
iter != mChildList.end(); iter++)
{
LLViewerObject* testchild = *iter;
if (testchild == childp)
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-// returns TRUE if at least one avatar is sitting on this object
-BOOL LLViewerObject::isSeat() const
+// returns true if at least one avatar is sitting on this object
+bool LLViewerObject::isSeat() const
{
return mSeatCount > 0;
}
-BOOL LLViewerObject::setDrawableParent(LLDrawable* parentp)
+bool LLViewerObject::setDrawableParent(LLDrawable* parentp)
{
if (mDrawable.isNull())
{
- return FALSE;
+ return false;
}
- BOOL ret = mDrawable->mXform.setParent(parentp ? &parentp->mXform : NULL);
+ bool ret = mDrawable->mXform.setParent(parentp ? &parentp->mXform : NULL);
if(!ret)
{
- return FALSE ;
+ return false ;
}
LLDrawable* old_parent = mDrawable->mParent;
mDrawable->mParent = parentp;
@@ -1063,11 +1064,11 @@ BOOL LLViewerObject::setDrawableParent(LLDrawable* parentp)
|| (parentp && parentp->isActive()))
{
// *TODO we should not be relying on setDrawable parent to call markMoved
- gPipeline.markMoved(mDrawable, FALSE);
+ gPipeline.markMoved(mDrawable, false);
}
else if (!mDrawable->isAvatar())
{
- mDrawable->updateXform(TRUE);
+ mDrawable->updateXform(true);
/*if (!mDrawable->getSpatialGroup())
{
mDrawable->movePartition();
@@ -1078,7 +1079,7 @@ BOOL LLViewerObject::setDrawableParent(LLDrawable* parentp)
}
// Show or hide particles, icon and HUD
-void LLViewerObject::hideExtraDisplayItems( BOOL hidden )
+void LLViewerObject::hideExtraDisplayItems( bool hidden )
{
if( mPartSourcep.notNull() )
{
@@ -1108,7 +1109,7 @@ U32 LLViewerObject::checkMediaURL(const std::string &media_url)
mMedia = new LLViewerObjectMedia;
mMedia->mMediaURL = media_url;
mMedia->mMediaType = LLViewerObject::MEDIA_SET;
- mMedia->mPassedWhitelist = FALSE;
+ mMedia->mPassedWhitelist = false;
}
else if (mMedia)
{
@@ -1130,7 +1131,7 @@ U32 LLViewerObject::checkMediaURL(const std::string &media_url)
retval |= MEDIA_URL_UPDATED;
}
mMedia->mMediaURL = media_url;
- mMedia->mPassedWhitelist = FALSE;
+ mMedia->mPassedWhitelist = false;
}
}
return retval;
@@ -1166,6 +1167,20 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
LL_DEBUGS("ObjectUpdate") << " mesgsys " << mesgsys << " dp " << dp << " id " << getID() << " update_type " << (S32) update_type << LL_ENDL;
dumpStack("ObjectUpdateStack");
+ // The new OBJECTDATA_FIELD_SIZE_124, OBJECTDATA_FIELD_SIZE_140, OBJECTDATA_FIELD_SIZE_80
+ // and OBJECTDATA_FIELD_SIZE_64 lengths should be supported in the existing cases below.
+ // Each case should start at the beginning of the buffer and extract all known
+ // values, and ignore any unknown data at the end of the buffer.
+ // This allows new data in the future without breaking current viewers.
+ const S32 OBJECTDATA_FIELD_SIZE_140 = 140; // Full precision avatar update for future extended data
+ const S32 OBJECTDATA_FIELD_SIZE_124 = 124; // Full precision object update for future extended data
+ const S32 OBJECTDATA_FIELD_SIZE_76 = 76; // Full precision avatar update
+ const S32 OBJECTDATA_FIELD_SIZE_60 = 60; // Full precision object update
+ const S32 OBJECTDATA_FIELD_SIZE_80 = 80; // Terse avatar update, 16 bit precision for future extended data
+ const S32 OBJECTDATA_FIELD_SIZE_64 = 64; // Terse object update, 16 bit precision for future extended data
+ const S32 OBJECTDATA_FIELD_SIZE_48 = 48; // Terse avatar update, 16 bit precision
+ const S32 OBJECTDATA_FIELD_SIZE_32 = 32; // Terse object update, 16 bit precision
+
U32 retval = 0x0;
// If region is removed from the list it is also deleted.
@@ -1213,7 +1228,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
U32 x, y;
from_region_handle(region_handle, &x, &y);
- LL_ERRS() << "Object has invalid region " << x << ":" << y << "!" << LL_ENDL;
+ LL_WARNS("UpdateFail") << "Object has invalid region " << x << ":" << y << "!" << LL_ENDL;
return retval;
}
@@ -1240,8 +1255,8 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
const F32 size = LLWorld::getInstance()->getRegionWidthInMeters();
const F32 MAX_HEIGHT = LLWorld::getInstance()->getRegionMaxHeight();
const F32 MIN_HEIGHT = LLWorld::getInstance()->getRegionMinHeight();
- S32 length;
- S32 count;
+ S32 length = 0;
+ S32 count = 0;
S32 this_update_precision = 32; // in bits
// Temporaries, because we need to compare w/ previous to set dirty flags...
@@ -1302,6 +1317,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
mesgsys->getVector3Fast(_PREHASH_ObjectData, _PREHASH_Scale, new_scale, block_num );
length = mesgsys->getSizeFast(_PREHASH_ObjectData, block_num, _PREHASH_ObjectData);
mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_ObjectData, data, length, block_num, MAX_OBJECT_BINARY_DATA_SIZE);
+ length = llmin(length, MAX_OBJECT_BINARY_DATA_SIZE); // getBinaryDataFast() safely fills the buffer to max_size
mTotalCRC = crc;
// Might need to update mSourceMuted here to properly pick up new radius
@@ -1316,25 +1332,27 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
setMaterial(material);
if (mDrawable.notNull())
{
- gPipeline.markMoved(mDrawable, FALSE); // undamped
+ gPipeline.markMoved(mDrawable, false); // undamped
}
}
setClickAction(click_action);
- count = 0;
- LLVector4 collision_plane;
-
+ count = 0;
+ LLVector4 collision_plane;
+
switch(length)
{
- case (60 + 16):
+ case OBJECTDATA_FIELD_SIZE_140:
+ case OBJECTDATA_FIELD_SIZE_76:
// pull out collision normal for avatar
htolememcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4));
((LLVOAvatar*)this)->setFootPlane(collision_plane);
count += sizeof(LLVector4);
- // fall through
- case 60:
+
+ case OBJECTDATA_FIELD_SIZE_124:
+ case OBJECTDATA_FIELD_SIZE_60:
this_update_precision = 32;
- // this is a terse update
+ // this is a full precision update
// pos
htolememcpy(new_pos_parent.mV, &data[count], MVT_LLVector3, sizeof(LLVector3));
count += sizeof(LLVector3);
@@ -1359,117 +1377,21 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
resetRot();
}
setAngularVelocity(new_angv);
+ count += sizeof(LLVector3);
#if LL_DARWIN
- if (length == 76)
+ if (length == OBJECTDATA_FIELD_SIZE_76 ||
+ length == OBJECTDATA_FIELD_SIZE_140)
{
setAngularVelocity(LLVector3::zero);
}
#endif
break;
- case(32 + 16):
- // pull out collision normal for avatar
- htolememcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4));
- ((LLVOAvatar*)this)->setFootPlane(collision_plane);
- count += sizeof(LLVector4);
- // fall through
- case 32:
- this_update_precision = 16;
- test_pos_parent.quantize16(-0.5f*size, 1.5f*size, MIN_HEIGHT, MAX_HEIGHT);
-
- // This is a terse 16 update, so treat data as an array of U16's.
-#ifdef LL_BIG_ENDIAN
- htolememcpy(valswizzle, &data[count], MVT_U16Vec3, 6);
- val = valswizzle;
-#else
- val = (U16 *) &data[count];
-#endif
- count += sizeof(U16)*3;
- new_pos_parent.mV[VX] = U16_to_F32(val[VX], -0.5f*size, 1.5f*size);
- new_pos_parent.mV[VY] = U16_to_F32(val[VY], -0.5f*size, 1.5f*size);
- new_pos_parent.mV[VZ] = U16_to_F32(val[VZ], MIN_HEIGHT, MAX_HEIGHT);
-
-#ifdef LL_BIG_ENDIAN
- htolememcpy(valswizzle, &data[count], MVT_U16Vec3, 6);
- val = valswizzle;
-#else
- val = (U16 *) &data[count];
-#endif
- count += sizeof(U16)*3;
- setVelocity(LLVector3(U16_to_F32(val[VX], -size, size),
- U16_to_F32(val[VY], -size, size),
- U16_to_F32(val[VZ], -size, size)));
-
-#ifdef LL_BIG_ENDIAN
- htolememcpy(valswizzle, &data[count], MVT_U16Vec3, 6);
- val = valswizzle;
-#else
- val = (U16 *) &data[count];
-#endif
- count += sizeof(U16)*3;
- setAcceleration(LLVector3(U16_to_F32(val[VX], -size, size),
- U16_to_F32(val[VY], -size, size),
- U16_to_F32(val[VZ], -size, size)));
-
-#ifdef LL_BIG_ENDIAN
- htolememcpy(valswizzle, &data[count], MVT_U16Quat, 4);
- val = valswizzle;
-#else
- val = (U16 *) &data[count];
-#endif
- count += sizeof(U16)*4;
- new_rot.mQ[VX] = U16_to_F32(val[VX], -1.f, 1.f);
- new_rot.mQ[VY] = U16_to_F32(val[VY], -1.f, 1.f);
- new_rot.mQ[VZ] = U16_to_F32(val[VZ], -1.f, 1.f);
- new_rot.mQ[VW] = U16_to_F32(val[VW], -1.f, 1.f);
-
-#ifdef LL_BIG_ENDIAN
- htolememcpy(valswizzle, &data[count], MVT_U16Vec3, 6);
- val = valswizzle;
-#else
- val = (U16 *) &data[count];
-#endif
- new_angv.setVec(U16_to_F32(val[VX], -size, size),
- U16_to_F32(val[VY], -size, size),
- U16_to_F32(val[VZ], -size, size));
- if (new_angv.isExactlyZero())
- {
- // reset rotation time
- resetRot();
- }
- setAngularVelocity(new_angv);
- break;
- case 16:
- this_update_precision = 8;
- test_pos_parent.quantize8(-0.5f*size, 1.5f*size, MIN_HEIGHT, MAX_HEIGHT);
- // this is a terse 8 update
- new_pos_parent.mV[VX] = U8_to_F32(data[0], -0.5f*size, 1.5f*size);
- new_pos_parent.mV[VY] = U8_to_F32(data[1], -0.5f*size, 1.5f*size);
- new_pos_parent.mV[VZ] = U8_to_F32(data[2], MIN_HEIGHT, MAX_HEIGHT);
-
- setVelocity(U8_to_F32(data[3], -size, size),
- U8_to_F32(data[4], -size, size),
- U8_to_F32(data[5], -size, size) );
-
- setAcceleration(U8_to_F32(data[6], -size, size),
- U8_to_F32(data[7], -size, size),
- U8_to_F32(data[8], -size, size) );
-
- new_rot.mQ[VX] = U8_to_F32(data[9], -1.f, 1.f);
- new_rot.mQ[VY] = U8_to_F32(data[10], -1.f, 1.f);
- new_rot.mQ[VZ] = U8_to_F32(data[11], -1.f, 1.f);
- new_rot.mQ[VW] = U8_to_F32(data[12], -1.f, 1.f);
-
- new_angv.setVec(U8_to_F32(data[13], -size, size),
- U8_to_F32(data[14], -size, size),
- U8_to_F32(data[15], -size, size) );
- if (new_angv.isExactlyZero())
- {
- // reset rotation time
- resetRot();
- }
- setAngularVelocity(new_angv);
- break;
+ // length values 48, 32 and 16 were once in viewer code but
+ // are never sent by the SL simulator
+ default:
+ LL_WARNS("UpdateFail") << "Unexpected ObjectData buffer size " << length
+ << " for " << getID() << " with OUT_FULL message" << LL_ENDL;
}
////////////////////////////////////////////////////
@@ -1503,20 +1425,45 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
if (mData)
{
delete [] mData;
- }
+ mData = NULL;
+ }
- // Check for appended generic data
- S32 data_size = mesgsys->getSizeFast(_PREHASH_ObjectData, block_num, _PREHASH_Data);
- if (data_size <= 0)
- {
- mData = NULL;
- }
- else
- {
- // ...has generic data
- mData = new U8[data_size];
- mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_Data, mData, data_size, block_num);
- }
+ // Dec 2023 new generic data:
+ // Trees work as before, this field contains genome data
+ // Not a tree: root objects send 1 byte with the number of
+ // total prims in the linkset
+ // If the generic data size is zero, then number of prims is 1
+ //
+ // Viewers should not check for specific data sizes exactly, but if
+ // the field has data, process it from the start and ignore the remainder.
+
+ // Check for appended generic data
+ const S32 GENERIC_DATA_BUFFER_SIZE = 16;
+ S32 data_size = mesgsys->getSizeFast(_PREHASH_ObjectData, block_num, _PREHASH_Data);
+ if (data_size > 0)
+ { // has generic data
+ if (getPCode() == LL_PCODE_LEGACY_TREE || getPCode() == LL_PCODE_TREE_NEW)
+ {
+ mData = new U8[data_size];
+ mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_Data, mData, data_size, block_num);
+ LL_DEBUGS("NewObjectData") << "Read " << data_size << " bytes tree genome data for " << getID() << ", pcode "
+ << getPCodeString() << ", value " << (S32) mData[0] << LL_ENDL;
+ }
+ else
+ { // Extract number of prims
+ U8 generic_data[GENERIC_DATA_BUFFER_SIZE];
+ mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_Data,
+ &generic_data[0], llmin(data_size, GENERIC_DATA_BUFFER_SIZE), block_num);
+ // This is sample code to extract the number of prims
+ // Future viewers should use it for their own purposes
+ if (!isAvatar())
+ {
+ S32 num_prims = (S32) generic_data[0];
+ LL_DEBUGS("NewObjectData") << "Root prim " << getID() << " has "
+ << num_prims << " prims in linkset" << LL_ENDL;
+ }
+ }
+ }
S32 text_size = mesgsys->getSizeFast(_PREHASH_ObjectData, block_num, _PREHASH_Text);
if (text_size > 1)
@@ -1529,12 +1476,13 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
std::string temp_string;
mesgsys->getStringFast(_PREHASH_ObjectData, _PREHASH_Text, temp_string, block_num );
-
+
LLColor4U coloru;
mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_TextColor, coloru.mV, 4, block_num);
-
+
// alpha was flipped so that it zero encoded better
coloru.mV[3] = 255 - coloru.mV[3];
+
mText->setColor(LLColor4(coloru));
mText->setString(temp_string);
@@ -1566,7 +1514,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
std::unordered_map<U16, ExtraParameter*>::iterator iter;
for (iter = mExtraParameterList.begin(); iter != mExtraParameterList.end(); ++iter)
{
- iter->second->in_use = FALSE;
+ iter->second->in_use = false;
}
// Unpack extra parameters
@@ -1598,7 +1546,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
if (!iter->second->in_use)
{
// Send an update message in case it was formerly in use
- parameterChanged(iter->first, iter->second->data, FALSE, false);
+ parameterChanged(iter->first, iter->second->data, false, false);
}
}
@@ -1612,60 +1560,23 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
#endif
length = mesgsys->getSizeFast(_PREHASH_ObjectData, block_num, _PREHASH_ObjectData);
mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_ObjectData, data, length, block_num, MAX_OBJECT_BINARY_DATA_SIZE);
- count = 0;
+ length = llmin(length, MAX_OBJECT_BINARY_DATA_SIZE); // getBinaryDataFast() safely fills the buffer to max_size
+ count = 0;
LLVector4 collision_plane;
-
+
switch(length)
{
- case(60 + 16):
- // pull out collision normal for avatar
- htolememcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4));
- ((LLVOAvatar*)this)->setFootPlane(collision_plane);
- count += sizeof(LLVector4);
- // fall through
- case 60:
- // this is a terse 32 update
- // pos
- this_update_precision = 32;
- htolememcpy(new_pos_parent.mV, &data[count], MVT_LLVector3, sizeof(LLVector3));
- count += sizeof(LLVector3);
- // vel
- htolememcpy((void*)getVelocity().mV, &data[count], MVT_LLVector3, sizeof(LLVector3));
- count += sizeof(LLVector3);
- // acc
- htolememcpy((void*)getAcceleration().mV, &data[count], MVT_LLVector3, sizeof(LLVector3));
- count += sizeof(LLVector3);
- // theta
- {
- LLVector3 vec;
- htolememcpy(vec.mV, &data[count], MVT_LLVector3, sizeof(LLVector3));
- new_rot.unpackFromVector3(vec);
- }
- count += sizeof(LLVector3);
- // omega
- htolememcpy((void*)new_angv.mV, &data[count], MVT_LLVector3, sizeof(LLVector3));
- if (new_angv.isExactlyZero())
- {
- // reset rotation time
- resetRot();
- }
- setAngularVelocity(new_angv);
-#if LL_DARWIN
- if (length == 76)
- {
- setAngularVelocity(LLVector3::zero);
- }
-#endif
- break;
- case(32 + 16):
+ case OBJECTDATA_FIELD_SIZE_80:
+ case OBJECTDATA_FIELD_SIZE_48:
// pull out collision normal for avatar
htolememcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4));
((LLVOAvatar*)this)->setFootPlane(collision_plane);
count += sizeof(LLVector4);
- // fall through
- case 32:
- // this is a terse 16 update
- this_update_precision = 16;
+
+ case OBJECTDATA_FIELD_SIZE_64:
+ case OBJECTDATA_FIELD_SIZE_32:
+ // this is a terse 16 bit quantized update
+ this_update_precision = 16;
test_pos_parent.quantize16(-0.5f*size, 1.5f*size, MIN_HEIGHT, MAX_HEIGHT);
#ifdef LL_BIG_ENDIAN
@@ -1725,33 +1636,14 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
setAngularVelocity(new_angv);
break;
- case 16:
- // this is a terse 8 update
- this_update_precision = 8;
- test_pos_parent.quantize8(-0.5f*size, 1.5f*size, MIN_HEIGHT, MAX_HEIGHT);
- new_pos_parent.mV[VX] = U8_to_F32(data[0], -0.5f*size, 1.5f*size);
- new_pos_parent.mV[VY] = U8_to_F32(data[1], -0.5f*size, 1.5f*size);
- new_pos_parent.mV[VZ] = U8_to_F32(data[2], MIN_HEIGHT, MAX_HEIGHT);
-
- setVelocity(U8_to_F32(data[3], -size, size),
- U8_to_F32(data[4], -size, size),
- U8_to_F32(data[5], -size, size) );
-
- setAcceleration(U8_to_F32(data[6], -size, size),
- U8_to_F32(data[7], -size, size),
- U8_to_F32(data[8], -size, size) );
-
- new_rot.mQ[VX] = U8_to_F32(data[9], -1.f, 1.f);
- new_rot.mQ[VY] = U8_to_F32(data[10], -1.f, 1.f);
- new_rot.mQ[VZ] = U8_to_F32(data[11], -1.f, 1.f);
- new_rot.mQ[VW] = U8_to_F32(data[12], -1.f, 1.f);
-
- new_angv.set(U8_to_F32(data[13], -size, size),
- U8_to_F32(data[14], -size, size),
- U8_to_F32(data[15], -size, size) );
- setAngularVelocity(new_angv);
- break;
- }
+ // Previous viewers had code for length 76, 60 or 16 byte length
+ // with full precision or 8 bit quanitzation, but the
+ // SL servers will never send those data formats. If you ever see this
+ // warning in Second Life, please file a bug report
+ default:
+ LL_WARNS("UpdateFail") << "Unexpected ObjectData buffer size " << length << " for " << getID()
+ << " with OUT_FULL message" << LL_ENDL;
+ }
U8 state;
mesgsys->getU8Fast(_PREHASH_ObjectData, _PREHASH_State, state, block_num );
@@ -1760,13 +1652,13 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
}
default:
+ LL_WARNS("UpdateFail") << "Unknown uncompressed update type " << update_type << " for " << getID() << LL_ENDL;
break;
-
}
}
else
{
- // handle the compressed case
+ // handle the compressed case - have dp datapacker
LLUUID sound_uuid;
LLUUID owner_id;
F32 gain = 0;
@@ -1849,7 +1741,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
setMaterial(material);
if (mDrawable.notNull())
{
- gPipeline.markMoved(mDrawable, FALSE); // undamped
+ gPipeline.markMoved(mDrawable, false); // undamped
}
}
dp->unpackU8(click_action, "ClickAction");
@@ -1914,6 +1806,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
{
std::string temp_string;
dp->unpackString(temp_string, "Text");
+
LLColor4U coloru;
dp->unpackBinaryDataFixed(coloru.mV, 4, "Color");
coloru.mV[3] = 255 - coloru.mV[3];
@@ -1958,7 +1851,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
std::unordered_map<U16, ExtraParameter*>::iterator iter;
for (iter = mExtraParameterList.begin(); iter != mExtraParameterList.end(); ++iter)
{
- iter->second->in_use = FALSE;
+ iter->second->in_use = false;
}
// Unpack extra params
@@ -1981,7 +1874,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
if (!iter->second->in_use)
{
// Send an update message in case it was formerly in use
- parameterChanged(iter->first, iter->second->data, FALSE, false);
+ parameterChanged(iter->first, iter->second->data, false, false);
}
}
@@ -2020,6 +1913,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
break;
default:
+ LL_WARNS("UpdateFail") << "Unknown compressed update type " << update_type << " for " << getID() << LL_ENDL;
break;
}
}
@@ -2027,7 +1921,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
//
// Fix object parenting.
//
- BOOL b_changed_status = FALSE;
+ bool b_changed_status = false;
if (OUT_TERSE_IMPROVED != update_type)
{
@@ -2067,7 +1961,8 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
if (sent_parentp && sent_parentp->getParent() == this)
{
// Try to recover if we attempt to attach a parent to its child
- LL_WARNS() << "Attempt to attach a parent to it's child: " << this->getID() << " to " << sent_parentp->getID() << LL_ENDL;
+ LL_WARNS("UpdateFail") << "Attempt to attach a parent to it's child: " << this->getID() << " to "
+ << sent_parentp->getID() << LL_ENDL;
this->removeChild(sent_parentp);
sent_parentp->setDrawableParent(NULL);
}
@@ -2085,13 +1980,13 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
//
// new parent is valid
- b_changed_status = TRUE;
+ b_changed_status = true;
// ...no current parent, so don't try to remove child
if (mDrawable.notNull())
{
if (mDrawable->isDead() || !mDrawable->getVObj())
{
- LL_WARNS() << "Drawable is dead or no VObj!" << LL_ENDL;
+ LL_WARNS("UpdateFail") << "Drawable is dead or no VObj!" << LL_ENDL;
sent_parentp->addChild(this);
}
else
@@ -2101,9 +1996,9 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
// Bad, we got a cycle somehow.
// Kill both the parent and the child, and
// set cache misses for both of them.
- LL_WARNS() << "Attempting to recover from parenting cycle!" << LL_ENDL;
- LL_WARNS() << "Killing " << sent_parentp->getID() << " and " << getID() << LL_ENDL;
- LL_WARNS() << "Adding to cache miss list" << LL_ENDL;
+ LL_WARNS("UpdateFail") << "Attempting to recover from parenting cycle! "
+ << "Killing " << sent_parentp->getID() << " and " << getID()
+ << ", Adding to cache miss list" << LL_ENDL;
setParent(NULL);
sent_parentp->setParent(NULL);
getRegion()->addCacheMissFull(getLocalID());
@@ -2116,7 +2011,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
// make sure this object gets a non-damped update
if (sent_parentp->mDrawable.notNull())
{
- gPipeline.markMoved(sent_parentp->mDrawable, FALSE); // undamped
+ gPipeline.markMoved(sent_parentp->mDrawable, false); // undamped
}
}
}
@@ -2126,7 +2021,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
}
// Show particles, icon and HUD
- hideExtraDisplayItems( FALSE );
+ hideExtraDisplayItems( false );
setChanged(MOVED | SILHOUETTE);
}
@@ -2153,7 +2048,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
gObjectList.orphanize(this, parent_id, ip, port);
// Hide particles, icon and HUD
- hideExtraDisplayItems( TRUE );
+ hideExtraDisplayItems( true );
}
}
}
@@ -2244,7 +2139,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
if (sent_parentp && sent_parentp != cur_parentp && sent_parentp != this)
{
// New parent is valid, detach and reattach
- b_changed_status = TRUE;
+ b_changed_status = true;
if (mDrawable.notNull())
{
if (!setDrawableParent(sent_parentp->mDrawable)) // LLViewerObject::processUpdateMessage 2
@@ -2271,7 +2166,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
sent_parentp->setChanged(MOVED | SILHOUETTE);
if (sent_parentp->mDrawable.notNull())
{
- gPipeline.markMoved(sent_parentp->mDrawable, FALSE); // undamped
+ gPipeline.markMoved(sent_parentp->mDrawable, false); // undamped
}
}
else if (!sent_parentp)
@@ -2293,7 +2188,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
if (remove_parent)
{
- b_changed_status = TRUE;
+ b_changed_status = true;
if (mDrawable.notNull())
{
// clear parent to removeChild can put the drawable on the damped list
@@ -2307,7 +2202,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
if (mDrawable.notNull())
{
// make sure this object gets a non-damped update
- gPipeline.markMoved(mDrawable, FALSE); // undamped
+ gPipeline.markMoved(mDrawable, false); // undamped
}
}
}
@@ -2456,11 +2351,11 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
(MAG_CUTOFF >= accel_mag_sq) &&
(MAG_CUTOFF >= getAngularVelocity().magVecSquared()))
{
- mStatic = TRUE; // This object doesn't move!
+ mStatic = true; // This object doesn't move!
}
else
{
- mStatic = FALSE;
+ mStatic = false;
}
// BUG: This code leads to problems during group rotate and any scale operation.
@@ -2475,7 +2370,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
//
// Additionally, if any child is selected, need to update the dialogs and selection
// center.
- BOOL needs_refresh = mUserSelected;
+ bool needs_refresh = mUserSelected;
for (child_list_t::iterator iter = mChildList.begin();
iter != mChildList.end(); iter++)
{
@@ -2483,7 +2378,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
needs_refresh = needs_refresh || child->mUserSelected;
}
- static LLCachedControl<bool> allow_select_avatar(gSavedSettings, "AllowSelectAvatar", FALSE);
+ static LLCachedControl<bool> allow_select_avatar(gSavedSettings, "AllowSelectAvatar", false);
if (needs_refresh)
{
LLSelectMgr::getInstance()->updateSelectionCenter();
@@ -2527,9 +2422,9 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
return retval;
}
-BOOL LLViewerObject::isActive() const
+bool LLViewerObject::isActive() const
{
- return TRUE;
+ return true;
}
//load flags from cache or from message
@@ -2572,7 +2467,7 @@ void LLViewerObject::idleUpdate(LLAgent &agent, const F64 &frame_time)
}
}
- updateDrawable(FALSE);
+ updateDrawable(false);
}
}
@@ -2758,22 +2653,6 @@ void LLViewerObject::interpolateLinearMotion(const F64SecondsImplicit& frame_tim
-BOOL LLViewerObject::setData(const U8 *datap, const U32 data_size)
-{
- delete [] mData;
-
- if (datap)
- {
- mData = new U8[data_size];
- if (!mData)
- {
- return FALSE;
- }
- memcpy(mData, datap, data_size); /* Flawfinder: ignore */
- }
- return TRUE;
-}
-
// delete an item in the inventory, but don't tell the server. This is
// used internally by remove, update, and savescript.
// This will only delete the first item with an item_id in the list
@@ -2813,7 +2692,7 @@ void LLViewerObject::doUpdateInventory(
LLUUID item_id;
LLUUID new_owner;
LLUUID new_group;
- BOOL group_owned = FALSE;
+ bool group_owned = false;
if(old_item)
{
item_id = old_item->getUUID();
@@ -2885,7 +2764,7 @@ void LLViewerObject::doUpdateInventory(
// of the new and old script AFTER the bytecode has been saved.
void LLViewerObject::saveScript(
const LLViewerInventoryItem* item,
- BOOL active,
+ bool active,
bool is_new)
{
/*
@@ -2959,7 +2838,7 @@ void LLViewerObject::dirtyInventory()
delete mInventory;
mInventory = NULL;
}
- mInventoryDirty = TRUE;
+ mInventoryDirty = true;
}
void LLViewerObject::registerInventoryListener(LLVOInventoryListener* listener, void* user_data)
@@ -2988,7 +2867,7 @@ void LLViewerObject::removeInventoryListener(LLVOInventoryListener* listener)
}
}
-BOOL LLViewerObject::isInventoryPending()
+bool LLViewerObject::isInventoryPending()
{
return mInvRequestState != INVENTORY_REQUEST_STOPPED;
}
@@ -3022,7 +2901,7 @@ void LLViewerObject::requestInventory()
else
{
// since we are going to request it now
- mInventoryDirty = FALSE;
+ mInventoryDirty = false;
// Note: throws away duplicate requests
fetchInventoryFromServer();
@@ -3320,7 +3199,7 @@ void LLViewerObject::processTaskInv(LLMessageSystem* msg, void** user_data)
U64 new_id = gXferManager->requestFile(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ft->mFilename),
ft->mFilename, LL_PATH_CACHE,
object->mRegionp->getHost(),
- TRUE,
+ true,
&LLViewerObject::processTaskInvFile,
(void**)ft, // This takes ownership of ft
LLXferManager::HIGH_PRIORITY);
@@ -3397,7 +3276,7 @@ void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtS
delete ft;
}
-BOOL LLViewerObject::loadTaskInvFile(const std::string& filename)
+bool LLViewerObject::loadTaskInvFile(const std::string& filename)
{
std::string filename_and_local_path = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, filename);
llifstream ifs(filename_and_local_path.c_str());
@@ -3459,11 +3338,11 @@ BOOL LLViewerObject::loadTaskInvFile(const std::string& filename)
{
LL_WARNS() << "unable to load task inventory: " << filename_and_local_path
<< LL_ENDL;
- return FALSE;
+ return false;
}
doInventoryCallback();
- return TRUE;
+ return true;
}
void LLViewerObject::doInventoryCallback()
@@ -3790,14 +3669,14 @@ void LLViewerObject::setPixelAreaAndAngle(LLAgent &agent)
}
}
-BOOL LLViewerObject::updateLOD()
+bool LLViewerObject::updateLOD()
{
- return FALSE;
+ return false;
}
-BOOL LLViewerObject::updateGeometry(LLDrawable *drawable)
+bool LLViewerObject::updateGeometry(LLDrawable *drawable)
{
- return TRUE;
+ return false;
}
void LLViewerObject::updateGL()
@@ -3815,7 +3694,7 @@ LLDrawable* LLViewerObject::createDrawable(LLPipeline *pipeline)
return NULL;
}
-void LLViewerObject::setScale(const LLVector3 &scale, BOOL damped)
+void LLViewerObject::setScale(const LLVector3 &scale, bool damped)
{
LLPrimitive::setScale(scale);
if (mDrawable.notNull())
@@ -3835,7 +3714,7 @@ void LLViewerObject::setScale(const LLVector3 &scale, BOOL damped)
llassert_always(LLWorld::getInstance()->getRegionFromHandle(getRegion()->getHandle()));
gObjectList.addToMap(this);
- mOnMap = TRUE;
+ mOnMap = true;
}
}
else
@@ -3843,7 +3722,7 @@ void LLViewerObject::setScale(const LLVector3 &scale, BOOL damped)
if (mOnMap)
{
gObjectList.removeFromMap(this);
- mOnMap = FALSE;
+ mOnMap = false;
}
}
}
@@ -3875,7 +3754,7 @@ void LLViewerObject::setLinksetCost(F32 cost)
mLinksetCost = cost;
mCostStale = false;
- BOOL needs_refresh = isSelected();
+ bool needs_refresh = isSelected();
child_list_t::iterator iter = mChildList.begin();
while(iter != mChildList.end() && !needs_refresh)
{
@@ -4147,7 +4026,7 @@ void LLViewerObject::updateTextures()
{
}
-void LLViewerObject::boostTexturePriority(BOOL boost_children /* = TRUE */)
+void LLViewerObject::boostTexturePriority(bool boost_children /* = true */)
{
if (isDead() || !getVolume())
{
@@ -4165,7 +4044,7 @@ void LLViewerObject::boostTexturePriority(BOOL boost_children /* = TRUE */)
{
LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT);
LLUUID sculpt_id = sculpt_params->getSculptTexture();
- LLViewerTextureManager::getFetchedTexture(sculpt_id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)->setBoostLevel(LLGLTexture::BOOST_SELECTED);
+ LLViewerTextureManager::getFetchedTexture(sculpt_id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)->setBoostLevel(LLGLTexture::BOOST_SELECTED);
}
if (boost_children)
@@ -4258,7 +4137,7 @@ void LLViewerObject::addNVPair(const std::string& data)
mNameValuePairs[nv->mName] = nv;
}
-BOOL LLViewerObject::removeNVPair(const std::string& name)
+bool LLViewerObject::removeNVPair(const std::string& name)
{
char* canonical_name = gNVNameTable.addString(name);
@@ -4284,14 +4163,14 @@ BOOL LLViewerObject::removeNVPair(const std::string& name)
// Remove the NV pair from the local list.
delete nv;
mNameValuePairs.erase(iter);
- return TRUE;
+ return true;
}
else
{
LL_DEBUGS() << "removeNVPair - No region for object" << LL_ENDL;
}
}
- return FALSE;
+ return false;
}
@@ -4372,6 +4251,168 @@ const LLVector3 &LLViewerObject::getPositionAgent() const
return mPositionAgent;
}
+LLMatrix4a LLViewerObject::getGLTFAssetToAgentTransform() const
+{
+ LLMatrix4 root;
+ root.initScale(getScale());
+ root.rotate(getRenderRotation());
+ root.translate(getRenderPosition());
+
+ LLMatrix4a mat;
+ mat.loadu((F32*)root.mMatrix);
+
+ return mat;
+}
+
+LLVector3 LLViewerObject::getGLTFNodePositionAgent(S32 node_index) const
+{
+ LLVector3 ret;
+ getGLTFNodeTransformAgent(node_index, &ret, nullptr, nullptr);
+ return ret;
+
+}
+
+LLMatrix4a LLViewerObject::getAgentToGLTFAssetTransform() const
+{
+ LLMatrix4 root;
+ LLVector3 scale = getScale();
+ scale.mV[0] = 1.f / scale.mV[0];
+ scale.mV[1] = 1.f / scale.mV[1];
+ scale.mV[2] = 1.f / scale.mV[2];
+
+ root.translate(-getRenderPosition());
+ root.rotate(~getRenderRotation());
+
+ LLMatrix4 scale_mat;
+ scale_mat.initScale(scale);
+
+ root *= scale_mat;
+ LLMatrix4a mat;
+ mat.loadu((F32*)root.mMatrix);
+
+ return mat;
+}
+
+LLMatrix4a LLViewerObject::getGLTFNodeTransformAgent(S32 node_index) const
+{
+ LLMatrix4a mat;
+
+ if (mGLTFAsset && node_index >= 0 && node_index < mGLTFAsset->mNodes.size())
+ {
+ auto& node = mGLTFAsset->mNodes[node_index];
+
+ LLMatrix4a asset_to_agent = getGLTFAssetToAgentTransform();
+ LLMatrix4a node_to_agent;
+ matMul(node.mAssetMatrix, asset_to_agent, node_to_agent);
+
+ mat = node_to_agent;
+ }
+ else
+ {
+ mat.setIdentity();
+ }
+
+ return mat;
+}
+void LLViewerObject::getGLTFNodeTransformAgent(S32 node_index, LLVector3* position, LLQuaternion* rotation, LLVector3* scale) const
+{
+ LLMatrix4a node_to_agent = getGLTFNodeTransformAgent(node_index);
+
+ if (position)
+ {
+ LLVector4a p = node_to_agent.getTranslation();
+ position->set(p.getF32ptr());
+ }
+
+ if (rotation)
+ {
+ rotation->set(node_to_agent.asMatrix4());
+ }
+
+ if (scale)
+ {
+ scale->mV[0] = node_to_agent.mMatrix[0].getLength3().getF32();
+ scale->mV[1] = node_to_agent.mMatrix[1].getLength3().getF32();
+ scale->mV[2] = node_to_agent.mMatrix[2].getLength3().getF32();
+ }
+}
+
+void decomposeMatrix(const LLMatrix4a& mat, LLVector3& position, LLQuaternion& rotation, LLVector3& scale)
+{
+ LLVector4a p = mat.getTranslation();
+ position.set(p.getF32ptr());
+
+ rotation.set(mat.asMatrix4());
+
+ scale.mV[0] = mat.mMatrix[0].getLength3().getF32();
+ scale.mV[1] = mat.mMatrix[1].getLength3().getF32();
+ scale.mV[2] = mat.mMatrix[2].getLength3().getF32();
+}
+
+void LLViewerObject::setGLTFNodeRotationAgent(S32 node_index, const LLQuaternion& rotation)
+{
+ if (mGLTFAsset && node_index >= 0 && node_index < mGLTFAsset->mNodes.size())
+ {
+ auto& node = mGLTFAsset->mNodes[node_index];
+
+ LLMatrix4a agent_to_asset = getAgentToGLTFAssetTransform();
+ LLMatrix4a agent_to_node = agent_to_asset;
+
+ if (node.mParent != -1)
+ {
+ auto& parent = mGLTFAsset->mNodes[node.mParent];
+ matMul(agent_to_asset, parent.mAssetMatrixInv, agent_to_node);
+ }
+
+ LLQuaternion agent_to_node_rot(agent_to_node.asMatrix4());
+ LLQuaternion new_rot;
+
+ new_rot = rotation * agent_to_node_rot;
+ new_rot.normalize();
+
+ LLVector3 pos;
+ LLQuaternion rot;
+ LLVector3 scale;
+ decomposeMatrix(node.mMatrix, pos, rot, scale);
+
+ node.mMatrix.asMatrix4().initAll(scale, new_rot, pos);
+
+ mGLTFAsset->updateTransforms();
+ }
+}
+
+void LLViewerObject::moveGLTFNode(S32 node_index, const LLVector3& offset)
+{
+ if (mGLTFAsset && node_index >= 0 && node_index < mGLTFAsset->mNodes.size())
+ {
+ auto& node = mGLTFAsset->mNodes[node_index];
+
+ LLMatrix4a agent_to_asset = getAgentToGLTFAssetTransform();
+ LLMatrix4a agent_to_node;
+ matMul(agent_to_asset, node.mAssetMatrixInv, agent_to_node);
+
+ LLVector4a origin = LLVector4a::getZero();
+ LLVector4a offset_v;
+ offset_v.load3(offset.mV);
+
+
+ agent_to_node.affineTransform(offset_v, offset_v);
+ agent_to_node.affineTransform(origin, origin);
+
+ offset_v.sub(origin);
+ offset_v.getF32ptr()[3] = 1.f;
+
+ LLMatrix4a trans;
+ trans.setIdentity();
+ trans.mMatrix[3] = offset_v;
+
+ matMul(trans, node.mMatrix, node.mMatrix);
+
+ // TODO -- only update transforms for this node and its children (or use a dirty flag)
+ mGLTFAsset->updateTransforms();
+ }
+}
+
const LLVector3 &LLViewerObject::getPositionRegion() const
{
if (!isRoot())
@@ -4491,7 +4532,7 @@ const LLQuaternion LLViewerObject::getRotationEdit() const
return global_rotation;
}
-void LLViewerObject::setPositionAbsoluteGlobal( const LLVector3d &pos_global, BOOL damped )
+void LLViewerObject::setPositionAbsoluteGlobal( const LLVector3d &pos_global, bool damped )
{
if (isAttachment())
{
@@ -4540,7 +4581,7 @@ void LLViewerObject::setPositionAbsoluteGlobal( const LLVector3d &pos_global, BO
gPipeline.updateMoveNormalAsync(mDrawable);
}
-void LLViewerObject::setPosition(const LLVector3 &pos, BOOL damped)
+void LLViewerObject::setPosition(const LLVector3 &pos, bool damped)
{
if (getPosition() != pos)
{
@@ -4556,7 +4597,7 @@ void LLViewerObject::setPosition(const LLVector3 &pos, BOOL damped)
}
}
-void LLViewerObject::setPositionGlobal(const LLVector3d &pos_global, BOOL damped)
+void LLViewerObject::setPositionGlobal(const LLVector3d &pos_global, bool damped)
{
if (isAttachment())
{
@@ -4616,7 +4657,7 @@ void LLViewerObject::setPositionGlobal(const LLVector3d &pos_global, BOOL damped
}
-void LLViewerObject::setPositionParent(const LLVector3 &pos_parent, BOOL damped)
+void LLViewerObject::setPositionParent(const LLVector3 &pos_parent, bool damped)
{
// Set position relative to parent, if no parent, relative to region
if (!isRoot())
@@ -4630,7 +4671,7 @@ void LLViewerObject::setPositionParent(const LLVector3 &pos_parent, BOOL damped)
}
}
-void LLViewerObject::setPositionRegion(const LLVector3 &pos_region, BOOL damped)
+void LLViewerObject::setPositionRegion(const LLVector3 &pos_region, bool damped)
{
if (!isRootEdit())
{
@@ -4645,7 +4686,7 @@ void LLViewerObject::setPositionRegion(const LLVector3 &pos_region, BOOL damped)
}
}
-void LLViewerObject::setPositionAgent(const LLVector3 &pos_agent, BOOL damped)
+void LLViewerObject::setPositionAgent(const LLVector3 &pos_agent, bool damped)
{
LLVector3 pos_region = getRegion()->getPosRegionFromAgent(pos_agent);
setPositionRegion(pos_region, damped);
@@ -4655,7 +4696,7 @@ void LLViewerObject::setPositionAgent(const LLVector3 &pos_agent, BOOL damped)
// and doesn't also move the joint-parent
// TODO -- implement similar intelligence for joint-parents toward
// their joint-children
-void LLViewerObject::setPositionEdit(const LLVector3 &pos_edit, BOOL damped)
+void LLViewerObject::setPositionEdit(const LLVector3 &pos_edit, bool damped)
{
if (!isRootEdit())
{
@@ -4686,11 +4727,11 @@ LLViewerObject* LLViewerObject::getRootEdit() const
}
-BOOL LLViewerObject::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
+bool LLViewerObject::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face,
- BOOL pick_transparent,
- BOOL pick_rigged,
- BOOL pick_unselectable,
+ bool pick_transparent,
+ bool pick_rigged,
+ bool pick_unselectable,
S32* face_hit,
LLVector4a* intersection,
LLVector2* tex_coord,
@@ -4700,11 +4741,11 @@ BOOL LLViewerObject::lineSegmentIntersect(const LLVector4a& start, const LLVecto
return false;
}
-BOOL LLViewerObject::lineSegmentBoundingBox(const LLVector4a& start, const LLVector4a& end)
+bool LLViewerObject::lineSegmentBoundingBox(const LLVector4a& start, const LLVector4a& end)
{
if (mDrawable.isNull() || mDrawable->isDead())
{
- return FALSE;
+ return false;
}
const LLVector4a* ext = mDrawable->getSpatialExtents();
@@ -4764,20 +4805,20 @@ void LLViewerObject::setMediaURL(const std::string& media_url)
{
mMedia = new LLViewerObjectMedia;
mMedia->mMediaURL = media_url;
- mMedia->mPassedWhitelist = FALSE;
+ mMedia->mPassedWhitelist = false;
// TODO: update materials with new image
}
else if (mMedia->mMediaURL != media_url)
{
mMedia->mMediaURL = media_url;
- mMedia->mPassedWhitelist = FALSE;
+ mMedia->mPassedWhitelist = false;
// TODO: update materials with new image
}
}
-BOOL LLViewerObject::getMediaPassedWhitelist() const
+bool LLViewerObject::getMediaPassedWhitelist() const
{
if (mMedia)
{
@@ -4785,11 +4826,11 @@ BOOL LLViewerObject::getMediaPassedWhitelist() const
}
else
{
- return FALSE;
+ return false;
}
}
-void LLViewerObject::setMediaPassedWhitelist(BOOL passed)
+void LLViewerObject::setMediaPassedWhitelist(bool passed)
{
if (mMedia)
{
@@ -4797,9 +4838,9 @@ void LLViewerObject::setMediaPassedWhitelist(BOOL passed)
}
}
-BOOL LLViewerObject::setMaterial(const U8 material)
+bool LLViewerObject::setMaterial(const U8 material)
{
- BOOL res = LLPrimitive::setMaterial(material);
+ bool res = LLPrimitive::setMaterial(material);
if (res)
{
setChanged(TEXTURE);
@@ -4963,7 +5004,7 @@ LLViewerTexture* LLViewerObject::getBakedTextureForMagicId(const LLUUID& id)
LLViewerObject *root = getRootEdit();
if (root && root->isAnimatedObject())
{
- return LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+ return LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
}
LLVOAvatar* avatar = getAvatar();
@@ -4973,7 +5014,7 @@ LLViewerTexture* LLViewerObject::getBakedTextureForMagicId(const LLUUID& id)
LLViewerTexture* bakedTexture = avatar->getBakedTexture(texIndex);
if (bakedTexture == NULL || bakedTexture->isMissingAsset())
{
- return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+ return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
}
else
{
@@ -4982,7 +5023,7 @@ LLViewerTexture* LLViewerObject::getBakedTextureForMagicId(const LLUUID& id)
}
else
{
- return LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+ return LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
}
}
@@ -5019,7 +5060,7 @@ void LLViewerObject::setTE(const U8 te, const LLTextureEntry& texture_entry)
const LLUUID& image_id = getTE(te)->getID();
LLViewerTexture* bakedTexture = getBakedTextureForMagicId(image_id);
- mTEImages[te] = bakedTexture ? bakedTexture : LLViewerTextureManager::getFetchedTexture(image_id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+ mTEImages[te] = bakedTexture ? bakedTexture : LLViewerTextureManager::getFetchedTexture(image_id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
updateAvatarMeshVisibility(image_id, old_image_id);
@@ -5031,10 +5072,10 @@ void LLViewerObject::updateTEMaterialTextures(U8 te)
if (getTE(te)->getMaterialParams().notNull())
{
const LLUUID& norm_id = getTE(te)->getMaterialParams()->getNormalID();
- mTENormalMaps[te] = LLViewerTextureManager::getFetchedTexture(norm_id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+ mTENormalMaps[te] = LLViewerTextureManager::getFetchedTexture(norm_id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
const LLUUID& spec_id = getTE(te)->getMaterialParams()->getSpecularID();
- mTESpecularMaps[te] = LLViewerTextureManager::getFetchedTexture(spec_id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+ mTESpecularMaps[te] = LLViewerTextureManager::getFetchedTexture(spec_id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
}
LLFetchedGLTFMaterial* mat = (LLFetchedGLTFMaterial*) getTE(te)->getGLTFRenderMaterial();
@@ -5076,8 +5117,8 @@ void LLViewerObject::updateTEMaterialTextures(U8 te)
}
else
{
- img = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
- img->addTextureStats(64.f * 64.f, TRUE);
+ img = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+ img->addTextureStats(64.f * 64.f, true);
}
}
@@ -5227,21 +5268,21 @@ S32 LLViewerObject::setTETexture(const U8 te, const LLUUID& uuid)
{
// Invalid host == get from the agent's sim
LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture(
- uuid, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost());
+ uuid, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost());
return setTETextureCore(te, image);
}
S32 LLViewerObject::setTENormalMap(const U8 te, const LLUUID& uuid)
{
LLViewerFetchedTexture *image = (uuid == LLUUID::null) ? NULL : LLViewerTextureManager::getFetchedTexture(
- uuid, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost());
+ uuid, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost());
return setTENormalMapCore(te, image);
}
S32 LLViewerObject::setTESpecularMap(const U8 te, const LLUUID& uuid)
{
LLViewerFetchedTexture *image = (uuid == LLUUID::null) ? NULL : LLViewerTextureManager::getFetchedTexture(
- uuid, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost());
+ uuid, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost());
return setTESpecularMapCore(te, image);
}
@@ -5359,7 +5400,6 @@ S32 LLViewerObject::setTEFullbright(const U8 te, const U8 fullbright)
return retval;
}
-
S32 LLViewerObject::setTEMediaFlags(const U8 te, const U8 media_flags)
{
// this might need work for media type
@@ -5781,8 +5821,8 @@ void LLViewerObject::setDebugText(const std::string &utf8text, const LLColor4& c
}
mText->setColor(color);
mText->setString(utf8text);
- mText->setZCompare(FALSE);
- mText->setDoFade(FALSE);
+ mText->setZCompare(false);
+ mText->setDoFade(false);
updateText();
}
@@ -5798,8 +5838,8 @@ void LLViewerObject::appendDebugText(const std::string &utf8text)
initHudText();
}
mText->addLine(utf8text, LLColor4::white);
- mText->setZCompare(FALSE);
- mText->setDoFade(FALSE);
+ mText->setZCompare(false);
+ mText->setDoFade(false);
updateText();
}
@@ -5832,8 +5872,8 @@ void LLViewerObject::restoreHudText()
else
{
// Restore default values
- mText->setZCompare(TRUE);
- mText->setDoFade(TRUE);
+ mText->setZCompare(true);
+ mText->setDoFade(true);
}
mText->setColor(mHudTextColor);
mText->setString(mHudText);
@@ -5874,7 +5914,7 @@ const LLViewerObject* LLViewerObject::getSubParent() const
return (const LLViewerObject*) getParent();
}
-BOOL LLViewerObject::isOnMap()
+bool LLViewerObject::isOnMap()
{
return mOnMap;
}
@@ -5958,7 +5998,7 @@ LLVOAvatar* LLViewerObject::getAvatarAncestor()
return NULL;
}
-BOOL LLViewerObject::isParticleSource() const
+bool LLViewerObject::isParticleSource() const
{
return !mPartSourcep.isNull() && !mPartSourcep->isDead();
}
@@ -6099,7 +6139,7 @@ void LLViewerObject::deleteParticleSource()
}
// virtual
-void LLViewerObject::updateDrawable(BOOL force_damped)
+void LLViewerObject::updateDrawable(bool force_damped)
{
if (!isChanged(MOVED))
{ //most common case, having an empty if case here makes for better branch prediction
@@ -6107,7 +6147,7 @@ void LLViewerObject::updateDrawable(BOOL force_damped)
else if (mDrawable.notNull() &&
!mDrawable->isState(LLDrawable::ON_MOVE_LIST))
{
- BOOL damped_motion =
+ bool damped_motion =
!isChanged(SHIFTED) && // not shifted between regions this frame and...
( force_damped || // ...forced into damped motion by application logic or...
( !isSelected() && // ...not selected and...
@@ -6186,7 +6226,7 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow
if (mAudioSourcep)
{
- BOOL queue = flags & LL_SOUND_FLAG_QUEUE;
+ bool queue = flags & LL_SOUND_FLAG_QUEUE;
mAudioGain = gain;
mAudioSourcep->setGain(gain);
mAudioSourcep->setLoop(flags & LL_SOUND_FLAG_LOOP);
@@ -6248,8 +6288,8 @@ bool LLViewerObject::unpackParameterEntry(U16 param_type, LLDataPacker *dp)
if (param)
{
param->data->unpack(*dp);
- param->in_use = TRUE;
- parameterChanged(param_type, param->data, TRUE, false);
+ param->in_use = true;
+ parameterChanged(param_type, param->data, true, false);
return true;
}
else
@@ -6351,7 +6391,7 @@ LLNetworkData* LLViewerObject::getParameterEntry(U16 param_type) const
}
}
-BOOL LLViewerObject::getParameterEntryInUse(U16 param_type) const
+bool LLViewerObject::getParameterEntryInUse(U16 param_type) const
{
ExtraParameter* param = getExtraParameterEntry(param_type);
if (param)
@@ -6360,7 +6400,7 @@ BOOL LLViewerObject::getParameterEntryInUse(U16 param_type) const
}
else
{
- return FALSE;
+ return false;
}
}
@@ -6375,7 +6415,7 @@ bool LLViewerObject::setParameterEntry(U16 param_type, const LLNetworkData& new_
}
param->in_use = true;
param->data->copy(new_value);
- parameterChanged(param_type, param->data, TRUE, local_origin);
+ parameterChanged(param_type, param->data, true, local_origin);
return true;
}
else
@@ -6385,9 +6425,9 @@ bool LLViewerObject::setParameterEntry(U16 param_type, const LLNetworkData& new_
}
// Assumed to be called locally
-// If in_use is TRUE, will crate a new extra parameter if none exists.
+// If in_use is true, will crate a new extra parameter if none exists.
// Should always return true.
-bool LLViewerObject::setParameterEntryInUse(U16 param_type, BOOL in_use, bool local_origin)
+bool LLViewerObject::setParameterEntryInUse(U16 param_type, bool in_use, bool local_origin)
{
ExtraParameter* param = getExtraParameterEntryCreate(param_type);
if (param && param->in_use != in_use)
@@ -6408,7 +6448,7 @@ void LLViewerObject::parameterChanged(U16 param_type, bool local_origin)
}
}
-void LLViewerObject::parameterChanged(U16 param_type, LLNetworkData* data, BOOL in_use, bool local_origin)
+void LLViewerObject::parameterChanged(U16 param_type, LLNetworkData* data, bool in_use, bool local_origin)
{
if (local_origin)
{
@@ -6458,7 +6498,7 @@ void LLViewerObject::parameterChanged(U16 param_type, LLNetworkData* data, BOOL
}
}
-void LLViewerObject::setDrawableState(U32 state, BOOL recursive)
+void LLViewerObject::setDrawableState(U32 state, bool recursive)
{
if (mDrawable)
{
@@ -6475,7 +6515,7 @@ void LLViewerObject::setDrawableState(U32 state, BOOL recursive)
}
}
-void LLViewerObject::clearDrawableState(U32 state, BOOL recursive)
+void LLViewerObject::clearDrawableState(U32 state, bool recursive)
{
if (mDrawable)
{
@@ -6492,9 +6532,9 @@ void LLViewerObject::clearDrawableState(U32 state, BOOL recursive)
}
}
-BOOL LLViewerObject::isDrawableState(U32 state, BOOL recursive) const
+bool LLViewerObject::isDrawableState(U32 state, bool recursive) const
{
- BOOL matches = FALSE;
+ bool matches = false;
if (mDrawable)
{
matches = mDrawable->isState(state);
@@ -6519,7 +6559,7 @@ BOOL LLViewerObject::isDrawableState(U32 state, BOOL recursive) const
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// Owned by anyone?
-BOOL LLViewerObject::permAnyOwner() const
+bool LLViewerObject::permAnyOwner() const
{
if (isRootEdit())
{
@@ -6531,18 +6571,18 @@ BOOL LLViewerObject::permAnyOwner() const
}
}
// Owned by this viewer?
-BOOL LLViewerObject::permYouOwner() const
+bool LLViewerObject::permYouOwner() const
{
if (isRootEdit())
{
#ifdef HACKED_GODLIKE_VIEWER
- return TRUE;
+ return true;
#else
# ifdef TOGGLE_HACKED_GODLIKE_VIEWER
if (!LLGridManager::getInstance()->isInProductionGrid()
&& (gAgent.getGodLevel() >= GOD_MAINTENANCE))
{
- return TRUE;
+ return true;
}
# endif
return flagObjectYouOwner();
@@ -6555,7 +6595,7 @@ BOOL LLViewerObject::permYouOwner() const
}
// Owned by a group?
-BOOL LLViewerObject::permGroupOwner() const
+bool LLViewerObject::permGroupOwner() const
{
if (isRootEdit())
{
@@ -6568,18 +6608,18 @@ BOOL LLViewerObject::permGroupOwner() const
}
// Can the owner edit
-BOOL LLViewerObject::permOwnerModify() const
+bool LLViewerObject::permOwnerModify() const
{
if (isRootEdit())
{
#ifdef HACKED_GODLIKE_VIEWER
- return TRUE;
+ return true;
#else
# ifdef TOGGLE_HACKED_GODLIKE_VIEWER
if (!LLGridManager::getInstance()->isInProductionGrid()
&& (gAgent.getGodLevel() >= GOD_MAINTENANCE))
{
- return TRUE;
+ return true;
}
# endif
return flagObjectOwnerModify();
@@ -6592,18 +6632,18 @@ BOOL LLViewerObject::permOwnerModify() const
}
// Can edit
-BOOL LLViewerObject::permModify() const
+bool LLViewerObject::permModify() const
{
if (isRootEdit())
{
#ifdef HACKED_GODLIKE_VIEWER
- return TRUE;
+ return true;
#else
# ifdef TOGGLE_HACKED_GODLIKE_VIEWER
if (!LLGridManager::getInstance()->isInProductionGrid()
&& (gAgent.getGodLevel() >= GOD_MAINTENANCE))
{
- return TRUE;
+ return true;
}
# endif
return flagObjectModify();
@@ -6616,18 +6656,18 @@ BOOL LLViewerObject::permModify() const
}
// Can copy
-BOOL LLViewerObject::permCopy() const
+bool LLViewerObject::permCopy() const
{
if (isRootEdit())
{
#ifdef HACKED_GODLIKE_VIEWER
- return TRUE;
+ return true;
#else
# ifdef TOGGLE_HACKED_GODLIKE_VIEWER
if (!LLGridManager::getInstance()->isInProductionGrid()
&& (gAgent.getGodLevel() >= GOD_MAINTENANCE))
{
- return TRUE;
+ return true;
}
# endif
return flagObjectCopy();
@@ -6640,18 +6680,18 @@ BOOL LLViewerObject::permCopy() const
}
// Can move
-BOOL LLViewerObject::permMove() const
+bool LLViewerObject::permMove() const
{
if (isRootEdit())
{
#ifdef HACKED_GODLIKE_VIEWER
- return TRUE;
+ return true;
#else
# ifdef TOGGLE_HACKED_GODLIKE_VIEWER
if (!LLGridManager::getInstance()->isInProductionGrid()
&& (gAgent.getGodLevel() >= GOD_MAINTENANCE))
{
- return TRUE;
+ return true;
}
# endif
return flagObjectMove();
@@ -6664,18 +6704,18 @@ BOOL LLViewerObject::permMove() const
}
// Can be transferred
-BOOL LLViewerObject::permTransfer() const
+bool LLViewerObject::permTransfer() const
{
if (isRootEdit())
{
#ifdef HACKED_GODLIKE_VIEWER
- return TRUE;
+ return true;
#else
# ifdef TOGGLE_HACKED_GODLIKE_VIEWER
if (!LLGridManager::getInstance()->isInProductionGrid()
&& (gAgent.getGodLevel() >= GOD_MAINTENANCE))
{
- return TRUE;
+ return true;
}
# endif
return flagObjectTransfer();
@@ -6689,7 +6729,7 @@ BOOL LLViewerObject::permTransfer() const
// Can only open objects that you own, or that someone has
// given you modify rights to. JC
-BOOL LLViewerObject::allowOpen() const
+bool LLViewerObject::allowOpen() const
{
return !flagInventoryEmpty() && (permYouOwner() || permModify());
}
@@ -6780,7 +6820,7 @@ void LLViewerObject::setRegion(LLViewerRegion *regionp)
}
setChanged(MOVED | SILHOUETTE);
- updateDrawable(FALSE);
+ updateDrawable(false);
}
// virtual
@@ -6804,7 +6844,7 @@ bool LLViewerObject::specialHoverCursor() const
|| (mClickAction != 0);
}
-void LLViewerObject::updateFlags(BOOL physics_changed)
+void LLViewerObject::updateFlags(bool physics_changed)
{
LLViewerRegion* regionp = getRegion();
if(!regionp) return;
@@ -6817,10 +6857,10 @@ void LLViewerObject::updateFlags(BOOL physics_changed)
gMessageSystem->addBOOL("IsTemporary", flagTemporaryOnRez() );
gMessageSystem->addBOOL("IsPhantom", flagPhantom() );
- // stinson 02/28/2012 : This CastsShadows BOOL is no longer used in either the viewer or the simulator
+ // stinson 02/28/2012 : This CastsShadows bool is no longer used in either the viewer or the simulator
// The simulator code does not even unpack this value when the message is received.
// This could be potentially hijacked in the future for another use should the urgent need arise.
- gMessageSystem->addBOOL("CastsShadows", FALSE );
+ gMessageSystem->addBOOL("CastsShadows", false );
if (physics_changed)
{
@@ -6834,9 +6874,9 @@ void LLViewerObject::updateFlags(BOOL physics_changed)
gMessageSystem->sendReliable( regionp->getHost() );
}
-BOOL LLViewerObject::setFlags(U32 flags, BOOL state)
+bool LLViewerObject::setFlags(U32 flags, bool state)
{
- BOOL setit = setFlagsWithoutUpdate(flags, state);
+ bool setit = setFlagsWithoutUpdate(flags, state);
// BUG: Sometimes viewer physics and simulator physics get
// out of sync. To fix this, always send update to simulator.
@@ -6847,15 +6887,15 @@ BOOL LLViewerObject::setFlags(U32 flags, BOOL state)
return setit;
}
-BOOL LLViewerObject::setFlagsWithoutUpdate(U32 flags, BOOL state)
+bool LLViewerObject::setFlagsWithoutUpdate(U32 flags, bool state)
{
- BOOL setit = FALSE;
+ bool setit = false;
if (state)
{
if ((mFlags & flags) != flags)
{
mFlags |= flags;
- setit = TRUE;
+ setit = true;
}
}
else
@@ -6863,7 +6903,7 @@ BOOL LLViewerObject::setFlagsWithoutUpdate(U32 flags, BOOL state)
if ((mFlags & flags) != 0)
{
mFlags &= ~flags;
- setit = TRUE;
+ setit = true;
}
}
return setit;
@@ -6986,12 +7026,12 @@ void LLAlphaObject::getBlendFunc(S32 face, LLRender::eBlendFactor& src, LLRender
}
// virtual
-void LLStaticViewerObject::updateDrawable(BOOL force_damped)
+void LLStaticViewerObject::updateDrawable(bool force_damped)
{
// Force an immediate rebuild on any update
if (mDrawable.notNull())
{
- mDrawable->updateXform(TRUE);
+ mDrawable->updateXform(true);
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL);
}
clearChanged(SHIFTED);
@@ -7069,8 +7109,8 @@ void LLViewerObject::resetChildrenRotationAndPosition(const std::vector<LLQuater
((LLVOAvatar*)childp)->mDrawable->mXform.setPosition(reset_pos);
((LLVOAvatar*)childp)->mDrawable->mXform.setRotation(reset_rot) ;
- ((LLVOAvatar*)childp)->mDrawable->getVObj()->setPosition(reset_pos, TRUE);
- ((LLVOAvatar*)childp)->mDrawable->getVObj()->setRotation(reset_rot, TRUE) ;
+ ((LLVOAvatar*)childp)->mDrawable->getVObj()->setPosition(reset_pos, true);
+ ((LLVOAvatar*)childp)->mDrawable->getVObj()->setRotation(reset_rot, true) ;
LLManip::rebuild(childp);
}
@@ -7082,7 +7122,7 @@ void LLViewerObject::resetChildrenRotationAndPosition(const std::vector<LLQuater
}
//counter-translation
-void LLViewerObject::resetChildrenPosition(const LLVector3& offset, BOOL simplified, BOOL skip_avatar_child)
+void LLViewerObject::resetChildrenPosition(const LLVector3& offset, bool simplified, bool skip_avatar_child)
{
if(mChildList.empty())
{
@@ -7138,18 +7178,18 @@ void LLViewerObject::resetChildrenPosition(const LLVector3& offset, BOOL simplif
}
// virtual
-BOOL LLViewerObject::isTempAttachment() const
+bool LLViewerObject::isTempAttachment() const
{
return (mID.notNull() && (mID == mAttachmentItemID));
}
-BOOL LLViewerObject::isHiglightedOrBeacon() const
+bool LLViewerObject::isHiglightedOrBeacon() const
{
if (LLFloaterReg::instanceVisible("beacons") && (gPipeline.getRenderBeacons() || gPipeline.getRenderHighlights()))
{
- BOOL has_media = (getMediaType() == LLViewerObject::MEDIA_SET);
- BOOL is_scripted = !isAvatar() && !getParent() && flagScripted();
- BOOL is_physical = !isAvatar() && flagUsePhysics();
+ bool has_media = (getMediaType() == LLViewerObject::MEDIA_SET);
+ bool is_scripted = !isAvatar() && !getParent() && flagScripted();
+ bool is_physical = !isAvatar() && flagUsePhysics();
return (isParticleSource() && gPipeline.getRenderParticleBeacons())
|| (isAudioSource() && gPipeline.getRenderSoundBeacons())
@@ -7158,7 +7198,7 @@ BOOL LLViewerObject::isHiglightedOrBeacon() const
|| (is_scripted && flagHandleTouch() && gPipeline.getRenderScriptedTouchBeacons())
|| (is_physical && gPipeline.getRenderPhysicalBeacons());
}
- return FALSE;
+ return false;
}
@@ -7182,12 +7222,12 @@ void LLViewerObject::setLastUpdateType(EObjectUpdateType last_update_type)
mLastUpdateType = last_update_type;
}
-BOOL LLViewerObject::getLastUpdateCached() const
+bool LLViewerObject::getLastUpdateCached() const
{
return mLastUpdateCached;
}
-void LLViewerObject::setLastUpdateCached(BOOL last_update_cached)
+void LLViewerObject::setLastUpdateCached(bool last_update_cached)
{
mLastUpdateCached = last_update_cached;
}
@@ -7254,11 +7294,11 @@ void LLViewerObject::setHasRenderMaterialParams(bool has_materials)
{
if (has_materials)
{
- setParameterEntryInUse(LLNetworkData::PARAMS_RENDER_MATERIAL, TRUE, true);
+ setParameterEntryInUse(LLNetworkData::PARAMS_RENDER_MATERIAL, true, true);
}
else
{
- setParameterEntryInUse(LLNetworkData::PARAMS_RENDER_MATERIAL, FALSE, true);
+ setParameterEntryInUse(LLNetworkData::PARAMS_RENDER_MATERIAL, false, true);
}
}
}
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 80da7b2f73..4da8b25357 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -46,6 +46,14 @@
#include "llrigginginfo.h"
#include "llreflectionmap.h"
+namespace LL
+{
+ namespace GLTF
+ {
+ class Asset;
+ }
+}
+
class LLAgent; // TODO: Get rid of this.
class LLAudioSource;
class LLAudioSourceVO;
@@ -120,7 +128,7 @@ protected:
// TomY: Provide for a list of extra parameter structures, mapped by structure name
struct ExtraParameter
{
- BOOL in_use;
+ bool in_use;
LLNetworkData *data;
};
std::unordered_map<U16, ExtraParameter*> mExtraParameterList;
@@ -131,12 +139,12 @@ public:
typedef const child_list_t const_child_list_t;
- LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp, BOOL is_global = FALSE);
+ LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp, bool is_global = false);
virtual void markDead(); // Mark this object as dead, and clean up its references
- BOOL isDead() const {return mDead;}
- BOOL isOrphaned() const { return mOrphaned; }
- BOOL isParticleSource() const;
+ bool isDead() const {return mDead;}
+ bool isOrphaned() const { return mOrphaned; }
+ bool isParticleSource() const;
virtual LLVOAvatar* asAvatar();
@@ -146,7 +154,7 @@ public:
static void cleanupVOClasses();
void addNVPair(const std::string& data);
- BOOL removeNVPair(const std::string& name);
+ bool removeNVPair(const std::string& name);
LLNameValue* getNVPair(const std::string& name) const; // null if no name value pair by that name
// Object create and update functions
@@ -172,11 +180,11 @@ public:
LLDataPacker *dp);
- virtual BOOL isActive() const; // Whether this object needs to do an idleUpdate.
- BOOL onActiveList() const {return mOnActiveList;}
- void setOnActiveList(BOOL on_active) { mOnActiveList = on_active; }
+ virtual bool isActive() const; // Whether this object needs to do an idleUpdate.
+ bool onActiveList() const {return mOnActiveList;}
+ void setOnActiveList(bool on_active) { mOnActiveList = on_active; }
- virtual BOOL isAttachment() const { return FALSE; }
+ virtual bool isAttachment() const { return false; }
const std::string& getAttachmentItemName() const;
virtual LLVOAvatar* getAvatar() const; //get the avatar this object is attached to, or NULL if object is not an attachment
@@ -193,10 +201,10 @@ public:
void setRenderMaterialID(S32 te, const LLUUID& id, bool update_server = true, bool local_origin = true);
void setRenderMaterialIDs(const LLUUID& id);
- virtual BOOL isHUDAttachment() const { return FALSE; }
- virtual BOOL isTempAttachment() const;
+ virtual bool isHUDAttachment() const { return false; }
+ virtual bool isTempAttachment() const;
- virtual BOOL isHiglightedOrBeacon() const;
+ virtual bool isHiglightedOrBeacon() const;
virtual void updateRadius() {};
virtual F32 getVObjRadius() const; // default implemenation is mDrawable->getRadius()
@@ -215,14 +223,14 @@ public:
// Graphical stuff for objects - maybe broken out into render class later?
virtual void updateTextures();
virtual void faceMappingChanged() {}
- virtual void boostTexturePriority(BOOL boost_children = TRUE); // When you just want to boost priority of this object
+ virtual void boostTexturePriority(bool boost_children = true); // When you just want to boost priority of this object
virtual LLDrawable* createDrawable(LLPipeline *pipeline);
- virtual BOOL updateGeometry(LLDrawable *drawable);
+ virtual bool updateGeometry(LLDrawable *drawable);
virtual void updateGL();
virtual void updateFaceSize(S32 idx);
- virtual BOOL updateLOD();
- virtual BOOL setDrawableParent(LLDrawable* parentp);
+ virtual bool updateLOD();
+ virtual bool setDrawableParent(LLDrawable* parentp);
F32 getRotTime() { return mRotTime; }
private:
void resetRotTime();
@@ -240,10 +248,10 @@ public:
// Accessor functions
LLViewerRegion* getRegion() const { return mRegionp; }
- BOOL isSelected() const { return mUserSelected; }
+ bool isSelected() const { return mUserSelected; }
// Check whole linkset
- BOOL isAnySelected() const;
- virtual void setSelected(BOOL sel);
+ bool isAnySelected() const;
+ virtual void setSelected(bool sel);
const LLUUID &getID() const { return mID; }
U32 getLocalID() const { return mLocalID; }
@@ -251,12 +259,12 @@ public:
S32 getListIndex() const { return mListIndex; }
void setListIndex(S32 idx) { mListIndex = idx; }
- virtual BOOL isFlexible() const { return FALSE; }
- virtual BOOL isSculpted() const { return FALSE; }
- virtual BOOL isMesh() const { return FALSE; }
- virtual BOOL isRiggedMesh() const { return FALSE; }
- virtual BOOL hasLightTexture() const { return FALSE; }
- virtual BOOL isReflectionProbe() const { return FALSE; }
+ virtual bool isFlexible() const { return false; }
+ virtual bool isSculpted() const { return false; }
+ virtual bool isMesh() const { return false; }
+ virtual bool isRiggedMesh() const { return false; }
+ virtual bool hasLightTexture() const { return false; }
+ virtual bool isReflectionProbe() const { return false; }
// This method returns true if the object is over land owned by
// the agent, one of its groups, or it encroaches and
@@ -276,10 +284,10 @@ public:
// ability to modify the object. Since this calls into the
// selection manager, you should avoid calling this method from
// there.
- BOOL isProbablyModifiable() const;
+ bool isProbablyModifiable() const;
*/
- virtual BOOL setParent(LLViewerObject* parent);
+ virtual bool setParent(LLViewerObject* parent);
virtual void onReparent(LLViewerObject *old_parent, LLViewerObject *new_parent);
virtual void afterReparent();
virtual void addChild(LLViewerObject *childp);
@@ -288,17 +296,17 @@ public:
S32 numChildren() const { return mChildList.size(); }
void addThisAndAllChildren(std::vector<LLViewerObject*>& objects);
void addThisAndNonJointChildren(std::vector<LLViewerObject*>& objects);
- BOOL isChild(LLViewerObject *childp) const;
- BOOL isSeat() const;
+ bool isChild(LLViewerObject *childp) const;
+ bool isSeat() const;
//detect if given line segment (in agent space) intersects with this viewer object.
- //returns TRUE if intersection detected and returns information about intersection
- virtual BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
+ //returns true if intersection detected and returns information about intersection
+ virtual bool lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
- BOOL pick_transparent = FALSE,
- BOOL pick_rigged = FALSE,
- BOOL pick_unselectable = TRUE,
+ bool pick_transparent = false,
+ bool pick_rigged = false,
+ bool pick_unselectable = true,
S32* face_hit = NULL, // which face was hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
@@ -306,7 +314,7 @@ public:
LLVector4a* tangent = NULL // return the surface tangent at the intersection point
);
- virtual BOOL lineSegmentBoundingBox(const LLVector4a& start, const LLVector4a& end);
+ virtual bool lineSegmentBoundingBox(const LLVector4a& start, const LLVector4a& end);
virtual const LLVector3d getPositionGlobal() const;
virtual const LLVector3 &getPositionRegion() const;
@@ -314,6 +322,18 @@ public:
virtual const LLVector3 &getPositionAgent() const;
virtual const LLVector3 getRenderPosition() const;
+ LLMatrix4a getAgentToGLTFAssetTransform() const;
+ LLMatrix4a getGLTFAssetToAgentTransform() const;
+ LLVector3 getGLTFNodePositionAgent(S32 node_index) const;
+ LLMatrix4a getGLTFNodeTransformAgent(S32 node_index) const;
+ void getGLTFNodeTransformAgent(S32 node_index, LLVector3* position, LLQuaternion* rotation, LLVector3* scale) const;
+
+ // move the node at the given index by the given offset in agent space
+ void moveGLTFNode(S32 node_index, const LLVector3& offset);
+
+ // set the rotation in agent space of the given node
+ void setGLTFNodeRotationAgent(S32 node_index, const LLQuaternion& rotation);
+
virtual const LLVector3 getPivotPositionAgent() const; // Usually = to getPositionAgent, unless like flex objects it's not
LLViewerObject* getRootEdit() const;
@@ -323,18 +343,18 @@ public:
const LLQuaternion getRenderRotation() const;
virtual const LLMatrix4 getRenderMatrix() const;
- void setPosition(const LLVector3 &pos, BOOL damped = FALSE);
- void setPositionGlobal(const LLVector3d &position, BOOL damped = FALSE);
- void setPositionRegion(const LLVector3 &position, BOOL damped = FALSE);
- void setPositionEdit(const LLVector3 &position, BOOL damped = FALSE);
- void setPositionAgent(const LLVector3 &pos_agent, BOOL damped = FALSE);
- void setPositionParent(const LLVector3 &pos_parent, BOOL damped = FALSE);
- void setPositionAbsoluteGlobal( const LLVector3d &pos_global, BOOL damped = FALSE );
+ void setPosition(const LLVector3 &pos, bool damped = false);
+ void setPositionGlobal(const LLVector3d &position, bool damped = false);
+ void setPositionRegion(const LLVector3 &position, bool damped = false);
+ void setPositionEdit(const LLVector3 &position, bool damped = false);
+ void setPositionAgent(const LLVector3 &pos_agent, bool damped = false);
+ void setPositionParent(const LLVector3 &pos_parent, bool damped = false);
+ void setPositionAbsoluteGlobal( const LLVector3d &pos_global, bool damped = false );
virtual const LLMatrix4& getWorldMatrix(LLXformMatrix* xform) const { return xform->getWorldMatrix(); }
- inline void setRotation(const F32 x, const F32 y, const F32 z, BOOL damped = FALSE);
- inline void setRotation(const LLQuaternion& quat, BOOL damped = FALSE);
+ inline void setRotation(const F32 x, const F32 y, const F32 z, bool damped = false);
+ inline void setRotation(const LLQuaternion& quat, bool damped = false);
/*virtual*/ void setNumTEs(const U8 num_tes);
/*virtual*/ void setTE(const U8 te, const LLTextureEntry &texture_entry);
@@ -370,7 +390,7 @@ public:
//
void refreshMaterials();
- /*virtual*/ BOOL setMaterial(const U8 material);
+ /*virtual*/ bool setMaterial(const U8 material);
virtual void setTEImage(const U8 te, LLViewerTexture *imagep); // Not derived from LLPrimitive
virtual void changeTEImage(S32 index, LLViewerTexture* new_image) ;
virtual void changeTENormalMap(S32 index, LLViewerTexture* new_image) ;
@@ -384,7 +404,7 @@ public:
void fitFaceTexture(const U8 face);
void sendTEUpdate() const; // Sends packed representation of all texture entry information
- virtual void setScale(const LLVector3 &scale, BOOL damped = FALSE);
+ virtual void setScale(const LLVector3 &scale, bool damped = false);
S32 getAnimatedObjectMaxTris() const;
F32 recursiveGetEstTrianglesMax() const;
@@ -429,7 +449,7 @@ public:
// Create if necessary
LLAudioSource *getAudioSource(const LLUUID& owner_id);
- BOOL isAudioSource() const {return mAudioSourcep != NULL;}
+ bool isAudioSource() const {return mAudioSourcep != NULL;}
U8 getMediaType() const;
void setMediaType(U8 media_type);
@@ -437,8 +457,8 @@ public:
std::string getMediaURL() const;
void setMediaURL(const std::string& media_url);
- BOOL getMediaPassedWhitelist() const;
- void setMediaPassedWhitelist(BOOL passed);
+ bool getMediaPassedWhitelist() const;
+ void setMediaPassedWhitelist(bool passed);
void sendMaterialUpdate() const;
@@ -459,13 +479,13 @@ public:
void updatePositionCaches() const; // Update the global and region position caches from the object (and parent's) xform.
void updateText(); // update text label position
- virtual void updateDrawable(BOOL force_damped); // force updates on static objects
+ virtual void updateDrawable(bool force_damped); // force updates on static objects
bool isOwnerInMuteList(LLUUID item_id = LLUUID());
- void setDrawableState(U32 state, BOOL recursive = TRUE);
- void clearDrawableState(U32 state, BOOL recursive = TRUE);
- BOOL isDrawableState(U32 state, BOOL recursive = TRUE) const;
+ void setDrawableState(U32 state, bool recursive = true);
+ void clearDrawableState(U32 state, bool recursive = true);
+ bool isDrawableState(U32 state, bool recursive = true) const;
// Called when the drawable shifts
virtual void onShift(const LLVector4a &shift_vector) { }
@@ -480,7 +500,7 @@ public:
// viewer object has the inventory stored locally.
void registerInventoryListener(LLVOInventoryListener* listener, void* user_data);
void removeInventoryListener(LLVOInventoryListener* listener);
- BOOL isInventoryPending();
+ bool isInventoryPending();
void clearInventoryListeners();
bool hasInventoryListeners();
void requestInventory();
@@ -510,12 +530,12 @@ public:
// This function will make sure that we refresh the inventory.
void dirtyInventory();
- BOOL isInventoryDirty() { return mInventoryDirty; }
+ bool isInventoryDirty() { return mInventoryDirty; }
// save a script, which involves removing the old one, and rezzing
// in the new one. This method should be called with the asset id
// of the new and old script AFTER the bytecode has been saved.
- void saveScript(const LLViewerInventoryItem* item, BOOL active, bool is_new);
+ void saveScript(const LLViewerInventoryItem* item, bool active, bool is_new);
// move an inventory item out of the task and into agent
// inventory. This operation is based on messaging. No permissions
@@ -525,37 +545,37 @@ public:
// Find the number of instances of this object's inventory that are of the given type
S32 countInventoryContents( LLAssetType::EType type );
- BOOL permAnyOwner() const;
- BOOL permYouOwner() const;
- BOOL permGroupOwner() const;
- BOOL permOwnerModify() const;
- BOOL permModify() const;
- BOOL permCopy() const;
- BOOL permMove() const;
- BOOL permTransfer() const;
- inline BOOL flagUsePhysics() const { return ((mFlags & FLAGS_USE_PHYSICS) != 0); }
- inline BOOL flagObjectAnyOwner() const { return ((mFlags & FLAGS_OBJECT_ANY_OWNER) != 0); }
- inline BOOL flagObjectYouOwner() const { return ((mFlags & FLAGS_OBJECT_YOU_OWNER) != 0); }
- inline BOOL flagObjectGroupOwned() const { return ((mFlags & FLAGS_OBJECT_GROUP_OWNED) != 0); }
- inline BOOL flagObjectOwnerModify() const { return ((mFlags & FLAGS_OBJECT_OWNER_MODIFY) != 0); }
- inline BOOL flagObjectModify() const { return ((mFlags & FLAGS_OBJECT_MODIFY) != 0); }
- inline BOOL flagObjectCopy() const { return ((mFlags & FLAGS_OBJECT_COPY) != 0); }
- inline BOOL flagObjectMove() const { return ((mFlags & FLAGS_OBJECT_MOVE) != 0); }
- inline BOOL flagObjectTransfer() const { return ((mFlags & FLAGS_OBJECT_TRANSFER) != 0); }
- inline BOOL flagObjectPermanent() const { return ((mFlags & FLAGS_AFFECTS_NAVMESH) != 0); }
- inline BOOL flagCharacter() const { return ((mFlags & FLAGS_CHARACTER) != 0); }
- inline BOOL flagVolumeDetect() const { return ((mFlags & FLAGS_VOLUME_DETECT) != 0); }
- inline BOOL flagIncludeInSearch() const { return ((mFlags & FLAGS_INCLUDE_IN_SEARCH) != 0); }
- inline BOOL flagScripted() const { return ((mFlags & FLAGS_SCRIPTED) != 0); }
- inline BOOL flagHandleTouch() const { return ((mFlags & FLAGS_HANDLE_TOUCH) != 0); }
- inline BOOL flagTakesMoney() const { return ((mFlags & FLAGS_TAKES_MONEY) != 0); }
- inline BOOL flagPhantom() const { return ((mFlags & FLAGS_PHANTOM) != 0); }
- inline BOOL flagInventoryEmpty() const { return ((mFlags & FLAGS_INVENTORY_EMPTY) != 0); }
- inline BOOL flagAllowInventoryAdd() const { return ((mFlags & FLAGS_ALLOW_INVENTORY_DROP) != 0); }
- inline BOOL flagTemporaryOnRez() const { return ((mFlags & FLAGS_TEMPORARY_ON_REZ) != 0); }
- inline BOOL flagAnimSource() const { return ((mFlags & FLAGS_ANIM_SOURCE) != 0); }
- inline BOOL flagCameraSource() const { return ((mFlags & FLAGS_CAMERA_SOURCE) != 0); }
- inline BOOL flagCameraDecoupled() const { return ((mFlags & FLAGS_CAMERA_DECOUPLED) != 0); }
+ bool permAnyOwner() const;
+ bool permYouOwner() const;
+ bool permGroupOwner() const;
+ bool permOwnerModify() const;
+ bool permModify() const;
+ bool permCopy() const;
+ bool permMove() const;
+ bool permTransfer() const;
+ inline bool flagUsePhysics() const { return ((mFlags & FLAGS_USE_PHYSICS) != 0); }
+ inline bool flagObjectAnyOwner() const { return ((mFlags & FLAGS_OBJECT_ANY_OWNER) != 0); }
+ inline bool flagObjectYouOwner() const { return ((mFlags & FLAGS_OBJECT_YOU_OWNER) != 0); }
+ inline bool flagObjectGroupOwned() const { return ((mFlags & FLAGS_OBJECT_GROUP_OWNED) != 0); }
+ inline bool flagObjectOwnerModify() const { return ((mFlags & FLAGS_OBJECT_OWNER_MODIFY) != 0); }
+ inline bool flagObjectModify() const { return ((mFlags & FLAGS_OBJECT_MODIFY) != 0); }
+ inline bool flagObjectCopy() const { return ((mFlags & FLAGS_OBJECT_COPY) != 0); }
+ inline bool flagObjectMove() const { return ((mFlags & FLAGS_OBJECT_MOVE) != 0); }
+ inline bool flagObjectTransfer() const { return ((mFlags & FLAGS_OBJECT_TRANSFER) != 0); }
+ inline bool flagObjectPermanent() const { return ((mFlags & FLAGS_AFFECTS_NAVMESH) != 0); }
+ inline bool flagCharacter() const { return ((mFlags & FLAGS_CHARACTER) != 0); }
+ inline bool flagVolumeDetect() const { return ((mFlags & FLAGS_VOLUME_DETECT) != 0); }
+ inline bool flagIncludeInSearch() const { return ((mFlags & FLAGS_INCLUDE_IN_SEARCH) != 0); }
+ inline bool flagScripted() const { return ((mFlags & FLAGS_SCRIPTED) != 0); }
+ inline bool flagHandleTouch() const { return ((mFlags & FLAGS_HANDLE_TOUCH) != 0); }
+ inline bool flagTakesMoney() const { return ((mFlags & FLAGS_TAKES_MONEY) != 0); }
+ inline bool flagPhantom() const { return ((mFlags & FLAGS_PHANTOM) != 0); }
+ inline bool flagInventoryEmpty() const { return ((mFlags & FLAGS_INVENTORY_EMPTY) != 0); }
+ inline bool flagAllowInventoryAdd() const { return ((mFlags & FLAGS_ALLOW_INVENTORY_DROP) != 0); }
+ inline bool flagTemporaryOnRez() const { return ((mFlags & FLAGS_TEMPORARY_ON_REZ) != 0); }
+ inline bool flagAnimSource() const { return ((mFlags & FLAGS_ANIM_SOURCE) != 0); }
+ inline bool flagCameraSource() const { return ((mFlags & FLAGS_CAMERA_SOURCE) != 0); }
+ inline bool flagCameraDecoupled() const { return ((mFlags & FLAGS_CAMERA_DECOUPLED) != 0); }
U8 getPhysicsShapeType() const;
inline F32 getPhysicsGravity() const { return mPhysicsGravity; }
@@ -569,7 +589,7 @@ public:
void setIncludeInSearch(bool include_in_search);
// Does "open" object menu item apply?
- BOOL allowOpen() const;
+ bool allowOpen() const;
void setClickAction(U8 action) { mClickAction = action; }
U8 getClickAction() const { return mClickAction; }
@@ -578,10 +598,10 @@ public:
void setRegion(LLViewerRegion *regionp);
virtual void updateRegion(LLViewerRegion *regionp);
- void updateFlags(BOOL physics_changed = FALSE);
+ void updateFlags(bool physics_changed = false);
void loadFlags(U32 flags); //load flags from cache or from message
- BOOL setFlags(U32 flag, BOOL state);
- BOOL setFlagsWithoutUpdate(U32 flag, BOOL state);
+ bool setFlags(U32 flag, bool state);
+ bool setFlagsWithoutUpdate(U32 flag, bool state);
void setPhysicsShapeType(U8 type);
void setPhysicsGravity(F32 gravity);
void setPhysicsFriction(F32 friction);
@@ -600,11 +620,11 @@ public:
virtual LLNetworkData* getParameterEntry(U16 param_type) const;
virtual bool setParameterEntry(U16 param_type, const LLNetworkData& new_value, bool local_origin);
- virtual BOOL getParameterEntryInUse(U16 param_type) const;
- virtual bool setParameterEntryInUse(U16 param_type, BOOL in_use, bool local_origin);
+ virtual bool getParameterEntryInUse(U16 param_type) const;
+ virtual bool setParameterEntryInUse(U16 param_type, bool in_use, bool local_origin);
// Called when a parameter is changed
virtual void parameterChanged(U16 param_type, bool local_origin);
- virtual void parameterChanged(U16 param_type, LLNetworkData* data, BOOL in_use, bool local_origin);
+ virtual void parameterChanged(U16 param_type, LLNetworkData* data, bool in_use, bool local_origin);
bool isShrinkWrapped() const { return mShouldShrinkWrap; }
@@ -630,7 +650,7 @@ public:
public:
//counter-translation
- void resetChildrenPosition(const LLVector3& offset, BOOL simplified = FALSE, BOOL skip_avatar_child = FALSE) ;
+ void resetChildrenPosition(const LLVector3& offset, bool simplified = false, bool skip_avatar_child = false) ;
//counter-rotation
void resetChildrenRotationAndPosition(const std::vector<LLQuaternion>& rotations,
const std::vector<LLVector3>& positions) ;
@@ -707,7 +727,7 @@ public:
// true if user can select this object by clicking under any circumstances (even if pick_unselectable is true)
// can likely be factored out
- BOOL mbCanSelect;
+ bool mbCanSelect;
private:
// Grabbed from UPDATE_FLAGS
@@ -722,15 +742,17 @@ public:
F32 mPhysicsDensity;
F32 mPhysicsRestitution;
+ // Associated GLTF Asset
+ std::shared_ptr<LL::GLTF::Asset> mGLTFAsset;
// Pipeline classes
LLPointer<LLDrawable> mDrawable;
// Band-aid to select object after all creation initialization is done
- BOOL mCreateSelected;
+ bool mCreateSelected;
// Replace textures with web pages on this object while drawing
- BOOL mRenderMedia;
+ bool mRenderMedia;
bool mRiggedAttachedWarned;
@@ -744,7 +766,7 @@ public:
std::string mHudText;
LLColor4 mHudTextColor;
- static BOOL sUseSharedDrawables;
+ static bool sUseSharedDrawables;
public:
// Returns mControlAvatar for the edit root prim of this linkset
@@ -779,10 +801,8 @@ protected:
static LLViewerObject *createObject(const LLUUID &id, LLPCode pcode, LLViewerRegion *regionp, S32 flags = 0);
- BOOL setData(const U8 *datap, const U32 data_size);
-
// Hide or show HUD, icon and particles
- void hideExtraDisplayItems( BOOL hidden );
+ void hideExtraDisplayItems( bool hidden );
//////////////////////////
//
@@ -790,10 +810,10 @@ protected:
//
static void processTaskInvFile(void** user_data, S32 error_code, LLExtStat ext_status);
- BOOL loadTaskInvFile(const std::string& filename);
+ bool loadTaskInvFile(const std::string& filename);
void doInventoryCallback();
- BOOL isOnMap();
+ bool isOnMap();
void unpackParticleSource(const S32 block_num, const LLUUID& owner_id);
void unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_id, bool legacy);
@@ -854,15 +874,15 @@ protected:
};
EInventoryRequestState mInvRequestState;
U64 mInvRequestXFerId;
- BOOL mInventoryDirty;
+ bool mInventoryDirty;
LLViewerRegion *mRegionp; // Region that this object belongs to.
- BOOL mDead;
- BOOL mOrphaned; // This is an orphaned child
- BOOL mUserSelected; // Cached user select information
- BOOL mOnActiveList;
- BOOL mOnMap; // On the map.
- BOOL mStatic; // Object doesn't move.
+ bool mDead;
+ bool mOrphaned; // This is an orphaned child
+ bool mUserSelected; // Cached user select information
+ bool mOnActiveList;
+ bool mOnMap; // On the map.
+ bool mStatic; // Object doesn't move.
S32 mSeatCount;
S32 mNumFaces;
@@ -886,11 +906,11 @@ protected:
static U32 sNumZombieObjects; // Objects which are dead, but not deleted
- static BOOL sMapDebug; // Map render mode
+ static bool sMapDebug; // Map render mode
static LLColor4 sEditSelectColor;
static LLColor4 sNoEditSelectColor;
static F32 sCurrentPulse;
- static BOOL sPulseEnabled;
+ static bool sPulseEnabled;
static S32 sAxisArrowLength;
@@ -903,8 +923,8 @@ protected:
static void setMaxUpdateInterpolationTime(F32 value) { sMaxUpdateInterpolationTime = (F64Seconds) value; }
static void setMaxRegionCrossingInterpolationTime(F32 value) { sMaxRegionCrossingInterpolationTime = (F64Seconds) value; }
- static void setVelocityInterpolate(BOOL value) { sVelocityInterpolate = value; }
- static void setPingInterpolate(BOOL value) { sPingInterpolate = value; }
+ static void setVelocityInterpolate(bool value) { sVelocityInterpolate = value; }
+ static void setPingInterpolate(bool value) { sPingInterpolate = value; }
private:
static S32 sNumObjects;
@@ -913,8 +933,8 @@ private:
static F64Seconds sMaxUpdateInterpolationTime; // For motion interpolation
static F64Seconds sMaxRegionCrossingInterpolationTime; // For motion interpolation
- static BOOL sVelocityInterpolate;
- static BOOL sPingInterpolate;
+ static bool sVelocityInterpolate;
+ static bool sPingInterpolate;
bool mCachedOwnerInMuteList;
F64 mCachedMuteListUpdateTime;
@@ -928,8 +948,8 @@ public:
const LLUUID &extractAttachmentItemID(); // find&set the inventory item ID of the attached object
EObjectUpdateType getLastUpdateType() const;
void setLastUpdateType(EObjectUpdateType last_update_type);
- BOOL getLastUpdateCached() const;
- void setLastUpdateCached(BOOL last_update_cached);
+ bool getLastUpdateCached() const;
+ void setLastUpdateCached(bool last_update_cached);
virtual void updateRiggingInfo() {}
@@ -938,12 +958,13 @@ public:
private:
LLUUID mAttachmentItemID; // ItemID of the associated object is in user inventory.
EObjectUpdateType mLastUpdateType;
- BOOL mLastUpdateCached;
+ bool mLastUpdateCached;
public:
// reflection probe state
bool mIsReflectionProbe = false; // if true, this object should register itself with LLReflectionProbeManager
LLPointer<LLReflectionMap> mReflectionProbe = nullptr; // reflection probe coupled to this viewer object. If not null, should be deregistered when this object is destroyed
+ bool mIsHeroProbe = false; // This is a special case for mirrors and other high resolution probes.
// the amount of GPU time (in ms) it took to render this object according to LLPipeline::profileAvatar
// -1.f if no profile data available
@@ -956,14 +977,14 @@ public:
//
//
-inline void LLViewerObject::setRotation(const LLQuaternion& quat, BOOL damped)
+inline void LLViewerObject::setRotation(const LLQuaternion& quat, bool damped)
{
LLPrimitive::setRotation(quat);
setChanged(ROTATED | SILHOUETTE);
updateDrawable(damped);
}
-inline void LLViewerObject::setRotation(const F32 x, const F32 y, const F32 z, BOOL damped)
+inline void LLViewerObject::setRotation(const F32 x, const F32 y, const F32 z, bool damped)
{
LLPrimitive::setRotation(x, y, z);
setChanged(ROTATED | SILHOUETTE);
@@ -973,10 +994,10 @@ inline void LLViewerObject::setRotation(const F32 x, const F32 y, const F32 z, B
class LLViewerObjectMedia
{
public:
- LLViewerObjectMedia() : mMediaURL(), mPassedWhitelist(FALSE), mMediaType(0) { }
+ LLViewerObjectMedia() : mMediaURL(), mPassedWhitelist(false), mMediaType(0) { }
std::string mMediaURL; // for web pages on surfaces, one per prim
- BOOL mPassedWhitelist; // user has OK'd display
+ bool mPassedWhitelist; // user has OK'd display
U8 mMediaType; // see LLTextureEntry::WEB_PAGE, etc.
};
@@ -1005,11 +1026,11 @@ public:
class LLStaticViewerObject : public LLViewerObject
{
public:
- LLStaticViewerObject(const LLUUID& id, const LLPCode pcode, LLViewerRegion* regionp, BOOL is_global = FALSE)
+ LLStaticViewerObject(const LLUUID& id, const LLPCode pcode, LLViewerRegion* regionp, bool is_global = false)
: LLViewerObject(id,pcode,regionp, is_global)
{ }
- virtual void updateDrawable(BOOL force_damped);
+ virtual void updateDrawable(bool force_damped);
};
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index a53bd982d4..729098623f 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -86,7 +86,7 @@
#include <iterator>
extern F32 gMinObjectDistance;
-extern BOOL gAnimateTextures;
+extern bool gAnimateTextures;
#define MAX_CONCURRENT_PHYSICS_REQUESTS 256
@@ -109,7 +109,7 @@ LLViewerObjectList::LLViewerObjectList()
mNumDeadObjects = 0;
mNumOrphans = 0;
mNumNewObjects = 0;
- mWasPaused = FALSE;
+ mWasPaused = false;
mNumDeadObjectUpdates = 0;
mNumUnknownUpdates = 0;
}
@@ -167,7 +167,7 @@ U64 LLViewerObjectList::getIndex(const U32 local_id,
return (((U64)index) << 32) | (U64)local_id;
}
-BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject* objectp)
+bool LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject* objectp)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
@@ -186,21 +186,21 @@ BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject* objectp)
std::map<U64, LLUUID>::iterator iter = sIndexAndLocalIDToUUID.find(indexid);
if (iter == sIndexAndLocalIDToUUID.end())
{
- return FALSE;
+ return false;
}
// Found existing entry
if (iter->second == objectp->getID())
{ // Full UUIDs match, so remove the entry
sIndexAndLocalIDToUUID.erase(iter);
- return TRUE;
+ return true;
}
// UUIDs did not match - this would zap a valid entry, so don't erase it
//LL_INFOS() << "Tried to erase entry where id in table ("
// << iter->second << ") did not match object " << object.getID() << LL_ENDL;
}
- return FALSE ;
+ return false ;
}
void LLViewerObjectList::setUUIDAndLocal(const LLUUID &id,
@@ -391,7 +391,7 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry*
else
{
objectp->setLastUpdateType(OUT_FULL_COMPRESSED); //newly cached
- objectp->setLastUpdateCached(TRUE);
+ objectp->setLastUpdateCached(true);
}
LLVOAvatar::cullAvatarsByPixelArea();
@@ -471,7 +471,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
for (i = 0; i < num_objects; i++)
{
- BOOL justCreated = FALSE;
+ bool justCreated = false;
bool update_cache = false; //update object cache if it is a full-update or terse update
if (compressed)
@@ -646,7 +646,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
continue;
}
- justCreated = TRUE;
+ justCreated = true;
mNumNewObjects++;
}
@@ -1318,7 +1318,7 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
if (objectp->onActiveList())
{
//LL_INFOS() << "Removing " << objectp->mID << " " << objectp->getPCodeString() << " from active list in cleanupReferences." << LL_ENDL;
- objectp->setOnActiveList(FALSE);
+ objectp->setOnActiveList(false);
removeFromActiveList(objectp);
}
@@ -1335,7 +1335,7 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
}
}
-BOOL LLViewerObjectList::killObject(LLViewerObject *objectp)
+bool LLViewerObjectList::killObject(LLViewerObject *objectp)
{
LL_PROFILE_ZONE_SCOPED;
// Don't ever kill gAgentAvatarp, just force it to the agent's region
@@ -1343,7 +1343,7 @@ BOOL LLViewerObjectList::killObject(LLViewerObject *objectp)
if ((objectp == gAgentAvatarp) && gAgent.getRegion())
{
objectp->setRegion(gAgent.getRegion());
- return FALSE;
+ return false;
}
// When we're killing objects, all we do is mark them as dead.
@@ -1356,10 +1356,10 @@ BOOL LLViewerObjectList::killObject(LLViewerObject *objectp)
// so create a pointer to make sure object will stay alive untill markDead() finishes
LLPointer<LLViewerObject> sp(objectp);
sp->markDead(); // does the right thing if object already dead
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void LLViewerObjectList::killObjects(LLViewerRegion *regionp)
@@ -1379,7 +1379,7 @@ void LLViewerObjectList::killObjects(LLViewerRegion *regionp)
}
// Have to clean right away because the region is becoming invalid.
- cleanDeadObjects(FALSE);
+ cleanDeadObjects(false);
}
void LLViewerObjectList::killAllObjects()
@@ -1395,7 +1395,7 @@ void LLViewerObjectList::killAllObjects()
llassert((objectp == gAgentAvatarp) || objectp->isDead());
}
- cleanDeadObjects(FALSE);
+ cleanDeadObjects(false);
if(!mObjects.empty())
{
@@ -1416,7 +1416,7 @@ void LLViewerObjectList::killAllObjects()
}
}
-void LLViewerObjectList::cleanDeadObjects(BOOL use_timer)
+void LLViewerObjectList::cleanDeadObjects(bool use_timer)
{
if (!mNumDeadObjects)
{
@@ -1501,7 +1501,7 @@ void LLViewerObjectList::updateActive(LLViewerObject *objectp)
return; // We don't update dead objects!
}
- BOOL active = objectp->isActive();
+ bool active = objectp->isActive();
if (active != objectp->onActiveList())
{
if (active)
@@ -1512,7 +1512,7 @@ void LLViewerObjectList::updateActive(LLViewerObject *objectp)
{
mActiveObjects.push_back(objectp);
objectp->setListIndex(mActiveObjects.size()-1);
- objectp->setOnActiveList(TRUE);
+ objectp->setOnActiveList(true);
}
else
{
@@ -1530,7 +1530,7 @@ void LLViewerObjectList::updateActive(LLViewerObject *objectp)
{
//LL_INFOS() << "Removing " << objectp->mID << " " << objectp->getPCodeString() << " from active list." << LL_ENDL;
removeFromActiveList(objectp);
- objectp->setOnActiveList(FALSE);
+ objectp->setOnActiveList(false);
}
}
@@ -1804,7 +1804,7 @@ void LLViewerObjectList::renderObjectBounds(const LLVector3 &center)
{
}
-extern BOOL gCubeSnapshot;
+extern bool gCubeSnapshot;
void LLViewerObjectList::addDebugBeacon(const LLVector3 &pos_agent,
const std::string &string,
@@ -1953,7 +1953,7 @@ void LLViewerObjectList::orphanize(LLViewerObject *childp, U32 parent_id, U32 ip
LL_DEBUGS("ORPHANS") << "Orphaning object " << childp->getID() << " with parent " << parent_id << LL_ENDL;
// We're an orphan, flag things appropriately.
- childp->mOrphaned = TRUE;
+ childp->mOrphaned = true;
if (childp->mDrawable.notNull())
{
bool make_invisible = true;
@@ -2026,7 +2026,7 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port)
}
U64 parent_info = getIndex(objectp->mLocalID, ip, port);
- BOOL orphans_found = FALSE;
+ bool orphans_found = false;
// Iterate through the orphan list, and set parents of matching children.
for (std::vector<OrphanInfo>::iterator iter = mOrphanChildren.begin(); iter != mOrphanChildren.end(); )
@@ -2058,7 +2058,7 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port)
objectp->setChanged(LLXform::MOVED | LLXform::SILHOUETTE);
// Flag the object as no longer orphaned
- childp->mOrphaned = FALSE;
+ childp->mOrphaned = false;
if (childp->mDrawable.notNull())
{
// Make the drawable visible again and set the drawable parent
@@ -2068,10 +2068,10 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port)
}
// Make certain particles, icon and HUD aren't hidden
- childp->hideExtraDisplayItems( FALSE );
+ childp->hideExtraDisplayItems( false );
objectp->addChild(childp);
- orphans_found = TRUE;
+ orphans_found = true;
++iter;
}
else
diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h
index f2cba8c259..af73743e11 100644
--- a/indra/newview/llviewerobjectlist.h
+++ b/indra/newview/llviewerobjectlist.h
@@ -74,11 +74,11 @@ public:
LLViewerObject *replaceObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); // TomY: hack to switch VO instances on the fly
- BOOL killObject(LLViewerObject *objectp);
+ bool killObject(LLViewerObject *objectp);
void killObjects(LLViewerRegion *regionp); // Kill all objects owned by a particular region.
void killAllObjects();
- void cleanDeadObjects(const BOOL use_timer = TRUE); // Clean up the dead object list.
+ void cleanDeadObjects(const bool use_timer = true); // Clean up the dead object list.
// Simulator and viewer side object updates...
void processUpdateCore(LLViewerObject* objectp, void** data, U32 block, const EObjectUpdateType update_type,
@@ -169,7 +169,7 @@ public:
// if we paused in the last frame
// used to discount stats from this frame
- BOOL mWasPaused;
+ bool mWasPaused;
static void getUUIDFromLocal(LLUUID &id,
const U32 local_id,
@@ -180,7 +180,7 @@ public:
const U32 ip,
const U32 port); // Requires knowledge of message system info!
- static BOOL removeFromLocalIDTable(const LLViewerObject* objectp);
+ static bool removeFromLocalIDTable(const LLViewerObject* objectp);
// Used ONLY by the orphaned object code.
static U64 getIndex(const U32 local_id, const U32 ip, const U32 port);
diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp
index 9d63241300..420f02d759 100644
--- a/indra/newview/llvieweroctree.cpp
+++ b/indra/newview/llvieweroctree.cpp
@@ -38,7 +38,7 @@
//static variables definitions
//-----------------------------------------------------------------------------------
U32 LLViewerOctreeEntryData::sCurVisible = 10; //reserve the low numbers for special use.
-BOOL LLViewerOctreeDebug::sInDebug = FALSE;
+bool LLViewerOctreeDebug::sInDebug = false;
static LLTrace::CountStatHandle<S32> sOcclusionQueries("occlusion_queries", "Number of occlusion queries executed"),
sNumObjectsOccluded("occluded_objects", "Count of objects being occluded by a query"),
@@ -566,7 +566,7 @@ void LLViewerOctreeGroup::rebound()
}
else if (mOctreeNode->getChildCount() == 0)
{ //copy object bounding box if this is a leaf
- boundObjects(TRUE, mExtents[0], mExtents[1]);
+ boundObjects(true, mExtents[0], mExtents[1]);
mBounds[0] = mObjectBounds[0];
mBounds[1] = mObjectBounds[1];
}
@@ -594,7 +594,7 @@ void LLViewerOctreeGroup::rebound()
newMin.setMin(newMin, min);
}
- boundObjects(FALSE, newMin, newMax);
+ boundObjects(false, newMin, newMax);
mBounds[0].setAdd(newMin, newMax);
mBounds[0].mul(0.5f);
@@ -700,7 +700,7 @@ LLViewerOctreeGroup* LLViewerOctreeGroup::getParent()
}
//virtual
-bool LLViewerOctreeGroup::boundObjects(BOOL empty, LLVector4a& minOut, LLVector4a& maxOut)
+bool LLViewerOctreeGroup::boundObjects(bool empty, LLVector4a& minOut, LLVector4a& maxOut)
{
const OctreeNode* node = mOctreeNode;
@@ -754,19 +754,19 @@ bool LLViewerOctreeGroup::boundObjects(BOOL empty, LLVector4a& minOut, LLVector4
maxOut.setMax(maxOut, newMax);
}
- return TRUE;
+ return true;
}
//virtual
-BOOL LLViewerOctreeGroup::isVisible() const
+bool LLViewerOctreeGroup::isVisible() const
{
- return mVisible[LLViewerCamera::sCurCameraID] >= LLViewerOctreeEntryData::getCurrentFrame() ? TRUE : FALSE;
+ return mVisible[LLViewerCamera::sCurCameraID] >= LLViewerOctreeEntryData::getCurrentFrame() ? true : false;
}
//virtual
-BOOL LLViewerOctreeGroup::isRecentlyVisible() const
+bool LLViewerOctreeGroup::isRecentlyVisible() const
{
- return FALSE;
+ return false;
}
void LLViewerOctreeGroup::setVisible()
@@ -886,18 +886,18 @@ LLOcclusionCullingGroup::~LLOcclusionCullingGroup()
releaseOcclusionQueryObjectNames();
}
-BOOL LLOcclusionCullingGroup::needsUpdate()
+bool LLOcclusionCullingGroup::needsUpdate()
{
- return (LLDrawable::getCurrentFrame() % mSpatialPartition->mLODPeriod == mLODHash) ? TRUE : FALSE;
+ return (LLDrawable::getCurrentFrame() % mSpatialPartition->mLODPeriod == mLODHash) ? true : false;
}
-BOOL LLOcclusionCullingGroup::isRecentlyVisible() const
+bool LLOcclusionCullingGroup::isRecentlyVisible() const
{
const S32 MIN_VIS_FRAME_RANGE = 2;
return (LLDrawable::getCurrentFrame() - mVisible[LLViewerCamera::sCurCameraID]) < MIN_VIS_FRAME_RANGE ;
}
-BOOL LLOcclusionCullingGroup::isAnyRecentlyVisible() const
+bool LLOcclusionCullingGroup::isAnyRecentlyVisible() const
{
const S32 MIN_VIS_FRAME_RANGE = 2;
return (LLDrawable::getCurrentFrame() - mAnyVisible) < MIN_VIS_FRAME_RANGE ;
@@ -1055,12 +1055,12 @@ void LLOcclusionCullingGroup::clearOcclusionState(U32 state, S32 mode /* = STATE
}
}
-BOOL LLOcclusionCullingGroup::earlyFail(LLCamera* camera, const LLVector4a* bounds)
+bool LLOcclusionCullingGroup::earlyFail(LLCamera* camera, const LLVector4a* bounds)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_OCTREE;
if (camera->getOrigin().isExactlyZero())
{
- return FALSE;
+ return false;
}
const F32 vel = SG_OCCLUSION_FUDGE*2.f;
@@ -1073,7 +1073,7 @@ BOOL LLOcclusionCullingGroup::earlyFail(LLCamera* camera, const LLVector4a* boun
/*if (r.magVecSquared() > 1024.0*1024.0)
{
- return TRUE;
+ return true;
}*/
LLVector4a e;
@@ -1087,16 +1087,16 @@ BOOL LLOcclusionCullingGroup::earlyFail(LLCamera* camera, const LLVector4a* boun
S32 lt = e.lessThan(min).getGatheredBits() & 0x7;
if (lt)
{
- return FALSE;
+ return false;
}
S32 gt = e.greaterThan(max).getGatheredBits() & 0x7;
if (gt)
{
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
U32 LLOcclusionCullingGroup::getLastOcclusionIssuedTime()
@@ -1301,7 +1301,7 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector4a* sh
//-----------------------------------------------------------------------------------
LLViewerOctreePartition::LLViewerOctreePartition() :
mRegionp(NULL),
- mOcclusionEnabled(TRUE),
+ mOcclusionEnabled(true),
mDrawableType(0),
mLODSeed(0),
mLODPeriod(1)
@@ -1324,7 +1324,7 @@ void LLViewerOctreePartition::cleanup()
mOctree = nullptr;
}
-BOOL LLViewerOctreePartition::isOcclusionEnabled()
+bool LLViewerOctreePartition::isOcclusionEnabled()
{
return mOcclusionEnabled || LLPipeline::sUseOcclusion > 2;
}
diff --git a/indra/newview/llvieweroctree.h b/indra/newview/llvieweroctree.h
index 353429d254..7d9dfe7605 100644
--- a/indra/newview/llvieweroctree.h
+++ b/indra/newview/llvieweroctree.h
@@ -213,11 +213,11 @@ public:
virtual void unbound();
virtual void rebound();
- BOOL isDead() { return hasState(DEAD); }
+ bool isDead() { return hasState(DEAD); }
void setVisible();
- BOOL isVisible() const;
- virtual BOOL isRecentlyVisible() const;
+ bool isVisible() const;
+ virtual bool isRecentlyVisible() const;
S32 getVisible(LLViewerCamera::eCameraID id) const {return mVisible[id];}
S32 getAnyVisible() const {return mAnyVisible;}
bool isEmpty() const { return mOctreeNode->isEmpty(); }
@@ -253,7 +253,7 @@ public:
protected:
void checkStates();
private:
- virtual bool boundObjects(BOOL empty, LLVector4a& minOut, LLVector4a& maxOut);
+ virtual bool boundObjects(bool empty, LLVector4a& minOut, LLVector4a& maxOut);
protected:
U32 mState;
@@ -305,19 +305,19 @@ public:
void clearOcclusionState(U32 state, S32 mode = STATE_MODE_SINGLE);
void checkOcclusion(); //read back last occlusion query (if any)
void doOcclusion(LLCamera* camera, const LLVector4a* shift = NULL); //issue occlusion query
- BOOL isOcclusionState(U32 state) const { return mOcclusionState[LLViewerCamera::sCurCameraID] & state ? TRUE : FALSE; }
+ bool isOcclusionState(U32 state) const { return mOcclusionState[LLViewerCamera::sCurCameraID] & state ? true : false; }
U32 getOcclusionState() const { return mOcclusionState[LLViewerCamera::sCurCameraID];}
- BOOL needsUpdate();
+ bool needsUpdate();
U32 getLastOcclusionIssuedTime();
//virtual
void handleChildAddition(const OctreeNode* parent, OctreeNode* child);
//virtual
- BOOL isRecentlyVisible() const;
+ bool isRecentlyVisible() const;
LLViewerOctreePartition* getSpatialPartition()const {return mSpatialPartition;}
- BOOL isAnyRecentlyVisible() const;
+ bool isAnyRecentlyVisible() const;
static U32 getNewOcclusionQueryObjectName();
static void releaseOcclusionQueryObjectName(U32 name);
@@ -326,7 +326,7 @@ protected:
void releaseOcclusionQueryObjectNames();
private:
- BOOL earlyFail(LLCamera* camera, const LLVector4a* bounds);
+ bool earlyFail(LLCamera* camera, const LLVector4a* bounds);
protected:
U32 mOcclusionState[LLViewerCamera::NUM_CAMERAS];
@@ -350,7 +350,7 @@ public:
// Cull on arbitrary frustum
virtual S32 cull(LLCamera &camera, bool do_occlusion) = 0;
- BOOL isOcclusionEnabled();
+ bool isOcclusionEnabled();
protected:
// MUST call from destructor of any derived classes (SL-17276)
@@ -361,7 +361,7 @@ public:
U32 mDrawableType;
OctreeNode* mOctree;
LLViewerRegion* mRegionp; // the region this partition belongs to.
- BOOL mOcclusionEnabled; // if TRUE, occlusion culling is performed
+ bool mOcclusionEnabled; // if true, occlusion culling is performed
U32 mLODSeed;
U32 mLODPeriod; //number of frames between LOD updates for a given spatial group (staggered by mLODSeed)
};
@@ -419,7 +419,7 @@ public:
virtual void visit(const OctreeNode* branch);
public:
- static BOOL sInDebug;
+ static bool sInDebug;
};
#endif
diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp
index 83b05e6b4d..05698738b3 100644
--- a/indra/newview/llviewerparcelmedia.cpp
+++ b/indra/newview/llviewerparcelmedia.cpp
@@ -400,8 +400,8 @@ void LLViewerParcelMedia::processParcelMediaUpdate( LLMessageSystem *msg)
std::string media_type;
S32 media_width = 0;
S32 media_height = 0;
- U8 media_auto_scale = FALSE;
- U8 media_loop = FALSE;
+ U8 media_auto_scale = 0;
+ U8 media_loop = 0;
msg->getUUID( "DataBlock", "MediaID", media_id );
char media_url_buffer[257];
@@ -420,16 +420,15 @@ void LLViewerParcelMedia::processParcelMediaUpdate( LLMessageSystem *msg)
}
LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
- BOOL same = FALSE;
if (parcel)
{
- same = ((parcel->getMediaURL() == media_url) &&
- (parcel->getMediaType() == media_type) &&
- (parcel->getMediaID() == media_id) &&
- (parcel->getMediaWidth() == media_width) &&
- (parcel->getMediaHeight() == media_height) &&
- (parcel->getMediaAutoScale() == media_auto_scale) &&
- (parcel->getMediaLoop() == media_loop));
+ bool same = ((parcel->getMediaURL() == media_url) &&
+ (parcel->getMediaType() == media_type) &&
+ (parcel->getMediaID() == media_id) &&
+ (parcel->getMediaWidth() == media_width) &&
+ (parcel->getMediaHeight() == media_height) &&
+ (parcel->getMediaAutoScale() == media_auto_scale) &&
+ (parcel->getMediaLoop() == media_loop));
if (!same)
{
diff --git a/indra/newview/llviewerparcelmediaautoplay.cpp b/indra/newview/llviewerparcelmediaautoplay.cpp
index db8fcb4dc4..076dc69c05 100644
--- a/indra/newview/llviewerparcelmediaautoplay.cpp
+++ b/indra/newview/llviewerparcelmediaautoplay.cpp
@@ -49,7 +49,7 @@ LLViewerParcelMediaAutoPlay::LLViewerParcelMediaAutoPlay() :
LLEventTimer(1),
mLastParcelID(-1),
- mPlayed(FALSE),
+ mPlayed(false),
mTimeInParcel(0)
{
}
@@ -57,10 +57,10 @@ LLViewerParcelMediaAutoPlay::LLViewerParcelMediaAutoPlay() :
// static
void LLViewerParcelMediaAutoPlay::playStarted()
{
- LLSingleton<LLViewerParcelMediaAutoPlay>::getInstance()->mPlayed = TRUE;
+ LLSingleton<LLViewerParcelMediaAutoPlay>::getInstance()->mPlayed = true;
}
-BOOL LLViewerParcelMediaAutoPlay::tick()
+bool LLViewerParcelMediaAutoPlay::tick()
{
LLParcel *this_parcel = NULL;
LLViewerRegion *this_region = NULL;
@@ -94,7 +94,7 @@ BOOL LLViewerParcelMediaAutoPlay::tick()
this_region_id != mLastRegionID)
{
// we've entered a new parcel
- mPlayed = FALSE; // we haven't autoplayed yet
+ mPlayed = false; // we haven't autoplayed yet
mTimeInParcel = 0; // reset our timer
mLastParcelID = this_parcel_id;
mLastRegionID = this_region_id;
@@ -110,7 +110,7 @@ BOOL LLViewerParcelMediaAutoPlay::tick()
{
if (this_media_texture_id.notNull()) // and if the media texture is good
{
- LLViewerMediaTexture *image = LLViewerTextureManager::getMediaTexture(this_media_texture_id, FALSE) ;
+ LLViewerMediaTexture *image = LLViewerTextureManager::getMediaTexture(this_media_texture_id, false) ;
F32 image_size = 0;
@@ -149,14 +149,14 @@ BOOL LLViewerParcelMediaAutoPlay::tick()
}
}
- mPlayed = TRUE;
+ mPlayed = true;
}
}
}
}
- return FALSE; // continue ticking forever please.
+ return false; // continue ticking forever please.
}
//static
diff --git a/indra/newview/llviewerparcelmediaautoplay.h b/indra/newview/llviewerparcelmediaautoplay.h
index e83085dee0..990906fedc 100644
--- a/indra/newview/llviewerparcelmediaautoplay.h
+++ b/indra/newview/llviewerparcelmediaautoplay.h
@@ -35,7 +35,7 @@ class LLViewerParcelMediaAutoPlay : LLEventTimer, public LLSingleton<LLViewerPar
{
LLSINGLETON(LLViewerParcelMediaAutoPlay);
public:
- virtual BOOL tick() override;
+ virtual bool tick() override;
static void playStarted();
private:
@@ -45,7 +45,7 @@ public:
private:
S32 mLastParcelID;
LLUUID mLastRegionID;
- BOOL mPlayed;
+ bool mPlayed;
F32 mTimeInParcel;
};
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 15accd0547..daeb9de1e3 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -116,7 +116,7 @@ struct LLGodForceOwnerData
// Methods
//
LLViewerParcelMgr::LLViewerParcelMgr()
-: mSelected(FALSE),
+: mSelected(false),
mRequestResult(0),
mWestSouth(),
mEastNorth(),
@@ -126,8 +126,8 @@ LLViewerParcelMgr::LLViewerParcelMgr()
mHoverWestSouth(),
mHoverEastNorth(),
mTeleportInProgressPosition(),
- mRenderCollision(FALSE),
- mRenderSelection(TRUE),
+ mRenderCollision(false),
+ mRenderSelection(true),
mCollisionBanned(0),
mCollisionTimer(),
mMediaParcelId(0),
@@ -151,8 +151,8 @@ LLViewerParcelMgr::LLViewerParcelMgr()
// JC: Resolved a merge conflict here, eliminated
// mBlockedImage->setAddressMode(LLTexUnit::TAM_WRAP);
// because it is done in llviewertexturelist.cpp
- mBlockedImage = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryLines.png", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI);
- mPassImage = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryPassLines.png", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI);
+ mBlockedImage = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryLines.png", FTT_LOCAL_FILE, true, LLGLTexture::BOOST_UI);
+ mPassImage = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryPassLines.png", FTT_LOCAL_FILE, true, LLGLTexture::BOOST_UI);
S32 overlay_size = mParcelsPerEdge * mParcelsPerEdge / PARCEL_OVERLAY_CHUNKS;
sPackedOverlay = new U8[overlay_size];
@@ -164,7 +164,7 @@ LLViewerParcelMgr::LLViewerParcelMgr()
mAgentParcelOverlay[i] = 0;
}
- mTeleportInProgress = TRUE; // the initial parcel update is treated like teleport
+ mTeleportInProgress = true; // the initial parcel update is treated like teleport
}
@@ -234,13 +234,13 @@ LLViewerRegion* LLViewerParcelMgr::getSelectionRegion()
void LLViewerParcelMgr::getDisplayInfo(S32* area_out, S32* claim_out,
S32* rent_out,
- BOOL* for_sale_out,
+ bool* for_sale_out,
F32* dwell_out)
{
S32 area = 0;
S32 price = 0;
S32 rent = 0;
- BOOL for_sale = FALSE;
+ bool for_sale = false;
F32 dwell = DWELL_NAN;
if (mSelected)
@@ -257,12 +257,12 @@ void LLViewerParcelMgr::getDisplayInfo(S32* area_out, S32* claim_out,
if (mCurrentParcel->getForSale())
{
price = mCurrentParcel->getSalePrice();
- for_sale = TRUE;
+ for_sale = true;
}
else
{
price = area * mCurrentParcel->getClaimPricePerMeter();
- for_sale = FALSE;
+ for_sale = false;
}
rent = mCurrentParcel->getTotalRent();
@@ -432,14 +432,14 @@ LLParcelSelectionHandle LLViewerParcelMgr::selectParcelAt(const LLVector3d& pos_
northeast.mdV[VY] = ll_round( northeast.mdV[VY], (F64)PARCEL_GRID_STEP_METERS );
// Snap to parcel
- return selectLand( southwest, northeast, TRUE );
+ return selectLand( southwest, northeast, true );
}
// Tries to select the parcel inside the rectangle
LLParcelSelectionHandle LLViewerParcelMgr::selectParcelInRectangle()
{
- return selectLand(mWestSouth, mEastNorth, TRUE);
+ return selectLand(mWestSouth, mEastNorth, true);
}
@@ -476,8 +476,8 @@ void LLViewerParcelMgr::selectCollisionParcel()
mCurrentParcelSelection->setParcel(NULL);
mCurrentParcelSelection = new LLParcelSelection(mCurrentParcel);
- mSelected = TRUE;
- mCurrentParcelSelection->mWholeParcelSelected = TRUE;
+ mSelected = true;
+ mCurrentParcelSelection->mWholeParcelSelected = true;
notifyObservers();
return;
}
@@ -485,7 +485,7 @@ void LLViewerParcelMgr::selectCollisionParcel()
// snap_selection = auto-select the hit parcel, if there is exactly one
LLParcelSelectionHandle LLViewerParcelMgr::selectLand(const LLVector3d &corner1, const LLVector3d &corner2,
- BOOL snap_selection)
+ bool snap_selection)
{
sanitize_corners( corner1, corner2, mWestSouth, mEastNorth );
@@ -493,7 +493,7 @@ LLParcelSelectionHandle LLViewerParcelMgr::selectLand(const LLVector3d &corner1,
F32 delta_x = getSelectionWidth();
if (delta_x * delta_x <= 1.f * 1.f)
{
- mSelected = FALSE;
+ mSelected = false;
notifyObservers();
return NULL;
}
@@ -502,7 +502,7 @@ LLParcelSelectionHandle LLViewerParcelMgr::selectLand(const LLVector3d &corner1,
F32 delta_y = getSelectionHeight();
if (delta_y * delta_y <= 1.f * 1.f)
{
- mSelected = FALSE;
+ mSelected = false;
notifyObservers();
return NULL;
}
@@ -520,14 +520,14 @@ LLParcelSelectionHandle LLViewerParcelMgr::selectLand(const LLVector3d &corner1,
if(!region)
{
// just in case they somehow selected no land.
- mSelected = FALSE;
+ mSelected = false;
return NULL;
}
if (region != region_other)
{
LLNotificationsUtil::add("CantSelectLandFromMultipleRegions");
- mSelected = FALSE;
+ mSelected = false;
notifyObservers();
return NULL;
}
@@ -557,7 +557,7 @@ LLParcelSelectionHandle LLViewerParcelMgr::selectLand(const LLVector3d &corner1,
mCurrentParcelSelection->setParcel(NULL);
mCurrentParcelSelection = new LLParcelSelection(mCurrentParcel);
- mSelected = TRUE;
+ mSelected = true;
mCurrentParcelSelection->mWholeParcelSelected = snap_selection;
notifyObservers();
return mCurrentParcelSelection;
@@ -576,7 +576,7 @@ void LLViewerParcelMgr::deselectLand()
{
if (mSelected)
{
- mSelected = FALSE;
+ mSelected = false;
// Invalidate the selected parcel
mCurrentParcel->setLocalID(-1);
@@ -631,7 +631,7 @@ void LLViewerParcelMgr::notifyObservers()
//
// ACCESSORS
//
-BOOL LLViewerParcelMgr::selectionEmpty() const
+bool LLViewerParcelMgr::selectionEmpty() const
{
return !mSelected;
}
@@ -741,99 +741,99 @@ bool LLViewerParcelMgr::allowAgentDamage(const LLViewerRegion* region, const LLP
|| (parcel && parcel->getAllowDamage());
}
-BOOL LLViewerParcelMgr::isOwnedAt(const LLVector3d& pos_global) const
+bool LLViewerParcelMgr::isOwnedAt(const LLVector3d& pos_global) const
{
LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal( pos_global );
- if (!region) return FALSE;
+ if (!region) return false;
LLViewerParcelOverlay* overlay = region->getParcelOverlay();
- if (!overlay) return FALSE;
+ if (!overlay) return false;
LLVector3 pos_region = region->getPosRegionFromGlobal( pos_global );
return overlay->isOwned( pos_region );
}
-BOOL LLViewerParcelMgr::isOwnedSelfAt(const LLVector3d& pos_global) const
+bool LLViewerParcelMgr::isOwnedSelfAt(const LLVector3d& pos_global) const
{
LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal( pos_global );
- if (!region) return FALSE;
+ if (!region) return false;
LLViewerParcelOverlay* overlay = region->getParcelOverlay();
- if (!overlay) return FALSE;
+ if (!overlay) return false;
LLVector3 pos_region = region->getPosRegionFromGlobal( pos_global );
return overlay->isOwnedSelf( pos_region );
}
-BOOL LLViewerParcelMgr::isOwnedOtherAt(const LLVector3d& pos_global) const
+bool LLViewerParcelMgr::isOwnedOtherAt(const LLVector3d& pos_global) const
{
LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal( pos_global );
- if (!region) return FALSE;
+ if (!region) return false;
LLViewerParcelOverlay* overlay = region->getParcelOverlay();
- if (!overlay) return FALSE;
+ if (!overlay) return false;
LLVector3 pos_region = region->getPosRegionFromGlobal( pos_global );
return overlay->isOwnedOther( pos_region );
}
-BOOL LLViewerParcelMgr::isSoundLocal(const LLVector3d& pos_global) const
+bool LLViewerParcelMgr::isSoundLocal(const LLVector3d& pos_global) const
{
LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal( pos_global );
- if (!region) return FALSE;
+ if (!region) return false;
LLViewerParcelOverlay* overlay = region->getParcelOverlay();
- if (!overlay) return FALSE;
+ if (!overlay) return false;
LLVector3 pos_region = region->getPosRegionFromGlobal( pos_global );
return overlay->isSoundLocal( pos_region );
}
-BOOL LLViewerParcelMgr::canHearSound(const LLVector3d &pos_global) const
+bool LLViewerParcelMgr::canHearSound(const LLVector3d &pos_global) const
{
- BOOL in_agent_parcel = inAgentParcel(pos_global);
+ bool in_agent_parcel = inAgentParcel(pos_global);
if (in_agent_parcel)
{
// In same parcel as the agent
- return TRUE;
+ return true;
}
else
{
if (LLViewerParcelMgr::getInstance()->getAgentParcel()->getSoundLocal())
{
// Not in same parcel, and agent parcel only has local sound
- return FALSE;
+ return false;
}
else if (LLViewerParcelMgr::getInstance()->isSoundLocal(pos_global))
{
// Not in same parcel, and target parcel only has local sound
- return FALSE;
+ return false;
}
else
{
// Not in same parcel, but neither are local sound
- return TRUE;
+ return true;
}
}
}
-BOOL LLViewerParcelMgr::inAgentParcel(const LLVector3d &pos_global) const
+bool LLViewerParcelMgr::inAgentParcel(const LLVector3d &pos_global) const
{
LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal(pos_global);
LLViewerRegion* agent_region = gAgent.getRegion();
if (!region || !agent_region)
- return FALSE;
+ return false;
if (region != agent_region)
{
// Can't be in the agent parcel if you're not in the same region.
- return FALSE;
+ return false;
}
LLVector3 pos_region = agent_region->getPosRegionFromGlobal(pos_global);
@@ -842,11 +842,11 @@ BOOL LLViewerParcelMgr::inAgentParcel(const LLVector3d &pos_global) const
if (mAgentParcelOverlay[row*mParcelsPerEdge + column])
{
- return TRUE;
+ return true;
}
else
{
- return FALSE;
+ return false;
}
}
@@ -912,7 +912,7 @@ void LLViewerParcelMgr::renderParcelCollision()
LLViewerRegion* regionp = gAgent.getRegion();
if (regionp)
{
- BOOL use_pass = mCollisionParcel->getParcelFlag(PF_USE_PASS_LIST);
+ bool use_pass = mCollisionParcel->getParcelFlag(PF_USE_PASS_LIST);
renderCollisionSegments(mCollisionSegments, use_pass, regionp);
}
}
@@ -1117,9 +1117,9 @@ public:
LLUUID mAgent;
LLUUID mSession;
LLUUID mGroup;
- BOOL mIsGroupOwned;
- BOOL mRemoveContribution;
- BOOL mIsClaim;
+ bool mIsGroupOwned;
+ bool mRemoveContribution;
+ bool mIsClaim;
LLHost mHost;
// for parcel buys
@@ -1138,9 +1138,9 @@ LLViewerParcelMgr::ParcelBuyInfo* LLViewerParcelMgr::setupParcelBuy(
const LLUUID& agent_id,
const LLUUID& session_id,
const LLUUID& group_id,
- BOOL is_group_owned,
- BOOL is_claim,
- BOOL remove_contribution)
+ bool is_group_owned,
+ bool is_claim,
+ bool remove_contribution)
{
if (!mSelected || !mCurrentParcel)
{
@@ -1222,7 +1222,7 @@ void LLViewerParcelMgr::sendParcelBuy(ParcelBuyInfo* info)
msg->addBOOL("RemoveContribution", info->mRemoveContribution);
msg->addS32("LocalID", info->mParcelID);
}
- msg->addBOOL("Final", TRUE); // don't allow escrow buys
+ msg->addBOOL("Final", true); // don't allow escrow buys
if (info->mIsClaim)
{
msg->nextBlock("ParcelData");
@@ -1478,7 +1478,7 @@ void LLViewerParcelMgr::setHoverParcel(const LLVector3d& pos)
msg->addF32Fast(_PREHASH_South, south);
msg->addF32Fast(_PREHASH_East, east);
msg->addF32Fast(_PREHASH_North, north);
- msg->addBOOL("SnapSelection", FALSE);
+ msg->addBOOL("SnapSelection", false);
msg->sendReliable(region->getHost());
mHoverRequestResult = PARCEL_RESULT_NO_DATA;
@@ -1528,13 +1528,13 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
{
S32 request_result;
S32 sequence_id;
- BOOL snap_selection = FALSE;
+ bool snap_selection = false;
S32 self_count = 0;
S32 other_count = 0;
S32 public_count = 0;
S32 local_id;
LLUUID owner_id;
- BOOL is_group_owned;
+ bool is_group_owned;
U32 auction_id = 0;
S32 claim_price_per_meter = 0;
S32 rent_price_per_meter = 0;
@@ -1553,15 +1553,15 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
S32 other_prims = 0;
S32 selected_prims = 0;
F32 parcel_prim_bonus = 1.f;
- BOOL region_push_override = false;
- BOOL region_deny_anonymous_override = false;
- BOOL region_deny_identified_override = false; // Deprecated
- BOOL region_deny_transacted_override = false; // Deprecated
- BOOL region_deny_age_unverified_override = false;
- BOOL region_allow_access_override = true;
- BOOL region_allow_environment_override = true;
+ bool region_push_override = false;
+ bool region_deny_anonymous_override = false;
+ bool region_deny_identified_override = false; // Deprecated
+ bool region_deny_transacted_override = false; // Deprecated
+ bool region_deny_age_unverified_override = false;
+ bool region_allow_access_override = true;
+ bool region_allow_environment_override = true;
S32 parcel_environment_version = 0;
- BOOL agent_parcel_update = false; // updating previous(existing) agent parcel
+ bool agent_parcel_update = false; // updating previous(existing) agent parcel
U32 extended_flags = 0; //obscure MOAP
S32 other_clean_time = 0;
@@ -1688,7 +1688,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
bool environment_changed = (cur_parcel_environment_version != parcel_environment_version);
parcel->init(owner_id,
- FALSE, FALSE, FALSE,
+ false, false, false,
claim_date, claim_price_per_meter, rent_price_per_meter,
area, other_prims, parcel_prim_bonus, is_group_owned);
parcel->setLocalID(local_id);
@@ -1736,7 +1736,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
if (instance->mTeleportInProgress)
{
- instance->mTeleportInProgress = FALSE;
+ instance->mTeleportInProgress = false;
if(instance->mTeleportInProgressPosition.isNull())
{
//initial update
@@ -1752,7 +1752,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
// Notify anything that wants to know when the agent changes parcels
gAgent.changeParcels();
- instance->mTeleportInProgress = FALSE;
+ instance->mTeleportInProgress = false;
}
else if (agent_parcel_update)
{
@@ -1795,7 +1795,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
west_south.mV[VY],
east_north.mV[VX],
east_north.mV[VY] );
- parcel_mgr.mCurrentParcelSelection->mWholeParcelSelected = FALSE;
+ parcel_mgr.mCurrentParcelSelection->mWholeParcelSelected = false;
}
else if (0 == local_id)
{
@@ -1809,7 +1809,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
aabb_min.mV[VY],
aabb_max.mV[VX],
aabb_max.mV[VY] );
- parcel_mgr.mCurrentParcelSelection->mWholeParcelSelected = TRUE;
+ parcel_mgr.mCurrentParcelSelection->mWholeParcelSelected = true;
}
else
{
@@ -1829,7 +1829,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
delete[] bitmap;
bitmap = NULL;
- parcel_mgr.mCurrentParcelSelection->mWholeParcelSelected = TRUE;
+ parcel_mgr.mCurrentParcelSelection->mWholeParcelSelected = true;
}
// Request access list information for this land
@@ -1842,7 +1842,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
parcel_mgr.sendParcelDwellRequest();
}
- parcel_mgr.mSelected = TRUE;
+ parcel_mgr.mSelected = true;
parcel_mgr.notifyObservers();
}
}
@@ -2146,8 +2146,8 @@ void LLViewerParcelMgr::sendParcelAccessListUpdate(U32 flags, const LLAccessEntr
S32 count = entries.size();
S32 num_sections = (S32) ceil(count/PARCEL_MAX_ENTRIES_PER_PACKET);
S32 sequence_id = 1;
- BOOL start_message = TRUE;
- BOOL initial = TRUE;
+ bool start_message = true;
+ bool initial = true;
LLUUID transactionUUID;
transactionUUID.generate();
@@ -2171,7 +2171,7 @@ void LLViewerParcelMgr::sendParcelAccessListUpdate(U32 flags, const LLAccessEntr
msg->addUUIDFast(_PREHASH_TransactionID, transactionUUID);
msg->addS32Fast(_PREHASH_SequenceID, sequence_id);
msg->addS32Fast(_PREHASH_Sections, num_sections);
- start_message = FALSE;
+ start_message = false;
if (initial && (cit == end))
{
@@ -2182,7 +2182,7 @@ void LLViewerParcelMgr::sendParcelAccessListUpdate(U32 flags, const LLAccessEntr
msg->addU32Fast(_PREHASH_Flags, 0 );
}
- initial = FALSE;
+ initial = false;
sequence_id++;
}
@@ -2198,7 +2198,7 @@ void LLViewerParcelMgr::sendParcelAccessListUpdate(U32 flags, const LLAccessEntr
++cit;
}
- start_message = TRUE;
+ start_message = true;
msg->sendReliable( region->getHost() );
}
}
@@ -2344,7 +2344,7 @@ bool LLViewerParcelMgr::canAgentBuyParcel(LLParcel* parcel, bool forGroup) const
&& ((parcel->getSalePrice() > 0) || (authorizeBuyer.notNull()));
bool isEmpowered
- = forGroup ? gAgent.hasPowerInActiveGroup(GP_LAND_DEED) == TRUE : true;
+ = forGroup ? gAgent.hasPowerInActiveGroup(GP_LAND_DEED) == true : true;
bool isOwner
= parcelOwner == (forGroup ? gAgent.getGroupID() : gAgent.getID());
@@ -2359,9 +2359,9 @@ bool LLViewerParcelMgr::canAgentBuyParcel(LLParcel* parcel, bool forGroup) const
}
-void LLViewerParcelMgr::startBuyLand(BOOL is_for_group)
+void LLViewerParcelMgr::startBuyLand(bool is_for_group)
{
- LLFloaterBuyLand::buyLand(getSelectionRegion(), mCurrentParcelSelection, is_for_group == TRUE);
+ LLFloaterBuyLand::buyLand(getSelectionRegion(), mCurrentParcelSelection, is_for_group == true);
}
void LLViewerParcelMgr::startSellLand()
@@ -2583,39 +2583,39 @@ void LLViewerParcelMgr::buyPass()
}
//Tells whether we are allowed to buy a pass or not
-BOOL LLViewerParcelMgr::isCollisionBanned()
+bool LLViewerParcelMgr::isCollisionBanned()
{
if ((mCollisionBanned == BA_ALLOWED) || (mCollisionBanned == BA_NOT_ON_LIST) || (mCollisionBanned == BA_NOT_IN_GROUP))
- return FALSE;
+ return false;
else
- return TRUE;
+ return true;
}
// This implementation should mirror LLSimParcelMgr::isParcelOwnedBy
// static
-BOOL LLViewerParcelMgr::isParcelOwnedByAgent(const LLParcel* parcelp, U64 group_proxy_power)
+bool LLViewerParcelMgr::isParcelOwnedByAgent(const LLParcel* parcelp, U64 group_proxy_power)
{
if (!parcelp)
{
- return FALSE;
+ return false;
}
// Gods can always assume ownership.
if (gAgent.isGodlike())
{
- return TRUE;
+ return true;
}
// The owner of a parcel automatically gets all powersr.
if (parcelp->getOwnerID() == gAgent.getID())
{
- return TRUE;
+ return true;
}
// Only gods can assume 'ownership' of public land.
if (parcelp->isPublic())
{
- return FALSE;
+ return false;
}
// Return whether or not the agent has group_proxy_power powers in the
@@ -2625,10 +2625,10 @@ BOOL LLViewerParcelMgr::isParcelOwnedByAgent(const LLParcel* parcelp, U64 group_
// This implementation should mirror llSimParcelMgr::isParcelModifiableBy
// static
-BOOL LLViewerParcelMgr::isParcelModifiableByAgent(const LLParcel* parcelp, U64 group_proxy_power)
+bool LLViewerParcelMgr::isParcelModifiableByAgent(const LLParcel* parcelp, U64 group_proxy_power)
{
// If the agent can assume ownership, it is probably modifiable.
- BOOL rv = FALSE;
+ bool rv = false;
if (parcelp)
{
// *NOTE: This should only work for leased parcels, but group owned
@@ -2640,7 +2640,7 @@ BOOL LLViewerParcelMgr::isParcelModifiableByAgent(const LLParcel* parcelp, U64 g
&& !gAgent.isGodlike()
&& (parcelp->getOwnershipStatus() != LLParcel::OS_LEASED) )
{
- rv = FALSE;
+ rv = false;
}
}
return rv;
@@ -2712,7 +2712,7 @@ void LLViewerParcelMgr::onTeleportFinished(bool local, const LLVector3d& new_pos
// The agent parcel data has not been updated yet.
// Let's wait for the update and then emit the signal.
mTeleportInProgressPosition = new_pos;
- mTeleportInProgress = TRUE;
+ mTeleportInProgress = true;
}
}
diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h
index 56dacd3efd..efcd272716 100644
--- a/indra/newview/llviewerparcelmgr.h
+++ b/indra/newview/llviewerparcelmgr.h
@@ -86,14 +86,14 @@ public:
static void cleanupGlobals();
- BOOL selectionEmpty() const;
+ bool selectionEmpty() const;
F32 getSelectionWidth() const { return F32(mEastNorth.mdV[VX] - mWestSouth.mdV[VX]); }
F32 getSelectionHeight() const { return F32(mEastNorth.mdV[VY] - mWestSouth.mdV[VY]); }
- BOOL getSelection(LLVector3d &min, LLVector3d &max) { min = mWestSouth; max = mEastNorth; return !selectionEmpty();}
+ bool getSelection(LLVector3d &min, LLVector3d &max) { min = mWestSouth; max = mEastNorth; return !selectionEmpty();}
LLViewerRegion* getSelectionRegion();
F32 getDwelling() const { return mSelectedDwell;}
- void getDisplayInfo(S32* area, S32* claim, S32* rent, BOOL* for_sale, F32* dwell);
+ void getDisplayInfo(S32* area, S32* claim, S32* rent, bool* for_sale, F32* dwell);
// Returns selected area
S32 getSelectedArea() const;
@@ -121,7 +121,7 @@ public:
// Select a piece of land
LLParcelSelectionHandle selectLand(const LLVector3d &corner1, const LLVector3d &corner2,
- BOOL snap_to_parcel);
+ bool snap_to_parcel);
// Clear the selection, and stop drawing the highlight.
void deselectLand();
@@ -131,14 +131,14 @@ public:
void removeObserver(LLParcelObserver* observer);
void notifyObservers();
- void setSelectionVisible(BOOL visible) { mRenderSelection = visible; }
+ void setSelectionVisible(bool visible) { mRenderSelection = visible; }
- BOOL isOwnedAt(const LLVector3d& pos_global) const;
- BOOL isOwnedSelfAt(const LLVector3d& pos_global) const;
- BOOL isOwnedOtherAt(const LLVector3d& pos_global) const;
- BOOL isSoundLocal(const LLVector3d &pos_global) const;
+ bool isOwnedAt(const LLVector3d& pos_global) const;
+ bool isOwnedSelfAt(const LLVector3d& pos_global) const;
+ bool isOwnedOtherAt(const LLVector3d& pos_global) const;
+ bool isSoundLocal(const LLVector3d &pos_global) const;
- BOOL canHearSound(const LLVector3d &pos_global) const;
+ bool canHearSound(const LLVector3d &pos_global) const;
// Returns a reference counted pointer to current parcel selection.
// Selection does not change to reflect new selections made by user
@@ -156,7 +156,7 @@ public:
LLParcel *getAgentParcel() const;
LLParcel *getAgentOrSelectedParcel() const;
- BOOL inAgentParcel(const LLVector3d &pos_global) const;
+ bool inAgentParcel(const LLVector3d &pos_global) const;
// Returns a pointer only when it has valid data.
LLParcel* getHoverParcel() const;
@@ -203,7 +203,7 @@ public:
const LLVector3d &east_north_top );
void renderOneSegment(F32 x1, F32 y1, F32 x2, F32 y2, F32 height, U8 direction, LLViewerRegion* regionp);
void renderHighlightSegments(const U8* segments, LLViewerRegion* regionp);
- void renderCollisionSegments(U8* segments, BOOL use_pass, LLViewerRegion* regionp);
+ void renderCollisionSegments(U8* segments, bool use_pass, LLViewerRegion* regionp);
static S32 PARCEL_BAN_LINES_HIDE;
static S32 PARCEL_BAN_LINES_ON_COLLISION;
@@ -237,8 +237,8 @@ public:
bool canAgentBuyParcel(LLParcel*, bool forGroup) const;
-// void startClaimLand(BOOL is_for_group = FALSE);
- void startBuyLand(BOOL is_for_group = FALSE);
+// void startClaimLand(bool is_for_group = false);
+ void startBuyLand(bool is_for_group = false);
void startSellLand();
void startReleaseLand();
void startDivideLand();
@@ -254,9 +254,9 @@ public:
ParcelBuyInfo* setupParcelBuy(const LLUUID& agent_id,
const LLUUID& session_id,
const LLUUID& group_id,
- BOOL is_group_owned,
- BOOL is_claim,
- BOOL remove_contribution);
+ bool is_group_owned,
+ bool is_claim,
+ bool remove_contribution);
// callers responsibility to call deleteParcelBuy() on return value
void sendParcelBuy(ParcelBuyInfo*);
void deleteParcelBuy(ParcelBuyInfo* *info);
@@ -287,7 +287,7 @@ public:
// Whether or not the collision border around the parcel is there because
// the agent is banned or not in the allowed group
- BOOL isCollisionBanned();
+ bool isCollisionBanned();
boost::signals2::connection setTeleportFinishedCallback(teleport_finished_callback_t cb);
boost::signals2::connection setTeleportFailedCallback(teleport_failed_callback_t cb);
@@ -295,8 +295,8 @@ public:
void onTeleportFailed();
bool getTeleportInProgress();
- static BOOL isParcelOwnedByAgent(const LLParcel* parcelp, U64 group_proxy_power);
- static BOOL isParcelModifiableByAgent(const LLParcel* parcelp, U64 group_proxy_power);
+ static bool isParcelOwnedByAgent(const LLParcel* parcelp, U64 group_proxy_power);
+ static bool isParcelModifiableByAgent(const LLParcel* parcelp, U64 group_proxy_power);
private:
static void sendParcelAccessListUpdate(U32 flags, const std::map<LLUUID, class LLAccessEntry>& entries, LLViewerRegion* region, S32 parcel_local_id);
@@ -319,12 +319,12 @@ private:
static bool callbackDivideLand(const LLSD& notification, const LLSD& response);
static bool callbackJoinLand(const LLSD& notification, const LLSD& response);
- //void finishClaim(BOOL user_to_user_sale, U32 join);
+ //void finishClaim(bool user_to_user_sale, U32 join);
LLViewerTexture* getBlockedImage() const;
LLViewerTexture* getPassImage() const;
private:
- BOOL mSelected;
+ bool mSelected;
LLParcel* mCurrentParcel; // selected parcel info
LLParcelSelectionHandle mCurrentParcelSelection;
@@ -344,7 +344,7 @@ private:
std::vector<LLParcelObserver*> mObservers;
- BOOL mTeleportInProgress;
+ bool mTeleportInProgress;
LLVector3d mTeleportInProgressPosition;
teleport_finished_signal_t mTeleportFinishedSignal;
teleport_failed_signal_t mTeleportFailedSignal;
@@ -367,7 +367,7 @@ private:
LLParcel* mCollisionParcel;
U8* mCollisionSegments;
bool mRenderCollision;
- BOOL mRenderSelection;
+ bool mRenderSelection;
S32 mCollisionBanned;
LLFrameTimer mCollisionTimer;
LLViewerTexture* mBlockedImage;
diff --git a/indra/newview/llviewerparceloverlay.cpp b/indra/newview/llviewerparceloverlay.cpp
index 785c84c38d..6d2fb61f8f 100755
--- a/indra/newview/llviewerparceloverlay.cpp
+++ b/indra/newview/llviewerparceloverlay.cpp
@@ -55,7 +55,7 @@ const U8 OVERLAY_IMG_COMPONENTS = 4;
LLViewerParcelOverlay::LLViewerParcelOverlay(LLViewerRegion* region, F32 region_width_meters)
: mRegion( region ),
mParcelGridsPerEdge( S32( region_width_meters / PARCEL_GRID_STEP_METERS ) ),
- mDirty( FALSE ),
+ mDirty( false ),
mTimeSinceLastUpdate(),
mOverlayTextureIdx(-1),
mVertexCount(0),
@@ -65,9 +65,9 @@ LLViewerParcelOverlay::LLViewerParcelOverlay(LLViewerRegion* region, F32 region_
{
// Create a texture to hold color information.
// 4 components
- // Use mipmaps = FALSE, clamped, NEAREST filter, for sharp edges
+ // Use mipmaps = false, clamped, NEAREST filter, for sharp edges
mImageRaw = new LLImageRaw(mParcelGridsPerEdge, mParcelGridsPerEdge, OVERLAY_IMG_COMPONENTS);
- mTexture = LLViewerTextureManager::getLocalTexture(mImageRaw.get(), FALSE);
+ mTexture = LLViewerTextureManager::getLocalTexture(mImageRaw.get(), false);
mTexture->setAddressMode(LLTexUnit::TAM_CLAMP);
mTexture->setFilteringOption(LLTexUnit::TFO_POINT);
@@ -116,28 +116,28 @@ LLViewerParcelOverlay::~LLViewerParcelOverlay()
//---------------------------------------------------------------------------
// ACCESSORS
//---------------------------------------------------------------------------
-BOOL LLViewerParcelOverlay::isOwned(const LLVector3& pos) const
+bool LLViewerParcelOverlay::isOwned(const LLVector3& pos) const
{
S32 row = S32(pos.mV[VY] / PARCEL_GRID_STEP_METERS);
S32 column = S32(pos.mV[VX] / PARCEL_GRID_STEP_METERS);
return (PARCEL_PUBLIC != ownership(row, column));
}
-BOOL LLViewerParcelOverlay::isOwnedSelf(const LLVector3& pos) const
+bool LLViewerParcelOverlay::isOwnedSelf(const LLVector3& pos) const
{
S32 row = S32(pos.mV[VY] / PARCEL_GRID_STEP_METERS);
S32 column = S32(pos.mV[VX] / PARCEL_GRID_STEP_METERS);
return (PARCEL_SELF == ownership(row, column));
}
-BOOL LLViewerParcelOverlay::isOwnedGroup(const LLVector3& pos) const
+bool LLViewerParcelOverlay::isOwnedGroup(const LLVector3& pos) const
{
S32 row = S32(pos.mV[VY] / PARCEL_GRID_STEP_METERS);
S32 column = S32(pos.mV[VX] / PARCEL_GRID_STEP_METERS);
return (PARCEL_GROUP == ownership(row, column));
}
-BOOL LLViewerParcelOverlay::isOwnedOther(const LLVector3& pos) const
+bool LLViewerParcelOverlay::isOwnedOther(const LLVector3& pos) const
{
S32 row = S32(pos.mV[VY] / PARCEL_GRID_STEP_METERS);
S32 column = S32(pos.mV[VX] / PARCEL_GRID_STEP_METERS);
@@ -260,7 +260,7 @@ bool LLViewerParcelOverlay::encroachesOnNearbyParcel(const std::vector<LLBBox>&
return false;
}
-BOOL LLViewerParcelOverlay::isSoundLocal(const LLVector3& pos) const
+bool LLViewerParcelOverlay::isSoundLocal(const LLVector3& pos) const
{
S32 row = S32(pos.mV[VY] / PARCEL_GRID_STEP_METERS);
S32 column = S32(pos.mV[VX] / PARCEL_GRID_STEP_METERS);
@@ -344,6 +344,8 @@ void LLViewerParcelOverlay::updateOverlayTexture()
const LLColor4U for_sale = LLUIColorTable::instance().getColor("PropertyColorForSale").get();
const LLColor4U auction = LLUIColorTable::instance().getColor("PropertyColorAuction").get();
+ LLImageDataLock lock(mImageRaw);
+
// Create the base texture.
U8 *raw = mImageRaw->getData();
const S32 COUNT = mParcelGridsPerEdge * mParcelGridsPerEdge;
@@ -464,7 +466,7 @@ void LLViewerParcelOverlay::updatePropertyLines()
new_coord_array.reserve(256);
U8 overlay = 0;
- BOOL add_edge = FALSE;
+ bool add_edge = false;
const F32 GRID_STEP = PARCEL_GRID_STEP_METERS;
const S32 GRIDS_PER_EDGE = mParcelGridsPerEdge;
@@ -518,7 +520,7 @@ void LLViewerParcelOverlay::updatePropertyLines()
}
else
{
- add_edge = TRUE;
+ add_edge = true;
}
if (add_edge)
@@ -589,7 +591,7 @@ void LLViewerParcelOverlay::updatePropertyLines()
}
else
{
- add_edge = TRUE;
+ add_edge = true;
}
if (add_edge)
@@ -674,7 +676,7 @@ void LLViewerParcelOverlay::updatePropertyLines()
}
// Everything's clean now
- mDirty = FALSE;
+ mDirty = false;
}
@@ -849,7 +851,7 @@ void LLViewerParcelOverlay::addPropertyLine(
void LLViewerParcelOverlay::setDirty()
{
- mDirty = TRUE;
+ mDirty = true;
}
void LLViewerParcelOverlay::updateGL()
diff --git a/indra/newview/llviewerparceloverlay.h b/indra/newview/llviewerparceloverlay.h
index c466cc3b6b..3d6f4b640d 100644
--- a/indra/newview/llviewerparceloverlay.h
+++ b/indra/newview/llviewerparceloverlay.h
@@ -50,10 +50,10 @@ public:
// ACCESS
LLViewerTexture* getTexture() const { return mTexture; }
- BOOL isOwned(const LLVector3& pos) const;
- BOOL isOwnedSelf(const LLVector3& pos) const;
- BOOL isOwnedGroup(const LLVector3& pos) const;
- BOOL isOwnedOther(const LLVector3& pos) const;
+ bool isOwned(const LLVector3& pos) const;
+ bool isOwnedSelf(const LLVector3& pos) const;
+ bool isOwnedGroup(const LLVector3& pos) const;
+ bool isOwnedOther(const LLVector3& pos) const;
// "encroaches" means the prim hangs over the parcel, but its center
// might be in another parcel. for now, we simply test axis aligned
@@ -62,9 +62,9 @@ public:
bool encroachesOnUnowned(const std::vector<LLBBox>& boxes) const;
bool encroachesOnNearbyParcel(const std::vector<LLBBox>& boxes) const;
- BOOL isSoundLocal(const LLVector3& pos) const;
+ bool isSoundLocal(const LLVector3& pos) const;
- BOOL isBuildCameraAllowed(const LLVector3& pos) const;
+ bool isBuildCameraAllowed(const LLVector3& pos) const;
F32 getOwnedRatio() const;
// Returns the number of vertices drawn
@@ -117,7 +117,7 @@ private:
U8 *mOwnership;
// Update propery lines and overlay texture
- BOOL mDirty;
+ bool mDirty;
LLFrameTimer mTimeSinceLastUpdate;
S32 mOverlayTextureIdx;
diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp
index 0f20076b04..386a44b0d9 100644
--- a/indra/newview/llviewerpartsim.cpp
+++ b/indra/newview/llviewerpartsim.cpp
@@ -137,7 +137,7 @@ LLViewerPartGroup::LLViewerPartGroup(const LLVector3 &center_agent, const F32 bo
: mHud(hud)
{
mVOPartGroupp = NULL;
- mUniformParticles = TRUE;
+ mUniformParticles = true;
mRegionp = LLWorld::getInstance()->getRegionFromPosAgent(center_agent);
llassert_always(center_agent.isFinite());
@@ -220,48 +220,48 @@ void LLViewerPartGroup::cleanup()
}
}
-BOOL LLViewerPartGroup::posInGroup(const LLVector3 &pos, const F32 desired_size)
+bool LLViewerPartGroup::posInGroup(const LLVector3 &pos, const F32 desired_size)
{
if ((pos.mV[VX] < mMinObjPos.mV[VX])
|| (pos.mV[VY] < mMinObjPos.mV[VY])
|| (pos.mV[VZ] < mMinObjPos.mV[VZ]))
{
- return FALSE;
+ return false;
}
if ((pos.mV[VX] > mMaxObjPos.mV[VX])
|| (pos.mV[VY] > mMaxObjPos.mV[VY])
|| (pos.mV[VZ] > mMaxObjPos.mV[VZ]))
{
- return FALSE;
+ return false;
}
if (desired_size > 0 &&
(desired_size < mBoxRadius*0.5f ||
desired_size > mBoxRadius*2.f))
{
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
-BOOL LLViewerPartGroup::addPart(LLViewerPart* part, F32 desired_size)
+bool LLViewerPartGroup::addPart(LLViewerPart* part, F32 desired_size)
{
if (part->mFlags & LLPartData::LL_PART_HUD && !mHud)
{
- return FALSE;
+ return false;
}
- BOOL uniform_part = part->mScale.mV[0] == part->mScale.mV[1] &&
+ bool uniform_part = part->mScale.mV[0] == part->mScale.mV[1] &&
!(part->mFlags & LLPartData::LL_PART_FOLLOW_VELOCITY_MASK);
if (!posInGroup(part->mPosAgent, desired_size) ||
(mUniformParticles && !uniform_part) ||
(!mUniformParticles && uniform_part))
{
- return FALSE;
+ return false;
}
gPipeline.markRebuild(mVOPartGroupp->mDrawable, LLDrawable::REBUILD_ALL);
@@ -269,7 +269,7 @@ BOOL LLViewerPartGroup::addPart(LLViewerPart* part, F32 desired_size)
mParticles.push_back(part);
part->mSkipOffset=mSkippedTime;
LLViewerPartSim::incPartCount(1);
- return TRUE;
+ return true;
}
@@ -525,11 +525,11 @@ void LLViewerPartSim::destroyClass()
}
//static
-BOOL LLViewerPartSim::shouldAddPart()
+bool LLViewerPartSim::shouldAddPart()
{
if (sParticleCount >= MAX_PART_COUNT)
{
- return FALSE;
+ return false;
}
if (sParticleCount > PART_THROTTLE_THRESHOLD*sMaxParticleCount)
@@ -540,7 +540,7 @@ BOOL LLViewerPartSim::shouldAddPart()
if (ll_frand() < frac)
{
// Skip...
- return FALSE;
+ return false;
}
}
@@ -548,10 +548,10 @@ BOOL LLViewerPartSim::shouldAddPart()
const F32 MIN_FRAME_RATE_FOR_NEW_PARTICLES = 4.f;
if (gFPSClamped < MIN_FRAME_RATE_FOR_NEW_PARTICLES)
{
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
void LLViewerPartSim::addPart(LLViewerPart* part)
@@ -701,30 +701,30 @@ void LLViewerPartSim::updateSimulation()
if (!mViewerPartSources[i]->isDead())
{
- BOOL upd = TRUE;
+ bool upd = true;
LLViewerObject* vobj = mViewerPartSources[i]->mSourceObjectp;
if (vobj && vobj->isAvatar() && ((LLVOAvatar*)vobj)->isInMuteList())
{
- upd = FALSE;
+ upd = false;
}
if(vobj && vobj->isOwnerInMuteList(mViewerPartSources[i]->getOwnerUUID()))
{
- upd = FALSE;
+ upd = false;
}
if (upd && vobj && (vobj->getPCode() == LL_PCODE_VOLUME))
{
if(vobj->getAvatar() && vobj->getAvatar()->isTooComplex() && vobj->getAvatar()->isTooSlow())
{
- upd = FALSE;
+ upd = false;
}
LLVOVolume* vvo = (LLVOVolume *)vobj;
if (!LLPipeline::sRenderAttachedParticles && vvo && vvo->isAttachment())
{
- upd = FALSE;
+ upd = false;
}
}
diff --git a/indra/newview/llviewerpartsim.h b/indra/newview/llviewerpartsim.h
index ab1cd715ab..ffc3544c08 100644
--- a/indra/newview/llviewerpartsim.h
+++ b/indra/newview/llviewerpartsim.h
@@ -95,11 +95,11 @@ public:
void cleanup();
- BOOL addPart(LLViewerPart* part, const F32 desired_size = -1.f);
+ bool addPart(LLViewerPart* part, const F32 desired_size = -1.f);
void updateParticles(const F32 lastdt);
- BOOL posInGroup(const LLVector3 &pos, const F32 desired_size = -1.f);
+ bool posInGroup(const LLVector3 &pos, const F32 desired_size = -1.f);
void shift(const LLVector3 &offset);
@@ -117,7 +117,7 @@ public:
LLPointer<LLVOPartGroup> mVOPartGroupp;
- BOOL mUniformParticles;
+ bool mUniformParticles;
U32 mID;
F32 mSkippedTime;
@@ -152,7 +152,7 @@ public:
void cleanupRegion(LLViewerRegion *regionp);
- static BOOL shouldAddPart(); // Just decides whether this particle should be added or not (for particle count capping)
+ static bool shouldAddPart(); // Just decides whether this particle should be added or not (for particle count capping)
F32 maxRate() // Return maximum particle generation rate
{
if (sParticleCount >= MAX_PART_COUNT)
@@ -177,7 +177,7 @@ public:
friend class LLViewerPartGroup;
- BOOL aboveParticleLimit() const { return sParticleCount > sMaxParticleCount; }
+ bool aboveParticleLimit() const { return sParticleCount > sMaxParticleCount; }
static void setMaxPartCount(const S32 max_parts) { sMaxParticleCount = max_parts; }
static S32 getMaxPartCount() { return sMaxParticleCount; }
diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp
index 1751ee1ebb..aa62df176f 100644
--- a/indra/newview/llviewerpartsource.cpp
+++ b/indra/newview/llviewerpartsource.cpp
@@ -66,8 +66,8 @@ LLViewerPartSource::LLViewerPartSource(const U32 type) :
{
mLastUpdateTime = 0.f;
mLastPartTime = 0.f;
- mIsDead = FALSE;
- mIsSuspended = FALSE;
+ mIsDead = false;
+ mIsSuspended = false;
static U32 id_seed = 0;
mID = ++id_seed;
@@ -78,7 +78,7 @@ LLViewerPartSource::LLViewerPartSource(const U32 type) :
void LLViewerPartSource::setDead()
{
- mIsDead = TRUE;
+ mIsDead = true;
}
@@ -122,7 +122,7 @@ LLViewerPartSourceScript::LLViewerPartSourceScript(LLViewerObject *source_objp)
void LLViewerPartSourceScript::setDead()
{
- mIsDead = TRUE;
+ mIsDead = true;
mSourceObjectp = NULL;
mTargetObjectp = NULL;
}
@@ -207,17 +207,17 @@ void LLViewerPartSourceScript::update(const F32 dt)
}
}
- BOOL first_run = FALSE;
+ bool first_run = false;
if (old_update_time <= 0.f)
{
- first_run = TRUE;
+ first_run = true;
}
F32 max_time = llmax(1.f, 10.f*mPartSysData.mBurstRate);
dt_update = llmin(max_time, dt_update);
while ((dt_update > mPartSysData.mBurstRate) || first_run)
{
- first_run = FALSE;
+ first_run = false;
// Update the rotation of the particle source by the angular velocity
// First check to see if there is still an angular velocity.
@@ -586,7 +586,7 @@ LLViewerPartSourceSpiral::LLViewerPartSourceSpiral(const LLVector3 &pos) :
void LLViewerPartSourceSpiral::setDead()
{
- mIsDead = TRUE;
+ mIsDead = true;
mSourceObjectp = NULL;
}
@@ -690,7 +690,7 @@ LLViewerPartSourceBeam::~LLViewerPartSourceBeam()
void LLViewerPartSourceBeam::setDead()
{
- mIsDead = TRUE;
+ mIsDead = true;
mSourceObjectp = NULL;
mTargetObjectp = NULL;
}
@@ -843,7 +843,7 @@ LLViewerPartSourceChat::LLViewerPartSourceChat(const LLVector3 &pos) :
void LLViewerPartSourceChat::setDead()
{
- mIsDead = TRUE;
+ mIsDead = true;
mSourceObjectp = NULL;
}
diff --git a/indra/newview/llviewerpartsource.h b/indra/newview/llviewerpartsource.h
index 504229e81f..37c1d451ee 100644
--- a/indra/newview/llviewerpartsource.h
+++ b/indra/newview/llviewerpartsource.h
@@ -58,12 +58,12 @@ public:
LLViewerPartSource(const U32 type);
- virtual void update(const F32 dt); // Return FALSE if this source is dead...
+ virtual void update(const F32 dt); // Return false if this source is dead...
virtual void setDead();
- BOOL isDead() const { return mIsDead; }
- void setSuspended( BOOL state ) { mIsSuspended = state; }
- BOOL isSuspended() const { return mIsSuspended; }
+ bool isDead() const { return mIsDead; }
+ void setSuspended( bool state ) { mIsSuspended = state; }
+ bool isSuspended() const { return mIsSuspended; }
U32 getType() const { return mType; }
static void updatePart(LLViewerPart &part, const F32 dt);
void setOwnerUUID(const LLUUID& owner_id) { mOwnerUUID = owner_id; }
@@ -81,8 +81,8 @@ public:
protected:
U32 mType;
- BOOL mIsDead;
- BOOL mIsSuspended;
+ bool mIsDead;
+ bool mIsSuspended;
F32 mLastUpdateTime;
F32 mLastPartTime;
LLUUID mOwnerUUID;
@@ -112,7 +112,7 @@ public:
/*virtual*/ void setDead();
- BOOL updateFromMesg();
+ bool updateFromMesg();
// Returns a new particle source to attach to an object...
static LLPointer<LLViewerPartSourceScript> unpackPSS(LLViewerObject *source_objp, LLPointer<LLViewerPartSourceScript> pssp, const S32 block_num);
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index eba7189a82..8b5ffcb5e9 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -100,14 +100,11 @@
const S32 MAX_CAP_REQUEST_ATTEMPTS = 30;
const U32 DEFAULT_MAX_REGION_WIDE_PRIM_COUNT = 15000;
-BOOL LLViewerRegion::sVOCacheCullingEnabled = FALSE;
+bool LLViewerRegion::sVOCacheCullingEnabled = false;
S32 LLViewerRegion::sLastCameraUpdated = 0;
S32 LLViewerRegion::sNewObjectCreationThrottle = -1;
LLViewerRegion::vocache_entry_map_t LLViewerRegion::sRegionCacheCleanup;
-const std::string LLViewerRegion::IL_MODE_DEFAULT = "default";
-const std::string LLViewerRegion::IL_MODE_360 = "360";
-
typedef std::map<std::string, std::string> CapabilityMap;
static void log_capabilities(const CapabilityMap &capmap);
@@ -626,7 +623,7 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
mTimeDilation(1.0f),
mName(""),
mZoning(""),
- mIsEstateManager(FALSE),
+ mIsEstateManager(false),
mRegionFlags( REGION_FLAGS_DEFAULT ),
mRegionProtocols( 0 ),
mSimAccess( SIM_ACCESS_MIN ),
@@ -639,17 +636,17 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
mProductSKU("unknown"),
mProductName("unknown"),
mViewerAssetUrl(""),
- mCacheLoaded(FALSE),
- mCacheDirty(FALSE),
- mReleaseNotesRequested(FALSE),
+ mCacheLoaded(false),
+ mCacheDirty(false),
+ mReleaseNotesRequested(false),
mCapabilitiesState(CAPABILITIES_STATE_INIT),
mSimulatorFeaturesReceived(false),
mBitsReceived(0.f),
mPacketsReceived(0.f),
- mDead(FALSE),
+ mDead(false),
mLastVisitedEntry(NULL),
mInvisibilityCheckHistory(-1),
- mPaused(FALSE),
+ mPaused(false),
mRegionCacheHitCount(0),
mRegionCacheMissCount(0),
mInterestListMode(IL_MODE_DEFAULT)
@@ -725,7 +722,7 @@ static LLTrace::BlockTimerStatHandle FTM_SAVE_REGION_CACHE("Save Region Cache");
LLViewerRegion::~LLViewerRegion()
{
LL_PROFILE_ZONE_SCOPED;
- mDead = TRUE;
+ mDead = true;
mImpl->mActiveSet.clear();
mImpl->mVisibleEntries.clear();
mImpl->mVisibleGroups.clear();
@@ -789,17 +786,18 @@ void LLViewerRegion::loadObjectCache()
}
// Presume success. If it fails, we don't want to try again.
- mCacheLoaded = TRUE;
+ mCacheLoaded = true;
if(LLVOCache::instanceExists())
{
LLVOCache & vocache = LLVOCache::instance();
- vocache.readFromCache(mHandle, mImpl->mCacheID, mImpl->mCacheMap);
- vocache.readGenericExtrasFromCache(mHandle, mImpl->mCacheID, mImpl->mGLTFOverridesLLSD);
+ // Without this a "corrupted" vocache persists until a cache clear or other rewrite. Mark as dirty hereif read fails to force a rewrite.
+ mCacheDirty = !vocache.readFromCache(mHandle, mImpl->mCacheID, mImpl->mCacheMap);
+ vocache.readGenericExtrasFromCache(mHandle, mImpl->mCacheID, mImpl->mGLTFOverridesLLSD, mImpl->mCacheMap);
if (mImpl->mCacheMap.empty())
{
- mCacheDirty = TRUE;
+ mCacheDirty = true;
}
}
}
@@ -826,7 +824,7 @@ void LLViewerRegion::saveObjectCache()
instance.writeToCache(mHandle, mImpl->mCacheID, mImpl->mCacheMap, mCacheDirty, removal_enabled);
instance.writeGenericExtrasToCache(mHandle, mImpl->mCacheID, mImpl->mGLTFOverridesLLSD, mCacheDirty, removal_enabled);
- mCacheDirty = FALSE;
+ mCacheDirty = false;
}
if (LLAppViewer::instance()->isQuitting())
@@ -862,7 +860,7 @@ F32 LLViewerRegion::getWaterHeight() const
return mImpl->mLandp->getWaterHeight();
}
-BOOL LLViewerRegion::isVoiceEnabled() const
+bool LLViewerRegion::isVoiceEnabled() const
{
return getRegionFlag(REGION_FLAGS_ALLOW_VOICE);
}
@@ -941,7 +939,7 @@ void LLViewerRegion::setRegionNameAndZone (const std::string& name_zone)
LLStringUtil::stripNonprintable(mZoning);
}
-BOOL LLViewerRegion::canManageEstate() const
+bool LLViewerRegion::canManageEstate() const
{
return gAgent.isGodlike()
|| isEstateManager()
@@ -1112,6 +1110,11 @@ void LLViewerRegion::dirtyHeights()
}
}
+void LLViewerRegion::dirtyAllPatches()
+{
+ getLand().dirtyAllPatches();
+}
+
//physically delete the cache entry
void LLViewerRegion::killCacheEntry(LLVOCacheEntry* entry, bool for_rendering)
{
@@ -1162,13 +1165,13 @@ void LLViewerRegion::killCacheEntry(LLVOCacheEntry* entry, bool for_rendering)
child = entry->getChild();
}
}
-
+ // Kill the assocaited overrides
+ mImpl->mGLTFOverridesLLSD.erase(entry->getLocalID());
//will remove it from the object cache, real deletion
entry->setState(LLVOCacheEntry::INACTIVE);
entry->removeOctreeEntry();
- entry->setValid(FALSE);
+ entry->setValid(false);
- // TODO kill extras/material overrides cache too
}
//physically delete the cache entry
@@ -1495,12 +1498,12 @@ void LLViewerRegion::createVisibleObjects(F32 max_time)
}
if(mImpl->mWaitingList.empty())
{
- mImpl->mVOCachePartition->setCullHistory(FALSE);
+ mImpl->mVOCachePartition->setCullHistory(false);
return;
}
S32 throttle = sNewObjectCreationThrottle;
- BOOL has_new_obj = FALSE;
+ bool has_new_obj = false;
LLTimer update_timer;
for(LLVOCacheEntry::vocache_entry_priority_list_t::iterator iter = mImpl->mWaitingList.begin();
iter != mImpl->mWaitingList.end(); ++iter)
@@ -1510,7 +1513,7 @@ void LLViewerRegion::createVisibleObjects(F32 max_time)
if(vo_entry->getState() < LLVOCacheEntry::WAITING)
{
addNewObject(vo_entry);
- has_new_obj = TRUE;
+ has_new_obj = true;
if(throttle > 0 && !(--throttle) && update_timer.getElapsedTimeF32() > max_time)
{
break;
@@ -1530,7 +1533,7 @@ void LLViewerRegion::clearCachedVisibleObjects()
//reset all occluders
mImpl->mVOCachePartition->resetOccluders();
- mPaused = TRUE;
+ mPaused = true;
//clean visible entries
for(LLVOCacheEntry::vocache_entry_set_t::iterator iter = mImpl->mVisibleEntries.begin(); iter != mImpl->mVisibleEntries.end();)
@@ -1612,7 +1615,19 @@ void LLViewerRegion::idleUpdate(F32 max_update_time)
mLastUpdate = LLViewerOctreeEntryData::getCurrentFrame();
- mImpl->mLandp->idleUpdate(max_update_time);
+ static LLCachedControl<bool> pbr_terrain_enabled(gSavedSettings, "RenderTerrainPBREnabled", false);
+ static LLCachedControl<bool> pbr_terrain_experimental_normals(gSavedSettings, "RenderTerrainPBRNormalsEnabled", false);
+ bool pbr_material = mImpl->mCompositionp && (mImpl->mCompositionp->getMaterialType() == LLTerrainMaterials::Type::PBR);
+ bool pbr_land = pbr_material && pbr_terrain_enabled && pbr_terrain_experimental_normals;
+
+ if (!pbr_land)
+ {
+ mImpl->mLandp->idleUpdate</*PBR=*/false>(max_update_time);
+ }
+ else
+ {
+ mImpl->mLandp->idleUpdate</*PBR=*/true>(max_update_time);
+ }
if (mParcelOverlay)
{
@@ -1630,7 +1645,7 @@ void LLViewerRegion::idleUpdate(F32 max_update_time)
}
if(mPaused)
{
- mPaused = FALSE; //unpause.
+ mPaused = false; //unpause.
}
LLViewerCamera::eCameraID old_camera_id = LLViewerCamera::sCurCameraID;
@@ -1703,7 +1718,7 @@ void LLViewerRegion::calcNewObjectCreationThrottle()
LLVOCacheEntry::updateDebugSettings();
}
-BOOL LLViewerRegion::isViewerCameraStatic()
+bool LLViewerRegion::isViewerCameraStatic()
{
return sLastCameraUpdated < LLViewerOctreeEntryData::getCurrentFrame();
}
@@ -1913,7 +1928,21 @@ LLViewerObject* LLViewerRegion::updateCacheEntry(U32 local_id, LLViewerObject* o
// As above, but forcibly do the update.
void LLViewerRegion::forceUpdate()
{
- mImpl->mLandp->idleUpdate(0.f);
+ constexpr F32 max_update_time = 0.f;
+
+ static LLCachedControl<bool> pbr_terrain_enabled(gSavedSettings, "RenderTerrainPBREnabled", false);
+ static LLCachedControl<bool> pbr_terrain_experimental_normals(gSavedSettings, "RenderTerrainPBRNormalsEnabled", false);
+ bool pbr_material = mImpl->mCompositionp && (mImpl->mCompositionp->getMaterialType() == LLTerrainMaterials::Type::PBR);
+ bool pbr_land = pbr_material && pbr_terrain_enabled && pbr_terrain_experimental_normals;
+
+ if (!pbr_land)
+ {
+ mImpl->mLandp->idleUpdate</*PBR=*/false>(max_update_time);
+ }
+ else
+ {
+ mImpl->mLandp->idleUpdate</*PBR=*/true>(max_update_time);
+ }
if (mParcelOverlay)
{
@@ -2110,27 +2139,27 @@ S32 LLViewerRegion::getHttpResponderID() const
return mImpl->mHttpResponderID;
}
-BOOL LLViewerRegion::pointInRegionGlobal(const LLVector3d &point_global) const
+bool LLViewerRegion::pointInRegionGlobal(const LLVector3d &point_global) const
{
LLVector3 pos_region = getPosRegionFromGlobal(point_global);
if (pos_region.mV[VX] < 0)
{
- return FALSE;
+ return false;
}
if (pos_region.mV[VX] >= mWidth)
{
- return FALSE;
+ return false;
}
if (pos_region.mV[VY] < 0)
{
- return FALSE;
+ return false;
}
if (pos_region.mV[VY] >= mWidth)
{
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
LLVector3 LLViewerRegion::getPosRegionFromGlobal(const LLVector3d &point_global) const
@@ -2169,24 +2198,24 @@ bool LLViewerRegion::isAlive()
return mAlive;
}
-BOOL LLViewerRegion::isOwnedSelf(const LLVector3& pos)
+bool LLViewerRegion::isOwnedSelf(const LLVector3& pos)
{
if (mParcelOverlay)
{
return mParcelOverlay->isOwnedSelf(pos);
} else {
- return FALSE;
+ return false;
}
}
// Owned by a group you belong to? (officer or member)
-BOOL LLViewerRegion::isOwnedGroup(const LLVector3& pos)
+bool LLViewerRegion::isOwnedGroup(const LLVector3& pos)
{
if (mParcelOverlay)
{
return mParcelOverlay->isOwnedGroup(pos);
} else {
- return FALSE;
+ return false;
}
}
@@ -2231,7 +2260,7 @@ public:
LLSD::array_iterator
locs_it = locs.beginArray(),
agents_it = agents.beginArray();
- BOOL has_agent_data = input["body"].has("AgentData");
+ bool has_agent_data = input["body"].has("AgentData");
for(int i=0;
locs_it != locs.endArray();
@@ -2299,7 +2328,7 @@ void LLViewerRegion::updateCoarseLocations(LLMessageSystem* msg)
msg->getS16Fast(_PREHASH_Index, _PREHASH_You, agent_index);
msg->getS16Fast(_PREHASH_Index, _PREHASH_Prey, target_index);
- BOOL has_agent_data = msg->has(_PREHASH_AgentData);
+ bool has_agent_data = msg->has(_PREHASH_AgentData);
S32 count = msg->getNumberOfBlocksFast(_PREHASH_Location);
for(S32 i = 0; i < count; i++)
{
@@ -2414,7 +2443,60 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features)
mSimulatorFeatures = sim_features;
setSimulatorFeaturesReceived(true);
-
+
+ // WARNING: this is called from a coroutine, and flipping saved settings has a LOT of side effects, shuttle
+ // the work below back to the main loop
+ //
+
+ // copy features to lambda in case the region is deleted before the lambda is executed
+ LLSD features = mSimulatorFeatures;
+
+ auto work = [=]()
+ {
+ // if region has MaxTextureResolution, set max_texture_dimension settings, otherwise use default
+ if (features.has("MaxTextureResolution"))
+ {
+ S32 max_texture_resolution = features["MaxTextureResolution"].asInteger();
+ gSavedSettings.setS32("max_texture_dimension_X", max_texture_resolution);
+ gSavedSettings.setS32("max_texture_dimension_Y", max_texture_resolution);
+ }
+ else
+ {
+ gSavedSettings.setS32("max_texture_dimension_X", 1024);
+ gSavedSettings.setS32("max_texture_dimension_Y", 1024);
+ }
+
+ bool mirrors_enabled = false;
+ if (features.has("MirrorsEnabled"))
+ {
+ mirrors_enabled = features["MirrorsEnabled"].asBoolean();
+ }
+
+ gSavedSettings.setBOOL("RenderMirrors", mirrors_enabled);
+
+ if (features.has("PBRTerrainEnabled"))
+ {
+ bool enabled = features["PBRTerrainEnabled"];
+ gSavedSettings.setBOOL("RenderTerrainPBREnabled", enabled);
+ }
+ else
+ {
+ gSavedSettings.setBOOL("RenderTerrainPBREnabled", false);
+ }
+
+ if (features.has("PBRMaterialSwatchEnabled"))
+ {
+ bool enabled = features["PBRMaterialSwatchEnabled"];
+ gSavedSettings.setBOOL("UIPreviewMaterial", enabled);
+ }
+ else
+ {
+ gSavedSettings.setBOOL("UIPreviewMaterial", false);
+ }
+ };
+
+
+ LLAppViewer::instance()->postToMainCoro(work);
}
//this is called when the parent is not cacheable.
@@ -2672,7 +2754,14 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLViewerObjec
void LLViewerRegion::cacheFullUpdateGLTFOverride(const LLGLTFOverrideCacheEntry &override_data)
{
U32 local_id = override_data.mLocalId;
- mImpl->mGLTFOverridesLLSD[local_id] = override_data;
+ if (override_data.mSides.size() > 0)
+ { // empty override means overrides were removed from this object
+ mImpl->mGLTFOverridesLLSD[local_id] = override_data;
+ }
+ else
+ {
+ mImpl->mGLTFOverridesLLSD.erase(local_id);
+ }
}
LLVOCacheEntry* LLViewerRegion::getCacheEntryForOctree(U32 local_id)
@@ -2805,7 +2894,7 @@ void LLViewerRegion::requestCacheMisses()
}
LLMessageSystem* msg = gMessageSystem;
- BOOL start_new_message = TRUE;
+ bool start_new_message = true;
S32 blocks = 0;
//send requests for all cache-missed objects
@@ -2817,7 +2906,7 @@ void LLViewerRegion::requestCacheMisses()
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- start_new_message = FALSE;
+ start_new_message = false;
}
msg->nextBlockFast(_PREHASH_ObjectData);
@@ -2831,7 +2920,7 @@ void LLViewerRegion::requestCacheMisses()
if (blocks >= 255)
{
sendReliableMessage();
- start_new_message = TRUE;
+ start_new_message = true;
blocks = 0;
}
}
@@ -2842,7 +2931,7 @@ void LLViewerRegion::requestCacheMisses()
sendReliableMessage();
}
- mCacheDirty = TRUE ;
+ mCacheDirty = true ;
// LL_INFOS() << "KILLDEBUG Sent cache miss full " << full_count << " crc " << crc_count << LL_ENDL;
LLViewerStatsRecorder::instance().requestCacheMissesEvent(mCacheMissList.size());
@@ -2889,6 +2978,11 @@ void LLViewerRegion::dumpCache()
// TODO - add overrides cache too
}
+void LLViewerRegion::clearVOCacheFromMemory()
+{
+ mImpl->mCacheMap.clear();
+}
+
void LLViewerRegion::unpackRegionHandshake()
{
LLMessageSystem *msg = gMessageSystem;
@@ -2898,7 +2992,7 @@ void LLViewerRegion::unpackRegionHandshake()
U8 sim_access;
std::string sim_name;
LLUUID sim_owner;
- BOOL is_estate_manager;
+ bool is_estate_manager;
F32 water_height;
F32 billable_factor;
LLUUID cache_id;
@@ -2973,20 +3067,20 @@ void LLViewerRegion::unpackRegionHandshake()
// Get the 4 textures for land
msg->getUUID("RegionInfo", "TerrainDetail0", tmp_id);
- changed |= (tmp_id != compp->getDetailTextureID(0));
- compp->setDetailTextureID(0, tmp_id);
+ changed |= (tmp_id != compp->getDetailAssetID(0));
+ compp->setDetailAssetID(0, tmp_id);
msg->getUUID("RegionInfo", "TerrainDetail1", tmp_id);
- changed |= (tmp_id != compp->getDetailTextureID(1));
- compp->setDetailTextureID(1, tmp_id);
+ changed |= (tmp_id != compp->getDetailAssetID(1));
+ compp->setDetailAssetID(1, tmp_id);
msg->getUUID("RegionInfo", "TerrainDetail2", tmp_id);
- changed |= (tmp_id != compp->getDetailTextureID(2));
- compp->setDetailTextureID(2, tmp_id);
+ changed |= (tmp_id != compp->getDetailAssetID(2));
+ compp->setDetailAssetID(2, tmp_id);
msg->getUUID("RegionInfo", "TerrainDetail3", tmp_id);
- changed |= (tmp_id != compp->getDetailTextureID(3));
- compp->setDetailTextureID(3, tmp_id);
+ changed |= (tmp_id != compp->getDetailAssetID(3));
+ compp->setDetailAssetID(3, tmp_id);
// Get the start altitude and range values for land textures
F32 tmp_f32;
@@ -3446,7 +3540,7 @@ void LLViewerRegion::setInterestListMode(const std::string &new_mode)
{
mInterestListMode = new_mode;
- if (mInterestListMode != std::string(IL_MODE_DEFAULT) && mInterestListMode != std::string(IL_MODE_360))
+ if (mInterestListMode != IL_MODE_DEFAULT && mInterestListMode != IL_MODE_360)
{
LL_WARNS("360Capture") << "Region " << getRegionID() << " setInterestListMode() invalid interest list mode: "
<< mInterestListMode << ", setting to default" << LL_ENDL;
@@ -3554,12 +3648,12 @@ void LLViewerRegion::showReleaseNotes()
if (url.empty()) {
// HACK haven't received the capability yet, we'll wait until
// it arives.
- mReleaseNotesRequested = TRUE;
+ mReleaseNotesRequested = true;
return;
}
LLWeb::loadURL(url);
- mReleaseNotesRequested = FALSE;
+ mReleaseNotesRequested = false;
}
std::string LLViewerRegion::getDescription() const
@@ -3672,6 +3766,11 @@ void LLViewerRegion::applyCacheMiscExtras(LLViewerObject* obj)
auto iter = mImpl->mGLTFOverridesLLSD.find(local_id);
if (iter != mImpl->mGLTFOverridesLLSD.end())
{
+ // UUID can be inserted null, so backfill the UUID if it was left empty
+ if (iter->second.mObjectId.isNull())
+ {
+ iter->second.mObjectId = obj->getID();
+ }
llassert(iter->second.mGLTFMaterial.size() == iter->second.mSides.size());
for (auto& side : iter->second.mGLTFMaterial)
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index 622490c881..f2c9e0c004 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -52,6 +52,11 @@ const U32 MAX_OBJECT_CACHE_ENTRIES = 50000;
// Region handshake flags
const U32 REGION_HANDSHAKE_SUPPORTS_SELF_APPEARANCE = 1U << 2;
+// Interest list mode,
+// in use by agent and region classes so must exist before region classes
+const std::string IL_MODE_DEFAULT = "default";
+const std::string IL_MODE_360 = "360";
+
class LLEventPoll;
class LLVLComposition;
class LLViewerObject;
@@ -117,34 +122,34 @@ public:
//void setAgentOffset(const LLVector3d &offset);
void updateRenderMatrix();
- void setAllowDamage(BOOL b) { setRegionFlag(REGION_FLAGS_ALLOW_DAMAGE, b); }
- void setAllowLandmark(BOOL b) { setRegionFlag(REGION_FLAGS_ALLOW_LANDMARK, b); }
- void setAllowSetHome(BOOL b) { setRegionFlag(REGION_FLAGS_ALLOW_SET_HOME, b); }
- void setResetHomeOnTeleport(BOOL b) { setRegionFlag(REGION_FLAGS_RESET_HOME_ON_TELEPORT, b); }
- void setSunFixed(BOOL b) { setRegionFlag(REGION_FLAGS_SUN_FIXED, b); }
- //void setBlockFly(BOOL b) { setRegionFlag(REGION_FLAGS_BLOCK_FLY, b); } Never used
- void setAllowDirectTeleport(BOOL b) { setRegionFlag(REGION_FLAGS_ALLOW_DIRECT_TELEPORT, b); }
-
-
- inline BOOL getAllowDamage() const;
- inline BOOL getAllowLandmark() const;
- inline BOOL getAllowSetHome() const;
- inline BOOL getResetHomeOnTeleport() const;
- inline BOOL getSunFixed() const;
- inline BOOL getBlockFly() const;
- inline BOOL getAllowDirectTeleport() const;
- inline BOOL isPrelude() const;
- inline BOOL getAllowTerraform() const;
- inline BOOL getRestrictPushObject() const;
- inline BOOL getAllowEnvironmentOverride() const;
- inline BOOL getReleaseNotesRequested() const;
+ void setAllowDamage(bool b) { setRegionFlag(REGION_FLAGS_ALLOW_DAMAGE, b); }
+ void setAllowLandmark(bool b) { setRegionFlag(REGION_FLAGS_ALLOW_LANDMARK, b); }
+ void setAllowSetHome(bool b) { setRegionFlag(REGION_FLAGS_ALLOW_SET_HOME, b); }
+ void setResetHomeOnTeleport(bool b) { setRegionFlag(REGION_FLAGS_RESET_HOME_ON_TELEPORT, b); }
+ void setSunFixed(bool b) { setRegionFlag(REGION_FLAGS_SUN_FIXED, b); }
+ //void setBlockFly(bool b) { setRegionFlag(REGION_FLAGS_BLOCK_FLY, b); } Never used
+ void setAllowDirectTeleport(bool b) { setRegionFlag(REGION_FLAGS_ALLOW_DIRECT_TELEPORT, b); }
+
+
+ inline bool getAllowDamage() const;
+ inline bool getAllowLandmark() const;
+ inline bool getAllowSetHome() const;
+ inline bool getResetHomeOnTeleport() const;
+ inline bool getSunFixed() const;
+ inline bool getBlockFly() const;
+ inline bool getAllowDirectTeleport() const;
+ inline bool isPrelude() const;
+ inline bool getAllowTerraform() const;
+ inline bool getRestrictPushObject() const;
+ inline bool getAllowEnvironmentOverride() const;
+ inline bool getReleaseNotesRequested() const;
bool isAlive(); // can become false if circuit disconnects
void setWaterHeight(F32 water_level);
F32 getWaterHeight() const;
- BOOL isVoiceEnabled() const;
+ bool isVoiceEnabled() const;
void setBillableFactor(F32 billable_factor) { mBillableFactor = billable_factor; }
F32 getBillableFactor() const { return mBillableFactor; }
@@ -163,17 +168,20 @@ public:
// Call this whenever you change the height data in the region.
// (Automatically called by LLSurfacePatch's update routine)
void dirtyHeights();
+ // Call this whenever you want to force all terrain to rebuild.
+ // (For example, if a global terrain config option has changed)
+ void dirtyAllPatches();
LLViewerParcelOverlay *getParcelOverlay() const
{ return mParcelOverlay; }
- inline void setRegionFlag(U64 flag, BOOL on);
- inline BOOL getRegionFlag(U64 flag) const;
+ inline void setRegionFlag(U64 flag, bool on);
+ inline bool getRegionFlag(U64 flag) const;
void setRegionFlags(U64 flags);
U64 getRegionFlags() const { return mRegionFlags; }
- inline void setRegionProtocol(U64 protocol, BOOL on);
- BOOL getRegionProtocol(U64 protocol) const;
+ inline void setRegionProtocol(U64 protocol, bool on);
+ bool getRegionProtocol(U64 protocol) const;
void setRegionProtocols(U64 protocols) { mRegionProtocols = protocols; }
U64 getRegionProtocols() const { return mRegionProtocols; }
@@ -196,9 +204,9 @@ public:
const LLUUID& getOwner() const;
// Is the current agent on the estate manager list for this region?
- void setIsEstateManager(BOOL b) { mIsEstateManager = b; }
- BOOL isEstateManager() const { return mIsEstateManager; }
- BOOL canManageEstate() const;
+ void setIsEstateManager(bool b) { mIsEstateManager = b; }
+ bool isEstateManager() const { return mIsEstateManager; }
+ bool canManageEstate() const;
void setSimAccess(U8 sim_access) { mSimAccess = sim_access; }
U8 getSimAccess() const { return mSimAccess; }
@@ -230,7 +238,7 @@ public:
static void processRegionInfo(LLMessageSystem* msg, void**);
//check if the viewer camera is static
- static BOOL isViewerCameraStatic();
+ static bool isViewerCameraStatic();
static void calcNewObjectCreationThrottle();
void setCacheID(const LLUUID& id);
@@ -301,7 +309,7 @@ public:
const LLUUID& getRegionID() const;
void setRegionID(const LLUUID& region_id);
- BOOL pointInRegionGlobal(const LLVector3d &point_global) const;
+ bool pointInRegionGlobal(const LLVector3d &point_global) const;
LLVector3 getPosRegionFromGlobal(const LLVector3d &point_global) const;
LLVector3 getPosRegionFromAgent(const LLVector3 &agent_pos) const;
LLVector3 getPosAgentFromRegion(const LLVector3 &region_pos) const;
@@ -310,10 +318,10 @@ public:
LLVLComposition *getComposition() const;
F32 getCompositionXY(const S32 x, const S32 y) const;
- BOOL isOwnedSelf(const LLVector3& pos);
+ bool isOwnedSelf(const LLVector3& pos);
// Owned by a group you belong to? (officer OR member)
- BOOL isOwnedGroup(const LLVector3& pos);
+ bool isOwnedGroup(const LLVector3& pos);
// deal with map object updates in the world.
void updateCoarseLocations(LLMessageSystem* msg);
@@ -375,7 +383,8 @@ public:
LLViewerObject* updateCacheEntry(U32 local_id, LLViewerObject* objectp);
void findOrphans(U32 parent_id);
void clearCachedVisibleObjects();
- void dumpCache();
+ void dumpCache ();
+ void clearVOCacheFromMemory();
void unpackRegionHandshake();
@@ -410,12 +419,12 @@ public:
void removeFromCreatedList(U32 local_id);
void addToCreatedList(U32 local_id);
- BOOL isPaused() const {return mPaused;}
+ bool isPaused() const {return mPaused;}
S32 getLastUpdate() const {return mLastUpdate;}
std::string getSimHostName();
- static BOOL isNewObjectCreationThrottleDisabled() {return sNewObjectCreationThrottle < 0;}
+ static bool isNewObjectCreationThrottleDisabled() {return sNewObjectCreationThrottle < 0;}
// rebuild reflection probe list
void updateReflectionProbes();
@@ -468,7 +477,7 @@ public:
std::vector<U32> mMapAvatars;
std::vector<LLUUID> mMapAvatarIDs;
- static BOOL sVOCacheCullingEnabled; //vo cache culling enabled or not.
+ static bool sVOCacheCullingEnabled; //vo cache culling enabled or not.
static S32 sLastCameraUpdated;
LLFrameTimer & getRenderInfoRequestTimer() { return mRenderInfoRequestTimer; };
@@ -503,9 +512,6 @@ public:
void resetInterestList();
- static const std::string IL_MODE_DEFAULT;
- static const std::string IL_MODE_360;
-
private:
static S32 sNewObjectCreationThrottle;
LLViewerRegionImpl * mImpl;
@@ -521,7 +527,7 @@ public:
std::string mZoning;
// Is this agent on the estate managers list for this region?
- BOOL mIsEstateManager;
+ bool mIsEstateManager;
U32 mPacketsIn;
U32Bits mBitsIn,
@@ -557,13 +563,13 @@ public:
// Maps local ids to cache entries.
// Regions can have order 10,000 objects, so assume
// a structure of size 2^14 = 16,000
- BOOL mCacheLoaded;
- BOOL mCacheDirty;
- BOOL mAlive; // can become false if circuit disconnects
- BOOL mSimulatorFeaturesReceived;
- BOOL mReleaseNotesRequested;
- BOOL mDead; //if true, this region is in the process of deleting.
- BOOL mPaused; //pause processing the objects in the region
+ bool mCacheLoaded;
+ bool mCacheDirty;
+ bool mAlive; // can become false if circuit disconnects
+ bool mSimulatorFeaturesReceived;
+ bool mReleaseNotesRequested;
+ bool mDead; //if true, this region is in the process of deleting.
+ bool mPaused; //pause processing the objects in the region
typedef enum
{
@@ -612,12 +618,12 @@ public:
};
-inline BOOL LLViewerRegion::getRegionProtocol(U64 protocol) const
+inline bool LLViewerRegion::getRegionProtocol(U64 protocol) const
{
return ((mRegionProtocols & protocol) != 0);
}
-inline void LLViewerRegion::setRegionProtocol(U64 protocol, BOOL on)
+inline void LLViewerRegion::setRegionProtocol(U64 protocol, bool on)
{
if (on)
{
@@ -629,12 +635,12 @@ inline void LLViewerRegion::setRegionProtocol(U64 protocol, BOOL on)
}
}
-inline BOOL LLViewerRegion::getRegionFlag(U64 flag) const
+inline bool LLViewerRegion::getRegionFlag(U64 flag) const
{
return ((mRegionFlags & flag) != 0);
}
-inline void LLViewerRegion::setRegionFlag(U64 flag, BOOL on)
+inline void LLViewerRegion::setRegionFlag(U64 flag, bool on)
{
if (on)
{
@@ -646,62 +652,62 @@ inline void LLViewerRegion::setRegionFlag(U64 flag, BOOL on)
}
}
-inline BOOL LLViewerRegion::getAllowDamage() const
+inline bool LLViewerRegion::getAllowDamage() const
{
return ((mRegionFlags & REGION_FLAGS_ALLOW_DAMAGE) !=0);
}
-inline BOOL LLViewerRegion::getAllowLandmark() const
+inline bool LLViewerRegion::getAllowLandmark() const
{
return ((mRegionFlags & REGION_FLAGS_ALLOW_LANDMARK) !=0);
}
-inline BOOL LLViewerRegion::getAllowSetHome() const
+inline bool LLViewerRegion::getAllowSetHome() const
{
return ((mRegionFlags & REGION_FLAGS_ALLOW_SET_HOME) != 0);
}
-inline BOOL LLViewerRegion::getResetHomeOnTeleport() const
+inline bool LLViewerRegion::getResetHomeOnTeleport() const
{
return ((mRegionFlags & REGION_FLAGS_RESET_HOME_ON_TELEPORT) !=0);
}
-inline BOOL LLViewerRegion::getSunFixed() const
+inline bool LLViewerRegion::getSunFixed() const
{
return ((mRegionFlags & REGION_FLAGS_SUN_FIXED) !=0);
}
-inline BOOL LLViewerRegion::getBlockFly() const
+inline bool LLViewerRegion::getBlockFly() const
{
return ((mRegionFlags & REGION_FLAGS_BLOCK_FLY) !=0);
}
-inline BOOL LLViewerRegion::getAllowDirectTeleport() const
+inline bool LLViewerRegion::getAllowDirectTeleport() const
{
return ((mRegionFlags & REGION_FLAGS_ALLOW_DIRECT_TELEPORT) !=0);
}
-inline BOOL LLViewerRegion::isPrelude() const
+inline bool LLViewerRegion::isPrelude() const
{
return is_prelude( mRegionFlags );
}
-inline BOOL LLViewerRegion::getAllowTerraform() const
+inline bool LLViewerRegion::getAllowTerraform() const
{
return ((mRegionFlags & REGION_FLAGS_BLOCK_TERRAFORM) == 0);
}
-inline BOOL LLViewerRegion::getRestrictPushObject() const
+inline bool LLViewerRegion::getRestrictPushObject() const
{
return ((mRegionFlags & REGION_FLAGS_RESTRICT_PUSHOBJECT) != 0);
}
-inline BOOL LLViewerRegion::getAllowEnvironmentOverride() const
+inline bool LLViewerRegion::getAllowEnvironmentOverride() const
{
return ((mRegionFlags & REGION_FLAGS_ALLOW_ENVIRONMENT_OVERRIDE) != 0);
}
-inline BOOL LLViewerRegion::getReleaseNotesRequested() const
+inline bool LLViewerRegion::getReleaseNotesRequested() const
{
return mReleaseNotesRequested;
}
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 2bab50300b..5ede1deea6 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -64,11 +64,19 @@ using std::pair;
using std::make_pair;
using std::string;
-BOOL LLViewerShaderMgr::sInitialized = FALSE;
+bool LLViewerShaderMgr::sInitialized = false;
bool LLViewerShaderMgr::sSkipReload = false;
LLVector4 gShinyOrigin;
+S32 clamp_terrain_mapping(S32 mapping)
+{
+ // 1 = "flat", 2 not implemented, 3 = triplanar mapping
+ mapping = llclamp(mapping, 1, 3);
+ if (mapping == 2) { mapping = 1; }
+ return mapping;
+}
+
//utility shaders
LLGLSLShader gOcclusionProgram;
LLGLSLShader gSkinnedOcclusionProgram;
@@ -76,13 +84,16 @@ LLGLSLShader gOcclusionCubeProgram;
LLGLSLShader gGlowCombineProgram;
LLGLSLShader gReflectionMipProgram;
LLGLSLShader gGaussianProgram;
-LLGLSLShader gRadianceGenProgram;
+LLGLSLShader gRadianceGenProgram;
+LLGLSLShader gHeroRadianceGenProgram;
LLGLSLShader gIrradianceGenProgram;
LLGLSLShader gGlowCombineFXAAProgram;
LLGLSLShader gTwoTextureCompareProgram;
LLGLSLShader gOneTextureFilterProgram;
LLGLSLShader gDebugProgram;
LLGLSLShader gSkinnedDebugProgram;
+LLGLSLShader gNormalDebugProgram[NORMAL_DEBUG_SHADER_COUNT];
+LLGLSLShader gSkinnedNormalDebugProgram[NORMAL_DEBUG_SHADER_COUNT];
LLGLSLShader gClipProgram;
LLGLSLShader gAlphaMaskProgram;
LLGLSLShader gBenchmarkProgram;
@@ -95,7 +106,6 @@ LLGLSLShader gObjectPreviewProgram;
LLGLSLShader gSkinnedObjectPreviewProgram;
LLGLSLShader gPhysicsPreviewProgram;
LLGLSLShader gObjectFullbrightAlphaMaskProgram;
-LLGLSLShader gSkinnedObjectFullbrightAlphaMaskProgram;
LLGLSLShader gObjectBumpProgram;
LLGLSLShader gSkinnedObjectBumpProgram;
LLGLSLShader gObjectAlphaMaskNoColorProgram;
@@ -186,10 +196,12 @@ LLGLSLShader gDeferredPostGammaCorrectProgram;
LLGLSLShader gNoPostGammaCorrectProgram;
LLGLSLShader gLegacyPostGammaCorrectProgram;
LLGLSLShader gExposureProgram;
+LLGLSLShader gExposureProgramNoFade;
LLGLSLShader gLuminanceProgram;
LLGLSLShader gFXAAProgram;
LLGLSLShader gDeferredPostNoDoFProgram;
LLGLSLShader gDeferredWLSkyProgram;
+LLGLSLShader gEnvironmentMapProgram;
LLGLSLShader gDeferredWLCloudProgram;
LLGLSLShader gDeferredWLSunProgram;
LLGLSLShader gDeferredWLMoonProgram;
@@ -214,9 +226,10 @@ LLGLSLShader gDeferredSkinnedPBROpaqueProgram;
LLGLSLShader gHUDPBRAlphaProgram;
LLGLSLShader gDeferredPBRAlphaProgram;
LLGLSLShader gDeferredSkinnedPBRAlphaProgram;
+LLGLSLShader gDeferredPBRTerrainProgram;
//helper for making a rigged variant of a given shader
-bool make_rigged_variant(LLGLSLShader& shader, LLGLSLShader& riggedShader)
+static bool make_rigged_variant(LLGLSLShader& shader, LLGLSLShader& riggedShader)
{
riggedShader.mName = llformat("Skinned %s", shader.mName.c_str());
riggedShader.mFeatures = shader.mFeatures;
@@ -231,64 +244,100 @@ bool make_rigged_variant(LLGLSLShader& shader, LLGLSLShader& riggedShader)
return riggedShader.createShader(NULL, NULL);
}
+#ifdef SHOW_ASSERT
+// return true if there are no redundant shaders in the given vector
+// also checks for redundant variants
+static bool no_redundant_shaders(const std::vector<LLGLSLShader*>& shaders)
+{
+ std::set<std::string> names;
+ for (LLGLSLShader* shader : shaders)
+ {
+ if (names.find(shader->mName) != names.end())
+ {
+ LL_WARNS("Shader") << "Redundant shader: " << shader->mName << LL_ENDL;
+ return false;
+ }
+ names.insert(shader->mName);
+
+ if (shader->mRiggedVariant)
+ {
+ if (names.find(shader->mRiggedVariant->mName) != names.end())
+ {
+ LL_WARNS("Shader") << "Redundant shader: " << shader->mRiggedVariant->mName << LL_ENDL;
+ return false;
+ }
+ names.insert(shader->mRiggedVariant->mName);
+ }
+ }
+ return true;
+}
+#endif
+
+
LLViewerShaderMgr::LLViewerShaderMgr() :
mShaderLevel(SHADER_COUNT, 0),
mMaxAvatarShaderLevel(0)
{
+}
+
+LLViewerShaderMgr::~LLViewerShaderMgr()
+{
+ mShaderLevel.clear();
+ mShaderList.clear();
+}
+
+void LLViewerShaderMgr::finalizeShaderList()
+{
//ONLY shaders that need WL Param management should be added here
- mShaderList.push_back(&gAvatarProgram);
- mShaderList.push_back(&gWaterProgram);
- mShaderList.push_back(&gWaterEdgeProgram);
- mShaderList.push_back(&gAvatarEyeballProgram);
- mShaderList.push_back(&gImpostorProgram);
- mShaderList.push_back(&gObjectBumpProgram);
- mShaderList.push_back(&gSkinnedObjectBumpProgram);
- mShaderList.push_back(&gObjectFullbrightAlphaMaskProgram);
- mShaderList.push_back(&gSkinnedObjectFullbrightAlphaMaskProgram);
- mShaderList.push_back(&gObjectAlphaMaskNoColorProgram);
- mShaderList.push_back(&gUnderWaterProgram);
- mShaderList.push_back(&gDeferredSunProgram);
+ mShaderList.push_back(&gAvatarProgram);
+ mShaderList.push_back(&gWaterProgram);
+ mShaderList.push_back(&gWaterEdgeProgram);
+ mShaderList.push_back(&gAvatarEyeballProgram);
+ mShaderList.push_back(&gImpostorProgram);
+ mShaderList.push_back(&gObjectBumpProgram);
+ mShaderList.push_back(&gObjectFullbrightAlphaMaskProgram);
+ mShaderList.push_back(&gObjectAlphaMaskNoColorProgram);
+ mShaderList.push_back(&gUnderWaterProgram);
+ mShaderList.push_back(&gDeferredSunProgram);
mShaderList.push_back(&gHazeProgram);
mShaderList.push_back(&gHazeWaterProgram);
- mShaderList.push_back(&gDeferredSoftenProgram);
- mShaderList.push_back(&gDeferredAlphaProgram);
+ mShaderList.push_back(&gDeferredSoftenProgram);
+ mShaderList.push_back(&gDeferredAlphaProgram);
mShaderList.push_back(&gHUDAlphaProgram);
- mShaderList.push_back(&gDeferredSkinnedAlphaProgram);
- mShaderList.push_back(&gDeferredAlphaImpostorProgram);
- mShaderList.push_back(&gDeferredSkinnedAlphaImpostorProgram);
- mShaderList.push_back(&gDeferredFullbrightProgram);
+ mShaderList.push_back(&gDeferredAlphaImpostorProgram);
+ mShaderList.push_back(&gDeferredFullbrightProgram);
mShaderList.push_back(&gHUDFullbrightProgram);
- mShaderList.push_back(&gDeferredFullbrightAlphaMaskProgram);
+ mShaderList.push_back(&gDeferredFullbrightAlphaMaskProgram);
mShaderList.push_back(&gHUDFullbrightAlphaMaskProgram);
mShaderList.push_back(&gDeferredFullbrightAlphaMaskAlphaProgram);
mShaderList.push_back(&gHUDFullbrightAlphaMaskAlphaProgram);
- mShaderList.push_back(&gDeferredFullbrightShinyProgram);
+ mShaderList.push_back(&gDeferredFullbrightShinyProgram);
mShaderList.push_back(&gHUDFullbrightShinyProgram);
- mShaderList.push_back(&gDeferredSkinnedFullbrightShinyProgram);
- mShaderList.push_back(&gDeferredSkinnedFullbrightProgram);
- mShaderList.push_back(&gDeferredSkinnedFullbrightAlphaMaskProgram);
- mShaderList.push_back(&gDeferredSkinnedFullbrightAlphaMaskAlphaProgram);
- mShaderList.push_back(&gDeferredEmissiveProgram);
- mShaderList.push_back(&gDeferredSkinnedEmissiveProgram);
- mShaderList.push_back(&gDeferredAvatarEyesProgram);
+ mShaderList.push_back(&gDeferredEmissiveProgram);
+ mShaderList.push_back(&gDeferredAvatarEyesProgram);
mShaderList.push_back(&gDeferredAvatarAlphaProgram);
- mShaderList.push_back(&gDeferredWLSkyProgram);
- mShaderList.push_back(&gDeferredWLCloudProgram);
+ mShaderList.push_back(&gEnvironmentMapProgram);
+ mShaderList.push_back(&gDeferredWLSkyProgram);
+ mShaderList.push_back(&gDeferredWLCloudProgram);
mShaderList.push_back(&gDeferredWLMoonProgram);
mShaderList.push_back(&gDeferredWLSunProgram);
mShaderList.push_back(&gDeferredPBRAlphaProgram);
mShaderList.push_back(&gHUDPBRAlphaProgram);
- mShaderList.push_back(&gDeferredSkinnedPBRAlphaProgram);
mShaderList.push_back(&gDeferredPostGammaCorrectProgram); // for gamma
mShaderList.push_back(&gNoPostGammaCorrectProgram);
mShaderList.push_back(&gLegacyPostGammaCorrectProgram);
-
-}
-
-LLViewerShaderMgr::~LLViewerShaderMgr()
-{
- mShaderLevel.clear();
- mShaderList.clear();
+ mShaderList.push_back(&gDeferredDiffuseProgram);
+ mShaderList.push_back(&gDeferredBumpProgram);
+ mShaderList.push_back(&gDeferredPBROpaqueProgram);
+ mShaderList.push_back(&gDeferredAvatarProgram);
+ mShaderList.push_back(&gDeferredTerrainProgram);
+ mShaderList.push_back(&gDeferredPBRTerrainProgram);
+ mShaderList.push_back(&gDeferredDiffuseAlphaMaskProgram);
+ mShaderList.push_back(&gDeferredNonIndexedDiffuseAlphaMaskProgram);
+ mShaderList.push_back(&gDeferredTreeProgram);
+
+ // make sure there are no redundancies
+ llassert(no_redundant_shaders(mShaderList));
}
// static
@@ -343,6 +392,10 @@ void LLViewerShaderMgr::setShaders()
return;
}
+ mShaderList.clear();
+
+ LLShaderMgr::sMirrorsEnabled = LLPipeline::RenderMirrors;
+
if (!gGLManager.mHasRequirements)
{
// Viewer will show 'hardware requirements' warning later
@@ -370,7 +423,10 @@ void LLViewerShaderMgr::setShaders()
static LLCachedControl<U32> max_texture_index(gSavedSettings, "RenderMaxTextureIndex", 16);
// when using indexed texture rendering, leave some texture units available for shadow and reflection maps
- LLGLSLShader::sIndexedTextureChannels = llmax(llmin(gGLManager.mNumTextureImageUnits-12, (S32) max_texture_index), 1);
+ static LLCachedControl<S32> reserved_texture_units(gSavedSettings, "RenderReservedTextureIndices", 14);
+
+ LLGLSLShader::sIndexedTextureChannels =
+ llclamp<S32>(max_texture_index, 1, gGLManager.mNumTextureImageUnits-reserved_texture_units);
reentrance = true;
@@ -449,7 +505,7 @@ void LLViewerShaderMgr::setShaders()
gPipeline.mShadersLoaded = true;
- BOOL loaded = loadShadersWater();
+ bool loaded = loadShadersWater();
if (loaded)
{
@@ -524,6 +580,8 @@ void LLViewerShaderMgr::setShaders()
}
gPipeline.createGLBuffers();
+ finalizeShaderList();
+
reentrance = false;
}
@@ -594,7 +652,7 @@ std::string LLViewerShaderMgr::loadBasicShaders()
attribs["MAX_JOINTS_PER_MESH_OBJECT"] =
std::to_string(LLSkinningUtil::getMaxJointCount());
- BOOL ssr = gSavedSettings.getBOOL("RenderScreenSpaceReflections");
+ bool ssr = gSavedSettings.getBOOL("RenderScreenSpaceReflections");
bool has_reflection_probes = gSavedSettings.getBOOL("RenderReflectionsEnabled") && gGLManager.mGLVersion > 3.99f;
@@ -623,6 +681,16 @@ std::string LLViewerShaderMgr::loadBasicShaders()
attribs["REF_SAMPLE_COUNT"] = "32";
}
+ { // PBR terrain
+ const S32 mapping = clamp_terrain_mapping(gSavedSettings.getS32("RenderTerrainPBRPlanarSampleCount"));
+ attribs["TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT"] = llformat("%d", mapping);
+ const F32 triplanar_factor = gSavedSettings.getF32("RenderTerrainPBRTriplanarBlendFactor");
+ attribs["TERRAIN_TRIPLANAR_BLEND_FACTOR"] = llformat("%.2f", triplanar_factor);
+ S32 detail = gSavedSettings.getS32("RenderTerrainPBRDetail");
+ detail = llclamp(detail, TERRAIN_PBR_DETAIL_MIN, TERRAIN_PBR_DETAIL_MAX);
+ attribs["TERRAIN_PBR_DETAIL"] = llformat("%d", detail);
+ }
+
LLGLSLShader::sGlobalDefines = attribs;
// We no longer have to bind the shaders to global glhandles, they are automatically added to a map now.
@@ -655,11 +723,12 @@ std::string LLViewerShaderMgr::loadBasicShaders()
index_channels.push_back(-1); shaders.push_back( make_pair( "windlight/atmosphericsFuncs.glsl", mShaderLevel[SHADER_WINDLIGHT] ) );
index_channels.push_back(-1); shaders.push_back( make_pair( "windlight/atmosphericsF.glsl", mShaderLevel[SHADER_WINDLIGHT] ) );
index_channels.push_back(-1); shaders.push_back( make_pair( "environment/waterFogF.glsl", mShaderLevel[SHADER_WATER] ) );
- index_channels.push_back(-1); shaders.push_back( make_pair( "environment/encodeNormF.glsl", mShaderLevel[SHADER_ENVIRONMENT] ) );
index_channels.push_back(-1); shaders.push_back( make_pair( "environment/srgbF.glsl", mShaderLevel[SHADER_ENVIRONMENT] ) );
index_channels.push_back(-1); shaders.push_back( make_pair( "deferred/deferredUtil.glsl", 1) );
+ index_channels.push_back(-1); shaders.push_back( make_pair( "deferred/globalF.glsl", 1));
index_channels.push_back(-1); shaders.push_back( make_pair( "deferred/shadowUtil.glsl", 1) );
index_channels.push_back(-1); shaders.push_back( make_pair( "deferred/aoUtil.glsl", 1) );
+ index_channels.push_back(-1); shaders.push_back( make_pair( "deferred/pbrterrainUtilF.glsl", 1) );
index_channels.push_back(-1); shaders.push_back( make_pair( "deferred/reflectionProbeF.glsl", has_reflection_probes ? 3 : 2) );
index_channels.push_back(-1); shaders.push_back( make_pair( "deferred/screenSpaceReflUtil.glsl", ssr ? 3 : 1) );
index_channels.push_back(-1); shaders.push_back( make_pair( "lighting/lightNonIndexedF.glsl", mShaderLevel[SHADER_LIGHTING] ) );
@@ -680,11 +749,11 @@ std::string LLViewerShaderMgr::loadBasicShaders()
return std::string();
}
-BOOL LLViewerShaderMgr::loadShadersWater()
+bool LLViewerShaderMgr::loadShadersWater()
{
LL_PROFILE_ZONE_SCOPED;
- BOOL success = TRUE;
- BOOL terrainWaterSuccess = TRUE;
+ bool success = true;
+ bool terrainWaterSuccess = true;
bool use_sun_shadow = mShaderLevel[SHADER_DEFERRED] > 1 &&
gSavedSettings.getS32("RenderShadowDetail") > 0;
@@ -694,7 +763,7 @@ BOOL LLViewerShaderMgr::loadShadersWater()
gWaterProgram.unload();
gWaterEdgeProgram.unload();
gUnderWaterProgram.unload();
- return TRUE;
+ return true;
}
if (success)
@@ -787,7 +856,7 @@ BOOL LLViewerShaderMgr::loadShadersWater()
if (!success)
{
mShaderLevel[SHADER_WATER] = 0;
- return FALSE;
+ return false;
}
// if we failed to load the terrain water shaders and we need them (using class2 water),
@@ -800,19 +869,19 @@ BOOL LLViewerShaderMgr::loadShadersWater()
LLWorld::getInstance()->updateWaterObjects();
- return TRUE;
+ return true;
}
-BOOL LLViewerShaderMgr::loadShadersEffects()
+bool LLViewerShaderMgr::loadShadersEffects()
{
LL_PROFILE_ZONE_SCOPED;
- BOOL success = TRUE;
+ bool success = true;
if (mShaderLevel[SHADER_EFFECT] == 0)
{
gGlowProgram.unload();
gGlowExtractProgram.unload();
- return TRUE;
+ return true;
}
if (success)
@@ -825,7 +894,7 @@ BOOL LLViewerShaderMgr::loadShadersEffects()
success = gGlowProgram.createShader(NULL, NULL);
if (!success)
{
- LLPipeline::sRenderGlow = FALSE;
+ LLPipeline::sRenderGlow = false;
}
}
@@ -848,7 +917,7 @@ BOOL LLViewerShaderMgr::loadShadersEffects()
success = gGlowExtractProgram.createShader(NULL, NULL);
if (!success)
{
- LLPipeline::sRenderGlow = FALSE;
+ LLPipeline::sRenderGlow = false;
}
}
@@ -856,7 +925,7 @@ BOOL LLViewerShaderMgr::loadShadersEffects()
}
-BOOL LLViewerShaderMgr::loadShadersDeferred()
+bool LLViewerShaderMgr::loadShadersDeferred()
{
LL_PROFILE_ZONE_SCOPED;
bool use_sun_shadow = mShaderLevel[SHADER_DEFERRED] > 1 &&
@@ -917,11 +986,13 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredCoFProgram.unload();
gDeferredDoFCombineProgram.unload();
gExposureProgram.unload();
+ gExposureProgramNoFade.unload();
gLuminanceProgram.unload();
gDeferredPostGammaCorrectProgram.unload();
gNoPostGammaCorrectProgram.unload();
gLegacyPostGammaCorrectProgram.unload();
gFXAAProgram.unload();
+ gEnvironmentMapProgram.unload();
gDeferredWLSkyProgram.unload();
gDeferredWLCloudProgram.unload();
gDeferredWLSunProgram.unload();
@@ -951,11 +1022,12 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredSkinnedPBROpaqueProgram.unload();
gDeferredPBRAlphaProgram.unload();
gDeferredSkinnedPBRAlphaProgram.unload();
+ gDeferredPBRTerrainProgram.unload();
- return TRUE;
+ return true;
}
- BOOL success = TRUE;
+ bool success = true;
if (success)
{
@@ -970,7 +1042,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (success)
{
gDeferredDiffuseProgram.mName = "Deferred Diffuse Shader";
- gDeferredDiffuseProgram.mFeatures.encodesNormal = true;
gDeferredDiffuseProgram.mFeatures.hasSrgb = true;
gDeferredDiffuseProgram.mShaderFiles.clear();
gDeferredDiffuseProgram.mShaderFiles.push_back(make_pair("deferred/diffuseV.glsl", GL_VERTEX_SHADER));
@@ -984,7 +1055,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (success)
{
gDeferredDiffuseAlphaMaskProgram.mName = "Deferred Diffuse Alpha Mask Shader";
- gDeferredDiffuseAlphaMaskProgram.mFeatures.encodesNormal = true;
gDeferredDiffuseAlphaMaskProgram.mShaderFiles.clear();
gDeferredDiffuseAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/diffuseV.glsl", GL_VERTEX_SHADER));
gDeferredDiffuseAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/diffuseAlphaMaskIndexedF.glsl", GL_FRAGMENT_SHADER));
@@ -997,7 +1067,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (success)
{
gDeferredNonIndexedDiffuseAlphaMaskProgram.mName = "Deferred Diffuse Non-Indexed Alpha Mask Shader";
- gDeferredNonIndexedDiffuseAlphaMaskProgram.mFeatures.encodesNormal = true;
gDeferredNonIndexedDiffuseAlphaMaskProgram.mShaderFiles.clear();
gDeferredNonIndexedDiffuseAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/diffuseV.glsl", GL_VERTEX_SHADER));
gDeferredNonIndexedDiffuseAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/diffuseAlphaMaskF.glsl", GL_FRAGMENT_SHADER));
@@ -1009,7 +1078,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (success)
{
gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram.mName = "Deferred Diffuse Non-Indexed Alpha Mask No Color Shader";
- gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram.mFeatures.encodesNormal = true;
gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram.mShaderFiles.clear();
gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram.mShaderFiles.push_back(make_pair("deferred/diffuseNoColorV.glsl", GL_VERTEX_SHADER));
gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram.mShaderFiles.push_back(make_pair("deferred/diffuseAlphaMaskNoColorF.glsl", GL_FRAGMENT_SHADER));
@@ -1021,7 +1089,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (success)
{
gDeferredBumpProgram.mName = "Deferred Bump Shader";
- gDeferredBumpProgram.mFeatures.encodesNormal = true;
gDeferredBumpProgram.mShaderFiles.clear();
gDeferredBumpProgram.mShaderFiles.push_back(make_pair("deferred/bumpV.glsl", GL_VERTEX_SHADER));
gDeferredBumpProgram.mShaderFiles.push_back(make_pair("deferred/bumpF.glsl", GL_FRAGMENT_SHADER));
@@ -1044,9 +1111,17 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
{
if (success)
{
- mShaderList.push_back(&gDeferredMaterialProgram[i]);
+ bool has_skin = i & 0x10;
- gDeferredMaterialProgram[i].mName = llformat("Deferred Material Shader %d", i);
+ if (!has_skin)
+ {
+ mShaderList.push_back(&gDeferredMaterialProgram[i]);
+ gDeferredMaterialProgram[i].mName = llformat("Material Shader %d", i);
+ }
+ else
+ {
+ gDeferredMaterialProgram[i].mName = llformat("Skinned Material Shader %d", i);
+ }
U32 alpha_mode = i & 0x3;
@@ -1083,9 +1158,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredMaterialProgram[i].addPermutation("HAS_SUN_SHADOW", "1");
}
- bool has_skin = i & 0x10;
+
gDeferredMaterialProgram[i].mFeatures.hasSrgb = true;
- gDeferredMaterialProgram[i].mFeatures.encodesNormal = true;
gDeferredMaterialProgram[i].mFeatures.calculatesAtmospherics = true;
gDeferredMaterialProgram[i].mFeatures.hasAtmospherics = true;
gDeferredMaterialProgram[i].mFeatures.hasGamma = true;
@@ -1119,7 +1193,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (success)
{
gDeferredPBROpaqueProgram.mName = "Deferred PBR Opaque Shader";
- gDeferredPBROpaqueProgram.mFeatures.encodesNormal = true;
gDeferredPBROpaqueProgram.mFeatures.hasSrgb = true;
gDeferredPBROpaqueProgram.mShaderFiles.clear();
@@ -1180,7 +1253,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
shader->mFeatures.hasLighting = false;
shader->mFeatures.isAlphaLighting = true;
shader->mFeatures.hasSrgb = true;
- shader->mFeatures.encodesNormal = true;
shader->mFeatures.calculatesAtmospherics = true;
shader->mFeatures.hasAtmospherics = true;
shader->mFeatures.hasGamma = true;
@@ -1242,12 +1314,38 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
success = shader->createShader(NULL, NULL);
llassert(success);
}
+
+ if (success)
+ {
+ S32 detail = gSavedSettings.getS32("RenderTerrainPBRDetail");
+ detail = llclamp(detail, TERRAIN_PBR_DETAIL_MIN, TERRAIN_PBR_DETAIL_MAX);
+ const S32 mapping = clamp_terrain_mapping(gSavedSettings.getS32("RenderTerrainPBRPlanarSampleCount"));
+ gDeferredPBRTerrainProgram.mName = llformat("Deferred PBR Terrain Shader %d %s",
+ detail,
+ (mapping == 1 ? "flat" : "triplanar"));
+ gDeferredPBRTerrainProgram.mFeatures.hasSrgb = true;
+ gDeferredPBRTerrainProgram.mFeatures.isAlphaLighting = true;
+ gDeferredPBRTerrainProgram.mFeatures.disableTextureIndex = true; //hack to disable auto-setup of texture channels
+ gDeferredPBRTerrainProgram.mFeatures.calculatesAtmospherics = true;
+ gDeferredPBRTerrainProgram.mFeatures.hasAtmospherics = true;
+ gDeferredPBRTerrainProgram.mFeatures.hasGamma = true;
+ gDeferredPBRTerrainProgram.mFeatures.hasTransport = true;
+ gDeferredPBRTerrainProgram.mFeatures.isPBRTerrain = true;
+
+ gDeferredPBRTerrainProgram.mShaderFiles.clear();
+ gDeferredPBRTerrainProgram.mShaderFiles.push_back(make_pair("deferred/pbrterrainV.glsl", GL_VERTEX_SHADER));
+ gDeferredPBRTerrainProgram.mShaderFiles.push_back(make_pair("deferred/pbrterrainF.glsl", GL_FRAGMENT_SHADER));
+ gDeferredPBRTerrainProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED];
+ gDeferredPBRTerrainProgram.addPermutation("TERRAIN_PBR_DETAIL", llformat("%d", detail));
+ gDeferredPBRTerrainProgram.addPermutation("TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT", llformat("%d", mapping));
+ success = gDeferredPBRTerrainProgram.createShader(NULL, NULL);
+ llassert(success);
+ }
if (success)
{
gDeferredTreeProgram.mName = "Deferred Tree Shader";
gDeferredTreeProgram.mShaderFiles.clear();
- gDeferredTreeProgram.mFeatures.encodesNormal = true;
gDeferredTreeProgram.mShaderFiles.push_back(make_pair("deferred/treeV.glsl", GL_VERTEX_SHADER));
gDeferredTreeProgram.mShaderFiles.push_back(make_pair("deferred/treeF.glsl", GL_FRAGMENT_SHADER));
gDeferredTreeProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED];
@@ -1282,8 +1380,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
{
gDeferredImpostorProgram.mName = "Deferred Impostor Shader";
gDeferredImpostorProgram.mFeatures.hasSrgb = true;
- gDeferredImpostorProgram.mFeatures.encodesNormal = true;
- //gDeferredImpostorProgram.mFeatures.isDeferred = true;
gDeferredImpostorProgram.mShaderFiles.clear();
gDeferredImpostorProgram.mShaderFiles.push_back(make_pair("deferred/impostorV.glsl", GL_VERTEX_SHADER));
gDeferredImpostorProgram.mShaderFiles.push_back(make_pair("deferred/impostorF.glsl", GL_FRAGMENT_SHADER));
@@ -1445,7 +1541,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
shader->mFeatures.isAlphaLighting = true;
shader->mFeatures.disableTextureIndex = true; //hack to disable auto-setup of texture channels
shader->mFeatures.hasSrgb = true;
- shader->mFeatures.encodesNormal = true;
shader->mFeatures.calculatesAtmospherics = true;
shader->mFeatures.hasAtmospherics = true;
shader->mFeatures.hasGamma = true;
@@ -1507,7 +1602,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
shader->mFeatures.hasSrgb = true;
shader->mFeatures.isAlphaLighting = true;
- shader->mFeatures.encodesNormal = true;
shader->mFeatures.hasShadows = use_sun_shadow;
shader->mFeatures.hasReflectionProbes = true;
shader->mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels;
@@ -1555,7 +1649,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredAvatarEyesProgram.mFeatures.hasAtmospherics = true;
gDeferredAvatarEyesProgram.mFeatures.disableTextureIndex = true;
gDeferredAvatarEyesProgram.mFeatures.hasSrgb = true;
- gDeferredAvatarEyesProgram.mFeatures.encodesNormal = true;
gDeferredAvatarEyesProgram.mFeatures.hasShadows = true;
gDeferredAvatarEyesProgram.mShaderFiles.clear();
@@ -1953,10 +2046,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (success)
{
gDeferredTerrainProgram.mName = "Deferred Terrain Shader";
- gDeferredTerrainProgram.mFeatures.encodesNormal = true;
gDeferredTerrainProgram.mFeatures.hasSrgb = true;
- gDeferredTerrainProgram.mFeatures.calculatesLighting = false;
- gDeferredTerrainProgram.mFeatures.hasLighting = false;
gDeferredTerrainProgram.mFeatures.isAlphaLighting = true;
gDeferredTerrainProgram.mFeatures.disableTextureIndex = true; //hack to disable auto-setup of texture channels
gDeferredTerrainProgram.mFeatures.calculatesAtmospherics = true;
@@ -1975,7 +2065,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
{
gDeferredAvatarProgram.mName = "Deferred Avatar Shader";
gDeferredAvatarProgram.mFeatures.hasSkinning = true;
- gDeferredAvatarProgram.mFeatures.encodesNormal = true;
gDeferredAvatarProgram.mShaderFiles.clear();
gDeferredAvatarProgram.mShaderFiles.push_back(make_pair("deferred/avatarV.glsl", GL_VERTEX_SHADER));
gDeferredAvatarProgram.mShaderFiles.push_back(make_pair("deferred/avatarF.glsl", GL_FRAGMENT_SHADER));
@@ -1993,7 +2082,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredAvatarAlphaProgram.mFeatures.isAlphaLighting = true;
gDeferredAvatarAlphaProgram.mFeatures.disableTextureIndex = true;
gDeferredAvatarAlphaProgram.mFeatures.hasSrgb = true;
- gDeferredAvatarAlphaProgram.mFeatures.encodesNormal = true;
gDeferredAvatarAlphaProgram.mFeatures.calculatesAtmospherics = true;
gDeferredAvatarAlphaProgram.mFeatures.hasAtmospherics = true;
gDeferredAvatarAlphaProgram.mFeatures.hasGamma = true;
@@ -2029,6 +2117,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gExposureProgram.mFeatures.isDeferred = true;
gExposureProgram.mShaderFiles.clear();
gExposureProgram.clearPermutations();
+ gExposureProgram.addPermutation("USE_LAST_EXPOSURE", "1");
gExposureProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER));
gExposureProgram.mShaderFiles.push_back(make_pair("deferred/exposureF.glsl", GL_FRAGMENT_SHADER));
gExposureProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED];
@@ -2038,6 +2127,20 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (success)
{
+ gExposureProgramNoFade.mName = "Exposure (no fade)";
+ gExposureProgramNoFade.mFeatures.hasSrgb = true;
+ gExposureProgramNoFade.mFeatures.isDeferred = true;
+ gExposureProgramNoFade.mShaderFiles.clear();
+ gExposureProgramNoFade.clearPermutations();
+ gExposureProgramNoFade.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER));
+ gExposureProgramNoFade.mShaderFiles.push_back(make_pair("deferred/exposureF.glsl", GL_FRAGMENT_SHADER));
+ gExposureProgramNoFade.mShaderLevel = mShaderLevel[SHADER_DEFERRED];
+ success = gExposureProgramNoFade.createShader(NULL, NULL);
+ llassert(success);
+ }
+
+ if (success)
+ {
gLuminanceProgram.mName = "Luminance";
gLuminanceProgram.mShaderFiles.clear();
gLuminanceProgram.clearPermutations();
@@ -2153,6 +2256,26 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
llassert(success);
}
+ if (success)
+ {
+ gEnvironmentMapProgram.mName = "Environment Map Program";
+ gEnvironmentMapProgram.mShaderFiles.clear();
+ gEnvironmentMapProgram.mFeatures.calculatesAtmospherics = true;
+ gEnvironmentMapProgram.mFeatures.hasAtmospherics = true;
+ gEnvironmentMapProgram.mFeatures.hasGamma = true;
+ gEnvironmentMapProgram.mFeatures.hasSrgb = true;
+
+ gEnvironmentMapProgram.clearPermutations();
+ gEnvironmentMapProgram.addPermutation("HAS_HDRI", "1");
+ gEnvironmentMapProgram.mShaderFiles.push_back(make_pair("deferred/skyV.glsl", GL_VERTEX_SHADER));
+ gEnvironmentMapProgram.mShaderFiles.push_back(make_pair("deferred/skyF.glsl", GL_FRAGMENT_SHADER));
+ gEnvironmentMapProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED];
+ gEnvironmentMapProgram.mShaderGroup = LLGLSLShader::SG_SKY;
+
+ success = gEnvironmentMapProgram.createShader(NULL, NULL);
+ llassert(success);
+ }
+
if (success)
{
gDeferredWLSkyProgram.mName = "Deferred Windlight Sky Shader";
@@ -2284,15 +2407,14 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
return success;
}
-BOOL LLViewerShaderMgr::loadShadersObject()
+bool LLViewerShaderMgr::loadShadersObject()
{
LL_PROFILE_ZONE_SCOPED;
- BOOL success = TRUE;
+ bool success = true;
if (success)
{
gObjectBumpProgram.mName = "Bump Shader";
- gObjectBumpProgram.mFeatures.encodesNormal = true;
gObjectBumpProgram.mShaderFiles.clear();
gObjectBumpProgram.mShaderFiles.push_back(make_pair("objects/bumpV.glsl", GL_VERTEX_SHADER));
gObjectBumpProgram.mShaderFiles.push_back(make_pair("objects/bumpF.glsl", GL_FRAGMENT_SHADER));
@@ -2376,23 +2498,23 @@ BOOL LLViewerShaderMgr::loadShadersObject()
if (!success)
{
mShaderLevel[SHADER_OBJECT] = 0;
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
-BOOL LLViewerShaderMgr::loadShadersAvatar()
+bool LLViewerShaderMgr::loadShadersAvatar()
{
LL_PROFILE_ZONE_SCOPED;
#if 1 // DEPRECATED -- forward rendering is deprecated
- BOOL success = TRUE;
+ bool success = true;
if (mShaderLevel[SHADER_AVATAR] == 0)
{
gAvatarProgram.unload();
gAvatarEyeballProgram.unload();
- return TRUE;
+ return true;
}
if (success)
@@ -2441,16 +2563,16 @@ BOOL LLViewerShaderMgr::loadShadersAvatar()
{
mShaderLevel[SHADER_AVATAR] = 0;
mMaxAvatarShaderLevel = 0;
- return FALSE;
+ return false;
}
#endif
- return TRUE;
+ return true;
}
-BOOL LLViewerShaderMgr::loadShadersInterface()
+bool LLViewerShaderMgr::loadShadersInterface()
{
LL_PROFILE_ZONE_SCOPED;
- BOOL success = TRUE;
+ bool success = true;
if (success)
{
@@ -2643,6 +2765,33 @@ BOOL LLViewerShaderMgr::loadShadersInterface()
if (success)
{
+ for (S32 variant = 0; variant < NORMAL_DEBUG_SHADER_COUNT; ++variant)
+ {
+ LLGLSLShader& shader = gNormalDebugProgram[variant];
+ LLGLSLShader& skinned_shader = gSkinnedNormalDebugProgram[variant];
+ shader.mName = "Normal Debug Shader";
+ shader.mShaderFiles.clear();
+ shader.mShaderFiles.push_back(make_pair("interface/normaldebugV.glsl", GL_VERTEX_SHADER));
+ // *NOTE: Geometry shaders have a reputation for being slow.
+ // Consider using compute shaders instead, which have a reputation
+ // for being fast. This geometry shader in particular seems to run
+ // fine on my machine, but I won't vouch for this in
+ // performance-critical areas. -Cosmic,2023-09-28
+ shader.mShaderFiles.push_back(make_pair("interface/normaldebugG.glsl", GL_GEOMETRY_SHADER));
+ shader.mShaderFiles.push_back(make_pair("interface/normaldebugF.glsl", GL_FRAGMENT_SHADER));
+ shader.mRiggedVariant = &skinned_shader;
+ shader.mShaderLevel = mShaderLevel[SHADER_INTERFACE];
+ if (variant == NORMAL_DEBUG_SHADER_WITH_TANGENTS)
+ {
+ shader.addPermutation("HAS_ATTRIBUTE_TANGENT", "1");
+ }
+ success = make_rigged_variant(shader, skinned_shader);
+ success = success && shader.createShader(NULL, NULL);
+ }
+ }
+
+ if (success)
+ {
gClipProgram.mName = "Clip Shader";
gClipProgram.mShaderFiles.clear();
gClipProgram.mShaderFiles.push_back(make_pair("interface/clipV.glsl", GL_VERTEX_SHADER));
@@ -2744,8 +2893,21 @@ BOOL LLViewerShaderMgr::loadShadersInterface()
gRadianceGenProgram.mShaderFiles.push_back(make_pair("interface/radianceGenV.glsl", GL_VERTEX_SHADER));
gRadianceGenProgram.mShaderFiles.push_back(make_pair("interface/radianceGenF.glsl", GL_FRAGMENT_SHADER));
gRadianceGenProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE];
+ gRadianceGenProgram.addPermutation("PROBE_FILTER_SAMPLES", "32");
success = gRadianceGenProgram.createShader(NULL, NULL);
}
+
+ if (success && gGLManager.mHasCubeMapArray)
+ {
+ gHeroRadianceGenProgram.mName = "Hero Radiance Gen Shader";
+ gHeroRadianceGenProgram.mShaderFiles.clear();
+ gHeroRadianceGenProgram.mShaderFiles.push_back(make_pair("interface/radianceGenV.glsl", GL_VERTEX_SHADER));
+ gHeroRadianceGenProgram.mShaderFiles.push_back(make_pair("interface/radianceGenF.glsl", GL_FRAGMENT_SHADER));
+ gHeroRadianceGenProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE];
+ gHeroRadianceGenProgram.addPermutation("HERO_PROBES", "1");
+ gHeroRadianceGenProgram.addPermutation("PROBE_FILTER_SAMPLES", "4");
+ success = gHeroRadianceGenProgram.createShader(NULL, NULL);
+ }
if (success && gGLManager.mHasCubeMapArray)
{
@@ -2760,10 +2922,10 @@ BOOL LLViewerShaderMgr::loadShadersInterface()
if( !success )
{
mShaderLevel[SHADER_INTERFACE] = 0;
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index 04da7e48ae..17ec51caab 100644
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -35,12 +35,16 @@
class LLViewerShaderMgr: public LLShaderMgr
{
public:
- static BOOL sInitialized;
+ static bool sInitialized;
static bool sSkipReload;
LLViewerShaderMgr();
/* virtual */ ~LLViewerShaderMgr();
+ // Add shaders to mShaderList for later uniform propagation
+ // Will assert on redundant shader entries in debug builds
+ void finalizeShaderList();
+
// singleton pattern implementation
static LLViewerShaderMgr * instance();
static void releaseInstance();
@@ -54,12 +58,12 @@ public:
// name of a file error happened at, otherwise
// returns an empty string
std::string loadBasicShaders();
- BOOL loadShadersEffects();
- BOOL loadShadersDeferred();
- BOOL loadShadersObject();
- BOOL loadShadersAvatar();
- BOOL loadShadersWater();
- BOOL loadShadersInterface();
+ bool loadShadersEffects();
+ bool loadShadersDeferred();
+ bool loadShadersObject();
+ bool loadShadersAvatar();
+ bool loadShadersWater();
+ bool loadShadersInterface();
std::vector<S32> mShaderLevel;
S32 mMaxAvatarShaderLevel;
@@ -153,9 +157,18 @@ extern LLGLSLShader gGlowCombineProgram;
extern LLGLSLShader gReflectionMipProgram;
extern LLGLSLShader gGaussianProgram;
extern LLGLSLShader gRadianceGenProgram;
+extern LLGLSLShader gHeroRadianceGenProgram;
extern LLGLSLShader gIrradianceGenProgram;
extern LLGLSLShader gGlowCombineFXAAProgram;
extern LLGLSLShader gDebugProgram;
+enum NormalDebugShaderVariant : S32
+{
+ NORMAL_DEBUG_SHADER_DEFAULT,
+ NORMAL_DEBUG_SHADER_WITH_TANGENTS,
+ NORMAL_DEBUG_SHADER_COUNT
+};
+extern LLGLSLShader gNormalDebugProgram[NORMAL_DEBUG_SHADER_COUNT];
+extern LLGLSLShader gSkinnedNormalDebugProgram[NORMAL_DEBUG_SHADER_COUNT];
extern LLGLSLShader gClipProgram;
extern LLGLSLShader gBenchmarkProgram;
extern LLGLSLShader gReflectionProbeDisplayProgram;
@@ -171,7 +184,6 @@ extern LLGLSLShader gOneTextureFilterProgram;
//object shaders
extern LLGLSLShader gObjectPreviewProgram;
extern LLGLSLShader gPhysicsPreviewProgram;
-extern LLGLSLShader gSkinnedObjectFullbrightAlphaMaskProgram;
extern LLGLSLShader gObjectBumpProgram;
extern LLGLSLShader gSkinnedObjectBumpProgram;
extern LLGLSLShader gObjectAlphaMaskNoColorProgram;
@@ -237,6 +249,7 @@ extern LLGLSLShader gDeferredPostGammaCorrectProgram;
extern LLGLSLShader gNoPostGammaCorrectProgram;
extern LLGLSLShader gLegacyPostGammaCorrectProgram;
extern LLGLSLShader gExposureProgram;
+extern LLGLSLShader gExposureProgramNoFade;
extern LLGLSLShader gLuminanceProgram;
extern LLGLSLShader gDeferredAvatarShadowProgram;
extern LLGLSLShader gDeferredAvatarAlphaShadowProgram;
@@ -253,6 +266,7 @@ extern LLGLSLShader gHUDFullbrightAlphaMaskAlphaProgram;
extern LLGLSLShader gDeferredEmissiveProgram;
extern LLGLSLShader gDeferredAvatarEyesProgram;
extern LLGLSLShader gDeferredAvatarAlphaProgram;
+extern LLGLSLShader gEnvironmentMapProgram;
extern LLGLSLShader gDeferredWLSkyProgram;
extern LLGLSLShader gDeferredWLCloudProgram;
extern LLGLSLShader gDeferredWLSunProgram;
@@ -272,4 +286,20 @@ extern LLGLSLShader gPBRGlowProgram;
extern LLGLSLShader gDeferredPBROpaqueProgram;
extern LLGLSLShader gDeferredPBRAlphaProgram;
extern LLGLSLShader gHUDPBRAlphaProgram;
+
+// Encodes detail level for dropping textures, in accordance with the GLTF spec where possible
+// 0 is highest detail, -1 drops emissive, etc
+// Dropping metallic roughness is off-spec - Reserve for potato machines as needed
+// https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#additional-textures
+enum TerrainPBRDetail : S32
+{
+ TERRAIN_PBR_DETAIL_MAX = 0,
+ TERRAIN_PBR_DETAIL_EMISSIVE = 0,
+ TERRAIN_PBR_DETAIL_OCCLUSION = -1,
+ TERRAIN_PBR_DETAIL_NORMAL = -2,
+ TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS = -3,
+ TERRAIN_PBR_DETAIL_BASE_COLOR = -4,
+ TERRAIN_PBR_DETAIL_MIN = -4,
+};
+extern LLGLSLShader gDeferredPBRTerrainProgram;
#endif
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 6ac94fe4c4..795b283009 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -337,7 +337,7 @@ void LLViewerStats::addToMessage(LLSD &body)
{
LLSD &misc = body["misc"];
- misc["Version"] = TRUE;
+ misc["Version"] = true;
//TODO RN: get last value, not mean
misc["Vertex Buffers Enabled"] = getRecording().getMean(LLStatViewer::ENABLE_VBO);
diff --git a/indra/newview/llviewertexlayer.cpp b/indra/newview/llviewertexlayer.cpp
index 4c2fbcf837..5d0bd7467c 100644
--- a/indra/newview/llviewertexlayer.cpp
+++ b/indra/newview/llviewertexlayer.cpp
@@ -52,11 +52,11 @@ LLViewerTexLayerSetBuffer::LLViewerTexLayerSetBuffer(LLTexLayerSet* const owner,
S32 width, S32 height) :
// ORDER_LAST => must render these after the hints are created.
LLTexLayerSetBuffer(owner),
- LLViewerDynamicTexture(width, height, 4, LLViewerDynamicTexture::ORDER_LAST, FALSE),
- mNeedsUpdate(TRUE),
+ LLViewerDynamicTexture(width, height, 4, LLViewerDynamicTexture::ORDER_LAST, false),
+ mNeedsUpdate(true),
mNumLowresUpdates(0)
{
- mGLTexturep->setNeedsAlphaAndPickMask(FALSE);
+ mGLTexturep->setNeedsAlphaAndPickMask(false);
LLViewerTexLayerSetBuffer::sGLByteCount += getSize();
mNeedsUpdateTimer.start();
@@ -99,7 +99,7 @@ void LLViewerTexLayerSetBuffer::dumpTotalByteCount()
void LLViewerTexLayerSetBuffer::requestUpdate()
{
restartUpdateTimer();
- mNeedsUpdate = TRUE;
+ mNeedsUpdate = true;
mNumLowresUpdates = 0;
}
@@ -110,30 +110,30 @@ void LLViewerTexLayerSetBuffer::restartUpdateTimer()
}
// virtual
-BOOL LLViewerTexLayerSetBuffer::needsRender()
+bool LLViewerTexLayerSetBuffer::needsRender()
{
llassert(mTexLayerSet->getAvatarAppearance() == gAgentAvatarp);
- if (!isAgentAvatarValid()) return FALSE;
+ if (!isAgentAvatarValid()) return false;
- const BOOL update_now = mNeedsUpdate && isReadyToUpdate();
+ const bool update_now = mNeedsUpdate && isReadyToUpdate();
// Don't render if we don't want to (or aren't ready to) update.
if (!update_now)
{
- return FALSE;
+ return false;
}
// Don't render if we're animating our appearance.
if (gAgentAvatarp->getIsAppearanceAnimating())
{
- return FALSE;
+ return false;
}
// Don't render if we are trying to create a skirt texture but aren't wearing a skirt.
if (gAgentAvatarp->getBakedTE(getViewerTexLayerSet()) == LLAvatarAppearanceDefines::TEX_SKIRT_BAKED &&
!gAgentAvatarp->isWearingWearableType(LLWearableType::WT_SKIRT))
{
- return FALSE;
+ return false;
}
// Render if we have at least minimal level of detail for each local texture.
@@ -146,11 +146,11 @@ void LLViewerTexLayerSetBuffer::preRenderTexLayerSet()
LLTexLayerSetBuffer::preRenderTexLayerSet();
// keep depth buffer, we don't need to clear it
- LLViewerDynamicTexture::preRender(FALSE);
+ LLViewerDynamicTexture::preRender(false);
}
// virtual
-void LLViewerTexLayerSetBuffer::postRenderTexLayerSet(BOOL success)
+void LLViewerTexLayerSetBuffer::postRenderTexLayerSet(bool success)
{
LLTexLayerSetBuffer::postRenderTexLayerSet(success);
@@ -158,9 +158,9 @@ void LLViewerTexLayerSetBuffer::postRenderTexLayerSet(BOOL success)
}
// virtual
-void LLViewerTexLayerSetBuffer::midRenderTexLayerSet(BOOL success)
+void LLViewerTexLayerSetBuffer::midRenderTexLayerSet(bool success)
{
- const BOOL update_now = mNeedsUpdate && isReadyToUpdate();
+ const bool update_now = mNeedsUpdate && isReadyToUpdate();
if (update_now)
{
doUpdate();
@@ -171,18 +171,18 @@ void LLViewerTexLayerSetBuffer::midRenderTexLayerSet(BOOL success)
mGLTexturep->setGLTextureCreated(true);
}
-BOOL LLViewerTexLayerSetBuffer::isInitialized(void) const
+bool LLViewerTexLayerSetBuffer::isInitialized(void) const
{
return mGLTexturep.notNull() && mGLTexturep->isGLTextureCreated();
}
-BOOL LLViewerTexLayerSetBuffer::isReadyToUpdate() const
+bool LLViewerTexLayerSetBuffer::isReadyToUpdate() const
{
// If we requested an update and have the final LOD ready, then update.
- if (getViewerTexLayerSet()->isLocalTextureDataFinal()) return TRUE;
+ if (getViewerTexLayerSet()->isLocalTextureDataFinal()) return true;
// If we haven't done an update yet, then just do one now regardless of state of textures.
- if (mNumLowresUpdates == 0) return TRUE;
+ if (mNumLowresUpdates == 0) return true;
// Update if we've hit a timeout. Unlike for uploads, we can make this timeout fairly small
// since render unnecessarily doesn't cost much.
@@ -190,22 +190,22 @@ BOOL LLViewerTexLayerSetBuffer::isReadyToUpdate() const
if (texture_timeout != 0)
{
// If we hit our timeout and have textures available at even lower resolution, then update.
- const BOOL is_update_textures_timeout = mNeedsUpdateTimer.getElapsedTimeF32() >= texture_timeout;
- const BOOL has_lower_lod = getViewerTexLayerSet()->isLocalTextureDataAvailable();
- if (has_lower_lod && is_update_textures_timeout) return TRUE;
+ const bool is_update_textures_timeout = mNeedsUpdateTimer.getElapsedTimeF32() >= texture_timeout;
+ const bool has_lower_lod = getViewerTexLayerSet()->isLocalTextureDataAvailable();
+ if (has_lower_lod && is_update_textures_timeout) return true;
}
- return FALSE;
+ return false;
}
-BOOL LLViewerTexLayerSetBuffer::requestUpdateImmediate()
+bool LLViewerTexLayerSetBuffer::requestUpdateImmediate()
{
- mNeedsUpdate = TRUE;
- BOOL result = FALSE;
+ mNeedsUpdate = true;
+ bool result = false;
if (needsRender())
{
- preRender(FALSE);
+ preRender(false);
result = render();
postRender(result);
}
@@ -218,10 +218,10 @@ BOOL LLViewerTexLayerSetBuffer::requestUpdateImmediate()
void LLViewerTexLayerSetBuffer::doUpdate()
{
LLViewerTexLayerSet* layer_set = getViewerTexLayerSet();
- const BOOL highest_lod = layer_set->isLocalTextureDataFinal();
+ const bool highest_lod = layer_set->isLocalTextureDataFinal();
if (highest_lod)
{
- mNeedsUpdate = FALSE;
+ mNeedsUpdate = false;
}
else
{
@@ -237,7 +237,7 @@ void LLViewerTexLayerSetBuffer::doUpdate()
// Print out notification that we updated this texture.
if (gSavedSettings.getBOOL("DebugAvatarRezTime"))
{
- const BOOL highest_lod = layer_set->isLocalTextureDataFinal();
+ const bool highest_lod = layer_set->isLocalTextureDataFinal();
const std::string lod_str = highest_lod ? "HighRes" : "LowRes";
LLSD args;
args["EXISTENCE"] = llformat("%d",(U32)layer_set->getAvatar()->debugGetExistenceTimeElapsedF32());
@@ -256,7 +256,7 @@ void LLViewerTexLayerSetBuffer::doUpdate()
LLViewerTexLayerSet::LLViewerTexLayerSet(LLAvatarAppearance* const appearance) :
LLTexLayerSet(appearance),
- mUpdatesEnabled( FALSE )
+ mUpdatesEnabled( false )
{
}
@@ -265,18 +265,18 @@ LLViewerTexLayerSet::~LLViewerTexLayerSet()
{
}
-// Returns TRUE if at least one packet of data has been received for each of the textures that this layerset depends on.
-BOOL LLViewerTexLayerSet::isLocalTextureDataAvailable() const
+// Returns true if at least one packet of data has been received for each of the textures that this layerset depends on.
+bool LLViewerTexLayerSet::isLocalTextureDataAvailable() const
{
- if (!mAvatarAppearance->isSelf()) return FALSE;
+ if (!mAvatarAppearance->isSelf()) return false;
return getAvatar()->isLocalTextureDataAvailable(this);
}
-// Returns TRUE if all of the data for the textures that this layerset depends on have arrived.
-BOOL LLViewerTexLayerSet::isLocalTextureDataFinal() const
+// Returns true if all of the data for the textures that this layerset depends on have arrived.
+bool LLViewerTexLayerSet::isLocalTextureDataFinal() const
{
- if (!mAvatarAppearance->isSelf()) return FALSE;
+ if (!mAvatarAppearance->isSelf()) return false;
return getAvatar()->isLocalTextureDataFinal(this);
}
@@ -312,7 +312,7 @@ void LLViewerTexLayerSet::createComposite()
}
}
-void LLViewerTexLayerSet::setUpdatesEnabled( BOOL b )
+void LLViewerTexLayerSet::setUpdatesEnabled( bool b )
{
mUpdatesEnabled = b;
}
@@ -342,7 +342,7 @@ const std::string LLViewerTexLayerSetBuffer::dumpTextureInfo() const
{
if (!isAgentAvatarValid()) return "";
- const BOOL is_high_res = TRUE;
+ const bool is_high_res = true;
const U32 num_low_res = 0;
const std::string local_texture_info = gAgentAvatarp->debugDumpLocalTextureDataInfo(getViewerTexLayerSet());
diff --git a/indra/newview/llviewertexlayer.h b/indra/newview/llviewertexlayer.h
index dec7f0ddfc..0365459ad9 100644
--- a/indra/newview/llviewertexlayer.h
+++ b/indra/newview/llviewertexlayer.h
@@ -47,12 +47,12 @@ public:
virtual ~LLViewerTexLayerSet();
/*virtual*/void requestUpdate();
- BOOL isLocalTextureDataAvailable() const;
- BOOL isLocalTextureDataFinal() const;
+ bool isLocalTextureDataAvailable() const;
+ bool isLocalTextureDataFinal() const;
void updateComposite();
/*virtual*/void createComposite();
- void setUpdatesEnabled(BOOL b);
- BOOL getUpdatesEnabled() const { return mUpdatesEnabled; }
+ void setUpdatesEnabled(bool b);
+ bool getUpdatesEnabled() const { return mUpdatesEnabled; }
LLVOAvatarSelf* getAvatar();
const LLVOAvatarSelf* getAvatar() const;
@@ -60,7 +60,7 @@ public:
const LLViewerTexLayerSetBuffer* getViewerComposite() const;
private:
- BOOL mUpdatesEnabled;
+ bool mUpdatesEnabled;
};
@@ -79,7 +79,7 @@ public:
public:
/*virtual*/ S8 getType() const;
- BOOL isInitialized(void) const;
+ bool isInitialized(void) const;
static void dumpTotalByteCount();
const std::string dumpTextureInfo() const;
virtual void restoreGLTexture();
@@ -95,8 +95,8 @@ private:
// Tex Layer Render
//--------------------------------------------------------------------
virtual void preRenderTexLayerSet();
- virtual void midRenderTexLayerSet(BOOL success);
- virtual void postRenderTexLayerSet(BOOL success);
+ virtual void midRenderTexLayerSet(bool success);
+ virtual void postRenderTexLayerSet(bool success);
virtual S32 getCompositeOriginX() const { return getOriginX(); }
virtual S32 getCompositeOriginY() const { return getOriginY(); }
virtual S32 getCompositeWidth() const { return getFullWidth(); }
@@ -106,25 +106,25 @@ private:
// Dynamic Texture Interface
//--------------------------------------------------------------------
public:
- /*virtual*/ BOOL needsRender();
+ /*virtual*/ bool needsRender();
protected:
// Pass these along for tex layer rendering.
- virtual void preRender(BOOL clear_depth) { preRenderTexLayerSet(); }
- virtual void postRender(BOOL success) { postRenderTexLayerSet(success); }
- virtual BOOL render() { return renderTexLayerSet(mBoundTarget); }
+ virtual void preRender(bool clear_depth) { preRenderTexLayerSet(); }
+ virtual void postRender(bool success) { postRenderTexLayerSet(success); }
+ virtual bool render() { return renderTexLayerSet(mBoundTarget); }
//--------------------------------------------------------------------
// Updates
//--------------------------------------------------------------------
public:
void requestUpdate();
- BOOL requestUpdateImmediate();
+ bool requestUpdateImmediate();
protected:
- BOOL isReadyToUpdate() const;
+ bool isReadyToUpdate() const;
void doUpdate();
void restartUpdateTimer();
private:
- BOOL mNeedsUpdate; // Whether we need to locally update our baked textures
+ bool mNeedsUpdate; // Whether we need to locally update our baked textures
U32 mNumLowresUpdates; // Number of times we've locally updated with lowres version of our baked textures
LLFrameTimer mNeedsUpdateTimer; // Tracks time since update was requested and performed.
};
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index fa6b6dc156..9109f49945 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -240,12 +240,12 @@ public:
/*virtual*/ bool canEdit() const { return false; }
- /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask)
+ /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask)
{
LLUI::getInstance()->getWindow()->setCursor(UI_CURSOR_HAND);
- return TRUE;
+ return true;
}
- virtual BOOL handleToolTip(S32 x, S32 y, MASK mask )
+ virtual bool handleToolTip(S32 x, S32 y, MASK mask )
{
if (mItem->getThumbnailUUID().notNull())
{
@@ -259,15 +259,15 @@ public:
.create_callback(boost::bind(&LLInspectTextureUtil::createInventoryToolTip, _1))
.create_params(params));
- return TRUE;
+ return true;
}
if (!mToolTip.empty())
{
LLToolTipMgr::instance().show(mToolTip);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/*virtual*/ LLStyleConstSP getStyle() const { return mStyle; }
@@ -305,10 +305,10 @@ public:
// return true if there are no embedded items.
bool empty();
- BOOL insertEmbeddedItem(LLInventoryItem* item, llwchar* value, bool is_new);
- BOOL removeEmbeddedItem( llwchar ext_char );
+ bool insertEmbeddedItem(LLInventoryItem* item, llwchar* value, bool is_new);
+ bool removeEmbeddedItem( llwchar ext_char );
- BOOL hasEmbeddedItem(llwchar ext_char); // returns TRUE if /this/ editor has an entry for this item
+ bool hasEmbeddedItem(llwchar ext_char); // returns true if /this/ editor has an entry for this item
LLUIImagePtr getItemImage(llwchar ext_char) const;
void getEmbeddedItemList( std::vector<LLPointer<LLInventoryItem> >& items );
@@ -323,14 +323,14 @@ public:
void markSaved();
static LLPointer<LLInventoryItem> getEmbeddedItemPtr(llwchar ext_char); // returns pointer to item from static list
- static BOOL getEmbeddedItemSaved(llwchar ext_char); // returns whether item from static list is saved
+ static bool getEmbeddedItemSaved(llwchar ext_char); // returns whether item from static list is saved
private:
struct embedded_info_t
{
LLPointer<LLInventoryItem> mItemPtr;
- BOOL mSaved;
+ bool mSaved;
};
typedef std::map<llwchar, embedded_info_t > item_map_t;
static item_map_t sEntries;
@@ -375,7 +375,7 @@ bool LLEmbeddedItems::empty()
}
// Inserts a new unique entry
-BOOL LLEmbeddedItems::insertEmbeddedItem( LLInventoryItem* item, llwchar* ext_char, bool is_new)
+bool LLEmbeddedItems::insertEmbeddedItem( LLInventoryItem* item, llwchar* ext_char, bool is_new)
{
// Now insert a new one
llwchar wc_emb;
@@ -395,20 +395,20 @@ BOOL LLEmbeddedItems::insertEmbeddedItem( LLInventoryItem* item, llwchar* ext_ch
wc_emb = last->first;
if (wc_emb >= LLTextEditor::LAST_EMBEDDED_CHAR)
{
- return FALSE;
+ return false;
}
++wc_emb;
}
sEntries[wc_emb].mItemPtr = item;
- sEntries[wc_emb].mSaved = is_new ? FALSE : TRUE;
+ sEntries[wc_emb].mSaved = is_new ? false : true;
*ext_char = wc_emb;
mEmbeddedUsedChars.insert(wc_emb);
- return TRUE;
+ return true;
}
// Removes an entry (all entries are unique)
-BOOL LLEmbeddedItems::removeEmbeddedItem( llwchar ext_char )
+bool LLEmbeddedItems::removeEmbeddedItem( llwchar ext_char )
{
mEmbeddedUsedChars.erase(ext_char);
item_map_t::iterator iter = sEntries.find(ext_char);
@@ -416,9 +416,9 @@ BOOL LLEmbeddedItems::removeEmbeddedItem( llwchar ext_char )
{
sEntries.erase(ext_char);
sFreeEntries.push(ext_char);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
// static
@@ -436,7 +436,7 @@ LLPointer<LLInventoryItem> LLEmbeddedItems::getEmbeddedItemPtr(llwchar ext_char)
}
// static
-BOOL LLEmbeddedItems::getEmbeddedItemSaved(llwchar ext_char)
+bool LLEmbeddedItems::getEmbeddedItemSaved(llwchar ext_char)
{
if( ext_char >= LLTextEditor::FIRST_EMBEDDED_CHAR && ext_char <= LLTextEditor::LAST_EMBEDDED_CHAR )
{
@@ -446,7 +446,7 @@ BOOL LLEmbeddedItems::getEmbeddedItemSaved(llwchar ext_char)
return iter->second.mSaved;
}
}
- return FALSE;
+ return false;
}
llwchar LLEmbeddedItems::getEmbeddedCharFromIndex(S32 index)
@@ -514,14 +514,14 @@ S32 LLEmbeddedItems::getIndexFromEmbeddedChar(llwchar wch)
}
}
-BOOL LLEmbeddedItems::hasEmbeddedItem(llwchar ext_char)
+bool LLEmbeddedItems::hasEmbeddedItem(llwchar ext_char)
{
std::set<llwchar>::iterator iter = mEmbeddedUsedChars.find(ext_char);
if (iter != mEmbeddedUsedChars.end())
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -606,7 +606,7 @@ void LLEmbeddedItems::markSaved()
for (std::set<llwchar>::iterator iter = mEmbeddedUsedChars.begin(); iter != mEmbeddedUsedChars.end(); ++iter)
{
llwchar wc = *iter;
- sEntries[wc].mSaved = TRUE;
+ sEntries[wc].mSaved = true;
}
}
@@ -616,13 +616,13 @@ class LLViewerTextEditor::TextCmdInsertEmbeddedItem : public LLTextBase::TextCmd
{
public:
TextCmdInsertEmbeddedItem( S32 pos, LLInventoryItem* item )
- : TextCmd(pos, FALSE),
+ : TextCmd(pos, false),
mExtCharValue(0)
{
mItem = item;
}
- virtual BOOL execute( LLTextBase* editor, S32* delta )
+ virtual bool execute( LLTextBase* editor, S32* delta )
{
LLViewerTextEditor* viewer_editor = (LLViewerTextEditor*)editor;
// Take this opportunity to remove any unused embedded items from this editor
@@ -634,7 +634,7 @@ public:
*delta = insert(editor, getPosition(), ws );
return (*delta != 0);
}
- return FALSE;
+ return false;
}
virtual S32 undo( LLTextBase* editor )
@@ -650,7 +650,7 @@ public:
insert(editor, getPosition(), ws );
return getPosition() + 1;
}
- virtual BOOL hasExtCharValue( llwchar value ) const
+ virtual bool hasExtCharValue( llwchar value ) const
{
return (value == mExtCharValue);
}
@@ -682,7 +682,7 @@ struct LLNotecardCopyInfo
LLViewerTextEditor::LLViewerTextEditor(const LLViewerTextEditor::Params& p)
: LLTextEditor(p),
mDragItemChar(0),
- mDragItemSaved(FALSE),
+ mDragItemSaved(false),
mInventoryCallback(new LLEmbeddedNotecardOpener)
{
mEmbeddedItemList = new LLEmbeddedItems(this);
@@ -707,14 +707,14 @@ void LLViewerTextEditor::makePristine()
LLTextEditor::makePristine();
}
-void LLViewerTextEditor::onVisibilityChange( BOOL new_visibility )
+void LLViewerTextEditor::onVisibilityChange( bool new_visibility )
{
LLUICtrl::onVisibilityChange(new_visibility);
}
-BOOL LLViewerTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLViewerTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
{
- BOOL handled = FALSE;
+ bool handled = false;
// Let scrollbar have first dibs
handled = LLView::childrenHandleMouseDown(x, y, mask) != NULL;
@@ -723,7 +723,7 @@ BOOL LLViewerTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
{
if( allowsEmbeddedItems() )
{
- setCursorAtLocalPos( x, y, FALSE );
+ setCursorAtLocalPos( x, y, false );
llwchar wc = 0;
if (mCursorPos < getLength())
{
@@ -745,10 +745,10 @@ BOOL LLViewerTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
if (hasTabStop())
{
- setFocus( TRUE );
+ setFocus( true );
}
- handled = TRUE;
+ handled = true;
}
else
{
@@ -766,9 +766,9 @@ BOOL LLViewerTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
}
-BOOL LLViewerTextEditor::handleHover(S32 x, S32 y, MASK mask)
+bool LLViewerTextEditor::handleHover(S32 x, S32 y, MASK mask)
{
- BOOL handled = LLTextEditor::handleHover(x, y, mask);
+ bool handled = LLTextEditor::handleHover(x, y, mask);
if(hasMouseCapture() && mDragItem)
{
@@ -788,16 +788,16 @@ BOOL LLViewerTextEditor::handleHover(S32 x, S32 y, MASK mask)
return LLToolDragAndDrop::getInstance()->handleHover( x, y, mask );
}
getWindow()->setCursor(UI_CURSOR_HAND);
- handled = TRUE;
+ handled = true;
}
return handled;
}
-BOOL LLViewerTextEditor::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLViewerTextEditor::handleMouseUp(S32 x, S32 y, MASK mask)
{
- BOOL handled = FALSE;
+ bool handled = false;
if( hasMouseCapture() )
{
@@ -826,9 +826,9 @@ BOOL LLViewerTextEditor::handleMouseUp(S32 x, S32 y, MASK mask)
return handled;
}
-BOOL LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask)
{
- BOOL handled = FALSE;
+ bool handled = false;
// let scrollbar have first dibs
handled = LLView::childrenHandleDoubleClick(x, y, mask) != NULL;
@@ -837,15 +837,15 @@ BOOL LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask)
{
if( allowsEmbeddedItems() )
{
- S32 doc_index = getDocIndexFromLocalCoord(x, y, FALSE);
+ S32 doc_index = getDocIndexFromLocalCoord(x, y, false);
llwchar doc_char = getWText()[doc_index];
if (mEmbeddedItemList->hasEmbeddedItem(doc_char))
{
if( openEmbeddedItemAtPos( doc_index ))
{
deselect();
- setFocus( FALSE );
- return TRUE;
+ setFocus( false );
+ return true;
}
}
}
@@ -856,19 +856,19 @@ BOOL LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask)
// virtual
-BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask,
- BOOL drop, EDragAndDropType cargo_type, void *cargo_data,
+bool LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask,
+ bool drop, EDragAndDropType cargo_type, void *cargo_data,
EAcceptance *accept,
std::string& tooltip_msg)
{
- BOOL handled = FALSE;
+ bool handled = false;
LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource();
if (LLToolDragAndDrop::SOURCE_NOTECARD == source)
{
// We currently do not handle dragging items from one notecard to another
// since items in a notecard must be in Inventory to be verified. See DEV-2891.
- return FALSE;
+ return false;
}
if (getEnabled() && acceptsTextInput())
@@ -918,10 +918,10 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask,
{
deselect();
S32 old_cursor = mCursorPos;
- setCursorAtLocalPos( x, y, TRUE );
+ setCursorAtLocalPos( x, y, true );
S32 insert_pos = mCursorPos;
setCursorPos(old_cursor);
- BOOL inserted = insertEmbeddedItem( insert_pos, item );
+ bool inserted = insertEmbeddedItem( insert_pos, item );
if( inserted && (old_cursor > mCursorPos) )
{
setCursorPos(mCursorPos + 1);
@@ -951,7 +951,7 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask,
*accept = ACCEPT_NO;
}
- handled = TRUE;
+ handled = true;
LL_DEBUGS("UserInput") << "dragAndDrop handled by LLViewerTextEditor " << getName() << LL_ENDL;
return handled;
@@ -1099,7 +1099,7 @@ void LLViewerTextEditor::findEmbeddedItemSegments(S32 start, S32 end)
}
}
-BOOL LLViewerTextEditor::openEmbeddedItemAtPos(S32 pos)
+bool LLViewerTextEditor::openEmbeddedItemAtPos(S32 pos)
{
if( pos < getLength())
{
@@ -1107,7 +1107,7 @@ BOOL LLViewerTextEditor::openEmbeddedItemAtPos(S32 pos)
LLPointer<LLInventoryItem> item = LLEmbeddedItems::getEmbeddedItemPtr( wc );
if( item )
{
- BOOL saved = LLEmbeddedItems::getEmbeddedItemSaved( wc );
+ bool saved = LLEmbeddedItems::getEmbeddedItemSaved( wc );
if (saved)
{
return openEmbeddedItem(item, wc);
@@ -1118,36 +1118,36 @@ BOOL LLViewerTextEditor::openEmbeddedItemAtPos(S32 pos)
}
}
}
- return FALSE;
+ return false;
}
-BOOL LLViewerTextEditor::openEmbeddedItem(LLPointer<LLInventoryItem> item, llwchar wc)
+bool LLViewerTextEditor::openEmbeddedItem(LLPointer<LLInventoryItem> item, llwchar wc)
{
switch( item->getType() )
{
case LLAssetType::AT_TEXTURE:
openEmbeddedTexture( item, wc );
- return TRUE;
+ return true;
case LLAssetType::AT_SOUND:
openEmbeddedSound( item, wc );
- return TRUE;
+ return true;
case LLAssetType::AT_LANDMARK:
openEmbeddedLandmark( item, wc );
- return TRUE;
+ return true;
case LLAssetType::AT_CALLINGCARD:
openEmbeddedCallingcard( item, wc );
- return TRUE;
+ return true;
case LLAssetType::AT_SETTINGS:
openEmbeddedSetting(item, wc);
- return TRUE;
+ return true;
case LLAssetType::AT_MATERIAL:
openEmbeddedGLTFMaterial(item, wc);
- return TRUE;
+ return true;
case LLAssetType::AT_NOTECARD:
case LLAssetType::AT_LSL_TEXT:
case LLAssetType::AT_CLOTHING:
@@ -1156,9 +1156,9 @@ BOOL LLViewerTextEditor::openEmbeddedItem(LLPointer<LLInventoryItem> item, llwch
case LLAssetType::AT_ANIMATION:
case LLAssetType::AT_GESTURE:
showCopyToInvDialog( item, wc );
- return TRUE;
+ return true;
default:
- return FALSE;
+ return false;
}
}
@@ -1254,7 +1254,7 @@ void LLViewerTextEditor::openEmbeddedGLTFMaterial(LLInventoryItem* item, llwchar
preview->setAuxItem(item);
preview->setNotecardInfo(mNotecardInventoryID, mObjectID);
preview->openFloater(floater_key);
- preview->setFocus(TRUE);
+ preview->setFocus(true);
}
}
@@ -1355,13 +1355,13 @@ bool LLViewerTextEditor::hasEmbeddedInventory()
////////////////////////////////////////////////////////////////////////////
-BOOL LLViewerTextEditor::importBuffer( const char* buffer, S32 length )
+bool LLViewerTextEditor::importBuffer( const char* buffer, S32 length )
{
LLMemoryStream str((U8*)buffer, length);
return importStream(str);
}
-BOOL LLViewerTextEditor::exportBuffer( std::string& buffer )
+bool LLViewerTextEditor::exportBuffer( std::string& buffer )
{
LLNotecard nc(LLNotecard::MAX_SIZE);
@@ -1378,6 +1378,6 @@ BOOL LLViewerTextEditor::exportBuffer( std::string& buffer )
buffer = out_stream.str();
- return TRUE;
+ return true;
}
diff --git a/indra/newview/llviewertexteditor.h b/indra/newview/llviewertexteditor.h
index 6170d476b8..7b004367b9 100644
--- a/indra/newview/llviewertexteditor.h
+++ b/indra/newview/llviewertexteditor.h
@@ -47,22 +47,22 @@ public:
virtual void makePristine();
- /*virtual*/ void onVisibilityChange( BOOL new_visibility );
+ /*virtual*/ void onVisibilityChange( bool new_visibility );
// mousehandler overrides
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- virtual BOOL handleHover(S32 x, S32 y, MASK mask);
- virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask );
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask);
+ virtual bool handleHover(S32 x, S32 y, MASK mask);
+ virtual bool handleDoubleClick(S32 x, S32 y, MASK mask );
- virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask,
- BOOL drop, EDragAndDropType cargo_type,
+ virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask,
+ bool drop, EDragAndDropType cargo_type,
void *cargo_data, EAcceptance *accept, std::string& tooltip_msg);
const class LLInventoryItem* getDragItem() const { return mDragItem; }
- virtual BOOL importBuffer(const char* buffer, S32 length);
+ virtual bool importBuffer(const char* buffer, S32 length);
virtual bool importStream(std::istream& str);
- virtual BOOL exportBuffer(std::string& buffer);
+ virtual bool exportBuffer(std::string& buffer);
virtual void onValueChange(S32 start, S32 end);
void setNotecardInfo(const LLUUID& notecard_item_id, const LLUUID& object_id, const LLUUID& preview_id)
@@ -95,8 +95,8 @@ private:
void findEmbeddedItemSegments(S32 start, S32 end);
virtual llwchar pasteEmbeddedItem(llwchar ext_char);
- BOOL openEmbeddedItemAtPos( S32 pos );
- BOOL openEmbeddedItem(LLPointer<LLInventoryItem> item, llwchar wc);
+ bool openEmbeddedItemAtPos( S32 pos );
+ bool openEmbeddedItem(LLPointer<LLInventoryItem> item, llwchar wc);
S32 insertEmbeddedItem(S32 pos, LLInventoryItem* item);
@@ -118,7 +118,7 @@ private:
LLPointer<LLInventoryItem> mDragItem;
LLTextSegment* mDragSegment;
llwchar mDragItemChar;
- BOOL mDragItemSaved;
+ bool mDragItemSaved;
class LLEmbeddedItems* mEmbeddedItemList;
LLUUID mObjectID;
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 04ef441a69..ff1149e496 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -100,6 +100,9 @@ U32 LLViewerTexture::sMaxSmallImageSize = MAX_CACHED_RAW_IMAGE_AREA;
bool LLViewerTexture::sFreezeImageUpdates = false;
F32 LLViewerTexture::sCurrentTime = 0.0f;
+constexpr F32 MIN_VRAM_BUDGET = 768.f;
+F32 LLViewerTexture::sFreeVRAMMegabytes = MIN_VRAM_BUDGET;
+
LLViewerTexture::EDebugTexels LLViewerTexture::sDebugTexelsMode = LLViewerTexture::DEBUG_TEXELS_OFF;
const F64 log_2 = log(2.0);
@@ -116,11 +119,11 @@ const U32 DESIRED_NORMAL_TEXTURE_SIZE = (U32)LLViewerFetchedTexture::MAX_IMAGE_S
LLLoadedCallbackEntry::LLLoadedCallbackEntry(loaded_callback_func cb,
S32 discard_level,
- BOOL need_imageraw, // Needs image raw for the callback
+ bool need_imageraw, // Needs image raw for the callback
void* userdata,
LLLoadedCallbackEntry::source_callback_list_t* src_callback_list,
LLViewerFetchedTexture* target,
- BOOL pause)
+ bool pause)
: mCallback(cb),
mLastUsedDiscard(MAX_DISCARD_LEVEL+1),
mDesiredDiscard(discard_level),
@@ -141,7 +144,7 @@ LLLoadedCallbackEntry::~LLLoadedCallbackEntry()
void LLLoadedCallbackEntry::removeTexture(LLViewerFetchedTexture* tex)
{
- if(mSourceCallbackList)
+ if (mSourceCallbackList && tex)
{
mSourceCallbackList->erase(LLTextureKey(tex->getID(), (ETexListType)tex->getTextureListType()));
}
@@ -166,7 +169,7 @@ void LLLoadedCallbackEntry::cleanUpCallbackList(LLLoadedCallbackEntry::source_ca
}
}
-LLViewerMediaTexture* LLViewerTextureManager::createMediaTexture(const LLUUID &media_id, BOOL usemipmaps, LLImageGL* gl_image)
+LLViewerMediaTexture* LLViewerTextureManager::createMediaTexture(const LLUUID &media_id, bool usemipmaps, LLImageGL* gl_image)
{
return new LLViewerMediaTexture(media_id, usemipmaps, gl_image);
}
@@ -212,7 +215,7 @@ LLViewerMediaTexture* LLViewerTextureManager::findMediaTexture(const LLUUID &med
return LLViewerMediaTexture::findMediaTexture(media_id);
}
-LLViewerMediaTexture* LLViewerTextureManager::getMediaTexture(const LLUUID& id, BOOL usemipmaps, LLImageGL* gl_image)
+LLViewerMediaTexture* LLViewerTextureManager::getMediaTexture(const LLUUID& id, bool usemipmaps, LLImageGL* gl_image)
{
LLViewerMediaTexture* tex = LLViewerMediaTexture::findMediaTexture(id);
if(!tex)
@@ -225,7 +228,7 @@ LLViewerMediaTexture* LLViewerTextureManager::getMediaTexture(const LLUUID& id,
return tex;
}
-LLViewerFetchedTexture* LLViewerTextureManager::staticCastToFetchedTexture(LLTexture* tex, BOOL report_error)
+LLViewerFetchedTexture* LLViewerTextureManager::staticCastToFetchedTexture(LLTexture* tex, bool report_error)
{
if(!tex)
{
@@ -246,7 +249,7 @@ LLViewerFetchedTexture* LLViewerTextureManager::staticCastToFetchedTexture(LLTex
return NULL;
}
-LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(BOOL usemipmaps, BOOL generate_gl_tex)
+LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(bool usemipmaps, bool generate_gl_tex)
{
LLPointer<LLViewerTexture> tex = new LLViewerTexture(usemipmaps);
if(generate_gl_tex)
@@ -256,7 +259,7 @@ LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(BOOL usemipma
}
return tex;
}
-LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(const LLUUID& id, BOOL usemipmaps, BOOL generate_gl_tex)
+LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(const LLUUID& id, bool usemipmaps, bool generate_gl_tex)
{
LLPointer<LLViewerTexture> tex = new LLViewerTexture(id, usemipmaps);
if(generate_gl_tex)
@@ -266,13 +269,13 @@ LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(const LLUUID&
}
return tex;
}
-LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(const LLImageRaw* raw, BOOL usemipmaps)
+LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(const LLImageRaw* raw, bool usemipmaps)
{
LLPointer<LLViewerTexture> tex = new LLViewerTexture(raw, usemipmaps);
tex->setCategory(LLGLTexture::LOCAL);
return tex;
}
-LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps, BOOL generate_gl_tex)
+LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(const U32 width, const U32 height, const U8 components, bool usemipmaps, bool generate_gl_tex)
{
LLPointer<LLViewerTexture> tex = new LLViewerTexture(width, height, components, usemipmaps);
if(generate_gl_tex)
@@ -285,6 +288,7 @@ LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(const U32 wid
LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture(const LLImageRaw* raw, FTType type, bool usemipmaps)
{
+ LLImageDataSharedLock lock(raw);
LLViewerFetchedTexture* ret = new LLViewerFetchedTexture(raw, type, usemipmaps);
gTextureList.addImage(ret, TEX_LIST_STANDARD);
return ret;
@@ -293,7 +297,7 @@ LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture(const LLImageR
LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture(
const LLUUID &image_id,
FTType f_type,
- BOOL usemipmaps,
+ bool usemipmaps,
LLViewerTexture::EBoostLevel boost_priority,
S8 texture_type,
LLGLint internal_format,
@@ -306,7 +310,7 @@ LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture(
LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromFile(
const std::string& filename,
FTType f_type,
- BOOL usemipmaps,
+ bool usemipmaps,
LLViewerTexture::EBoostLevel boost_priority,
S8 texture_type,
LLGLint internal_format,
@@ -319,7 +323,7 @@ LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromFile(
//static
LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromUrl(const std::string& url,
FTType f_type,
- BOOL usemipmaps,
+ bool usemipmaps,
LLViewerTexture::EBoostLevel boost_priority,
S8 texture_type,
LLGLint internal_format,
@@ -338,12 +342,12 @@ LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromHost(const
// Create a bridge to the viewer texture manager.
class LLViewerTextureManagerBridge : public LLTextureManagerBridge
{
- /*virtual*/ LLPointer<LLGLTexture> getLocalTexture(BOOL usemipmaps = TRUE, BOOL generate_gl_tex = TRUE)
+ /*virtual*/ LLPointer<LLGLTexture> getLocalTexture(bool usemipmaps = true, bool generate_gl_tex = true)
{
return LLViewerTextureManager::getLocalTexture(usemipmaps, generate_gl_tex);
}
- /*virtual*/ LLPointer<LLGLTexture> getLocalTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps, BOOL generate_gl_tex = TRUE)
+ /*virtual*/ LLPointer<LLGLTexture> getLocalTexture(const U32 width, const U32 height, const U8 components, bool usemipmaps, bool generate_gl_tex = true)
{
return LLViewerTextureManager::getLocalTexture(width, height, components, usemipmaps, generate_gl_tex);
}
@@ -360,7 +364,7 @@ void LLViewerTextureManager::init()
{
LLPointer<LLImageRaw> raw = new LLImageRaw(1,1,3);
raw->clear(0x77, 0x77, 0x77, 0xFF);
- LLViewerTexture::sNullImagep = LLViewerTextureManager::getLocalTexture(raw.get(), TRUE);
+ LLViewerTexture::sNullImagep = LLViewerTextureManager::getLocalTexture(raw.get(), true);
}
const S32 dim = 128;
@@ -368,7 +372,7 @@ void LLViewerTextureManager::init()
U8* data = image_raw->getData();
memset(data, 0, dim * dim * 3);
- LLViewerTexture::sBlackImagep = LLViewerTextureManager::getLocalTexture(image_raw.get(), TRUE);
+ LLViewerTexture::sBlackImagep = LLViewerTextureManager::getLocalTexture(image_raw.get(), true);
#if 1
LLPointer<LLViewerFetchedTexture> imagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT);
@@ -400,7 +404,7 @@ void LLViewerTextureManager::init()
imagep->setCachedRawImage(0, image_raw);
image_raw = NULL;
#else
- LLViewerFetchedTexture::sDefaultImagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
+ LLViewerFetchedTexture::sDefaultImagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, true, LLGLTexture::BOOST_UI);
#endif
LLViewerFetchedTexture::sDefaultImagep->dontDiscard();
LLViewerFetchedTexture::sDefaultImagep->setCategory(LLGLTexture::OTHER);
@@ -418,7 +422,7 @@ void LLViewerTextureManager::init()
data[i+2] = color;
}
- LLViewerTexture::sCheckerBoardImagep = LLViewerTextureManager::getLocalTexture(image_raw.get(), TRUE);
+ LLViewerTexture::sCheckerBoardImagep = LLViewerTextureManager::getLocalTexture(image_raw.get(), true);
LLViewerTexture::initClass();
@@ -508,7 +512,10 @@ void LLViewerTexture::getGPUMemoryForTextures(S32Megabytes &gpu, S32Megabytes &p
timer.reset();
{
- gpu_res = (S32Megabytes)gViewerWindow->getWindow()->getAvailableVRAMMegabytes();
+ // For purposes of texture memory need to check both, actual free
+ // memory and estimated free texture memory from bias calculations
+ U32 free_memory = llmin(gViewerWindow->getWindow()->getAvailableVRAMMegabytes(), (U32)sFreeVRAMMegabytes);
+ gpu_res = (S32Megabytes)free_memory;
//check main memory, only works for windows and macos.
LLMemory::updateMemoryInfo();
@@ -545,7 +552,8 @@ void LLViewerTexture::updateClass()
F32 budget = max_vram_budget == 0 ? gGLManager.mVRAM : max_vram_budget;
// try to leave half a GB for everyone else, but keep at least 768MB for ourselves
- F32 target = llmax(budget - 512.f, 768.f);
+ F32 target = llmax(budget - 512.f, MIN_VRAM_BUDGET);
+ sFreeVRAMMegabytes = target - used;
F32 over_pct = llmax((used-target) / target, 0.f);
sDesiredDiscardBias = llmax(sDesiredDiscardBias, 1.f + over_pct);
@@ -562,7 +570,7 @@ void LLViewerTexture::updateClass()
//-------------------------------------------------------------------------------------------
const U32 LLViewerTexture::sCurrentFileVersion = 1;
-LLViewerTexture::LLViewerTexture(BOOL usemipmaps) :
+LLViewerTexture::LLViewerTexture(bool usemipmaps) :
LLGLTexture(usemipmaps)
{
init(true);
@@ -571,7 +579,7 @@ LLViewerTexture::LLViewerTexture(BOOL usemipmaps) :
sImageCount++;
}
-LLViewerTexture::LLViewerTexture(const LLUUID& id, BOOL usemipmaps) :
+LLViewerTexture::LLViewerTexture(const LLUUID& id, bool usemipmaps) :
LLGLTexture(usemipmaps),
mID(id)
{
@@ -580,7 +588,7 @@ LLViewerTexture::LLViewerTexture(const LLUUID& id, BOOL usemipmaps) :
sImageCount++;
}
-LLViewerTexture::LLViewerTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps) :
+LLViewerTexture::LLViewerTexture(const U32 width, const U32 height, const U8 components, bool usemipmaps) :
LLGLTexture(width, height, components, usemipmaps)
{
init(true);
@@ -589,7 +597,7 @@ LLViewerTexture::LLViewerTexture(const U32 width, const U32 height, const U8 com
sImageCount++;
}
-LLViewerTexture::LLViewerTexture(const LLImageRaw* raw, BOOL usemipmaps) :
+LLViewerTexture::LLViewerTexture(const LLImageRaw* raw, bool usemipmaps) :
LLGLTexture(raw, usemipmaps)
{
init(true);
@@ -737,9 +745,9 @@ bool LLViewerTexture::bindDefaultImage(S32 stage)
}
//virtual
-BOOL LLViewerTexture::isMissingAsset()const
+bool LLViewerTexture::isMissingAsset()const
{
- return FALSE;
+ return false;
}
//virtual
@@ -747,12 +755,12 @@ void LLViewerTexture::forceImmediateUpdate()
{
}
-void LLViewerTexture::addTextureStats(F32 virtual_size, BOOL needs_gltexture) const
+void LLViewerTexture::addTextureStats(F32 virtual_size, bool needs_gltexture) const
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if(needs_gltexture)
{
- mNeedsGLTexture = TRUE;
+ mNeedsGLTexture = true;
}
virtual_size = llmin(virtual_size, LLViewerFetchedTexture::sMaxVirtualSize);
@@ -940,7 +948,7 @@ void LLViewerTexture::setCachedRawImage(S32 discard_level, LLImageRaw* imageraw)
//nothing here.
}
-BOOL LLViewerTexture::isLargeImage()
+bool LLViewerTexture::isLargeImage()
{
return (S32)mTexelsPerImage > LLViewerTexture::sMinLargeImageSize;
}
@@ -997,11 +1005,11 @@ LLViewerFetchedTexture* LLViewerFetchedTexture::getSmokeImage()
return sSmokeImagep;
}
-LLViewerFetchedTexture::LLViewerFetchedTexture(const LLUUID& id, FTType f_type, const LLHost& host, BOOL usemipmaps)
+LLViewerFetchedTexture::LLViewerFetchedTexture(const LLUUID& id, FTType f_type, const LLHost& host, bool usemipmaps)
: LLViewerTexture(id, usemipmaps),
mTargetHost(host)
{
- init(TRUE);
+ init(true);
mFTType = f_type;
if (mFTType == FTT_HOST_BAKE)
{
@@ -1010,18 +1018,18 @@ LLViewerFetchedTexture::LLViewerFetchedTexture(const LLUUID& id, FTType f_type,
generateGLTexture();
}
-LLViewerFetchedTexture::LLViewerFetchedTexture(const LLImageRaw* raw, FTType f_type, BOOL usemipmaps)
+LLViewerFetchedTexture::LLViewerFetchedTexture(const LLImageRaw* raw, FTType f_type, bool usemipmaps)
: LLViewerTexture(raw, usemipmaps)
{
- init(TRUE);
+ init(true);
mFTType = f_type;
}
-LLViewerFetchedTexture::LLViewerFetchedTexture(const std::string& url, FTType f_type, const LLUUID& id, BOOL usemipmaps)
+LLViewerFetchedTexture::LLViewerFetchedTexture(const std::string& url, FTType f_type, const LLUUID& id, bool usemipmaps)
: LLViewerTexture(id, usemipmaps),
mUrl(url)
{
- init(TRUE);
+ init(true);
mFTType = f_type;
generateGLTexture();
}
@@ -1030,20 +1038,20 @@ void LLViewerFetchedTexture::init(bool firstinit)
{
mOrigWidth = 0;
mOrigHeight = 0;
- mHasAux = FALSE;
- mNeedsAux = FALSE;
+ mHasAux = false;
+ mNeedsAux = false;
mRequestedDiscardLevel = -1;
mRequestedDownloadPriority = 0.f;
- mFullyLoaded = FALSE;
+ mFullyLoaded = false;
mCanUseHTTP = true;
mDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1;
mMinDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1;
- mDecodingAux = FALSE;
+ mDecodingAux = false;
mKnownDrawWidth = 0;
mKnownDrawHeight = 0;
- mKnownDrawSizeChanged = FALSE;
+ mKnownDrawSizeChanged = false;
if (firstinit)
{
@@ -1052,43 +1060,43 @@ void LLViewerFetchedTexture::init(bool firstinit)
// Only set mIsMissingAsset true when we know for certain that the database
// does not contain this image.
- mIsMissingAsset = FALSE;
+ mIsMissingAsset = false;
mLoadedCallbackDesiredDiscardLevel = S8_MAX;
- mPauseLoadedCallBacks = FALSE;
+ mPauseLoadedCallBacks = false;
mNeedsCreateTexture = false;
- mIsRawImageValid = FALSE;
+ mIsRawImageValid = false;
mRawDiscardLevel = INVALID_DISCARD_LEVEL;
mMinDiscardLevel = 0;
- mHasFetcher = FALSE;
- mIsFetching = FALSE;
+ mHasFetcher = false;
+ mIsFetching = false;
mFetchState = 0;
mFetchPriority = 0;
mDownloadProgress = 0.f;
mFetchDeltaTime = 999999.f;
mRequestDeltaTime = 0.f;
- mForSculpt = FALSE;
- mIsFetched = FALSE;
- mInFastCacheList = FALSE;
+ mForSculpt = false;
+ mIsFetched = false;
+ mInFastCacheList = false;
mCachedRawImage = NULL;
mCachedRawDiscardLevel = -1;
- mCachedRawImageReady = FALSE;
+ mCachedRawImageReady = false;
mSavedRawImage = NULL;
- mForceToSaveRawImage = FALSE;
- mSaveRawImage = FALSE;
+ mForceToSaveRawImage = false;
+ mSaveRawImage = false;
mSavedRawDiscardLevel = -1;
mDesiredSavedRawDiscardLevel = -1;
mLastReferencedSavedRawImageTime = 0.0f;
mKeptSavedRawImageTime = 0.f;
mLastCallBackActiveTime = 0.f;
- mForceCallbackFetch = FALSE;
- mInDebug = FALSE;
- mUnremovable = FALSE;
+ mForceCallbackFetch = false;
+ mInDebug = false;
+ mUnremovable = false;
mFTType = FTT_UNKNOWN;
}
@@ -1126,18 +1134,18 @@ void LLViewerFetchedTexture::cleanup()
LLLoadedCallbackEntry *entryp = *iter++;
// We never finished loading the image. Indicate failure.
// Note: this allows mLoadedCallbackUserData to be cleaned up.
- entryp->mCallback( FALSE, this, NULL, NULL, 0, TRUE, entryp->mUserData );
+ entryp->mCallback( false, this, NULL, NULL, 0, true, entryp->mUserData );
entryp->removeTexture(this);
delete entryp;
}
mLoadedCallbackList.clear();
- mNeedsAux = FALSE;
+ mNeedsAux = false;
// Clean up image data
destroyRawImage();
mCachedRawImage = NULL;
mCachedRawDiscardLevel = -1;
- mCachedRawImageReady = FALSE;
+ mCachedRawImageReady = false;
mSavedRawImage = NULL;
mSavedRawDiscardLevel = -1;
}
@@ -1150,7 +1158,7 @@ void LLViewerFetchedTexture::loadFromFastCache()
{
return; //no need to access the fast cache.
}
- mInFastCacheList = FALSE;
+ mInFastCacheList = false;
add(LLTextureFetch::sCacheAttempt, 1.0);
@@ -1203,7 +1211,7 @@ void LLViewerFetchedTexture::loadFromFastCache()
}
mRequestedDiscardLevel = mDesiredDiscardLevel + 1;
- mIsRawImageValid = TRUE;
+ mIsRawImageValid = true;
addToCreateTexture();
}
}
@@ -1217,7 +1225,7 @@ void LLViewerFetchedTexture::setForSculpt()
{
static const S32 MAX_INTERVAL = 8; //frames
- mForSculpt = TRUE;
+ mForSculpt = true;
if(isForSculptOnly() && hasGLTexture() && !getBoundRecently())
{
destroyGLTexture(); //sculpt image does not need gl texture.
@@ -1227,22 +1235,22 @@ void LLViewerFetchedTexture::setForSculpt()
setMaxVirtualSizeResetInterval(MAX_INTERVAL);
}
-BOOL LLViewerFetchedTexture::isForSculptOnly() const
+bool LLViewerFetchedTexture::isForSculptOnly() const
{
return mForSculpt && !mNeedsGLTexture;
}
-BOOL LLViewerFetchedTexture::isDeleted()
+bool LLViewerFetchedTexture::isDeleted()
{
return mTextureState == DELETED;
}
-BOOL LLViewerFetchedTexture::isInactive()
+bool LLViewerFetchedTexture::isInactive()
{
return mTextureState == INACTIVE;
}
-BOOL LLViewerFetchedTexture::isDeletionCandidate()
+bool LLViewerFetchedTexture::isDeletionCandidate()
{
return mTextureState == DELETION_CANDIDATE;
}
@@ -1264,7 +1272,7 @@ void LLViewerFetchedTexture::setInactive()
}
}
-BOOL LLViewerFetchedTexture::isFullyLoaded() const
+bool LLViewerFetchedTexture::isFullyLoaded() const
{
// Unfortunately, the boolean "mFullyLoaded" is never updated correctly so we use that logic
// to check if the texture is there and completely downloaded
@@ -1311,7 +1319,7 @@ void LLViewerFetchedTexture::destroyTexture()
//LL_DEBUGS("Avatar") << mID << LL_ENDL;
destroyGLTexture();
- mFullyLoaded = FALSE;
+ mFullyLoaded = false;
}
void LLViewerFetchedTexture::addToCreateTexture()
@@ -1337,7 +1345,7 @@ void LLViewerFetchedTexture::addToCreateTexture()
}
//discard the cached raw image and the saved raw image
- mCachedRawImageReady = FALSE;
+ mCachedRawImageReady = false;
mCachedRawDiscardLevel = -1;
mCachedRawImage = NULL;
mSavedRawDiscardLevel = -1;
@@ -1347,7 +1355,7 @@ void LLViewerFetchedTexture::addToCreateTexture()
if(isForSculptOnly())
{
//just update some variables, not to create a real GL texture.
- createGLTexture(mRawDiscardLevel, mRawImage, 0, FALSE);
+ createGLTexture(mRawDiscardLevel, mRawImage, 0, false);
mNeedsCreateTexture = false;
destroyRawImage();
}
@@ -1409,7 +1417,7 @@ void LLViewerFetchedTexture::addToCreateTexture()
}
// ONLY called from LLViewerTextureList
-BOOL LLViewerFetchedTexture::preCreateTexture(S32 usename/*= 0*/)
+bool LLViewerFetchedTexture::preCreateTexture(S32 usename/*= 0*/)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
#if LL_IMAGEGL_THREAD_CHECK
@@ -1419,7 +1427,7 @@ BOOL LLViewerFetchedTexture::preCreateTexture(S32 usename/*= 0*/)
if (!mNeedsCreateTexture)
{
destroyRawImage();
- return FALSE;
+ return false;
}
mNeedsCreateTexture = false;
@@ -1431,13 +1439,13 @@ BOOL LLViewerFetchedTexture::preCreateTexture(S32 usename/*= 0*/)
{
LL_WARNS() << "Can't create a texture: invalid image data" << LL_ENDL;
destroyRawImage();
- return FALSE;
+ return false;
}
// LL_INFOS() << llformat("IMAGE Creating (%d) [%d x %d] Bytes: %d ",
// mRawDiscardLevel,
// mRawImage->getWidth(), mRawImage->getHeight(),mRawImage->getDataSize())
// << mID.getString() << LL_ENDL;
- BOOL res = TRUE;
+ bool res = true;
// store original size only for locally-sourced images
if (mUrl.compare(0, 7, "file://") == 0)
@@ -1453,7 +1461,7 @@ BOOL LLViewerFetchedTexture::preCreateTexture(S32 usename/*= 0*/)
}
else
{ // leave black border, do not scale image content
- mRawImage->expandToPowerOfTwo(MAX_IMAGE_SIZE, FALSE);
+ mRawImage->expandToPowerOfTwo(MAX_IMAGE_SIZE, false);
}
mFullWidth = mRawImage->getWidth();
@@ -1499,7 +1507,7 @@ BOOL LLViewerFetchedTexture::preCreateTexture(S32 usename/*= 0*/)
LL_WARNS() << "!size_ok, setting as missing" << LL_ENDL;
setIsMissingAsset();
destroyRawImage();
- return FALSE;
+ return false;
}
if (mGLTexturep->getHasExplicitFormat())
@@ -1518,21 +1526,21 @@ BOOL LLViewerFetchedTexture::preCreateTexture(S32 usename/*= 0*/)
setIsMissingAsset();
destroyRawImage();
LLAppViewer::getTextureCache()->removeFromCache(mID);
- return FALSE;
+ return false;
}
}
return res;
}
-BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/)
+bool LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/)
{
if (!mNeedsCreateTexture)
{
- return FALSE;
+ return false;
}
- BOOL res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename, TRUE, mBoostLevel);
+ bool res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename, true, mBoostLevel);
return res;
}
@@ -1552,7 +1560,7 @@ void LLViewerFetchedTexture::postCreateTexture()
if (!needsToSaveRawImage())
{
- mNeedsAux = FALSE;
+ mNeedsAux = false;
destroyRawImage();
}
@@ -1645,8 +1653,8 @@ void LLViewerFetchedTexture::setKnownDrawSize(S32 width, S32 height)
mKnownDrawWidth = llmax(mKnownDrawWidth, width);
mKnownDrawHeight = llmax(mKnownDrawHeight, height);
- mKnownDrawSizeChanged = TRUE;
- mFullyLoaded = FALSE;
+ mKnownDrawSizeChanged = true;
+ mFullyLoaded = false;
}
addTextureStats((F32)(mKnownDrawWidth * mKnownDrawHeight));
}
@@ -1681,7 +1689,7 @@ void LLViewerFetchedTexture::processTextureStats()
if(mDesiredDiscardLevel > mMinDesiredDiscardLevel)//need to load more
{
mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, mMinDesiredDiscardLevel);
- mFullyLoaded = FALSE;
+ mFullyLoaded = false;
}
//setDebugText("fully loaded");
}
@@ -1699,7 +1707,7 @@ void LLViewerFetchedTexture::processTextureStats()
{
if (mFullWidth > MAX_IMAGE_SIZE_DEFAULT || mFullHeight > MAX_IMAGE_SIZE_DEFAULT)
{
- mDesiredDiscardLevel = 1; // MAX_IMAGE_SIZE_DEFAULT = 1024 and max size ever is 2048
+ mDesiredDiscardLevel = 1; // MAX_IMAGE_SIZE_DEFAULT = 2048 and max size ever is 4096
}
else
{
@@ -1712,7 +1720,7 @@ void LLViewerFetchedTexture::processTextureStats()
}
else
{
- U32 desired_size = MAX_IMAGE_SIZE_DEFAULT; // MAX_IMAGE_SIZE_DEFAULT = 1024 and max size ever is 2048
+ U32 desired_size = MAX_IMAGE_SIZE_DEFAULT; // MAX_IMAGE_SIZE_DEFAULT = 2048 and max size ever is 4096
if(!mKnownDrawWidth || !mKnownDrawHeight || mFullWidth <= mKnownDrawWidth || mFullHeight <= mKnownDrawHeight)
{
if (mFullWidth > desired_size || mFullHeight > desired_size)
@@ -1731,11 +1739,11 @@ void LLViewerFetchedTexture::processTextureStats()
mDesiredDiscardLevel = llclamp(mDesiredDiscardLevel, (S8)0, (S8)getMaxDiscardLevel());
mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, mMinDesiredDiscardLevel);
}
- mKnownDrawSizeChanged = FALSE;
+ mKnownDrawSizeChanged = false;
if(getDiscardLevel() >= 0 && (getDiscardLevel() <= mDesiredDiscardLevel))
{
- mFullyLoaded = TRUE;
+ mFullyLoaded = true;
}
}
}
@@ -1745,7 +1753,7 @@ void LLViewerFetchedTexture::processTextureStats()
mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, (S8)mDesiredSavedRawDiscardLevel);
if(getDiscardLevel() < 0 || getDiscardLevel() > mDesiredDiscardLevel)
{
- mFullyLoaded = FALSE;
+ mFullyLoaded = false;
}
}
}
@@ -1781,10 +1789,10 @@ bool LLViewerFetchedTexture::setDebugFetching(S32 debug_level)
{
if(debug_level < 0)
{
- mInDebug = FALSE;
+ mInDebug = false;
return false;
}
- mInDebug = TRUE;
+ mInDebug = true;
mDesiredDiscardLevel = debug_level;
@@ -1877,12 +1885,12 @@ bool LLViewerFetchedTexture::updateFetch()
if (mRawImage.notNull()) sRawCount++;
if (mAuxRawImage.notNull())
{
- mHasAux = TRUE;
+ mHasAux = true;
sAuxCount++;
}
if (finished)
{
- mIsFetching = FALSE;
+ mIsFetching = false;
mLastFetchState = -1;
mLastPacketTimer.reset();
}
@@ -1899,7 +1907,7 @@ bool LLViewerFetchedTexture::updateFetch()
LLTexturePipelineTester* tester = (LLTexturePipelineTester*)LLMetricPerformanceTesterBasic::getTester(sTesterName);
if (tester)
{
- mIsFetched = TRUE;
+ mIsFetched = true;
tester->updateTextureLoadingStats(this, mRawImage, LLAppViewer::getTextureFetch()->isFromLocalCache(mID));
}
mRawDiscardLevel = fetch_discard;
@@ -1918,12 +1926,12 @@ bool LLViewerFetchedTexture::updateFetch()
LL_WARNS() << "oversize, setting as missing" << LL_ENDL;
setIsMissingAsset();
mRawDiscardLevel = INVALID_DISCARD_LEVEL;
- mIsFetching = FALSE;
+ mIsFetching = false;
mLastPacketTimer.reset();
}
else
{
- mIsRawImageValid = TRUE;
+ mIsRawImageValid = true;
addToCreateTexture();
}
@@ -1951,7 +1959,7 @@ bool LLViewerFetchedTexture::updateFetch()
}
}
- return TRUE;
+ return true;
}
else
{
@@ -2095,8 +2103,8 @@ bool LLViewerFetchedTexture::updateFetch()
if (fetch_request_discard >= 0)
{
LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("vftuf - request created");
- mHasFetcher = TRUE;
- mIsFetching = TRUE;
+ mHasFetcher = true;
+ mIsFetching = true;
// in some cases createRequest can modify discard, as an example
// bake textures are always at discard 0
mRequestedDiscardLevel = llmin(desired_discard, fetch_request_discard);
@@ -2120,7 +2128,7 @@ bool LLViewerFetchedTexture::updateFetch()
{
LL_DEBUGS("Texture") << "exceeded idle time " << FETCH_IDLE_TIME << ", deleting request: " << getID() << LL_ENDL;
LLAppViewer::getTextureFetch()->deleteRequest(getID(), true);
- mHasFetcher = FALSE;
+ mHasFetcher = false;
}
}
@@ -2147,8 +2155,8 @@ void LLViewerFetchedTexture::forceToDeleteRequest()
{
if (mHasFetcher)
{
- mHasFetcher = FALSE;
- mIsFetching = FALSE;
+ mHasFetcher = false;
+ mIsFetching = false;
}
resetTextureStats();
@@ -2156,7 +2164,7 @@ void LLViewerFetchedTexture::forceToDeleteRequest()
mDesiredDiscardLevel = getMaxDiscardLevel() + 1;
}
-void LLViewerFetchedTexture::setIsMissingAsset(BOOL is_missing)
+void LLViewerFetchedTexture::setIsMissingAsset(bool is_missing)
{
if (is_missing == mIsMissingAsset)
{
@@ -2181,8 +2189,8 @@ void LLViewerFetchedTexture::setIsMissingAsset(BOOL is_missing)
if (mHasFetcher)
{
LLAppViewer::getTextureFetch()->deleteRequest(getID(), true);
- mHasFetcher = FALSE;
- mIsFetching = FALSE;
+ mHasFetcher = false;
+ mIsFetching = false;
mLastPacketTimer.reset();
mFetchState = 0;
mFetchPriority = 0;
@@ -2196,8 +2204,8 @@ void LLViewerFetchedTexture::setIsMissingAsset(BOOL is_missing)
}
void LLViewerFetchedTexture::setLoadedCallback( loaded_callback_func loaded_callback,
- S32 discard_level, BOOL keep_imageraw, BOOL needs_aux, void* userdata,
- LLLoadedCallbackEntry::source_callback_list_t* src_callback_list, BOOL pause)
+ S32 discard_level, bool keep_imageraw, bool needs_aux, void* userdata,
+ LLLoadedCallbackEntry::source_callback_list_t* src_callback_list, bool pause)
{
//
// Don't do ANYTHING here, just add it to the global callback list
@@ -2231,7 +2239,7 @@ void LLViewerFetchedTexture::setLoadedCallback( loaded_callback_func loaded_call
mNeedsAux |= needs_aux;
if(keep_imageraw)
{
- mSaveRawImage = TRUE;
+ mSaveRawImage = true;
}
if (mNeedsAux && mAuxRawImage.isNull() && getDiscardLevel() >= 0)
{
@@ -2264,7 +2272,7 @@ void LLViewerFetchedTexture::clearCallbackEntryList()
// We never finished loading the image. Indicate failure.
// Note: this allows mLoadedCallbackUserData to be cleaned up.
- entryp->mCallback(FALSE, this, NULL, NULL, 0, TRUE, entryp->mUserData);
+ entryp->mCallback(false, this, NULL, NULL, 0, true, entryp->mUserData);
iter = mLoadedCallbackList.erase(iter);
delete entryp;
}
@@ -2296,7 +2304,7 @@ void LLViewerFetchedTexture::deleteCallbackEntry(const LLLoadedCallbackEntry::so
{
// We never finished loading the image. Indicate failure.
// Note: this allows mLoadedCallbackUserData to be cleaned up.
- entryp->mCallback(FALSE, this, NULL, NULL, 0, TRUE, entryp->mUserData);
+ entryp->mCallback(false, this, NULL, NULL, 0, true, entryp->mUserData);
iter = mLoadedCallbackList.erase(iter);
delete entryp;
}
@@ -2340,30 +2348,30 @@ void LLViewerFetchedTexture::unpauseLoadedCallbacks(const LLLoadedCallbackEntry:
{
if(!callback_list)
{
- mPauseLoadedCallBacks = FALSE;
+ mPauseLoadedCallBacks = false;
return;
}
- BOOL need_raw = FALSE;
+ bool need_raw = false;
for(callback_list_t::iterator iter = mLoadedCallbackList.begin();
iter != mLoadedCallbackList.end(); )
{
LLLoadedCallbackEntry *entryp = *iter++;
if(entryp->mSourceCallbackList == callback_list)
{
- entryp->mPaused = FALSE;
+ entryp->mPaused = false;
if(entryp->mNeedsImageRaw)
{
- need_raw = TRUE;
+ need_raw = true;
}
}
}
- mPauseLoadedCallBacks = FALSE ;
+ mPauseLoadedCallBacks = false ;
mLastCallBackActiveTime = sCurrentTime ;
- mForceCallbackFetch = TRUE;
+ mForceCallbackFetch = true;
if(need_raw)
{
- mSaveRawImage = TRUE;
+ mSaveRawImage = true;
}
}
@@ -2382,7 +2390,7 @@ void LLViewerFetchedTexture::pauseLoadedCallbacks(const LLLoadedCallbackEntry::s
LLLoadedCallbackEntry *entryp = *iter++;
if(entryp->mSourceCallbackList == callback_list)
{
- entryp->mPaused = TRUE;
+ entryp->mPaused = true;
}
else if(!entryp->mPaused)
{
@@ -2392,9 +2400,9 @@ void LLViewerFetchedTexture::pauseLoadedCallbacks(const LLLoadedCallbackEntry::s
if(paused)
{
- mPauseLoadedCallBacks = TRUE;//when set, loaded callback is paused.
+ mPauseLoadedCallBacks = true;//when set, loaded callback is paused.
resetTextureStats();
- mSaveRawImage = FALSE;
+ mSaveRawImage = false;
}
}
@@ -2445,7 +2453,7 @@ bool LLViewerFetchedTexture::doLoadedCallbacks()
LLLoadedCallbackEntry *entryp = *iter++;
// We never finished loading the image. Indicate failure.
// Note: this allows mLoadedCallbackUserData to be cleaned up.
- entryp->mCallback(FALSE, this, NULL, NULL, 0, TRUE, entryp->mUserData);
+ entryp->mCallback(false, this, NULL, NULL, 0, true, entryp->mUserData);
delete entryp;
}
mLoadedCallbackList.clear();
@@ -2578,11 +2586,11 @@ bool LLViewerFetchedTexture::doLoadedCallbacks()
{
LL_WARNS() << "Raw Image with no Aux Data for callback" << LL_ENDL;
}
- BOOL final = mRawDiscardLevel <= entryp->mDesiredDiscard ? TRUE : FALSE;
+ bool final = mRawDiscardLevel <= entryp->mDesiredDiscard ? true : false;
//LL_INFOS() << "Running callback for " << getID() << LL_ENDL;
//LL_INFOS() << mRawImage->getWidth() << "x" << mRawImage->getHeight() << LL_ENDL;
entryp->mLastUsedDiscard = mRawDiscardLevel;
- entryp->mCallback(TRUE, this, mRawImage, mAuxRawImage, mRawDiscardLevel, final, entryp->mUserData);
+ entryp->mCallback(true, this, mRawImage, mAuxRawImage, mRawDiscardLevel, final, entryp->mUserData);
if (final)
{
iter = mLoadedCallbackList.erase(curiter);
@@ -2609,9 +2617,9 @@ bool LLViewerFetchedTexture::doLoadedCallbacks()
if (!entryp->mNeedsImageRaw && (entryp->mLastUsedDiscard > gl_discard))
{
mLastCallBackActiveTime = sCurrentTime;
- BOOL final = gl_discard <= entryp->mDesiredDiscard ? TRUE : FALSE;
+ bool final = gl_discard <= entryp->mDesiredDiscard ? true : false;
entryp->mLastUsedDiscard = gl_discard;
- entryp->mCallback(TRUE, this, NULL, NULL, gl_discard, final, entryp->mUserData);
+ entryp->mCallback(true, this, NULL, NULL, gl_discard, final, entryp->mUserData);
if (final)
{
iter = mLoadedCallbackList.erase(curiter);
@@ -2636,7 +2644,7 @@ bool LLViewerFetchedTexture::doLoadedCallbacks()
{
//wait for long enough but no fetching request issued, force one.
forceToRefetchTexture(mLoadedCallbackDesiredDiscardLevel, 5.f);
- mForceCallbackFetch = FALSE; //fire once.
+ mForceCallbackFetch = false; //fire once.
}
return res;
@@ -2709,7 +2717,7 @@ LLImageRaw* LLViewerFetchedTexture::reloadRawImage(S8 discard_level)
mRawDiscardLevel = discard_level;
}
}
- mIsRawImageValid = TRUE;
+ mIsRawImageValid = true;
sRawCount++;
return mRawImage;
@@ -2744,7 +2752,7 @@ void LLViewerFetchedTexture::destroyRawImage()
mRawImage = NULL;
- mIsRawImageValid = FALSE;
+ mIsRawImageValid = false;
mRawDiscardLevel = INVALID_DISCARD_LEVEL;
}
}
@@ -2768,7 +2776,7 @@ void LLViewerFetchedTexture::switchToCachedImage()
gTextureList.dirtyImage(this);
}
- mIsRawImageValid = TRUE;
+ mIsRawImageValid = true;
mRawDiscardLevel = mCachedRawDiscardLevel;
scheduleCreateTexture();
@@ -2814,7 +2822,7 @@ void LLViewerFetchedTexture::setCachedRawImage(S32 discard_level, LLImageRaw* im
mCachedRawImage = imageraw;
}
mCachedRawDiscardLevel = discard_level;
- mCachedRawImageReady = TRUE;
+ mCachedRawImageReady = true;
}
}
@@ -2885,7 +2893,7 @@ void LLViewerFetchedTexture::checkCachedRawSculptImage()
{
if(getDiscardLevel() != 0)
{
- mCachedRawImageReady = FALSE;
+ mCachedRawImageReady = false;
}
else if(isForSculptOnly())
{
@@ -2902,6 +2910,8 @@ void LLViewerFetchedTexture::saveRawImage()
return;
}
+ LLImageDataSharedLock lock(mRawImage);
+
mSavedRawDiscardLevel = mRawDiscardLevel;
if (mBoostLevel == LLGLTexture::BOOST_ICON)
{
@@ -2938,7 +2948,7 @@ void LLViewerFetchedTexture::saveRawImage()
if(mForceToSaveRawImage && mSavedRawDiscardLevel <= mDesiredSavedRawDiscardLevel)
{
- mForceToSaveRawImage = FALSE;
+ mForceToSaveRawImage = false;
}
mLastReferencedSavedRawImageTime = sCurrentTime;
@@ -2954,7 +2964,7 @@ void LLViewerFetchedTexture::forceToRefetchTexture(S32 desired_discard, F32 kept
}
//trigger a new fetch.
- mForceToSaveRawImage = TRUE ;
+ mForceToSaveRawImage = true ;
mDesiredSavedRawDiscardLevel = desired_discard ;
mKeptSavedRawImageTime = kept_time ;
mLastReferencedSavedRawImageTime = sCurrentTime ;
@@ -2974,7 +2984,7 @@ void LLViewerFetchedTexture::forceToSaveRawImage(S32 desired_discard, F32 kept_t
if(!mForceToSaveRawImage || mDesiredSavedRawDiscardLevel < 0 || mDesiredSavedRawDiscardLevel > desired_discard)
{
- mForceToSaveRawImage = TRUE;
+ mForceToSaveRawImage = true;
mDesiredSavedRawDiscardLevel = desired_discard;
//copy from the cached raw image if exists.
@@ -2997,14 +3007,14 @@ void LLViewerFetchedTexture::destroySavedRawImage()
return; //keep the saved raw image.
}
- mForceToSaveRawImage = FALSE;
- mSaveRawImage = FALSE;
+ mForceToSaveRawImage = false;
+ mSaveRawImage = false;
clearCallbackEntryList();
mSavedRawImage = NULL ;
- mForceToSaveRawImage = FALSE ;
- mSaveRawImage = FALSE ;
+ mForceToSaveRawImage = false ;
+ mSaveRawImage = false ;
mSavedRawDiscardLevel = -1 ;
mDesiredSavedRawDiscardLevel = -1 ;
mLastReferencedSavedRawImageTime = 0.0f ;
@@ -3024,7 +3034,7 @@ LLImageRaw* LLViewerFetchedTexture::getSavedRawImage()
return mSavedRawImage;
}
-BOOL LLViewerFetchedTexture::hasSavedRawImage() const
+bool LLViewerFetchedTexture::hasSavedRawImage() const
{
return mSavedRawImage.notNull();
}
@@ -3041,16 +3051,16 @@ F32 LLViewerFetchedTexture::getElapsedLastReferencedSavedRawImageTime() const
//----------------------------------------------------------------------------------------------
//start of LLViewerLODTexture
//----------------------------------------------------------------------------------------------
-LLViewerLODTexture::LLViewerLODTexture(const LLUUID& id, FTType f_type, const LLHost& host, BOOL usemipmaps)
+LLViewerLODTexture::LLViewerLODTexture(const LLUUID& id, FTType f_type, const LLHost& host, bool usemipmaps)
: LLViewerFetchedTexture(id, f_type, host, usemipmaps)
{
- init(TRUE);
+ init(true);
}
-LLViewerLODTexture::LLViewerLODTexture(const std::string& url, FTType f_type, const LLUUID& id, BOOL usemipmaps)
+LLViewerLODTexture::LLViewerLODTexture(const std::string& url, FTType f_type, const LLUUID& id, bool usemipmaps)
: LLViewerFetchedTexture(url, f_type, id, usemipmaps)
{
- init(TRUE);
+ init(true);
}
void LLViewerLODTexture::init(bool firstinit)
@@ -3079,7 +3089,15 @@ void LLViewerLODTexture::processTextureStats()
updateVirtualSize();
static LLCachedControl<bool> textures_fullres(gSavedSettings,"TextureLoadFullRes", false);
-
+
+ { // restrict texture resolution to download based on RenderMaxTextureResolution
+ static LLCachedControl<U32> max_texture_resolution(gSavedSettings, "RenderMaxTextureResolution", 2048);
+ // sanity clamp debug setting to avoid settings hack shenanigans
+ F32 tex_res = (F32)llclamp((S32)max_texture_resolution, 512, 2048);
+ tex_res *= tex_res;
+ mMaxVirtualSize = llmin(mMaxVirtualSize, tex_res);
+ }
+
if (textures_fullres)
{
mDesiredDiscardLevel = 0;
@@ -3089,7 +3107,7 @@ void LLViewerLODTexture::processTextureStats()
{
mDesiredDiscardLevel = 0;
if (mFullWidth > MAX_IMAGE_SIZE_DEFAULT || mFullHeight > MAX_IMAGE_SIZE_DEFAULT)
- mDesiredDiscardLevel = 1; // MAX_IMAGE_SIZE_DEFAULT = 1024 and max size ever is 2048
+ mDesiredDiscardLevel = 1; // MAX_IMAGE_SIZE_DEFAULT = 2048 and max size ever is 4096
}
else if (mBoostLevel < LLGLTexture::BOOST_HIGH && mMaxVirtualSize <= 10.f)
{
@@ -3134,7 +3152,7 @@ void LLViewerLODTexture::processTextureStats()
discard_level = floorf(discard_level);
F32 min_discard = 0.f;
- U32 desired_size = MAX_IMAGE_SIZE_DEFAULT; // MAX_IMAGE_SIZE_DEFAULT = 1024 and max size ever is 2048
+ U32 desired_size = MAX_IMAGE_SIZE_DEFAULT; // MAX_IMAGE_SIZE_DEFAULT = 2048 and max size ever is 4096
if (mBoostLevel <= LLGLTexture::BOOST_SCULPTED)
{
desired_size = DESIRED_NORMAL_TEXTURE_SIZE;
@@ -3276,7 +3294,7 @@ LLViewerMediaTexture* LLViewerMediaTexture::findMediaTexture(const LLUUID& media
return media_tex;
}
-LLViewerMediaTexture::LLViewerMediaTexture(const LLUUID& id, BOOL usemipmaps, LLImageGL* gl_image)
+LLViewerMediaTexture::LLViewerMediaTexture(const LLUUID& id, bool usemipmaps, LLImageGL* gl_image)
: LLViewerTexture(id, usemipmaps),
mMediaImplp(NULL),
mUpdateVirtualSizeTime(0)
@@ -3292,9 +3310,9 @@ LLViewerMediaTexture::LLViewerMediaTexture(const LLUUID& id, BOOL usemipmaps, LL
mGLTexturep->setAllowCompression(false);
- mGLTexturep->setNeedsAlphaAndPickMask(FALSE);
+ mGLTexturep->setNeedsAlphaAndPickMask(false);
- mIsPlaying = FALSE;
+ mIsPlaying = false;
setMediaImpl();
@@ -3317,17 +3335,17 @@ LLViewerMediaTexture::~LLViewerMediaTexture()
}
}
-void LLViewerMediaTexture::reinit(BOOL usemipmaps /* = TRUE */)
+void LLViewerMediaTexture::reinit(bool usemipmaps /* = true */)
{
llassert(mGLTexturep.notNull());
mUseMipMaps = usemipmaps;
getLastReferencedTimer()->reset();
mGLTexturep->setUseMipMaps(mUseMipMaps);
- mGLTexturep->setNeedsAlphaAndPickMask(FALSE);
+ mGLTexturep->setNeedsAlphaAndPickMask(false);
}
-void LLViewerMediaTexture::setUseMipMaps(BOOL mipmap)
+void LLViewerMediaTexture::setUseMipMaps(bool mipmap)
{
mUseMipMaps = mipmap;
@@ -3359,11 +3377,11 @@ void LLViewerMediaTexture::setMediaImpl()
//return true if all faces to reference to this media texture are found
//Note: mMediaFaceList is valid only for the current instant
// because it does not check the face validity after the current frame.
-BOOL LLViewerMediaTexture::findFaces()
+bool LLViewerMediaTexture::findFaces()
{
mMediaFaceList.clear();
- BOOL ret = TRUE;
+ bool ret = true;
LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_STANDARD);
if(tex) //this media is a parcel media for tex.
@@ -3384,7 +3402,7 @@ BOOL LLViewerMediaTexture::findFaces()
if(!mMediaImplp)
{
- return TRUE;
+ return true;
}
//for media on a face.
@@ -3400,13 +3418,13 @@ BOOL LLViewerMediaTexture::findFaces()
// If this happens, viewer is likely to crash
llassert(0);
LL_WARNS() << "Dead object in mMediaImplp's object list" << LL_ENDL;
- ret = FALSE;
+ ret = false;
continue;
}
if (obj->mDrawable.isNull() || obj->mDrawable->isDead())
{
- ret = FALSE;
+ ret = false;
continue;
}
@@ -3421,7 +3439,7 @@ BOOL LLViewerMediaTexture::findFaces()
}
else
{
- ret = FALSE;
+ ret = false;
}
}
}
@@ -3470,9 +3488,9 @@ void LLViewerMediaTexture::removeMediaFromFace(LLFace* facep)
return; //no need to remove the face because the media is not in playing.
}
- mIsPlaying = FALSE; //set to remove the media from the face.
+ mIsPlaying = false; //set to remove the media from the face.
switchTexture(LLRender::DIFFUSE_MAP, facep);
- mIsPlaying = TRUE; //set the flag back.
+ mIsPlaying = true; //set the flag back.
if(getTotalNumFaces() < 1) //no face referencing to this media
{
@@ -3603,7 +3621,7 @@ void LLViewerMediaTexture::stopPlaying()
// {
// mMediaImplp->stop();
// }
- mIsPlaying = FALSE;
+ mIsPlaying = false;
}
void LLViewerMediaTexture::switchTexture(U32 ch, LLFace* facep)
@@ -3644,7 +3662,7 @@ void LLViewerMediaTexture::switchTexture(U32 ch, LLFace* facep)
}
}
-void LLViewerMediaTexture::setPlaying(BOOL playing)
+void LLViewerMediaTexture::setPlaying(bool playing)
{
if(!mMediaImplp)
{
@@ -3666,7 +3684,7 @@ void LLViewerMediaTexture::setPlaying(BOOL playing)
if(findFaces())
{
//about to update all faces.
- mMediaImplp->setUpdated(FALSE);
+ mMediaImplp->setUpdated(false);
}
if(mMediaFaceList.empty())//no face pointing to this media
@@ -3704,7 +3722,7 @@ F32 LLViewerMediaTexture::getMaxVirtualSize()
if(!mMaxVirtualSizeResetCounter)
{
- addTextureStats(0.f, FALSE);//reset
+ addTextureStats(0.f, false);//reset
}
if(mIsPlaying) //media is playing
@@ -3799,13 +3817,13 @@ void LLTexturePipelineTester::update()
//start a new fetching session
reset();
mStartFetchingTime = LLImageGL::sLastFrameTime;
- mPause = FALSE;
+ mPause = false;
}
//update total gray time
if(mUsingDefaultTexture)
{
- mUsingDefaultTexture = FALSE;
+ mUsingDefaultTexture = false;
mTotalGrayTime = LLImageGL::sLastFrameTime - mStartFetchingTime;
}
@@ -3817,7 +3835,7 @@ void LLTexturePipelineTester::update()
else if(!mPause)
{
//stop the current fetching session
- mPause = TRUE;
+ mPause = true;
outputTestResults();
reset();
}
@@ -3825,9 +3843,9 @@ void LLTexturePipelineTester::update()
void LLTexturePipelineTester::reset()
{
- mPause = TRUE;
+ mPause = true;
- mUsingDefaultTexture = FALSE;
+ mUsingDefaultTexture = false;
mStartStablizingTime = 0.0f;
mEndStablizingTime = 0.0f;
@@ -3878,7 +3896,7 @@ void LLTexturePipelineTester::updateTextureBindingStats(const LLViewerTexture* i
}
}
-void LLTexturePipelineTester::updateTextureLoadingStats(const LLViewerFetchedTexture* imagep, const LLImageRaw* raw_imagep, BOOL from_cache)
+void LLTexturePipelineTester::updateTextureLoadingStats(const LLViewerFetchedTexture* imagep, const LLImageRaw* raw_imagep, bool from_cache)
{
U32Bytes data_size = (U32Bytes)raw_imagep->getDataSize();
mTotalBytesLoaded += data_size;
@@ -3907,7 +3925,7 @@ void LLTexturePipelineTester::updateTextureLoadingStats(const LLViewerFetchedTex
void LLTexturePipelineTester::updateGrayTextureBinding()
{
- mUsingDefaultTexture = TRUE;
+ mUsingDefaultTexture = true;
}
void LLTexturePipelineTester::setStablizingTime()
@@ -4034,7 +4052,7 @@ LLMetricPerformanceTesterWithSession::LLTestSession* LLTexturePipelineTester::lo
//load a session
std::string currentLabel = getCurrentLabelName();
- BOOL in_log = (*log).has(currentLabel);
+ bool in_log = (*log).has(currentLabel);
while (in_log)
{
LLSD::String label = currentLabel;
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 35fb0a2237..9a8b931901 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -54,7 +54,7 @@ class LLViewerMediaTexture ;
class LLTexturePipelineTester ;
-typedef void (*loaded_callback_func)( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata );
+typedef void (*loaded_callback_func)( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, bool final, void* userdata );
class LLFileSystem;
class LLMessageSystem;
@@ -70,19 +70,19 @@ public:
public:
LLLoadedCallbackEntry(loaded_callback_func cb,
S32 discard_level,
- BOOL need_imageraw, // Needs image raw for the callback
+ bool need_imageraw, // Needs image raw for the callback
void* userdata,
source_callback_list_t* src_callback_list,
LLViewerFetchedTexture* target,
- BOOL pause);
+ bool pause);
~LLLoadedCallbackEntry();
void removeTexture(LLViewerFetchedTexture* tex) ;
loaded_callback_func mCallback;
S32 mLastUsedDiscard;
S32 mDesiredDiscard;
- BOOL mNeedsImageRaw;
- BOOL mPaused;
+ bool mNeedsImageRaw;
+ bool mPaused;
void* mUserData;
source_callback_list_t* mSourceCallbackList;
@@ -118,13 +118,13 @@ public:
static void initClass();
static void updateClass();
- LLViewerTexture(BOOL usemipmaps = TRUE);
- LLViewerTexture(const LLUUID& id, BOOL usemipmaps) ;
- LLViewerTexture(const LLImageRaw* raw, BOOL usemipmaps) ;
- LLViewerTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps) ;
+ LLViewerTexture(bool usemipmaps = true);
+ LLViewerTexture(const LLUUID& id, bool usemipmaps) ;
+ LLViewerTexture(const LLImageRaw* raw, bool usemipmaps) ;
+ LLViewerTexture(const U32 width, const U32 height, const U8 components, bool usemipmaps) ;
virtual S8 getType() const;
- virtual BOOL isMissingAsset() const ;
+ virtual bool isMissingAsset() const ;
virtual void dump(); // debug info to LL_INFOS()
virtual bool isViewerMediaTexture() const { return false; }
@@ -140,7 +140,7 @@ public:
void setTextureListType(S32 tex_type) { mTextureListType = tex_type; }
S32 getTextureListType() { return mTextureListType; }
- void addTextureStats(F32 virtual_size, BOOL needs_gltexture = TRUE) const;
+ void addTextureStats(F32 virtual_size, bool needs_gltexture = true) const;
void resetTextureStats();
void setMaxVirtualSizeResetInterval(S32 interval)const {mMaxVirtualSizeResetInterval = interval;}
void resetMaxVirtualSizeResetCounter()const {mMaxVirtualSizeResetCounter = mMaxVirtualSizeResetInterval;}
@@ -167,10 +167,10 @@ public:
virtual void setCachedRawImage(S32 discard_level, LLImageRaw* imageraw) ;
- BOOL isLargeImage() ;
+ bool isLargeImage() ;
void setParcelMedia(LLViewerMediaTexture* media) {mParcelMedia = media;}
- BOOL hasParcelMedia() const { return mParcelMedia != NULL;}
+ bool hasParcelMedia() const { return mParcelMedia != NULL;}
LLViewerMediaTexture* getParcelMedia() const { return mParcelMedia;}
/*virtual*/ void updateBindStatsForTester() ;
@@ -228,6 +228,9 @@ public:
static bool sFreezeImageUpdates;
static F32 sCurrentTime ;
+ // estimated free memory for textures, by bias calculation
+ static F32 sFreeVRAMMegabytes;
+
enum EDebugTexels
{
DEBUG_TEXELS_OFF,
@@ -269,9 +272,9 @@ class LLViewerFetchedTexture : public LLViewerTexture
protected:
/*virtual*/ ~LLViewerFetchedTexture();
public:
- LLViewerFetchedTexture(const LLUUID& id, FTType f_type, const LLHost& host = LLHost(), BOOL usemipmaps = TRUE);
- LLViewerFetchedTexture(const LLImageRaw* raw, FTType f_type, BOOL usemipmaps);
- LLViewerFetchedTexture(const std::string& url, FTType f_type, const LLUUID& id, BOOL usemipmaps = TRUE);
+ LLViewerFetchedTexture(const LLUUID& id, FTType f_type, const LLHost& host = LLHost(), bool usemipmaps = true);
+ LLViewerFetchedTexture(const LLImageRaw* raw, FTType f_type, bool usemipmaps);
+ LLViewerFetchedTexture(const std::string& url, FTType f_type, const LLUUID& id, bool usemipmaps = true);
public:
@@ -303,8 +306,8 @@ public:
// Set callbacks to get called when the image gets updated with higher
// resolution versions.
void setLoadedCallback(loaded_callback_func cb,
- S32 discard_level, BOOL keep_imageraw, BOOL needs_aux,
- void* userdata, LLLoadedCallbackEntry::source_callback_list_t* src_callback_list, BOOL pause = FALSE);
+ S32 discard_level, bool keep_imageraw, bool needs_aux,
+ void* userdata, LLLoadedCallbackEntry::source_callback_list_t* src_callback_list, bool pause = false);
bool hasCallbacks() { return mLoadedCallbackList.empty() ? false : true; }
void pauseLoadedCallbacks(const LLLoadedCallbackEntry::source_callback_list_t* callback_list);
void unpauseLoadedCallbacks(const LLLoadedCallbackEntry::source_callback_list_t* callback_list);
@@ -315,9 +318,9 @@ public:
void addToCreateTexture();
//call to determine if createTexture is necessary
- BOOL preCreateTexture(S32 usename = 0);
+ bool preCreateTexture(S32 usename = 0);
// ONLY call from LLViewerTextureList or ImageGL background thread
- BOOL createTexture(S32 usename = 0);
+ bool createTexture(S32 usename = 0);
void postCreateTexture();
void scheduleCreateTexture();
@@ -325,7 +328,7 @@ public:
virtual void processTextureStats() ;
- BOOL needsAux() const { return mNeedsAux; }
+ bool needsAux() const { return mNeedsAux; }
// Host we think might have this image, used for baked av textures.
void setTargetHost(LLHost host) { mTargetHost = host; }
@@ -341,7 +344,7 @@ public:
bool setDebugFetching(S32 debug_level);
bool isInDebug() const { return mInDebug; }
- void setUnremovable(BOOL value) { mUnremovable = value; }
+ void setUnremovable(bool value) { mUnremovable = value; }
bool isUnremovable() const { return mUnremovable; }
void clearFetchedResults(); //clear all fetched results, for debug use.
@@ -355,16 +358,16 @@ public:
// to the specified text
void setDebugText(const std::string& text);
- void setIsMissingAsset(BOOL is_missing = true);
- /*virtual*/ BOOL isMissingAsset() const override { return mIsMissingAsset; }
+ void setIsMissingAsset(bool is_missing = true);
+ /*virtual*/ bool isMissingAsset() const override { return mIsMissingAsset; }
// returns dimensions of original image for local files (before power of two scaling)
// and returns 0 for all asset system images
S32 getOriginalWidth() { return mOrigWidth; }
S32 getOriginalHeight() { return mOrigHeight; }
- BOOL isInImageList() const {return mInImageList ;}
- void setInImageList(BOOL flag) {mInImageList = flag ;}
+ bool isInImageList() const {return mInImageList ;}
+ void setInImageList(bool flag) {mInImageList = flag ;}
LLFrameTimer* getLastPacketTimer() {return &mLastPacketTimer;}
@@ -377,17 +380,17 @@ public:
const std::string& getUrl() const {return mUrl;}
//---------------
- BOOL isDeleted() ;
- BOOL isInactive() ;
- BOOL isDeletionCandidate();
+ bool isDeleted() ;
+ bool isInactive() ;
+ bool isDeletionCandidate();
void setDeletionCandidate() ;
void setInactive() ;
- BOOL getUseDiscard() const { return mUseMipMaps && !mDontDiscard; }
+ bool getUseDiscard() const { return mUseMipMaps && !mDontDiscard; }
//---------------
void setForSculpt();
- BOOL forSculpt() const {return mForSculpt;}
- BOOL isForSculptOnly() const;
+ bool forSculpt() const {return mForSculpt;}
+ bool isForSculptOnly() const;
//raw image management
void checkCachedRawSculptImage() ;
@@ -395,18 +398,17 @@ public:
S32 getRawImageLevel() const {return mRawDiscardLevel;}
LLImageRaw* getCachedRawImage() const { return mCachedRawImage ;}
S32 getCachedRawImageLevel() const {return mCachedRawDiscardLevel;}
- BOOL isCachedRawImageReady() const {return mCachedRawImageReady ;}
- BOOL isRawImageValid()const { return mIsRawImageValid ; }
+ bool isCachedRawImageReady() const {return mCachedRawImageReady ;}
+ bool isRawImageValid()const { return mIsRawImageValid ; }
void forceToSaveRawImage(S32 desired_discard = 0, F32 kept_time = 0.f) ;
- void forceToRefetchTexture(S32 desired_discard = 0, F32 kept_time = 60.f);
/*virtual*/ void setCachedRawImage(S32 discard_level, LLImageRaw* imageraw) override;
void destroySavedRawImage() ;
LLImageRaw* getSavedRawImage() ;
- BOOL hasSavedRawImage() const ;
+ bool hasSavedRawImage() const ;
F32 getElapsedLastReferencedSavedRawImageTime() const ;
- BOOL isFullyLoaded() const;
+ bool isFullyLoaded() const;
- BOOL hasFetcher() const { return mHasFetcher;}
+ bool hasFetcher() const { return mHasFetcher;}
bool isFetching() const { return mIsFetching;}
void setCanUseHTTP(bool can_use_http) {mCanUseHTTP = can_use_http;}
@@ -420,6 +422,7 @@ public:
protected:
/*virtual*/ void switchToCachedImage() override;
S32 getCurrentDiscardLevelForFetching() ;
+ void forceToRefetchTexture(S32 desired_discard = 0, F32 kept_time = 60.f);
private:
void init(bool firstinit) ;
@@ -430,15 +433,15 @@ private:
//for atlas
void resetFaceAtlas() ;
- void invalidateAtlas(BOOL rebuild_geom) ;
- BOOL insertToAtlas() ;
+ void invalidateAtlas(bool rebuild_geom) ;
+ bool insertToAtlas() ;
private:
- BOOL mFullyLoaded;
- BOOL mInDebug;
- BOOL mUnremovable;
- BOOL mInFastCacheList;
- BOOL mForceCallbackFetch;
+ bool mFullyLoaded;
+ bool mInDebug;
+ bool mUnremovable;
+ bool mInFastCacheList;
+ bool mForceCallbackFetch;
protected:
std::string mLocalFileName;
@@ -450,7 +453,7 @@ protected:
// Used for UI textures to not decode, even if we have more data.
S32 mKnownDrawWidth;
S32 mKnownDrawHeight;
- BOOL mKnownDrawSizeChanged ;
+ bool mKnownDrawSizeChanged ;
std::string mUrl;
S32 mRequestedDiscardLevel;
@@ -465,21 +468,21 @@ protected:
S8 mDesiredDiscardLevel; // The discard level we'd LIKE to have - if we have it and there's space
S8 mMinDesiredDiscardLevel; // The minimum discard level we'd like to have
- S8 mNeedsAux; // We need to decode the auxiliary channels
- S8 mHasAux; // We have aux channels
- S8 mDecodingAux; // Are we decoding high components
- S8 mIsRawImageValid;
- S8 mHasFetcher; // We've made a fecth request
- S8 mIsFetching; // Fetch request is active
+ bool mNeedsAux; // We need to decode the auxiliary channels
+ bool mHasAux; // We have aux channels
+ bool mDecodingAux; // Are we decoding high components
+ bool mIsRawImageValid;
+ bool mHasFetcher; // We've made a fecth request
+ bool mIsFetching; // Fetch request is active
bool mCanUseHTTP; //This texture can be fetched through http if true.
LLCore::HttpStatus mLastHttpGetStatus; // Result of the most recently completed http request for this texture.
FTType mFTType; // What category of image is this - map tile, server bake, etc?
- mutable S8 mIsMissingAsset; // True if we know that there is no image asset with this image id in the database.
+ mutable bool mIsMissingAsset; // True if we know that there is no image asset with this image id in the database.
typedef std::list<LLLoadedCallbackEntry*> callback_list_t;
S8 mLoadedCallbackDesiredDiscardLevel;
- BOOL mPauseLoadedCallBacks;
+ bool mPauseLoadedCallBacks;
callback_list_t mLoadedCallbackList;
F32 mLastCallBackActiveTime;
@@ -492,8 +495,8 @@ protected:
//keep a copy of mRawImage for some special purposes
//when mForceToSaveRawImage is set.
- BOOL mForceToSaveRawImage ;
- BOOL mSaveRawImage;
+ bool mForceToSaveRawImage ;
+ bool mSaveRawImage;
LLPointer<LLImageRaw> mSavedRawImage;
S32 mSavedRawDiscardLevel;
S32 mDesiredSavedRawDiscardLevel;
@@ -503,7 +506,7 @@ protected:
//a small version of the copy of the raw image (<= 64 * 64)
LLPointer<LLImageRaw> mCachedRawImage;
S32 mCachedRawDiscardLevel;
- BOOL mCachedRawImageReady; //the rez of the mCachedRawImage reaches the upper limit.
+ bool mCachedRawImageReady; //the rez of the mCachedRawImage reaches the upper limit.
LLHost mTargetHost; // if invalid, just request from agent's simulator
@@ -511,13 +514,13 @@ protected:
LLFrameTimer mLastPacketTimer; // Time since last packet.
LLFrameTimer mStopFetchingTimer; // Time since mDecodePriority == 0.f.
- BOOL mInImageList; // TRUE if image is in list (in which case don't reset priority!)
+ bool mInImageList; // true if image is in list (in which case don't reset priority!)
// This needs to be atomic, since it is written both in the main thread
// and in the GL image worker thread... HB
LLAtomicBool mNeedsCreateTexture;
- BOOL mForSculpt ; //a flag if the texture is used as sculpt data.
- BOOL mIsFetched ; //is loaded from remote or from cache, not generated locally.
+ bool mForSculpt ; //a flag if the texture is used as sculpt data.
+ bool mIsFetched ; //is loaded from remote or from cache, not generated locally.
public:
static F32 sMaxVirtualSize; //maximum possible value of mMaxVirtualSize
@@ -542,8 +545,8 @@ protected:
/*virtual*/ ~LLViewerLODTexture(){}
public:
- LLViewerLODTexture(const LLUUID& id, FTType f_type, const LLHost& host = LLHost(), BOOL usemipmaps = TRUE);
- LLViewerLODTexture(const std::string& url, FTType f_type, const LLUUID& id, BOOL usemipmaps = TRUE);
+ LLViewerLODTexture(const LLUUID& id, FTType f_type, const LLHost& host = LLHost(), bool usemipmaps = true);
+ LLViewerLODTexture(const std::string& url, FTType f_type, const LLUUID& id, bool usemipmaps = true);
/*virtual*/ S8 getType() const;
// Process image stats to determine priority/quality requirements.
@@ -569,16 +572,16 @@ protected:
/*virtual*/ ~LLViewerMediaTexture() ;
public:
- LLViewerMediaTexture(const LLUUID& id, BOOL usemipmaps = TRUE, LLImageGL* gl_image = NULL) ;
+ LLViewerMediaTexture(const LLUUID& id, bool usemipmaps = true, LLImageGL* gl_image = NULL) ;
/*virtual*/ S8 getType() const;
- void reinit(BOOL usemipmaps = TRUE);
+ void reinit(bool usemipmaps = true);
- BOOL getUseMipMaps() {return mUseMipMaps ; }
- void setUseMipMaps(BOOL mipmap) ;
+ bool getUseMipMaps() {return mUseMipMaps ; }
+ void setUseMipMaps(bool mipmap) ;
- void setPlaying(BOOL playing) ;
- BOOL isPlaying() const {return mIsPlaying;}
+ void setPlaying(bool playing) ;
+ bool isPlaying() const {return mIsPlaying;}
void setMediaImpl() ;
virtual bool isViewerMediaTexture() const { return true; }
@@ -595,7 +598,7 @@ public:
/*virtual*/ F32 getMaxVirtualSize() ;
private:
void switchTexture(U32 ch, LLFace* facep) ;
- BOOL findFaces() ;
+ bool findFaces() ;
void stopPlaying() ;
private:
@@ -610,7 +613,7 @@ private:
std::list< LLPointer<LLViewerTexture> > mTextureList ;
LLViewerMediaImpl* mMediaImplp ;
- BOOL mIsPlaying ;
+ bool mIsPlaying ;
U32 mUpdateVirtualSizeTime ;
public:
@@ -637,7 +640,7 @@ public:
static LLTexturePipelineTester* sTesterp ;
//returns NULL if tex is not a LLViewerFetchedTexture nor derived from LLViewerFetchedTexture.
- static LLViewerFetchedTexture* staticCastToFetchedTexture(LLTexture* tex, BOOL report_error = FALSE) ;
+ static LLViewerFetchedTexture* staticCastToFetchedTexture(LLTexture* tex, bool report_error = false) ;
//
//"find-texture" just check if the texture exists, if yes, return it, otherwise return null.
@@ -647,23 +650,23 @@ public:
static LLViewerFetchedTexture* findFetchedTexture(const LLUUID& id, S32 tex_type);
static LLViewerMediaTexture* findMediaTexture(const LLUUID& id) ;
- static LLViewerMediaTexture* createMediaTexture(const LLUUID& id, BOOL usemipmaps = TRUE, LLImageGL* gl_image = NULL) ;
+ static LLViewerMediaTexture* createMediaTexture(const LLUUID& id, bool usemipmaps = true, LLImageGL* gl_image = NULL) ;
//
//"get-texture" will create a new texture if the texture does not exist.
//
- static LLViewerMediaTexture* getMediaTexture(const LLUUID& id, BOOL usemipmaps = TRUE, LLImageGL* gl_image = NULL) ;
+ static LLViewerMediaTexture* getMediaTexture(const LLUUID& id, bool usemipmaps = true, LLImageGL* gl_image = NULL) ;
- static LLPointer<LLViewerTexture> getLocalTexture(BOOL usemipmaps = TRUE, BOOL generate_gl_tex = TRUE);
- static LLPointer<LLViewerTexture> getLocalTexture(const LLUUID& id, BOOL usemipmaps, BOOL generate_gl_tex = TRUE) ;
- static LLPointer<LLViewerTexture> getLocalTexture(const LLImageRaw* raw, BOOL usemipmaps) ;
- static LLPointer<LLViewerTexture> getLocalTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps, BOOL generate_gl_tex = TRUE) ;
+ static LLPointer<LLViewerTexture> getLocalTexture(bool usemipmaps = true, bool generate_gl_tex = true);
+ static LLPointer<LLViewerTexture> getLocalTexture(const LLUUID& id, bool usemipmaps, bool generate_gl_tex = true) ;
+ static LLPointer<LLViewerTexture> getLocalTexture(const LLImageRaw* raw, bool usemipmaps) ;
+ static LLPointer<LLViewerTexture> getLocalTexture(const U32 width, const U32 height, const U8 components, bool usemipmaps, bool generate_gl_tex = true) ;
static LLViewerFetchedTexture* getFetchedTexture(const LLImageRaw* raw, FTType type, bool usemipmaps);
static LLViewerFetchedTexture* getFetchedTexture(const LLUUID &image_id,
FTType f_type = FTT_DEFAULT,
- BOOL usemipmap = TRUE,
+ bool usemipmap = true,
LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_NONE, // Get the requested level immediately upon creation.
S8 texture_type = LLViewerTexture::FETCHED_TEXTURE,
LLGLint internal_format = 0,
@@ -673,7 +676,7 @@ public:
static LLViewerFetchedTexture* getFetchedTextureFromFile(const std::string& filename,
FTType f_type = FTT_LOCAL_FILE,
- BOOL usemipmap = TRUE,
+ bool usemipmap = true,
LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_NONE,
S8 texture_type = LLViewerTexture::FETCHED_TEXTURE,
LLGLint internal_format = 0,
@@ -683,7 +686,7 @@ public:
static LLViewerFetchedTexture* getFetchedTextureFromUrl(const std::string& url,
FTType f_type,
- BOOL usemipmap = TRUE,
+ bool usemipmap = true,
LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_NONE,
S8 texture_type = LLViewerTexture::FETCHED_TEXTURE,
LLGLint internal_format = 0,
@@ -713,7 +716,7 @@ public:
void update();
void updateTextureBindingStats(const LLViewerTexture* imagep) ;
- void updateTextureLoadingStats(const LLViewerFetchedTexture* imagep, const LLImageRaw* raw_imagep, BOOL from_cache) ;
+ void updateTextureLoadingStats(const LLViewerFetchedTexture* imagep, const LLImageRaw* raw_imagep, bool from_cache) ;
void updateGrayTextureBinding() ;
void setStablizingTime() ;
@@ -724,9 +727,9 @@ private:
/*virtual*/ void outputTestRecord(LLSD* sd) ;
private:
- BOOL mPause ;
+ bool mPause ;
private:
- BOOL mUsingDefaultTexture; //if set, some textures are still gray.
+ bool mUsingDefaultTexture; //if set, some textures are still gray.
U32Bytes mTotalBytesUsed ; //total bytes of textures bound/used for the current frame.
U32Bytes mTotalBytesUsedForLargeImage ; //total bytes of textures bound/used for the current frame for images larger than 256 * 256.
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 8731be6e97..6fb85482d1 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -91,14 +91,14 @@ LLTextureKey::LLTextureKey(LLUUID id, ETexListType tex_type)
///////////////////////////////////////////////////////////////////////////////
LLViewerTextureList::LLViewerTextureList()
- : mForceResetTextureStats(FALSE),
- mInitialized(FALSE)
+ : mForceResetTextureStats(false),
+ mInitialized(false)
{
}
void LLViewerTextureList::init()
{
- mInitialized = TRUE ;
+ mInitialized = true ;
sNumImages = 0;
doPreloadImages();
}
@@ -139,12 +139,12 @@ void LLViewerTextureList::doPreloadImages()
image_list->initFromFile();
// turn off clamping and bilinear filtering for uv picking images
- //LLViewerFetchedTexture* uv_test = preloadUIImage("uv_test1.tga", LLUUID::null, FALSE);
- //uv_test->setClamp(FALSE, FALSE);
- //uv_test->setMipFilterNearest(TRUE, TRUE);
- //uv_test = preloadUIImage("uv_test2.tga", LLUUID::null, FALSE);
- //uv_test->setClamp(FALSE, FALSE);
- //uv_test->setMipFilterNearest(TRUE, TRUE);
+ //LLViewerFetchedTexture* uv_test = preloadUIImage("uv_test1.tga", LLUUID::null, false);
+ //uv_test->setClamp(false, false);
+ //uv_test->setMipFilterNearest(true, true);
+ //uv_test = preloadUIImage("uv_test2.tga", LLUUID::null, false);
+ //uv_test->setClamp(false, false);
+ //uv_test->setMipFilterNearest(true, true);
LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTextureFromFile("silhouette.j2c", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI);
if (image)
@@ -188,9 +188,9 @@ void LLViewerTextureList::doPreloadImages()
LLPointer<LLImageRaw> img_blak_square_tex(new LLImageRaw(2, 2, 3));
memset(img_blak_square_tex->getData(), 0, img_blak_square_tex->getDataSize());
- LLPointer<LLViewerFetchedTexture> img_blak_square(new LLViewerFetchedTexture(img_blak_square_tex, FTT_DEFAULT, FALSE));
+ LLPointer<LLViewerFetchedTexture> img_blak_square(new LLViewerFetchedTexture(img_blak_square_tex, FTT_DEFAULT, false));
gBlackSquareID = img_blak_square->getID();
- img_blak_square->setUnremovable(TRUE);
+ img_blak_square->setUnremovable(true);
addImage(img_blak_square, TEX_LIST_STANDARD);
}
@@ -231,7 +231,7 @@ void LLViewerTextureList::doPrefetchImages()
LLViewerTextureManager::getFetchedTexture(IMG_SHOT);
LLViewerTextureManager::getFetchedTexture(IMG_SMOKE_POOF);
- LLViewerFetchedTexture::sSmokeImagep = LLViewerTextureManager::getFetchedTexture(IMG_SMOKE, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
+ LLViewerFetchedTexture::sSmokeImagep = LLViewerTextureManager::getFetchedTexture(IMG_SMOKE, FTT_DEFAULT, true, LLGLTexture::BOOST_UI);
LLViewerFetchedTexture::sSmokeImagep->setNoDelete();
LLStandardBumpmap::addstandard();
@@ -360,7 +360,7 @@ void LLViewerTextureList::shutdown()
mImageList.clear();
- mInitialized = FALSE ; //prevent loading textures again.
+ mInitialized = false ; //prevent loading textures again.
}
void LLViewerTextureList::dump()
@@ -381,7 +381,7 @@ void LLViewerTextureList::dump()
}
}
-void LLViewerTextureList::destroyGL(BOOL save_state)
+void LLViewerTextureList::destroyGL(bool save_state)
{
LLImageGL::destroyGL(save_state);
}
@@ -403,7 +403,7 @@ void LLViewerTextureList::restoreGL()
LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string& filename,
FTType f_type,
- BOOL usemipmaps,
+ bool usemipmaps,
LLViewerTexture::EBoostLevel boost_priority,
S8 texture_type,
LLGLint internal_format,
@@ -416,12 +416,12 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string&
return NULL ;
}
- std::string full_path = gDirUtilp->findSkinnedFilename("textures", filename);
+ std::string full_path = gDirUtilp->findSkinnedFilename(LLDir::TEXTURES, filename);
if (full_path.empty())
{
LL_WARNS() << "Failed to find local image file: " << filename << LL_ENDL;
LLViewerTexture::EBoostLevel priority = LLGLTexture::BOOST_UI;
- return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, FTT_DEFAULT, TRUE, priority);
+ return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, FTT_DEFAULT, true, priority);
}
std::string url = "file://" + full_path;
@@ -431,7 +431,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string&
LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string& url,
FTType f_type,
- BOOL usemipmaps,
+ bool usemipmaps,
LLViewerTexture::EBoostLevel boost_priority,
S8 texture_type,
LLGLint internal_format,
@@ -521,7 +521,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string&
LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id,
FTType f_type,
- BOOL usemipmaps,
+ bool usemipmaps,
LLViewerTexture::EBoostLevel boost_priority,
S8 texture_type,
LLGLint internal_format,
@@ -540,7 +540,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id,
if (image_id.isNull())
{
- return (LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI));
+ return (LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, FTT_DEFAULT, true, LLGLTexture::BOOST_UI));
}
LLPointer<LLViewerFetchedTexture> imagep = findImage(image_id, get_element_type(boost_priority));
@@ -578,7 +578,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id,
//when this function is called, there is no such texture in the gTextureList with image_id.
LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id,
FTType f_type,
- BOOL usemipmaps,
+ bool usemipmaps,
LLViewerTexture::EBoostLevel boost_priority,
S8 texture_type,
LLGLint internal_format,
@@ -682,7 +682,7 @@ void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image)
{
LL_WARNS() << "Error happens when insert image " << image->getID() << " into mImageList!" << LL_ENDL ;
}
- image->setInImageList(TRUE) ;
+ image->setInImageList(true) ;
}
}
@@ -733,7 +733,7 @@ void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image)
}
}
- image->setInImageList(FALSE) ;
+ image->setInImageList(false) ;
}
void LLViewerTextureList::addImage(LLViewerFetchedTexture *new_image, ETexListType tex_type)
@@ -791,18 +791,18 @@ void LLViewerTextureList::dirtyImage(LLViewerFetchedTexture *image)
void LLViewerTextureList::updateImages(F32 max_time)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
- static BOOL cleared = FALSE;
+ static bool cleared = false;
if(gTeleportDisplay)
{
if(!cleared)
{
clearFetchingRequests();
gPipeline.clearRebuildGroups();
- cleared = TRUE;
+ cleared = true;
}
return;
}
- cleared = FALSE;
+ cleared = false;
LLAppViewer::getTextureFetch()->setTextureBandwidth(LLTrace::get_frame_recording().getPeriodMeanPerSec(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED).value());
@@ -881,7 +881,7 @@ static void touch_texture(LLViewerFetchedTexture* tex, F32 vsize)
}
}
-extern BOOL gCubeSnapshot;
+extern bool gCubeSnapshot;
void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imagep)
{
@@ -894,6 +894,8 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
llassert(!gCubeSnapshot);
static LLCachedControl<F32> bias_distance_scale(gSavedSettings, "TextureBiasDistanceScale", 1.f);
+ static LLCachedControl<F32> texture_scale_min(gSavedSettings, "TextureScaleMinAreaFactor", 0.04f);
+ static LLCachedControl<F32> texture_scale_max(gSavedSettings, "TextureScaleMaxAreaFactor", 25.f);
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE
{
@@ -907,27 +909,27 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
{
F32 vsize = face->getPixelArea();
- // scale desired texture resolution higher or lower depending on texture scale
+ // Scale desired texture resolution higher or lower depending on texture scale
+ //
+ // Minimum usage examples: a 1024x1024 texture with aplhabet, runing string
+ // shows one letter at a time
+ //
+ // Maximum usage examples: huge chunk of terrain repeats texture
const LLTextureEntry* te = face->getTextureEntry();
F32 min_scale = te ? llmin(fabsf(te->getScaleS()), fabsf(te->getScaleT())) : 1.f;
- min_scale = llmax(min_scale*min_scale, 0.1f);
+ min_scale = llclamp(min_scale*min_scale, texture_scale_min(), texture_scale_max());
vsize /= min_scale;
-
-#if LL_DARWIN
- vsize /= 1.f + LLViewerTexture::sDesiredDiscardBias*(1.f+face->getDrawable()->mDistanceWRTCamera*bias_distance_scale);
-#else
vsize /= LLViewerTexture::sDesiredDiscardBias;
vsize /= llmax(1.f, (LLViewerTexture::sDesiredDiscardBias-1.f) * (1.f + face->getDrawable()->mDistanceWRTCamera * bias_distance_scale));
F32 radius;
F32 cos_angle_to_view_dir;
- BOOL in_frustum = face->calcPixelArea(cos_angle_to_view_dir, radius);
+ bool in_frustum = face->calcPixelArea(cos_angle_to_view_dir, radius);
if (!in_frustum || !face->getDrawable()->isVisible())
{ // further reduce by discard bias when off screen or occluded
vsize /= LLViewerTexture::sDesiredDiscardBias;
}
-#endif
// if a GLTF material is present, ignore that face
// as far as this texture stats go, but update the GLTF material
// stats
@@ -1182,7 +1184,7 @@ void LLViewerTextureList::updateImagesUpdateStats()
LLViewerFetchedTexture* imagep = *iter++;
imagep->resetTextureStats();
}
- mForceResetTextureStats = FALSE;
+ mForceResetTextureStats = false;
}
}
@@ -1201,7 +1203,7 @@ void LLViewerTextureList::decodeAllImages(F32 max_time)
{
LLViewerFetchedTexture* imagep = *iter++;
image_list.push_back(imagep);
- imagep->setInImageList(FALSE) ;
+ imagep->setInImageList(false) ;
}
llassert_always(image_list.size() == mImageList.size()) ;
@@ -1266,6 +1268,8 @@ bool LLViewerTextureList::createUploadFile(LLPointer<LLImageRaw> raw_image,
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
+ LLImageDataSharedLock lock(raw_image);
+
// make a copy, since convertToUploadFile scales raw image
LLPointer<LLImageRaw> scale_image = new LLImageRaw(
raw_image->getData(),
@@ -1299,7 +1303,7 @@ bool LLViewerTextureList::createUploadFile(LLPointer<LLImageRaw> raw_image,
return true;
}
-BOOL LLViewerTextureList::createUploadFile(const std::string& filename,
+bool LLViewerTextureList::createUploadFile(const std::string& filename,
const std::string& out_filename,
const U8 codec,
const S32 max_image_dimentions,
@@ -1312,25 +1316,25 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename,
if (image.isNull())
{
LL_WARNS() << "Couldn't open the image to be uploaded." << LL_ENDL;
- return FALSE;
+ return false;
}
if (!image->load(filename))
{
image->setLastError("Couldn't load the image to be uploaded.");
- return FALSE;
+ return false;
}
// Decompress or expand it in a raw image structure
LLPointer<LLImageRaw> raw_image = new LLImageRaw;
if (!image->decode(raw_image, 0.0f))
{
image->setLastError("Couldn't decode the image to be uploaded.");
- return FALSE;
+ return false;
}
// Check the image constraints
if ((image->getComponents() != 3) && (image->getComponents() != 4))
{
image->setLastError("Image files with less than 3 or more than 4 components are not supported.");
- return FALSE;
+ return false;
}
if (image->getWidth() < min_image_dimentions || image->getHeight() < min_image_dimentions)
{
@@ -1340,7 +1344,7 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename,
image->getWidth(),
image->getHeight());
image->setLastError(reason);
- return FALSE;
+ return false;
}
// Convert to j2c (JPEG2000) and save the file locally
LLPointer<LLImageJ2C> compressedImage = convertToUploadFile(raw_image, max_image_dimentions, force_square);
@@ -1348,13 +1352,13 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename,
{
image->setLastError("Couldn't convert the image to jpeg2000.");
LL_INFOS() << "Couldn't convert to j2c, file : " << filename << LL_ENDL;
- return FALSE;
+ return false;
}
if (!compressedImage->save(out_filename))
{
image->setLastError("Couldn't create the jpeg2000 image for upload.");
LL_INFOS() << "Couldn't create output file : " << out_filename << LL_ENDL;
- return FALSE;
+ return false;
}
// Test to see if the encode and save worked
LLPointer<LLImageJ2C> integrity_test = new LLImageJ2C;
@@ -1362,15 +1366,17 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename,
{
image->setLastError("The created jpeg2000 image is corrupt.");
LL_INFOS() << "Image file : " << out_filename << " is corrupt" << LL_ENDL;
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
// note: modifies the argument raw_image!!!!
LLPointer<LLImageJ2C> LLViewerTextureList::convertToUploadFile(LLPointer<LLImageRaw> raw_image, const S32 max_image_dimentions, bool force_square, bool force_lossless)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
+ LLImageDataLock lock(raw_image);
+
if (force_square)
{
S32 biggest_side = llmax(raw_image->getWidth(), raw_image->getHeight());
@@ -1388,7 +1394,7 @@ LLPointer<LLImageJ2C> LLViewerTextureList::convertToUploadFile(LLPointer<LLImage
(gSavedSettings.getBOOL("LosslessJ2CUpload") &&
(raw_image->getWidth() * raw_image->getHeight() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF * LL_IMAGE_REZ_LOSSLESS_CUTOFF)))
{
- compressedImage->setReversible(TRUE);
+ compressedImage->setReversible(true);
}
@@ -1464,7 +1470,7 @@ LLUIImagePtr LLUIImageList::getUIImageByID(const LLUUID& image_id, S32 priority)
return found_it->second;
}
- const BOOL use_mips = FALSE;
+ const bool use_mips = false;
const LLRect scale_rect = LLRect::null;
const LLRect clip_rect = LLRect::null;
return loadUIImageByID(image_id, use_mips, scale_rect, clip_rect, (LLViewerTexture::EBoostLevel)priority);
@@ -1480,14 +1486,14 @@ LLUIImagePtr LLUIImageList::getUIImage(const std::string& image_name, S32 priori
return found_it->second;
}
- const BOOL use_mips = FALSE;
+ const bool use_mips = false;
const LLRect scale_rect = LLRect::null;
const LLRect clip_rect = LLRect::null;
return loadUIImageByName(image_name, image_name, use_mips, scale_rect, clip_rect, (LLViewerTexture::EBoostLevel)priority);
}
LLUIImagePtr LLUIImageList::loadUIImageByName(const std::string& name, const std::string& filename,
- BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority,
+ bool use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority,
LLUIImage::EScaleStyle scale_style)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
@@ -1500,7 +1506,7 @@ LLUIImagePtr LLUIImageList::loadUIImageByName(const std::string& name, const std
}
LLUIImagePtr LLUIImageList::loadUIImageByID(const LLUUID& id,
- BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority,
+ bool use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority,
LLUIImage::EScaleStyle scale_style)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
@@ -1512,7 +1518,7 @@ LLUIImagePtr LLUIImageList::loadUIImageByID(const LLUUID& id,
return loadUIImage(imagep, id.asString(), use_mips, scale_rect, clip_rect, scale_style);
}
-LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect,
+LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, bool use_mips, const LLRect& scale_rect, const LLRect& clip_rect,
LLUIImage::EScaleStyle scale_style)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
@@ -1547,12 +1553,12 @@ LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const st
datap->mImageScaleRegion = scale_rect;
datap->mImageClipRegion = clip_rect;
- imagep->setLoadedCallback(onUIImageLoaded, 0, FALSE, FALSE, datap, NULL);
+ imagep->setLoadedCallback(onUIImageLoaded, 0, false, false, datap, NULL);
}
return new_imagep;
}
-LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLUIImage::EScaleStyle scale_style)
+LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::string& filename, bool use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLUIImage::EScaleStyle scale_style)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
// look for existing image
@@ -1567,7 +1573,7 @@ LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::s
}
//static
-void LLUIImageList::onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* user_data )
+void LLUIImageList::onUIImageLoaded( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, bool final, void* user_data )
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
if(!success || !user_data)
diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h
index 10a2cfa32a..cf53d07f2f 100644
--- a/indra/newview/llviewertexturelist.h
+++ b/indra/newview/llviewertexturelist.h
@@ -38,25 +38,25 @@
const U32 LL_IMAGE_REZ_LOSSLESS_CUTOFF = 128;
-const BOOL MIPMAP_YES = TRUE;
-const BOOL MIPMAP_NO = FALSE;
+const bool MIPMAP_YES = true;
+const bool MIPMAP_NO = false;
-const BOOL GL_TEXTURE_YES = TRUE;
-const BOOL GL_TEXTURE_NO = FALSE;
+const bool GL_TEXTURE_YES = true;
+const bool GL_TEXTURE_NO = false;
-const BOOL IMMEDIATE_YES = TRUE;
-const BOOL IMMEDIATE_NO = FALSE;
+const bool IMMEDIATE_YES = true;
+const bool IMMEDIATE_NO = false;
class LLImageJ2C;
class LLMessageSystem;
class LLTextureView;
-typedef void (*LLImageCallback)(BOOL success,
+typedef void (*LLImageCallback)(bool success,
LLViewerFetchedTexture *src_vi,
LLImageRaw* src,
LLImageRaw* src_aux,
S32 discard_level,
- BOOL final,
+ bool final,
void* userdata);
enum ETexListType
@@ -96,7 +96,7 @@ public:
const std::string& out_filename,
const S32 max_image_dimentions = LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT,
const S32 min_image_dimentions = 0);
- static BOOL createUploadFile(const std::string& filename,
+ static bool createUploadFile(const std::string& filename,
const std::string& out_filename,
const U8 codec,
const S32 max_image_dimentions = LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT,
@@ -115,9 +115,9 @@ public:
void init();
void shutdown();
void dump();
- void destroyGL(BOOL save_state = TRUE);
+ void destroyGL(bool save_state = true);
void restoreGL();
- BOOL isInitialized() const {return mInitialized;}
+ bool isInitialized() const {return mInitialized;}
void findTexturesByID(const LLUUID &image_id, std::vector<LLViewerFetchedTexture*> &output);
LLViewerFetchedTexture *findImage(const LLUUID &image_id, ETexListType tex_type);
@@ -164,7 +164,7 @@ private:
LLViewerFetchedTexture * getImage(const LLUUID &image_id,
FTType f_type = FTT_DEFAULT,
- BOOL usemipmap = TRUE,
+ bool usemipmap = true,
LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_NONE, // Get the requested level immediately upon creation.
S8 texture_type = LLViewerTexture::FETCHED_TEXTURE,
LLGLint internal_format = 0,
@@ -174,7 +174,7 @@ private:
LLViewerFetchedTexture * getImageFromFile(const std::string& filename,
FTType f_type = FTT_LOCAL_FILE,
- BOOL usemipmap = TRUE,
+ bool usemipmap = true,
LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_NONE, // Get the requested level immediately upon creation.
S8 texture_type = LLViewerTexture::FETCHED_TEXTURE,
LLGLint internal_format = 0,
@@ -184,7 +184,7 @@ private:
LLViewerFetchedTexture* getImageFromUrl(const std::string& url,
FTType f_type,
- BOOL usemipmap = TRUE,
+ bool usemipmap = true,
LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_NONE, // Get the requested level immediately upon creation.
S8 texture_type = LLViewerTexture::FETCHED_TEXTURE,
LLGLint internal_format = 0,
@@ -194,7 +194,7 @@ private:
LLViewerFetchedTexture* createImage(const LLUUID &image_id,
FTType f_type,
- BOOL usemipmap = TRUE,
+ bool usemipmap = true,
LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_NONE, // Get the requested level immediately upon creation.
S8 texture_type = LLViewerTexture::FETCHED_TEXTURE,
LLGLint internal_format = 0,
@@ -205,7 +205,7 @@ private:
// Request image from a specific host, used for baked avatar textures.
// Implemented in header in case someone changes default params above. JC
LLViewerFetchedTexture* getImageFromHost(const LLUUID& image_id, FTType f_type, LLHost host)
- { return getImage(image_id, f_type, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host); }
+ { return getImage(image_id, f_type, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host); }
public:
typedef std::set<LLPointer<LLViewerFetchedTexture> > image_list_t;
@@ -217,7 +217,7 @@ public:
// Note: just raw pointers because they are never referenced, just compared against
std::set<LLViewerFetchedTexture*> mDirtyTextureList;
- BOOL mForceResetTextureStats;
+ bool mForceResetTextureStats;
private:
typedef std::map< LLTextureKey, LLPointer<LLViewerFetchedTexture> > uuid_map_t;
@@ -230,7 +230,7 @@ private:
// simply holds on to LLViewerFetchedTexture references to stop them from being purged too soon
std::set<LLPointer<LLViewerFetchedTexture> > mImagePreloads;
- BOOL mInitialized ;
+ bool mInitialized ;
LLFrameTimer mForceDecodeTimer;
private:
@@ -250,22 +250,22 @@ public:
bool initFromFile();
- LLPointer<LLUIImage> preloadUIImage(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLUIImage::EScaleStyle stype);
+ LLPointer<LLUIImage> preloadUIImage(const std::string& name, const std::string& filename, bool use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLUIImage::EScaleStyle stype);
- static void onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata );
+ static void onUIImageLoaded( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, bool final, void* userdata );
private:
LLPointer<LLUIImage> loadUIImageByName(const std::string& name, const std::string& filename,
- BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null,
+ bool use_mips = false, const LLRect& scale_rect = LLRect::null,
const LLRect& clip_rect = LLRect::null,
LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_UI,
LLUIImage::EScaleStyle = LLUIImage::SCALE_INNER);
LLPointer<LLUIImage> loadUIImageByID(const LLUUID& id,
- BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null,
+ bool use_mips = false, const LLRect& scale_rect = LLRect::null,
const LLRect& clip_rect = LLRect::null,
LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_UI,
LLUIImage::EScaleStyle = LLUIImage::SCALE_INNER);
- LLPointer<LLUIImage> loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, const LLRect& clip_rect = LLRect::null, LLUIImage::EScaleStyle = LLUIImage::SCALE_INNER);
+ LLPointer<LLUIImage> loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, bool use_mips = false, const LLRect& scale_rect = LLRect::null, const LLRect& clip_rect = LLRect::null, LLUIImage::EScaleStyle = LLUIImage::SCALE_INNER);
struct LLUIImageLoadData
@@ -284,10 +284,10 @@ private:
std::list< LLPointer<LLViewerFetchedTexture> > mUITextureList ;
};
-const BOOL GLTEXTURE_TRUE = TRUE;
-const BOOL GLTEXTURE_FALSE = FALSE;
-const BOOL MIPMAP_TRUE = TRUE;
-const BOOL MIPMAP_FALSE = FALSE;
+const bool GLTEXTURE_TRUE = true;
+const bool GLTEXTURE_FALSE = false;
+const bool MIPMAP_TRUE = true;
+const bool MIPMAP_FALSE = false;
extern LLViewerTextureList gTextureList;
diff --git a/indra/newview/llviewerthrottle.cpp b/indra/newview/llviewerthrottle.cpp
index 20390a316a..5de825e972 100644
--- a/indra/newview/llviewerthrottle.cpp
+++ b/indra/newview/llviewerthrottle.cpp
@@ -207,7 +207,7 @@ LLViewerThrottle::LLViewerThrottle() :
}
-void LLViewerThrottle::setMaxBandwidth(F32 kbits_per_second, BOOL from_event)
+void LLViewerThrottle::setMaxBandwidth(F32 kbits_per_second, bool from_event)
{
if (!from_event)
{
diff --git a/indra/newview/llviewerthrottle.h b/indra/newview/llviewerthrottle.h
index fe54b06662..33fb51db0e 100644
--- a/indra/newview/llviewerthrottle.h
+++ b/indra/newview/llviewerthrottle.h
@@ -58,7 +58,7 @@ class LLViewerThrottle
public:
LLViewerThrottle();
- void setMaxBandwidth(F32 kbits_per_second, BOOL from_event = FALSE);
+ void setMaxBandwidth(F32 kbits_per_second, bool from_event = false);
void load();
void save() const;
diff --git a/indra/newview/llviewerwearable.cpp b/indra/newview/llviewerwearable.cpp
index bc21b5bf84..cb95b819e3 100644
--- a/indra/newview/llviewerwearable.cpp
+++ b/indra/newview/llviewerwearable.cpp
@@ -74,7 +74,7 @@ static std::string asset_id_to_filename(const LLUUID &asset_id, const ELLPath di
LLViewerWearable::LLViewerWearable(const LLTransactionID& transaction_id) :
LLWearable(),
- mVolatile(FALSE)
+ mVolatile(false)
{
mTransactionID = transaction_id;
mAssetID = mTransactionID.makeAssetID(gAgent.getSecureSessionID());
@@ -82,7 +82,7 @@ LLViewerWearable::LLViewerWearable(const LLTransactionID& transaction_id) :
LLViewerWearable::LLViewerWearable(const LLAssetID& asset_id) :
LLWearable(),
- mVolatile(FALSE)
+ mVolatile(false)
{
mAssetID = asset_id;
mTransactionID.setNull();
@@ -128,7 +128,7 @@ LLWearable::EImportResult LLViewerWearable::importStream( std::istream& input_st
LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture( textureid );
if(gSavedSettings.getBOOL("DebugAvatarLocalTexLoadedTime"))
{
- image->setLoadedCallback(LLVOAvatarSelf::debugOnTimingLocalTexLoaded,0,TRUE,FALSE, new LLVOAvatarSelf::LLAvatarTexData(textureid, (LLAvatarAppearanceDefines::ETextureIndex)te), NULL);
+ image->setLoadedCallback(LLVOAvatarSelf::debugOnTimingLocalTexLoaded,0,true,false, new LLVOAvatarSelf::LLAvatarTexData(textureid, (LLAvatarAppearanceDefines::ETextureIndex)te), NULL);
}
}
@@ -139,9 +139,9 @@ LLWearable::EImportResult LLViewerWearable::importStream( std::istream& input_st
// Avatar parameter and texture definitions can change over time.
// This function returns true if parameters or textures have been added or removed
// since this wearable was created.
-BOOL LLViewerWearable::isOldVersion() const
+bool LLViewerWearable::isOldVersion() const
{
- if (!isAgentAvatarValid()) return FALSE;
+ if (!isAgentAvatarValid()) return false;
if( LLWearable::sCurrentDefinitionVersion < mDefinitionVersion )
{
@@ -151,7 +151,7 @@ BOOL LLViewerWearable::isOldVersion() const
if( LLWearable::sCurrentDefinitionVersion != mDefinitionVersion )
{
- return TRUE;
+ return true;
}
S32 param_count = 0;
@@ -164,13 +164,13 @@ BOOL LLViewerWearable::isOldVersion() const
param_count++;
if( !is_in_map(mVisualParamIndexMap, param->getID() ) )
{
- return TRUE;
+ return true;
}
}
}
if( param_count != mVisualParamIndexMap.size() )
{
- return TRUE;
+ return true;
}
@@ -182,16 +182,16 @@ BOOL LLViewerWearable::isOldVersion() const
te_count++;
if( !is_in_map(mTEMap, te ) )
{
- return TRUE;
+ return true;
}
}
}
if( te_count != mTEMap.size() )
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
// Avatar parameter and texture definitions can change over time.
@@ -201,9 +201,9 @@ BOOL LLViewerWearable::isOldVersion() const
// * If parameters or textures have been ADDED since the wearable was created,
// they are taken to have default values, so we consider the wearable clean
// only if those values are the same as the defaults.
-BOOL LLViewerWearable::isDirty() const
+bool LLViewerWearable::isDirty() const
{
- if (!isAgentAvatarValid()) return FALSE;
+ if (!isAgentAvatarValid()) return false;
for( LLViewerVisualParam* param = (LLViewerVisualParam*) gAgentAvatarp->getFirstVisualParam();
param;
@@ -222,7 +222,7 @@ BOOL LLViewerWearable::isDirty() const
U8 b = F32_to_U8( current_weight, param->getMinWeight(), param->getMaxWeight() );
if( a != b )
{
- return TRUE;
+ return true;
}
}
}
@@ -242,19 +242,19 @@ BOOL LLViewerWearable::isDirty() const
if (saved_image_id != current_image_id)
{
// saved vs current images are different, wearable is dirty
- return TRUE;
+ return true;
}
}
else
{
// image found in current image list but not saved image list
- return TRUE;
+ return true;
}
}
}
}
- return FALSE;
+ return false;
}
@@ -342,7 +342,7 @@ void LLViewerWearable::writeToAvatar(LLAvatarAppearance *avatarp)
{
image_id = getDefaultTextureImageID((ETextureIndex) te);
}
- LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture( image_id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE );
+ LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture( image_id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE );
// MULTI-WEARABLE: assume index 0 will be used when writing to avatar. TODO: eliminate the need for this.
viewer_avatar->setLocalTextureTE(te, image, 0);
}
diff --git a/indra/newview/llviewerwearable.h b/indra/newview/llviewerwearable.h
index 24b1323b2b..c1081bcb6e 100644
--- a/indra/newview/llviewerwearable.h
+++ b/indra/newview/llviewerwearable.h
@@ -58,8 +58,8 @@ public:
public:
- BOOL isDirty() const;
- BOOL isOldVersion() const;
+ bool isDirty() const;
+ bool isOldVersion() const;
/*virtual*/ void writeToAvatar(LLAvatarAppearance *avatarp);
void removeFromAvatar() { LLViewerWearable::removeFromAvatar( mType); }
@@ -69,8 +69,8 @@ public:
void setParamsToDefaults();
void setTexturesToDefaults();
- void setVolatile(BOOL is_volatile) { mVolatile = is_volatile; } // TRUE when doing preview renders, some updates will be suppressed.
- BOOL getVolatile() { return mVolatile; }
+ void setVolatile(bool is_volatile) { mVolatile = is_volatile; } // true when doing preview renders, some updates will be suppressed.
+ bool getVolatile() { return mVolatile; }
/*virtual*/ LLUUID getDefaultTextureImageID(LLAvatarAppearanceDefines::ETextureIndex index) const;
@@ -98,7 +98,7 @@ protected:
LLAssetID mAssetID;
LLTransactionID mTransactionID;
- BOOL mVolatile; // True when rendering preview images. Can suppress some updates.
+ bool mVolatile; // True when rendering preview images. Can suppress some updates.
LLUUID mItemID; // ID of the inventory item in the agent's inventory
};
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 37e64dfc17..f9d5f5ea5d 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -224,19 +224,19 @@
void render_ui(F32 zoom_factor = 1.f, int subfield = 0);
void swap();
-extern BOOL gDebugClicks;
-extern BOOL gDisplaySwapBuffers;
-extern BOOL gDepthDirty;
-extern BOOL gResizeScreenTexture;
-extern BOOL gCubeSnapshot;
-extern BOOL gSnapshotNoPost;
+extern bool gDebugClicks;
+extern bool gDisplaySwapBuffers;
+extern bool gDepthDirty;
+extern bool gResizeScreenTexture;
+extern bool gCubeSnapshot;
+extern bool gSnapshotNoPost;
LLViewerWindow *gViewerWindow = NULL;
LLFrameTimer gAwayTimer;
LLFrameTimer gAwayTriggerTimer;
-BOOL gShowOverlayTitle = FALSE;
+bool gShowOverlayTitle = false;
LLViewerObject* gDebugRaycastObject = NULL;
LLVOPartGroup* gDebugRaycastParticle = NULL;
@@ -246,17 +246,19 @@ LLVector2 gDebugRaycastTexCoord;
LLVector4a gDebugRaycastNormal;
LLVector4a gDebugRaycastTangent;
S32 gDebugRaycastFaceHit;
+S32 gDebugRaycastGLTFNodeHit;
+S32 gDebugRaycastGLTFPrimitiveHit;
LLVector4a gDebugRaycastStart;
LLVector4a gDebugRaycastEnd;
// HUD display lines in lower right
-BOOL gDisplayWindInfo = FALSE;
-BOOL gDisplayCameraPos = FALSE;
-BOOL gDisplayFOV = FALSE;
-BOOL gDisplayBadge = FALSE;
+bool gDisplayWindInfo = false;
+bool gDisplayCameraPos = false;
+bool gDisplayFOV = false;
+bool gDisplayBadge = false;
static const U8 NO_FACE = 255;
-BOOL gQuietSnapshot = FALSE;
+bool gQuietSnapshot = false;
// Minimum value for UIScaleFactor, also defined in preferences, ui_scale_slider
static const F32 MIN_UI_SCALE = 0.75f;
@@ -291,7 +293,7 @@ public:
// chat.mText = message;
// chat.mSourceType = CHAT_SOURCE_SYSTEM;
- // chat_floater->addChat(chat, FALSE, FALSE);
+ // chat_floater->addChat(chat, false, false);
//}
//}
}
@@ -996,7 +998,7 @@ void LLViewerWindow::handlePieMenu(S32 x, S32 y, MASK mask)
}
}
-BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down, bool& is_toolmgr_action)
+bool LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, EMouseClickType clicktype, bool down, bool& is_toolmgr_action)
{
const char* buttonname = "";
const char* buttonstatestr = "";
@@ -1088,7 +1090,7 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK m
LL_INFOS() << buttonname << " Mouse " << buttonstatestr << " handled by captor " << mouse_captor->getName() << LL_ENDL;
}
- BOOL r = mouse_captor->handleAnyMouseClick(local_x, local_y, mask, clicktype, down);
+ bool r = mouse_captor->handleAnyMouseClick(local_x, local_y, mask, clicktype, down);
if (r) {
LL_DEBUGS() << "LLViewerWindow::handleAnyMouseClick viewer with mousecaptor calling updatemouseeventinfo - local_x|global x "<< local_x << " " << x << "local/global y " << local_y << " " << y << LL_ENDL;
@@ -1100,7 +1102,7 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK m
else if (down && clicktype == CLICK_RIGHT)
{
handlePieMenu(x, y, mask);
- r = TRUE;
+ r = true;
}
return r;
}
@@ -1108,11 +1110,11 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK m
// Mark the click as handled and return if we aren't within the root view to avoid spurious bugs
if( !mRootView->pointInView(x, y) )
{
- return TRUE;
+ return true;
}
// Give the UI views a chance to process the click
- BOOL r= mRootView->handleAnyMouseClick(x, y, mask, clicktype, down) ;
+ bool r= mRootView->handleAnyMouseClick(x, y, mask, clicktype, down) ;
if (r)
{
@@ -1134,7 +1136,7 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK m
{
LL_INFOS() << buttonname << " Mouse " << buttonstatestr << " " << LLViewerEventRecorder::instance().get_xui() << LL_ENDL;
}
- return TRUE;
+ return true;
} else if (LLView::sDebugMouseHandling)
{
LL_INFOS() << buttonname << " Mouse " << buttonstatestr << " not handled by view" << LL_ENDL;
@@ -1146,24 +1148,24 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK m
{
LLViewerEventRecorder::instance().clear_xui();
is_toolmgr_action = true;
- return TRUE;
+ return true;
}
if (down && clicktype == CLICK_RIGHT)
{
handlePieMenu(x, y, mask);
- return TRUE;
+ return true;
}
// If we got this far on a down-click, it wasn't handled.
// Up-clicks, though, are always handled as far as the OS is concerned.
- BOOL default_rtn = !down;
+ bool default_rtn = !down;
return default_rtn;
}
-BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask)
+bool LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask)
{
- mAllowMouseDragging = FALSE;
+ mAllowMouseDragging = false;
if (!mMouseDownTimer.getStarted())
{
mMouseDownTimer.start();
@@ -1172,51 +1174,51 @@ BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask
{
mMouseDownTimer.reset();
}
- BOOL down = TRUE;
+ bool down = true;
//handleMouse() loops back to LLViewerWindow::handleAnyMouseClick
return gViewerInput.handleMouse(window, pos, mask, CLICK_LEFT, down);
}
-BOOL LLViewerWindow::handleDoubleClick(LLWindow *window, LLCoordGL pos, MASK mask)
+bool LLViewerWindow::handleDoubleClick(LLWindow *window, LLCoordGL pos, MASK mask)
{
// try handling as a double-click first, then a single-click if that
// wasn't handled.
- BOOL down = TRUE;
+ bool down = true;
if (gViewerInput.handleMouse(window, pos, mask, CLICK_DOUBLELEFT, down))
{
- return TRUE;
+ return true;
}
return handleMouseDown(window, pos, mask);
}
-BOOL LLViewerWindow::handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask)
+bool LLViewerWindow::handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask)
{
if (mMouseDownTimer.getStarted())
{
mMouseDownTimer.stop();
}
- BOOL down = FALSE;
+ bool down = false;
return gViewerInput.handleMouse(window, pos, mask, CLICK_LEFT, down);
}
-BOOL LLViewerWindow::handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK mask)
+bool LLViewerWindow::handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK mask)
{
- BOOL down = TRUE;
+ bool down = true;
return gViewerInput.handleMouse(window, pos, mask, CLICK_RIGHT, down);
}
-BOOL LLViewerWindow::handleRightMouseUp(LLWindow *window, LLCoordGL pos, MASK mask)
+bool LLViewerWindow::handleRightMouseUp(LLWindow *window, LLCoordGL pos, MASK mask)
{
- BOOL down = FALSE;
+ bool down = false;
return gViewerInput.handleMouse(window, pos, mask, CLICK_RIGHT, down);
}
-BOOL LLViewerWindow::handleMiddleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask)
+bool LLViewerWindow::handleMiddleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask)
{
- BOOL down = TRUE;
+ bool down = true;
gViewerInput.handleMouse(window, pos, mask, CLICK_MIDDLE, down);
// Always handled as far as the OS is concerned.
- return TRUE;
+ return true;
}
LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *window, LLCoordGL pos, MASK mask, LLWindowCallbacks::DragNDropAction action, std::string data)
@@ -1254,8 +1256,8 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi
if (prim_media_dnd_enabled)
{
LLPickInfo pick_info = pickImmediate( pos.mX, pos.mY,
- TRUE /* pick_transparent */,
- FALSE /* pick_rigged */);
+ true /* pick_transparent */,
+ false /* pick_rigged */);
S32 object_face = pick_info.mObjectFace;
std::string url = data;
@@ -1364,16 +1366,16 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi
return result;
}
-BOOL LLViewerWindow::handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask)
+bool LLViewerWindow::handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask)
{
- BOOL down = FALSE;
+ bool down = false;
gViewerInput.handleMouse(window, pos, mask, CLICK_MIDDLE, down);
// Always handled as far as the OS is concerned.
- return TRUE;
+ return true;
}
-BOOL LLViewerWindow::handleOtherMouse(LLWindow *window, LLCoordGL pos, MASK mask, S32 button, bool down)
+bool LLViewerWindow::handleOtherMouse(LLWindow *window, LLCoordGL pos, MASK mask, S32 button, bool down)
{
switch (button)
{
@@ -1388,17 +1390,17 @@ BOOL LLViewerWindow::handleOtherMouse(LLWindow *window, LLCoordGL pos, MASK mask
}
// Always handled as far as the OS is concerned.
- return TRUE;
+ return true;
}
-BOOL LLViewerWindow::handleOtherMouseDown(LLWindow *window, LLCoordGL pos, MASK mask, S32 button)
+bool LLViewerWindow::handleOtherMouseDown(LLWindow *window, LLCoordGL pos, MASK mask, S32 button)
{
- return handleOtherMouse(window, pos, mask, button, TRUE);
+ return handleOtherMouse(window, pos, mask, button, true);
}
-BOOL LLViewerWindow::handleOtherMouseUp(LLWindow *window, LLCoordGL pos, MASK mask, S32 button)
+bool LLViewerWindow::handleOtherMouseUp(LLWindow *window, LLCoordGL pos, MASK mask, S32 button)
{
- return handleOtherMouse(window, pos, mask, button, FALSE);
+ return handleOtherMouse(window, pos, mask, button, false);
}
// WARNING: this is potentially called multiple times per frame
@@ -1410,7 +1412,7 @@ void LLViewerWindow::handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask
x = ll_round((F32)x / mDisplayScale.mV[VX]);
y = ll_round((F32)y / mDisplayScale.mV[VY]);
- mMouseInWindow = TRUE;
+ mMouseInWindow = true;
// Save mouse point for access during idle() and display()
@@ -1438,7 +1440,7 @@ void LLViewerWindow::handleMouseDragged(LLWindow *window, LLCoordGL pos, MASK m
{
if (mMouseDownTimer.getElapsedTimeF32() > 0.1)
{
- mAllowMouseDragging = TRUE;
+ mAllowMouseDragging = true;
mMouseDownTimer.stop();
}
}
@@ -1452,17 +1454,17 @@ void LLViewerWindow::handleMouseLeave(LLWindow *window)
{
// Note: we won't get this if we have captured the mouse.
llassert( gFocusMgr.getMouseCapture() == NULL );
- mMouseInWindow = FALSE;
+ mMouseInWindow = false;
LLToolTipMgr::instance().blockToolTips();
}
-BOOL LLViewerWindow::handleCloseRequest(LLWindow *window)
+bool LLViewerWindow::handleCloseRequest(LLWindow *window)
{
// User has indicated they want to close, but we may need to ask
// about modified documents.
LLAppViewer::instance()->userQuit();
// Don't quit immediately
- return FALSE;
+ return false;
}
void LLViewerWindow::handleQuit(LLWindow *window)
@@ -1487,7 +1489,7 @@ void LLViewerWindow::handleResize(LLWindow *window, S32 width, S32 height)
// The top-level window has gained focus (e.g. via ALT-TAB)
void LLViewerWindow::handleFocus(LLWindow *window)
{
- gFocusMgr.setAppHasFocus(TRUE);
+ gFocusMgr.setAppHasFocus(true);
LLModalDialog::onAppFocusGained();
gAgent.onAppFocusGained();
@@ -1507,7 +1509,7 @@ void LLViewerWindow::handleFocus(LLWindow *window)
// The top-level window has lost focus (e.g. via ALT-TAB)
void LLViewerWindow::handleFocusLost(LLWindow *window)
{
- gFocusMgr.setAppHasFocus(FALSE);
+ gFocusMgr.setAppHasFocus(false);
//LLModalDialog::onAppFocusLost();
LLToolMgr::getInstance()->onAppFocusLost();
gFocusMgr.setMouseCapture( NULL );
@@ -1520,7 +1522,7 @@ void LLViewerWindow::handleFocusLost(LLWindow *window)
// restore mouse cursor
showCursor();
- getWindow()->setMouseClipping(FALSE);
+ getWindow()->setMouseClipping(false);
// If losing focus while keys are down, handle them as
// an 'up' to correctly release states, then reset states
@@ -1535,7 +1537,7 @@ void LLViewerWindow::handleFocusLost(LLWindow *window)
}
-BOOL LLViewerWindow::handleTranslatedKeyDown(KEY key, MASK mask, BOOL repeated)
+bool LLViewerWindow::handleTranslatedKeyDown(KEY key, MASK mask, bool repeated)
{
// Handle non-consuming global keybindings, like voice
// Never affects event processing.
@@ -1556,14 +1558,14 @@ BOOL LLViewerWindow::handleTranslatedKeyDown(KEY key, MASK mask, BOOL repeated)
// would like to know about the KEYDOWN for an enter key... so ask and pass it along.
LLFocusableElement* keyboard_focus = gFocusMgr.getKeyboardFocus();
if (keyboard_focus && !keyboard_focus->wantsReturnKey())
- return FALSE;
+ return false;
}
// remaps, handles ignored cases and returns back to viewer window.
return gViewerInput.handleKey(key, mask, repeated);
}
-BOOL LLViewerWindow::handleTranslatedKeyUp(KEY key, MASK mask)
+bool LLViewerWindow::handleTranslatedKeyUp(KEY key, MASK mask)
{
// Handle non-consuming global keybindings, like voice
// Never affects event processing.
@@ -1579,7 +1581,7 @@ BOOL LLViewerWindow::handleTranslatedKeyUp(KEY key, MASK mask)
return gViewerInput.handleKeyUp(key, mask);
}
-void LLViewerWindow::handleScanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level)
+void LLViewerWindow::handleScanKey(KEY key, bool key_down, bool key_up, bool key_level)
{
LLViewerJoystick::getInstance()->setCameraNeedsUpdate(true);
gViewerInput.scanKey(key, key_down, key_up, key_level);
@@ -1589,7 +1591,7 @@ void LLViewerWindow::handleScanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key
-BOOL LLViewerWindow::handleActivate(LLWindow *window, BOOL activated)
+bool LLViewerWindow::handleActivate(LLWindow *window, bool activated)
{
if (activated)
{
@@ -1621,15 +1623,15 @@ BOOL LLViewerWindow::handleActivate(LLWindow *window, BOOL activated)
// Mute audio
audio_update_volume();
}
- return TRUE;
+ return true;
}
-BOOL LLViewerWindow::handleActivateApp(LLWindow *window, BOOL activating)
+bool LLViewerWindow::handleActivateApp(LLWindow *window, bool activating)
{
//if (!activating) gAgentCamera.changeCameraToDefault();
LLViewerJoystick::getInstance()->setNeedsReset(true);
- return FALSE;
+ return false;
}
@@ -1638,7 +1640,7 @@ void LLViewerWindow::handleMenuSelect(LLWindow *window, S32 menu_item)
}
-BOOL LLViewerWindow::handlePaint(LLWindow *window, S32 x, S32 y, S32 width, S32 height)
+bool LLViewerWindow::handlePaint(LLWindow *window, S32 x, S32 y, S32 width, S32 height)
{
// *TODO: Enable similar information output for other platforms? DK 2011-02-18
#if LL_WINDOWS
@@ -1675,10 +1677,10 @@ BOOL LLViewerWindow::handlePaint(LLWindow *window, S32 x, S32 y, S32 width, S
TextOutA(hdc, 0, 50, "Set \"HeadlessClient FALSE\" in settings.ini file to reenable", 61);
EndPaint(window_handle, &ps);
- return TRUE;
+ return true;
}
#endif
- return FALSE;
+ return false;
}
@@ -1722,49 +1724,49 @@ void LLViewerWindow::handleDataCopy(LLWindow *window, S32 data_type, void *data)
}
}
-BOOL LLViewerWindow::handleTimerEvent(LLWindow *window)
+bool LLViewerWindow::handleTimerEvent(LLWindow *window)
{
//TODO: just call this every frame from gatherInput instead of using a convoluted 30fps timer callback
if (LLViewerJoystick::getInstance()->getOverrideCamera())
{
LLViewerJoystick::getInstance()->updateStatus();
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-BOOL LLViewerWindow::handleDeviceChange(LLWindow *window)
+bool LLViewerWindow::handleDeviceChange(LLWindow *window)
{
// give a chance to use a joystick after startup (hot-plugging)
if (!LLViewerJoystick::getInstance()->isJoystickInitialized() )
{
LLViewerJoystick::getInstance()->init(true);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-BOOL LLViewerWindow::handleDPIChanged(LLWindow *window, F32 ui_scale_factor, S32 window_width, S32 window_height)
+bool LLViewerWindow::handleDPIChanged(LLWindow *window, F32 ui_scale_factor, S32 window_width, S32 window_height)
{
if (ui_scale_factor >= MIN_UI_SCALE && ui_scale_factor <= MAX_UI_SCALE)
{
LLViewerWindow::reshape(window_width, window_height);
mResDirty = true;
- return TRUE;
+ return true;
}
else
{
LL_WARNS() << "DPI change caused UI scale to go out of bounds: " << ui_scale_factor << LL_ENDL;
- return FALSE;
+ return false;
}
}
-BOOL LLViewerWindow::handleWindowDidChangeScreen(LLWindow *window)
+bool LLViewerWindow::handleWindowDidChangeScreen(LLWindow *window)
{
LLCoordScreen window_rect;
mWindow->getSize(&window_rect);
reshape(window_rect.mX, window_rect.mY);
- return TRUE;
+ return true;
}
void LLViewerWindow::handlePingWatchdog(LLWindow *window, const char * msg)
@@ -1815,17 +1817,17 @@ LLViewerWindow::LLViewerWindow(const Params& p)
mWindowRectRaw(0, p.height, p.width, 0),
mWindowRectScaled(0, p.height, p.width, 0),
mWorldViewRectRaw(0, p.height, p.width, 0),
- mLeftMouseDown(FALSE),
- mMiddleMouseDown(FALSE),
- mRightMouseDown(FALSE),
- mMouseInWindow( FALSE ),
- mAllowMouseDragging(TRUE),
+ mLeftMouseDown(false),
+ mMiddleMouseDown(false),
+ mRightMouseDown(false),
+ mMouseInWindow( false ),
+ mAllowMouseDragging(true),
mMouseDownTimer(),
mLastMask( MASK_NONE ),
mToolStored( NULL ),
- mHideCursorPermanent( FALSE ),
- mCursorHidden(FALSE),
- mIgnoreActivate( FALSE ),
+ mHideCursorPermanent( false ),
+ mCursorHidden(false),
+ mIgnoreActivate( false ),
mResDirty(false),
mStatesDirty(false),
mCurrResolutionIndex(0),
@@ -1854,17 +1856,25 @@ LLViewerWindow::LLViewerWindow(const Params& p)
/*
LLWindowCallbacks* callbacks,
const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height, U32 flags,
- BOOL fullscreen,
- BOOL clearBg,
- BOOL disable_vsync,
- BOOL ignore_pixel_depth,
+ bool fullscreen,
+ bool clearBg,
+ bool disable_vsync,
+ bool ignore_pixel_depth,
U32 fsaa_samples)
*/
// create window
U32 max_core_count = gSavedSettings.getU32("EmulateCoreCount");
- U32 max_vram = gSavedSettings.getU32("RenderMaxVRAMBudget");
F32 max_gl_version = gSavedSettings.getF32("RenderMaxOpenGLVersion");
+
+ LLControlVariable* vram_control = gSavedSettings.getControl("RenderMaxVRAMBudget");
+ U32 max_vram = vram_control->getValue().asInteger();
+ mMaxVRAMControlConnection = vram_control->getSignal()->connect(
+ [this](LLControlVariable* control, const LLSD& new_val, const LLSD& old_val)
+ {
+ if (mWindow) mWindow->setMaxVRAMMegabytes(new_val.asInteger());
+ });
+
mWindow = LLWindowManager::createWindow(this,
p.title, p.name, p.x, p.y, p.width, p.height, 0,
@@ -1899,7 +1909,7 @@ LLViewerWindow::LLViewerWindow(const Params& p)
else if (!LLViewerShaderMgr::sInitialized)
{
//immediately initialize shaders
- LLViewerShaderMgr::sInitialized = TRUE;
+ LLViewerShaderMgr::sInitialized = true;
LLViewerShaderMgr::instance()->setShaders();
}
@@ -1921,7 +1931,7 @@ LLViewerWindow::LLViewerWindow(const Params& p)
{
gSavedSettings.setF32("UIScaleFactor", 1.f);
}
- gSavedSettings.setBOOL("ResetUIScaleOnFirstRun", FALSE);
+ gSavedSettings.setBOOL("ResetUIScaleOnFirstRun", false);
}
// Get the real window rect the window was created with (since there are various OS-dependent reasons why
@@ -1969,7 +1979,7 @@ LLViewerWindow::LLViewerWindow(const Params& p)
|| (gSavedSettings.getBOOL("ProbeHardwareOnStartup")))
{
LLFeatureManager::getInstance()->applyRecommendedSettings();
- gSavedSettings.setBOOL("ProbeHardwareOnStartup", FALSE);
+ gSavedSettings.setBOOL("ProbeHardwareOnStartup", false);
}
// If we crashed while initializng GL stuff last time, disable certain features
@@ -2081,7 +2091,7 @@ void LLViewerWindow::initBase()
}
gToolBarView->setShape(panel_holder->getLocalRect());
// Hide the toolbars for the moment: we'll make them visible after logging in world (see LLViewerWindow::initWorldUI())
- gToolBarView->setVisible(FALSE);
+ gToolBarView->setVisible(false);
// Constrain floaters to inside the menu and status bar regions.
gFloaterView = main_view->getChild<LLFloaterView>("Floater View");
@@ -2128,8 +2138,8 @@ void LLViewerWindow::initBase()
// Add the progress bar view (startup view), which overrides everything
mProgressView = getRootView()->findChild<LLProgressView>("progress_view");
- setShowProgress(FALSE);
- setProgressCancelButtonVisible(FALSE);
+ setShowProgress(false);
+ setProgressCancelButtonVisible(false);
gMenuHolder = getRootView()->getChild<LLViewerMenuHolderGL>("Menu Holder");
LLMenuGL::sMenuContainer = gMenuHolder;
@@ -2141,7 +2151,7 @@ void LLViewerWindow::initWorldUI()
{
gIMMgr = LLIMMgr::getInstance();
LLNavigationBar::getInstance();
- gFloaterView->pushVisibleAll(FALSE);
+ gFloaterView->pushVisibleAll(false);
return;
}
@@ -2162,7 +2172,7 @@ void LLViewerWindow::initWorldUI()
chiclet_bar->setShape(chiclet_container->getLocalRect());
chiclet_bar->setFollowsAll();
chiclet_container->addChild(chiclet_bar);
- chiclet_container->setVisible(TRUE);
+ chiclet_container->setVisible(true);
}
LLRect morph_view_rect = full_window;
@@ -2183,31 +2193,40 @@ void LLViewerWindow::initWorldUI()
// Force gFloaterTools to initialize
LLFloaterReg::getInstance("build");
- // Status bar
- LLPanel* status_bar_container = getRootView()->getChild<LLPanel>("status_bar_container");
- gStatusBar = new LLStatusBar(status_bar_container->getLocalRect());
- gStatusBar->setFollows(FOLLOWS_LEFT | FOLLOWS_TOP | FOLLOWS_RIGHT);
- gStatusBar->setShape(status_bar_container->getLocalRect());
- // sync bg color with menu bar
- gStatusBar->setBackgroundColor( gMenuBarView->getBackgroundColor().get() );
- // add InBack so that gStatusBar won't be drawn over menu
- status_bar_container->addChildInBack(gStatusBar, 2/*tab order, after menu*/);
- status_bar_container->setVisible(TRUE);
-
- // Navigation bar
- LLView* nav_bar_container = getRootView()->getChild<LLView>("nav_bar_container");
-
- LLNavigationBar* navbar = LLNavigationBar::getInstance();
- navbar->setShape(nav_bar_container->getLocalRect());
- navbar->setBackgroundColor(gMenuBarView->getBackgroundColor().get());
- nav_bar_container->addChild(navbar);
- nav_bar_container->setVisible(TRUE);
-
+ LLNavigationBar* navbar = LLNavigationBar::getInstance();
+ if (!gStatusBar)
+ {
+ // Status bar
+ LLPanel* status_bar_container = getRootView()->getChild<LLPanel>("status_bar_container");
+ gStatusBar = new LLStatusBar(status_bar_container->getLocalRect());
+ gStatusBar->setFollows(FOLLOWS_LEFT | FOLLOWS_TOP | FOLLOWS_RIGHT);
+ gStatusBar->setShape(status_bar_container->getLocalRect());
+ // sync bg color with menu bar
+ gStatusBar->setBackgroundColor(gMenuBarView->getBackgroundColor().get());
+ // add InBack so that gStatusBar won't be drawn over menu
+ status_bar_container->addChildInBack(gStatusBar, 2/*tab order, after menu*/);
+ status_bar_container->setVisible(true);
+
+ // Navigation bar
+ LLView* nav_bar_container = getRootView()->getChild<LLView>("nav_bar_container");
+
+ navbar->setShape(nav_bar_container->getLocalRect());
+ navbar->setBackgroundColor(gMenuBarView->getBackgroundColor().get());
+ nav_bar_container->addChild(navbar);
+ nav_bar_container->setVisible(true);
+ }
+ else
+ {
+ LLPanel* status_bar_container = getRootView()->getChild<LLPanel>("status_bar_container");
+ LLView* nav_bar_container = getRootView()->getChild<LLView>("nav_bar_container");
+ status_bar_container->setVisible(true);
+ nav_bar_container->setVisible(true);
+ }
- if (!gSavedSettings.getBOOL("ShowNavbarNavigationPanel"))
- {
- navbar->setVisible(FALSE);
- }
+ if (!gSavedSettings.getBOOL("ShowNavbarNavigationPanel"))
+ {
+ navbar->setVisible(false);
+ }
else
{
reshapeStatusBarContainer();
@@ -2221,11 +2240,11 @@ void LLViewerWindow::initWorldUI()
topinfo_bar->setShape(topinfo_bar_container->getLocalRect());
topinfo_bar_container->addChild(topinfo_bar);
- topinfo_bar_container->setVisible(TRUE);
+ topinfo_bar_container->setVisible(true);
if (!gSavedSettings.getBOOL("ShowMiniLocationPanel"))
{
- topinfo_bar->setVisible(FALSE);
+ topinfo_bar->setVisible(false);
}
if ( gHUDView == NULL )
@@ -2249,7 +2268,7 @@ void LLViewerWindow::initWorldUI()
LLPanelHideBeacon* panel_hide_beacon = LLPanelHideBeacon::getInstance();
panel_ssf_container->addChild(panel_hide_beacon);
- panel_ssf_container->setVisible(TRUE);
+ panel_ssf_container->setVisible(true);
LLMenuOptionPathfindingRebakeNavmesh::getInstance()->initialize();
@@ -2258,7 +2277,7 @@ void LLViewerWindow::initWorldUI()
if (gToolBarView)
{
gToolBarView->loadToolbars();
- gToolBarView->setVisible(TRUE);
+ gToolBarView->setVisible(true);
}
if (!gNonInteractive)
@@ -2295,7 +2314,7 @@ void LLViewerWindow::shutdownViews()
gFocusMgr.setTopCtrl(NULL);
if (mWindow)
{
- mWindow->allowLanguageTextInput(NULL, FALSE);
+ mWindow->allowLanguageTextInput(NULL, false);
}
delete mDebugText;
@@ -2306,7 +2325,7 @@ void LLViewerWindow::shutdownViews()
// Cleanup global views
if (gMorphView)
{
- gMorphView->setVisible(FALSE);
+ gMorphView->setVisible(false);
}
LL_INFOS() << "Global views cleaned." << LL_ENDL ;
@@ -2391,7 +2410,7 @@ void LLViewerWindow::shutdownGL()
LLSelectMgr::getInstance()->cleanup();
LL_INFOS() << "Stopping GL during shutdown" << LL_ENDL;
- stopGL(FALSE);
+ stopGL(false);
stop_glerror();
gGL.shutdown();
@@ -2413,8 +2432,10 @@ LLViewerWindow::~LLViewerWindow()
if (LLViewerShaderMgr::sInitialized)
{
LLViewerShaderMgr::releaseInstance();
- LLViewerShaderMgr::sInitialized = FALSE;
+ LLViewerShaderMgr::sInitialized = false;
}
+
+ mMaxVRAMControlConnection.disconnect();
}
@@ -2427,7 +2448,7 @@ void LLViewerWindow::showCursor()
{
mWindow->showCursor();
- mCursorHidden = FALSE;
+ mCursorHidden = false;
}
void LLViewerWindow::hideCursor()
@@ -2435,7 +2456,7 @@ void LLViewerWindow::hideCursor()
// And hide the cursor
mWindow->hideCursor();
- mCursorHidden = TRUE;
+ mCursorHidden = true;
}
void LLViewerWindow::sendShapeToSim()
@@ -2466,7 +2487,7 @@ void LLViewerWindow::reshape(S32 width, S32 height)
// may have been destructed.
if (!LLApp::isExiting())
{
- gWindowResized = TRUE;
+ gWindowResized = true;
// update our window rectangle
mWindowRectRaw.mRight = mWindowRectRaw.mLeft + width;
@@ -2483,7 +2504,7 @@ void LLViewerWindow::reshape(S32 width, S32 height)
calcDisplayScale();
- BOOL display_scale_changed = mDisplayScale != LLUI::getScaleFactor();
+ bool display_scale_changed = mDisplayScale != LLUI::getScaleFactor();
LLUI::setScaleFactor(mDisplayScale);
// update our window rectangle
@@ -2501,7 +2522,7 @@ void LLViewerWindow::reshape(S32 width, S32 height)
// Needs only a 'scale change' update, everything else gets handled by LLLayoutStack::updateClass()
LLPanelLogin::reshapePanel();
}
- LLView::sForceReshape = FALSE;
+ LLView::sForceReshape = false;
// clear font width caches
if (display_scale_changed)
@@ -2512,7 +2533,7 @@ void LLViewerWindow::reshape(S32 width, S32 height)
sendShapeToSim();
// store new settings for the mode we are in, regardless
- BOOL maximized = mWindow->getMaximized();
+ bool maximized = mWindow->getMaximized();
gSavedSettings.setBOOL("WindowMaximized", maximized);
if (!maximized)
@@ -2540,7 +2561,7 @@ void LLViewerWindow::reshape(S32 width, S32 height)
// Hide normal UI when a logon fails
-void LLViewerWindow::setNormalControlsVisible( BOOL visible )
+void LLViewerWindow::setNormalControlsVisible( bool visible )
{
if(LLChicletBar::instanceExists())
{
@@ -2652,7 +2673,7 @@ void LLViewerWindow::draw()
{
//#if LL_DEBUG
- LLView::sIsDrawing = TRUE;
+ LLView::sIsDrawing = true;
//#endif
stop_glerror();
@@ -2770,17 +2791,17 @@ void LLViewerWindow::draw()
gUIProgram.unbind();
- LLView::sIsDrawing = FALSE;
+ LLView::sIsDrawing = false;
}
// Takes a single keyup event, usually when UI is visible
-BOOL LLViewerWindow::handleKeyUp(KEY key, MASK mask)
+bool LLViewerWindow::handleKeyUp(KEY key, MASK mask)
{
- if (LLSetKeyBindDialog::recordKey(key, mask, FALSE))
+ if (LLSetKeyBindDialog::recordKey(key, mask, false))
{
LL_DEBUGS() << "KeyUp handled by LLSetKeyBindDialog" << LL_ENDL;
LLViewerEventRecorder::instance().logKeyEvent(key, mask);
- return TRUE;
+ return true;
}
LLFocusableElement* keyboard_focus = gFocusMgr.getKeyboardFocus();
@@ -2792,7 +2813,7 @@ BOOL LLViewerWindow::handleKeyUp(KEY key, MASK mask)
// We have keyboard focus, and it's not an accelerator
if (keyboard_focus && keyboard_focus->wantsKeyUpKeyDown())
{
- return keyboard_focus->handleKeyUp(key, mask, FALSE);
+ return keyboard_focus->handleKeyUp(key, mask, false);
}
else if (key < 0x80)
{
@@ -2803,14 +2824,14 @@ BOOL LLViewerWindow::handleKeyUp(KEY key, MASK mask)
if (keyboard_focus)
{
- if (keyboard_focus->handleKeyUp(key, mask, FALSE))
+ if (keyboard_focus->handleKeyUp(key, mask, false))
{
LL_DEBUGS() << "LLviewerWindow::handleKeyUp - in 'traverse up' - no loops seen... just called keyboard_focus->handleKeyUp an it returned true" << LL_ENDL;
LLViewerEventRecorder::instance().logKeyEvent(key, mask);
- return TRUE;
+ return true;
}
else {
- LL_DEBUGS() << "LLviewerWindow::handleKeyUp - in 'traverse up' - no loops seen... just called keyboard_focus->handleKeyUp an it returned FALSE" << LL_ENDL;
+ LL_DEBUGS() << "LLviewerWindow::handleKeyUp - in 'traverse up' - no loops seen... just called keyboard_focus->handleKeyUp an it returned false" << LL_ENDL;
}
}
@@ -2821,18 +2842,18 @@ BOOL LLViewerWindow::handleKeyUp(KEY key, MASK mask)
}
// Takes a single keydown event, usually when UI is visible
-BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
+bool LLViewerWindow::handleKey(KEY key, MASK mask)
{
// hide tooltips on keypress
LLToolTipMgr::instance().blockToolTips();
// Menus get handled on key down instead of key up
// so keybindings have to be recorded before that
- if (LLSetKeyBindDialog::recordKey(key, mask, TRUE))
+ if (LLSetKeyBindDialog::recordKey(key, mask, true))
{
LL_DEBUGS() << "Key handled by LLSetKeyBindDialog" << LL_ENDL;
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
- return TRUE;
+ return true;
}
LLFocusableElement* keyboard_focus = gFocusMgr.getKeyboardFocus();
@@ -2844,7 +2865,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
//don't switch to mouselook if any floater has focus
if ((key == KEY_MOUSELOOK) && !(mask & (MASK_CONTROL | MASK_ALT)))
{
- return TRUE;
+ return true;
}
LLUICtrl* cur_focus = dynamic_cast<LLUICtrl*>(keyboard_focus);
@@ -2887,7 +2908,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
if (res == 1 && chars[0] >= 0x20)
{
// Let it fall through to character handler and get a WM_CHAR.
- return TRUE;
+ return true;
}
}
}
@@ -2898,25 +2919,25 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
// We have keyboard focus, and it's not an accelerator
if (keyboard_focus && keyboard_focus->wantsKeyUpKeyDown())
{
- return keyboard_focus->handleKey(key, mask, FALSE);
+ return keyboard_focus->handleKey(key, mask, false);
}
else if (key < 0x80)
{
// Not a special key, so likely (we hope) to generate a character. Let it fall through to character handler first.
- return TRUE;
+ return true;
}
}
}
}
// let menus handle navigation keys for navigation
- if ((gMenuBarView && gMenuBarView->handleKey(key, mask, TRUE))
- ||(gLoginMenuBarView && gLoginMenuBarView->handleKey(key, mask, TRUE))
- ||(gMenuHolder && gMenuHolder->handleKey(key, mask, TRUE)))
+ if ((gMenuBarView && gMenuBarView->handleKey(key, mask, true))
+ ||(gLoginMenuBarView && gLoginMenuBarView->handleKey(key, mask, true))
+ ||(gMenuHolder && gMenuHolder->handleKey(key, mask, true)))
{
LL_DEBUGS() << "LLviewerWindow::handleKey handle nav keys for nav" << LL_ENDL;
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
- return TRUE;
+ return true;
}
@@ -2927,10 +2948,10 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
// Check the current floater's menu first, if it has one.
if (gFocusMgr.keyboardFocusHasAccelerators()
&& keyboard_focus
- && keyboard_focus->handleKey(key,mask,FALSE))
+ && keyboard_focus->handleKey(key,mask,false))
{
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
- return TRUE;
+ return true;
}
if (gAgent.isInitialized()
@@ -2939,13 +2960,13 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
&& gMenuBarView->handleAcceleratorKey(key, mask))
{
LLViewerEventRecorder::instance().logKeyEvent(key, mask);
- return TRUE;
+ return true;
}
if (gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask))
{
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
- return TRUE;
+ return true;
}
}
@@ -2970,13 +2991,13 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
mRootView->focusNextRoot();
}
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
- return TRUE;
+ return true;
}
// hidden edit menu for cut/copy/paste
if (gEditMenu && gEditMenu->handleAcceleratorKey(key, mask))
{
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
- return TRUE;
+ return true;
}
LLFloater* focused_floaterp = gFloaterView->getFocusedFloater();
@@ -3006,7 +3027,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
case KEY_END:
// when chatbar is empty or ArrowKeysAlwaysMove set,
// pass arrow keys on to avatar...
- return FALSE;
+ return false;
default:
break;
}
@@ -3014,14 +3035,14 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
}
}
- if (keyboard_focus->handleKey(key, mask, FALSE))
+ if (keyboard_focus->handleKey(key, mask, false))
{
LL_DEBUGS() << "LLviewerWindow::handleKey - in 'traverse up' - no loops seen... just called keyboard_focus->handleKey an it returned true" << LL_ENDL;
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
- return TRUE;
+ return true;
} else {
- LL_DEBUGS() << "LLviewerWindow::handleKey - in 'traverse up' - no loops seen... just called keyboard_focus->handleKey an it returned FALSE" << LL_ENDL;
+ LL_DEBUGS() << "LLviewerWindow::handleKey - in 'traverse up' - no loops seen... just called keyboard_focus->handleKey an it returned false" << LL_ENDL;
}
}
@@ -3029,7 +3050,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
{
LL_DEBUGS() << "LLviewerWindow::handleKey toolbar handling?" << LL_ENDL;
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
- return TRUE;
+ return true;
}
// Try for a new-format gesture
@@ -3037,7 +3058,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
{
LL_DEBUGS() << "LLviewerWindow::handleKey new gesture feature" << LL_ENDL;
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
- return TRUE;
+ return true;
}
// See if this is a gesture trigger. If so, eat the key and
@@ -3046,7 +3067,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
{
LL_DEBUGS() << "LLviewerWindow::handleKey check gesture trigger" << LL_ENDL;
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
- return TRUE;
+ return true;
}
// If "Pressing letter keys starts local chat" option is selected, we are not in mouselook,
@@ -3069,7 +3090,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
{
// passing NULL here, character will be added later when it is handled by character handler.
nearby_chat->startChat(NULL);
- return TRUE;
+ return true;
}
}
@@ -3080,12 +3101,12 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
&& gMenuBarView->handleAcceleratorKey(key, mask))
{
LLViewerEventRecorder::instance().logKeyEvent(key, mask);
- return TRUE;
+ return true;
}
if (gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask))
{
- return TRUE;
+ return true;
}
// don't pass keys on to world when something in ui has focus
@@ -3095,7 +3116,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
}
-BOOL LLViewerWindow::handleUnicodeChar(llwchar uni_char, MASK mask)
+bool LLViewerWindow::handleUnicodeChar(llwchar uni_char, MASK mask)
{
// HACK: We delay processing of return keys until they arrive as a Unicode char,
// so that if you're typing chat text at low frame rate, we don't send the chat
@@ -3113,24 +3134,24 @@ BOOL LLViewerWindow::handleUnicodeChar(llwchar uni_char, MASK mask)
}
// let menus handle navigation (jump) keys
- if (gMenuBarView && gMenuBarView->handleUnicodeChar(uni_char, TRUE))
+ if (gMenuBarView && gMenuBarView->handleUnicodeChar(uni_char, true))
{
- return TRUE;
+ return true;
}
// Traverses up the hierarchy
LLFocusableElement* keyboard_focus = gFocusMgr.getKeyboardFocus();
if( keyboard_focus )
{
- if (keyboard_focus->handleUnicodeChar(uni_char, FALSE))
+ if (keyboard_focus->handleUnicodeChar(uni_char, false))
{
- return TRUE;
+ return true;
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -3344,13 +3365,15 @@ void LLViewerWindow::updateUI()
S32 x = mCurrentMousePoint.mX;
S32 y = mCurrentMousePoint.mY;
- MASK mask = gKeyboard->currentMask(TRUE);
+ MASK mask = gKeyboard->currentMask(true);
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_RAYCAST))
{
- gDebugRaycastFaceHit = -1;
- gDebugRaycastObject = cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, FALSE, TRUE, FALSE,
+ gDebugRaycastFaceHit = gDebugRaycastGLTFNodeHit = gDebugRaycastGLTFPrimitiveHit = -1;
+ gDebugRaycastObject = cursorIntersect(-1, -1, 512.f, NULL, -1, false, false, true, false,
&gDebugRaycastFaceHit,
+ &gDebugRaycastGLTFNodeHit,
+ &gDebugRaycastGLTFPrimitiveHit,
&gDebugRaycastIntersection,
&gDebugRaycastTexCoord,
&gDebugRaycastNormal,
@@ -3364,7 +3387,7 @@ void LLViewerWindow::updateUI()
updateMouseDelta();
updateKeyboardFocus();
- BOOL handled = FALSE;
+ bool handled = false;
LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl();
LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture();
@@ -3616,7 +3639,7 @@ void LLViewerWindow::updateUI()
last_handle_msg = LLView::sMouseHandlerMessage;
LL_INFOS() << "Hover" << LLView::sMouseHandlerMessage << LL_ENDL;
}
- handled = TRUE;
+ handled = true;
}
else if (LLView::sDebugMouseHandling)
{
@@ -3640,7 +3663,7 @@ void LLViewerWindow::updateUI()
}
// Show a new tool tip (or update one that is already shown)
- BOOL tool_tip_handled = FALSE;
+ bool tool_tip_handled = false;
std::string tool_tip_msg;
if( handled
&& !mWindow->isCursorHidden())
@@ -3792,12 +3815,12 @@ void LLViewerWindow::updateLayout()
}
// Update the location of the blue box tool popup
LLCoordGL select_center_screen;
- MASK mask = gKeyboard->currentMask(TRUE);
+ MASK mask = gKeyboard->currentMask(true);
gFloaterTools->updatePopup( select_center_screen, mask );
}
else
{
- gFloaterTools->setVisible(FALSE);
+ gFloaterTools->setVisible(false);
}
//gMenuBarView->setItemVisible("BuildTools", gFloaterTools->getVisible());
}
@@ -3831,11 +3854,11 @@ void LLViewerWindow::updateMouseDelta()
mouse_pos.mX > mWindowRectRaw.getWidth() ||
mouse_pos.mY > mWindowRectRaw.getHeight())
{
- mMouseInWindow = FALSE;
+ mMouseInWindow = false;
}
else
{
- mMouseInWindow = TRUE;
+ mMouseInWindow = true;
}
LLVector2 mouse_vel;
@@ -3891,7 +3914,7 @@ void LLViewerWindow::updateKeyboardFocus()
{
if (!parent->focusFirstItem())
{
- parent->setFocus(TRUE);
+ parent->setFocus(true);
}
new_focus_found = true;
break;
@@ -3904,7 +3927,7 @@ void LLViewerWindow::updateKeyboardFocus()
// are only moving focus higher in the hierarchy
if (!new_focus_found)
{
- cur_focus->setFocus(FALSE);
+ cur_focus->setFocus(false);
}
}
else if (cur_focus->isFocusRoot())
@@ -3926,11 +3949,11 @@ void LLViewerWindow::updateKeyboardFocus()
// sync all floaters with their focus state
gFloaterView->highlightFocusedFloater();
gSnapshotFloaterView->highlightFocusedFloater();
- MASK mask = gKeyboard->currentMask(TRUE);
+ MASK mask = gKeyboard->currentMask(true);
if ((mask & MASK_CONTROL) == 0)
{
// control key no longer held down, finish cycle mode
- gFloaterView->setCycleMode(FALSE);
+ gFloaterView->setCycleMode(false);
gFloaterView->syncFloaterTabOrder();
}
@@ -3973,7 +3996,7 @@ void LLViewerWindow::updateWorldViewRect(bool use_full_window)
if (mWorldViewRectRaw != new_world_rect)
{
mWorldViewRectRaw = new_world_rect;
- gResizeScreenTexture = TRUE;
+ gResizeScreenTexture = true;
LLViewerCamera::getInstance()->setViewHeightInPixels( mWorldViewRectRaw.getHeight() );
LLViewerCamera::getInstance()->setAspect( getWorldViewAspectRatio() );
@@ -4021,9 +4044,9 @@ void LLViewerWindow::saveLastMouse(const LLCoordGL &point)
// Draws the selection outlines for the currently selected objects
// Must be called after displayObjects is called, which sets the mGLName parameter
// NOTE: This function gets called 3 times:
-// render_ui_3d: FALSE, FALSE, TRUE
-// render_hud_elements: FALSE, FALSE, FALSE
-void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls, BOOL for_hud )
+// render_ui_3d: false, false, true
+// render_hud_elements: false, false, false
+void LLViewerWindow::renderSelections( bool for_gl_pick, bool pick_parcel_walls, bool for_hud )
{
LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
@@ -4142,21 +4165,21 @@ void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls,
// make whole viewer benefit.
LLSelectMgr::getInstance()->selectGetEditMoveLinksetPermissions(all_selected_objects_move, all_selected_objects_modify);
- BOOL draw_handles = TRUE;
+ bool draw_handles = true;
if (tool == LLToolCompTranslate::getInstance() && !all_selected_objects_move && !LLSelectMgr::getInstance()->isMovableAvatarSelected())
{
- draw_handles = FALSE;
+ draw_handles = false;
}
if (tool == LLToolCompRotate::getInstance() && !all_selected_objects_move && !LLSelectMgr::getInstance()->isMovableAvatarSelected())
{
- draw_handles = FALSE;
+ draw_handles = false;
}
if ( !all_selected_objects_modify && tool == LLToolCompScale::getInstance() )
{
- draw_handles = FALSE;
+ draw_handles = false;
}
if( draw_handles )
@@ -4200,9 +4223,9 @@ LLVector3d LLViewerWindow::clickPointInWorldGlobal(S32 x, S32 y_from_bot, LLView
}
-BOOL LLViewerWindow::clickPointOnSurfaceGlobal(const S32 x, const S32 y, LLViewerObject *objectp, LLVector3d &point_global) const
+bool LLViewerWindow::clickPointOnSurfaceGlobal(const S32 x, const S32 y, LLViewerObject *objectp, LLVector3d &point_global) const
{
- BOOL intersect = FALSE;
+ bool intersect = false;
// U8 shape = objectp->mPrimitiveCode & LL_PCODE_BASE_MASK;
if (!intersect)
@@ -4222,20 +4245,20 @@ void LLViewerWindow::pickAsync( S32 x,
S32 y_from_bot,
MASK mask,
void (*callback)(const LLPickInfo& info),
- BOOL pick_transparent,
- BOOL pick_rigged,
- BOOL pick_unselectable,
- BOOL pick_reflection_probes)
+ bool pick_transparent,
+ bool pick_rigged,
+ bool pick_unselectable,
+ bool pick_reflection_probes)
{
// "Show Debug Alpha" means no object actually transparent
- BOOL in_build_mode = LLFloaterReg::instanceVisible("build");
+ bool in_build_mode = LLFloaterReg::instanceVisible("build");
if (LLDrawPoolAlpha::sShowDebugAlpha
|| (in_build_mode && gSavedSettings.getBOOL("SelectInvisibleObjects")))
{
- pick_transparent = TRUE;
+ pick_transparent = true;
}
- LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, pick_rigged, FALSE, pick_reflection_probes, pick_unselectable, TRUE, callback);
+ LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, pick_rigged, false, pick_reflection_probes, pick_unselectable, true, callback);
schedulePick(pick_info);
}
@@ -4291,19 +4314,19 @@ void LLViewerWindow::returnEmptyPicks()
}
// Performs the GL object/land pick.
-LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_particle, BOOL pick_unselectable, BOOL pick_reflection_probe)
+LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, bool pick_transparent, bool pick_rigged, bool pick_particle, bool pick_unselectable, bool pick_reflection_probe)
{
- BOOL in_build_mode = LLFloaterReg::instanceVisible("build");
+ bool in_build_mode = LLFloaterReg::instanceVisible("build");
if ((in_build_mode && gSavedSettings.getBOOL("SelectInvisibleObjects")) || LLDrawPoolAlpha::sShowDebugAlpha)
{
// build mode allows interaction with all transparent objects
// "Show Debug Alpha" means no object actually transparent
- pick_transparent = TRUE;
+ pick_transparent = true;
}
// shortcut queueing in mPicks and just update mLastPick in place
- MASK key_mask = gKeyboard->currentMask(TRUE);
- mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_rigged, pick_particle, pick_reflection_probe, TRUE, FALSE, NULL);
+ MASK key_mask = gKeyboard->currentMask(true);
+ mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_rigged, pick_particle, pick_reflection_probe, true, false, NULL);
mLastPick.fetchResults();
return mLastPick;
@@ -4338,11 +4361,13 @@ LLHUDIcon* LLViewerWindow::cursorIntersectIcon(S32 mouse_x, S32 mouse_y, F32 dep
LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 depth,
LLViewerObject *this_object,
S32 this_face,
- BOOL pick_transparent,
- BOOL pick_rigged,
- BOOL pick_unselectable,
- BOOL pick_reflection_probe,
+ bool pick_transparent,
+ bool pick_rigged,
+ bool pick_unselectable,
+ bool pick_reflection_probe,
S32* face_hit,
+ S32* gltf_node_hit,
+ S32* gltf_primitive_hit,
LLVector4a *intersection,
LLVector2 *uv,
LLVector4a *normal,
@@ -4436,7 +4461,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de
if (!found) // if not found in HUD, look in world:
{
found = gPipeline.lineSegmentIntersectInWorld(mw_start, mw_end, pick_transparent, pick_rigged, pick_unselectable, pick_reflection_probe,
- face_hit, intersection, uv, normal, tangent);
+ face_hit, gltf_node_hit, gltf_primitive_hit, intersection, uv, normal, tangent);
if (found && !pick_transparent)
{
gDebugRaycastIntersection = *intersection;
@@ -4525,7 +4550,7 @@ LLVector3 LLViewerWindow::mouseDirectionCamera(const S32 x, const S32 y) const
-BOOL LLViewerWindow::mousePointOnPlaneGlobal(LLVector3d& point, const S32 x, const S32 y,
+bool LLViewerWindow::mousePointOnPlaneGlobal(LLVector3d& point, const S32 x, const S32 y,
const LLVector3d &plane_point_global,
const LLVector3 &plane_normal_global)
{
@@ -4556,11 +4581,11 @@ BOOL LLViewerWindow::mousePointOnPlaneGlobal(LLVector3d& point, const S32 x, con
// Returns global position
-BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_position_global, BOOL ignore_distance)
+bool LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_position_global, bool ignore_distance)
{
LLVector3 mouse_direction_global = mouseDirectionGlobal(x,y);
F32 mouse_dir_scale;
- BOOL hit_land = FALSE;
+ bool hit_land = false;
LLViewerRegion *regionp;
F32 land_z;
const F32 FIRST_PASS_STEP = 1.0f; // meters
@@ -4606,7 +4631,7 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d
// cout << "under land at " << probe_point << " scale " << mouse_vec_scale << endl;
- hit_land = TRUE;
+ hit_land = true;
break;
}
}
@@ -4654,16 +4679,16 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d
// ...just went under land again
*land_position_global = probe_point_global;
- return TRUE;
+ return true;
}
}
}
- return FALSE;
+ return false;
}
// Saves an image to the harddrive as "SnapshotX" where X >= 1.
-void LLViewerWindow::saveImageNumbered(LLImageFormatted *image, BOOL force_picker, const snapshot_saved_signal_t::slot_type& success_cb, const snapshot_saved_signal_t::slot_type& failure_cb)
+void LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picker, const snapshot_saved_signal_t::slot_type& success_cb, const snapshot_saved_signal_t::slot_type& failure_cb)
{
if (!image)
{
@@ -4762,7 +4787,7 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save
}
// Look for an unused file name
- BOOL is_snapshot_name_loc_set = isSnapshotLocSet();
+ bool is_snapshot_name_loc_set = isSnapshotLocSet();
std::string filepath;
S32 i = 1;
S32 err = 0;
@@ -4816,12 +4841,12 @@ void LLViewerWindow::movieSize(S32 new_width, S32 new_height)
}
}
-BOOL LLViewerWindow::saveSnapshot(const std::string& filepath, S32 image_width, S32 image_height, BOOL show_ui, BOOL show_hud, BOOL do_rebuild, LLSnapshotModel::ESnapshotLayerType type, LLSnapshotModel::ESnapshotFormat format)
+bool LLViewerWindow::saveSnapshot(const std::string& filepath, S32 image_width, S32 image_height, bool show_ui, bool show_hud, bool do_rebuild, LLSnapshotModel::ESnapshotLayerType type, LLSnapshotModel::ESnapshotFormat format)
{
LL_INFOS() << "Saving snapshot to: " << filepath << LL_ENDL;
LLPointer<LLImageRaw> raw = new LLImageRaw;
- BOOL success = rawSnapshot(raw, image_width, image_height, TRUE, FALSE, show_ui, show_hud, do_rebuild);
+ bool success = rawSnapshot(raw, image_width, image_height, true, false, show_ui, show_hud, do_rebuild);
if (success)
{
@@ -4869,7 +4894,7 @@ void LLViewerWindow::playSnapshotAnimAndSound()
send_sound_trigger(LLUUID(gSavedSettings.getString("UISndSnapshot")), 1.0f);
}
-BOOL LLViewerWindow::isSnapshotLocSet() const
+bool LLViewerWindow::isSnapshotLocSet() const
{
std::string snapshot_dir = sSnapshotDir;
return !snapshot_dir.empty();
@@ -4880,50 +4905,51 @@ void LLViewerWindow::resetSnapshotLoc() const
gSavedPerAccountSettings.setString("SnapshotBaseDir", std::string());
}
-BOOL LLViewerWindow::thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, BOOL show_ui, BOOL show_hud, BOOL do_rebuild, BOOL no_post, LLSnapshotModel::ESnapshotLayerType type)
+bool LLViewerWindow::thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, bool show_ui, bool show_hud, bool do_rebuild, bool no_post, LLSnapshotModel::ESnapshotLayerType type)
{
- return rawSnapshot(raw, preview_width, preview_height, FALSE, FALSE, show_ui, show_hud, do_rebuild, no_post, type);
+ return rawSnapshot(raw, preview_width, preview_height, false, false, show_ui, show_hud, do_rebuild, no_post, type);
}
// Saves the image from the screen to a raw image
// Since the required size might be bigger than the available screen, this method rerenders the scene in parts (called subimages) and copy
// the results over to the final raw image.
-BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height,
- BOOL keep_window_aspect, BOOL is_texture, BOOL show_ui, BOOL show_hud, BOOL do_rebuild, BOOL no_post, LLSnapshotModel::ESnapshotLayerType type, S32 max_size)
+bool LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height,
+ bool keep_window_aspect, bool is_texture, bool show_ui, bool show_hud, bool do_rebuild, bool no_post, LLSnapshotModel::ESnapshotLayerType type, S32 max_size)
{
if (!raw)
{
- return FALSE;
+ return false;
}
+
//check if there is enough memory for the snapshot image
if(image_width * image_height > (1 << 22)) //if snapshot image is larger than 2K by 2K
{
if(!LLMemory::tryToAlloc(NULL, image_width * image_height * 3))
{
LL_WARNS() << "No enough memory to take the snapshot with size (w : h): " << image_width << " : " << image_height << LL_ENDL ;
- return FALSE ; //there is no enough memory for taking this snapshot.
+ return false ; //there is no enough memory for taking this snapshot.
}
}
// PRE SNAPSHOT
gSnapshotNoPost = no_post;
- gDisplaySwapBuffers = FALSE;
+ gDisplaySwapBuffers = false;
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); // stencil buffer is deprecated | GL_STENCIL_BUFFER_BIT);
setCursor(UI_CURSOR_WAIT);
// Hide all the UI widgets first and draw a frame
- BOOL prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? TRUE : FALSE;
+ bool prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? true : false;
if ( prev_draw_ui != show_ui)
{
LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI);
}
- BOOL hide_hud = !show_hud && LLPipeline::sShowHUDAttachments;
+ bool hide_hud = !show_hud && LLPipeline::sShowHUDAttachments;
if (hide_hud)
{
- LLPipeline::sShowHUDAttachments = FALSE;
+ LLPipeline::sShowHUDAttachments = false;
}
// if not showing ui, use full window to render world view
@@ -5014,20 +5040,23 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
image_buffer_x = llfloor(snapshot_width * scale_factor) ;
image_buffer_y = llfloor(snapshot_height * scale_factor) ;
}
+
+ LLImageDataLock lock(raw);
+
if ((image_buffer_x > 0) && (image_buffer_y > 0))
{
raw->resize(image_buffer_x, image_buffer_y, 3);
}
else
{
- return FALSE ;
+ return false ;
}
if (raw->isBufferInvalid())
{
- return FALSE ;
+ return false ;
}
- BOOL high_res = scale_factor >= 2.f; // Font scaling is slow, only do so if rez is much higher
+ bool high_res = scale_factor >= 2.f; // Font scaling is slow, only do so if rez is much higher
if (high_res && show_ui)
{
// Note: we should never get there...
@@ -5055,8 +5084,8 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
S32 output_buffer_offset_x = 0;
for (int subimage_x = 0; subimage_x < scale_factor; ++subimage_x)
{
- gDisplaySwapBuffers = FALSE;
- gDepthDirty = TRUE;
+ gDisplaySwapBuffers = false;
+ gDepthDirty = true;
S32 subimage_x_offset = llclamp(buffer_x_offset - (subimage_x * window_width), 0, window_width);
// handle fractional rows
@@ -5067,12 +5096,12 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
if (read_width && read_height)
{
const U32 subfield = subimage_x+(subimage_y*llceil(scale_factor));
- display(do_rebuild, scale_factor, subfield, TRUE);
+ display(do_rebuild, scale_factor, subfield, true);
if (!LLPipeline::sRenderDeferred)
{
// Required for showing the GUI in snapshots and performing bloom composite overlay
- // Call even if show_ui is FALSE
+ // Call even if show_ui is false
render_ui(scale_factor, subfield);
swap();
}
@@ -5136,9 +5165,9 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
output_buffer_offset_y += subimage_y_offset;
}
- gDisplaySwapBuffers = FALSE;
- gSnapshotNoPost = FALSE;
- gDepthDirty = TRUE;
+ gDisplaySwapBuffers = false;
+ gSnapshotNoPost = false;
+ gDepthDirty = true;
// POST SNAPSHOT
if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
@@ -5148,7 +5177,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
if (hide_hud)
{
- LLPipeline::sShowHUDAttachments = TRUE;
+ LLPipeline::sShowHUDAttachments = true;
}
/*if (high_res)
@@ -5161,7 +5190,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
// Note: this formula depends on the number of components being 3. Not obvious, but it's correct.
image_width += (image_width * 3) % 4;
- BOOL ret = TRUE ;
+ bool ret = true ;
// Resize image
if(llabs(image_width - image_buffer_x) > 4 || llabs(image_height - image_buffer_y) > 4)
{
@@ -5169,7 +5198,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
}
else if(image_width != image_buffer_x || image_height != image_buffer_y)
{
- ret = raw->scale( image_width, image_height, FALSE );
+ ret = raw->scale( image_width, image_height, false );
}
@@ -5204,24 +5233,24 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
return ret;
}
-BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_height, const int num_render_passes)
+bool LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_height, const int num_render_passes)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_APP;
- gDisplaySwapBuffers = FALSE;
+ gDisplaySwapBuffers = false;
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); // stencil buffer is deprecated | GL_STENCIL_BUFFER_BIT);
setCursor(UI_CURSOR_WAIT);
- BOOL prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? TRUE : FALSE;
+ bool prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? true : false;
if (prev_draw_ui != false)
{
LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI);
}
- BOOL hide_hud = LLPipeline::sShowHUDAttachments;
+ bool hide_hud = LLPipeline::sShowHUDAttachments;
if (hide_hud)
{
- LLPipeline::sShowHUDAttachments = FALSE;
+ LLPipeline::sShowHUDAttachments = false;
}
LLRect window_rect = getWorldViewRectRaw();
@@ -5262,17 +5291,19 @@ BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_
// the black flash in between captures when the number
// of render passes is more than 1. We need to also
// set it here because code in LLViewerDisplay resets
- // it to TRUE each time.
- gDisplaySwapBuffers = FALSE;
+ // it to true each time.
+ gDisplaySwapBuffers = false;
// actually render the scene
const U32 subfield = 0;
const bool do_rebuild = true;
const F32 zoom = 1.0;
- const bool for_snapshot = TRUE;
+ const bool for_snapshot = true;
display(do_rebuild, zoom, subfield, for_snapshot);
}
+ LLImageDataSharedLock lock(raw);
+
glReadPixels(
0, 0,
image_width,
@@ -5282,8 +5313,8 @@ BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_
);
stop_glerror();
- gDisplaySwapBuffers = FALSE;
- gDepthDirty = TRUE;
+ gDisplaySwapBuffers = false;
+ gDepthDirty = true;
if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
{
@@ -5295,7 +5326,7 @@ BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_
if (hide_hud)
{
- LLPipeline::sShowHUDAttachments = TRUE;
+ LLPipeline::sShowHUDAttachments = true;
}
setCursor(UI_CURSOR_ARROW);
@@ -5311,7 +5342,7 @@ BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_
void display_cube_face();
-BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubearray, S32 cubeIndex, S32 face, F32 near_clip, bool dynamic_render)
+bool LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubearray, S32 cubeIndex, S32 face, F32 near_clip, bool dynamic_render, bool useCustomClipPlane, LLPlane clipPlane)
{
// NOTE: implementation derived from LLFloater360Capture::capture360Images() and simpleSnapshot
LL_PROFILE_ZONE_SCOPED_CATEGORY_APP;
@@ -5342,6 +5373,14 @@ BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea
camera->setOrigin(origin);
camera->setNear(near_clip);
+ LLPlane previousClipPlane;
+
+ if (useCustomClipPlane)
+ {
+ previousClipPlane = camera->getUserClipPlane();
+ camera->setUserClipPlane(clipPlane);
+ }
+
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); // stencil buffer is deprecated | GL_STENCIL_BUFFER_BIT);
U32 dynamic_render_types[] = {
@@ -5365,16 +5404,16 @@ BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea
}
}
- BOOL prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? TRUE : FALSE;
+ bool prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? true : false;
if (prev_draw_ui != false)
{
LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI);
}
- BOOL hide_hud = LLPipeline::sShowHUDAttachments;
+ bool hide_hud = LLPipeline::sShowHUDAttachments;
if (hide_hud)
{
- LLPipeline::sShowHUDAttachments = FALSE;
+ LLPipeline::sShowHUDAttachments = false;
}
LLRect window_rect = getWorldViewRectRaw();
@@ -5411,16 +5450,16 @@ BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea
// the black flash in between captures when the number
// of render passes is more than 1. We need to also
// set it here because code in LLViewerDisplay resets
- // it to TRUE each time.
- gDisplaySwapBuffers = FALSE;
+ // it to true each time.
+ gDisplaySwapBuffers = false;
// actually render the scene
- gCubeSnapshot = TRUE;
+ gCubeSnapshot = true;
display_cube_face();
- gCubeSnapshot = FALSE;
+ gCubeSnapshot = false;
}
- gDisplaySwapBuffers = TRUE;
+ gDisplaySwapBuffers = true;
if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
{
@@ -5443,11 +5482,16 @@ BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea
if (hide_hud)
{
- LLPipeline::sShowHUDAttachments = TRUE;
+ LLPipeline::sShowHUDAttachments = true;
}
gPipeline.resetDrawOrders();
mWorldViewRectRaw = window_rect;
+
+ if (useCustomClipPlane)
+ {
+ camera->setUserClipPlane(previousClipPlane);
+ }
// restore original view/camera/avatar settings settings
*camera = saved_camera;
@@ -5574,7 +5618,7 @@ void LLViewerWindow::setup2DViewport(S32 x_offset, S32 y_offset)
void LLViewerWindow::setup3DRender()
{
// setup perspective camera
- LLViewerCamera::getInstance()->setPerspective(NOT_FOR_SELECTION, mWorldViewRectRaw.mLeft, mWorldViewRectRaw.mBottom, mWorldViewRectRaw.getWidth(), mWorldViewRectRaw.getHeight(), FALSE, LLViewerCamera::getInstance()->getNear(), MAX_FAR_CLIP*2.f);
+ LLViewerCamera::getInstance()->setPerspective(NOT_FOR_SELECTION, mWorldViewRectRaw.mLeft, mWorldViewRectRaw.mBottom, mWorldViewRectRaw.getWidth(), mWorldViewRectRaw.getHeight(), false, LLViewerCamera::getInstance()->getNear(), MAX_FAR_CLIP*2.f);
setup3DViewport();
}
@@ -5604,7 +5648,7 @@ void LLViewerWindow::initTextures(S32 location_id)
}
}
-void LLViewerWindow::setShowProgress(const BOOL show)
+void LLViewerWindow::setShowProgress(const bool show)
{
if (mProgressView)
{
@@ -5620,7 +5664,7 @@ void LLViewerWindow::setStartupComplete()
}
}
-BOOL LLViewerWindow::getShowProgress() const
+bool LLViewerWindow::getShowProgress() const
{
return (mProgressView && mProgressView->getVisible());
}
@@ -5649,7 +5693,7 @@ void LLViewerWindow::setProgressPercent(const F32 percent)
}
}
-void LLViewerWindow::setProgressCancelButtonVisible( BOOL b, const std::string& label )
+void LLViewerWindow::setProgressCancelButtonVisible( bool b, const std::string& label )
{
if (mProgressView)
{
@@ -5670,7 +5714,7 @@ void LLViewerWindow::dumpState()
<< LL_ENDL;
}
-void LLViewerWindow::stopGL(BOOL save_state)
+void LLViewerWindow::stopGL(bool save_state)
{
//Note: --bao
//if not necessary, do not change the order of the function calls in this function.
@@ -5719,7 +5763,7 @@ void LLViewerWindow::stopGL(BOOL save_state)
gTextureList.destroyGL(save_state);
stop_glerror();
- gGLManager.mIsDisabled = TRUE;
+ gGLManager.mIsDisabled = true;
stop_glerror();
//unload shader's
@@ -5740,7 +5784,7 @@ void LLViewerWindow::restoreGL(const std::string& progress_message)
if (gGLManager.mIsDisabled)
{
LL_INFOS() << "Restoring GL..." << LL_ENDL;
- gGLManager.mIsDisabled = FALSE;
+ gGLManager.mIsDisabled = false;
initGLDefaults();
LLGLState::restoreGL();
@@ -5760,8 +5804,8 @@ void LLViewerWindow::restoreGL(const std::string& progress_message)
LLVOAvatar::restoreGL();
LLVOPartGroup::restoreGL();
- gResizeScreenTexture = TRUE;
- gWindowResized = TRUE;
+ gResizeScreenTexture = true;
+ gWindowResized = true;
if (isAgentAvatarValid() && gAgentAvatarp->isEditingAppearance())
{
@@ -5771,8 +5815,8 @@ void LLViewerWindow::restoreGL(const std::string& progress_message)
if (!progress_message.empty())
{
gRestoreGLTimer.reset();
- gRestoreGL = TRUE;
- setShowProgress(TRUE);
+ gRestoreGL = true;
+ setShowProgress(true);
setProgressString(progress_message);
}
LL_INFOS() << "...Restoring GL done" << LL_ENDL;
@@ -5822,7 +5866,7 @@ void LLViewerWindow::checkSettings()
}
}
-void LLViewerWindow::restartDisplay(BOOL show_progress_bar)
+void LLViewerWindow::restartDisplay(bool show_progress_bar)
{
LL_INFOS() << "Restaring GL" << LL_ENDL;
stopGL();
@@ -5836,11 +5880,11 @@ void LLViewerWindow::restartDisplay(BOOL show_progress_bar)
}
}
-BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL enable_vsync, BOOL show_progress_bar)
+bool LLViewerWindow::changeDisplaySettings(LLCoordScreen size, bool enable_vsync, bool show_progress_bar)
{
- //BOOL was_maximized = gSavedSettings.getBOOL("WindowMaximized");
+ //bool was_maximized = gSavedSettings.getBOOL("WindowMaximized");
- //gResizeScreenTexture = TRUE;
+ //gResizeScreenTexture = true;
//U32 fsaa = gSavedSettings.getU32("RenderFSAASamples");
@@ -5854,7 +5898,7 @@ BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL enable_vsync
//if (fsaa == old_fsaa)
{
- return TRUE;
+ return true;
}
/*
@@ -5862,14 +5906,14 @@ BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL enable_vsync
// Close floaters that don't handle settings change
LLFloaterReg::hideInstance("snapshot");
- BOOL result_first_try = FALSE;
- BOOL result_second_try = FALSE;
+ bool result_first_try = false;
+ bool result_second_try = false;
LLFocusableElement* keyboard_focus = gFocusMgr.getKeyboardFocus();
send_agent_pause();
LL_INFOS() << "Stopping GL during changeDisplaySettings" << LL_ENDL;
stopGL();
- mIgnoreActivate = TRUE;
+ mIgnoreActivate = true;
LLCoordScreen old_size;
LLCoordScreen old_pos;
mWindow->getSize(&old_size);
@@ -5887,8 +5931,8 @@ BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL enable_vsync
{
// we are stuck...try once again with a minimal resolution?
send_agent_resume();
- mIgnoreActivate = FALSE;
- return FALSE;
+ mIgnoreActivate = false;
+ return false;
}
}
send_agent_resume();
@@ -5912,7 +5956,7 @@ BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL enable_vsync
size = old_size; // for reshape below
}
- BOOL success = result_first_try || result_second_try;
+ bool success = result_first_try || result_second_try;
if (success)
{
@@ -5930,7 +5974,7 @@ BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL enable_vsync
}
}
- mIgnoreActivate = FALSE;
+ mIgnoreActivate = false;
gFocusMgr.setKeyboardFocus(keyboard_focus);
return success;
@@ -6003,7 +6047,7 @@ LLRect LLViewerWindow::getChatConsoleRect()
console_rect.mLeft += CONSOLE_PADDING_LEFT;
- static const BOOL CHAT_FULL_WIDTH = gSavedSettings.getBOOL("ChatFullWidth");
+ static const bool CHAT_FULL_WIDTH = gSavedSettings.getBOOL("ChatFullWidth");
if (CHAT_FULL_WIDTH)
{
@@ -6037,7 +6081,22 @@ void LLViewerWindow::reshapeStatusBarContainer()
// collapse status_bar_container
new_height -= nav_bar_container->getRect().getHeight();
}
- status_bar_container->reshape(new_width, new_height, TRUE);
+ status_bar_container->reshape(new_width, new_height, true);
+}
+
+void LLViewerWindow::resetStatusBarContainer()
+{
+ LLNavigationBar* navbar = LLNavigationBar::getInstance();
+ if (gSavedSettings.getBOOL("ShowNavbarNavigationPanel") || navbar->getVisible())
+ {
+ // was previously showing navigation bar
+ LLView* nav_bar_container = getRootView()->getChild<LLView>("nav_bar_container");
+ LLPanel* status_bar_container = getRootView()->getChild<LLPanel>("status_bar_container");
+ S32 new_height = status_bar_container->getRect().getHeight();
+ S32 new_width = status_bar_container->getRect().getWidth();
+ new_height -= nav_bar_container->getRect().getHeight();
+ status_bar_container->reshape(new_width, new_height, true);
+ }
}
//----------------------------------------------------------------------------
@@ -6048,7 +6107,7 @@ void LLViewerWindow::setUIVisibility(bool visible)
if (!visible)
{
- gAgentCamera.changeCameraToThirdPerson(FALSE);
+ gAgentCamera.changeCameraToThirdPerson(false);
gFloaterView->hideAllFloaters();
}
else
@@ -6061,8 +6120,8 @@ void LLViewerWindow::setUIVisibility(bool visible)
gToolBarView->setToolBarsVisible(visible);
}
- LLNavigationBar::getInstance()->setVisible(visible ? gSavedSettings.getBOOL("ShowNavbarNavigationPanel") : FALSE);
- LLPanelTopInfoBar::getInstance()->setVisible(visible? gSavedSettings.getBOOL("ShowMiniLocationPanel") : FALSE);
+ LLNavigationBar::getInstance()->setVisible(visible ? gSavedSettings.getBOOL("ShowNavbarNavigationPanel") : false);
+ LLPanelTopInfoBar::getInstance()->setVisible(visible? gSavedSettings.getBOOL("ShowMiniLocationPanel") : false);
mRootView->getChildView("status_bar_container")->setVisible(visible);
}
@@ -6079,7 +6138,7 @@ LLPickInfo::LLPickInfo()
: mKeyMask(MASK_NONE),
mPickCallback(NULL),
mPickType(PICK_INVALID),
- mWantSurfaceInfo(FALSE),
+ mWantSurfaceInfo(false),
mObjectFace(-1),
mUVCoords(-1.f, -1.f),
mSTCoords(-1.f, -1.f),
@@ -6089,20 +6148,20 @@ LLPickInfo::LLPickInfo()
mTangent(),
mBinormal(),
mHUDIcon(NULL),
- mPickTransparent(FALSE),
- mPickRigged(FALSE),
- mPickParticle(FALSE)
+ mPickTransparent(false),
+ mPickRigged(false),
+ mPickParticle(false)
{
}
LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos,
MASK keyboard_mask,
- BOOL pick_transparent,
- BOOL pick_rigged,
- BOOL pick_particle,
- BOOL pick_reflection_probe,
- BOOL pick_uv_coords,
- BOOL pick_unselectable,
+ bool pick_transparent,
+ bool pick_rigged,
+ bool pick_particle,
+ bool pick_reflection_probe,
+ bool pick_uv_coords,
+ bool pick_unselectable,
void (*pick_callback)(const LLPickInfo& pick_info))
: mMousePt(mouse_pos),
mKeyMask(keyboard_mask),
@@ -6127,8 +6186,8 @@ LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos,
void LLPickInfo::fetchResults()
{
-
S32 face_hit = -1;
+
LLVector4a intersection, normal;
LLVector4a tangent;
@@ -6151,8 +6210,8 @@ void LLPickInfo::fetchResults()
}
LLViewerObject* hit_object = gViewerWindow->cursorIntersect(mMousePt.mX, mMousePt.mY, 512.f,
- NULL, -1, mPickTransparent, mPickRigged, mPickUnselectable, mPickReflectionProbe, &face_hit,
- &intersection, &uv, &normal, &tangent, &start, &end);
+ nullptr, -1, mPickTransparent, mPickRigged, mPickUnselectable, mPickReflectionProbe, &face_hit, &mGLTFNodeIndex, &mGLTFPrimitiveIndex,
+ &intersection, &uv, &normal, &tangent, &start, &end);
mPickPt = mMousePt;
@@ -6298,6 +6357,8 @@ void LLPickInfo::getSurfaceInfo()
if (gViewerWindow->cursorIntersect(ll_round((F32)mMousePt.mX), ll_round((F32)mMousePt.mY), 1024.f,
objectp, -1, mPickTransparent, mPickRigged, mPickUnselectable, mPickReflectionProbe,
&mObjectFace,
+ &mGLTFNodeIndex,
+ &mGLTFPrimitiveIndex,
&intersection,
&mSTCoords,
&normal,
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 346073b8a1..300dfccd45 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -91,12 +91,12 @@ public:
LLPickInfo();
LLPickInfo(const LLCoordGL& mouse_pos,
MASK keyboard_mask,
- BOOL pick_transparent,
- BOOL pick_rigged,
- BOOL pick_particle,
- BOOL pick_reflection_probe,
- BOOL pick_surface_info,
- BOOL pick_unselectable,
+ bool pick_transparent,
+ bool pick_rigged,
+ bool pick_particle,
+ bool pick_reflection_probe,
+ bool pick_surface_info,
+ bool pick_unselectable,
void (*pick_callback)(const LLPickInfo& pick_info));
void fetchResults();
@@ -119,6 +119,8 @@ public:
LLUUID mParticleOwnerID;
LLUUID mParticleSourceID;
S32 mObjectFace;
+ S32 mGLTFNodeIndex = -1;
+ S32 mGLTFPrimitiveIndex = -1;
LLHUDIcon* mHUDIcon;
LLVector3 mIntersection;
LLVector2 mUVCoords;
@@ -127,17 +129,17 @@ public:
LLVector3 mNormal;
LLVector4 mTangent;
LLVector3 mBinormal;
- BOOL mPickTransparent;
- BOOL mPickRigged;
- BOOL mPickParticle;
- BOOL mPickUnselectable;
- BOOL mPickReflectionProbe = FALSE;
+ bool mPickTransparent;
+ bool mPickRigged;
+ bool mPickParticle;
+ bool mPickUnselectable;
+ bool mPickReflectionProbe = false;
void getSurfaceInfo();
private:
void updateXYCoords();
- BOOL mWantSurfaceInfo; // do we populate mUVCoord, mNormal, mBinormal?
+ bool mWantSurfaceInfo; // do we populate mUVCoord, mNormal, mBinormal?
};
@@ -182,27 +184,28 @@ public:
void handlePieMenu(S32 x, S32 y, MASK mask);
void reshapeStatusBarContainer();
+ void resetStatusBarContainer(); // undo changes done by resetStatusBarContainer on initWorldUI()
- BOOL handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down, bool &is_toolmgr_action);
+ bool handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, EMouseClickType clicktype, bool down, bool &is_toolmgr_action);
//
// LLWindowCallback interface implementation
//
- /*virtual*/ BOOL handleTranslatedKeyDown(KEY key, MASK mask, BOOL repeated);
- /*virtual*/ BOOL handleTranslatedKeyUp(KEY key, MASK mask);
- /*virtual*/ void handleScanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level);
- /*virtual*/ BOOL handleUnicodeChar(llwchar uni_char, MASK mask); // NOT going to handle extended
- /*virtual*/ BOOL handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask);
- /*virtual*/ BOOL handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask);
- /*virtual*/ BOOL handleCloseRequest(LLWindow *window);
+ /*virtual*/ bool handleTranslatedKeyDown(KEY key, MASK mask, bool repeated);
+ /*virtual*/ bool handleTranslatedKeyUp(KEY key, MASK mask);
+ /*virtual*/ void handleScanKey(KEY key, bool key_down, bool key_up, bool key_level);
+ /*virtual*/ bool handleUnicodeChar(llwchar uni_char, MASK mask); // NOT going to handle extended
+ /*virtual*/ bool handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask);
+ /*virtual*/ bool handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask);
+ /*virtual*/ bool handleCloseRequest(LLWindow *window);
/*virtual*/ void handleQuit(LLWindow *window);
- /*virtual*/ BOOL handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK mask);
- /*virtual*/ BOOL handleRightMouseUp(LLWindow *window, LLCoordGL pos, MASK mask);
- /*virtual*/ BOOL handleMiddleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask);
- /*virtual*/ BOOL handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask);
- /*virtual*/ BOOL handleOtherMouseDown(LLWindow *window, LLCoordGL pos, MASK mask, S32 button);
- /*virtual*/ BOOL handleOtherMouseUp(LLWindow *window, LLCoordGL pos, MASK mask, S32 button);
- BOOL handleOtherMouse(LLWindow *window, LLCoordGL pos, MASK mask, S32 button, bool down);
+ /*virtual*/ bool handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK mask);
+ /*virtual*/ bool handleRightMouseUp(LLWindow *window, LLCoordGL pos, MASK mask);
+ /*virtual*/ bool handleMiddleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask);
+ /*virtual*/ bool handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask);
+ /*virtual*/ bool handleOtherMouseDown(LLWindow *window, LLCoordGL pos, MASK mask, S32 button);
+ /*virtual*/ bool handleOtherMouseUp(LLWindow *window, LLCoordGL pos, MASK mask, S32 button);
+ bool handleOtherMouse(LLWindow *window, LLCoordGL pos, MASK mask, S32 button, bool down);
/*virtual*/ LLWindowCallbacks::DragNDropResult handleDragNDrop(LLWindow *window, LLCoordGL pos, MASK mask, LLWindowCallbacks::DragNDropAction action, std::string data);
void handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask);
void handleMouseDragged(LLWindow *window, LLCoordGL pos, MASK mask);
@@ -210,20 +213,20 @@ public:
/*virtual*/ void handleResize(LLWindow *window, S32 x, S32 y);
/*virtual*/ void handleFocus(LLWindow *window);
/*virtual*/ void handleFocusLost(LLWindow *window);
- /*virtual*/ BOOL handleActivate(LLWindow *window, BOOL activated);
- /*virtual*/ BOOL handleActivateApp(LLWindow *window, BOOL activating);
+ /*virtual*/ bool handleActivate(LLWindow *window, bool activated);
+ /*virtual*/ bool handleActivateApp(LLWindow *window, bool activating);
/*virtual*/ void handleMenuSelect(LLWindow *window, S32 menu_item);
- /*virtual*/ BOOL handlePaint(LLWindow *window, S32 x, S32 y, S32 width, S32 height);
+ /*virtual*/ bool handlePaint(LLWindow *window, S32 x, S32 y, S32 width, S32 height);
/*virtual*/ void handleScrollWheel(LLWindow *window, S32 clicks);
/*virtual*/ void handleScrollHWheel(LLWindow *window, S32 clicks);
- /*virtual*/ BOOL handleDoubleClick(LLWindow *window, LLCoordGL pos, MASK mask);
+ /*virtual*/ bool handleDoubleClick(LLWindow *window, LLCoordGL pos, MASK mask);
/*virtual*/ void handleWindowBlock(LLWindow *window);
/*virtual*/ void handleWindowUnblock(LLWindow *window);
/*virtual*/ void handleDataCopy(LLWindow *window, S32 data_type, void *data);
- /*virtual*/ BOOL handleTimerEvent(LLWindow *window);
- /*virtual*/ BOOL handleDeviceChange(LLWindow *window);
- /*virtual*/ BOOL handleDPIChanged(LLWindow *window, F32 ui_scale_factor, S32 window_width, S32 window_height);
- /*virtual*/ BOOL handleWindowDidChangeScreen(LLWindow *window);
+ /*virtual*/ bool handleTimerEvent(LLWindow *window);
+ /*virtual*/ bool handleDeviceChange(LLWindow *window);
+ /*virtual*/ bool handleDPIChanged(LLWindow *window, F32 ui_scale_factor, S32 window_width, S32 window_height);
+ /*virtual*/ bool handleWindowDidChangeScreen(LLWindow *window);
/*virtual*/ void handlePingWatchdog(LLWindow *window, const char * msg);
/*virtual*/ void handlePauseWatchdog(LLWindow *window);
@@ -278,9 +281,9 @@ public:
S32 getCurrentMouseDY() const { return mCurrentMouseDelta.mY; }
LLCoordGL getCurrentMouseDelta() const { return mCurrentMouseDelta; }
static LLTrace::SampleStatHandle<>* getMouseVelocityStat() { return &sMouseVelocityStat; }
- BOOL getLeftMouseDown() const { return mLeftMouseDown; }
- BOOL getMiddleMouseDown() const { return mMiddleMouseDown; }
- BOOL getRightMouseDown() const { return mRightMouseDown; }
+ bool getLeftMouseDown() const { return mLeftMouseDown; }
+ bool getMiddleMouseDown() const { return mMiddleMouseDown; }
+ bool getRightMouseDown() const { return mRightMouseDown; }
const LLPickInfo& getLastPick() const { return mLastPick; }
@@ -295,7 +298,7 @@ public:
// Is window of our application frontmost?
- BOOL getActive() const { return mActive; }
+ bool getActive() const { return mActive; }
const std::string& getInitAlert() { return mInitAlert; }
@@ -307,16 +310,16 @@ public:
void setCursor( ECursorType c );
void showCursor();
void hideCursor();
- BOOL getCursorHidden() { return mCursorHidden; }
+ bool getCursorHidden() { return mCursorHidden; }
void moveCursorToCenter(); // move to center of window
void initTextures(S32 location_id);
- void setShowProgress(const BOOL show);
- BOOL getShowProgress() const;
+ void setShowProgress(const bool show);
+ bool getShowProgress() const;
void setProgressString(const std::string& string);
void setProgressPercent(const F32 percent);
void setProgressMessage(const std::string& msg);
- void setProgressCancelButtonVisible( BOOL b, const std::string& label = LLStringUtil::null );
+ void setProgressCancelButtonVisible( bool b, const std::string& label = LLStringUtil::null );
LLProgressView *getProgressView() const;
void revealIntroPanel();
void setStartupComplete();
@@ -332,8 +335,8 @@ public:
LLView* getToolBarHolder() { return mToolBarHolder.get(); }
LLView* getHintHolder() { return mHintHolder.get(); }
LLView* getLoginPanelHolder() { return mLoginPanelHolder.get(); }
- BOOL handleKey(KEY key, MASK mask);
- BOOL handleKeyUp(KEY key, MASK mask);
+ bool handleKey(KEY key, MASK mask);
+ bool handleKeyUp(KEY key, MASK mask);
void handleScrollWheel (S32 clicks);
void handleScrollHWheel (S32 clicks);
@@ -343,7 +346,7 @@ public:
void clearPopups();
// Hide normal UI when a logon fails, re-show everything when logon is attempted again
- void setNormalControlsVisible( BOOL visible );
+ void setNormalControlsVisible( bool visible );
void setMenuBackgroundColor(bool god_mode = false, bool dev_grid = false);
void reshape(S32 width, S32 height);
@@ -360,11 +363,11 @@ public:
// snapshot functionality.
// perhaps some of this should move to llfloatershapshot? -MG
- BOOL saveSnapshot(const std::string& filename, S32 image_width, S32 image_height, BOOL show_ui = TRUE, BOOL show_hud = TRUE, BOOL do_rebuild = FALSE, LLSnapshotModel::ESnapshotLayerType type = LLSnapshotModel::SNAPSHOT_TYPE_COLOR, LLSnapshotModel::ESnapshotFormat format = LLSnapshotModel::SNAPSHOT_FORMAT_BMP);
- BOOL rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height, BOOL keep_window_aspect = TRUE, BOOL is_texture = FALSE,
- BOOL show_ui = TRUE, BOOL show_hud = TRUE, BOOL do_rebuild = FALSE, BOOL no_post = FALSE, LLSnapshotModel::ESnapshotLayerType type = LLSnapshotModel::SNAPSHOT_TYPE_COLOR, S32 max_size = MAX_SNAPSHOT_IMAGE_SIZE);
+ bool saveSnapshot(const std::string& filename, S32 image_width, S32 image_height, bool show_ui = true, bool show_hud = true, bool do_rebuild = false, LLSnapshotModel::ESnapshotLayerType type = LLSnapshotModel::SNAPSHOT_TYPE_COLOR, LLSnapshotModel::ESnapshotFormat format = LLSnapshotModel::SNAPSHOT_FORMAT_BMP);
+ bool rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height, bool keep_window_aspect = true, bool is_texture = false,
+ bool show_ui = true, bool show_hud = true, bool do_rebuild = false, bool no_post = false, LLSnapshotModel::ESnapshotLayerType type = LLSnapshotModel::SNAPSHOT_TYPE_COLOR, S32 max_size = MAX_SNAPSHOT_IMAGE_SIZE);
- BOOL simpleSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height, const int num_render_passes);
+ bool simpleSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height, const int num_render_passes);
@@ -374,19 +377,20 @@ public:
// index - cube index in the array to use (cube index, not face-layer)
// face - which cube face to update
// near_clip - near clip setting to use
- BOOL cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubearray, S32 index, S32 face, F32 near_clip, bool render_avatars);
+ bool cubeSnapshot(const LLVector3 &origin, LLCubeMapArray *cubearray, S32 index, S32 face, F32 near_clip, bool render_avatars,
+ bool customCullingPlane = false, LLPlane cullingPlane = LLPlane(LLVector3(0, 0, 0), LLVector3(0, 0, 1)));
// special implementation of simpleSnapshot for reflection maps
- BOOL reflectionSnapshot(LLImageRaw* raw, S32 image_width, S32 image_height, const int num_render_passes);
+ bool reflectionSnapshot(LLImageRaw* raw, S32 image_width, S32 image_height, const int num_render_passes);
- BOOL thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, BOOL show_ui, BOOL show_hud, BOOL do_rebuild, BOOL no_post, LLSnapshotModel::ESnapshotLayerType type);
- BOOL isSnapshotLocSet() const;
+ bool thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, bool show_ui, bool show_hud, bool do_rebuild, bool no_post, LLSnapshotModel::ESnapshotLayerType type);
+ bool isSnapshotLocSet() const;
void resetSnapshotLoc() const;
typedef boost::signals2::signal<void(void)> snapshot_saved_signal_t;
- void saveImageNumbered(LLImageFormatted *image, BOOL force_picker, const snapshot_saved_signal_t::slot_type& success_cb, const snapshot_saved_signal_t::slot_type& failure_cb);
+ void saveImageNumbered(LLImageFormatted *image, bool force_picker, const snapshot_saved_signal_t::slot_type& success_cb, const snapshot_saved_signal_t::slot_type& failure_cb);
void onDirectorySelected(const std::vector<std::string>& filenames, LLImageFormatted *image, const snapshot_saved_signal_t::slot_type& success_cb, const snapshot_saved_signal_t::slot_type& failure_cb);
void saveImageLocal(LLImageFormatted *image, const snapshot_saved_signal_t::slot_type& success_cb, const snapshot_saved_signal_t::slot_type& failure_cb);
void onSelectionFailure(const snapshot_saved_signal_t::slot_type& failure_cb);
@@ -398,7 +402,7 @@ public:
void playSnapshotAnimAndSound();
// draws selection boxes around selected objects, must call displayObjects first
- void renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls, BOOL for_hud );
+ void renderSelections( bool for_gl_pick, bool pick_parcel_walls, bool for_hud );
void performPick();
void returnEmptyPicks();
@@ -406,22 +410,24 @@ public:
S32 y_from_bot,
MASK mask,
void (*callback)(const LLPickInfo& pick_info),
- BOOL pick_transparent = FALSE,
- BOOL pick_rigged = FALSE,
- BOOL pick_unselectable = FALSE,
- BOOL pick_reflection_probes = FALSE);
- LLPickInfo pickImmediate(S32 x, S32 y, BOOL pick_transparent, BOOL pick_rigged = FALSE, BOOL pick_particle = FALSE, BOOL pick_unselectable = TRUE, BOOL pick_reflection_probe = FALSE);
+ bool pick_transparent = false,
+ bool pick_rigged = false,
+ bool pick_unselectable = false,
+ bool pick_reflection_probes = false);
+ LLPickInfo pickImmediate(S32 x, S32 y, bool pick_transparent, bool pick_rigged = false, bool pick_particle = false, bool pick_unselectable = true, bool pick_reflection_probe = false);
LLHUDIcon* cursorIntersectIcon(S32 mouse_x, S32 mouse_y, F32 depth,
LLVector4a* intersection);
LLViewerObject* cursorIntersect(S32 mouse_x = -1, S32 mouse_y = -1, F32 depth = 512.f,
LLViewerObject *this_object = NULL,
S32 this_face = -1,
- BOOL pick_transparent = FALSE,
- BOOL pick_rigged = FALSE,
- BOOL pick_unselectable = TRUE,
- BOOL pick_reflection_probe = TRUE,
+ bool pick_transparent = false,
+ bool pick_rigged = false,
+ bool pick_unselectable = true,
+ bool pick_reflection_probe = true,
S32* face_hit = NULL,
+ S32* gltf_node_hit = nullptr,
+ S32* gltf_primitive_hit = nullptr,
LLVector4a *intersection = NULL,
LLVector2 *uv = NULL,
LLVector4a *normal = NULL,
@@ -438,10 +444,10 @@ public:
//const LLVector3d& lastNonFloraObjectHitOffset();
// mousePointOnLand() returns true if found point
- BOOL mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_pos_global, BOOL ignore_distance = FALSE);
- BOOL mousePointOnPlaneGlobal(LLVector3d& point, const S32 x, const S32 y, const LLVector3d &plane_point, const LLVector3 &plane_normal);
+ bool mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_pos_global, bool ignore_distance = false);
+ bool mousePointOnPlaneGlobal(LLVector3d& point, const S32 x, const S32 y, const LLVector3d &plane_point, const LLVector3 &plane_normal);
LLVector3d clickPointInWorldGlobal(const S32 x, const S32 y_from_bot, LLViewerObject* clicked_object) const;
- BOOL clickPointOnSurfaceGlobal(const S32 x, const S32 y, LLViewerObject *objectp, LLVector3d &point_global) const;
+ bool clickPointOnSurfaceGlobal(const S32 x, const S32 y, LLViewerObject *objectp, LLVector3d &point_global) const;
// Prints window implementation details
void dumpState();
@@ -449,9 +455,9 @@ public:
// handle shutting down GL and bringing it back up
void requestResolutionUpdate();
void checkSettings();
- void restartDisplay(BOOL show_progress_bar);
- BOOL changeDisplaySettings(LLCoordScreen size, BOOL enable_vsync, BOOL show_progress_bar);
- BOOL getIgnoreDestroyWindow() { return mIgnoreActivate; }
+ void restartDisplay(bool show_progress_bar);
+ bool changeDisplaySettings(LLCoordScreen size, bool enable_vsync, bool show_progress_bar);
+ bool getIgnoreDestroyWindow() { return mIgnoreActivate; }
F32 getWorldViewAspectRatio() const;
const LLVector2& getDisplayScale() const { return mDisplayScale; }
void calcDisplayScale();
@@ -465,7 +471,7 @@ private:
void switchToolByMask(MASK mask);
void destroyWindow();
void drawMouselookInstructions();
- void stopGL(BOOL save_state = TRUE);
+ void stopGL(bool save_state = true);
void restoreGL(const std::string& progress_message = LLStringUtil::null);
void initFonts(F32 zoom_factor = 1.f);
void schedulePick(LLPickInfo& pick_info);
@@ -492,9 +498,9 @@ private:
LLCoordGL mCurrentMousePoint; // last mouse position in GL coords
LLCoordGL mLastMousePoint; // Mouse point at last frame.
LLCoordGL mCurrentMouseDelta; //amount mouse moved this frame
- BOOL mLeftMouseDown;
- BOOL mMiddleMouseDown;
- BOOL mRightMouseDown;
+ bool mLeftMouseDown;
+ bool mMiddleMouseDown;
+ bool mRightMouseDown;
LLProgressView *mProgressView;
@@ -503,9 +509,9 @@ private:
std::string mLastToolTipMessage;
LLRect mToolTipStickyRect; // Once a tool tip is shown, it will stay visible until the mouse leaves this rect.
- BOOL mMouseInWindow; // True if the mouse is over our window or if we have captured the mouse.
- BOOL mFocusCycleMode;
- BOOL mAllowMouseDragging;
+ bool mMouseInWindow; // True if the mouse is over our window or if we have captured the mouse.
+ bool mFocusCycleMode;
+ bool mAllowMouseDragging;
LLFrameTimer mMouseDownTimer;
typedef std::set<LLHandle<LLView> > view_handle_set_t;
view_handle_set_t mMouseHoverViews;
@@ -513,8 +519,8 @@ private:
// Variables used for tool override switching based on modifier keys. JC
MASK mLastMask; // used to detect changes in modifier mask
LLTool* mToolStored; // the tool we're overriding
- BOOL mHideCursorPermanent; // true during drags, mouselook
- BOOL mCursorHidden;
+ bool mHideCursorPermanent; // true during drags, mouselook
+ bool mCursorHidden;
LLPickInfo mLastPick;
std::vector<LLPickInfo> mPicks;
LLRect mPickScreenRegion; // area of frame buffer for rendering pick frames (generally follows mouse to avoid going offscreen)
@@ -522,7 +528,7 @@ private:
std::string mOverlayTitle; // Used for special titles such as "Second Life - Special E3 2003 Beta"
- BOOL mIgnoreActivate;
+ bool mIgnoreActivate;
std::string mInitAlert; // Window / GL initialization requires an alert
@@ -544,6 +550,8 @@ private:
// Object temporarily hovered over while dragging
LLPointer<LLViewerObject> mDragHoveredObject;
+ boost::signals2::connection mMaxVRAMControlConnection;
+
static LLTrace::SampleStatHandle<> sMouseVelocityStat;
};
@@ -567,9 +575,9 @@ extern S32 gDebugRaycastFaceHit;
extern LLVector4a gDebugRaycastStart;
extern LLVector4a gDebugRaycastEnd;
-extern BOOL gDisplayCameraPos;
-extern BOOL gDisplayWindInfo;
-extern BOOL gDisplayFOV;
-extern BOOL gDisplayBadge;
+extern bool gDisplayCameraPos;
+extern bool gDisplayWindInfo;
+extern bool gDisplayFOV;
+extern bool gDisplayBadge;
#endif
diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp
index 001fab7755..dc97beac93 100644
--- a/indra/newview/llvlcomposition.cpp
+++ b/indra/newview/llvlcomposition.cpp
@@ -28,47 +28,361 @@
#include "llvlcomposition.h"
+#include <functional>
+
#include "llerror.h"
#include "v3math.h"
#include "llsurface.h"
#include "lltextureview.h"
#include "llviewertexture.h"
#include "llviewertexturelist.h"
+#include "llfetchedgltfmaterial.h"
+#include "llgltfmateriallist.h"
#include "llviewerregion.h"
#include "noise.h"
#include "llregionhandle.h" // for from_region_handle
#include "llviewercontrol.h"
+extern LLColor4U MAX_WATER_COLOR;
+
+static const U32 BASE_SIZE = 128;
+static const F32 TERRAIN_DECODE_PRIORITY = 2048.f * 2048.f;
+
+namespace
+{
+ F32 bilinear(const F32 v00, const F32 v01, const F32 v10, const F32 v11, const F32 x_frac, const F32 y_frac)
+ {
+ // Not sure if this is the right math...
+ // Take weighted average of all four points (bilinear interpolation)
+ F32 result;
+
+ const F32 inv_x_frac = 1.f - x_frac;
+ const F32 inv_y_frac = 1.f - y_frac;
+ result = inv_x_frac*inv_y_frac*v00
+ + x_frac*inv_y_frac*v10
+ + inv_x_frac*y_frac*v01
+ + x_frac*y_frac*v11;
+
+ return result;
+ }
+
+ void boost_minimap_texture(LLViewerFetchedTexture* tex, F32 virtual_size)
+ {
+ llassert(tex);
+ if (!tex) { return; }
+
+ tex->setBoostLevel(LLGLTexture::BOOST_TERRAIN); // in case the raw image is at low detail
+ tex->addTextureStats(virtual_size); // priority
+ }
+
+ void boost_minimap_material(LLFetchedGLTFMaterial* mat, F32 virtual_size)
+ {
+ if (!mat) { return; }
+ if (mat->mBaseColorTexture) { boost_minimap_texture(mat->mBaseColorTexture, virtual_size); }
+ if (mat->mNormalTexture) { boost_minimap_texture(mat->mNormalTexture, virtual_size); }
+ if (mat->mMetallicRoughnessTexture) { boost_minimap_texture(mat->mMetallicRoughnessTexture, virtual_size); }
+ if (mat->mEmissiveTexture) { boost_minimap_texture(mat->mEmissiveTexture, virtual_size); }
+ }
+
+ void unboost_minimap_texture(LLViewerFetchedTexture* tex)
+ {
+ if (!tex) { return; }
+ tex->setBoostLevel(LLGLTexture::BOOST_NONE);
+ tex->setMinDiscardLevel(MAX_DISCARD_LEVEL + 1);
+ }
+
+ void unboost_minimap_material(LLFetchedGLTFMaterial* mat)
+ {
+ if (!mat) { return; }
+ if (mat->mBaseColorTexture) { unboost_minimap_texture(mat->mBaseColorTexture); }
+ if (mat->mNormalTexture) { unboost_minimap_texture(mat->mNormalTexture); }
+ if (mat->mMetallicRoughnessTexture) { unboost_minimap_texture(mat->mMetallicRoughnessTexture); }
+ if (mat->mEmissiveTexture) { unboost_minimap_texture(mat->mEmissiveTexture); }
+ }
+};
+
+LLTerrainMaterials::LLTerrainMaterials()
+{
+ for (S32 i = 0; i < ASSET_COUNT; ++i)
+ {
+ mMaterialTexturesSet[i] = false;
+ }
+}
+
+LLTerrainMaterials::~LLTerrainMaterials()
+{
+ unboost();
+}
+
+BOOL LLTerrainMaterials::generateMaterials()
+{
+ if (texturesReady(true, true))
+ {
+ return TRUE;
+ }
+
+ if (materialsReady(true, true))
+ {
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+void LLTerrainMaterials::boost()
+{
+ for (S32 i = 0; i < ASSET_COUNT; ++i)
+ {
+ LLPointer<LLViewerFetchedTexture>& tex = mDetailTextures[i];
+ llassert(tex.notNull());
+ boost_minimap_texture(tex, TERRAIN_DECODE_PRIORITY);
+
+ LLPointer<LLFetchedGLTFMaterial>& mat = mDetailMaterials[i];
+ boost_minimap_material(mat, TERRAIN_DECODE_PRIORITY);
+ }
+}
+
+void LLTerrainMaterials::unboost()
+{
+ for (S32 i = 0; i < ASSET_COUNT; ++i)
+ {
+ LLPointer<LLViewerFetchedTexture>& tex = mDetailTextures[i];
+ unboost_minimap_texture(tex);
+
+ LLPointer<LLFetchedGLTFMaterial>& mat = mDetailMaterials[i];
+ unboost_minimap_material(mat);
+ }
+}
+
+LLUUID LLTerrainMaterials::getDetailAssetID(S32 asset)
+{
+ llassert(mDetailTextures[asset] && mDetailMaterials[asset]);
+ // Assume both the the material and texture were fetched in the same way
+ // using the same UUID. However, we may not know at this point which one
+ // will load.
+ return mDetailTextures[asset] ? mDetailTextures[asset]->getID() : LLUUID::null;
+}
+
+LLPointer<LLViewerFetchedTexture> fetch_terrain_texture(const LLUUID& id)
+{
+ if (id.isNull())
+ {
+ return nullptr;
+ }
+
+ LLPointer<LLViewerFetchedTexture> tex = LLViewerTextureManager::getFetchedTexture(id);
+ return tex;
+}
+
+void LLTerrainMaterials::setDetailAssetID(S32 asset, const LLUUID& id)
+{
+ // *NOTE: If there were multiple terrain swatches using the same asset
+ // ID, the asset still in use will be temporarily unboosted.
+ // It will be boosted again during terrain rendering.
+ unboost_minimap_texture(mDetailTextures[asset]);
+ unboost_minimap_material(mDetailMaterials[asset]);
+
+ // This is terrain texture, but we are not setting it as BOOST_TERRAIN
+ // since we will be manipulating it later as needed.
+ mDetailTextures[asset] = fetch_terrain_texture(id);
+ LLPointer<LLFetchedGLTFMaterial>& mat = mDetailMaterials[asset];
+ mat = id.isNull() ? nullptr : gGLTFMaterialList.getMaterial(id);
+ mMaterialTexturesSet[asset] = false;
+}
+
+LLTerrainMaterials::Type LLTerrainMaterials::getMaterialType()
+{
+ LL_PROFILE_ZONE_SCOPED;
+
+ const BOOL use_textures = texturesReady(false, false) || !materialsReady(false, false);
+ return use_textures ? Type::TEXTURE : Type::PBR;
+}
+
+bool LLTerrainMaterials::texturesReady(bool boost, bool strict)
+{
+ bool ready[ASSET_COUNT];
+ // *NOTE: Calls to textureReady may boost textures. Do not early-return.
+ for (S32 i = 0; i < ASSET_COUNT; i++)
+ {
+ ready[i] = mDetailTextures[i].notNull() && textureReady(mDetailTextures[i], boost);
+ }
+
+ bool one_ready = false;
+ for (S32 i = 0; i < ASSET_COUNT; i++)
+ {
+ const bool current_ready = ready[i];
+ one_ready = one_ready || current_ready;
+ if (!current_ready && strict)
+ {
+ return false;
+ }
+ }
+ return one_ready;
+}
+
+bool LLTerrainMaterials::materialsReady(bool boost, bool strict)
+{
+ bool ready[ASSET_COUNT];
+ // *NOTE: Calls to materialReady may boost materials/textures. Do not early-return.
+ for (S32 i = 0; i < ASSET_COUNT; i++)
+ {
+ ready[i] = materialReady(mDetailMaterials[i], mMaterialTexturesSet[i], boost, strict);
+ }
+
+#if 1
+ static LLCachedControl<bool> sRenderTerrainPBREnabled(gSavedSettings, "RenderTerrainPBREnabled", false);
+ static LLCachedControl<bool> sRenderTerrainPBRForce(gSavedSettings, "RenderTerrainPBRForce", false);
+ if (sRenderTerrainPBREnabled && sRenderTerrainPBRForce)
+ {
+ bool defined = true;
+ for (S32 i = 0; i < ASSET_COUNT; i++)
+ {
+ if (!mDetailMaterials[i])
+ {
+ defined = false;
+ break;
+ }
+ }
+ if (defined)
+ {
+ return true;
+ }
+ }
+#endif
+
+ bool one_ready = false;
+ for (S32 i = 0; i < ASSET_COUNT; i++)
+ {
+ const bool current_ready = ready[i];
+ one_ready = one_ready || current_ready;
+ if (!current_ready && strict)
+ {
+ return false;
+ }
+ }
+ return one_ready;
+}
-F32 bilinear(const F32 v00, const F32 v01, const F32 v10, const F32 v11, const F32 x_frac, const F32 y_frac)
+// Boost the texture loading priority
+// Return true when ready to use (i.e. texture is sufficiently loaded)
+// static
+bool LLTerrainMaterials::textureReady(LLPointer<LLViewerFetchedTexture>& tex, bool boost)
{
- // Not sure if this is the right math...
- // Take weighted average of all four points (bilinear interpolation)
- F32 result;
-
- const F32 inv_x_frac = 1.f - x_frac;
- const F32 inv_y_frac = 1.f - y_frac;
- result = inv_x_frac*inv_y_frac*v00
- + x_frac*inv_y_frac*v10
- + inv_x_frac*y_frac*v01
- + x_frac*y_frac*v11;
-
- return result;
+ llassert(tex);
+ if (!tex) { return false; }
+
+ if (tex->getDiscardLevel() < 0)
+ {
+ if (boost)
+ {
+ boost_minimap_texture(tex, BASE_SIZE*BASE_SIZE);
+ }
+ return false;
+ }
+ if ((tex->getDiscardLevel() != 0 &&
+ (tex->getWidth() < BASE_SIZE ||
+ tex->getHeight() < BASE_SIZE)))
+ {
+ if (boost)
+ {
+ boost_minimap_texture(tex, BASE_SIZE*BASE_SIZE);
+
+ S32 width = tex->getFullWidth();
+ S32 height = tex->getFullHeight();
+ S32 min_dim = llmin(width, height);
+ S32 ddiscard = 0;
+ while (min_dim > BASE_SIZE && ddiscard < MAX_DISCARD_LEVEL)
+ {
+ ddiscard++;
+ min_dim /= 2;
+ }
+ tex->setMinDiscardLevel(ddiscard);
+ }
+ return false;
+ }
+ if (tex->getComponents() == 0)
+ {
+ return false;
+ }
+ return true;
}
+// Boost the loading priority of every known texture in the material
+// Return true when ready to use
+// static
+bool LLTerrainMaterials::materialReady(LLPointer<LLFetchedGLTFMaterial> &mat, bool &textures_set, bool boost, bool strict)
+{
+ if (!mat || !mat->isLoaded())
+ {
+ return false;
+ }
+
+ // Material is loaded, but textures may not be
+ if (!textures_set)
+ {
+ textures_set = true;
+ // *NOTE: These can sometimes be set to to nullptr due to
+ // updateTEMaterialTextures. For the sake of robustness, we emulate
+ // that fetching behavior by setting textures of null IDs to nullptr.
+ mat->mBaseColorTexture = fetch_terrain_texture(mat->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR]);
+ mat->mNormalTexture = fetch_terrain_texture(mat->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_NORMAL]);
+ mat->mMetallicRoughnessTexture = fetch_terrain_texture(mat->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_METALLIC_ROUGHNESS]);
+ mat->mEmissiveTexture = fetch_terrain_texture(mat->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_EMISSIVE]);
+ }
+
+ // *NOTE: Calls to textureReady may boost textures. Do not early-return.
+ bool ready[LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT];
+ ready[LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR] =
+ mat->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR].isNull() || textureReady(mat->mBaseColorTexture, boost);
+ ready[LLGLTFMaterial::GLTF_TEXTURE_INFO_NORMAL] =
+ mat->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_NORMAL].isNull() || textureReady(mat->mNormalTexture, boost);
+ ready[LLGLTFMaterial::GLTF_TEXTURE_INFO_METALLIC_ROUGHNESS] =
+ mat->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_METALLIC_ROUGHNESS].isNull() ||
+ textureReady(mat->mMetallicRoughnessTexture, boost);
+ ready[LLGLTFMaterial::GLTF_TEXTURE_INFO_EMISSIVE] =
+ mat->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_EMISSIVE].isNull() || textureReady(mat->mEmissiveTexture, boost);
+
+ if (strict)
+ {
+ for (U32 i = 0; i < LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT; ++i)
+ {
+ if (!ready[i])
+ {
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
+// static
+const LLUUID (&LLVLComposition::getDefaultTextures())[ASSET_COUNT]
+{
+ const static LLUUID default_textures[LLVLComposition::ASSET_COUNT] =
+ {
+ TERRAIN_DIRT_DETAIL,
+ TERRAIN_GRASS_DETAIL,
+ TERRAIN_MOUNTAIN_DETAIL,
+ TERRAIN_ROCK_DETAIL
+ };
+ return default_textures;
+}
LLVLComposition::LLVLComposition(LLSurface *surfacep, const U32 width, const F32 scale) :
+ LLTerrainMaterials(),
LLViewerLayer(width, scale),
- mParamsReady(FALSE)
+ mParamsReady(false)
{
- mSurfacep = surfacep;
-
// Load Terrain Textures - Original ones
- setDetailTextureID(0, TERRAIN_DIRT_DETAIL);
- setDetailTextureID(1, TERRAIN_GRASS_DETAIL);
- setDetailTextureID(2, TERRAIN_MOUNTAIN_DETAIL);
- setDetailTextureID(3, TERRAIN_ROCK_DETAIL);
+ const LLUUID (&default_textures)[LLVLComposition::ASSET_COUNT] = LLVLComposition::getDefaultTextures();
+ for (S32 i = 0; i < ASSET_COUNT; ++i)
+ {
+ setDetailAssetID(i, default_textures[i]);
+ }
+
+ mSurfacep = surfacep;
// Initialize the texture matrix to defaults.
for (S32 i = 0; i < CORNER_COUNT; ++i)
@@ -76,14 +390,12 @@ LLVLComposition::LLVLComposition(LLSurface *surfacep, const U32 width, const F32
mStartHeight[i] = gSavedSettings.getF32("TerrainColorStartHeight");
mHeightRange[i] = gSavedSettings.getF32("TerrainColorHeightRange");
}
- mTexScaleX = 16.f;
- mTexScaleY = 16.f;
- mTexturesLoaded = FALSE;
}
LLVLComposition::~LLVLComposition()
{
+ LLTerrainMaterials::~LLTerrainMaterials();
}
@@ -92,27 +404,13 @@ void LLVLComposition::setSurface(LLSurface *surfacep)
mSurfacep = surfacep;
}
-
-void LLVLComposition::setDetailTextureID(S32 corner, const LLUUID& id)
-{
- if(id.isNull())
- {
- return;
- }
- // This is terrain texture, but we are not setting it as BOOST_TERRAIN
- // since we will be manipulating it later as needed.
- mDetailTextures[corner] = LLViewerTextureManager::getFetchedTexture(id);
- mDetailTextures[corner]->setNoDelete() ;
- mRawImages[corner] = NULL;
-}
-
-BOOL LLVLComposition::generateHeights(const F32 x, const F32 y,
+bool LLVLComposition::generateHeights(const F32 x, const F32 y,
const F32 width, const F32 height)
{
if (!mParamsReady)
{
// All the parameters haven't been set yet (we haven't gotten the message from the sim)
- return FALSE;
+ return false;
}
llassert(mSurfacep);
@@ -120,7 +418,7 @@ BOOL LLVLComposition::generateHeights(const F32 x, const F32 y,
if (!mSurfacep || !mSurfacep->getRegion())
{
// We don't always have the region yet here....
- return FALSE;
+ return false;
}
S32 x_begin, y_begin, x_end, y_end;
@@ -149,10 +447,6 @@ BOOL LLVLComposition::generateHeights(const F32 x, const F32 y,
const F32 noise_magnitude = 2.f; // Degree to which noise modulates composition layer (versus
// simple height)
- // Heights map into textures as 0-1 = first, 1-2 = second, etc.
- // So we need to compress heights into this range.
- const S32 NUM_TEXTURES = 4;
-
const F32 xyScaleInv = (1.f / xyScale);
const F32 zScaleInv = (1.f / zScale);
@@ -199,59 +493,132 @@ BOOL LLVLComposition::generateHeights(const F32 x, const F32 y,
twiddle += turbulence2(vec, 2)*slope_squared; // High frequency component
twiddle *= noise_magnitude;
- F32 scaled_noisy_height = (height + twiddle - start_height) * F32(NUM_TEXTURES) / height_range;
+ F32 scaled_noisy_height = (height + twiddle - start_height) * F32(ASSET_COUNT) / height_range;
scaled_noisy_height = llmax(0.f, scaled_noisy_height);
scaled_noisy_height = llmin(3.f, scaled_noisy_height);
*(mDatap + i + j*mWidth) = scaled_noisy_height;
}
}
- return TRUE;
+ return true;
}
-static const U32 BASE_SIZE = 128;
+LLTerrainMaterials gLocalTerrainMaterials;
-BOOL LLVLComposition::generateComposition()
+bool LLVLComposition::generateComposition()
{
-
if (!mParamsReady)
{
// All the parameters haven't been set yet (we haven't gotten the message from the sim)
- return FALSE;
+ return false;
}
- for (S32 i = 0; i < 4; i++)
- {
- if (mDetailTextures[i]->getDiscardLevel() < 0)
- {
- mDetailTextures[i]->setBoostLevel(LLGLTexture::BOOST_TERRAIN); // in case we are at low detail
- mDetailTextures[i]->addTextureStats(BASE_SIZE*BASE_SIZE);
- return FALSE;
- }
- if ((mDetailTextures[i]->getDiscardLevel() != 0 &&
- (mDetailTextures[i]->getWidth() < BASE_SIZE ||
- mDetailTextures[i]->getHeight() < BASE_SIZE)))
- {
- S32 width = mDetailTextures[i]->getFullWidth();
- S32 height = mDetailTextures[i]->getFullHeight();
- S32 min_dim = llmin(width, height);
- S32 ddiscard = 0;
- while (min_dim > BASE_SIZE && ddiscard < MAX_DISCARD_LEVEL)
- {
- ddiscard++;
- min_dim /= 2;
- }
- mDetailTextures[i]->setBoostLevel(LLGLTexture::BOOST_TERRAIN); // in case we are at low detail
- mDetailTextures[i]->setMinDiscardLevel(ddiscard);
- mDetailTextures[i]->addTextureStats(BASE_SIZE*BASE_SIZE); // priority
- return FALSE;
- }
- }
-
- return TRUE;
+ return LLTerrainMaterials::generateMaterials();
}
-BOOL LLVLComposition::generateTexture(const F32 x, const F32 y,
+namespace
+{
+ void prepare_fallback_image(LLImageRaw* raw_image)
+ {
+ raw_image->resize(BASE_SIZE, BASE_SIZE, 4);
+ raw_image->fill(LLColor4U::white);
+ }
+
+ // Check if the raw image is loaded for this texture at a discard
+ // level the minimap can use, and if not then try to get it loaded.
+ bool prepare_raw_image(LLPointer<LLImageRaw>& raw_image, bool emissive, LLViewerFetchedTexture* tex, bool& delete_raw_post)
+ {
+ if (!tex)
+ {
+ if (!emissive)
+ {
+ prepare_fallback_image(raw_image);
+ }
+ else
+ {
+ llassert(!raw_image);
+ raw_image = nullptr;
+ }
+ return true;
+ }
+ if (raw_image)
+ {
+ // Callback already initiated
+ if (raw_image->getDataSize() > 0)
+ {
+ // Callback finished
+ delete_raw_post = true;
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ raw_image = new LLImageRaw();
+
+ S32 ddiscard = 0;
+ {
+ S32 min_dim = llmin(tex->getFullWidth(), tex->getFullHeight());
+ while (min_dim > BASE_SIZE && ddiscard < MAX_DISCARD_LEVEL)
+ {
+ ddiscard++;
+ min_dim /= 2;
+ }
+ }
+
+ struct PendingImage
+ {
+ LLImageRaw* mRawImage;
+ S32 mDesiredDiscard;
+ LLUUID mTextureId;
+ PendingImage(LLImageRaw* raw_image, S32 ddiscard, const LLUUID& texture_id)
+ : mRawImage(raw_image)
+ , mDesiredDiscard(ddiscard)
+ , mTextureId(texture_id)
+ {
+ mRawImage->ref();
+ }
+ ~PendingImage()
+ {
+ mRawImage->unref();
+ }
+ };
+ PendingImage* pending_image = new PendingImage(raw_image, ddiscard, tex->getID());
+
+ loaded_callback_func cb = [](bool success, LLViewerFetchedTexture * src_vi, LLImageRaw * src, LLImageRaw * src_aux, S32 discard_level, bool is_final, void* userdata) {
+ PendingImage* pending = (PendingImage*)userdata;
+ // Owning LLVLComposition still exists
+
+ // Assume mRawImage only used by single LLVLComposition for now
+ const bool in_use_by_composition = pending->mRawImage->getNumRefs() > 1;
+ llassert(pending->mRawImage->getNumRefs());
+ llassert(pending->mRawImage->getNumRefs() <= 2);
+ const bool needs_data = !pending->mRawImage->getDataSize();
+ if (in_use_by_composition && needs_data)
+ {
+ if (success && pending->mDesiredDiscard == discard_level)
+ {
+ pending->mRawImage->resize(BASE_SIZE, BASE_SIZE, src->getComponents());
+ pending->mRawImage->copyScaled(src);
+ }
+ else if (is_final)
+ {
+ prepare_fallback_image(pending->mRawImage);
+ }
+ }
+
+ if (is_final) { delete pending; }
+ };
+ tex->setLoadedCallback(cb, ddiscard, true, false, pending_image, nullptr);
+ tex->forceToSaveRawImage(ddiscard);
+
+ return false;
+ }
+};
+
+bool LLVLComposition::generateMinimapTileLand(const F32 x, const F32 y,
const F32 width, const F32 height)
{
LL_PROFILE_ZONE_SCOPED
@@ -259,8 +626,6 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y,
llassert(x >= 0.f);
llassert(y >= 0.f);
- LLTimer gen_timer;
-
///////////////////////////
//
// Generate raw data arrays for surface textures
@@ -268,52 +633,138 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y,
//
// These have already been validated by generateComposition.
- U8* st_data[4];
- S32 st_data_size[4]; // for debugging
-
- for (S32 i = 0; i < 4; i++)
+ U8* st_data[ASSET_COUNT];
+ S32 st_data_size[ASSET_COUNT]; // for debugging
+
+ const bool use_textures = getMaterialType() != LLTerrainMaterials::Type::PBR;
+ if (use_textures)
+ {
+ if (!texturesReady(true, true)) { return FALSE; }
+ }
+ else
+ {
+ if (!materialsReady(true, true)) { return FALSE; }
+ }
+
+ for (S32 i = 0; i < ASSET_COUNT; i++)
{
if (mRawImages[i].isNull())
{
// Read back a raw image for this discard level, if it exists
- S32 min_dim = llmin(mDetailTextures[i]->getFullWidth(), mDetailTextures[i]->getFullHeight());
- S32 ddiscard = 0;
- while (min_dim > BASE_SIZE && ddiscard < MAX_DISCARD_LEVEL)
- {
- ddiscard++;
- min_dim /= 2;
- }
-
- BOOL delete_raw = (mDetailTextures[i]->reloadRawImage(ddiscard) != NULL) ;
- if(mDetailTextures[i]->getRawImageLevel() != ddiscard)//raw iamge is not ready, will enter here again later.
- {
- if (mDetailTextures[i]->getFetchPriority() <= 0.0f && !mDetailTextures[i]->hasSavedRawImage())
+ LLViewerFetchedTexture* tex;
+ LLViewerFetchedTexture* tex_emissive; // Can be null
+ bool has_base_color_factor;
+ bool has_emissive_factor;
+ bool has_alpha;
+ LLColor3 base_color_factor;
+ LLColor3 emissive_factor;
+ if (use_textures)
+ {
+ tex = mDetailTextures[i];
+ tex_emissive = nullptr;
+ has_base_color_factor = false;
+ has_emissive_factor = false;
+ has_alpha = false;
+ llassert(tex);
+ }
+ else
+ {
+ tex = mDetailMaterials[i]->mBaseColorTexture;
+ tex_emissive = mDetailMaterials[i]->mEmissiveTexture;
+ base_color_factor = LLColor3(mDetailMaterials[i]->mBaseColor);
+ // *HACK: Treat alpha as black
+ base_color_factor *= (mDetailMaterials[i]->mBaseColor.mV[VW]);
+ emissive_factor = mDetailMaterials[i]->mEmissiveColor;
+ has_base_color_factor = (base_color_factor.mV[VX] != 1.f ||
+ base_color_factor.mV[VY] != 1.f ||
+ base_color_factor.mV[VZ] != 1.f);
+ has_emissive_factor = (emissive_factor.mV[VX] != 1.f ||
+ emissive_factor.mV[VY] != 1.f ||
+ emissive_factor.mV[VZ] != 1.f);
+ has_alpha = mDetailMaterials[i]->mAlphaMode != LLGLTFMaterial::ALPHA_MODE_OPAQUE;
+ }
+
+ if (!tex) { tex = LLViewerFetchedTexture::sWhiteImagep; }
+
+ bool delete_raw_post = false;
+ bool delete_raw_post_emissive = false;
+ if (!prepare_raw_image(mRawImagesBaseColor[i], false, tex, delete_raw_post)) { return FALSE; }
+ if (tex_emissive && !prepare_raw_image(mRawImagesEmissive[i], true, tex_emissive, delete_raw_post_emissive)) { return FALSE; }
+ // tex_emissive can be null, and then will be ignored
+
+ // In the simplest case, the minimap image is just the base color.
+ // This will be replaced if we need to do any tinting/compositing.
+ mRawImages[i] = mRawImagesBaseColor[i];
+
+ // *TODO: This isn't quite right for PBR:
+ // 1) It does not convert the color images from SRGB to linear
+ // before mixing (which will always require copying the image).
+ // 2) It mixes emissive and base color before mixing terrain
+ // materials, but it should be the other way around
+ // Long-term, we should consider a method that is more
+ // maintainable. Shaders, perhaps? Bake shaders to textures?
+ LLPointer<LLImageRaw> raw_emissive;
+ if (tex_emissive)
+ {
+ raw_emissive = mRawImagesEmissive[i];
+ if (has_emissive_factor ||
+ tex_emissive->getWidth(tex_emissive->getRawImageLevel()) != BASE_SIZE ||
+ tex_emissive->getHeight(tex_emissive->getRawImageLevel()) != BASE_SIZE ||
+ tex_emissive->getComponents() != 4)
{
- mDetailTextures[i]->setBoostLevel(LLGLTexture::BOOST_MAP);
- mDetailTextures[i]->forceToRefetchTexture(ddiscard);
+ LLPointer<LLImageRaw> newraw_emissive = new LLImageRaw(BASE_SIZE, BASE_SIZE, 4);
+ // Copy RGB, leave alpha alone (set to opaque by default)
+ newraw_emissive->copy(mRawImagesEmissive[i]);
+ if (has_emissive_factor)
+ {
+ newraw_emissive->tint(emissive_factor);
+ }
+ raw_emissive = newraw_emissive;
}
-
- if(delete_raw)
- {
- mDetailTextures[i]->destroyRawImage() ;
- }
- LL_DEBUGS("Terrain") << "cached raw data for terrain detail texture is not ready yet: " << mDetailTextures[i]->getID() << " Discard: " << ddiscard << LL_ENDL;
- return FALSE;
- }
-
- mRawImages[i] = mDetailTextures[i]->getRawImage() ;
- if(delete_raw)
- {
- mDetailTextures[i]->destroyRawImage() ;
- }
- if (mDetailTextures[i]->getWidth(ddiscard) != BASE_SIZE ||
- mDetailTextures[i]->getHeight(ddiscard) != BASE_SIZE ||
- mDetailTextures[i]->getComponents() != 3)
+ }
+ if (has_base_color_factor ||
+ raw_emissive ||
+ has_alpha ||
+ tex->getWidth(tex->getRawImageLevel()) != BASE_SIZE ||
+ tex->getHeight(tex->getRawImageLevel()) != BASE_SIZE ||
+ tex->getComponents() != 3)
{
LLPointer<LLImageRaw> newraw = new LLImageRaw(BASE_SIZE, BASE_SIZE, 3);
- newraw->composite(mRawImages[i]);
+ if (has_alpha)
+ {
+ // Approximate the water underneath terrain alpha with solid water color
+ newraw->clear(
+ MAX_WATER_COLOR.mV[VX],
+ MAX_WATER_COLOR.mV[VY],
+ MAX_WATER_COLOR.mV[VZ],
+ 255);
+ }
+ newraw->composite(mRawImagesBaseColor[i]);
+ if (has_base_color_factor)
+ {
+ newraw->tint(base_color_factor);
+ }
+ // Apply emissive texture
+ if (raw_emissive)
+ {
+ newraw->addEmissive(raw_emissive);
+ }
+
mRawImages[i] = newraw; // deletes old
}
+
+ if (delete_raw_post)
+ {
+ tex->destroyRawImage();
+ }
+ if (delete_raw_post_emissive)
+ {
+ tex_emissive->destroyRawImage();
+ }
+
+ // Remove intermediary image references
+ mRawImagesBaseColor[i] = nullptr;
+ mRawImagesEmissive[i] = nullptr;
}
st_data[i] = mRawImages[i]->getData();
st_data_size[i] = mRawImages[i]->getDataSize();
@@ -333,12 +784,12 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y,
if (x_end > mWidth)
{
- LL_WARNS("Terrain") << "x end > width" << LL_ENDL;
+ llassert(false);
x_end = mWidth;
}
if (y_end > mWidth)
{
- LL_WARNS("Terrain") << "y end > width" << LL_ENDL;
+ llassert(false);
y_end = mWidth;
}
@@ -368,8 +819,8 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y,
if (tex_comps != st_comps)
{
- LL_WARNS("Terrain") << "Base texture comps != input texture comps" << LL_ENDL;
- return FALSE;
+ llassert(false);
+ return false;
}
tex_x_scalef = (F32)tex_width / (F32)mWidth;
@@ -459,29 +910,36 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y,
}
texturep->setSubImage(raw, tex_x_begin, tex_y_begin, tex_x_end - tex_x_begin, tex_y_end - tex_y_begin);
- for (S32 i = 0; i < 4; i++)
- {
- // Un-boost detatil textures (will get re-boosted if rendering in high detail)
- mDetailTextures[i]->setBoostLevel(LLGLTexture::BOOST_NONE);
- mDetailTextures[i]->setMinDiscardLevel(MAX_DISCARD_LEVEL + 1);
- }
+ // Un-boost detail textures (will get re-boosted if rendering in high detail)
+ for (S32 i = 0; i < ASSET_COUNT; i++)
+ {
+ unboost_minimap_texture(mDetailTextures[i]);
+ }
+
+ // Un-boost textures for each detail material (will get re-boosted if rendering in high detail)
+ for (S32 i = 0; i < ASSET_COUNT; i++)
+ {
+ unboost_minimap_material(mDetailMaterials[i]);
+ }
- return TRUE;
-}
-
-LLUUID LLVLComposition::getDetailTextureID(S32 corner)
-{
- return mDetailTextures[corner]->getID();
+ return true;
}
-LLViewerFetchedTexture* LLVLComposition::getDetailTexture(S32 corner)
+F32 LLVLComposition::getStartHeight(S32 corner)
{
- return mDetailTextures[corner];
+ return mStartHeight[corner];
}
-F32 LLVLComposition::getStartHeight(S32 corner)
+void LLVLComposition::setDetailAssetID(S32 asset, const LLUUID& id)
{
- return mStartHeight[corner];
+ if (id.isNull())
+ {
+ return;
+ }
+ LLTerrainMaterials::setDetailAssetID(asset, id);
+ mRawImages[asset] = NULL;
+ mRawImagesBaseColor[asset] = NULL;
+ mRawImagesEmissive[asset] = NULL;
}
void LLVLComposition::setStartHeight(S32 corner, const F32 start_height)
diff --git a/indra/newview/llvlcomposition.h b/indra/newview/llvlcomposition.h
index 2dd04ac5a5..cde0e216c3 100644
--- a/indra/newview/llvlcomposition.h
+++ b/indra/newview/llvlcomposition.h
@@ -28,23 +28,79 @@
#define LL_LLVLCOMPOSITION_H
#include "llviewerlayer.h"
-#include "llviewertexture.h"
+#include "llpointer.h"
+
+#include "llimage.h"
class LLSurface;
-class LLVLComposition : public LLViewerLayer
+class LLViewerFetchedTexture;
+class LLFetchedGLTFMaterial;
+
+class LLTerrainMaterials
{
public:
+ friend class LLDrawPoolTerrain;
+
+ LLTerrainMaterials();
+ virtual ~LLTerrainMaterials();
+
+ // Heights map into textures (or materials) as 0-1 = first, 1-2 = second, etc.
+ // So we need to compress heights into this range.
+ static const S32 ASSET_COUNT = 4;
+
+ enum class Type
+ {
+ TEXTURE,
+ PBR,
+ COUNT
+ };
+
+ BOOL generateMaterials();
+
+ void boost();
+
+ virtual LLUUID getDetailAssetID(S32 asset);
+ virtual void setDetailAssetID(S32 asset, const LLUUID& id);
+ Type getMaterialType();
+ bool texturesReady(bool boost, bool strict);
+ // strict = true -> all materials must be sufficiently loaded
+ // strict = false -> at least one material must be loaded
+ bool materialsReady(bool boost, bool strict);
+
+protected:
+ void unboost();
+ static bool textureReady(LLPointer<LLViewerFetchedTexture>& tex, bool boost);
+ // strict = true -> all materials must be sufficiently loaded
+ // strict = false -> at least one material must be loaded
+ static bool materialReady(LLPointer<LLFetchedGLTFMaterial>& mat, bool& textures_set, bool boost, bool strict);
+ LLPointer<LLViewerFetchedTexture> mDetailTextures[ASSET_COUNT];
+ LLPointer<LLFetchedGLTFMaterial> mDetailMaterials[ASSET_COUNT];
+ bool mMaterialTexturesSet[ASSET_COUNT];
+};
+
+// Local materials to override all regions
+extern LLTerrainMaterials gLocalTerrainMaterials;
+
+class LLVLComposition : public LLTerrainMaterials, public LLViewerLayer
+{
+public:
+ // Heights map into textures (or materials) as 0-1 = first, 1-2 = second, etc.
+ // So we need to compress heights into this range.
+ static const S32 ASSET_COUNT = 4;
+ static const LLUUID (&getDefaultTextures())[ASSET_COUNT];
+
LLVLComposition(LLSurface *surfacep, const U32 width, const F32 scale);
/*virtual*/ ~LLVLComposition();
void setSurface(LLSurface *surfacep);
// Viewer side hack to generate composition values
- BOOL generateHeights(const F32 x, const F32 y, const F32 width, const F32 height);
- BOOL generateComposition();
+ bool generateHeights(const F32 x, const F32 y, const F32 width, const F32 height);
+ bool generateComposition();
// Generate texture from composition values.
- BOOL generateTexture(const F32 x, const F32 y, const F32 width, const F32 height);
+ bool generateMinimapTileLand(const F32 x, const F32 y, const F32 width, const F32 height);
+ bool generateTexture(const F32 x, const F32 y, const F32 width, const F32 height);
// Use these as indeces ito the get/setters below that use 'corner'
enum ECorner
@@ -55,32 +111,38 @@ public:
NORTHEAST = 3,
CORNER_COUNT = 4
};
- LLUUID getDetailTextureID(S32 corner);
- LLViewerFetchedTexture* getDetailTexture(S32 corner);
+
+ void setDetailAssetID(S32 asset, const LLUUID& id) override;
F32 getStartHeight(S32 corner);
F32 getHeightRange(S32 corner);
- void setDetailTextureID(S32 corner, const LLUUID& id);
void setStartHeight(S32 corner, F32 start_height);
void setHeightRange(S32 corner, F32 range);
friend class LLVOSurfacePatch;
friend class LLDrawPoolTerrain;
- void setParamsReady() { mParamsReady = TRUE; }
- BOOL getParamsReady() const { return mParamsReady; }
+ void setParamsReady() { mParamsReady = true; }
+ bool getParamsReady() const { return mParamsReady; }
+
protected:
- BOOL mParamsReady;
+ static bool textureReady(LLPointer<LLViewerFetchedTexture>& tex, bool boost = false);
+ static bool materialReady(LLPointer<LLFetchedGLTFMaterial>& mat, bool& textures_set, bool boost = false);
+
+ bool mParamsReady = false;
LLSurface *mSurfacep;
- BOOL mTexturesLoaded;
- LLPointer<LLViewerFetchedTexture> mDetailTextures[CORNER_COUNT];
- LLPointer<LLImageRaw> mRawImages[CORNER_COUNT];
+ // Final minimap raw images
+ LLPointer<LLImageRaw> mRawImages[LLTerrainMaterials::ASSET_COUNT];
+
+ // Only non-null during minimap tile generation
+ LLPointer<LLImageRaw> mRawImagesBaseColor[LLTerrainMaterials::ASSET_COUNT];
+ LLPointer<LLImageRaw> mRawImagesEmissive[LLTerrainMaterials::ASSET_COUNT];
F32 mStartHeight[CORNER_COUNT];
F32 mHeightRange[CORNER_COUNT];
- F32 mTexScaleX;
- F32 mTexScaleY;
+ F32 mTexScaleX = 16.f;
+ F32 mTexScaleY = 16.f;
};
#endif //LL_LLVLCOMPOSITION_H
diff --git a/indra/newview/llvlmanager.cpp b/indra/newview/llvlmanager.cpp
index 895ceed880..b8f41fa197 100644
--- a/indra/newview/llvlmanager.cpp
+++ b/indra/newview/llvlmanager.cpp
@@ -89,7 +89,7 @@ void LLVLManager::unpackData(const S32 num_packets)
decode_patch_group_header(bit_pack, &goph);
if (LAND_LAYER_CODE == datap->mType)
{
- datap->mRegionp->getLand().decompressDCTPatch(bit_pack, &goph, FALSE);
+ datap->mRegionp->getLand().decompressDCTPatch(bit_pack, &goph, false);
}
else if (WIND_LAYER_CODE == datap->mType)
{
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 8ecfa3eed1..6d6dcf55c6 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -133,7 +133,8 @@ const F32 DEFAULT_MAX_ATTACHMENT_COMPLEXITY = 1.0e6f;
// expected attachments so viewer has to wait to see if anything
// else will arrive
const F32 FIRST_APPEARANCE_CLOUD_MIN_DELAY = 3.f; // seconds
-const F32 FIRST_APPEARANCE_CLOUD_MAX_DELAY = 45.f;
+const F32 FIRST_APPEARANCE_CLOUD_MAX_DELAY = 15.f;
+const F32 FIRST_APPEARANCE_CLOUD_IMPOSTOR_MODIFIER = 1.25f;
using namespace LLAvatarAppearanceDefines;
@@ -206,6 +207,7 @@ const U32 LLVOAvatar::VISUAL_COMPLEXITY_UNKNOWN = 0;
const F64 HUD_OVERSIZED_TEXTURE_DATA_SIZE = 1024 * 1024;
const F32 MAX_TEXTURE_WAIT_TIME_SEC = 60;
+const F32 MAX_ATTACHMENT_WAIT_TIME_SEC = 120;
const S32 MIN_NONTUNED_AVS = 5;
@@ -292,7 +294,7 @@ public:
//-------------------------------------------------------------------------
// motions must specify whether or not they loop
- virtual BOOL getLoop() { return TRUE; }
+ virtual bool getLoop() { return true; }
// motions must report their total duration
virtual F32 getDuration() { return 0.0; }
@@ -328,14 +330,14 @@ public:
}
// called when a motion is activated
- // must return TRUE to indicate success, or else
+ // must return true to indicate success, or else
// it will be deactivated
- virtual BOOL onActivate() { return TRUE; }
+ virtual bool onActivate() { return true; }
// called per time step
- // must return TRUE while it is active, and
- // must return FALSE when the motion is completed.
- virtual BOOL onUpdate(F32 time, U8* joint_mask)
+ // must return true while it is active, and
+ // must return false when the motion is completed.
+ virtual bool onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
F32 nx[2];
@@ -353,7 +355,7 @@ public:
tQn.setQuat( rx, ry, 0.0f );
mTorsoState->setRotation( tQn );
- return TRUE;
+ return true;
}
// called when a motion is deactivated
@@ -400,7 +402,7 @@ public:
//-------------------------------------------------------------------------
// motions must specify whether or not they loop
- virtual BOOL getLoop() { return TRUE; }
+ virtual bool getLoop() { return true; }
// motions must report their total duration
virtual F32 getDuration() { return 0.0; }
@@ -425,7 +427,7 @@ public:
virtual LLMotionInitStatus onInitialize(LLCharacter *character)
{
mCharacter = character;
- BOOL success = true;
+ bool success = true;
if ( !mChestState->setJoint( character->getJoint( "mChest" ) ) )
{
@@ -449,14 +451,14 @@ public:
}
// called when a motion is activated
- // must return TRUE to indicate success, or else
+ // must return true to indicate success, or else
// it will be deactivated
- virtual BOOL onActivate() { return TRUE; }
+ virtual bool onActivate() { return true; }
// called per time step
- // must return TRUE while it is active, and
- // must return FALSE when the motion is completed.
- virtual BOOL onUpdate(F32 time, U8* joint_mask)
+ // must return true while it is active, and
+ // must return false when the motion is completed.
+ virtual bool onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
mBreatheRate = 1.f;
@@ -465,7 +467,7 @@ public:
mChestState->setRotation(LLQuaternion(breathe_amt, LLVector3(0.f, 1.f, 0.f)));
- return TRUE;
+ return true;
}
// called when a motion is deactivated
@@ -513,7 +515,7 @@ public:
//-------------------------------------------------------------------------
// motions must specify whether or not they loop
- virtual BOOL getLoop() { return TRUE; }
+ virtual bool getLoop() { return true; }
// motions must report their total duration
virtual F32 getDuration() { return 0.0; }
@@ -551,19 +553,19 @@ public:
}
// called when a motion is activated
- // must return TRUE to indicate success, or else
+ // must return true to indicate success, or else
// it will be deactivated
- virtual BOOL onActivate() { return TRUE; }
+ virtual bool onActivate() { return true; }
// called per time step
- // must return TRUE while it is active, and
- // must return FALSE when the motion is completed.
- virtual BOOL onUpdate(F32 time, U8* joint_mask)
+ // must return true while it is active, and
+ // must return false when the motion is completed.
+ virtual bool onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
mPelvisState->setPosition(LLVector3::zero);
- return TRUE;
+ return true;
}
// called when a motion is deactivated
@@ -606,15 +608,15 @@ const LLUUID LLVOAvatar::sStepSounds[LL_MCODE_END] =
};
S32 LLVOAvatar::sRenderName = RENDER_NAME_ALWAYS;
-BOOL LLVOAvatar::sRenderGroupTitles = TRUE;
+bool LLVOAvatar::sRenderGroupTitles = true;
S32 LLVOAvatar::sNumVisibleChatBubbles = 0;
-BOOL LLVOAvatar::sDebugInvisible = FALSE;
-BOOL LLVOAvatar::sShowAttachmentPoints = FALSE;
-BOOL LLVOAvatar::sShowAnimationDebug = FALSE;
-BOOL LLVOAvatar::sVisibleInFirstPerson = FALSE;
+bool LLVOAvatar::sDebugInvisible = false;
+bool LLVOAvatar::sShowAttachmentPoints = false;
+bool LLVOAvatar::sShowAnimationDebug = false;
+bool LLVOAvatar::sVisibleInFirstPerson = false;
F32 LLVOAvatar::sLODFactor = 1.f;
F32 LLVOAvatar::sPhysicsLODFactor = 1.f;
-BOOL LLVOAvatar::sJointDebug = FALSE;
+bool LLVOAvatar::sJointDebug = false;
F32 LLVOAvatar::sUnbakedTime = 0.f;
F32 LLVOAvatar::sUnbakedUpdateTime = 0.f;
F32 LLVOAvatar::sGreyTime = 0.f;
@@ -641,20 +643,20 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mAttachmentVisibleTriangleCount(0),
mAttachmentEstTriangleCount(0.f),
mReportedVisualComplexity(VISUAL_COMPLEXITY_UNKNOWN),
- mTurning(FALSE),
+ mTurning(false),
mLastSkeletonSerialNum( 0 ),
- mIsSitting(FALSE),
+ mIsSitting(false),
mTimeVisible(),
- mTyping(FALSE),
- mMeshValid(FALSE),
- mVisible(FALSE),
+ mTyping(false),
+ mMeshValid(false),
+ mVisible(false),
mLastImpostorUpdateFrameTime(0.f),
mLastImpostorUpdateReason(0),
mWindFreq(0.f),
mRipplePhase( 0.f ),
- mBelowWater(FALSE),
+ mBelowWater(false),
mLastAppearanceBlendTime(0.f),
- mAppearanceAnimating(FALSE),
+ mAppearanceAnimating(false),
mNameIsSet(false),
mTitle(),
mNameAway(false),
@@ -665,29 +667,31 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mNameAlpha(0.f),
mRenderGroupTitles(sRenderGroupTitles),
mNameCloud(false),
- mFirstTEMessageReceived( FALSE ),
- mFirstAppearanceMessageReceived( FALSE ),
- mCulled( FALSE ),
+ mFirstTEMessageReceived( false ),
+ mFirstAppearanceMessageReceived( false ),
+ mCulled( false ),
mVisibilityRank(0),
- mNeedsSkin(FALSE),
+ mNeedsSkin(false),
mLastSkinTime(0.f),
mUpdatePeriod(1),
mOverallAppearance(AOA_INVISIBLE),
mVisualComplexityStale(true),
mVisuallyMuteSetting(AV_RENDER_NORMALLY),
mMutedAVColor(LLColor4::white /* used for "uninitialize" */),
- mFirstFullyVisible(TRUE),
+ mFirstFullyVisible(true),
+ mFirstDecloudTime(-1.f),
mFirstUseDelaySeconds(FIRST_APPEARANCE_CLOUD_MIN_DELAY),
- mFullyLoaded(FALSE),
- mPreviousFullyLoaded(FALSE),
- mFullyLoadedInitialized(FALSE),
+ mFullyLoaded(false),
+ mPreviousFullyLoaded(false),
+ mFullyLoadedInitialized(false),
+ mLastCloudAttachmentCount(0),
mVisualComplexity(VISUAL_COMPLEXITY_UNKNOWN),
- mLoadedCallbacksPaused(FALSE),
+ mLoadedCallbacksPaused(false),
mLoadedCallbackTextures(0),
mRenderUnloadedAvatar(LLCachedControl<bool>(gSavedSettings, "RenderUnloadedAvatar", false)),
mLastRezzedStatus(-1),
- mIsEditingAppearance(FALSE),
- mUseLocalAppearance(FALSE),
+ mIsEditingAppearance(false),
+ mUseLocalAppearance(false),
mLastUpdateRequestCOFVersion(-1),
mLastUpdateReceivedCOFVersion(-1),
mCachedMuteListUpdateTime(0),
@@ -702,14 +706,14 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
setHoverOffset(LLVector3(0.0, 0.0, 0.0));
// mVoiceVisualizer is created by the hud effects manager and uses the HUD Effects pipeline
- const BOOL needsSendToSim = false; // currently, this HUD effect doesn't need to pack and unpack data to do its job
+ const bool needsSendToSim = false; // currently, this HUD effect doesn't need to pack and unpack data to do its job
mVoiceVisualizer = ( LLVoiceVisualizer *)LLHUDManager::getInstance()->createViewerEffect( LLHUDObject::LL_HUD_EFFECT_VOICE_VISUALIZER, needsSendToSim );
LL_DEBUGS("Avatar","Message") << "LLVOAvatar Constructor (0x" << this << ") id:" << mID << LL_ENDL;
mPelvisp = NULL;
mDirtyMesh = 2; // Dirty geometry, need to regenerate.
- mMeshTexturesDirty = FALSE;
+ mMeshTexturesDirty = false;
mHeadp = NULL;
@@ -717,9 +721,9 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mSpeed = 0.f;
setAnimationData("Speed", &mSpeed);
- mNeedsImpostorUpdate = TRUE;
+ mNeedsImpostorUpdate = true;
mLastImpostorUpdateReason = 0;
- mNeedsAnimUpdate = TRUE;
+ mNeedsAnimUpdate = true;
mNeedsExtentUpdate = true;
@@ -728,22 +732,22 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
setNumTEs(TEX_NUM_INDICES);
- mbCanSelect = TRUE;
+ mbCanSelect = true;
mSignaledAnimations.clear();
mPlayingAnimations.clear();
- mWasOnGroundLeft = FALSE;
- mWasOnGroundRight = FALSE;
+ mWasOnGroundLeft = false;
+ mWasOnGroundRight = false;
mTimeLast = 0.0f;
mSpeedAccum = 0.0f;
mRippleTimeLast = 0.f;
- mInAir = FALSE;
+ mInAir = false;
- mStepOnLand = TRUE;
+ mStepOnLand = true;
mStepMaterial = 0;
mLipSyncActive = false;
@@ -770,7 +774,7 @@ std::string LLVOAvatar::avString() const
{
if (isControlAvatar())
{
- return getFullname();
+ return " " + getFullname() + " ";
}
else
{
@@ -835,7 +839,7 @@ LLVOAvatar::~LLVOAvatar()
std::for_each(mAttachmentPoints.begin(), mAttachmentPoints.end(), DeletePairedPointer());
mAttachmentPoints.clear();
- mDead = TRUE;
+ mDead = true;
mAnimationSources.clear();
LLLoadedCallbackEntry::cleanUpCallbackList(&mCallbackTextureList) ;
@@ -859,10 +863,10 @@ void LLVOAvatar::markDead()
}
-BOOL LLVOAvatar::isFullyBaked()
+bool LLVOAvatar::isFullyBaked()
{
- if (mIsDummy) return TRUE;
- if (getNumTEs() == 0) return FALSE;
+ if (mIsDummy) return true;
+ if (getNumTEs() == 0) return false;
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
{
@@ -870,13 +874,13 @@ BOOL LLVOAvatar::isFullyBaked()
&& ((i != BAKED_SKIRT) || isWearingWearableType(LLWearableType::WT_SKIRT))
&& (i != BAKED_LEFT_ARM) && (i != BAKED_LEFT_LEG) && (i != BAKED_AUX1) && (i != BAKED_AUX2) && (i != BAKED_AUX3))
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
-BOOL LLVOAvatar::isFullyTextured() const
+bool LLVOAvatar::isFullyTextured() const
{
for (S32 i = 0; i < mMeshLOD.size(); i++)
{
@@ -906,13 +910,13 @@ BOOL LLVOAvatar::isFullyTextured() const
continue; // Mesh exists and has a composite texture.
}
// Fail
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
-BOOL LLVOAvatar::hasGray() const
+bool LLVOAvatar::hasGray() const
{
return !getIsCloud() && !isFullyTextured();
}
@@ -921,7 +925,9 @@ S32 LLVOAvatar::getRezzedStatus() const
{
if (getIsCloud()) return 0;
bool textured = isFullyTextured();
- if (textured && allBakedTexturesCompletelyDownloaded()) return 3;
+ bool all_baked_loaded = allBakedTexturesCompletelyDownloaded();
+ if (textured && all_baked_loaded && getAttachmentCount() == mSimAttachments.size()) return 4;
+ if (textured && all_baked_loaded) return 3;
if (textured) return 2;
llassert(hasGray());
return 1; // gray
@@ -949,9 +955,9 @@ void LLVOAvatar::deleteLayerSetCaches(bool clearAll)
}
// static
-BOOL LLVOAvatar::areAllNearbyInstancesBaked(S32& grey_avatars)
+bool LLVOAvatar::areAllNearbyInstancesBaked(S32& grey_avatars)
{
- BOOL res = TRUE;
+ bool res = true;
grey_avatars = 0;
for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
iter != LLCharacter::sInstances.end(); ++iter)
@@ -963,7 +969,7 @@ BOOL LLVOAvatar::areAllNearbyInstancesBaked(S32& grey_avatars)
}
else if( !inst->isFullyBaked() )
{
- res = FALSE;
+ res = false;
if (inst->mHasGrey)
{
++grey_avatars;
@@ -974,10 +980,13 @@ BOOL LLVOAvatar::areAllNearbyInstancesBaked(S32& grey_avatars)
}
// static
-void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts)
+void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts, F32& avg_cloud_time, S32& cloud_avatars)
{
counts.clear();
- counts.resize(4);
+ counts.resize(5);
+ avg_cloud_time = 0;
+ cloud_avatars = 0;
+ S32 count_avg = 0;
for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
iter != LLCharacter::sInstances.end(); ++iter)
{
@@ -986,8 +995,23 @@ void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts)
{
S32 rez_status = inst->getRezzedStatus();
counts[rez_status]++;
+ F32 time = inst->getFirstDecloudTime();
+ if (time >= 0)
+ {
+ avg_cloud_time+=time;
+ count_avg++;
+ }
+ if (!inst->isFullyLoaded() || time < 0)
+ {
+ // still renders as cloud
+ cloud_avatars++;
+ }
}
}
+ if (count_avg > 0)
+ {
+ avg_cloud_time /= count_avg;
+ }
}
// static
@@ -995,8 +1019,9 @@ std::string LLVOAvatar::rezStatusToString(S32 rez_status)
{
if (rez_status==0) return "cloud";
if (rez_status==1) return "gray";
- if (rez_status==2) return "downloading";
- if (rez_status==3) return "full";
+ if (rez_status==2) return "downloading baked";
+ if (rez_status==3) return "loading attachments";
+ if (rez_status==4) return "full";
return "unknown";
}
@@ -1084,7 +1109,7 @@ void LLVOAvatar::restoreGL()
{
if (!isAgentAvatarValid()) return;
- gAgentAvatarp->setCompositeUpdatesEnabled(TRUE);
+ gAgentAvatarp->setCompositeUpdatesEnabled(true);
for (U32 i = 0; i < gAgentAvatarp->mBakedTextureDatas.size(); i++)
{
gAgentAvatarp->invalidateComposite(gAgentAvatarp->getTexLayerSet(i));
@@ -1108,7 +1133,7 @@ void LLVOAvatar::resetImpostors()
{
LLVOAvatar* avatar = (LLVOAvatar*) *iter;
avatar->mImpostor.release();
- avatar->mNeedsImpostorUpdate = TRUE;
+ avatar->mNeedsImpostorUpdate = true;
avatar->mLastImpostorUpdateReason = 1;
}
}
@@ -1124,7 +1149,7 @@ void LLVOAvatar::deleteCachedImages(bool clearAll)
LLVOAvatar* inst = (LLVOAvatar*) *iter;
inst->deleteLayerSetCaches(clearAll);
}
- LLViewerTexLayerSet::sHasCaches = FALSE;
+ LLViewerTexLayerSet::sHasCaches = false;
}
LLVOAvatarSelf::deleteScratchTextures();
LLTexLayerStaticImageList::getInstance()->deleteCachedImages();
@@ -1136,7 +1161,7 @@ void LLVOAvatar::deleteCachedImages(bool clearAll)
// LLVOAvatar::initClass()
//------------------------------------------------------------------------
void LLVOAvatar::initClass()
-{
+{
gAnimLibrary.animStateSetString(ANIM_AGENT_BODY_NOISE,"body_noise");
gAnimLibrary.animStateSetString(ANIM_AGENT_BREATHE_ROT,"breathe_rot");
gAnimLibrary.animStateSetString(ANIM_AGENT_PHYSICS_MOTION,"physics_motion");
@@ -1289,7 +1314,7 @@ const LLVector3 LLVOAvatar::getRenderPosition() const
}
}
-void LLVOAvatar::updateDrawable(BOOL force_damped)
+void LLVOAvatar::updateDrawable(bool force_damped)
{
clearChanged(SHIFTED);
}
@@ -1620,7 +1645,7 @@ void LLVOAvatar::renderCollisionVolumes()
{
LLVector4a unused;
- mNameText->lineSegmentIntersect(unused, unused, unused, TRUE);
+ mNameText->lineSegmentIntersect(unused, unused, unused, true);
}
}
@@ -1790,11 +1815,11 @@ void LLVOAvatar::renderJoints()
addDebugText(nullstr.str());
}
-BOOL LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
+bool LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face,
- BOOL pick_transparent,
- BOOL pick_rigged,
- BOOL pick_unselectable,
+ bool pick_transparent,
+ bool pick_rigged,
+ bool pick_unselectable,
S32* face_hit,
LLVector4a* intersection,
LLVector2* tex_coord,
@@ -1803,12 +1828,12 @@ BOOL LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
{
if ((isSelf() && !gAgent.needsRenderAvatar()) || !LLPipeline::sPickAvatar)
{
- return FALSE;
+ return false;
}
if (isControlAvatar())
{
- return FALSE;
+ return false;
}
if (lineSegmentBoundingBox(start, end))
@@ -1849,7 +1874,7 @@ BOOL LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
normal->load3(res_norm.v);
}
- return TRUE;
+ return true;
}
}
@@ -1890,18 +1915,18 @@ BOOL LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
*intersection = position;
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
// virtual
LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector4a& start, const LLVector4a& end,
S32 face,
- BOOL pick_transparent,
- BOOL pick_rigged,
- BOOL pick_unselectable,
+ bool pick_transparent,
+ bool pick_rigged,
+ bool pick_unselectable,
S32* face_hit,
LLVector4a* intersection,
LLVector2* tex_coord,
@@ -1987,7 +2012,7 @@ void LLVOAvatar::buildCharacter()
LLAvatarAppearance::buildCharacter();
// Not done building yet; more to do.
- mIsBuilt = FALSE;
+ mIsBuilt = false;
//-------------------------------------------------------------------------
// set head offset from pelvis
@@ -2025,10 +2050,10 @@ void LLVOAvatar::buildCharacter()
//-------------------------------------------------------------------------
processAnimationStateChanges();
- mIsBuilt = TRUE;
+ mIsBuilt = true;
stop_glerror();
- mMeshValid = TRUE;
+ mMeshValid = true;
}
//-----------------------------------------------------------------------------
@@ -2112,7 +2137,7 @@ void LLVOAvatar::resetSkeleton(bool reset_animations)
LL_DEBUGS("Avatar") << avString() << " reset starts" << LL_ENDL;
if (!isControlAvatar() && !mLastProcessedAppearance)
{
- LL_WARNS() << "Can't reset avatar; no appearance message has been received yet." << LL_ENDL;
+ LL_WARNS() << "Can't reset avatar " << getID() << "; no appearance message has been received yet." << LL_ENDL;
return;
}
@@ -2179,10 +2204,10 @@ void LLVOAvatar::resetSkeleton(bool reset_animations)
// Stripped down approximation of
// applyParsedAppearanceMessage, but with alternative default
// (jellydoll) params
- setCompositeUpdatesEnabled( FALSE );
+ setCompositeUpdatesEnabled( false );
gPipeline.markGLRebuild(this);
applyDefaultParams();
- setCompositeUpdatesEnabled( TRUE );
+ setCompositeUpdatesEnabled( true );
updateMeshTextures();
updateMeshVisibility();
}
@@ -2227,7 +2252,7 @@ void LLVOAvatar::releaseMeshData()
++iter)
{
LLAvatarJoint* joint = (*iter);
- joint->setValid(FALSE, TRUE);
+ joint->setValid(false, true);
}
//cleanup data
@@ -2255,10 +2280,10 @@ void LLVOAvatar::releaseMeshData()
LLViewerJointAttachment* attachment = iter->second;
if (!attachment->getIsHUDAttachment())
{
- attachment->setAttachmentVisibility(FALSE);
+ attachment->setAttachmentVisibility(false);
}
}
- mMeshValid = FALSE;
+ mMeshValid = false;
}
//-----------------------------------------------------------------------------
@@ -2274,7 +2299,7 @@ void LLVOAvatar::restoreMeshData()
}
//LL_INFOS() << "Restoring" << LL_ENDL;
- mMeshValid = TRUE;
+ mMeshValid = true;
updateJointLODs();
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
@@ -2284,7 +2309,7 @@ void LLVOAvatar::restoreMeshData()
LLViewerJointAttachment* attachment = iter->second;
if (!attachment->getIsHUDAttachment())
{
- attachment->setAttachmentVisibility(TRUE);
+ attachment->setAttachmentVisibility(true);
}
}
@@ -2452,19 +2477,20 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys,
U32 block_num, const EObjectUpdateType update_type,
LLDataPacker *dp)
{
- const BOOL has_name = !getNVPair("FirstName");
+ const bool had_no_name = !getNVPair("FirstName");
// Do base class updates...
U32 retval = LLViewerObject::processUpdateMessage(mesgsys, user_data, block_num, update_type, dp);
// Print out arrival information once we have name of avatar.
- if (has_name && getNVPair("FirstName"))
+ const bool has_name = getNVPair("FirstName");
+ if (had_no_name && has_name)
{
mDebugExistenceTimer.reset();
- debugAvatarRezTime("AvatarRezArrivedNotification","avatar arrived");
+ debugAvatarRezTime("AvatarRezArrivedNotification", "avatar arrived");
}
- if(retval & LLViewerObject::INVALID_UPDATE)
+ if (retval & LLViewerObject::INVALID_UPDATE)
{
if (isSelf())
{
@@ -2498,7 +2524,7 @@ LLViewerFetchedTexture *LLVOAvatar::getBakedTextureImage(const U8 te, const LLUU
}
LL_DEBUGS("Avatar") << avString() << "get server-bake image from URL " << url << LL_ENDL;
result = LLViewerTextureManager::getFetchedTextureFromUrl(
- url, FTT_SERVER_BAKE, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, uuid);
+ url, FTT_SERVER_BAKE, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, uuid);
if (result->isMissingAsset())
{
result->setIsMissingAsset(false);
@@ -2648,7 +2674,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
// animate the character
// store off last frame's root position to be consistent with camera position
mLastRootPos = mRoot->getWorldPosition();
- BOOL detailed_update = updateCharacter(agent);
+ bool detailed_update = updateCharacter(agent);
static LLUICachedControl<bool> visualizers_in_calls("ShowVoiceVisualizersInCalls", false);
bool voice_enabled = (visualizers_in_calls || LLVoiceClient::getInstance()->inProximalChannel()) &&
@@ -2819,7 +2845,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
LLJoint::sNumUpdates = 0;
LLJoint::sNumTouches = 0;
- BOOL visible = isVisible() || mNeedsAnimUpdate;
+ bool visible = isVisible() || mNeedsAnimUpdate;
// update attachments positions
if (detailed_update)
@@ -2908,7 +2934,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
}
}
- mNeedsAnimUpdate = FALSE;
+ mNeedsAnimUpdate = false;
if (isImpostor() && !mNeedsImpostorUpdate)
{
@@ -2926,7 +2952,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
if (angle_diff > F_PI/512.f*distance*mUpdatePeriod)
{
- mNeedsImpostorUpdate = TRUE;
+ mNeedsImpostorUpdate = true;
mLastImpostorUpdateReason = 2;
}
}
@@ -2938,7 +2964,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
F32 dist_diff = fabsf(distance-mImpostorDistance);
if (dist_diff/mImpostorDistance > 0.1f)
{
- mNeedsImpostorUpdate = TRUE;
+ mNeedsImpostorUpdate = true;
mLastImpostorUpdateReason = 3;
}
else
@@ -2951,7 +2977,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
diff.setSub(ext[1], mImpostorExtents[1]);
if (diff.getLength3().getF32() > 0.05f)
{
- mNeedsImpostorUpdate = TRUE;
+ mNeedsImpostorUpdate = true;
mLastImpostorUpdateReason = 4;
}
else
@@ -2959,7 +2985,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
diff.setSub(ext[0], mImpostorExtents[0]);
if (diff.getLength3().getF32() > 0.05f)
{
- mNeedsImpostorUpdate = TRUE;
+ mNeedsImpostorUpdate = true;
mLastImpostorUpdateReason = 5;
}
}
@@ -2974,7 +3000,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
//force a move if sitting on an active object
if (getParent() && ((LLViewerObject*) getParent())->mDrawable->isActive())
{
- gPipeline.markMoved(mDrawable, TRUE);
+ gPipeline.markMoved(mDrawable, true);
}
}
}
@@ -2988,7 +3014,7 @@ void LLVOAvatar::idleUpdateAppearanceAnimation()
F32 appearance_anim_time = mAppearanceMorphTimer.getElapsedTimeF32();
if (appearance_anim_time >= APPEARANCE_MORPH_TIME)
{
- mAppearanceAnimating = FALSE;
+ mAppearanceAnimating = false;
for (LLVisualParam *param = getFirstVisualParam();
param;
param = getNextVisualParam())
@@ -3096,15 +3122,16 @@ void LLVOAvatar::idleUpdateLoadingEffect()
{
if (mFirstFullyVisible)
{
- mFirstFullyVisible = FALSE;
+ mFirstFullyVisible = false;
+ mFirstDecloudTime = mFirstAppearanceMessageTimer.getElapsedTimeF32();
if (isSelf())
{
- LL_INFOS("Avatar") << avString() << "self isFullyLoaded, mFirstFullyVisible" << LL_ENDL;
+ LL_INFOS("Avatar") << avString() << "self isFullyLoaded, mFirstFullyVisible after " << mFirstDecloudTime << LL_ENDL;
LLAppearanceMgr::instance().onFirstFullyVisible();
}
else
{
- LL_INFOS("Avatar") << avString() << "other isFullyLoaded, mFirstFullyVisible" << LL_ENDL;
+ LL_INFOS("Avatar") << avString() << "other isFullyLoaded, mFirstFullyVisible after " << mFirstDecloudTime << LL_ENDL;
}
}
@@ -3252,17 +3279,17 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
return;
}
- bool new_name = FALSE;
+ bool new_name = false;
if (visible_chat != mVisibleChat)
{
mVisibleChat = visible_chat;
- new_name = TRUE;
+ new_name = true;
}
if (sRenderGroupTitles != mRenderGroupTitles)
{
mRenderGroupTitles = sRenderGroupTitles;
- new_name = TRUE;
+ new_name = true;
}
// First Calculate Alpha
@@ -3305,11 +3332,11 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
//mNameText->setMass(10.f);
mNameText->setSourceObject(this);
mNameText->setVertAlignment(LLHUDNameTag::ALIGN_VERT_TOP);
- mNameText->setVisibleOffScreen(TRUE);
+ mNameText->setVisibleOffScreen(true);
mNameText->setMaxLines(11);
mNameText->setFadeDistance(CHAT_NORMAL_RADIUS, 5.f);
sNumVisibleChatBubbles++;
- new_name = TRUE;
+ new_name = true;
}
mNameText->setPositionAgent(root_pos_last);
@@ -3415,6 +3442,7 @@ void LLVOAvatar::idleUpdateNameTagText(bool new_name)
static LLUICachedControl<bool> show_display_names("NameTagShowDisplayNames", true);
static LLUICachedControl<bool> show_usernames("NameTagShowUsernames", true);
+ static LLUICachedControl<bool> show_rez_status("NameTagDebugAVRezState", false);
if (LLAvatarName::useDisplayNames())
{
@@ -3448,6 +3476,12 @@ void LLVOAvatar::idleUpdateNameTagText(bool new_name)
addNameTagLine(full_name, name_tag_color, LLFontGL::NORMAL, font, true);
}
+ if (show_rez_status)
+ {
+ std::string av_string = LLVOAvatar::rezStatusToString(mLastRezzedStatus);
+ addNameTagLine(av_string, name_tag_color, LLFontGL::NORMAL, LLFontGL::getFontSansSerifSmall(), true);
+ }
+
mNameAway = is_away;
mNameDoNotDisturb = is_do_not_disturb;
mNameMute = is_muted;
@@ -3456,7 +3490,7 @@ void LLVOAvatar::idleUpdateNameTagText(bool new_name)
mNameCloud = is_cloud;
mTitle = title ? title->getString() : "";
LLStringFn::replace_ascii_controlchars(mTitle,LL_UNKNOWN_CHAR);
- new_name = TRUE;
+ new_name = true;
}
if (mVisibleChat)
@@ -3508,7 +3542,7 @@ void LLVOAvatar::idleUpdateNameTagText(bool new_name)
mNameText->addLine(chat_iter->mText, old_chat, style);
}
}
- mNameText->setVisibleOffScreen(TRUE);
+ mNameText->setVisibleOffScreen(true);
if (mTyping)
{
@@ -3533,7 +3567,7 @@ void LLVOAvatar::idleUpdateNameTagText(bool new_name)
// ...not using chat bubbles, just names
mNameText->setTextAlignment(LLHUDNameTag::ALIGN_TEXT_CENTER);
mNameText->setFadeDistance(CHAT_NORMAL_RADIUS, 5.f);
- mNameText->setVisibleOffScreen(FALSE);
+ mNameText->setVisibleOffScreen(false);
}
}
@@ -4084,24 +4118,24 @@ void LLVOAvatar::updateFootstepSounds()
if ( gAudiop && isAnyAnimationSignaled(AGENT_FOOTSTEP_ANIMS, NUM_AGENT_FOOTSTEP_ANIMS) )
{
- BOOL playSound = FALSE;
+ bool playSound = false;
LLVector3 foot_pos_agent;
- BOOL onGroundLeft = (leftElev <= 0.05f);
- BOOL onGroundRight = (rightElev <= 0.05f);
+ bool onGroundLeft = (leftElev <= 0.05f);
+ bool onGroundRight = (rightElev <= 0.05f);
// did left foot hit the ground?
if ( onGroundLeft && !mWasOnGroundLeft )
{
foot_pos_agent = ankle_left_pos_agent;
- playSound = TRUE;
+ playSound = true;
}
// did right foot hit the ground?
if ( onGroundRight && !mWasOnGroundRight )
{
foot_pos_agent = ankle_right_pos_agent;
- playSound = TRUE;
+ playSound = true;
}
mWasOnGroundLeft = onGroundLeft;
@@ -4258,7 +4292,7 @@ void LLVOAvatar::updateOrientation(LLAgent& agent, F32 speed, F32 delta_time)
// When moving very slow, the pelvis is allowed to deviate from the
// forward direction to allow it to hold its position while the torso
// and head turn. Once in motion, it must conform however.
- BOOL self_in_mouselook = isSelf() && gAgentCamera.cameraMouselook();
+ bool self_in_mouselook = isSelf() && gAgentCamera.cameraMouselook();
LLVector3 pelvisDir( mRoot->getWorldMatrix().getFwdRow4().mV );
@@ -4284,7 +4318,7 @@ void LLVOAvatar::updateOrientation(LLAgent& agent, F32 speed, F32 delta_time)
// smaller correction vector means pelvis follows prim direction more closely
if (!mTurning && angle > pelvis_rot_threshold*0.75f)
{
- mTurning = TRUE;
+ mTurning = true;
}
// use tighter threshold when turning
@@ -4305,7 +4339,7 @@ void LLVOAvatar::updateOrientation(LLAgent& agent, F32 speed, F32 delta_time)
// am I done turning?
if (angle < pelvis_rot_threshold)
{
- mTurning = FALSE;
+ mTurning = false;
}
LLVector3 correction_vector = (pelvisDir - fwdDir) * clamp_rescale(angle, pelvis_rot_threshold*0.75f, pelvis_rot_threshold, 1.0f, 0.0f);
@@ -4313,7 +4347,7 @@ void LLVOAvatar::updateOrientation(LLAgent& agent, F32 speed, F32 delta_time)
}
else
{
- mTurning = FALSE;
+ mTurning = false;
}
// Now compute the full world space rotation for the whole body (wQv)
@@ -4445,7 +4479,7 @@ void LLVOAvatar::updateRootPositionAndRotation(LLAgent& agent, F32 speed, bool w
LLVector3 normal;
resolveHeightGlobal(root_pos, ground_under_pelvis, normal);
F32 foot_to_ground = (F32) (root_pos.mdV[VZ] - mPelvisToFoot - ground_under_pelvis.mdV[VZ]);
- BOOL in_air = ((!LLWorld::getInstance()->getRegionFromPosGlobal(ground_under_pelvis)) ||
+ bool in_air = ((!LLWorld::getInstance()->getRegionFromPosGlobal(ground_under_pelvis)) ||
foot_to_ground > FOOT_GROUND_COLLISION_TOLERANCE);
if (in_air && !mInAir)
@@ -4561,12 +4595,12 @@ bool LLVOAvatar::computeNeedsUpdate()
{
if (needs_update_by_max_time)
{
- mNeedsImpostorUpdate = TRUE;
+ mNeedsImpostorUpdate = true;
mLastImpostorUpdateReason = 11;
}
else
{
- //mNeedsImpostorUpdate = TRUE;
+ //mNeedsImpostorUpdate = true;
//mLastImpostorUpdateReason = 10;
}
}
@@ -4601,10 +4635,10 @@ bool LLVOAvatar::updateCharacter(LLAgent &agent)
if (!mIsBuilt)
{
- return FALSE;
+ return false;
}
- BOOL visible = isVisible();
+ bool visible = isVisible();
bool is_control_avatar = isControlAvatar(); // capture state to simplify tracing
bool is_attachment = false;
@@ -4641,7 +4675,7 @@ bool LLVOAvatar::updateCharacter(LLAgent &agent)
if (!needs_update && !isSelf())
{
updateMotions(LLCharacter::HIDDEN_UPDATE);
- return FALSE;
+ return false;
}
//--------------------------------------------------------------------
@@ -4698,7 +4732,7 @@ bool LLVOAvatar::updateCharacter(LLAgent &agent)
mSpeed = speed;
// update animations
- if (!visible)
+ if (!visible && !isSelf()) // NOTE: never do a "hidden update" for self avatar as it interrupts controller processing
{
updateMotions(LLCharacter::HIDDEN_UPDATE);
}
@@ -4739,7 +4773,7 @@ bool LLVOAvatar::updateCharacter(LLAgent &agent)
if (visible)
{
// System avatar mesh vertices need to be reskinned.
- mNeedsSkin = TRUE;
+ mNeedsSkin = true;
}
return visible;
@@ -4851,37 +4885,37 @@ void LLVOAvatar::postPelvisSetRecalc()
//------------------------------------------------------------------------
void LLVOAvatar::updateVisibility()
{
- BOOL visible = FALSE;
+ bool visible = false;
if (mIsDummy)
{
- visible = FALSE;
+ visible = false;
}
else if (mDrawable.isNull())
{
- visible = FALSE;
+ visible = false;
}
else
{
if (!mDrawable->getSpatialGroup() || mDrawable->getSpatialGroup()->isVisible())
{
- visible = TRUE;
+ visible = true;
}
else
{
- visible = FALSE;
+ visible = false;
}
if(isSelf())
{
if (!gAgentWearables.areWearablesLoaded())
{
- visible = FALSE;
+ visible = false;
}
}
else if( !mFirstAppearanceMessageReceived )
{
- visible = FALSE;
+ visible = false;
}
if (sDebugInvisible)
@@ -5022,7 +5056,7 @@ U32 LLVOAvatar::renderSkinned()
{
updateMeshData();
mDirtyMesh = 0;
- mNeedsSkin = TRUE;
+ mNeedsSkin = true;
mDrawable->clearState(LLDrawable::REBUILD_GEOMETRY);
}
}
@@ -5071,7 +5105,7 @@ U32 LLVOAvatar::renderSkinned()
hair_mesh->updateJointGeometry();
}
}
- mNeedsSkin = FALSE;
+ mNeedsSkin = false;
mLastSkinTime = gFrameTimeSeconds;
LLFace * face = mDrawable->getFace(0);
@@ -5087,7 +5121,7 @@ U32 LLVOAvatar::renderSkinned()
}
else
{
- mNeedsSkin = FALSE;
+ mNeedsSkin = false;
}
if (sDebugInvisible)
@@ -5129,7 +5163,7 @@ U32 LLVOAvatar::renderSkinned()
// render all geometry attached to the skeleton
//--------------------------------------------------------------------
- BOOL first_pass = TRUE;
+ bool first_pass = true;
if (!LLDrawPoolAvatar::sSkipOpaque)
{
if (isUIAvatar() && mIsDummy)
@@ -5139,7 +5173,7 @@ U32 LLVOAvatar::renderSkinned()
{
num_indices += hair_mesh->render(mAdjustedPixelArea, first_pass, mIsDummy);
}
- first_pass = FALSE;
+ first_pass = false;
}
if (!isSelf() || gAgent.needsRenderHead() || LLPipeline::sShadowRender)
{
@@ -5151,7 +5185,7 @@ U32 LLVOAvatar::renderSkinned()
{
num_indices += head_mesh->render(mAdjustedPixelArea, first_pass, mIsDummy);
}
- first_pass = FALSE;
+ first_pass = false;
}
}
if (isTextureVisible(TEX_UPPER_BAKED) || (getOverallAppearance() == AOA_JELLYDOLL && !isControlAvatar()) || isUIAvatar())
@@ -5161,7 +5195,7 @@ U32 LLVOAvatar::renderSkinned()
{
num_indices += upper_mesh->render(mAdjustedPixelArea, first_pass, mIsDummy);
}
- first_pass = FALSE;
+ first_pass = false;
}
if (isTextureVisible(TEX_LOWER_BAKED) || (getOverallAppearance() == AOA_JELLYDOLL && !isControlAvatar()) || isUIAvatar())
@@ -5171,7 +5205,7 @@ U32 LLVOAvatar::renderSkinned()
{
num_indices += lower_mesh->render(mAdjustedPixelArea, first_pass, mIsDummy);
}
- first_pass = FALSE;
+ first_pass = false;
}
}
@@ -5184,7 +5218,7 @@ U32 LLVOAvatar::renderSkinned()
return num_indices;
}
-U32 LLVOAvatar::renderTransparent(BOOL first_pass)
+U32 LLVOAvatar::renderTransparent(bool first_pass)
{
U32 num_indices = 0;
if( isWearingWearableType( LLWearableType::WT_SKIRT ) && (isUIAvatar() || isTextureVisible(TEX_SKIRT_BAKED)) )
@@ -5193,9 +5227,9 @@ U32 LLVOAvatar::renderTransparent(BOOL first_pass)
LLViewerJoint* skirt_mesh = getViewerJoint(MESH_ID_SKIRT);
if (skirt_mesh)
{
- num_indices += skirt_mesh->render(mAdjustedPixelArea, FALSE);
+ num_indices += skirt_mesh->render(mAdjustedPixelArea, false);
}
- first_pass = FALSE;
+ first_pass = false;
gGL.flush();
}
@@ -5213,7 +5247,7 @@ U32 LLVOAvatar::renderTransparent(BOOL first_pass)
{
num_indices += eyelash_mesh->render(mAdjustedPixelArea, first_pass, mIsDummy);
}
- first_pass = FALSE;
+ first_pass = false;
}
if (isTextureVisible(TEX_HAIR_BAKED) && (getOverallAppearance() != AOA_JELLYDOLL))
{
@@ -5222,7 +5256,7 @@ U32 LLVOAvatar::renderTransparent(BOOL first_pass)
{
num_indices += hair_mesh->render(mAdjustedPixelArea, first_pass, mIsDummy);
}
- first_pass = FALSE;
+ first_pass = false;
}
if (LLPipeline::sImpostorRender)
{
@@ -5250,20 +5284,17 @@ U32 LLVOAvatar::renderRigid()
return 0;
}
- bool should_alpha_mask = shouldAlphaMask();
- LLGLState test(GL_ALPHA_TEST, should_alpha_mask);
-
if (isTextureVisible(TEX_EYES_BAKED) || (getOverallAppearance() == AOA_JELLYDOLL && !isControlAvatar()) || isUIAvatar())
{
LLViewerJoint* eyeball_left = getViewerJoint(MESH_ID_EYEBALL_LEFT);
LLViewerJoint* eyeball_right = getViewerJoint(MESH_ID_EYEBALL_RIGHT);
if (eyeball_left)
{
- num_indices += eyeball_left->render(mAdjustedPixelArea, TRUE, mIsDummy);
+ num_indices += eyeball_left->render(mAdjustedPixelArea, true, mIsDummy);
}
if(eyeball_right)
{
- num_indices += eyeball_right->render(mAdjustedPixelArea, TRUE, mIsDummy);
+ num_indices += eyeball_right->render(mAdjustedPixelArea, true, mIsDummy);
}
}
@@ -5373,7 +5404,7 @@ std::string LLVOAvatar::bakedTextureOriginInfo()
{
ETextureIndex texture_index = mBakedTextureDatas[i].mTextureIndex;
LLViewerFetchedTexture *imagep =
- LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index,0), TRUE);
+ LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index,0), true);
if (!imagep ||
imagep->getID() == IMG_DEFAULT ||
imagep->getID() == IMG_DEFAULT_AVATAR)
@@ -5431,7 +5462,7 @@ void LLVOAvatar::collectLocalTextureUUIDs(std::set<LLUUID>& ids) const
LLViewerFetchedTexture *imagep = NULL;
for (U32 wearable_index = 0; wearable_index < num_wearables; wearable_index++)
{
- imagep = LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index, wearable_index), TRUE);
+ imagep = LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index, wearable_index), true);
if (imagep)
{
const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearance::getDictionary()->getTexture((ETextureIndex)texture_index);
@@ -5454,7 +5485,7 @@ void LLVOAvatar::collectBakedTextureUUIDs(std::set<LLUUID>& ids) const
LLViewerFetchedTexture *imagep = NULL;
if (isIndexBakedTexture((ETextureIndex) texture_index))
{
- imagep = LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index,0), TRUE);
+ imagep = LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index,0), true);
if (imagep)
{
ids.insert(imagep->getID());
@@ -5526,7 +5557,7 @@ void LLVOAvatar::updateTextures()
{
releaseOldTextures();
- BOOL render_avatar = TRUE;
+ bool render_avatar = true;
if (mIsDummy)
{
@@ -5535,7 +5566,7 @@ void LLVOAvatar::updateTextures()
if( isSelf() )
{
- render_avatar = TRUE;
+ render_avatar = true;
}
else
{
@@ -5547,7 +5578,7 @@ void LLVOAvatar::updateTextures()
render_avatar = !mCulled; //visible and not culled.
}
- std::vector<BOOL> layer_baked;
+ std::vector<bool> layer_baked;
// GL NOT ACTIVE HERE - *TODO
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
{
@@ -5565,7 +5596,7 @@ void LLVOAvatar::updateTextures()
mMaxPixelArea = 0.f;
mMinPixelArea = 99999999.f;
- mHasGrey = FALSE; // debug
+ mHasGrey = false; // debug
for (U32 texture_index = 0; texture_index < getNumTEs(); texture_index++)
{
LLWearableType::EType wearable_type = LLAvatarAppearance::getDictionary()->getTEWearableType((ETextureIndex)texture_index);
@@ -5588,7 +5619,7 @@ void LLVOAvatar::updateTextures()
LLViewerFetchedTexture *imagep = NULL;
for (U32 wearable_index = 0; wearable_index < num_wearables; wearable_index++)
{
- imagep = LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index, wearable_index), TRUE);
+ imagep = LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index, wearable_index), true);
if (imagep)
{
const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearance::getDictionary()->getTexture((ETextureIndex)texture_index);
@@ -5602,7 +5633,7 @@ void LLVOAvatar::updateTextures()
if (isIndexBakedTexture((ETextureIndex) texture_index) && render_avatar)
{
const S32 boost_level = getAvatarBakedBoostLevel();
- imagep = LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index,0), TRUE);
+ imagep = LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index,0), true);
addBakedTextureStats( imagep, mPixelArea, texel_area_ratio, boost_level );
}
}
@@ -5615,7 +5646,7 @@ void LLVOAvatar::updateTextures()
void LLVOAvatar::addLocalTextureStats( ETextureIndex idx, LLViewerFetchedTexture* imagep,
- F32 texel_area_ratio, BOOL render_avatar, BOOL covered_by_baked)
+ F32 texel_area_ratio, bool render_avatar, bool covered_by_baked)
{
// No local texture stats for non-self avatars
return;
@@ -5627,7 +5658,7 @@ void LLVOAvatar::checkTextureLoading()
{
static const F32 MAX_INVISIBLE_WAITING_TIME = 15.f ; //seconds
- BOOL pause = !isVisible() ;
+ bool pause = !isVisible() ;
if(!pause)
{
mInvisibleTimer.reset() ;
@@ -5794,13 +5825,13 @@ void LLVOAvatar::resolveHeightGlobal(const LLVector3d &inPos, LLVector3d &outPos
LLWorld::getInstance()->resolveStepHeightGlobal(this, p0, p1, outPos, outNorm, &obj);
if (!obj)
{
- mStepOnLand = TRUE;
+ mStepOnLand = true;
mStepMaterial = 0;
mStepObjectVelocity.setVec(0.0f, 0.0f, 0.0f);
}
else
{
- mStepOnLand = FALSE;
+ mStepOnLand = false;
mStepMaterial = obj->getMaterial();
// We want the primitive velocity, not our velocity... (which actually subtracts the
@@ -5869,7 +5900,7 @@ void LLVOAvatar::processAnimationStateChanges()
startMotion(ANIM_AGENT_BODY_NOISE);
}
}
-
+
// clear all current animations
AnimIterator anim_it;
for (anim_it = mPlayingAnimations.begin(); anim_it != mPlayingAnimations.end();)
@@ -5879,7 +5910,7 @@ void LLVOAvatar::processAnimationStateChanges()
// playing, but not signaled, so stop
if (found_anim == mSignaledAnimations.end())
{
- processSingleAnimationStateChange(anim_it->first, FALSE);
+ processSingleAnimationStateChange(anim_it->first, false);
mPlayingAnimations.erase(anim_it++);
continue;
}
@@ -5903,7 +5934,7 @@ void LLVOAvatar::processAnimationStateChanges()
// signaled but not playing, or different sequence id, start motion
if (found_anim == mPlayingAnimations.end() || found_anim->second != anim_it->second)
{
- if (processSingleAnimationStateChange(anim_it->first, TRUE))
+ if (processSingleAnimationStateChange(anim_it->first, true))
{
mPlayingAnimations[anim_it->first] = anim_it->second;
++anim_it;
@@ -5940,7 +5971,7 @@ void LLVOAvatar::processAnimationStateChanges()
//-----------------------------------------------------------------------------
// processSingleAnimationStateChange();
//-----------------------------------------------------------------------------
-BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL start )
+bool LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, bool start )
{
// SL-402, SL-427 - we need to update body size often enough to
// keep appearances in sync, but not so often that animations
@@ -5948,7 +5979,7 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL
// compromise is to do it on animation changes:
computeBodySize();
- BOOL result = FALSE;
+ bool result = false;
if ( start ) // start animation
{
@@ -5977,13 +6008,13 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL
}
else if (anim_id == ANIM_AGENT_SIT_GROUND_CONSTRAINED)
{
- sitDown(TRUE);
+ sitDown(true);
}
if (startMotion(anim_id))
{
- result = TRUE;
+ result = true;
}
else
{
@@ -5994,7 +6025,7 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL
{
if (anim_id == ANIM_AGENT_SIT_GROUND_CONSTRAINED)
{
- sitDown(FALSE);
+ sitDown(false);
}
if ((anim_id == ANIM_AGENT_DO_NOT_DISTURB) && gAgent.isDoNotDisturb())
{
@@ -6003,7 +6034,7 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL
return result;
}
stopMotion(anim_id);
- result = TRUE;
+ result = true;
}
return result;
@@ -6012,16 +6043,16 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL
//-----------------------------------------------------------------------------
// isAnyAnimationSignaled()
//-----------------------------------------------------------------------------
-BOOL LLVOAvatar::isAnyAnimationSignaled(const LLUUID *anim_array, const S32 num_anims) const
+bool LLVOAvatar::isAnyAnimationSignaled(const LLUUID *anim_array, const S32 num_anims) const
{
for (S32 i = 0; i < num_anims; i++)
{
if(mSignaledAnimations.find(anim_array[i]) != mSignaledAnimations.end())
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
//-----------------------------------------------------------------------------
@@ -6092,7 +6123,7 @@ LLUUID LLVOAvatar::remapMotionID(const LLUUID& id)
// id is the asset if of the animation to start
// time_offset is the offset into the animation at which to start playing
//-----------------------------------------------------------------------------
-BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset)
+bool LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset)
{
LL_DEBUGS("Motion") << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL;
@@ -6114,7 +6145,7 @@ BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset)
//-----------------------------------------------------------------------------
// stopMotion()
//-----------------------------------------------------------------------------
-BOOL LLVOAvatar::stopMotion(const LLUUID& id, BOOL stop_immediate)
+bool LLVOAvatar::stopMotion(const LLUUID& id, bool stop_immediate)
{
LL_DEBUGS("Motion") << "Motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL;
@@ -6921,17 +6952,17 @@ void LLVOAvatar::requestStopMotion( LLMotion* motion )
// loadSkeletonNode(): loads <skeleton> node from XML tree
//-----------------------------------------------------------------------------
//virtual
-BOOL LLVOAvatar::loadSkeletonNode ()
+bool LLVOAvatar::loadSkeletonNode ()
{
if (!LLAvatarAppearance::loadSkeletonNode())
{
- return FALSE;
+ return false;
}
bool ignore_hud_joints = false;
initAttachmentPoints(ignore_hud_joints);
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
@@ -7064,9 +7095,9 @@ void LLVOAvatar::updateVisualParams()
//-----------------------------------------------------------------------------
// isActive()
//-----------------------------------------------------------------------------
-BOOL LLVOAvatar::isActive() const
+bool LLVOAvatar::isActive() const
{
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
@@ -7112,7 +7143,7 @@ void LLVOAvatar::setPixelAreaAndAngle(LLAgent &agent)
//-----------------------------------------------------------------------------
// updateJointLODs()
//-----------------------------------------------------------------------------
-BOOL LLVOAvatar::updateJointLODs()
+bool LLVOAvatar::updateJointLODs()
{
const F32 MAX_PIXEL_AREA = 100000000.f;
F32 lod_factor = (sLODFactor * AVATAR_LOD_TWEAK_RANGE + (1.f - AVATAR_LOD_TWEAK_RANGE));
@@ -7143,19 +7174,19 @@ BOOL LLVOAvatar::updateJointLODs()
// now select meshes to render based on adjusted pixel area
LLViewerJoint* root = dynamic_cast<LLViewerJoint*>(mRoot);
- BOOL res = FALSE;
+ bool res = false;
if (root)
{
- res = root->updateLOD(mAdjustedPixelArea, TRUE);
+ res = root->updateLOD(mAdjustedPixelArea, true);
}
if (res)
{
sNumLODChangesThisFrame++;
dirtyMesh(2);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
//-----------------------------------------------------------------------------
@@ -7164,7 +7195,7 @@ BOOL LLVOAvatar::updateJointLODs()
LLDrawable *LLVOAvatar::createDrawable(LLPipeline *pipeline)
{
pipeline->allocDrawable(this);
- mDrawable->setLit(FALSE);
+ mDrawable->setLit(false);
LLDrawPoolAvatar *poolp = (LLDrawPoolAvatar*)gPipeline.getPool(mIsControlAvatar ? LLDrawPool::POOL_CONTROL_AV : LLDrawPool::POOL_AVATAR);
@@ -7187,24 +7218,24 @@ void LLVOAvatar::updateGL()
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
updateMeshTextures();
- mMeshTexturesDirty = FALSE;
+ mMeshTexturesDirty = false;
}
}
//-----------------------------------------------------------------------------
// updateGeometry()
//-----------------------------------------------------------------------------
-BOOL LLVOAvatar::updateGeometry(LLDrawable *drawable)
+bool LLVOAvatar::updateGeometry(LLDrawable *drawable)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
if (!(gPipeline.hasRenderType(mIsControlAvatar ? LLPipeline::RENDER_TYPE_CONTROL_AV : LLPipeline::RENDER_TYPE_AVATAR)))
{
- return TRUE;
+ return true;
}
if (!mMeshValid)
{
- return TRUE;
+ return true;
}
if (!drawable)
@@ -7212,7 +7243,7 @@ BOOL LLVOAvatar::updateGeometry(LLDrawable *drawable)
LL_ERRS() << "LLVOAvatar::updateGeometry() called with NULL drawable" << LL_ENDL;
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
@@ -7250,7 +7281,7 @@ LLViewerJoint* LLVOAvatar::getViewerJoint(S32 idx)
//-----------------------------------------------------------------------------
void LLVOAvatar::hideHair()
{
- mMeshLOD[MESH_ID_HAIR]->setVisible(FALSE, TRUE);
+ mMeshLOD[MESH_ID_HAIR]->setVisible(false, true);
}
//-----------------------------------------------------------------------------
@@ -7258,12 +7289,12 @@ void LLVOAvatar::hideHair()
//-----------------------------------------------------------------------------
void LLVOAvatar::hideSkirt()
{
- mMeshLOD[MESH_ID_SKIRT]->setVisible(FALSE, TRUE);
+ mMeshLOD[MESH_ID_SKIRT]->setVisible(false, true);
}
-BOOL LLVOAvatar::setParent(LLViewerObject* parent)
+bool LLVOAvatar::setParent(LLViewerObject* parent)
{
- BOOL ret ;
+ bool ret ;
if (parent == NULL)
{
getOffObject();
@@ -7448,7 +7479,7 @@ S32 LLVOAvatar::getMaxAttachments() const
// canAttachMoreObjects()
// Returns true if we can attach <n> more objects.
//-----------------------------------------------------------------------------
-BOOL LLVOAvatar::canAttachMoreObjects(U32 n) const
+bool LLVOAvatar::canAttachMoreObjects(U32 n) const
{
return (getNumAttachments() + n) <= getMaxAttachments();
}
@@ -7482,7 +7513,7 @@ S32 LLVOAvatar::getMaxAnimatedObjectAttachments() const
// canAttachMoreAnimatedObjects()
// Returns true if we can attach <n> more animated objects.
//-----------------------------------------------------------------------------
-BOOL LLVOAvatar::canAttachMoreAnimatedObjects(U32 n) const
+bool LLVOAvatar::canAttachMoreAnimatedObjects(U32 n) const
{
return (getNumAnimatedObjectAttachments() + n) <= getMaxAnimatedObjectAttachments();
}
@@ -7671,7 +7702,7 @@ bool LLVOAvatar::hasPendingAttachedMeshes()
//-----------------------------------------------------------------------------
// detachObject()
//-----------------------------------------------------------------------------
-BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object)
+bool LLVOAvatar::detachObject(LLViewerObject *viewer_object)
{
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
iter != mAttachmentPoints.end();
@@ -7706,7 +7737,7 @@ BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object)
updateMeshVisibility();
LL_DEBUGS() << "Detaching object " << viewer_object->mID << " from " << attachment->getName() << LL_ENDL;
- return TRUE;
+ return true;
}
}
@@ -7714,16 +7745,16 @@ BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object)
if (iter != mPendingAttachment.end())
{
mPendingAttachment.erase(iter);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
//-----------------------------------------------------------------------------
// sitDown()
//-----------------------------------------------------------------------------
-void LLVOAvatar::sitDown(BOOL bSitting)
+void LLVOAvatar::sitDown(bool bSitting)
{
mIsSitting = bSitting;
if (isSelf())
@@ -7743,7 +7774,7 @@ void LLVOAvatar::sitOnObject(LLViewerObject *sit_object)
// Might be first sit
//LLFirstUse::useSit();
- gAgent.setFlying(FALSE);
+ gAgent.setFlying(false);
gAgentCamera.setThirdPersonHeadOffset(LLVector3::zero);
//interpolate to new camera position
gAgentCamera.startCameraAnimation();
@@ -7782,10 +7813,10 @@ void LLVOAvatar::sitOnObject(LLViewerObject *sit_object)
mDrawable->mXform.setPosition(rel_pos);
mDrawable->mXform.setRotation(mDrawable->getWorldRotation() * inv_obj_rot);
- gPipeline.markMoved(mDrawable, TRUE);
+ gPipeline.markMoved(mDrawable, true);
// Notice that removing sitDown() from here causes avatars sitting on
// objects to be not rendered for new arrivals. See EXT-6835 and EXT-1655.
- sitDown(TRUE);
+ sitDown(true);
mRoot->getXform()->setParent(&sit_object->mDrawable->mXform); // LLVOAvatar::sitOnObject
// SL-315
mRoot->setPosition(getPosition());
@@ -7811,7 +7842,7 @@ void LLVOAvatar::getOffObject()
if (sit_object)
{
stopMotionFromSource(sit_object->getID());
- LLFollowCamMgr::getInstance()->setCameraActive(sit_object->getID(), FALSE);
+ LLFollowCamMgr::getInstance()->setCameraActive(sit_object->getID(), false);
LLViewerObject::const_child_list_t& child_list = sit_object->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
@@ -7820,7 +7851,7 @@ void LLVOAvatar::getOffObject()
LLViewerObject* child_objectp = *iter;
stopMotionFromSource(child_objectp->getID());
- LLFollowCamMgr::getInstance()->setCameraActive(child_objectp->getID(), FALSE);
+ LLFollowCamMgr::getInstance()->setCameraActive(child_objectp->getID(), false);
}
}
@@ -7842,9 +7873,9 @@ void LLVOAvatar::getOffObject()
mDrawable->mXform.setPosition(cur_position_world);
mDrawable->mXform.setRotation(cur_rotation_world);
- gPipeline.markMoved(mDrawable, TRUE);
+ gPipeline.markMoved(mDrawable, true);
- sitDown(FALSE);
+ sitDown(false);
mRoot->getXform()->setParent(NULL); // LLVOAvatar::getOffObject
// SL-315
@@ -7894,15 +7925,22 @@ LLVOAvatar* LLVOAvatar::findAvatarFromAttachment( LLViewerObject* obj )
return NULL;
}
-S32 LLVOAvatar::getAttachmentCount()
+S32 LLVOAvatar::getAttachmentCount() const
{
- S32 count = mAttachmentPoints.size();
+ S32 count = 0;
+
+ for (attachment_map_t::const_iterator iter = mAttachmentPoints.begin(); iter != mAttachmentPoints.end(); ++iter)
+ {
+ LLViewerJointAttachment* pAttachment = iter->second;
+ count += pAttachment->mAttachedObjects.size();
+ }
+
return count;
}
-BOOL LLVOAvatar::isWearingWearableType(LLWearableType::EType type) const
+bool LLVOAvatar::isWearingWearableType(LLWearableType::EType type) const
{
- if (mIsDummy) return TRUE;
+ if (mIsDummy) return true;
if (isSelf())
{
@@ -7915,7 +7953,7 @@ BOOL LLVOAvatar::isWearingWearableType(LLWearableType::EType type) const
case LLWearableType::WT_SKIN:
case LLWearableType::WT_HAIR:
case LLWearableType::WT_EYES:
- return TRUE; // everyone has all bodyparts
+ return true; // everyone has all bodyparts
default:
break; // Do nothing
}
@@ -7936,10 +7974,10 @@ BOOL LLVOAvatar::isWearingWearableType(LLWearableType::EType type) const
const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex;
return isTextureDefined(LLAvatarAppearance::getDictionary()->getBakedTexture(baked_index)->mTextureIndex);
}
- return FALSE;
+ return false;
}
}
- return FALSE;
+ return false;
}
LLViewerObject * LLVOAvatar::findAttachmentByID( const LLUUID & target_id ) const
@@ -8033,7 +8071,7 @@ bool LLVOAvatar::shouldRenderRigged() const
// related to whether the actual avatar mesh is shown, and isVisible()
// to whether anything about the avatar is displayed in the scene.
// Maybe better naming could make this clearer?
-BOOL LLVOAvatar::isVisible() const
+bool LLVOAvatar::isVisible() const
{
return mDrawable.notNull()
&& (!mOrphaned || isSelf())
@@ -8059,7 +8097,7 @@ bool LLVOAvatar::getIsCloud() const
void LLVOAvatar::updateRezzedStatusTimers(S32 rez_status)
{
// State machine for rezzed status. Statuses are -1 on startup, 0
- // = cloud, 1 = gray, 2 = downloading, 3 = full.
+ // = cloud, 1 = gray, 2 = downloading, 3 = waiting for attachments, 4 = full.
// Purpose is to collect time data for each it takes avatar to reach
// various loading landmarks: gray, textured (partial), textured fully.
@@ -8092,7 +8130,7 @@ void LLVOAvatar::updateRezzedStatusTimers(S32 rez_status)
stopPhase("load_" + LLVOAvatar::rezStatusToString(i));
stopPhase("first_load_" + LLVOAvatar::rezStatusToString(i), false);
}
- if (rez_status == 3)
+ if (rez_status == 4)
{
// "fully loaded", mark any pending appearance change complete.
selfStopPhase("update_appearance_from_cof");
@@ -8103,6 +8141,12 @@ void LLVOAvatar::updateRezzedStatusTimers(S32 rez_status)
}
}
mLastRezzedStatus = rez_status;
+
+ static LLUICachedControl<bool> show_rez_status("NameTagDebugAVRezState", false);
+ if (show_rez_status)
+ {
+ mNameIsSet = false;
+ }
}
}
@@ -8230,10 +8274,10 @@ void LLVOAvatar::logMetricsTimerRecord(const std::string& phase_name, F32 elapse
// call periodically to keep isFullyLoaded up to date.
// returns true if the value has changed.
-BOOL LLVOAvatar::updateIsFullyLoaded()
+bool LLVOAvatar::updateIsFullyLoaded()
{
S32 rez_status = getRezzedStatus();
- bool loading = getIsCloud();
+ bool loading = rez_status == 0;
if (mFirstFullyVisible && !mIsControlAvatar)
{
loading = ((rez_status < 2)
@@ -8246,6 +8290,27 @@ BOOL LLVOAvatar::updateIsFullyLoaded()
|| (rez_status < 3 && !isFullyBaked())
|| hasPendingAttachedMeshes()
);
+
+ // compare amount of attachments to one reported by simulator
+ if (!loading && !isSelf() && rez_status < 4 && mLastCloudAttachmentCount != mSimAttachments.size())
+ {
+ S32 attachment_count = getAttachmentCount();
+ if (mLastCloudAttachmentCount != attachment_count)
+ {
+ mLastCloudAttachmentCount = attachment_count;
+ if (attachment_count != mSimAttachments.size())
+ {
+ // attachment count changed, but still below desired, wait for more updates
+ mLastCloudAttachmentChangeTime.reset();
+ loading = true;
+ }
+ }
+ else if (mLastCloudAttachmentChangeTime.getElapsedTimeF32() < MAX_ATTACHMENT_WAIT_TIME_SEC)
+ {
+ // waiting
+ loading = true;
+ }
+ }
}
updateRezzedStatusTimers(rez_status);
updateRuthTimer(loading);
@@ -8281,12 +8346,11 @@ void LLVOAvatar::updateRuthTimer(bool loading)
}
}
-BOOL LLVOAvatar::processFullyLoadedChange(bool loading)
+bool LLVOAvatar::processFullyLoadedChange(bool loading)
{
// We wait a little bit before giving the 'all clear', to let things to
- // settle down (models to snap into place, textures to get first packets).
- // And if viewer isn't aware of some parts yet, this gives them a chance
- // to arrive.
+ // settle down: models to snap into place, textures to get first packets,
+ // LODs to load.
const F32 LOADED_DELAY = 1.f;
if (loading)
@@ -8309,7 +8373,7 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading)
{
// Impostors are less of a priority,
// let them stay cloud longer
- mFirstUseDelaySeconds *= 1.25;
+ mFirstUseDelaySeconds *= FIRST_APPEARANCE_CLOUD_IMPOSTOR_MODIFIER;
}
}
mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > mFirstUseDelaySeconds);
@@ -8321,21 +8385,21 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading)
if (!mPreviousFullyLoaded && !loading && mFullyLoaded)
{
- debugAvatarRezTime("AvatarRezNotification","fully loaded");
+ debugAvatarRezTime("AvatarRezNotification", "fully loaded");
}
// did our loading state "change" from last call?
// FIXME runway - why are we updating every 30 calls even if nothing has changed?
// This causes updateLOD() to run every 30 frames, among other things.
const S32 UPDATE_RATE = 30;
- BOOL changed =
+ bool changed =
((mFullyLoaded != mPreviousFullyLoaded) || // if the value is different from the previous call
(!mFullyLoadedInitialized) || // if we've never been called before
(mFullyLoadedFrameCounter % UPDATE_RATE == 0)); // every now and then issue a change
- BOOL fully_loaded_changed = (mFullyLoaded != mPreviousFullyLoaded);
+ bool fully_loaded_changed = (mFullyLoaded != mPreviousFullyLoaded);
mPreviousFullyLoaded = mFullyLoaded;
- mFullyLoadedInitialized = TRUE;
+ mFullyLoadedInitialized = true;
mFullyLoadedFrameCounter++;
if (changed && isSelf())
@@ -8347,13 +8411,13 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading)
if (fully_loaded_changed && !isSelf() && mFullyLoaded && isImpostor())
{
// Fix for jellydoll initially invisible
- mNeedsImpostorUpdate = TRUE;
+ mNeedsImpostorUpdate = true;
mLastImpostorUpdateReason = 6;
}
return changed;
}
-BOOL LLVOAvatar::isFullyLoaded() const
+bool LLVOAvatar::isFullyLoaded() const
{
return (mRenderUnloadedAvatar || mFullyLoaded);
}
@@ -8361,13 +8425,17 @@ BOOL LLVOAvatar::isFullyLoaded() const
bool LLVOAvatar::isTooComplex() const
{
bool too_complex;
- static LLCachedControl<bool> always_render_friends(gSavedSettings, "AlwaysRenderFriends");
- bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && always_render_friends);
+ static LLCachedControl<S32> compelxity_render_mode(gSavedSettings, "RenderAvatarComplexityMode");
+ bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && compelxity_render_mode > AV_RENDER_LIMIT_BY_COMPLEXITY);
if (isSelf() || render_friend || mVisuallyMuteSetting == AV_ALWAYS_RENDER)
{
too_complex = false;
}
+ else if (compelxity_render_mode == AV_RENDER_ONLY_SHOW_FRIENDS && !mIsControlAvatar)
+ {
+ too_complex = true;
+ }
else
{
// Determine if visually muted or not
@@ -8387,13 +8455,17 @@ bool LLVOAvatar::isTooComplex() const
bool LLVOAvatar::isTooSlow() const
{
- static LLCachedControl<bool> always_render_friends(gSavedSettings, "AlwaysRenderFriends");
- bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && always_render_friends);
+ static LLCachedControl<S32> compelxity_render_mode(gSavedSettings, "RenderAvatarComplexityMode");
+ bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && compelxity_render_mode > AV_RENDER_LIMIT_BY_COMPLEXITY);
if (render_friend || mVisuallyMuteSetting == AV_ALWAYS_RENDER)
{
return false;
}
+ else if (compelxity_render_mode == AV_RENDER_ONLY_SHOW_FRIENDS && !mIsControlAvatar)
+ {
+ return true;
+ }
return mTooSlow;
}
@@ -8401,7 +8473,7 @@ bool LLVOAvatar::isTooSlow() const
void LLVOAvatar::updateTooSlow()
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
- static LLCachedControl<bool> alwaysRenderFriends(gSavedSettings, "AlwaysRenderFriends");
+ static LLCachedControl<S32> compelxity_render_mode(gSavedSettings, "RenderAvatarComplexityMode");
static LLCachedControl<bool> allowSelfImpostor(gSavedSettings, "AllowSelfImpostor");
const auto id = getID();
@@ -8434,12 +8506,14 @@ void LLVOAvatar::updateTooSlow()
if(!mTooSlowWithoutShadows) // if we were not previously above the full impostor cap
{
- bool render_friend_or_exception = ( alwaysRenderFriends && LLAvatarTracker::instance().isBuddy( id ) ) ||
+ bool always_render_friends = compelxity_render_mode > AV_RENDER_LIMIT_BY_COMPLEXITY;
+ bool render_friend_or_exception = (always_render_friends && LLAvatarTracker::instance().isBuddy( id ) ) ||
( getVisualMuteSettings() == LLVOAvatar::AV_ALWAYS_RENDER );
- if( (!isSelf() || allowSelfImpostor) && !render_friend_or_exception )
+ if( (!isSelf() || allowSelfImpostor) && !render_friend_or_exception)
{
// Note: slow rendering Friends still get their shadows zapped.
- mTooSlowWithoutShadows = getGPURenderTime()*2.f >= max_art_ms; // NOTE: assumes shadow rendering doubles render time
+ mTooSlowWithoutShadows = (getGPURenderTime()*2.f >= max_art_ms) // NOTE: assumes shadow rendering doubles render time
+ || (compelxity_render_mode == AV_RENDER_ONLY_SHOW_FRIENDS && !mIsControlAvatar);
}
}
}
@@ -8571,35 +8645,35 @@ void LLVOAvatar::updateMeshVisibility()
LLAvatarJoint* joint = mMeshLOD[i];
if (i == MESH_ID_HAIR)
{
- joint->setVisible(!bake_flag[BAKED_HAIR], TRUE);
+ joint->setVisible(!bake_flag[BAKED_HAIR], true);
}
else if (i == MESH_ID_HEAD)
{
- joint->setVisible(!bake_flag[BAKED_HEAD], TRUE);
+ joint->setVisible(!bake_flag[BAKED_HEAD], true);
}
else if (i == MESH_ID_SKIRT)
{
- joint->setVisible(!bake_flag[BAKED_SKIRT], TRUE);
+ joint->setVisible(!bake_flag[BAKED_SKIRT], true);
}
else if (i == MESH_ID_UPPER_BODY)
{
- joint->setVisible(!bake_flag[BAKED_UPPER], TRUE);
+ joint->setVisible(!bake_flag[BAKED_UPPER], true);
}
else if (i == MESH_ID_LOWER_BODY)
{
- joint->setVisible(!bake_flag[BAKED_LOWER], TRUE);
+ joint->setVisible(!bake_flag[BAKED_LOWER], true);
}
else if (i == MESH_ID_EYEBALL_LEFT)
{
- joint->setVisible(!bake_flag[BAKED_EYES], TRUE);
+ joint->setVisible(!bake_flag[BAKED_EYES], true);
}
else if (i == MESH_ID_EYEBALL_RIGHT)
{
- joint->setVisible(!bake_flag[BAKED_EYES], TRUE);
+ joint->setVisible(!bake_flag[BAKED_EYES], true);
}
else if (i == MESH_ID_EYELASH)
{
- joint->setVisible(!bake_flag[BAKED_HEAD], TRUE);
+ joint->setVisible(!bake_flag[BAKED_HEAD], true);
}
}
}
@@ -8627,19 +8701,19 @@ void LLVOAvatar::updateMeshTextures()
}
}
- const BOOL other_culled = !isSelf() && mCulled;
+ const bool other_culled = !isSelf() && mCulled;
LLLoadedCallbackEntry::source_callback_list_t* src_callback_list = NULL ;
- BOOL paused = FALSE;
+ bool paused = false;
if(!isSelf())
{
src_callback_list = &mCallbackTextureList ;
paused = !isVisible();
}
- std::vector<BOOL> is_layer_baked;
+ std::vector<bool> is_layer_baked;
is_layer_baked.resize(mBakedTextureDatas.size(), false);
- std::vector<BOOL> use_lkg_baked_layer; // lkg = "last known good"
+ std::vector<bool> use_lkg_baked_layer; // lkg = "last known good"
use_lkg_baked_layer.resize(mBakedTextureDatas.size(), false);
mBakedTextureDebugText += llformat("%06d\n",update_counter++);
@@ -8662,7 +8736,7 @@ void LLVOAvatar::updateMeshTextures()
&& layerset_invalid);
if (use_lkg_baked_layer[i])
{
- layerset->setUpdatesEnabled(TRUE);
+ layerset->setUpdatesEnabled(true);
}
}
else
@@ -8702,7 +8776,7 @@ void LLVOAvatar::updateMeshTextures()
{
// use last known good layer (no new one)
LLViewerFetchedTexture* baked_img = LLViewerTextureManager::getFetchedTexture(mBakedTextureDatas[i].mLastTextureID);
- mBakedTextureDatas[i].mIsUsed = TRUE;
+ mBakedTextureDatas[i].mIsUsed = true;
debugColorizeSubMeshes(i,LLColor4::red);
@@ -8722,7 +8796,7 @@ void LLVOAvatar::updateMeshTextures()
// use new layer
LLViewerFetchedTexture* baked_img =
LLViewerTextureManager::staticCastToFetchedTexture(
- getImage( mBakedTextureDatas[i].mTextureIndex, 0 ), TRUE) ;
+ getImage( mBakedTextureDatas[i].mTextureIndex, 0 ), true) ;
if( baked_img->getID() == mBakedTextureDatas[i].mLastTextureID )
{
// Even though the file may not be finished loading,
@@ -8734,14 +8808,14 @@ void LLVOAvatar::updateMeshTextures()
}
else
{
- mBakedTextureDatas[i].mIsLoaded = FALSE;
+ mBakedTextureDatas[i].mIsLoaded = false;
if ( (baked_img->getID() != IMG_INVISIBLE) &&
((i == BAKED_HEAD) || (i == BAKED_UPPER) || (i == BAKED_LOWER)) )
{
- baked_img->setLoadedCallback(onBakedTextureMasksLoaded, MORPH_MASK_REQUESTED_DISCARD, TRUE, TRUE, new LLTextureMaskData( mID ),
+ baked_img->setLoadedCallback(onBakedTextureMasksLoaded, MORPH_MASK_REQUESTED_DISCARD, true, true, new LLTextureMaskData( mID ),
src_callback_list, paused);
}
- baked_img->setLoadedCallback(onBakedTextureLoaded, SWITCH_TO_BAKED_DISCARD, FALSE, FALSE, new LLUUID( mID ),
+ baked_img->setLoadedCallback(onBakedTextureLoaded, SWITCH_TO_BAKED_DISCARD, false, false, new LLUUID( mID ),
src_callback_list, paused );
if (baked_img->getDiscardLevel() < 0 && !paused)
{
@@ -8759,8 +8833,8 @@ void LLVOAvatar::updateMeshTextures()
debugColorizeSubMeshes(i,LLColor4::yellow );
layerset->createComposite();
- layerset->setUpdatesEnabled( TRUE );
- mBakedTextureDatas[i].mIsUsed = FALSE;
+ layerset->setUpdatesEnabled( true );
+ mBakedTextureDatas[i].mIsUsed = false;
avatar_joint_mesh_list_t::iterator iter = mBakedTextureDatas[i].mJointMeshes.begin();
avatar_joint_mesh_list_t::iterator end = mBakedTextureDatas[i].mJointMeshes.end();
@@ -8813,7 +8887,7 @@ void LLVOAvatar::updateMeshTextures()
++local_tex_iter)
{
const ETextureIndex texture_index = *local_tex_iter;
- const BOOL is_baked_ready = (is_layer_baked[baked_index] && mBakedTextureDatas[baked_index].mIsLoaded) || other_culled;
+ const bool is_baked_ready = (is_layer_baked[baked_index] && mBakedTextureDatas[baked_index].mIsLoaded) || other_culled;
if (isSelf())
{
setBakedReady(texture_index, is_baked_ready);
@@ -8868,14 +8942,14 @@ void LLVOAvatar::updateMeshTextures()
//-----------------------------------------------------------------------------
// setLocalTexture()
//-----------------------------------------------------------------------------
-void LLVOAvatar::setLocalTexture( ETextureIndex type, LLViewerTexture* in_tex, BOOL baked_version_ready, U32 index )
+void LLVOAvatar::setLocalTexture( ETextureIndex type, LLViewerTexture* in_tex, bool baked_version_ready, U32 index )
{
// invalid for anyone but self
llassert(0);
}
//virtual
-void LLVOAvatar::setBakedReady(LLAvatarAppearanceDefines::ETextureIndex type, BOOL baked_version_exists, U32 index)
+void LLVOAvatar::setBakedReady(LLAvatarAppearanceDefines::ETextureIndex type, bool baked_version_exists, U32 index)
{
// invalid for anyone but self
llassert(0);
@@ -8911,7 +8985,7 @@ void LLVOAvatar::clearChat()
}
-void LLVOAvatar::applyMorphMask(U8* tex_data, S32 width, S32 height, S32 num_components, LLAvatarAppearanceDefines::EBakedTextureIndex index)
+void LLVOAvatar::applyMorphMask(const U8* tex_data, S32 width, S32 height, S32 num_components, LLAvatarAppearanceDefines::EBakedTextureIndex index)
{
if (index >= BAKED_NUM_INDICES)
{
@@ -8931,12 +9005,12 @@ void LLVOAvatar::applyMorphMask(U8* tex_data, S32 width, S32 height, S32 num_com
}
}
-// returns TRUE if morph masks are present and not valid for a given baked texture, FALSE otherwise
-BOOL LLVOAvatar::morphMaskNeedsUpdate(LLAvatarAppearanceDefines::EBakedTextureIndex index)
+// returns true if morph masks are present and not valid for a given baked texture, false otherwise
+bool LLVOAvatar::morphMaskNeedsUpdate(LLAvatarAppearanceDefines::EBakedTextureIndex index)
{
if (index >= BAKED_NUM_INDICES)
{
- return FALSE;
+ return false;
}
if (!mBakedTextureDatas[index].mMaskedMorphs.empty())
@@ -8951,11 +9025,11 @@ BOOL LLVOAvatar::morphMaskNeedsUpdate(LLAvatarAppearanceDefines::EBakedTextureIn
}
else
{
- return FALSE;
+ return false;
}
}
- return FALSE;
+ return false;
}
//-----------------------------------------------------------------------------
@@ -9050,7 +9124,7 @@ void LLVOAvatar::clampAttachmentPositions()
}
}
-BOOL LLVOAvatar::hasHUDAttachment() const
+bool LLVOAvatar::hasHUDAttachment() const
{
for (attachment_map_t::const_iterator iter = mAttachmentPoints.begin();
iter != mAttachmentPoints.end();
@@ -9059,10 +9133,10 @@ BOOL LLVOAvatar::hasHUDAttachment() const
LLViewerJointAttachment* attachment = iter->second;
if (attachment->getIsHUDAttachment() && attachment->getNumObjects() > 0)
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
LLBBox LLVOAvatar::getHUDBBox() const
@@ -9112,10 +9186,10 @@ void LLVOAvatar::onFirstTEMessageReceived()
LL_DEBUGS("Avatar") << avString() << LL_ENDL;
if( !mFirstTEMessageReceived )
{
- mFirstTEMessageReceived = TRUE;
+ mFirstTEMessageReceived = true;
LLLoadedCallbackEntry::source_callback_list_t* src_callback_list = NULL ;
- BOOL paused = FALSE ;
+ bool paused = false ;
if(!isSelf())
{
src_callback_list = &mCallbackTextureList ;
@@ -9124,22 +9198,22 @@ void LLVOAvatar::onFirstTEMessageReceived()
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
{
- const BOOL layer_baked = isTextureDefined(mBakedTextureDatas[i].mTextureIndex);
+ const bool layer_baked = isTextureDefined(mBakedTextureDatas[i].mTextureIndex);
// Use any baked textures that we have even if they haven't downloaded yet.
// (That is, don't do a transition from unbaked to baked.)
if (layer_baked)
{
- LLViewerFetchedTexture* image = LLViewerTextureManager::staticCastToFetchedTexture(getImage( mBakedTextureDatas[i].mTextureIndex, 0 ), TRUE) ;
+ LLViewerFetchedTexture* image = LLViewerTextureManager::staticCastToFetchedTexture(getImage( mBakedTextureDatas[i].mTextureIndex, 0 ), true) ;
mBakedTextureDatas[i].mLastTextureID = image->getID();
// If we have more than one texture for the other baked layers, we'll want to call this for them too.
if ( (image->getID() != IMG_INVISIBLE) && ((i == BAKED_HEAD) || (i == BAKED_UPPER) || (i == BAKED_LOWER)) )
{
- image->setLoadedCallback( onBakedTextureMasksLoaded, MORPH_MASK_REQUESTED_DISCARD, TRUE, TRUE, new LLTextureMaskData( mID ),
+ image->setLoadedCallback( onBakedTextureMasksLoaded, MORPH_MASK_REQUESTED_DISCARD, true, true, new LLTextureMaskData( mID ),
src_callback_list, paused);
}
LL_DEBUGS("Avatar") << avString() << "layer_baked, setting onInitialBakedTextureLoaded as callback" << LL_ENDL;
- image->setLoadedCallback( onInitialBakedTextureLoaded, MAX_DISCARD_LEVEL, FALSE, FALSE, new LLUUID( mID ),
+ image->setLoadedCallback( onInitialBakedTextureLoaded, MAX_DISCARD_LEVEL, false, false, new LLUUID( mID ),
src_callback_list, paused );
if (image->getDiscardLevel() < 0 && !paused)
{
@@ -9150,7 +9224,7 @@ void LLVOAvatar::onFirstTEMessageReceived()
}
}
- mMeshTexturesDirty = TRUE;
+ mMeshTexturesDirty = true;
gPipeline.markGLRebuild(this);
mFirstAppearanceMessageTimer.reset();
@@ -9286,7 +9360,7 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe
//mesgsys->getU32Fast(_PREHASH_AppearanceData, _PREHASH_Flags, appearance_flags, 0);
}
- // Parse the AppearanceData field, if any.
+ // Parse the AppearanceHover field, if any.
contents.mHoverOffsetWasSet = false;
if (mesgsys->has(_PREHASH_AppearanceHover))
{
@@ -9296,7 +9370,37 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe
contents.mHoverOffset = hover;
contents.mHoverOffsetWasSet = true;
}
-
+
+ // Get attachment info, if sent
+ LLUUID attachment_id;
+ U8 attach_point;
+ S32 attach_count = mesgsys->getNumberOfBlocksFast(_PREHASH_AttachmentBlock);
+ LL_DEBUGS("AVAppearanceAttachments") << "Agent " << getID() << " has "
+ << attach_count << " attachments" << LL_ENDL;
+ size_t old_size = mSimAttachments.size();
+ mSimAttachments.clear();
+ for (S32 attach_i = 0; attach_i < attach_count; attach_i++)
+ {
+ mesgsys->getUUIDFast(_PREHASH_AttachmentBlock, _PREHASH_ID, attachment_id, attach_i);
+ mesgsys->getU8Fast(_PREHASH_AttachmentBlock, _PREHASH_AttachmentPoint, attach_point, attach_i);
+ LL_DEBUGS("AVAppearanceAttachments") << "AV " << getID() << " has attachment " << attach_i << " "
+ << (attachment_id.isNull() ? "pending" : attachment_id.asString())
+ << " on point " << (S32)attach_point << LL_ENDL;
+
+ mSimAttachments[attachment_id] = attach_point;
+ }
+
+ // todo? Doesn't detect if attachments were switched
+ if (old_size != mSimAttachments.size())
+ {
+ mLastCloudAttachmentCount = 0;
+ mLastCloudAttachmentChangeTime.reset();
+ if (!isFullyLoaded())
+ {
+ mFullyLoadedTimer.reset();
+ }
+ }
+
// Parse visual params, if any.
S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_VisualParam);
static LLCachedControl<bool> block_some_avatars(gSavedSettings, "BlockSomeAvatarAppearanceVisualParams");
@@ -9529,7 +9633,7 @@ void LLVOAvatar::applyParsedAppearanceMessage(LLAppearanceMessageContents& conte
{
LL_DEBUGS("Avatar") << avString() << " baked_index " << (S32) baked_index << " using mLastTextureID " << mBakedTextureDatas[baked_index].mLastTextureID << LL_ENDL;
setTEImage(mBakedTextureDatas[baked_index].mTextureIndex,
- LLViewerTextureManager::getFetchedTexture(mBakedTextureDatas[baked_index].mLastTextureID, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE));
+ LLViewerTextureManager::getFetchedTexture(mBakedTextureDatas[baked_index].mLastTextureID, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE));
}
else
{
@@ -9541,8 +9645,8 @@ void LLVOAvatar::applyParsedAppearanceMessage(LLAppearanceMessageContents& conte
// runway - was
// if (!is_first_appearance_message )
// which means it would be called on second appearance message - probably wrong.
- BOOL is_first_appearance_message = !mFirstAppearanceMessageReceived;
- mFirstAppearanceMessageReceived = TRUE;
+ bool is_first_appearance_message = !mFirstAppearanceMessageReceived;
+ mFirstAppearanceMessageReceived = true;
//LL_DEBUGS("Avatar") << avString() << "processAvatarAppearance start " << mID
// << " first? " << is_first_appearance_message << " self? " << isSelf() << LL_ENDL;
@@ -9552,15 +9656,15 @@ void LLVOAvatar::applyParsedAppearanceMessage(LLAppearanceMessageContents& conte
onFirstTEMessageReceived();
}
- setCompositeUpdatesEnabled( FALSE );
+ setCompositeUpdatesEnabled( false );
gPipeline.markGLRebuild(this);
// Apply visual params
if( num_params > 1)
{
//LL_DEBUGS("Avatar") << avString() << " handle visual params, num_params " << num_params << LL_ENDL;
- BOOL params_changed = FALSE;
- BOOL interp_params = FALSE;
+ bool params_changed = false;
+ bool interp_params = false;
S32 params_changed_count = 0;
for( S32 i = 0; i < num_params; i++ )
@@ -9570,7 +9674,7 @@ void LLVOAvatar::applyParsedAppearanceMessage(LLAppearanceMessageContents& conte
if (slam_params || is_first_appearance_message || (param->getWeight() != newWeight))
{
- params_changed = TRUE;
+ params_changed = true;
params_changed_count++;
if(is_first_appearance_message || slam_params)
@@ -9580,7 +9684,7 @@ void LLVOAvatar::applyParsedAppearanceMessage(LLAppearanceMessageContents& conte
}
else
{
- interp_params = TRUE;
+ interp_params = true;
param->setAnimationTarget(newWeight);
}
}
@@ -9647,7 +9751,7 @@ void LLVOAvatar::applyParsedAppearanceMessage(LLAppearanceMessageContents& conte
setHoverOffset(LLVector3(0.0, 0.0, 0.0));
}
- setCompositeUpdatesEnabled( TRUE );
+ setCompositeUpdatesEnabled( true );
// If all of the avatars are completely baked, release the global image caches to conserve memory.
LLVOAvatar::cullAvatarsByPixelArea();
@@ -9669,7 +9773,7 @@ LLViewerTexture* LLVOAvatar::getBakedTexture(const U8 te)
return NULL;
}
- BOOL is_layer_baked = isTextureDefined(mBakedTextureDatas[te].mTextureIndex);
+ bool is_layer_baked = isTextureDefined(mBakedTextureDatas[te].mTextureIndex);
LLViewerTexLayerSet* layerset = NULL;
layerset = getTexLayerSet(te);
@@ -9677,13 +9781,13 @@ LLViewerTexture* LLVOAvatar::getBakedTexture(const U8 te)
if (!isEditingAppearance() && is_layer_baked)
{
- LLViewerFetchedTexture* baked_img = LLViewerTextureManager::staticCastToFetchedTexture(getImage(mBakedTextureDatas[te].mTextureIndex, 0), TRUE);
+ LLViewerFetchedTexture* baked_img = LLViewerTextureManager::staticCastToFetchedTexture(getImage(mBakedTextureDatas[te].mTextureIndex, 0), true);
return baked_img;
}
else if (layerset && isEditingAppearance())
{
layerset->createComposite();
- layerset->setUpdatesEnabled(TRUE);
+ layerset->setUpdatesEnabled(true);
return layerset->getViewerComposite();
}
@@ -9771,7 +9875,7 @@ void LLVOAvatar::getAnimNames( std::vector<std::string>* names )
}
// static
-void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata )
+void LLVOAvatar::onBakedTextureMasksLoaded( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata )
{
if (!userdata) return;
@@ -9787,6 +9891,8 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture
{
if(aux_src && aux_src->getComponents() == 1)
{
+ LLImageDataSharedLock lock(aux_src);
+
if (!aux_src->getData())
{
LL_ERRS() << "No auxiliary source (morph mask) data for image id " << id << LL_ENDL;
@@ -9813,7 +9919,7 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture
//LL_INFOS() << "onBakedTextureMasksLoaded for head " << id << " discard = " << discard_level << LL_ENDL;
self->mBakedTextureDatas[BAKED_HEAD].mTexLayerSet->applyMorphMask(aux_src->getData(), aux_src->getWidth(), aux_src->getHeight(), 1);
maskData->mLastDiscardLevel = discard_level; */
- BOOL found_texture_id = false;
+ bool found_texture_id = false;
for (LLAvatarAppearanceDictionary::Textures::const_iterator iter = LLAvatarAppearance::getDictionary()->getTextures().begin();
iter != LLAvatarAppearance::getDictionary()->getTextures().end();
++iter)
@@ -9860,7 +9966,7 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture
}
// static
-void LLVOAvatar::onInitialBakedTextureLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata )
+void LLVOAvatar::onInitialBakedTextureLoaded( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata )
{
LLUUID *avatar_idp = (LLUUID *)userdata;
LLVOAvatar *selfp = (LLVOAvatar *)gObjectList.findObject(*avatar_idp);
@@ -9881,9 +9987,9 @@ void LLVOAvatar::onInitialBakedTextureLoaded( BOOL success, LLViewerFetchedTextu
}
// Static
-void LLVOAvatar::onBakedTextureLoaded(BOOL success,
+void LLVOAvatar::onBakedTextureLoaded(bool success,
LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src,
- S32 discard_level, BOOL final, void* userdata)
+ S32 discard_level, bool final, void* userdata)
{
//LL_DEBUGS("Avatar") << "onBakedTextureLoaded: " << src_vi->getID() << LL_ENDL;
@@ -9951,7 +10057,7 @@ void LLVOAvatar::useBakedTexture( const LLUUID& id )
local_tex_iter != baked_dict->mLocalTextures.end();
++local_tex_iter)
{
- if (isSelf()) setBakedReady(*local_tex_iter, TRUE);
+ if (isSelf()) setBakedReady(*local_tex_iter, true);
}
// ! BACKWARDS COMPATIBILITY !
@@ -10312,7 +10418,7 @@ S32 LLVOAvatar::getUnbakedPixelAreaRank()
struct CompareScreenAreaGreater
{
- BOOL operator()(const LLCharacter* const& lhs, const LLCharacter* const& rhs)
+ bool operator()(const LLCharacter* const& lhs, const LLCharacter* const& rhs)
{
return lhs->getPixelArea() > rhs->getPixelArea();
}
@@ -10329,14 +10435,14 @@ void LLVOAvatar::cullAvatarsByPixelArea()
iter != LLCharacter::sInstances.end(); ++iter)
{
LLVOAvatar* inst = (LLVOAvatar*) *iter;
- BOOL culled;
+ bool culled;
if (inst->isSelf() || inst->isFullyBaked())
{
- culled = FALSE;
+ culled = false;
}
else
{
- culled = TRUE;
+ culled = true;
}
if (inst->mCulled != culled)
@@ -10380,7 +10486,7 @@ void LLVOAvatar::startAppearanceAnimation()
{
if(!mAppearanceAnimating)
{
- mAppearanceAnimating = TRUE;
+ mAppearanceAnimating = true;
mAppearanceMorphTimer.reset();
mLastAppearanceBlendTime = 0.f;
}
@@ -10425,19 +10531,19 @@ LLHost LLVOAvatar::getObjectHost() const
}
}
-BOOL LLVOAvatar::updateLOD()
+bool LLVOAvatar::updateLOD()
{
if (mDrawable.isNull())
{
- return FALSE;
+ return false;
}
if (!LLPipeline::sImpostorRender && isImpostor() && 0 != mDrawable->getNumFaces() && mDrawable->getFace(0)->hasGeometry())
{
- return TRUE;
+ return true;
}
- BOOL res = updateJointLODs();
+ bool res = updateJointLODs();
LLFace* facep = mDrawable->getFace(0);
if (!facep || !facep->getVertexBuffer())
@@ -10449,7 +10555,7 @@ BOOL LLVOAvatar::updateLOD()
{ //LOD changed or new mesh created, allocate new vertex buffer if needed
updateMeshData();
mDirtyMesh = 0;
- mNeedsSkin = TRUE;
+ mNeedsSkin = true;
mDrawable->clearState(LLDrawable::REBUILD_GEOMETRY);
}
updateVisibility();
@@ -10626,16 +10732,16 @@ void LLVOAvatar::updateImpostors()
}
}
- LLCharacter::sAllowInstancesChange = TRUE;
+ LLCharacter::sAllowInstancesChange = true;
}
// virtual
-BOOL LLVOAvatar::isImpostor()
+bool LLVOAvatar::isImpostor()
{
return isVisuallyMuted() || (sLimitNonImpostors && (mUpdatePeriod > 1));
}
-BOOL LLVOAvatar::shouldImpostor(const F32 rank_factor)
+bool LLVOAvatar::shouldImpostor(const F32 rank_factor)
{
if (isSelf())
{
@@ -10648,7 +10754,7 @@ BOOL LLVOAvatar::shouldImpostor(const F32 rank_factor)
return sLimitNonImpostors && (mVisibilityRank > sMaxNonImpostors * rank_factor);
}
-BOOL LLVOAvatar::needsImpostorUpdate() const
+bool LLVOAvatar::needsImpostorUpdate() const
{
return mNeedsImpostorUpdate;
}
@@ -10974,7 +11080,7 @@ void LLVOAvatar::accountRenderComplexityForObject(
const LLVOVolume* volume = attached_object->mDrawable->getVOVolume();
if (volume)
{
- BOOL is_rigged_mesh = volume->isRiggedMeshFast();
+ bool is_rigged_mesh = volume->isRiggedMeshFast();
LLHUDComplexity hud_object_complexity;
hud_object_complexity.objectName = attached_object->getAttachmentItemName();
hud_object_complexity.objectId = attached_object->getAttachmentItemID();
@@ -11171,7 +11277,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
void LLVOAvatar::setVisualMuteSettings(VisualMuteSettings set)
{
mVisuallyMuteSetting = set;
- mNeedsImpostorUpdate = TRUE;
+ mNeedsImpostorUpdate = true;
mLastImpostorUpdateReason = 7;
LLRenderMuteList::getInstance()->saveVisualMuteSetting(getID(), S32(set));
@@ -11184,7 +11290,10 @@ void LLVOAvatar::setOverallAppearanceNormal()
return;
LLVector3 pelvis_pos = getJoint("mPelvis")->getPosition();
- resetSkeleton(false);
+ if (isControlAvatar() || mLastProcessedAppearance)
+ {
+ resetSkeleton(false);
+ }
getJoint("mPelvis")->setPosition(pelvis_pos);
for (auto it = mJellyAnims.begin(); it != mJellyAnims.end(); ++it)
@@ -11214,7 +11323,7 @@ void LLVOAvatar::setOverallAppearanceJellyDoll()
++anim_it)
{
{
- stopMotion(anim_it->first, TRUE);
+ stopMotion(anim_it->first, true);
}
}
}
@@ -11253,7 +11362,7 @@ void LLVOAvatar::updateOverallAppearance()
mOverallAppearance = new_overall;
if (!isSelf())
{
- mNeedsImpostorUpdate = TRUE;
+ mNeedsImpostorUpdate = true;
mLastImpostorUpdateReason = 8;
}
updateMeshVisibility();
@@ -11293,7 +11402,7 @@ void LLVOAvatar::updateOverallAppearanceAnimations()
if (!is_playing)
{
// Anim was not requested for this av by sim, but may be playing locally
- stopMotion(*it, TRUE);
+ stopMotion(*it, true);
}
}
mJellyAnims.clear();
@@ -11404,7 +11513,7 @@ void LLVOAvatar::calcMutedAVColor()
}
// static
-BOOL LLVOAvatar::isIndexLocalTexture(ETextureIndex index)
+bool LLVOAvatar::isIndexLocalTexture(ETextureIndex index)
{
return (index < 0 || index >= TEX_NUM_INDICES)
? false
@@ -11412,7 +11521,7 @@ BOOL LLVOAvatar::isIndexLocalTexture(ETextureIndex index)
}
// static
-BOOL LLVOAvatar::isIndexBakedTexture(ETextureIndex index)
+bool LLVOAvatar::isIndexBakedTexture(ETextureIndex index)
{
return (index < 0 || index >= TEX_NUM_INDICES)
? false
@@ -11460,44 +11569,42 @@ F32 calc_bouncy_animation(F32 x)
}
//virtual
-BOOL LLVOAvatar::isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex te, U32 index ) const
+bool LLVOAvatar::isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex te, U32 index ) const
{
if (isIndexLocalTexture(te))
{
- return FALSE;
+ return false;
}
-
- if( !getImage( te, index ) )
+
+ LLViewerTexture* tex = getImage(te, index);
+ if (!tex)
{
LL_WARNS() << "getImage( " << te << ", " << index << " ) returned 0" << LL_ENDL;
- return FALSE;
+ return false;
}
- return (getImage(te, index)->getID() != IMG_DEFAULT_AVATAR &&
- getImage(te, index)->getID() != IMG_DEFAULT);
+ return (tex->getID() != IMG_DEFAULT_AVATAR &&
+ tex->getID() != IMG_DEFAULT);
}
//virtual
-BOOL LLVOAvatar::isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const
+bool LLVOAvatar::isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const
{
if (isIndexLocalTexture(type))
{
return isTextureDefined(type, index);
}
- else
- {
- // baked textures can use TE images directly
- return ((isTextureDefined(type) || isSelf())
- && (getTEImage(type)->getID() != IMG_INVISIBLE
- || LLDrawPoolAlpha::sShowDebugAlpha));
- }
+
+ // baked textures can use TE images directly
+ return ((isTextureDefined(type) || isSelf()) &&
+ (getTEImage(type)->getID() != IMG_INVISIBLE || LLDrawPoolAlpha::sShowDebugAlpha));
}
//virtual
-BOOL LLVOAvatar::isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerWearable *wearable) const
+bool LLVOAvatar::isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerWearable *wearable) const
{
// non-self avatars don't have wearables
- return FALSE;
+ return false;
}
void LLVOAvatar::placeProfileQuery()
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 4bb0c8aa73..f83ea59080 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -132,10 +132,10 @@ public:
const EObjectUpdateType update_type,
LLDataPacker *dp);
virtual void idleUpdate(LLAgent &agent, const F64 &time);
- /*virtual*/ BOOL updateLOD();
- BOOL updateJointLODs();
+ /*virtual*/ bool updateLOD();
+ bool updateJointLODs();
void updateLODRiggedAttachments( void );
- /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate.
+ /*virtual*/ bool isActive() const; // Whether this object needs to do an idleUpdate.
S32Bytes totalTextureMemForUUIDS(std::set<LLUUID>& ids);
bool allTexturesCompletelyDownloaded(std::set<LLUUID>& ids) const;
bool allLocalTexturesCompletelyDownloaded() const;
@@ -153,18 +153,18 @@ public:
/*virtual*/ void onShift(const LLVector4a& shift_vector);
/*virtual*/ U32 getPartitionType() const;
/*virtual*/ const LLVector3 getRenderPosition() const;
- /*virtual*/ void updateDrawable(BOOL force_damped);
+ /*virtual*/ void updateDrawable(bool force_damped);
/*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);
- /*virtual*/ BOOL updateGeometry(LLDrawable *drawable);
+ /*virtual*/ bool updateGeometry(LLDrawable *drawable);
/*virtual*/ void setPixelAreaAndAngle(LLAgent &agent);
/*virtual*/ void updateRegion(LLViewerRegion *regionp);
/*virtual*/ void updateSpatialExtents(LLVector4a& newMin, LLVector4a &newMax);
void calculateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax);
- /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
+ /*virtual*/ bool lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
- BOOL pick_transparent = FALSE,
- BOOL pick_rigged = FALSE,
- BOOL pick_unselectable = TRUE,
+ bool pick_transparent = false,
+ bool pick_rigged = false,
+ bool pick_unselectable = true,
S32* face_hit = NULL, // which face was hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
@@ -173,9 +173,9 @@ public:
virtual LLViewerObject* lineSegmentIntersectRiggedAttachments(
const LLVector4a& start, const LLVector4a& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
- BOOL pick_transparent = FALSE,
- BOOL pick_rigged = FALSE,
- BOOL pick_unselectable = TRUE,
+ bool pick_transparent = false,
+ bool pick_rigged = false,
+ bool pick_unselectable = true,
S32* face_hit = NULL, // which face was hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
@@ -192,8 +192,8 @@ public:
/*virtual*/ LLVector3 getCharacterAngularVelocity();
/*virtual*/ LLUUID remapMotionID(const LLUUID& id);
- /*virtual*/ BOOL startMotion(const LLUUID& id, F32 time_offset = 0.f);
- /*virtual*/ BOOL stopMotion(const LLUUID& id, BOOL stop_immediate = FALSE);
+ /*virtual*/ bool startMotion(const LLUUID& id, F32 time_offset = 0.f);
+ /*virtual*/ bool stopMotion(const LLUUID& id, bool stop_immediate = false);
virtual bool hasMotionFromSource(const LLUUID& source_id);
virtual void stopMotionFromSource(const LLUUID& source_id);
virtual void requestStopMotion(LLMotion* motion);
@@ -350,22 +350,22 @@ public:
//--------------------------------------------------------------------
public:
static S32 sRenderName;
- static BOOL sRenderGroupTitles;
+ static bool sRenderGroupTitles;
static const U32 NON_IMPOSTORS_MAX_SLIDER; /* Must equal the maximum allowed the RenderAvatarMaxNonImpostors
* slider in panel_preferences_graphics1.xml */
static U32 sMaxNonImpostors; // affected by control "RenderAvatarMaxNonImpostors"
static bool sLimitNonImpostors; // use impostors for far away avatars
static F32 sRenderDistance; // distance at which avatars will render.
- static BOOL sShowAnimationDebug; // show animation debug info
- static BOOL sShowCollisionVolumes; // show skeletal collision volumes
- static BOOL sVisibleInFirstPerson;
+ static bool sShowAnimationDebug; // show animation debug info
+ static bool sShowCollisionVolumes; // show skeletal collision volumes
+ static bool sVisibleInFirstPerson;
static S32 sNumLODChangesThisFrame;
static S32 sNumVisibleChatBubbles;
- static BOOL sDebugInvisible;
- static BOOL sShowAttachmentPoints;
+ static bool sDebugInvisible;
+ static bool sShowAttachmentPoints;
static F32 sLODFactor; // user-settable LOD factor
static F32 sPhysicsLODFactor; // user-settable physics LOD factor
- static BOOL sJointDebug; // output total number of joints being touched for each avatar
+ static bool sJointDebug; // output total number of joints being touched for each avatar
static LLPointer<LLViewerTexture> sCloudTexture;
@@ -382,7 +382,8 @@ public:
// Loading state
//--------------------------------------------------------------------
public:
- BOOL isFullyLoaded() const;
+ bool isFullyLoaded() const;
+ F32 getFirstDecloudTime() const {return mFirstDecloudTime;}
// check and return current state relative to limits
// default will test only the geometry (combined=false).
@@ -396,8 +397,8 @@ public:
bool isTooComplex() const;
bool visualParamWeightsAreDefault();
virtual bool getIsCloud() const;
- BOOL isFullyTextured() const;
- BOOL hasGray() const;
+ bool isFullyTextured() const;
+ bool hasGray() const;
S32 getRezzedStatus() const; // 0 = cloud, 1 = gray, 2 = textured, 3 = textured and fully downloaded.
void updateRezzedStatusTimers(S32 status);
@@ -415,19 +416,20 @@ public:
protected:
LLViewerStats::PhaseMap& getPhases() { return mPhases; }
- BOOL updateIsFullyLoaded();
- BOOL processFullyLoadedChange(bool loading);
+ bool updateIsFullyLoaded();
+ bool processFullyLoadedChange(bool loading);
void updateRuthTimer(bool loading);
F32 calcMorphAmount();
private:
- BOOL mFirstFullyVisible;
+ bool mFirstFullyVisible;
+ F32 mFirstDecloudTime;
F32 mFirstUseDelaySeconds;
LLFrameTimer mFirstAppearanceMessageTimer;
- BOOL mFullyLoaded;
- BOOL mPreviousFullyLoaded;
- BOOL mFullyLoadedInitialized;
+ bool mFullyLoaded;
+ bool mPreviousFullyLoaded;
+ bool mFullyLoadedInitialized;
S32 mFullyLoadedFrameCounter;
LLColor4 mMutedAVColor;
LLFrameTimer mFullyLoadedTimer;
@@ -462,7 +464,7 @@ public:
void debugBodySize() const;
void postPelvisSetRecalc( void );
- /*virtual*/ BOOL loadSkeletonNode();
+ /*virtual*/ bool loadSkeletonNode();
void initAttachmentPoints(bool ignore_hud_joints = false);
/*virtual*/ void buildCharacter();
void resetVisualParams();
@@ -488,7 +490,14 @@ public:
U32 renderImpostor(LLColor4U color = LLColor4U(255,255,255,255), S32 diffuse_channel = 0);
bool isVisuallyMuted();
bool isInMuteList() const;
- void forceUpdateVisualMuteSettings();
+
+ // states for RenderAvatarComplexityMode
+ enum ERenderComplexityMode
+ {
+ AV_RENDER_LIMIT_BY_COMPLEXITY = 0,
+ AV_RENDER_ALWAYS_SHOW_FRIENDS = 1,
+ AV_RENDER_ONLY_SHOW_FRIENDS = 2
+ };
// Visual Mute Setting is an input. Does not necessarily determine
// what the avatar looks like, because it interacts with other
@@ -533,7 +542,7 @@ public:
U32 renderRigid();
U32 renderSkinned();
F32 getLastSkinTime() { return mLastSkinTime; }
- U32 renderTransparent(BOOL first_pass);
+ U32 renderTransparent(bool first_pass);
void renderCollisionVolumes();
void renderBones(const std::string &selected_joint = std::string());
void renderJoints();
@@ -550,7 +559,7 @@ private:
F32 mAttachmentEstTriangleCount;
bool shouldAlphaMask();
- BOOL mNeedsSkin; // avatar has been animated and verts have not been updated
+ bool mNeedsSkin; // avatar has been animated and verts have not been updated
F32 mLastSkinTime; //value of gFrameTimeSeconds at last skin update
S32 mUpdatePeriod;
@@ -591,8 +600,8 @@ public:
// Morph masks
//--------------------------------------------------------------------
public:
- /*virtual*/ void applyMorphMask(U8* tex_data, S32 width, S32 height, S32 num_components, LLAvatarAppearanceDefines::EBakedTextureIndex index = LLAvatarAppearanceDefines::BAKED_NUM_INDICES);
- BOOL morphMaskNeedsUpdate(LLAvatarAppearanceDefines::EBakedTextureIndex index = LLAvatarAppearanceDefines::BAKED_NUM_INDICES);
+ /*virtual*/ void applyMorphMask(const U8* tex_data, S32 width, S32 height, S32 num_components, LLAvatarAppearanceDefines::EBakedTextureIndex index = LLAvatarAppearanceDefines::BAKED_NUM_INDICES);
+ bool morphMaskNeedsUpdate(LLAvatarAppearanceDefines::EBakedTextureIndex index = LLAvatarAppearanceDefines::BAKED_NUM_INDICES);
//--------------------------------------------------------------------
@@ -608,7 +617,7 @@ protected:
void updateVisibility();
private:
U32 mVisibilityRank;
- BOOL mVisible;
+ bool mVisible;
//--------------------------------------------------------------------
// Shadowing
@@ -625,9 +634,9 @@ private:
// Impostors
//--------------------------------------------------------------------
public:
- virtual BOOL isImpostor();
- BOOL shouldImpostor(const F32 rank_factor = 1.0);
- BOOL needsImpostorUpdate() const;
+ virtual bool isImpostor();
+ bool shouldImpostor(const F32 rank_factor = 1.0);
+ bool needsImpostorUpdate() const;
const LLVector3& getImpostorOffset() const;
const LLVector2& getImpostorDim() const;
void getImpostorValues(LLVector4a* extents, LLVector3& angle, F32& distance) const;
@@ -636,7 +645,7 @@ public:
static void resetImpostors();
static void updateImpostors();
LLRenderTarget mImpostor;
- BOOL mNeedsImpostorUpdate;
+ bool mNeedsImpostorUpdate;
S32 mLastImpostorUpdateReason;
F32SecondsImplicit mLastImpostorUpdateFrameTime;
const LLVector3* getLastAnimExtents() const { return mLastAnimExtents; }
@@ -647,7 +656,7 @@ private:
LLVector2 mImpostorDim;
// This becomes true in the constructor and false after the first
// idleUpdateMisc(). Not clear it serves any purpose.
- BOOL mNeedsAnimUpdate;
+ bool mNeedsAnimUpdate;
bool mNeedsExtentUpdate;
LLVector3 mImpostorAngle;
F32 mImpostorDistance;
@@ -663,7 +672,7 @@ private:
public:
LLVector4 mWindVec;
F32 mRipplePhase;
- BOOL mBelowWater;
+ bool mBelowWater;
private:
F32 mWindFreq;
LLFrameTimer mRippleTimer;
@@ -676,9 +685,9 @@ private:
//--------------------------------------------------------------------
public:
static void cullAvatarsByPixelArea();
- BOOL isCulled() const { return mCulled; }
+ bool isCulled() const { return mCulled; }
private:
- BOOL mCulled;
+ bool mCulled;
//--------------------------------------------------------------------
// Constants
@@ -702,13 +711,13 @@ public:
// Loading status
//--------------------------------------------------------------------
public:
- virtual BOOL isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex type, U32 index = 0) const;
- virtual BOOL isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, U32 index = 0) const;
- virtual BOOL isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerWearable *wearable) const;
+ virtual bool isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex type, U32 index = 0) const;
+ virtual bool isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, U32 index = 0) const;
+ virtual bool isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerWearable *wearable) const;
- BOOL isFullyBaked();
- static BOOL areAllNearbyInstancesBaked(S32& grey_avatars);
- static void getNearbyRezzedStats(std::vector<S32>& counts);
+ bool isFullyBaked();
+ static bool areAllNearbyInstancesBaked(S32& grey_avatars);
+ static void getNearbyRezzedStats(std::vector<S32>& counts, F32& avg_cloud_time, S32& cloud_avatars);
static std::string rezStatusToString(S32 status);
//--------------------------------------------------------------------
@@ -719,16 +728,16 @@ public:
void releaseComponentTextures(); // ! BACKWARDS COMPATIBILITY !
protected:
- static void onBakedTextureMasksLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
- static void onInitialBakedTextureLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
- static void onBakedTextureLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
+ static void onBakedTextureMasksLoaded(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata);
+ static void onInitialBakedTextureLoaded(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata);
+ static void onBakedTextureLoaded(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata);
virtual void removeMissingBakedTextures();
void useBakedTexture(const LLUUID& id);
LLViewerTexLayerSet* getTexLayerSet(const U32 index) const { return dynamic_cast<LLViewerTexLayerSet*>(mBakedTextureDatas[index].mTexLayerSet); }
LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ;
- BOOL mLoadedCallbacksPaused;
+ bool mLoadedCallbacksPaused;
S32 mLoadedCallbackTextures; // count of 'loaded' baked textures, filled from mCallbackTextureList
LLFrameTimer mLastTexCallbackAddedTime;
std::set<LLUUID> mTextureIDs;
@@ -736,10 +745,10 @@ protected:
// Local Textures
//--------------------------------------------------------------------
protected:
- virtual void setLocalTexture(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerTexture* tex, BOOL baked_version_exits, U32 index = 0);
- virtual void addLocalTextureStats(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerFetchedTexture* imagep, F32 texel_area_ratio, BOOL rendered, BOOL covered_by_baked);
+ virtual void setLocalTexture(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerTexture* tex, bool baked_version_exits, U32 index = 0);
+ virtual void addLocalTextureStats(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerFetchedTexture* imagep, F32 texel_area_ratio, bool rendered, bool covered_by_baked);
// MULTI-WEARABLE: make self-only?
- virtual void setBakedReady(LLAvatarAppearanceDefines::ETextureIndex type, BOOL baked_version_exists, U32 index = 0);
+ virtual void setBakedReady(LLAvatarAppearanceDefines::ETextureIndex type, bool baked_version_exists, U32 index = 0);
//--------------------------------------------------------------------
// Texture accessors
@@ -774,8 +783,8 @@ public:
// Static texture/mesh/baked dictionary
//--------------------------------------------------------------------
public:
- static BOOL isIndexLocalTexture(LLAvatarAppearanceDefines::ETextureIndex i);
- static BOOL isIndexBakedTexture(LLAvatarAppearanceDefines::ETextureIndex i);
+ static bool isIndexLocalTexture(LLAvatarAppearanceDefines::ETextureIndex i);
+ static bool isIndexBakedTexture(LLAvatarAppearanceDefines::ETextureIndex i);
//--------------------------------------------------------------------
// Messaging
@@ -783,8 +792,8 @@ public:
public:
void onFirstTEMessageReceived();
private:
- BOOL mFirstTEMessageReceived;
- BOOL mFirstAppearanceMessageReceived;
+ bool mFirstTEMessageReceived;
+ bool mFirstAppearanceMessageReceived;
/** Textures
** **
@@ -839,13 +848,13 @@ private:
virtual void dirtyMesh(S32 priority); // Dirty the avatar mesh, with priority
LLViewerJoint* getViewerJoint(S32 idx);
S32 mDirtyMesh; // 0 -- not dirty, 1 -- morphed, 2 -- LOD
- BOOL mMeshTexturesDirty;
+ bool mMeshTexturesDirty;
//--------------------------------------------------------------------
// Destroy invisible mesh
//--------------------------------------------------------------------
protected:
- BOOL mMeshValid;
+ bool mMeshValid;
LLFrameTimer mMeshInvisibleTime;
/** Meshes
@@ -871,31 +880,31 @@ public:
// Appearance morphing
//--------------------------------------------------------------------
public:
- BOOL getIsAppearanceAnimating() const { return mAppearanceAnimating; }
+ bool getIsAppearanceAnimating() const { return mAppearanceAnimating; }
// True if we are computing our appearance via local compositing
// instead of baked textures, as for example during wearable
// editing or when waiting for a subsequent server rebake.
- /*virtual*/ BOOL isUsingLocalAppearance() const { return mUseLocalAppearance; }
+ /*virtual*/ bool isUsingLocalAppearance() const { return mUseLocalAppearance; }
// True if we are currently in appearance editing mode. Often but
// not always the same as isUsingLocalAppearance().
- /*virtual*/ BOOL isEditingAppearance() const { return mIsEditingAppearance; }
+ /*virtual*/ bool isEditingAppearance() const { return mIsEditingAppearance; }
// FIXME review isUsingLocalAppearance uses, some should be isEditing instead.
private:
- BOOL mAppearanceAnimating;
+ bool mAppearanceAnimating;
LLFrameTimer mAppearanceMorphTimer;
F32 mLastAppearanceBlendTime;
- BOOL mIsEditingAppearance; // flag for if we're actively in appearance editing mode
- BOOL mUseLocalAppearance; // flag for if we're using a local composite
+ bool mIsEditingAppearance; // flag for if we're actively in appearance editing mode
+ bool mUseLocalAppearance; // flag for if we're using a local composite
//--------------------------------------------------------------------
// Visibility
//--------------------------------------------------------------------
public:
- BOOL isVisible() const;
+ bool isVisible() const;
virtual bool shouldRenderRigged() const;
void setVisibilityRank(U32 rank);
U32 getVisibilityRank() const { return mVisibilityRank; }
@@ -915,12 +924,12 @@ public:
public:
void clampAttachmentPositions();
virtual const LLViewerJointAttachment* attachObject(LLViewerObject *viewer_object);
- virtual BOOL detachObject(LLViewerObject *viewer_object);
+ virtual bool detachObject(LLViewerObject *viewer_object);
static bool getRiggedMeshID( LLViewerObject* pVO, LLUUID& mesh_id );
void cleanupAttachedMesh( LLViewerObject* pVO );
bool hasPendingAttachedMeshes();
static LLVOAvatar* findAvatarFromAttachment(LLViewerObject* obj);
- /*virtual*/ BOOL isWearingWearableType(LLWearableType::EType type ) const;
+ /*virtual*/ bool isWearingWearableType(LLWearableType::EType type ) const;
LLViewerObject * findAttachmentByID( const LLUUID & target_id ) const;
LLViewerJointAttachment* getTargetAttachmentPoint(LLViewerObject* viewer_object);
@@ -932,22 +941,28 @@ protected:
// Map of attachment points, by ID
//--------------------------------------------------------------------
public:
- S32 getAttachmentCount(); // Warning: order(N) not order(1) // currently used only by -self
+ S32 getAttachmentCount() const; // Warning: order(N) not order(1)
typedef std::map<S32, LLViewerJointAttachment*> attachment_map_t;
attachment_map_t mAttachmentPoints;
std::vector<LLPointer<LLViewerObject> > mPendingAttachment;
+ // List of attachments' ids with attach points from simulator.
+ // we need this info to know when all attachments are present.
+ std::map<LLUUID, S32> mSimAttachments;
+ S32 mLastCloudAttachmentCount;
+ LLFrameTimer mLastCloudAttachmentChangeTime;
+
//--------------------------------------------------------------------
// HUD functions
//--------------------------------------------------------------------
public:
- BOOL hasHUDAttachment() const;
+ bool hasHUDAttachment() const;
LLBBox getHUDBBox() const;
void resetHUDAttachments();
S32 getMaxAttachments() const;
- BOOL canAttachMoreObjects(U32 n=1) const;
+ bool canAttachMoreObjects(U32 n=1) const;
S32 getMaxAnimatedObjectAttachments() const;
- BOOL canAttachMoreAnimatedObjects(U32 n=1) const;
+ bool canAttachMoreAnimatedObjects(U32 n=1) const;
protected:
U32 getNumAttachments() const; // O(N), not O(1)
U32 getNumAnimatedObjectAttachments() const; // O(N), not O(1)
@@ -965,10 +980,10 @@ protected:
// Animations
//--------------------------------------------------------------------
public:
- BOOL isAnyAnimationSignaled(const LLUUID *anim_array, const S32 num_anims) const;
+ bool isAnyAnimationSignaled(const LLUUID *anim_array, const S32 num_anims) const;
void processAnimationStateChanges();
protected:
- BOOL processSingleAnimationStateChange(const LLUUID &anim_id, BOOL start);
+ bool processSingleAnimationStateChange(const LLUUID &anim_id, bool start);
void resetAnimations();
private:
LLTimer mAnimTimer;
@@ -992,8 +1007,8 @@ public:
public:
void addChat(const LLChat& chat);
void clearChat();
- void startTyping() { mTyping = TRUE; mTypingTimer.reset(); }
- void stopTyping() { mTyping = FALSE; }
+ void startTyping() { mTyping = true; mTypingTimer.reset(); }
+ void stopTyping() { mTyping = false; }
private:
bool mVisibleChat;
@@ -1009,7 +1024,7 @@ private:
// Flight
//--------------------------------------------------------------------
public:
- BOOL mInAir;
+ bool mInAir;
LLFrameTimer mTimeInAir;
/** Actions
@@ -1023,7 +1038,7 @@ public:
private:
F32 mSpeedAccum; // measures speed (for diagnostics mostly).
- BOOL mTurning; // controls hysteresis on avatar rotation
+ bool mTurning; // controls hysteresis on avatar rotation
F32 mSpeed; // misc. animation repeated state
//--------------------------------------------------------------------
@@ -1041,7 +1056,7 @@ protected:
// Material being stepped on
//--------------------------------------------------------------------
private:
- BOOL mStepOnLand;
+ bool mStepOnLand;
U8 mStepMaterial;
LLVector3 mStepObjectVelocity;
@@ -1055,7 +1070,7 @@ private:
**/
public:
- /*virtual*/ BOOL setParent(LLViewerObject* parent);
+ /*virtual*/ bool setParent(LLViewerObject* parent);
/*virtual*/ void addChild(LLViewerObject *childp);
/*virtual*/ void removeChild(LLViewerObject *childp);
@@ -1063,13 +1078,13 @@ public:
// Sitting
//--------------------------------------------------------------------
public:
- void sitDown(BOOL bSitting);
- BOOL isSitting(){return mIsSitting;}
+ void sitDown(bool bSitting);
+ bool isSitting(){return mIsSitting;}
void sitOnObject(LLViewerObject *sit_object);
void getOffObject();
private:
// set this property only with LLVOAvatar::sitDown method
- BOOL mIsSitting;
+ bool mIsSitting;
// position backup in case of missing data
LLVector3 mLastRootPos;
@@ -1098,7 +1113,7 @@ private:
bool mNameFriend;
bool mNameCloud;
F32 mNameAlpha;
- BOOL mRenderGroupTitles;
+ bool mRenderGroupTitles;
//--------------------------------------------------------------------
// Display the name (then optionally fade it out)
@@ -1109,7 +1124,7 @@ public:
private:
LLFrameTimer mTimeVisible;
std::deque<LLChat> mChats;
- BOOL mTyping;
+ bool mTyping;
LLFrameTimer mTypingTimer;
/** Name
@@ -1147,8 +1162,8 @@ public:
void setFootPlane(const LLVector4 &plane) { mFootPlane = plane; }
LLVector4 mFootPlane;
private:
- BOOL mWasOnGroundLeft;
- BOOL mWasOnGroundRight;
+ bool mWasOnGroundLeft;
+ bool mWasOnGroundRight;
/** Sounds
** **
@@ -1177,7 +1192,7 @@ public:
static F32 sGreyUpdateTime; // Last time stats were updated (to prevent multiple updates per frame)
protected:
S32 getUnbakedPixelAreaRank();
- BOOL mHasGrey;
+ bool mHasGrey;
private:
F32 mMinPixelArea;
F32 mMaxPixelArea;
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index f12fc3babc..808bf48b02 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -78,7 +78,7 @@
LLPointer<LLVOAvatarSelf> gAgentAvatarp = NULL;
-BOOL isAgentAvatarValid()
+bool isAgentAvatarValid()
{
return (gAgentAvatarp.notNull() && gAgentAvatarp->isValid());
}
@@ -172,7 +172,7 @@ LLVOAvatarSelf::LLVOAvatarSelf(const LLUUID& id,
mInitialMetric(true),
mMetricSequence(0)
{
- mMotionController.mIsSelf = TRUE;
+ mMotionController.mIsSelf = true;
LL_DEBUGS() << "Marking avatar as self " << id << LL_ENDL;
}
@@ -200,7 +200,7 @@ bool update_avatar_rez_metrics()
void LLVOAvatarSelf::initInstance()
{
- BOOL status = TRUE;
+ bool status = true;
// creates hud joint(mScreen) among other things
status &= loadAvatarSelf();
@@ -300,12 +300,12 @@ void LLVOAvatarSelf::markDead()
LLVOAvatar::markDead();
}
-/*virtual*/ BOOL LLVOAvatarSelf::loadAvatar()
+/*virtual*/ bool LLVOAvatarSelf::loadAvatar()
{
- BOOL success = LLVOAvatar::loadAvatar();
+ bool success = LLVOAvatar::loadAvatar();
// set all parameters stored directly in the avatar to have
- // the isSelfParam to be TRUE - this is used to prevent
+ // the isSelfParam to be true - this is used to prevent
// them from being animated or trigger accidental rebakes
// when we copy params from the wearable to the base avatar.
for (LLViewerVisualParam* param = (LLViewerVisualParam*) getFirstVisualParam();
@@ -314,7 +314,7 @@ void LLVOAvatarSelf::markDead()
{
if (param->getWearableType() != LLWearableType::WT_INVALID)
{
- param->setIsDummy(TRUE);
+ param->setIsDummy(true);
}
}
@@ -322,20 +322,20 @@ void LLVOAvatarSelf::markDead()
}
-BOOL LLVOAvatarSelf::loadAvatarSelf()
+bool LLVOAvatarSelf::loadAvatarSelf()
{
- BOOL success = TRUE;
+ bool success = true;
// avatar_skeleton.xml
if (!buildSkeletonSelf(sAvatarSkeletonInfo))
{
LL_WARNS() << "avatar file: buildSkeleton() failed" << LL_ENDL;
- return FALSE;
+ return false;
}
return success;
}
-BOOL LLVOAvatarSelf::buildSkeletonSelf(const LLAvatarSkeletonInfo *info)
+bool LLVOAvatarSelf::buildSkeletonSelf(const LLAvatarSkeletonInfo *info)
{
// add special-purpose "screen" joint
mScreenp = new LLViewerJoint("mScreen", NULL);
@@ -347,11 +347,11 @@ BOOL LLVOAvatarSelf::buildSkeletonSelf(const LLAvatarSkeletonInfo *info)
// SL-315
mScreenp->setWorldPosition(LLVector3::zero);
// need to update screen agressively when sidebar opens/closes, for example
- mScreenp->mUpdateXform = TRUE;
- return TRUE;
+ mScreenp->mUpdateXform = true;
+ return true;
}
-BOOL LLVOAvatarSelf::buildMenus()
+bool LLVOAvatarSelf::buildMenus()
{
//-------------------------------------------------------------------------
// build the attach and detach menus
@@ -652,7 +652,7 @@ BOOL LLVOAvatarSelf::buildMenus()
}
}
}
- return TRUE;
+ return true;
}
void LLVOAvatarSelf::cleanup()
@@ -691,7 +691,7 @@ bool LLVOAvatarSelf::updateCharacter(LLAgent &agent)
}
// virtual
-BOOL LLVOAvatarSelf::isValid() const
+bool LLVOAvatarSelf::isValid() const
{
return ((getRegion() != NULL) && !isDead());
}
@@ -727,39 +727,39 @@ LLJoint *LLVOAvatarSelf::getJoint(const std::string &name)
}
// virtual
-BOOL LLVOAvatarSelf::setVisualParamWeight(const LLVisualParam *which_param, F32 weight)
+bool LLVOAvatarSelf::setVisualParamWeight(const LLVisualParam *which_param, F32 weight)
{
if (!which_param)
{
- return FALSE;
+ return false;
}
LLViewerVisualParam *param = (LLViewerVisualParam*) LLCharacter::getVisualParam(which_param->getID());
return setParamWeight(param,weight);
}
// virtual
-BOOL LLVOAvatarSelf::setVisualParamWeight(const char* param_name, F32 weight)
+bool LLVOAvatarSelf::setVisualParamWeight(const char* param_name, F32 weight)
{
if (!param_name)
{
- return FALSE;
+ return false;
}
LLViewerVisualParam *param = (LLViewerVisualParam*) LLCharacter::getVisualParam(param_name);
return setParamWeight(param,weight);
}
// virtual
-BOOL LLVOAvatarSelf::setVisualParamWeight(S32 index, F32 weight)
+bool LLVOAvatarSelf::setVisualParamWeight(S32 index, F32 weight)
{
LLViewerVisualParam *param = (LLViewerVisualParam*) LLCharacter::getVisualParam(index);
return setParamWeight(param,weight);
}
-BOOL LLVOAvatarSelf::setParamWeight(const LLViewerVisualParam *param, F32 weight)
+bool LLVOAvatarSelf::setParamWeight(const LLViewerVisualParam *param, F32 weight)
{
if (!param)
{
- return FALSE;
+ return false;
}
if (param->getCrossWearable())
@@ -845,7 +845,7 @@ void LLVOAvatarSelf::stopMotionFromSource(const LLUUID& source_id)
LLViewerObject* object = gObjectList.findObject(source_id);
if (object)
{
- object->setFlagsWithoutUpdate(FLAGS_ANIM_SOURCE, FALSE);
+ object->setFlagsWithoutUpdate(FLAGS_ANIM_SOURCE, false);
}
}
@@ -874,7 +874,7 @@ void LLVOAvatarSelf::setLocalTextureTE(U8 te, LLViewerTexture* image, U32 index)
//virtual
void LLVOAvatarSelf::removeMissingBakedTextures()
{
- BOOL removed = FALSE;
+ bool removed = false;
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
{
const S32 te = mBakedTextureDatas[i].mTextureIndex;
@@ -889,7 +889,7 @@ void LLVOAvatarSelf::removeMissingBakedTextures()
if (imagep && imagep != tex)
{
setTEImage(te, imagep);
- removed = TRUE;
+ removed = true;
}
}
}
@@ -899,7 +899,7 @@ void LLVOAvatarSelf::removeMissingBakedTextures()
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
{
LLViewerTexLayerSet *layerset = getTexLayerSet(i);
- layerset->setUpdatesEnabled(TRUE);
+ layerset->setUpdatesEnabled(true);
invalidateComposite(layerset);
}
updateMeshTextures();
@@ -1024,7 +1024,7 @@ void LLVOAvatarSelf::idleUpdateTractorBeam()
if (mBeamTimer.getElapsedTimeF32() > 0.25f)
{
mBeam->setColor(LLColor4U(gAgent.getEffectColor()));
- mBeam->setNeedsSendToSim(TRUE);
+ mBeam->setNeedsSendToSim(true);
mBeamTimer.reset();
}
}
@@ -1037,7 +1037,7 @@ void LLVOAvatarSelf::idleUpdateTractorBeam()
void LLVOAvatarSelf::restoreMeshData()
{
//LL_INFOS() << "Restoring" << LL_ENDL;
- mMeshValid = TRUE;
+ mMeshValid = true;
updateJointLODs();
updateAttachmentVisibility(gAgentCamera.getCameraMode());
@@ -1059,24 +1059,24 @@ void LLVOAvatarSelf::updateAttachmentVisibility(U32 camera_mode)
LLViewerJointAttachment* attachment = iter->second;
if (attachment->getIsHUDAttachment())
{
- attachment->setAttachmentVisibility(TRUE);
+ attachment->setAttachmentVisibility(true);
}
else
{
switch (camera_mode)
{
case CAMERA_MODE_MOUSELOOK:
- if (LLVOAvatar::sVisibleInFirstPerson && attachment->getVisibleInFirstPerson())
+ if ((LLVOAvatar::sVisibleInFirstPerson && attachment->getVisibleInFirstPerson()) || gPipeline.mHeroProbeManager.isMirrorPass())
{
- attachment->setAttachmentVisibility(TRUE);
+ attachment->setAttachmentVisibility(true);
}
else
{
- attachment->setAttachmentVisibility(FALSE);
+ attachment->setAttachmentVisibility(false);
}
break;
default:
- attachment->setAttachmentVisibility(TRUE);
+ attachment->setAttachmentVisibility(true);
break;
}
}
@@ -1086,7 +1086,7 @@ void LLVOAvatarSelf::updateAttachmentVisibility(U32 camera_mode)
//-----------------------------------------------------------------------------
// updatedWearable( LLWearableType::EType type )
// forces an update to any baked textures relevant to type.
-// will force an upload of the resulting bake if the second parameter is TRUE
+// will force an upload of the resulting bake if the second parameter is true
//-----------------------------------------------------------------------------
void LLVOAvatarSelf::wearableUpdated(LLWearableType::EType type)
{
@@ -1122,7 +1122,7 @@ void LLVOAvatarSelf::wearableUpdated(LLWearableType::EType type)
//-----------------------------------------------------------------------------
// isWearingAttachment()
//-----------------------------------------------------------------------------
-BOOL LLVOAvatarSelf::isWearingAttachment(const LLUUID& inv_item_id) const
+bool LLVOAvatarSelf::isWearingAttachment(const LLUUID& inv_item_id) const
{
const LLUUID& base_inv_item_id = gInventory.getLinkedItemID(inv_item_id);
for (attachment_map_t::const_iterator iter = mAttachmentPoints.begin();
@@ -1132,10 +1132,10 @@ BOOL LLVOAvatarSelf::isWearingAttachment(const LLUUID& inv_item_id) const
const LLViewerJointAttachment* attachment = iter->second;
if (attachment->getAttachedObject(base_inv_item_id))
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
//-----------------------------------------------------------------------------
@@ -1212,7 +1212,7 @@ const LLViewerJointAttachment *LLVOAvatarSelf::attachObject(LLViewerObject *view
}
//virtual
-BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object)
+bool LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object)
{
const LLUUID attachment_id = viewer_object->getAttachmentItemID();
if ( LLVOAvatar::detachObject(viewer_object) )
@@ -1220,7 +1220,7 @@ BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object)
// the simulator should automatically handle permission revocation
stopMotionFromSource(attachment_id);
- LLFollowCamMgr::getInstance()->setCameraActive(viewer_object->getID(), FALSE);
+ LLFollowCamMgr::getInstance()->setCameraActive(viewer_object->getID(), false);
LLViewerObject::const_child_list_t& child_list = viewer_object->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
@@ -1232,7 +1232,7 @@ BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object)
// permissions revocation
stopMotionFromSource(child_objectp->getID());
- LLFollowCamMgr::getInstance()->setCameraActive(child_objectp->getID(), FALSE);
+ LLFollowCamMgr::getInstance()->setCameraActive(child_objectp->getID(), false);
}
// Make sure the inventory is in sync with the avatar.
@@ -1247,9 +1247,9 @@ BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object)
LLAppearanceMgr::instance().unregisterAttachment(attachment_id);
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool LLVOAvatarSelf::hasAttachmentsInTrash()
@@ -1274,7 +1274,7 @@ bool LLVOAvatarSelf::hasAttachmentsInTrash()
}
// static
-BOOL LLVOAvatarSelf::detachAttachmentIntoInventory(const LLUUID &item_id)
+bool LLVOAvatarSelf::detachAttachmentIntoInventory(const LLUUID &item_id)
{
LLInventoryItem* item = gInventory.getItem(item_id);
if (item)
@@ -1303,9 +1303,9 @@ BOOL LLVOAvatarSelf::detachAttachmentIntoInventory(const LLUUID &item_id)
LLAppearanceMgr::instance().removeCOFItemLinks(item_id);
}
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
U32 LLVOAvatarSelf::getNumWearables(LLAvatarAppearanceDefines::ETextureIndex i) const
@@ -1315,7 +1315,7 @@ U32 LLVOAvatarSelf::getNumWearables(LLAvatarAppearanceDefines::ETextureIndex i)
}
// virtual
-void LLVOAvatarSelf::localTextureLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src_raw, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata)
+void LLVOAvatarSelf::localTextureLoaded(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src_raw, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata)
{
const LLUUID& src_id = src_vi->getID();
@@ -1364,20 +1364,20 @@ void LLVOAvatarSelf::localTextureLoaded(BOOL success, LLViewerFetchedTexture *sr
}
// virtual
-BOOL LLVOAvatarSelf::getLocalTextureGL(ETextureIndex type, LLViewerTexture** tex_pp, U32 index) const
+bool LLVOAvatarSelf::getLocalTextureGL(ETextureIndex type, LLViewerTexture** tex_pp, U32 index) const
{
*tex_pp = NULL;
- if (!isIndexLocalTexture(type)) return FALSE;
- if (getLocalTextureID(type, index) == IMG_DEFAULT_AVATAR) return TRUE;
+ if (!isIndexLocalTexture(type)) return false;
+ if (getLocalTextureID(type, index) == IMG_DEFAULT_AVATAR) return true;
const LLLocalTextureObject *local_tex_obj = getLocalTextureObject(type, index);
if (!local_tex_obj)
{
- return FALSE;
+ return false;
}
*tex_pp = dynamic_cast<LLViewerTexture*> (local_tex_obj->getImage());
- return TRUE;
+ return true;
}
LLViewerFetchedTexture* LLVOAvatarSelf::getLocalTextureGL(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const
@@ -1417,7 +1417,7 @@ const LLUUID& LLVOAvatarSelf::getLocalTextureID(ETextureIndex type, U32 index) c
// Returns true if at least the lowest quality discard level exists for every texture
// in the layerset.
//-----------------------------------------------------------------------------
-BOOL LLVOAvatarSelf::isLocalTextureDataAvailable(const LLViewerTexLayerSet* layerset) const
+bool LLVOAvatarSelf::isLocalTextureDataAvailable(const LLViewerTexLayerSet* layerset) const
{
/* if (layerset == mBakedTextureDatas[BAKED_HEAD].mTexLayerSet)
return getLocalDiscardLevel(TEX_HEAD_BODYPAINT) >= 0; */
@@ -1428,7 +1428,7 @@ BOOL LLVOAvatarSelf::isLocalTextureDataAvailable(const LLViewerTexLayerSet* laye
const EBakedTextureIndex baked_index = baked_iter->first;
if (layerset == mBakedTextureDatas[baked_index].mTexLayerSet)
{
- BOOL ret = true;
+ bool ret = true;
const LLAvatarAppearanceDictionary::BakedEntry *baked_dict = baked_iter->second;
for (texture_vec_t::const_iterator local_tex_iter = baked_dict->mLocalTextures.begin();
local_tex_iter != baked_dict->mLocalTextures.end();
@@ -1439,7 +1439,7 @@ BOOL LLVOAvatarSelf::isLocalTextureDataAvailable(const LLViewerTexLayerSet* laye
const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type);
for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++)
{
- BOOL tex_avail = (getLocalDiscardLevel(tex_index, wearable_index) >= 0);
+ bool tex_avail = (getLocalDiscardLevel(tex_index, wearable_index) >= 0);
ret &= tex_avail;
}
}
@@ -1447,7 +1447,7 @@ BOOL LLVOAvatarSelf::isLocalTextureDataAvailable(const LLViewerTexLayerSet* laye
}
}
llassert(0);
- return FALSE;
+ return false;
}
//-----------------------------------------------------------------------------
@@ -1456,7 +1456,7 @@ BOOL LLVOAvatarSelf::isLocalTextureDataAvailable(const LLViewerTexLayerSet* laye
// Returns true if the highest quality discard level exists for every texture
// in the layerset.
//-----------------------------------------------------------------------------
-BOOL LLVOAvatarSelf::isLocalTextureDataFinal(const LLViewerTexLayerSet* layerset) const
+bool LLVOAvatarSelf::isLocalTextureDataFinal(const LLViewerTexLayerSet* layerset) const
{
const U32 desired_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel");
// const U32 desired_tex_discard_level = 0; // hack to not bake textures on lower discard levels.
@@ -1479,19 +1479,19 @@ BOOL LLVOAvatarSelf::isLocalTextureDataFinal(const LLViewerTexLayerSet* layerset
if ((local_discard_level > (S32)(desired_tex_discard_level)) ||
(local_discard_level < 0 ))
{
- return FALSE;
+ return false;
}
}
}
- return TRUE;
+ return true;
}
}
llassert(0);
- return FALSE;
+ return false;
}
-BOOL LLVOAvatarSelf::isAllLocalTextureDataFinal() const
+bool LLVOAvatarSelf::isAllLocalTextureDataFinal() const
{
const U32 desired_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel");
// const U32 desired_tex_discard_level = 0; // hack to not bake textures on lower discard levels
@@ -1512,18 +1512,18 @@ BOOL LLVOAvatarSelf::isAllLocalTextureDataFinal() const
if ((local_discard_level > (S32)(desired_tex_discard_level)) ||
(local_discard_level < 0 ))
{
- return FALSE;
+ return false;
}
}
}
}
- return TRUE;
+ return true;
}
-BOOL LLVOAvatarSelf::isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const
+bool LLVOAvatarSelf::isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const
{
LLUUID id;
- BOOL isDefined = TRUE;
+ bool isDefined = true;
if (isIndexLocalTexture(type))
{
const LLWearableType::EType wearable_type = sAvatarDictionary->getTEWearableType(type);
@@ -1553,7 +1553,7 @@ BOOL LLVOAvatarSelf::isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex t
}
//virtual
-BOOL LLVOAvatarSelf::isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const
+bool LLVOAvatarSelf::isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const
{
if (isIndexBakedTexture(type))
{
@@ -1566,7 +1566,7 @@ BOOL LLVOAvatarSelf::isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex t
}
//virtual
-BOOL LLVOAvatarSelf::isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerWearable *wearable) const
+bool LLVOAvatarSelf::isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerWearable *wearable) const
{
if (isIndexBakedTexture(type))
{
@@ -1581,7 +1581,7 @@ BOOL LLVOAvatarSelf::isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex t
else
{
LL_WARNS() << "Wearable not found" << LL_ENDL;
- return FALSE;
+ return false;
}
}
@@ -1648,7 +1648,7 @@ void LLVOAvatarSelf::setupComposites()
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
{
ETextureIndex tex_index = mBakedTextureDatas[i].mTextureIndex;
- BOOL layer_baked = isTextureDefined(tex_index, gAgentWearables.getWearableCount(tex_index));
+ bool layer_baked = isTextureDefined(tex_index, gAgentWearables.getWearableCount(tex_index));
LLViewerTexLayerSet *layerset = getTexLayerSet(i);
if (layerset)
{
@@ -1673,7 +1673,7 @@ void LLVOAvatarSelf::updateComposites()
// virtual
S32 LLVOAvatarSelf::getLocalDiscardLevel(ETextureIndex type, U32 wearable_index) const
{
- if (!isIndexLocalTexture(type)) return FALSE;
+ if (!isIndexLocalTexture(type)) return false;
const LLLocalTextureObject *local_tex_obj = getLocalTextureObject(type, wearable_index);
if (local_tex_obj)
@@ -1724,11 +1724,11 @@ void LLVOAvatarSelf::getLocalTextureByteCount(S32* gl_bytes) const
}
// virtual
-void LLVOAvatarSelf::setLocalTexture(ETextureIndex type, LLViewerTexture* src_tex, BOOL baked_version_ready, U32 index)
+void LLVOAvatarSelf::setLocalTexture(ETextureIndex type, LLViewerTexture* src_tex, bool baked_version_ready, U32 index)
{
if (!isIndexLocalTexture(type)) return;
- LLViewerFetchedTexture* tex = LLViewerTextureManager::staticCastToFetchedTexture(src_tex, TRUE) ;
+ LLViewerFetchedTexture* tex = LLViewerTextureManager::staticCastToFetchedTexture(src_tex, true) ;
if(!tex)
{
return ;
@@ -1789,7 +1789,7 @@ void LLVOAvatarSelf::setLocalTexture(ETextureIndex type, LLViewerTexture* src_te
}
else
{
- tex->setLoadedCallback(onLocalTextureLoaded, desired_discard, TRUE, FALSE, new LLAvatarTexData(getID(), type), NULL);
+ tex->setLoadedCallback(onLocalTextureLoaded, desired_discard, true, false, new LLAvatarTexData(getID(), type), NULL);
}
}
tex->setMinDiscardLevel(desired_discard);
@@ -1801,7 +1801,7 @@ void LLVOAvatarSelf::setLocalTexture(ETextureIndex type, LLViewerTexture* src_te
}
//virtual
-void LLVOAvatarSelf::setBakedReady(LLAvatarAppearanceDefines::ETextureIndex type, BOOL baked_version_exists, U32 index)
+void LLVOAvatarSelf::setBakedReady(LLAvatarAppearanceDefines::ETextureIndex type, bool baked_version_exists, U32 index)
{
if (!isIndexLocalTexture(type)) return;
LLLocalTextureObject *local_tex_obj = getLocalTextureObject(type,index);
@@ -1878,7 +1878,7 @@ void LLVOAvatarSelf::dumpLocalTextures() const
// onLocalTextureLoaded()
//-----------------------------------------------------------------------------
-void LLVOAvatarSelf::onLocalTextureLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src_raw, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata)
+void LLVOAvatarSelf::onLocalTextureLoaded(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src_raw, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata)
{
LLAvatarTexData *data = (LLAvatarTexData *)userdata;
LLVOAvatarSelf *self = (LLVOAvatarSelf *)gObjectList.findObject(data->mAvatarID);
@@ -1898,7 +1898,7 @@ void LLVOAvatarSelf::onLocalTextureLoaded(BOOL success, LLViewerFetchedTexture *
{
if (isIndexLocalTexture((ETextureIndex)te))
{
- setLocalTexture((ETextureIndex)te, imagep, FALSE ,index);
+ setLocalTexture((ETextureIndex)te, imagep, false ,index);
}
else
{
@@ -2017,7 +2017,7 @@ bool LLVOAvatarSelf::getIsCloud() const
}
/*static*/
-void LLVOAvatarSelf::debugOnTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata)
+void LLVOAvatarSelf::debugOnTimingLocalTexLoaded(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata)
{
if (gAgentAvatarp.notNull())
{
@@ -2025,7 +2025,7 @@ void LLVOAvatarSelf::debugOnTimingLocalTexLoaded(BOOL success, LLViewerFetchedTe
}
}
-void LLVOAvatarSelf::debugTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata)
+void LLVOAvatarSelf::debugTimingLocalTexLoaded(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata)
{
LLAvatarTexData *data = (LLAvatarTexData *)userdata;
if (!data)
@@ -2050,7 +2050,7 @@ void LLVOAvatarSelf::debugTimingLocalTexLoaded(BOOL success, LLViewerFetchedText
}
}
-void LLVOAvatarSelf::debugBakedTextureUpload(EBakedTextureIndex index, BOOL finished)
+void LLVOAvatarSelf::debugBakedTextureUpload(EBakedTextureIndex index, bool finished)
{
U32 done = 0;
if (finished)
@@ -2189,7 +2189,7 @@ const std::string LLVOAvatarSelf::debugDumpAllLocalTextureDataInfo() const
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
{
const LLAvatarAppearanceDictionary::BakedEntry *baked_dict = sAvatarDictionary->getBakedTexture((EBakedTextureIndex)i);
- BOOL is_texture_final = TRUE;
+ bool is_texture_final = true;
for (texture_vec_t::const_iterator local_tex_iter = baked_dict->mLocalTextures.begin();
local_tex_iter != baked_dict->mLocalTextures.end();
++local_tex_iter)
@@ -2230,16 +2230,21 @@ void LLVOAvatarSelf::appearanceChangeMetricsCoro(std::string url)
// Status of our own rezzing.
msg["rez_status"] = LLVOAvatar::rezStatusToString(getRezzedStatus());
+ msg["first_decloud_time"] = getFirstDecloudTime();
// Status of all nearby avs including ourself.
msg["nearby"] = LLSD::emptyArray();
std::vector<S32> rez_counts;
- LLVOAvatar::getNearbyRezzedStats(rez_counts);
+ F32 avg_time;
+ S32 total_cloud_avatars;
+ LLVOAvatar::getNearbyRezzedStats(rez_counts, avg_time, total_cloud_avatars);
for (S32 rez_stat = 0; rez_stat < rez_counts.size(); ++rez_stat)
{
std::string rez_status_name = LLVOAvatar::rezStatusToString(rez_stat);
msg["nearby"][rez_status_name] = rez_counts[rez_stat];
}
+ msg["nearby"]["avg_decloud_time"] = avg_time;
+ msg["nearby"]["cloud_total"] = total_cloud_avatars;
// std::vector<std::string> bucket_fields("timer_name","is_self","grid_x","grid_y","is_using_server_bake");
std::vector<std::string> by_fields;
@@ -2385,22 +2390,22 @@ const LLUUID& LLVOAvatarSelf::grabBakedTexture(EBakedTextureIndex baked_index) c
return LLUUID::null;
}
-BOOL LLVOAvatarSelf::canGrabBakedTexture(EBakedTextureIndex baked_index) const
+bool LLVOAvatarSelf::canGrabBakedTexture(EBakedTextureIndex baked_index) const
{
ETextureIndex tex_index = sAvatarDictionary->bakedToLocalTextureIndex(baked_index);
if (tex_index == TEX_NUM_INDICES)
{
- return FALSE;
+ return false;
}
// Check if the texture hasn't been baked yet.
if (!isTextureDefined(tex_index, 0))
{
LL_DEBUGS() << "getTEImage( " << (U32) tex_index << " )->getID() == IMG_DEFAULT_AVATAR" << LL_ENDL;
- return FALSE;
+ return false;
}
if (gAgent.isGodlikeWithoutAdminMenuFakery())
- return TRUE;
+ return true;
// Check permissions of textures that show up in the
// baked texture. We don't want people copying people's
@@ -2435,7 +2440,7 @@ BOOL LLVOAvatarSelf::canGrabBakedTexture(EBakedTextureIndex baked_index) const
LLInventoryModel::INCLUDE_TRASH,
asset_id_matches);
- BOOL can_grab = FALSE;
+ bool can_grab = false;
LL_DEBUGS() << "item count for asset " << texture_id << ": " << items.size() << LL_ENDL;
if (items.size())
{
@@ -2445,22 +2450,22 @@ BOOL LLVOAvatarSelf::canGrabBakedTexture(EBakedTextureIndex baked_index) const
LLViewerInventoryItem* itemp = items[i];
if (itemp->getIsFullPerm())
{
- can_grab = TRUE;
+ can_grab = true;
break;
}
}
}
- if (!can_grab) return FALSE;
+ if (!can_grab) return false;
}
}
}
}
- return TRUE;
+ return true;
}
void LLVOAvatarSelf::addLocalTextureStats( ETextureIndex type, LLViewerFetchedTexture* imagep,
- F32 texel_area_ratio, BOOL render_avatar, BOOL covered_by_baked)
+ F32 texel_area_ratio, bool render_avatar, bool covered_by_baked)
{
if (!isIndexLocalTexture(type)) return;
@@ -2485,14 +2490,14 @@ void LLVOAvatarSelf::addLocalTextureStats( ETextureIndex type, LLViewerFetchedTe
imagep->forceUpdateBindStats() ;
if (imagep->getDiscardLevel() < 0)
{
- mHasGrey = TRUE; // for statistics gathering
+ mHasGrey = true; // for statistics gathering
}
}
}
else
{
// texture asset is missing
- mHasGrey = TRUE; // for statistics gathering
+ mHasGrey = true; // for statistics gathering
}
}
}
@@ -2614,7 +2619,7 @@ void LLVOAvatarSelf::forceBakeAllTextures(bool slam_for_debug)
{
if (slam_for_debug)
{
- layer_set->setUpdatesEnabled(TRUE);
+ layer_set->setUpdatesEnabled(true);
}
invalidateComposite(layer_set);
@@ -2819,18 +2824,18 @@ void LLVOAvatarSelf::setHoverOffset(const LLVector3& hover_offset, bool send_upd
//------------------------------------------------------------------------
// needsRenderBeam()
//------------------------------------------------------------------------
-BOOL LLVOAvatarSelf::needsRenderBeam()
+bool LLVOAvatarSelf::needsRenderBeam()
{
LLTool *tool = LLToolMgr::getInstance()->getCurrentTool();
- BOOL is_touching_or_grabbing = (tool == LLToolGrab::getInstance() && LLToolGrab::getInstance()->isEditing());
+ bool is_touching_or_grabbing = (tool == LLToolGrab::getInstance() && LLToolGrab::getInstance()->isEditing());
LLViewerObject* objp = LLToolGrab::getInstance()->getEditingObject();
if (objp // might need to be "!objp ||" instead of "objp &&".
&& (objp->isAttachment() || objp->isAvatar()))
{
// don't render grab tool's selection beam on hud objects,
// attachments or avatars
- is_touching_or_grabbing = FALSE;
+ is_touching_or_grabbing = false;
}
return is_touching_or_grabbing || (getAttachmentState() & AGENT_STATE_EDITING && LLSelectMgr::getInstance()->shouldShowSelection());
}
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index 6384e2b844..c7b61edd1c 100644
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -59,10 +59,10 @@ public:
virtual void initInstance(); // Called after construction to initialize the class.
void cleanup();
protected:
- /*virtual*/ BOOL loadAvatar();
- BOOL loadAvatarSelf();
- BOOL buildSkeletonSelf(const LLAvatarSkeletonInfo *info);
- BOOL buildMenus();
+ /*virtual*/ bool loadAvatar();
+ bool loadAvatarSelf();
+ bool buildSkeletonSelf(const LLAvatarSkeletonInfo *info);
+ bool buildMenus();
/** Initialization
** **
@@ -92,16 +92,16 @@ public:
/*virtual*/ void requestStopMotion(LLMotion* motion);
/*virtual*/ LLJoint* getJoint(const std::string &name);
- /*virtual*/ BOOL setVisualParamWeight(const LLVisualParam *which_param, F32 weight);
- /*virtual*/ BOOL setVisualParamWeight(const char* param_name, F32 weight);
- /*virtual*/ BOOL setVisualParamWeight(S32 index, F32 weight);
+ /*virtual*/ bool setVisualParamWeight(const LLVisualParam *which_param, F32 weight);
+ /*virtual*/ bool setVisualParamWeight(const char* param_name, F32 weight);
+ /*virtual*/ bool setVisualParamWeight(S32 index, F32 weight);
/*virtual*/ void updateVisualParams();
void writeWearablesToAvatar();
/*virtual*/ void idleUpdateAppearanceAnimation();
private:
// helper function. Passed in param is assumed to be in avatar's parameter list.
- BOOL setParamWeight(const LLViewerVisualParam *param, F32 weight);
+ bool setParamWeight(const LLViewerVisualParam *param, F32 weight);
/********************************************************************************
** **
@@ -110,7 +110,7 @@ private:
public:
/*virtual*/ bool isSelf() const { return true; }
- /*virtual*/ BOOL isValid() const;
+ /*virtual*/ bool isValid() const;
//--------------------------------------------------------------------
// Updates
@@ -149,7 +149,7 @@ private:
// Render beam
//--------------------------------------------------------------------
protected:
- BOOL needsRenderBeam();
+ bool needsRenderBeam();
private:
LLPointer<LLHUDEffectSpiral> mBeam;
LLFrameTimer mBeamTimer;
@@ -177,32 +177,32 @@ public:
public:
S32 getLocalDiscardLevel(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const;
bool areTexturesCurrent() const;
- BOOL isLocalTextureDataAvailable(const LLViewerTexLayerSet* layerset) const;
- BOOL isLocalTextureDataFinal(const LLViewerTexLayerSet* layerset) const;
+ bool isLocalTextureDataAvailable(const LLViewerTexLayerSet* layerset) const;
+ bool isLocalTextureDataFinal(const LLViewerTexLayerSet* layerset) const;
// If you want to check all textures of a given type, pass gAgentWearables.getWearableCount() for index
- /*virtual*/ BOOL isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const;
- /*virtual*/ BOOL isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, U32 index = 0) const;
- /*virtual*/ BOOL isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerWearable *wearable) const;
+ /*virtual*/ bool isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const;
+ /*virtual*/ bool isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, U32 index = 0) const;
+ /*virtual*/ bool isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerWearable *wearable) const;
//--------------------------------------------------------------------
// Local Textures
//--------------------------------------------------------------------
public:
- BOOL getLocalTextureGL(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerTexture** image_gl_pp, U32 index) const;
+ bool getLocalTextureGL(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerTexture** image_gl_pp, U32 index) const;
LLViewerFetchedTexture* getLocalTextureGL(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const;
const LLUUID& getLocalTextureID(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const;
void setLocalTextureTE(U8 te, LLViewerTexture* image, U32 index);
- /*virtual*/ void setLocalTexture(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerTexture* tex, BOOL baked_version_exits, U32 index);
+ /*virtual*/ void setLocalTexture(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerTexture* tex, bool baked_version_exits, U32 index);
protected:
- /*virtual*/ void setBakedReady(LLAvatarAppearanceDefines::ETextureIndex type, BOOL baked_version_exists, U32 index);
- void localTextureLoaded(BOOL succcess, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
+ /*virtual*/ void setBakedReady(LLAvatarAppearanceDefines::ETextureIndex type, bool baked_version_exists, U32 index);
+ void localTextureLoaded(bool succcess, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata);
void getLocalTextureByteCount(S32* gl_byte_count) const;
- /*virtual*/ void addLocalTextureStats(LLAvatarAppearanceDefines::ETextureIndex i, LLViewerFetchedTexture* imagep, F32 texel_area_ratio, BOOL rendered, BOOL covered_by_baked);
+ /*virtual*/ void addLocalTextureStats(LLAvatarAppearanceDefines::ETextureIndex i, LLViewerFetchedTexture* imagep, F32 texel_area_ratio, bool rendered, bool covered_by_baked);
LLLocalTextureObject* getLocalTextureObject(LLAvatarAppearanceDefines::ETextureIndex i, U32 index) const;
private:
- static void onLocalTextureLoaded(BOOL succcess, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
+ static void onLocalTextureLoaded(bool succcess, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata);
/*virtual*/ void setImage(const U8 te, LLViewerTexture *imagep, const U32 index);
/*virtual*/ LLViewerTexture* getImage(const U8 te, const U32 index) const;
@@ -240,7 +240,7 @@ public:
void updateComposites();
const LLUUID& grabBakedTexture(LLAvatarAppearanceDefines::EBakedTextureIndex baked_index) const;
- BOOL canGrabBakedTexture(LLAvatarAppearanceDefines::EBakedTextureIndex baked_index) const;
+ bool canGrabBakedTexture(LLAvatarAppearanceDefines::EBakedTextureIndex baked_index) const;
//--------------------------------------------------------------------
@@ -282,12 +282,12 @@ protected:
//--------------------------------------------------------------------
public:
void updateAttachmentVisibility(U32 camera_mode);
- BOOL isWearingAttachment(const LLUUID& inv_item_id) const;
+ bool isWearingAttachment(const LLUUID& inv_item_id) const;
LLViewerObject* getWornAttachment(const LLUUID& inv_item_id);
bool getAttachedPointName(const LLUUID& inv_item_id, std::string& name) const;
/*virtual*/ const LLViewerJointAttachment *attachObject(LLViewerObject *viewer_object);
- /*virtual*/ BOOL detachObject(LLViewerObject *viewer_object);
- static BOOL detachAttachmentIntoInventory(const LLUUID& item_id);
+ /*virtual*/ bool detachObject(LLViewerObject *viewer_object);
+ static bool detachAttachmentIntoInventory(const LLUUID& item_id);
bool hasAttachmentsInTrash();
@@ -371,10 +371,10 @@ public:
void outputRezDiagnostics() const;
void outputRezTiming(const std::string& msg) const;
void reportAvatarRezTime() const;
- void debugBakedTextureUpload(LLAvatarAppearanceDefines::EBakedTextureIndex index, BOOL finished);
- static void debugOnTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
+ void debugBakedTextureUpload(LLAvatarAppearanceDefines::EBakedTextureIndex index, bool finished);
+ static void debugOnTimingLocalTexLoaded(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata);
- BOOL isAllLocalTextureDataFinal() const;
+ bool isAllLocalTextureDataFinal() const;
const LLViewerTexLayerSet* debugGetLayerSet(LLAvatarAppearanceDefines::EBakedTextureIndex index) const { return (LLViewerTexLayerSet*)(mBakedTextureDatas[index].mTexLayerSet); }
const std::string verboseDebugDumpLocalTextureDataInfo(const LLViewerTexLayerSet* layerset) const; // Lists out state of this particular baked texture layer
@@ -388,7 +388,7 @@ private:
F32 mDebugTimeAvatarVisible;
F32 mDebugTextureLoadTimes[LLAvatarAppearanceDefines::TEX_NUM_INDICES][MAX_DISCARD_LEVEL+1]; // load time for each texture at each discard level
F32 mDebugBakedTextureTimes[LLAvatarAppearanceDefines::BAKED_NUM_INDICES][2]; // time to start upload and finish upload of each baked texture
- void debugTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
+ void debugTimingLocalTexLoaded(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata);
void appearanceChangeMetricsCoro(std::string url);
bool mInitialMetric;
@@ -401,7 +401,7 @@ private:
extern LLPointer<LLVOAvatarSelf> gAgentAvatarp;
-BOOL isAgentAvatarValid();
+bool isAgentAvatarValid();
void selfStartPhase(const std::string& phase_name);
void selfStopPhase(const std::string& phase_name, bool err_check = true);
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index dd5b9f9fd5..2b07d1ab2b 100644
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -33,28 +33,32 @@
#include "llviewerregion.h"
#include "llagentcamera.h"
#include "llsdserialize.h"
-
+#include "llworld.h" // For LLWorld::getInstance()
//static variables
U32 LLVOCacheEntry::sMinFrameRange = 0;
F32 LLVOCacheEntry::sNearRadius = 1.0f;
F32 LLVOCacheEntry::sRearFarRadius = 1.0f;
F32 LLVOCacheEntry::sFrontPixelThreshold = 1.0f;
F32 LLVOCacheEntry::sRearPixelThreshold = 1.0f;
-BOOL LLVOCachePartition::sNeedsOcclusionCheck = FALSE;
+bool LLVOCachePartition::sNeedsOcclusionCheck = false;
const S32 ENTRY_HEADER_SIZE = 6 * sizeof(S32);
const S32 MAX_ENTRY_BODY_SIZE = 10000;
-BOOL check_read(LLAPRFile* apr_file, void* src, S32 n_bytes)
+bool check_read(LLAPRFile* apr_file, void* src, S32 n_bytes)
{
return apr_file->read(src, n_bytes) == n_bytes ;
}
-BOOL check_write(LLAPRFile* apr_file, void* src, S32 n_bytes)
+bool check_write(LLAPRFile* apr_file, void* src, S32 n_bytes)
{
return apr_file->write(src, n_bytes) == n_bytes ;
}
+// Material Override Cache needs a version label, so we can upgrade this later.
+const std::string LLGLTFOverrideCacheEntry::VERSION_LABEL = {"GLTFCacheVer"};
+const int LLGLTFOverrideCacheEntry::VERSION = 1;
+
bool LLGLTFOverrideCacheEntry::fromLLSD(const LLSD& data)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
@@ -161,7 +165,7 @@ LLVOCacheEntry::LLVOCacheEntry(U32 local_id, U32 crc, LLDataPackerBinaryBuffer &
mCRCChangeCount(0),
mState(INACTIVE),
mSceneContrib(0.f),
- mValid(TRUE),
+ mValid(true),
mParentID(0),
mBSphereRadius(-1.0f)
{
@@ -181,7 +185,7 @@ LLVOCacheEntry::LLVOCacheEntry()
mBuffer(NULL),
mState(INACTIVE),
mSceneContrib(0.f),
- mValid(TRUE),
+ mValid(true),
mParentID(0),
mBSphereRadius(-1.0f)
{
@@ -194,12 +198,12 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file)
mUpdateFlags(-1),
mState(INACTIVE),
mSceneContrib(0.f),
- mValid(FALSE),
+ mValid(false),
mParentID(0),
mBSphereRadius(-1.0f)
{
S32 size = -1;
- BOOL success;
+ bool success;
static U8 data_buffer[ENTRY_HEADER_SIZE];
mDP.assignBuffer(mBuffer, 0);
@@ -221,7 +225,7 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file)
// We won't bother seeking, because the rest of this file
// is likely bogus, and will be tossed anyway.
LL_WARNS() << "Bogus cache entry, size " << size << ", aborting!" << LL_ENDL;
- success = FALSE;
+ success = false;
}
}
if(success && size > 0)
@@ -235,6 +239,8 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file)
}
else
{
+ // Improve logging around vocache
+ LL_WARNS() << "Error loading cache entry for " << mLocalID << ", size " << size << " aborting!" << LL_ENDL;
delete[] mBuffer ;
mBuffer = NULL ;
}
@@ -1009,7 +1015,7 @@ S32 LLVOCachePartition::cull(LLCamera &camera, bool do_occlusion)
}
if(LLViewerOctreeEntryData::getCurrentFrame() % seed != mIdleHash)
{
- mFrontCull = FALSE;
+ mFrontCull = false;
//process back objects selection
selectBackObjects(camera, LLVOCacheEntry::getSquaredPixelThreshold(mFrontCull),
@@ -1026,7 +1032,7 @@ S32 LLVOCachePartition::cull(LLCamera &camera, bool do_occlusion)
LLVector3 region_agent = mRegionp->getOriginAgent();
camera.calcRegionFrustumPlanes(region_agent, gAgentCamera.mDrawDistance);
- mFrontCull = TRUE;
+ mFrontCull = true;
LLVOCacheOctreeCull culler(&camera, mRegionp, region_agent, do_occlusion && use_object_cache_occlusion,
LLVOCacheEntry::getSquaredPixelThreshold(mFrontCull), this);
culler.traverse(mOctree);
@@ -1039,10 +1045,10 @@ S32 LLVOCachePartition::cull(LLCamera &camera, bool do_occlusion)
}
#endif // LL_TEST
-void LLVOCachePartition::setCullHistory(BOOL has_new_object)
+void LLVOCachePartition::setCullHistory(bool has_new_object)
{
mCullHistory <<= 1;
- mCullHistory |= has_new_object;
+ mCullHistory |= static_cast<U32>(has_new_object);
}
void LLVOCachePartition::addOccluders(LLViewerOctreeGroup* gp)
@@ -1081,7 +1087,7 @@ void LLVOCachePartition::processOccluders(LLCamera* camera)
//safe to clear mOccludedGroups here because only the world camera accesses it.
mOccludedGroups.clear();
- sNeedsOcclusionCheck = FALSE;
+ sNeedsOcclusionCheck = false;
}
void LLVOCachePartition::resetOccluders()
@@ -1097,7 +1103,7 @@ void LLVOCachePartition::resetOccluders()
group->clearOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION);
}
mOccludedGroups.clear();
- sNeedsOcclusionCheck = FALSE;
+ sNeedsOcclusionCheck = false;
}
void LLVOCachePartition::removeOccluder(LLVOCacheGroup* group)
@@ -1261,6 +1267,17 @@ void LLVOCache::removeEntry(HeaderEntryInfo* entry)
{
return;
}
+ // Bit more tracking of cache creation/destruction.
+ std::string filename;
+ getObjectCacheFilename(entry->mHandle, filename);
+ LL_INFOS() << "Removing entry for region with filename" << filename << LL_ENDL;
+
+ // make sure corresponding LLViewerRegion also clears its in-memory cache
+ LLViewerRegion* regionp = LLWorld::instance().getRegionFromHandle(entry->mHandle);
+ if (regionp)
+ {
+ regionp->clearVOCacheFromMemory();
+ }
header_entry_queue_t::iterator iter = mHeaderEntryQueue.find(entry);
if(iter != mHeaderEntryQueue.end())
@@ -1330,7 +1347,15 @@ void LLVOCache::removeFromCache(HeaderEntryInfo* entry)
std::string filename;
getObjectCacheFilename(entry->mHandle, filename);
+ LL_WARNS("GLTF", "VOCache") << "Removing object cache for handle " << entry->mHandle << "Filename: " << filename << LL_ENDL;
LLAPRFile::remove(filename, mLocalAPRFilePoolp);
+
+ // Note: `removeFromCache` should take responsibility for cleaning up all cache artefacts specfic to the handle/entry.
+ // as such this now includes the generic extras
+ filename = getObjectCacheExtrasFilename(entry->mHandle);
+ LL_WARNS("GLTF", "VOCache") << "Removing generic extras for handle " << entry->mHandle << "Filename: " << filename << LL_ENDL;
+ LLFile::remove(filename);
+
entry->mTime = INVALID_TIME ;
updateEntry(entry) ; //update the head file.
}
@@ -1344,7 +1369,7 @@ void LLVOCache::readCacheHeader()
}
//clear stale info.
- clearCacheInMemory();
+ clearCacheInMemory();
bool success = true ;
if (LLAPRFile::isExist(mHeaderFileName, mLocalAPRFilePoolp))
@@ -1465,12 +1490,12 @@ void LLVOCache::writeCacheHeader()
if(!success)
{
clearCacheInMemory() ;
- mReadOnly = TRUE ; //disable the cache.
+ mReadOnly = true ; //disable the cache.
}
return ;
}
-BOOL LLVOCache::updateEntry(const HeaderEntryInfo* entry)
+bool LLVOCache::updateEntry(const HeaderEntryInfo* entry)
{
LLAPRFile apr_file(mHeaderFileName, APR_WRITE|APR_BINARY, mLocalAPRFilePoolp);
apr_file.seek(APR_SET, entry->mIndex * sizeof(HeaderEntryInfo) + sizeof(HeaderMetaInfo)) ;
@@ -1478,12 +1503,14 @@ BOOL LLVOCache::updateEntry(const HeaderEntryInfo* entry)
return check_write(&apr_file, (void*)entry, sizeof(HeaderEntryInfo)) ;
}
-void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_entry_map_t& cache_entry_map)
+// we now return bool to trigger dirty cache
+// this in turn forces a rewrite after a partial read due to corruption.
+bool LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_entry_map_t& cache_entry_map)
{
if(!mEnabled)
{
LL_WARNS() << "Not reading cache for handle " << handle << "): Cache is currently disabled." << LL_ENDL;
- return ;
+ return true; // no problem we're just read only
}
llassert_always(mInitialized);
@@ -1491,12 +1518,13 @@ void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca
if(iter == mHandleEntryMap.end()) //no cache
{
LL_WARNS() << "No handle map entry for " << handle << LL_ENDL;
- return ;
+ return false; // arguably no a problem, but we'll mark this as dirty anyway.
}
bool success = true ;
+ S32 num_entries = 0 ; // lifted out of inner loop.
+ std::string filename; // lifted out of loop
{
- std::string filename;
LLUUID cache_id;
getObjectCacheFilename(handle, filename);
LLAPRFile apr_file(filename, APR_READ|APR_BINARY, mLocalAPRFilePoolp);
@@ -1513,7 +1541,6 @@ void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca
if(success)
{
- S32 num_entries; // if removal was enabled during write num_entries might be wrong
success = check_read(&apr_file, &num_entries, sizeof(S32)) ;
if(success)
@@ -1542,11 +1569,17 @@ void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca
}
}
- return ;
+ LL_DEBUGS("GLTF", "VOCache") << "Read " << cache_entry_map.size() << " entries from object cache " << filename << ", expected " << num_entries << ", success=" << (success?"True":"False") << LL_ENDL;
+ return success;
}
-void LLVOCache::readGenericExtrasFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map)
+// We now pass in the cache entry map, so that we can remove entries from extras that are no longer in the primary cache.
+void LLVOCache::readGenericExtrasFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map)
{
+ int loaded= 0;
+ int discarded = 0;
+ // get ViewerRegion pointer from handle
+ LLViewerRegion* pRegion = LLWorld::getInstance()->getRegionFromHandle(handle);
if(!mEnabled)
{
LL_WARNS() << "Not reading cache for handle " << handle << "): Cache is currently disabled." << LL_ENDL;
@@ -1566,40 +1599,73 @@ void LLVOCache::readGenericExtrasFromCache(U64 handle, const LLUUID& id, LLVOCac
std::string line;
std::getline(in, line);
- if(!in.good()) {
+ if(!in.good())
+ {
LL_WARNS() << "Failed reading extras cache for handle " << handle << LL_ENDL;
+ in.close();
+ removeGenericExtrasForHandle(handle);
+ return;
+ }
+ // file formats need versions, let's add one. legacy cache files will be considered version 0
+ // This will make it easier to upgrade/revise later.
+ int versionNumber=0;
+ if (line.compare(0, LLGLTFOverrideCacheEntry::VERSION_LABEL.length(), LLGLTFOverrideCacheEntry::VERSION_LABEL) == 0)
+ {
+ std::string versionStr = line.substr(LLGLTFOverrideCacheEntry::VERSION_LABEL.length()+1); // skip the version label and ':'
+ versionNumber = std::stol(versionStr);
+ }
+ // For future versions we may call a legacy handler here, but realistically we'll just consider this cache out of date.
+ // The important thing is to make sure it gets removed.
+ if(versionNumber != LLGLTFOverrideCacheEntry::VERSION)
+ {
+ LL_WARNS() << "Unexpected version number " << versionNumber << " for extras cache for handle " << handle << LL_ENDL;
+ in.close();
+ removeGenericExtrasForHandle(handle);
return;
}
+ LL_DEBUGS("VOCache") << "Reading extras cache for handle " << handle << ", version " << versionNumber << LL_ENDL;
+ std::getline(in, line);
if(!LLUUID::validate(line))
{
LL_WARNS() << "Failed reading extras cache for handle" << handle << ". invalid uuid line: '" << line << "'" << LL_ENDL;
+ in.close();
+ removeGenericExtrasForHandle(handle);
return;
}
LLUUID cache_id(line);
if(cache_id != id)
{
- LL_INFOS() << "Cache ID doesn't match for this region, discarding" << LL_ENDL;
+ // if the cache id doesn't match the expected region we should just kill the file.
+ LL_WARNS() << "Cache ID doesn't match for this region, deleting it" << LL_ENDL;
+ in.close();
+ removeGenericExtrasForHandle(handle);
return;
}
U32 num_entries; // if removal was enabled during write num_entries might be wrong
std::getline(in, line);
- if(!in.good()) {
+ if(!in.good())
+ {
LL_WARNS() << "Failed reading extras cache for handle " << handle << LL_ENDL;
+ in.close();
+ removeGenericExtrasForHandle(handle);
return;
}
- try {
+ try
+ {
num_entries = std::stol(line);
}
catch(std::logic_error&) // either invalid_argument or out_of_range
{
LL_WARNS() << "Failed reading extras cache for handle " << handle << ". unreadable num_entries" << LL_ENDL;
+ in.close();
+ removeGenericExtrasForHandle(handle);
return;
}
- LL_DEBUGS("GLTF") << "Beginning reading extras cache for handle " << handle << ", " << num_entries << " entries" << LL_ENDL;
+ LL_DEBUGS("GLTF") << "Beginning reading extras cache for handle " << handle << " from " << getObjectCacheExtrasFilename(handle) << LL_ENDL;
LLSD entry_llsd;
for (U32 i = 0; i < num_entries && !in.eof(); i++)
@@ -1607,47 +1673,66 @@ void LLVOCache::readGenericExtrasFromCache(U64 handle, const LLUUID& id, LLVOCac
static const U32 max_size = 4096;
bool success = LLSDSerialize::deserialize(entry_llsd, in, max_size);
// check bool(in) this time since eof is not a failure condition here
- if(!success || !in) {
- LL_WARNS() << "Failed reading extras cache for handle " << handle << ", entry number " << i << LL_ENDL;
- return;
+ if(!success || !in)
+ {
+ LL_WARNS() << "Failed reading extras cache for handle " << handle << ", entry number " << i << " cache patrtial load only." << LL_ENDL;
+ in.close();
+ removeGenericExtrasForHandle(handle);
+ break;
}
LLGLTFOverrideCacheEntry entry;
entry.fromLLSD(entry_llsd);
U32 local_id = entry_llsd["local_id"].asInteger();
- cache_extras_entry_map[local_id] = entry;
+ // only add entries that exist in the primary cache
+ // this is a self-healing test that avoids us polluting the cache with entries that are no longer valid based on the main cache.
+ if(cache_entry_map.find(local_id)!= cache_entry_map.end())
+ {
+ // attempt to backfill a null objectId, though these shouldn't be in the persisted cache really
+ if(entry.mObjectId.isNull() && pRegion)
+ {
+ gObjectList.getUUIDFromLocal( entry.mObjectId, local_id, pRegion->getHost().getAddress(), pRegion->getHost().getPort() );
+ }
+ cache_extras_entry_map[local_id] = entry;
+ loaded++;
+ }
+ else
+ {
+ discarded++;
+ }
}
-
- LL_DEBUGS("GLTF") << "Completed reading extras cache for handle " << handle << ", " << num_entries << " entries" << LL_ENDL;
+ LL_DEBUGS("GLTF") << "Completed reading extras cache for handle " << handle << ", " << loaded << " loaded, " << discarded << " discarded" << LL_ENDL;
}
void LLVOCache::purgeEntries(U32 size)
{
+ LL_DEBUGS("VOCache","GLTF") << "Purging " << size << " entries from cache" << LL_ENDL;
while(mHeaderEntryQueue.size() > size)
{
header_entry_queue_t::iterator iter = mHeaderEntryQueue.begin() ;
- HeaderEntryInfo* entry = *iter ;
- mHandleEntryMap.erase(entry->mHandle);
+ HeaderEntryInfo* entry = *iter ;
+ mHandleEntryMap.erase(entry->mHandle) ;
mHeaderEntryQueue.erase(iter) ;
- removeFromCache(entry) ;
+ removeFromCache(entry) ; // This now handles removing extras cache where appropriate.
delete entry;
- // TODO also delete extras
}
mNumEntries = mHandleEntryMap.size() ;
}
-void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, BOOL dirty_cache, bool removal_enabled)
+void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, bool dirty_cache, bool removal_enabled)
{
+ std::string filename;
+ getObjectCacheFilename(handle, filename);
if(!mEnabled)
{
- LL_WARNS() << "Not writing cache for handle " << handle << "): Cache is currently disabled." << LL_ENDL;
+ LL_WARNS() << "Not writing cache for " << filename << " (handle:" << handle << "): Cache is currently disabled." << LL_ENDL;
return ;
}
llassert_always(mInitialized);
if(mReadOnly)
{
- LL_WARNS() << "Not writing cache for handle " << handle << "): Cache is currently in read-only mode." << LL_ENDL;
+ LL_WARNS() << "Not writing cache for " << filename << " (handle:" << handle << "): Cache is currently in read-only mode." << LL_ENDL;
return ;
}
@@ -1682,13 +1767,13 @@ void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry:
//update cache header
if(!updateEntry(entry))
{
- LL_WARNS() << "Failed to update cache header index " << entry->mIndex << ". handle = " << handle << LL_ENDL;
+ LL_WARNS() << "Failed to update cache header index " << entry->mIndex << ". " << filename << " handle = " << handle << LL_ENDL;
return ; //update failed.
}
if(!dirty_cache)
{
- LL_WARNS() << "Skipping write to cache for handle " << handle << ": cache not dirty" << LL_ENDL;
+ LL_WARNS() << "Skipping write to cache for " << filename << " (handle:" << handle << "): cache not dirty" << LL_ENDL;
return ; //nothing changed, no need to update.
}
@@ -1724,6 +1809,7 @@ void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry:
}
else
{
+ LL_WARNS() << "Failed to write cache entry to buffer for " << filename << ", entry number " << iter->second->getLocalID() << LL_ENDL;
success = false;
break;
}
@@ -1735,6 +1821,7 @@ void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry:
size_in_buffer = 0;
if (!success)
{
+ LL_WARNS() << "Failed to write cache to disk " << filename << LL_ENDL;
break;
}
}
@@ -1745,8 +1832,13 @@ void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry:
{
// final write
success = check_write(&apr_file, (void*)data_buffer, size_in_buffer);
+ if(!success)
+ {
+ LL_WARNS() << "Failed to write cache entry to disk " << filename << LL_ENDL;
+ }
size_in_buffer = 0;
}
+ LL_DEBUGS("VOCache") << "Wrote " << num_entries << " entries to the primary VOCache file " << filename << ". success = " << (success ? "True":"False") << LL_ENDL;
}
}
}
@@ -1759,7 +1851,29 @@ void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry:
return ;
}
-void LLVOCache::writeGenericExtrasToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map, BOOL dirty_cache, bool removal_enabled)
+void LLVOCache::removeGenericExtrasForHandle(U64 handle)
+{
+ if(mReadOnly)
+ {
+ LL_WARNS() << "Not removing cache for handle " << handle << ": Cache is currently in read-only mode." << LL_ENDL;
+ return ;
+ }
+
+ // NOTE: when removing the extras, we must also remove the objects so the simulator will send us a full upddate with the valid overrides
+ auto* entry = mHandleEntryMap[handle];
+ if (entry)
+ {
+ removeEntry(entry);
+ }
+ else
+ {
+ //shouldn't happen, but if it does, we should remove the extras file since it's orphaned
+ LL_WARNS("GLTF", "VOCache") << "Removing generic extras for handle " << entry->mHandle << "Filename: " << getObjectCacheExtrasFilename(handle) << LL_ENDL;
+ LLFile::remove(getObjectCacheExtrasFilename(entry->mHandle));
+ }
+}
+
+void LLVOCache::writeGenericExtrasToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map, bool dirty_cache, bool removal_enabled)
{
if(!mEnabled)
{
@@ -1774,46 +1888,86 @@ void LLVOCache::writeGenericExtrasToCache(U64 handle, const LLUUID& id, const LL
return;
}
- std::string filename(getObjectCacheExtrasFilename(handle));
+ // <FS:Beq> FIRE-33808 - Material Override Cache causes long delays
+ std::string filename = getObjectCacheExtrasFilename(handle);
+ // </FS:Beq>
llofstream out(filename, std::ios::out | std::ios::binary);
if(!out.good())
{
LL_WARNS() << "Failed writing extras cache for handle " << handle << LL_ENDL;
+ removeGenericExtrasForHandle(handle);
return;
- // TODO - clean up broken cache file
}
+ // It is good practice to version file formats so let's add one.
+ // legacy versions will be treated as version 0.
+ out << LLGLTFOverrideCacheEntry::VERSION_LABEL << ":" << LLGLTFOverrideCacheEntry::VERSION << '\n';
out << id << '\n';
if(!out.good())
{
LL_WARNS() << "Failed writing extras cache for handle " << handle << LL_ENDL;
+ removeGenericExtrasForHandle(handle);
return;
- // TODO - clean up broken cache file
}
-
- U32 num_entries = cache_extras_entry_map.size();
- out << num_entries << '\n';
+ // Because we don't write out all the entries we need to record a placeholder and rewrite this later
+ auto num_entries_placeholder = out.tellp();
+ out << std::setw(10) << std::setfill('0') << 0 << '\n';
if(!out.good())
{
LL_WARNS() << "Failed writing extras cache for handle " << handle << LL_ENDL;
+ removeGenericExtrasForHandle(handle);
return;
- // TODO - clean up broken cache file
}
- for (auto const & entry : cache_extras_entry_map)
+ // get ViewerRegion pointer from handle
+ LLViewerRegion* pRegion = LLWorld::getInstance()->getRegionFromHandle(handle);
+
+ U32 num_entries = 0;
+ U32 inmem_entries = 0;
+ U32 skipped = 0;
+ inmem_entries = cache_extras_entry_map.size();
+ for (auto [local_id, entry] : cache_extras_entry_map)
{
- S32 local_id = entry.first;
- LLSD entry_llsd = entry.second.toLLSD();
- entry_llsd["local_id"] = local_id;
- LLSDSerialize::serialize(entry_llsd, out, LLSDSerialize::LLSD_XML);
- out << '\n';
- if(!out.good())
+ // Only write out GLTFOverrides that we can actually apply again on import.
+ // worst case we have an extra cache miss.
+ // Note: A null mObjectId is valid when in memory as we might have a data race between GLTF of the object itself.
+ // This remains a valid state to persist as it is consistent with the localid checks on import with the main cache.
+ // the mObjectId will be updated if/when the local object is updated from the gObject list (due to full update)
+ if(entry.mObjectId.isNull() && pRegion)
{
- LL_WARNS() << "Failed writing extras cache for handle " << handle << LL_ENDL;
- return;
- // TODO - clean up broken cache file
+ gObjectList.getUUIDFromLocal( entry.mObjectId, local_id, pRegion->getHost().getAddress(), pRegion->getHost().getPort() );
}
- }
- LL_DEBUGS("GLTF") << "Completed writing extras cache for handle " << handle << ", " << num_entries << " entries" << LL_ENDL;
+ if( entry.mSides.size() > 0 &&
+ entry.mSides.size() == entry.mGLTFMaterial.size()
+ )
+ {
+ LLSD entry_llsd = entry.toLLSD();
+ entry_llsd["local_id"] = (S32)local_id;
+ LLSDSerialize::serialize(entry_llsd, out, LLSDSerialize::LLSD_XML);
+ out << '\n';
+ if(!out.good())
+ {
+ // We're not in a good place when this happens so we might as well nuke the file.
+ LL_WARNS() << "Failed writing extras cache for handle " << handle << ". Corrupted cache file " << filename << " removed." << LL_ENDL;
+ removeGenericExtrasForHandle(handle);
+ return;
+ }
+ num_entries++;
+ }
+ else
+ {
+ skipped++;
+ }
+ }
+ // Rewrite the placeholder
+ out.seekp(num_entries_placeholder);
+ out << std::setw(10) << std::setfill('0') << num_entries << '\n';
+ if(!out.good())
+ {
+ LL_WARNS() << "Failed writing extras cache for handle " << handle << LL_ENDL;
+ removeGenericExtrasForHandle(handle);
+ return;
+ }
+ LL_DEBUGS("GLTF") << "Completed writing extras cache for handle " << handle << ", " << num_entries << " entries. Total in RAM: " << inmem_entries << " skipped (no persist): " << skipped << LL_ENDL;
}
diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h
index 8525edd121..bbcc230a82 100644
--- a/indra/newview/llvocache.h
+++ b/indra/newview/llvocache.h
@@ -43,6 +43,8 @@ class LLCamera;
class LLGLTFOverrideCacheEntry
{
public:
+ static const std::string VERSION_LABEL;
+ static const int VERSION;
bool fromLLSD(const LLSD& data);
LLSD toLLSD() const;
@@ -96,12 +98,6 @@ public:
}
};
- struct ExtrasEntry
- {
- LLSD extras;
- std::string extras_raw;
- };
-
protected:
~LLVOCacheEntry();
public:
@@ -150,8 +146,8 @@ public:
void updateParentBoundingInfo();
void saveBoundingSphere();
- void setValid(BOOL valid = TRUE) {mValid = valid;}
- BOOL isValid() const {return mValid;}
+ void setValid(bool valid = true) {mValid = valid;}
+ bool isValid() const {return mValid;}
void setUpdateFlags(U32 flags) {mUpdateFlags = flags;}
U32 getUpdateFlags() const {return mUpdateFlags;}
@@ -185,7 +181,7 @@ protected:
U32 mState; //high 16 bits reserved for special use.
vocache_entry_set_t mChildrenList; //children entries in a linked set.
- BOOL mValid; //if set, this entry is valid, otherwise it is invalid and will be removed.
+ bool mValid; //if set, this entry is valid, otherwise it is invalid and will be removed.
LLVector4a mBSphereCenter; //bounding sphere center
F32 mBSphereRadius; //bounding sphere radius
@@ -224,7 +220,7 @@ public:
void processOccluders(LLCamera* camera);
void removeOccluder(LLVOCacheGroup* group);
- void setCullHistory(BOOL has_new_object);
+ void setCullHistory(bool has_new_object);
bool isFrontCull() const {return mFrontCull;}
@@ -232,10 +228,10 @@ private:
void selectBackObjects(LLCamera &camera, F32 projection_area_cutoff, bool use_occlusion); //select objects behind camera.
public:
- static BOOL sNeedsOcclusionCheck;
+ static bool sNeedsOcclusionCheck;
private:
- BOOL mFrontCull; //the view frustum cull if set, otherwise is back sphere cull.
+ bool mFrontCull; //the view frustum cull if set, otherwise is back sphere cull.
U32 mCullHistory;
U32 mCulledTime[LLViewerCamera::NUM_CAMERAS];
std::set<LLVOCacheGroup*> mOccludedGroups;
@@ -289,12 +285,13 @@ public:
void initCache(ELLPath location, U32 size, U32 cache_version);
void removeCache(ELLPath location, bool started = false) ;
- void readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_entry_map_t& cache_entry_map) ;
- void readGenericExtrasFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map);
+ bool readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_entry_map_t& cache_entry_map) ;
+ void readGenericExtrasFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map);
- void writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, BOOL dirty_cache, bool removal_enabled);
- void writeGenericExtrasToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map, BOOL dirty_cache, bool removal_enabled);
+ void writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, bool dirty_cache, bool removal_enabled);
+ void writeGenericExtrasToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map, bool dirty_cache, bool removal_enabled);
void removeEntry(U64 handle) ;
+ void removeGenericExtrasForHandle(U64 handle);
U32 getCacheEntries() { return mNumEntries; }
U32 getCacheEntriesMax() { return mCacheSize; }
@@ -311,7 +308,7 @@ private:
void removeCache() ;
void removeEntry(HeaderEntryInfo* entry) ;
void purgeEntries(U32 size);
- BOOL updateEntry(const HeaderEntryInfo* entry);
+ bool updateEntry(const HeaderEntryInfo* entry);
private:
bool mEnabled;
diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp
index b814f15232..9198b7e715 100644
--- a/indra/newview/llvograss.cpp
+++ b/indra/newview/llvograss.cpp
@@ -73,7 +73,7 @@ LLVOGrass::LLVOGrass(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regi
mLastPatchUpdateTime = 0;
mGrassVel.clearVec();
mGrassBend.clearVec();
- mbCanSelect = TRUE;
+ mbCanSelect = true;
mBladeWindAngle = 35.f;
mBWAOverlap = 2.f;
@@ -99,7 +99,7 @@ void LLVOGrass::updateSpecies()
SpeciesMap::const_iterator it = sSpeciesTable.begin();
mSpecies = (*it).first;
}
- setTEImage(0, LLViewerTextureManager::getFetchedTexture(sSpeciesTable[mSpecies]->mTextureID, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE));
+ setTEImage(0, LLViewerTextureManager::getFetchedTexture(sSpeciesTable[mSpecies]->mTextureID, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE));
}
@@ -135,7 +135,7 @@ void LLVOGrass::initClass()
F32 F32_val;
LLUUID id;
- BOOL success = TRUE;
+ bool success{ true };
S32 species;
static LLStdStringHandle species_id_string = LLXmlTree::addAttributeString("species_id");
@@ -188,7 +188,7 @@ void LLVOGrass::initClass()
}
}
- BOOL have_all_grass = TRUE;
+ bool have_all_grass{ true };
std::string err;
for (S32 i=0;i<sMaxGrassSpecies;++i)
@@ -196,7 +196,7 @@ void LLVOGrass::initClass()
if (!sSpeciesTable.count(i))
{
err.append(llformat(" %d",i));
- have_all_grass = FALSE;
+ have_all_grass = false;
}
}
@@ -270,9 +270,9 @@ U32 LLVOGrass::processUpdateMessage(LLMessageSystem *mesgsys,
return retval;
}
-BOOL LLVOGrass::isActive() const
+bool LLVOGrass::isActive() const
{
- return TRUE;
+ return true;
}
void LLVOGrass::idleUpdate(LLAgent &agent, const F64 &time)
@@ -333,11 +333,11 @@ void LLVOGrass::updateTextures()
}
}
-BOOL LLVOGrass::updateLOD()
+bool LLVOGrass::updateLOD()
{
if (mDrawable->getNumFaces() <= 0)
{
- return FALSE;
+ return false;
}
LLFace* face = mDrawable->getFace(0);
@@ -350,7 +350,7 @@ BOOL LLVOGrass::updateLOD()
face->setSize(0, 0);
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL);
}
- return TRUE ;
+ return true ;
}
if(!mNumBlades)
{
@@ -387,10 +387,10 @@ BOOL LLVOGrass::updateLOD()
face->setSize(mNumBlades*8, mNumBlades*12);
}
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
LLDrawable* LLVOGrass::createDrawable(LLPipeline *pipeline)
@@ -403,7 +403,7 @@ LLDrawable* LLVOGrass::createDrawable(LLPipeline *pipeline)
static LLTrace::BlockTimerStatHandle FTM_UPDATE_GRASS("Update Grass");
-BOOL LLVOGrass::updateGeometry(LLDrawable *drawable)
+bool LLVOGrass::updateGeometry(LLDrawable *drawable)
{
LL_RECORD_BLOCK_TIME(FTM_UPDATE_GRASS);
@@ -424,7 +424,7 @@ BOOL LLVOGrass::updateGeometry(LLDrawable *drawable)
{
plantBlades();
}
- return TRUE;
+ return true;
}
void LLVOGrass::plantBlades()
@@ -593,12 +593,12 @@ U32 LLVOGrass::getPartitionType() const
}
LLGrassPartition::LLGrassPartition(LLViewerRegion* regionp)
-: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, regionp)
+: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, true, regionp)
{
mDrawableType = LLPipeline::RENDER_TYPE_GRASS;
mPartitionType = LLViewerRegion::PARTITION_GRASS;
mLODPeriod = 16;
- mDepthMask = TRUE;
+ mDepthMask = true;
mSlopRatio = 0.1f;
mRenderPass = LLRenderPass::PASS_GRASS;
}
@@ -731,28 +731,28 @@ void LLGrassPartition::getGeometry(LLSpatialGroup* group)
}
// virtual
-void LLVOGrass::updateDrawable(BOOL force_damped)
+void LLVOGrass::updateDrawable(bool force_damped)
{
// Force an immediate rebuild on any update
if (mDrawable.notNull())
{
- mDrawable->updateXform(TRUE);
+ mDrawable->updateXform(true);
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL);
}
clearChanged(SHIFTED);
}
// virtual
-BOOL LLVOGrass::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_unselectable, S32 *face_hitp,
+bool LLVOGrass::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, bool pick_transparent, bool pick_rigged, bool pick_unselectable, S32 *face_hitp,
LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent)
{
- BOOL ret = FALSE;
+ bool ret = false;
if (!mbCanSelect ||
mDrawable->isDead() ||
!gPipeline.hasRenderType(mDrawable->getRenderType()))
{
- return FALSE;
+ return false;
}
LLVector4a dir;
@@ -819,7 +819,7 @@ BOOL LLVOGrass::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
F32 a,b,t;
- BOOL hit = FALSE;
+ bool hit = false;
U32 idx0 = 0,idx1 = 0,idx2 = 0;
@@ -834,24 +834,24 @@ BOOL LLVOGrass::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
if (LLTriangleRayIntersect(v0a, v1a, v2a, start, dir, a, b, t))
{
- hit = TRUE;
+ hit = true;
idx0 = 0; idx1 = 1; idx2 = 2;
}
else if (LLTriangleRayIntersect(v1a, v3a, v2a, start, dir, a, b, t))
{
- hit = TRUE;
+ hit = true;
idx0 = 1; idx1 = 3; idx2 = 2;
}
else if (LLTriangleRayIntersect(v2a, v1a, v0a, start, dir, a, b, t))
{
normal1 = -normal1;
- hit = TRUE;
+ hit = true;
idx0 = 2; idx1 = 1; idx2 = 0;
}
else if (LLTriangleRayIntersect(v2a, v3a, v1a, start, dir, a, b, t))
{
normal1 = -normal1;
- hit = TRUE;
+ hit = true;
idx0 = 2; idx1 = 3; idx2 = 1;
}
@@ -884,7 +884,7 @@ BOOL LLVOGrass::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
{
normal->load3(normal1.mV);
}
- ret = TRUE;
+ ret = true;
}
}
}
diff --git a/indra/newview/llvograss.h b/indra/newview/llvograss.h
index 63876dc099..0fc24bf093 100644
--- a/indra/newview/llvograss.h
+++ b/indra/newview/llvograss.h
@@ -53,10 +53,10 @@ public:
static void import(LLFILE *file, LLMessageSystem *mesgsys, const LLVector3 &pos);
/*virtual*/ void exportFile(LLFILE *file, const LLVector3 &position);
- void updateDrawable(BOOL force_damped);
+ void updateDrawable(bool force_damped);
/*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);
- /*virtual*/ BOOL updateGeometry(LLDrawable *drawable);
+ /*virtual*/ bool updateGeometry(LLDrawable *drawable);
/*virtual*/ void getGeometry(S32 idx,
LLStrider<LLVector4a>& verticesp,
LLStrider<LLVector3>& normalsp,
@@ -67,19 +67,19 @@ public:
void updateFaceSize(S32 idx) { }
/*virtual*/ void updateTextures();
- /*virtual*/ BOOL updateLOD();
+ /*virtual*/ bool updateLOD();
/*virtual*/ void setPixelAreaAndAngle(LLAgent &agent); // generate accurate apparent angle and area
void plantBlades();
- /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate.
+ /*virtual*/ bool isActive() const; // Whether this object needs to do an idleUpdate.
/*virtual*/ void idleUpdate(LLAgent &agent, const F64 &time);
- /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
+ /*virtual*/ bool lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
- BOOL pick_transparent = FALSE,
- BOOL pick_rigged = FALSE,
- BOOL pick_unselectable = TRUE,
+ bool pick_transparent = false,
+ bool pick_rigged = false,
+ bool pick_unselectable = true,
S32* face_hit = NULL, // which face was hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
diff --git a/indra/newview/llvoicecallhandler.cpp b/indra/newview/llvoicecallhandler.cpp
index 95e11abd82..0387b81c6b 100644
--- a/indra/newview/llvoicecallhandler.cpp
+++ b/indra/newview/llvoicecallhandler.cpp
@@ -54,7 +54,7 @@ public:
//Get the ID
LLUUID id;
- if (!id.set( params[0], FALSE ))
+ if (!id.set( params[0], false ))
{
return false;
}
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp
index b0eb8d962c..c974a4b466 100644
--- a/indra/newview/llvoicechannel.cpp
+++ b/indra/newview/llvoicechannel.cpp
@@ -44,7 +44,7 @@ LLVoiceChannel* LLVoiceChannel::sCurrentVoiceChannel = NULL;
LLVoiceChannel* LLVoiceChannel::sSuspendedVoiceChannel = NULL;
LLVoiceChannel::channel_changed_signal_t LLVoiceChannel::sCurrentVoiceChannelChangedSignal;
-BOOL LLVoiceChannel::sSuspended = FALSE;
+bool LLVoiceChannel::sSuspended = false;
//
// Constants
@@ -59,7 +59,7 @@ LLVoiceChannel::LLVoiceChannel(const LLUUID& session_id, const std::string& sess
mState(STATE_NO_CHANNEL_INFO),
mSessionName(session_name),
mCallDirection(OUTGOING_CALL),
- mIgnoreNextSessionLeave(FALSE),
+ mIgnoreNextSessionLeave(false),
mCallEndedByAgent(false)
{
mNotifyArgs["VOICE_CHANNEL_NAME"] = mSessionName;
@@ -164,7 +164,7 @@ void LLVoiceChannel::handleStatusChange(EStatusType type)
// update the UI and revert to default channel
deactivate();
}
- mIgnoreNextSessionLeave = FALSE;
+ mIgnoreNextSessionLeave = false;
break;
case STATUS_JOINING:
if (callStarted())
@@ -190,13 +190,13 @@ void LLVoiceChannel::handleError(EStatusType type)
setState(STATE_ERROR);
}
-BOOL LLVoiceChannel::isActive()
+bool LLVoiceChannel::isActive()
{
// only considered active when currently bound channel matches what our channel
return callStarted() && LLVoiceClient::getInstance()->getCurrentChannel() == mURI;
}
-BOOL LLVoiceChannel::callStarted()
+bool LLVoiceChannel::callStarted()
{
return mState >= STATE_CALL_STARTED;
}
@@ -206,7 +206,7 @@ void LLVoiceChannel::deactivate()
if (mState >= STATE_RINGING)
{
// ignore session leave event
- mIgnoreNextSessionLeave = TRUE;
+ mIgnoreNextSessionLeave = true;
}
if (callStarted())
@@ -370,7 +370,7 @@ void LLVoiceChannel::suspend()
if (!sSuspended)
{
sSuspendedVoiceChannel = sCurrentVoiceChannel;
- sSuspended = TRUE;
+ sSuspended = true;
}
}
@@ -390,7 +390,7 @@ void LLVoiceChannel::resume()
LLVoiceChannelProximal::getInstance()->activate();
}
}
- sSuspended = FALSE;
+ sSuspended = false;
}
}
@@ -414,7 +414,7 @@ LLVoiceChannelGroup::LLVoiceChannelGroup(const LLUUID& session_id, const std::st
LLVoiceChannel(session_id, session_name)
{
mRetries = DEFAULT_RETRIES_COUNT;
- mIsRetrying = FALSE;
+ mIsRetrying = false;
}
void LLVoiceChannelGroup::deactivate()
@@ -529,7 +529,7 @@ void LLVoiceChannelGroup::handleStatusChange(EStatusType type)
{
case STATUS_JOINED:
mRetries = 3;
- mIsRetrying = FALSE;
+ mIsRetrying = false;
default:
break;
}
@@ -553,8 +553,8 @@ void LLVoiceChannelGroup::handleError(EStatusType status)
if ( mRetries > 0 )
{
mRetries--;
- mIsRetrying = TRUE;
- mIgnoreNextSessionLeave = TRUE;
+ mIsRetrying = true;
+ mIgnoreNextSessionLeave = true;
getChannelInfo();
return;
@@ -563,7 +563,7 @@ void LLVoiceChannelGroup::handleError(EStatusType status)
{
notify = "VoiceChannelJoinFailed";
mRetries = DEFAULT_RETRIES_COUNT;
- mIsRetrying = FALSE;
+ mIsRetrying = false;
}
break;
@@ -670,7 +670,7 @@ LLVoiceChannelProximal::LLVoiceChannelProximal() :
{
}
-BOOL LLVoiceChannelProximal::isActive()
+bool LLVoiceChannelProximal::isActive()
{
return callStarted() && LLVoiceClient::getInstance()->inProximalChannel();
}
@@ -767,7 +767,7 @@ void LLVoiceChannelProximal::deactivate()
LLVoiceChannelP2P::LLVoiceChannelP2P(const LLUUID& session_id, const std::string& session_name, const LLUUID& other_user_id) :
LLVoiceChannelGroup(session_id, session_name),
mOtherUserID(other_user_id),
- mReceivedCall(FALSE)
+ mReceivedCall(false)
{
// make sure URI reflects encoded version of other user's agent id
setURI(LLVoiceClient::getInstance()->sipURIFromID(other_user_id));
@@ -796,12 +796,12 @@ void LLVoiceChannelP2P::handleStatusChange(EStatusType type)
}
deactivate();
}
- mIgnoreNextSessionLeave = FALSE;
+ mIgnoreNextSessionLeave = false;
return;
case STATUS_JOINING:
// because we join session we expect to process session leave event in the future. EXT-7371
// may be this should be done in the LLVoiceChannel::handleStatusChange.
- mIgnoreNextSessionLeave = FALSE;
+ mIgnoreNextSessionLeave = false;
break;
default:
@@ -839,7 +839,7 @@ void LLVoiceChannelP2P::activate()
// no session handle yet, we're starting the call
if (mSessionHandle.empty())
{
- mReceivedCall = FALSE;
+ mReceivedCall = false;
LLVoiceClient::getInstance()->callUser(mOtherUserID);
}
// otherwise answering the call
@@ -879,7 +879,7 @@ void LLVoiceChannelP2P::getChannelInfo()
// receiving session from other user who initiated call
void LLVoiceChannelP2P::setSessionHandle(const std::string& handle, const std::string &inURI)
{
- BOOL needs_activate = FALSE;
+ bool needs_activate = false;
if (callStarted())
{
// defer to lower agent id when already active
@@ -887,7 +887,7 @@ void LLVoiceChannelP2P::setSessionHandle(const std::string& handle, const std::s
{
// pretend we haven't started the call yet, so we can connect to this session instead
deactivate();
- needs_activate = TRUE;
+ needs_activate = true;
}
else
{
@@ -913,7 +913,7 @@ void LLVoiceChannelP2P::setSessionHandle(const std::string& handle, const std::s
setURI(LLVoiceClient::getInstance()->sipURIFromID(mOtherUserID));
}
- mReceivedCall = TRUE;
+ mReceivedCall = true;
if (needs_activate)
{
diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h
index e68bfbe1ff..5b15acd8cd 100644
--- a/indra/newview/llvoicechannel.h
+++ b/indra/newview/llvoicechannel.h
@@ -76,8 +76,8 @@ public:
const std::string& uri,
const std::string& credentials);
virtual void getChannelInfo();
- virtual BOOL isActive();
- virtual BOOL callStarted();
+ virtual bool isActive();
+ virtual bool callStarted();
// Session name is a UI label used for feedback about which person,
// group, or phone number you are talking to
@@ -124,7 +124,7 @@ protected:
LLSD mCallDialogPayload;
// true if call was ended by agent
bool mCallEndedByAgent;
- BOOL mIgnoreNextSessionLeave;
+ bool mIgnoreNextSessionLeave;
LLHandle<LLPanel> mLoginNotificationHandle;
typedef std::map<LLUUID, LLVoiceChannel*> voice_channel_map_t;
@@ -135,7 +135,7 @@ protected:
static LLVoiceChannel* sCurrentVoiceChannel;
static LLVoiceChannel* sSuspendedVoiceChannel;
- static BOOL sSuspended;
+ static bool sSuspended;
private:
state_changed_signal_t mStateChangedCallback;
@@ -162,7 +162,7 @@ private:
void voiceCallCapCoro(std::string url);
U32 mRetries;
- BOOL mIsRetrying;
+ bool mIsRetrying;
};
class LLVoiceChannelProximal : public LLVoiceChannel, public LLSingleton<LLVoiceChannelProximal>
@@ -173,7 +173,7 @@ public:
/*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal) override;
/*virtual*/ void handleStatusChange(EStatusType status) override;
/*virtual*/ void handleError(EStatusType status) override;
- /*virtual*/ BOOL isActive() override;
+ /*virtual*/ bool isActive() override;
/*virtual*/ void activate() override;
/*virtual*/ void deactivate() override;
@@ -204,7 +204,7 @@ private:
std::string mSessionHandle;
LLUUID mOtherUserID;
- BOOL mReceivedCall;
+ bool mReceivedCall;
};
#endif // LL_VOICECHANNEL_H
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index 68d9f4ffab..bb865e5684 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -369,7 +369,7 @@ bool LLVoiceClient::isParticipant(const LLUUID &speaker_id)
// text chat
-BOOL LLVoiceClient::isSessionTextIMPossible(const LLUUID& id)
+bool LLVoiceClient::isSessionTextIMPossible(const LLUUID& id)
{
if (mVoiceModule)
{
@@ -377,11 +377,11 @@ BOOL LLVoiceClient::isSessionTextIMPossible(const LLUUID& id)
}
else
{
- return FALSE;
+ return false;
}
}
-BOOL LLVoiceClient::isSessionCallBackPossible(const LLUUID& id)
+bool LLVoiceClient::isSessionCallBackPossible(const LLUUID& id)
{
if (mVoiceModule)
{
@@ -389,12 +389,12 @@ BOOL LLVoiceClient::isSessionCallBackPossible(const LLUUID& id)
}
else
{
- return FALSE;
+ return false;
}
}
/* obsolete
-BOOL LLVoiceClient::sendTextMessage(const LLUUID& participant_id, const std::string& message)
+bool LLVoiceClient::sendTextMessage(const LLUUID& participant_id, const std::string& message)
{
if (mVoiceModule)
{
@@ -402,7 +402,7 @@ BOOL LLVoiceClient::sendTextMessage(const LLUUID& participant_id, const std::str
}
else
{
- return FALSE;
+ return false;
}
}
*/
@@ -575,12 +575,12 @@ void LLVoiceClient::updateMicMuteLogic()
if (mVoiceModule) mVoiceModule->setMuteMic(new_mic_mute);
}
-void LLVoiceClient::setLipSyncEnabled(BOOL enabled)
+void LLVoiceClient::setLipSyncEnabled(bool enabled)
{
if (mVoiceModule) mVoiceModule->setLipSyncEnabled(enabled);
}
-BOOL LLVoiceClient::lipSyncEnabled()
+bool LLVoiceClient::lipSyncEnabled()
{
if (mVoiceModule)
{
@@ -673,7 +673,7 @@ void LLVoiceClient::toggleUserPTTState(void)
//-------------------------------------------
// nearby speaker accessors
-BOOL LLVoiceClient::getVoiceEnabled(const LLUUID& id)
+bool LLVoiceClient::getVoiceEnabled(const LLUUID& id)
{
if (mVoiceModule)
{
@@ -681,7 +681,7 @@ BOOL LLVoiceClient::getVoiceEnabled(const LLUUID& id)
}
else
{
- return FALSE;
+ return false;
}
}
@@ -706,7 +706,7 @@ bool LLVoiceClient::isVoiceWorking() const
return false;
}
-BOOL LLVoiceClient::isParticipantAvatar(const LLUUID& id)
+bool LLVoiceClient::isParticipantAvatar(const LLUUID& id)
{
if (mVoiceModule)
{
@@ -714,16 +714,16 @@ BOOL LLVoiceClient::isParticipantAvatar(const LLUUID& id)
}
else
{
- return FALSE;
+ return false;
}
}
-BOOL LLVoiceClient::isOnlineSIP(const LLUUID& id)
+bool LLVoiceClient::isOnlineSIP(const LLUUID& id)
{
- return FALSE;
+ return false;
}
-BOOL LLVoiceClient::getIsSpeaking(const LLUUID& id)
+bool LLVoiceClient::getIsSpeaking(const LLUUID& id)
{
if (mVoiceModule)
{
@@ -731,11 +731,11 @@ BOOL LLVoiceClient::getIsSpeaking(const LLUUID& id)
}
else
{
- return FALSE;
+ return false;
}
}
-BOOL LLVoiceClient::getIsModeratorMuted(const LLUUID& id)
+bool LLVoiceClient::getIsModeratorMuted(const LLUUID& id)
{
if (mVoiceModule)
{
@@ -743,7 +743,7 @@ BOOL LLVoiceClient::getIsModeratorMuted(const LLUUID& id)
}
else
{
- return FALSE;
+ return false;
}
}
@@ -759,7 +759,7 @@ F32 LLVoiceClient::getCurrentPower(const LLUUID& id)
}
}
-BOOL LLVoiceClient::getOnMuteList(const LLUUID& id)
+bool LLVoiceClient::getOnMuteList(const LLUUID& id)
{
if (mVoiceModule)
{
@@ -767,7 +767,7 @@ BOOL LLVoiceClient::getOnMuteList(const LLUUID& id)
}
else
{
- return FALSE;
+ return false;
}
}
@@ -852,7 +852,7 @@ LLVoiceEffectInterface* LLVoiceClient::getVoiceEffectInterface() const
class LLViewerRequiredVoiceVersion : public LLHTTPNode
{
- static BOOL sAlertedUser;
+ static bool sAlertedUser;
virtual void post(
LLHTTPNode::ResponsePtr response,
const LLSD& context,
@@ -872,9 +872,9 @@ class LLViewerRequiredVoiceVersion : public LLHTTPNode
{
if (!sAlertedUser)
{
- //sAlertedUser = TRUE;
+ //sAlertedUser = true;
LLNotificationsUtil::add("VoiceVersionMismatch");
- gSavedSettings.setBOOL("EnableVoiceChat", FALSE); // toggles listener
+ gSavedSettings.setBOOL("EnableVoiceChat", false); // toggles listener
}
}
}
@@ -1087,7 +1087,7 @@ void LLSpeakerVolumeStorage::save()
}
}
-BOOL LLViewerRequiredVoiceVersion::sAlertedUser = FALSE;
+bool LLViewerRequiredVoiceVersion::sAlertedUser = false;
LLHTTPRegistration<LLViewerParcelVoiceInfo>
gHTTPRegistrationMessageParcelVoiceInfo(
diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h
index aa67502908..b3f5edfa4c 100644
--- a/indra/newview/llvoiceclient.h
+++ b/indra/newview/llvoiceclient.h
@@ -203,21 +203,21 @@ public:
//@{
virtual bool voiceEnabled()=0;
virtual void setVoiceEnabled(bool enabled)=0;
- virtual void setLipSyncEnabled(BOOL enabled)=0;
- virtual BOOL lipSyncEnabled()=0;
+ virtual void setLipSyncEnabled(bool enabled)=0;
+ virtual bool lipSyncEnabled()=0;
virtual void setMuteMic(bool muted)=0; // Set the mute state of the local mic.
//@}
//////////////////////////
/// @name nearby speaker accessors
//@{
- virtual BOOL getVoiceEnabled(const LLUUID& id)=0; // true if we've received data for this avatar
+ virtual bool getVoiceEnabled(const LLUUID& id)=0; // true if we've received data for this avatar
virtual std::string getDisplayName(const LLUUID& id)=0;
- virtual BOOL isParticipantAvatar(const LLUUID &id)=0;
- virtual BOOL getIsSpeaking(const LLUUID& id)=0;
- virtual BOOL getIsModeratorMuted(const LLUUID& id)=0;
+ virtual bool isParticipantAvatar(const LLUUID &id)=0;
+ virtual bool getIsSpeaking(const LLUUID& id)=0;
+ virtual bool getIsModeratorMuted(const LLUUID& id)=0;
virtual F32 getCurrentPower(const LLUUID& id)=0; // "power" is related to "amplitude" in a defined way. I'm just not sure what the formula is...
- virtual BOOL getOnMuteList(const LLUUID& id)=0;
+ virtual bool getOnMuteList(const LLUUID& id)=0;
virtual F32 getUserVolume(const LLUUID& id)=0;
virtual void setUserVolume(const LLUUID& id, F32 volume)=0; // set's volume for specified agent, from 0-1 (where .5 is nominal)
//@}
@@ -225,9 +225,9 @@ public:
//////////////////////////
/// @name text chat
//@{
- virtual BOOL isSessionTextIMPossible(const LLUUID& id)=0;
- virtual BOOL isSessionCallBackPossible(const LLUUID& id)=0;
- //virtual BOOL sendTextMessage(const LLUUID& participant_id, const std::string& message)=0;
+ virtual bool isSessionTextIMPossible(const LLUUID& id)=0;
+ virtual bool isSessionCallBackPossible(const LLUUID& id)=0;
+ //virtual bool sendTextMessage(const LLUUID& participant_id, const std::string& message)=0;
virtual void endUserIMSession(const LLUUID &uuid)=0;
//@}
@@ -396,7 +396,7 @@ public:
void setMicGain(F32 volume);
void setUserVolume(const LLUUID& id, F32 volume); // set's volume for specified agent, from 0-1 (where .5 is nominal)
bool voiceEnabled();
- void setLipSyncEnabled(BOOL enabled);
+ void setLipSyncEnabled(bool enabled);
void setMuteMic(bool muted); // Use this to mute the local mic (for when the client is minimized, etc), ignoring user PTT state.
void setUserPTTState(bool ptt);
bool getUserPTTState();
@@ -410,25 +410,25 @@ public:
void updateMicMuteLogic();
- BOOL lipSyncEnabled();
+ bool lipSyncEnabled();
boost::signals2::connection MicroChangedCallback(const micro_changed_signal_t::slot_type& cb ) { return mMicroChangedSignal.connect(cb); }
/////////////////////////////
// Accessors for data related to nearby speakers
- BOOL getVoiceEnabled(const LLUUID& id); // true if we've received data for this avatar
+ bool getVoiceEnabled(const LLUUID& id); // true if we've received data for this avatar
std::string getDisplayName(const LLUUID& id);
- BOOL isOnlineSIP(const LLUUID &id);
- BOOL isParticipantAvatar(const LLUUID &id);
- BOOL getIsSpeaking(const LLUUID& id);
- BOOL getIsModeratorMuted(const LLUUID& id);
+ bool isOnlineSIP(const LLUUID &id);
+ bool isParticipantAvatar(const LLUUID &id);
+ bool getIsSpeaking(const LLUUID& id);
+ bool getIsModeratorMuted(const LLUUID& id);
F32 getCurrentPower(const LLUUID& id); // "power" is related to "amplitude" in a defined way. I'm just not sure what the formula is...
- BOOL getOnMuteList(const LLUUID& id);
+ bool getOnMuteList(const LLUUID& id);
F32 getUserVolume(const LLUUID& id);
/////////////////////////////
- BOOL getAreaVoiceDisabled(); // returns true if the area the avatar is in is speech-disabled.
+ bool getAreaVoiceDisabled(); // returns true if the area the avatar is in is speech-disabled.
// Use this to determine whether to show a "no speech" icon in the menu bar.
void getParticipantList(std::set<LLUUID> &participants);
bool isParticipant(const LLUUID& speaker_id);
@@ -436,9 +436,9 @@ public:
//////////////////////////
/// @name text chat
//@{
- BOOL isSessionTextIMPossible(const LLUUID& id);
- BOOL isSessionCallBackPossible(const LLUUID& id);
- //BOOL sendTextMessage(const LLUUID& participant_id, const std::string& message) const {return true;} ;
+ bool isSessionTextIMPossible(const LLUUID& id);
+ bool isSessionCallBackPossible(const LLUUID& id);
+ //bool sendTextMessage(const LLUUID& participant_id, const std::string& message) const {return true;} ;
void endUserIMSession(const LLUUID &uuid);
//@}
@@ -492,7 +492,7 @@ protected:
**/
class LLSpeakerVolumeStorage : public LLSingleton<LLSpeakerVolumeStorage>
{
- LLSINGLETON_C11(LLSpeakerVolumeStorage);
+ LLSINGLETON(LLSpeakerVolumeStorage);
~LLSpeakerVolumeStorage();
LOG_CLASS(LLSpeakerVolumeStorage);
diff --git a/indra/newview/llvoicevisualizer.cpp b/indra/newview/llvoicevisualizer.cpp
index d4dfd16c3b..3d7cedb823 100644
--- a/indra/newview/llvoicevisualizer.cpp
+++ b/indra/newview/llvoicevisualizer.cpp
@@ -77,7 +77,7 @@ const LLVector3 WORLD_UPWARD_DIRECTION = LLVector3( 0.0f, 0.0f, 1.0f ); // Z is
// Initialize the statics
//------------------------------------------------------------------
bool LLVoiceVisualizer::sPrefsInitialized = false;
-BOOL LLVoiceVisualizer::sLipSyncEnabled = FALSE;
+bool LLVoiceVisualizer::sLipSyncEnabled = false;
F32* LLVoiceVisualizer::sOoh = NULL;
F32* LLVoiceVisualizer::sAah = NULL;
U32 LLVoiceVisualizer::sOohs = 0;
@@ -125,7 +125,7 @@ LLVoiceVisualizer::LLVoiceVisualizer( const U8 type )
for (int i=0; i<NUM_VOICE_SYMBOL_WAVES; i++)
{
mSoundSymbol.mWaveFadeOutStartTime [i] = mCurrentTime;
- mSoundSymbol.mTexture [i] = LLViewerTextureManager::getFetchedTextureFromFile(sound_level_img[i], FTT_LOCAL_FILE, FALSE, LLGLTexture::BOOST_UI);
+ mSoundSymbol.mTexture [i] = LLViewerTextureManager::getFetchedTextureFromFile(sound_level_img[i], FTT_LOCAL_FILE, false, LLGLTexture::BOOST_UI);
mSoundSymbol.mWaveActive [i] = false;
mSoundSymbol.mWaveOpacity [i] = 1.0f;
mSoundSymbol.mWaveExpansion [i] = 1.0f;
@@ -284,7 +284,7 @@ void LLVoiceVisualizer::lipStringToF32s ( std::string& in_string, F32*& out_F32s
//--------------------------------------------------------------------------
void LLVoiceVisualizer::lipSyncOohAah( F32& ooh, F32& aah )
{
- if( ( sLipSyncEnabled == TRUE ) && mCurrentlySpeaking )
+ if( ( sLipSyncEnabled == true ) && mCurrentlySpeaking )
{
U32 transfer_index = (U32) (sOohPowerTransfersf * mSpeakingAmplitude);
if (transfer_index >= sOohPowerTransfers)
diff --git a/indra/newview/llvoicevisualizer.h b/indra/newview/llvoicevisualizer.h
index 36c78252d1..66956022b6 100644
--- a/indra/newview/llvoicevisualizer.h
+++ b/indra/newview/llvoicevisualizer.h
@@ -135,7 +135,7 @@ class LLVoiceVisualizer : public LLHUDEffect
// private static members
//---------------------------------------------------
- static BOOL sLipSyncEnabled; // 0 disabled, 1 babble loop
+ static bool sLipSyncEnabled; // 0 disabled, 1 babble loop
static bool sPrefsInitialized; // the first instance will initialize the static members
static F32* sOoh; // the babble loop of amplitudes for the ooh morph
static F32* sAah; // the babble loop of amplitudes for the ooh morph
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 310c9ee297..432005ae4d 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -1957,7 +1957,7 @@ bool LLVivoxVoiceClient::terminateAudioSession(bool wait)
<< " VoiceEnabled " << mVoiceEnabled
<< " IsInitialized " << mIsInitialized
<< " RelogRequested " << mRelogRequested
- << " ShuttingDown " << (sShuttingDown ? "TRUE" : "FALSE")
+ << " ShuttingDown " << (sShuttingDown ? "true" : "false")
<< " returning " << status
<< LL_ENDL;
return status;
@@ -5171,16 +5171,16 @@ bool LLVivoxVoiceClient::isVoiceWorking() const
// Returns true if the indicated participant in the current audio session is really an SL avatar.
// Currently this will be false only for PSTN callers into group chats, and PSTN p2p calls.
-BOOL LLVivoxVoiceClient::isParticipantAvatar(const LLUUID &id)
+bool LLVivoxVoiceClient::isParticipantAvatar(const LLUUID &id)
{
- BOOL result = TRUE;
+ bool result = true;
sessionStatePtr_t session(findSession(id));
if(session)
{
// this is a p2p session with the indicated caller, or the session with the specified UUID.
if(session->mSynthesizedCallerID)
- result = FALSE;
+ result = false;
}
else
{
@@ -5200,9 +5200,9 @@ BOOL LLVivoxVoiceClient::isParticipantAvatar(const LLUUID &id)
// Returns true if calling back the session URI after the session has closed is possible.
// Currently this will be false only for PSTN P2P calls.
-BOOL LLVivoxVoiceClient::isSessionCallBackPossible(const LLUUID &session_id)
+bool LLVivoxVoiceClient::isSessionCallBackPossible(const LLUUID &session_id)
{
- BOOL result = TRUE;
+ bool result = true;
sessionStatePtr_t session(findSession(session_id));
if(session != NULL)
@@ -5215,9 +5215,9 @@ BOOL LLVivoxVoiceClient::isSessionCallBackPossible(const LLUUID &session_id)
// Returns true if the session can accept text IM's.
// Currently this will be false only for PSTN P2P calls.
-BOOL LLVivoxVoiceClient::isSessionTextIMPossible(const LLUUID &session_id)
+bool LLVivoxVoiceClient::isSessionTextIMPossible(const LLUUID &session_id)
{
- bool result = TRUE;
+ bool result = true;
sessionStatePtr_t session(findSession(session_id));
if(session != NULL)
@@ -5333,7 +5333,7 @@ std::string LLVivoxVoiceClient::nameFromID(const LLUUID &uuid)
LLStringUtil::replaceChar(result, '+', '-');
LLStringUtil::replaceChar(result, '/', '_');
- // If you need to transform a GUID to this form on the Mac OS X command line, this will do so:
+ // If you need to transform a GUID to this form on the macOS command line, this will do so:
// echo -n x && (echo e669132a-6c43-4ee1-a78d-6c82fff59f32 |xxd -r -p |openssl base64|tr '/+' '_-')
// The reverse transform can be done with:
@@ -5646,12 +5646,12 @@ bool LLVivoxVoiceClient::voiceEnabled()
!gNonInteractive;
}
-void LLVivoxVoiceClient::setLipSyncEnabled(BOOL enabled)
+void LLVivoxVoiceClient::setLipSyncEnabled(bool enabled)
{
mLipSyncEnabled = enabled;
}
-BOOL LLVivoxVoiceClient::lipSyncEnabled()
+bool LLVivoxVoiceClient::lipSyncEnabled()
{
if ( mVoiceEnabled )
@@ -5660,7 +5660,7 @@ BOOL LLVivoxVoiceClient::lipSyncEnabled()
}
else
{
- return FALSE;
+ return false;
}
}
@@ -5706,15 +5706,15 @@ void LLVivoxVoiceClient::setMicGain(F32 volume)
/////////////////////////////
// Accessors for data related to nearby speakers
-BOOL LLVivoxVoiceClient::getVoiceEnabled(const LLUUID& id)
+bool LLVivoxVoiceClient::getVoiceEnabled(const LLUUID& id)
{
- BOOL result = FALSE;
+ bool result = false;
participantStatePtr_t participant(findParticipantByID(id));
if(participant)
{
// I'm not sure what the semantics of this should be.
// For now, if we have any data about the user that came through the chat channel, assume they're voice-enabled.
- result = TRUE;
+ result = true;
}
return result;
@@ -5734,16 +5734,16 @@ std::string LLVivoxVoiceClient::getDisplayName(const LLUUID& id)
-BOOL LLVivoxVoiceClient::getIsSpeaking(const LLUUID& id)
+bool LLVivoxVoiceClient::getIsSpeaking(const LLUUID& id)
{
- BOOL result = FALSE;
+ bool result = false;
participantStatePtr_t participant(findParticipantByID(id));
if(participant)
{
if (participant->mSpeakingTimeout.getElapsedTimeF32() > SPEAKING_TIMEOUT)
{
- participant->mIsSpeaking = FALSE;
+ participant->mIsSpeaking = false;
}
result = participant->mIsSpeaking;
}
@@ -5751,9 +5751,9 @@ BOOL LLVivoxVoiceClient::getIsSpeaking(const LLUUID& id)
return result;
}
-BOOL LLVivoxVoiceClient::getIsModeratorMuted(const LLUUID& id)
+bool LLVivoxVoiceClient::getIsModeratorMuted(const LLUUID& id)
{
- BOOL result = FALSE;
+ bool result = false;
participantStatePtr_t participant(findParticipantByID(id));
if(participant)
@@ -5778,9 +5778,9 @@ F32 LLVivoxVoiceClient::getCurrentPower(const LLUUID& id)
-BOOL LLVivoxVoiceClient::getUsingPTT(const LLUUID& id)
+bool LLVivoxVoiceClient::getUsingPTT(const LLUUID& id)
{
- BOOL result = FALSE;
+ bool result = false;
participantStatePtr_t participant(findParticipantByID(id));
if(participant)
@@ -5793,9 +5793,9 @@ BOOL LLVivoxVoiceClient::getUsingPTT(const LLUUID& id)
return result;
}
-BOOL LLVivoxVoiceClient::getOnMuteList(const LLUUID& id)
+bool LLVivoxVoiceClient::getOnMuteList(const LLUUID& id)
{
- BOOL result = FALSE;
+ bool result = false;
participantStatePtr_t participant(findParticipantByID(id));
if(participant)
@@ -5863,7 +5863,7 @@ std::string LLVivoxVoiceClient::getGroupID(const LLUUID& id)
return result;
}
-BOOL LLVivoxVoiceClient::getAreaVoiceDisabled()
+bool LLVivoxVoiceClient::getAreaVoiceDisabled()
{
return mAreaVoiceDisabled;
}
@@ -6437,37 +6437,43 @@ void LLVivoxVoiceClient::notifyStatusObservers(LLVoiceClientStatusObserver::ESta
}
}
}
-
+
LL_DEBUGS("Voice")
<< " " << LLVoiceClientStatusObserver::status2string(status)
<< ", session URI " << getAudioSessionURI()
<< ", proximal is " << inSpatialChannel()
<< LL_ENDL;
- for (status_observer_set_t::iterator it = mStatusObservers.begin();
- it != mStatusObservers.end();
- )
- {
- LLVoiceClientStatusObserver* observer = *it;
- observer->onChange(status, getAudioSessionURI(), inSpatialChannel());
- // In case onError() deleted an entry.
- it = mStatusObservers.upper_bound(observer);
- }
+ // this function is called from a coroutine, shuttle application hook back to main loop
+ auto work = [=]()
+ {
+ for (status_observer_set_t::iterator it = mStatusObservers.begin();
+ it != mStatusObservers.end();
+ )
+ {
+ LLVoiceClientStatusObserver* observer = *it;
+ observer->onChange(status, getAudioSessionURI(), inSpatialChannel());
+ // In case onError() deleted an entry.
+ it = mStatusObservers.upper_bound(observer);
+ }
- // skipped to avoid speak button blinking
- if ( status != LLVoiceClientStatusObserver::STATUS_JOINING
- && status != LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL
- && status != LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED)
- {
- bool voice_status = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking();
+ // skipped to avoid speak button blinking
+ if (status != LLVoiceClientStatusObserver::STATUS_JOINING
+ && status != LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL
+ && status != LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED)
+ {
+ bool voice_status = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking();
- gAgent.setVoiceConnected(voice_status);
+ gAgent.setVoiceConnected(voice_status);
- if (voice_status)
- {
- LLFirstUse::speak(true);
- }
- }
+ if (voice_status)
+ {
+ LLFirstUse::speak(true);
+ }
+ }
+ };
+
+ LLAppViewer::instance()->postToMainCoro(work);
}
void LLVivoxVoiceClient::addObserver(LLFriendObserver* observer)
@@ -7098,7 +7104,7 @@ void LLVivoxVoiceClient::updateVoiceMorphingMenu()
const voice_effect_list_t& effect_list = effect_interfacep->getVoiceEffectList();
if (!effect_list.empty())
{
- LLMenuGL * voice_morphing_menup = gMenuBarView->findChildMenuByName("VoiceMorphing", TRUE);
+ LLMenuGL * voice_morphing_menup = gMenuBarView->findChildMenuByName("VoiceMorphing", true);
if (NULL != voice_morphing_menup)
{
diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h
index 7e1835d876..aaff93495a 100644
--- a/indra/newview/llvoicevivox.h
+++ b/indra/newview/llvoicevivox.h
@@ -111,7 +111,7 @@ public:
virtual bool isParticipant(const LLUUID& speaker_id) override;
// Send a text message to the specified user, initiating the session if necessary.
- // virtual BOOL sendTextMessage(const LLUUID& participant_id, const std::string& message) const {return false;};
+ // virtual bool sendTextMessage(const LLUUID& participant_id, const std::string& message) const {return false;};
// close any existing text IM session with the specified user
virtual void endUserIMSession(const LLUUID &uuid) override;
@@ -119,12 +119,12 @@ public:
// Returns true if calling back the session URI after the session has closed is possible.
// Currently this will be false only for PSTN P2P calls.
// NOTE: this will return true if the session can't be found.
- virtual BOOL isSessionCallBackPossible(const LLUUID &session_id) override;
+ virtual bool isSessionCallBackPossible(const LLUUID &session_id) override;
// Returns true if the session can accepte text IM's.
// Currently this will be false only for PSTN P2P calls.
// NOTE: this will return true if the session can't be found.
- virtual BOOL isSessionTextIMPossible(const LLUUID &session_id) override;
+ virtual bool isSessionTextIMPossible(const LLUUID &session_id) override;
////////////////////////////
@@ -172,21 +172,21 @@ public:
//@{
virtual bool voiceEnabled() override;
virtual void setVoiceEnabled(bool enabled) override;
- virtual BOOL lipSyncEnabled() override;
- virtual void setLipSyncEnabled(BOOL enabled) override;
+ virtual bool lipSyncEnabled() override;
+ virtual void setLipSyncEnabled(bool enabled) override;
virtual void setMuteMic(bool muted) override; // Set the mute state of the local mic.
//@}
//////////////////////////
/// @name nearby speaker accessors
//@{
- virtual BOOL getVoiceEnabled(const LLUUID& id) override; // true if we've received data for this avatar
+ virtual bool getVoiceEnabled(const LLUUID& id) override; // true if we've received data for this avatar
virtual std::string getDisplayName(const LLUUID& id) override;
- virtual BOOL isParticipantAvatar(const LLUUID &id) override;
- virtual BOOL getIsSpeaking(const LLUUID& id) override;
- virtual BOOL getIsModeratorMuted(const LLUUID& id) override;
+ virtual bool isParticipantAvatar(const LLUUID &id) override;
+ virtual bool getIsSpeaking(const LLUUID& id) override;
+ virtual bool getIsModeratorMuted(const LLUUID& id) override;
virtual F32 getCurrentPower(const LLUUID& id) override; // "power" is related to "amplitude" in a defined way. I'm just not sure what the formula is...
- virtual BOOL getOnMuteList(const LLUUID& id) override;
+ virtual bool getOnMuteList(const LLUUID& id) override;
virtual F32 getUserVolume(const LLUUID& id) override;
virtual void setUserVolume(const LLUUID& id, F32 volume) override; // set's volume for specified agent, from 0-1 (where .5 is nominal)
//@}
@@ -490,11 +490,11 @@ protected:
// Accessors for data related to nearby speakers
// MBW -- XXX -- Not sure how to get this data out of the TVC
- BOOL getUsingPTT(const LLUUID& id);
+ bool getUsingPTT(const LLUUID& id);
std::string getGroupID(const LLUUID& id); // group ID if the user is in group chat (empty string if not applicable)
/////////////////////////////
- BOOL getAreaVoiceDisabled(); // returns true if the area the avatar is in is speech-disabled.
+ bool getAreaVoiceDisabled(); // returns true if the area the avatar is in is speech-disabled.
// Use this to determine whether to show a "no speech" icon in the menu bar.
@@ -807,7 +807,7 @@ private:
std::string mWriteString;
size_t mWriteOffset;
- BOOL mLipSyncEnabled;
+ bool mLipSyncEnabled;
typedef std::set<LLVoiceClientParticipantObserver*> observer_set_t;
observer_set_t mParticipantObservers;
diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp
index 99874b8185..bae791d86d 100644
--- a/indra/newview/llvopartgroup.cpp
+++ b/indra/newview/llvopartgroup.cpp
@@ -139,7 +139,7 @@ LLVOPartGroup::LLVOPartGroup(const LLUUID &id, const LLPCode pcode, LLViewerRegi
{
setNumTEs(1);
setTETexture(0, LLUUID::null);
- mbCanSelect = FALSE; // users can't select particle systems
+ mbCanSelect = false; // users can't select particle systems
}
@@ -147,9 +147,9 @@ LLVOPartGroup::~LLVOPartGroup()
{
}
-BOOL LLVOPartGroup::isActive() const
+bool LLVOPartGroup::isActive() const
{
- return FALSE;
+ return false;
}
F32 LLVOPartGroup::getBinRadius()
@@ -207,7 +207,7 @@ void LLVOPartGroup::updateTextures()
LLDrawable* LLVOPartGroup::createDrawable(LLPipeline *pipeline)
{
pipeline->allocDrawable(this);
- mDrawable->setLit(FALSE);
+ mDrawable->setLit(false);
mDrawable->setRenderType(LLPipeline::RENDER_TYPE_PARTICLES);
return mDrawable;
}
@@ -270,7 +270,7 @@ LLVector3 LLVOPartGroup::getCameraPosition() const
return gAgentCamera.getCameraPositionAgent();
}
-BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable)
+bool LLVOPartGroup::updateGeometry(LLDrawable *drawable)
{
LL_PROFILE_ZONE_SCOPED;
@@ -298,12 +298,12 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable)
}
drawable->setNumFaces(0, NULL, getTEImage(0));
LLPipeline::sCompiles++;
- return TRUE;
+ return true;
}
if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_PARTICLES)))
{
- return TRUE;
+ return true;
}
if (num_parts > drawable->getNumFaces())
@@ -441,15 +441,15 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable)
mDrawable->movePartition();
LLPipeline::sCompiles++;
- return TRUE;
+ return true;
}
-BOOL LLVOPartGroup::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
+bool LLVOPartGroup::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face,
- BOOL pick_transparent,
- BOOL pick_rigged,
- BOOL pick_unselectable,
+ bool pick_transparent,
+ bool pick_rigged,
+ bool pick_unselectable,
S32* face_hit,
LLVector4a* intersection,
LLVector2* tex_coord,
@@ -460,7 +460,7 @@ BOOL LLVOPartGroup::lineSegmentIntersect(const LLVector4a& start, const LLVector
dir.setSub(end, start);
F32 closest_t = 2.f;
- BOOL ret = FALSE;
+ bool ret = false;
for (U32 idx = 0; idx < mViewerPartGroupp->mParticles.size(); ++idx)
{
@@ -480,7 +480,7 @@ BOOL LLVOPartGroup::lineSegmentIntersect(const LLVector4a& start, const LLVector
t <= 1.f &&
t < closest_t)
{
- ret = TRUE;
+ ret = true;
closest_t = t;
if (face_hit)
{
@@ -702,7 +702,7 @@ U32 LLVOPartGroup::getPartitionType() const
}
LLParticlePartition::LLParticlePartition(LLViewerRegion* regionp)
-: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, regionp)
+: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, true, regionp)
{
mRenderPass = LLRenderPass::PASS_ALPHA;
mDrawableType = LLPipeline::RENDER_TYPE_PARTICLES;
@@ -889,7 +889,7 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group)
object->getGeometry(facep->getTEOffset(), cur_vert, cur_norm, cur_tc, cur_col, cur_glow, cur_idx);
- bool has_glow = FALSE;
+ bool has_glow = false;
if (cur_glow.get() != start_glow)
{
@@ -972,7 +972,7 @@ U32 LLVOHUDPartGroup::getPartitionType() const
LLDrawable* LLVOHUDPartGroup::createDrawable(LLPipeline *pipeline)
{
pipeline->allocDrawable(this);
- mDrawable->setLit(FALSE);
+ mDrawable->setLit(false);
mDrawable->setRenderType(LLPipeline::RENDER_TYPE_HUD_PARTICLES);
return mDrawable;
}
diff --git a/indra/newview/llvopartgroup.h b/indra/newview/llvopartgroup.h
index 4d471134d4..c6f56087dc 100644
--- a/indra/newview/llvopartgroup.h
+++ b/indra/newview/llvopartgroup.h
@@ -56,18 +56,18 @@ public:
LLVOPartGroup(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
- /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate.
+ /*virtual*/ bool isActive() const; // Whether this object needs to do an idleUpdate.
void idleUpdate(LLAgent &agent, const F64 &time);
virtual F32 getBinRadius();
virtual void updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax);
virtual U32 getPartitionType() const;
- /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
+ /*virtual*/ bool lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face,
- BOOL pick_transparent,
- BOOL pick_rigged,
- BOOL pick_unselectable,
+ bool pick_transparent,
+ bool pick_rigged,
+ bool pick_unselectable,
S32* face_hit,
LLVector4a* intersection,
LLVector2* tex_coord,
@@ -78,7 +78,7 @@ public:
/*virtual*/ void updateTextures();
/*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);
- /*virtual*/ BOOL updateGeometry(LLDrawable *drawable);
+ /*virtual*/ bool updateGeometry(LLDrawable *drawable);
void getGeometry(const LLViewerPart& part,
LLStrider<LLVector4a>& verticesp);
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index 20621665fa..fa0cbb53be 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -105,7 +105,7 @@ void LLSkyTex::init(bool isShiny)
for (S32 i = 0; i < 2; ++i)
{
- mTexture[i] = LLViewerTextureManager::getLocalTexture(FALSE);
+ mTexture[i] = LLViewerTextureManager::getLocalTexture(false);
mTexture[i]->setAddressMode(LLTexUnit::TAM_CLAMP);
mImageRaw[i] = new LLImageRaw(SKYTEX_RESOLUTION, SKYTEX_RESOLUTION, SKYTEX_COMPONENTS);
@@ -123,7 +123,7 @@ void LLSkyTex::restoreGL()
{
for (S32 i = 0; i < 2; i++)
{
- mTexture[i] = LLViewerTextureManager::getLocalTexture(FALSE);
+ mTexture[i] = LLViewerTextureManager::getLocalTexture(false);
mTexture[i]->setAddressMode(LLTexUnit::TAM_CLAMP);
}
}
@@ -158,7 +158,7 @@ S32 LLSkyTex::getNext()
return ((sCurrent+1) & 1);
}
-S32 LLSkyTex::getWhich(const BOOL curr)
+S32 LLSkyTex::getWhich(const bool curr)
{
int tex = curr ? sCurrent : getNext();
return tex;
@@ -166,6 +166,7 @@ S32 LLSkyTex::getWhich(const BOOL curr)
void LLSkyTex::initEmpty(const S32 tex)
{
+ LLImageDataLock lock(mImageRaw[tex]);
U8* data = mImageRaw[tex]->getData();
for (S32 i = 0; i < SKYTEX_RESOLUTION; ++i)
{
@@ -187,7 +188,8 @@ void LLSkyTex::initEmpty(const S32 tex)
void LLSkyTex::create()
{
- U8* data = mImageRaw[sCurrent]->getData();
+ LLImageDataSharedLock lock(mImageRaw[sCurrent]);
+ const U8* data = mImageRaw[sCurrent]->getData();
for (S32 i = 0; i < SKYTEX_RESOLUTION; ++i)
{
for (S32 j = 0; j < SKYTEX_RESOLUTION; ++j)
@@ -205,17 +207,17 @@ void LLSkyTex::create()
void LLSkyTex::createGLImage(S32 which)
{
mTexture[which]->setExplicitFormat(GL_RGBA8, GL_RGBA);
- mTexture[which]->createGLTexture(0, mImageRaw[which], 0, TRUE, LLGLTexture::LOCAL);
+ mTexture[which]->createGLTexture(0, mImageRaw[which], 0, true, LLGLTexture::LOCAL);
mTexture[which]->setAddressMode(LLTexUnit::TAM_CLAMP);
}
-void LLSkyTex::bindTexture(BOOL curr)
+void LLSkyTex::bindTexture(bool curr)
{
int tex = getWhich(curr);
gGL.getTexUnit(0)->bind(mTexture[tex], true);
}
-LLImageRaw* LLSkyTex::getImageRaw(BOOL curr)
+LLImageRaw* LLSkyTex::getImageRaw(bool curr)
{
int tex = getWhich(curr);
return mImageRaw[tex];
@@ -232,10 +234,10 @@ LLHeavenBody::LLHeavenBody(const F32 rad)
mDirection(LLVector3(0,0,0)),
mIntensity(0.f),
mDiskRadius(rad),
- mDraw(FALSE),
+ mDraw(false),
mHorizonVisibility(1.f),
mVisibility(1.f),
- mVisible(FALSE)
+ mVisible(false)
{
mColor.setToBlack();
mColorCached.setToBlack();
@@ -394,24 +396,24 @@ const S32 SKYTEX_TILE_RES_X = SKYTEX_RESOLUTION / NUM_TILES_X;
const S32 SKYTEX_TILE_RES_Y = SKYTEX_RESOLUTION / NUM_TILES_Y;
LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
-: LLStaticViewerObject(id, pcode, regionp, TRUE),
+: LLStaticViewerObject(id, pcode, regionp, true),
mSun(SUN_DISK_RADIUS), mMoon(MOON_DISK_RADIUS),
mBrightnessScale(1.f),
mBrightnessScaleNew(0.f),
mBrightnessScaleGuess(1.f),
- mWeatherChange(FALSE),
+ mWeatherChange(false),
mCloudDensity(0.2f),
mWind(0.f),
- mForceUpdate(FALSE),
- mNeedUpdate(TRUE),
+ mForceUpdate(false),
+ mNeedUpdate(true),
mCubeMapUpdateStage(-1),
mWorldScale(1.f),
mBumpSunDir(0.f, 0.f, 1.f)
{
/// WL PARAMS
- mInitialized = FALSE;
- mbCanSelect = FALSE;
+ mInitialized = false;
+ mbCanSelect = false;
mUpdateTimer.reset();
mForceUpdateThrottle.setTimerExpirySec(UPDATE_EXPRY);
@@ -434,7 +436,7 @@ LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
mSun.setIntensity(SUN_INTENSITY);
mMoon.setIntensity(0.1f * SUN_INTENSITY);
- mHeavenlyBodyUpdated = FALSE ;
+ mHeavenlyBodyUpdated = false ;
mDrawRefl = 0;
mInterpVal = 0.f;
@@ -477,10 +479,10 @@ void LLVOSky::init()
mInitialized = true;
- mHeavenlyBodyUpdated = FALSE ;
+ mHeavenlyBodyUpdated = false ;
- mRainbowMap = LLViewerTextureManager::getFetchedTexture(psky->getRainbowTextureId(), FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
- mHaloMap = LLViewerTextureManager::getFetchedTexture(psky->getHaloTextureId(), FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
+ mRainbowMap = LLViewerTextureManager::getFetchedTexture(psky->getRainbowTextureId(), FTT_DEFAULT, true, LLGLTexture::BOOST_UI);
+ mHaloMap = LLViewerTextureManager::getFetchedTexture(psky->getHaloTextureId(), FTT_DEFAULT, true, LLGLTexture::BOOST_UI);
}
@@ -659,7 +661,7 @@ void LLVOSky::idleUpdate(LLAgent &agent, const F64 &time)
void LLVOSky::forceSkyUpdate()
{
- mForceUpdate = TRUE;
+ mForceUpdate = true;
m_lastAtmosphericsVars = {};
mCubeMapUpdateStage = -1;
}
@@ -671,12 +673,12 @@ bool LLVOSky::updateSky()
if (mDead || !(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SKY)))
{
// It's dead. Don't update it.
- return TRUE;
+ return true;
}
if (gGLManager.mIsDisabled)
{
- return TRUE;
+ return true;
}
LL_PROFILE_ZONE_SCOPED_CATEGORY_ENVIRONMENT;
@@ -695,8 +697,8 @@ bool LLVOSky::updateSky()
if (!mCubeMap || LLPipeline::sReflectionProbesEnabled)
{
mCubeMapUpdateStage = NUM_CUBEMAP_FACES;
- mForceUpdate = FALSE;
- return TRUE;
+ mForceUpdate = false;
+ return true;
}
if (mCubeMapUpdateStage < 0)
@@ -712,7 +714,7 @@ bool LLVOSky::updateSky()
// start updating cube map sides
updateFog(LLViewerCamera::getInstance()->getFar());
mCubeMapUpdateStage = 0;
- mForceUpdate = FALSE;
+ mForceUpdate = false;
}
}
else if (mCubeMapUpdateStage == NUM_CUBEMAP_FACES && !LLPipeline::sReflectionProbesEnabled)
@@ -722,7 +724,7 @@ bool LLVOSky::updateSky()
bool is_alm_wl_sky = gPipeline.canUseWindLightShaders();
- int tex = mSkyTex[0].getWhich(TRUE);
+ int tex = mSkyTex[0].getWhich(true);
for (int side = 0; side < NUM_CUBEMAP_FACES; side++)
{
@@ -731,14 +733,14 @@ bool LLVOSky::updateSky()
if (!is_alm_wl_sky)
{
- raw1 = mSkyTex[side].getImageRaw(TRUE);
- raw2 = mSkyTex[side].getImageRaw(FALSE);
+ raw1 = mSkyTex[side].getImageRaw(true);
+ raw2 = mSkyTex[side].getImageRaw(false);
raw2->copy(raw1);
mSkyTex[side].createGLImage(tex);
}
- raw1 = mShinyTex[side].getImageRaw(TRUE);
- raw2 = mShinyTex[side].getImageRaw(FALSE);
+ raw1 = mShinyTex[side].getImageRaw(true);
+ raw2 = mShinyTex[side].getImageRaw(false);
raw2->copy(raw1);
mShinyTex[side].createGLImage(tex);
}
@@ -763,8 +765,8 @@ bool LLVOSky::updateSky()
m_lastAtmosphericsVars = m_atmosphericsVars;
- mNeedUpdate = FALSE;
- mForceUpdate = FALSE;
+ mNeedUpdate = false;
+ mForceUpdate = false;
mForceUpdateThrottle.setTimerExpirySec(UPDATE_EXPRY);
@@ -791,7 +793,7 @@ bool LLVOSky::updateSky()
mCubeMapUpdateStage++;
}
- return TRUE;
+ return true;
}
void LLVOSky::updateTextures()
@@ -830,7 +832,7 @@ void LLVOSky::updateTextures()
LLDrawable *LLVOSky::createDrawable(LLPipeline *pipeline)
{
pipeline->allocDrawable(this);
- mDrawable->setLit(FALSE);
+ mDrawable->setLit(false);
LLDrawPoolSky *poolp = (LLDrawPoolSky*) gPipeline.getPool(LLDrawPool::POOL_SKY);
poolp->setSkyTex(mSkyTex);
@@ -865,8 +867,8 @@ void LLVOSky::setMoonScale(F32 moon_scale)
void LLVOSky::setSunTextures(const LLUUID& sun_texture, const LLUUID& sun_texture_next)
{
// We test the UUIDs here because we explicitly do not want the default image returned by getFetchedTexture in that case...
- mSunTexturep[0] = sun_texture.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(sun_texture, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
- mSunTexturep[1] = sun_texture_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(sun_texture_next, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
+ mSunTexturep[0] = sun_texture.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(sun_texture, FTT_DEFAULT, true, LLGLTexture::BOOST_UI);
+ mSunTexturep[1] = sun_texture_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(sun_texture_next, FTT_DEFAULT, true, LLGLTexture::BOOST_UI);
bool can_use_wl = gPipeline.canUseWindLightShaders();
@@ -909,8 +911,8 @@ void LLVOSky::setMoonTextures(const LLUUID& moon_texture, const LLUUID& moon_tex
bool can_use_wl = gPipeline.canUseWindLightShaders();
- mMoonTexturep[0] = moon_texture.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(moon_texture, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
- mMoonTexturep[1] = moon_texture_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(moon_texture_next, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
+ mMoonTexturep[0] = moon_texture.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(moon_texture, FTT_DEFAULT, true, LLGLTexture::BOOST_UI);
+ mMoonTexturep[1] = moon_texture_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(moon_texture_next, FTT_DEFAULT, true, LLGLTexture::BOOST_UI);
if (mFace[FACE_MOON])
{
@@ -932,8 +934,8 @@ void LLVOSky::setCloudNoiseTextures(const LLUUID& cloud_noise_texture, const LLU
{
LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky();
- mCloudNoiseTexturep[0] = cloud_noise_texture.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(cloud_noise_texture, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
- mCloudNoiseTexturep[1] = cloud_noise_texture_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(cloud_noise_texture_next, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
+ mCloudNoiseTexturep[0] = cloud_noise_texture.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(cloud_noise_texture, FTT_DEFAULT, true, LLGLTexture::BOOST_UI);
+ mCloudNoiseTexturep[1] = cloud_noise_texture_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(cloud_noise_texture_next, FTT_DEFAULT, true, LLGLTexture::BOOST_UI);
if (mCloudNoiseTexturep[0])
{
@@ -953,8 +955,8 @@ void LLVOSky::setBloomTextures(const LLUUID& bloom_texture, const LLUUID& bloom_
LLUUID bloom_tex = bloom_texture.isNull() ? psky->GetDefaultBloomTextureId() : bloom_texture;
LLUUID bloom_tex_next = bloom_texture_next.isNull() ? (bloom_texture.isNull() ? psky->GetDefaultBloomTextureId() : bloom_texture) : bloom_texture_next;
- mBloomTexturep[0] = bloom_tex.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(bloom_tex, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
- mBloomTexturep[1] = bloom_tex_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(bloom_tex_next, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
+ mBloomTexturep[0] = bloom_tex.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(bloom_tex, FTT_DEFAULT, true, LLGLTexture::BOOST_UI);
+ mBloomTexturep[1] = bloom_tex_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(bloom_tex_next, FTT_DEFAULT, true, LLGLTexture::BOOST_UI);
if (mBloomTexturep[0])
{
@@ -967,7 +969,7 @@ void LLVOSky::setBloomTextures(const LLUUID& bloom_texture, const LLUUID& bloom_
}
}
-BOOL LLVOSky::updateGeometry(LLDrawable *drawable)
+bool LLVOSky::updateGeometry(LLDrawable *drawable)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
if (mFace[FACE_REFLECTION] == NULL)
@@ -1069,7 +1071,7 @@ BOOL LLVOSky::updateGeometry(LLDrawable *drawable)
const F32 camera_height = mCameraPosAgent.mV[2];
const F32 height_above_water = camera_height - water_height;
- bool sun_flag = FALSE;
+ bool sun_flag = false;
if (mSun.isVisible())
{
sun_flag = !mMoon.isVisible() || ((look_at * mSun.getDirection()) > 0);
@@ -1084,12 +1086,12 @@ BOOL LLVOSky::updateGeometry(LLDrawable *drawable)
}
LLPipeline::sCompiles++;
- return TRUE;
+ return true;
}
bool LLVOSky::updateHeavenlyBodyGeometry(LLDrawable *drawable, F32 scale, const S32 f, LLHeavenBody& hb, const LLVector3 &up, const LLVector3 &right)
{
- mHeavenlyBodyUpdated = TRUE ;
+ mHeavenlyBodyUpdated = true ;
LLStrider<LLVector3> verticesp;
LLStrider<LLVector3> normalsp;
@@ -1131,7 +1133,7 @@ bool LLVOSky::updateHeavenlyBodyGeometry(LLDrawable *drawable, F32 scale, const
v_clipped[2] = draw_pos + scaled_right + scaled_up;
v_clipped[3] = draw_pos + scaled_right - scaled_up;
- hb.setVisible(TRUE);
+ hb.setVisible(true);
facep = mFace[f];
@@ -1156,7 +1158,7 @@ bool LLVOSky::updateHeavenlyBodyGeometry(LLDrawable *drawable, F32 scale, const
if (-1 == index_offset)
{
- return TRUE;
+ return true;
}
for (S32 vtx = 0; vtx < 4; ++vtx)
@@ -1180,7 +1182,7 @@ bool LLVOSky::updateHeavenlyBodyGeometry(LLDrawable *drawable, F32 scale, const
facep->getVertexBuffer()->unmapBuffer();
- return TRUE;
+ return true;
}
F32 dtReflection(const LLVector3& p, F32 cos_dir_from_top, F32 sin_dir_from_top, F32 diff_angl_dir)
diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h
index 5941ab6e3b..b4e9993537 100644
--- a/indra/newview/llvosky.h
+++ b/indra/newview/llvosky.h
@@ -60,7 +60,7 @@ private:
static S32 sCurrent;
public:
- void bindTexture(BOOL curr = TRUE);
+ void bindTexture(bool curr = true);
protected:
LLSkyTex();
@@ -75,7 +75,7 @@ protected:
static S32 getCurrent();
static S32 stepCurrent();
static S32 getNext();
- static S32 getWhich(const BOOL curr);
+ static S32 getWhich(const bool curr);
void initEmpty(const S32 tex);
@@ -101,6 +101,7 @@ protected:
void setPixel(const LLColor4U &col, const S32 i, const S32 j)
{
+ LLImageDataSharedLock lock(mImageRaw[sCurrent]);
S32 offset = (i * SKYTEX_RESOLUTION + j) * SKYTEX_COMPONENTS;
U32* pix = (U32*) &(mImageRaw[sCurrent]->getData()[offset]);
*pix = col.asRGBA();
@@ -109,14 +110,15 @@ protected:
LLColor4U getPixel(const S32 i, const S32 j)
{
LLColor4U col;
+ LLImageDataSharedLock lock(mImageRaw[sCurrent]);
S32 offset = (i * SKYTEX_RESOLUTION + j) * SKYTEX_COMPONENTS;
U32* pix = (U32*) &(mImageRaw[sCurrent]->getData()[offset]);
col.fromRGBA( *pix );
return col;
}
- LLImageRaw* getImageRaw(BOOL curr=TRUE);
- void createGLImage(BOOL curr=TRUE);
+ LLImageRaw* getImageRaw(bool curr=true);
+ void createGLImage(S32 which);
bool mIsShiny;
};
@@ -135,7 +137,7 @@ protected:
LLVector3 mAngularVelocity; // velocity of the local heavenly body
F32 mDiskRadius;
- bool mDraw; // FALSE - do not draw.
+ bool mDraw; // false - do not draw.
F32 mHorizonVisibility; // number [0, 1] due to how horizon
F32 mVisibility; // same but due to other objects being in throng.
bool mVisible;
@@ -229,7 +231,7 @@ public:
// later?
/*virtual*/ void updateTextures();
/*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);
- /*virtual*/ BOOL updateGeometry(LLDrawable *drawable);
+ /*virtual*/ bool updateGeometry(LLDrawable *drawable);
const LLHeavenBody& getSun() const { return mSun; }
const LLHeavenBody& getMoon() const { return mMoon; }
diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp
index 15fabf0414..ba548ad24a 100644
--- a/indra/newview/llvosurfacepatch.cpp
+++ b/indra/newview/llvosurfacepatch.cpp
@@ -39,6 +39,7 @@
#include "llviewerobjectlist.h"
#include "llviewerregion.h"
#include "llvlcomposition.h"
+#include "llvolume.h"
#include "llvovolume.h"
#include "pipeline.h"
#include "llspatialpartition.h"
@@ -47,19 +48,19 @@ F32 LLVOSurfacePatch::sLODFactor = 1.f;
LLVOSurfacePatch::LLVOSurfacePatch(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
: LLStaticViewerObject(id, pcode, regionp),
- mDirtiedPatch(FALSE),
+ mDirtiedPatch(false),
mPool(NULL),
mBaseComp(0),
mPatchp(NULL),
- mDirtyTexture(FALSE),
- mDirtyTerrain(FALSE),
+ mDirtyTexture(false),
+ mDirtyTerrain(false),
mLastNorthStride(0),
mLastEastStride(0),
mLastStride(0),
mLastLength(0)
{
// Terrain must draw during selection passes so it can block objects behind it.
- mbCanSelect = TRUE;
+ mbCanSelect = true;
setScale(LLVector3(16.f, 16.f, 16.f)); // Hack for setting scale for bounding boxes/visibility.
}
@@ -81,9 +82,9 @@ void LLVOSurfacePatch::markDead()
}
-BOOL LLVOSurfacePatch::isActive() const
+bool LLVOSurfacePatch::isActive() const
{
- return FALSE;
+ return false;
}
@@ -146,7 +147,7 @@ void LLVOSurfacePatch::updateGL()
}
}
-BOOL LLVOSurfacePatch::updateGeometry(LLDrawable *drawable)
+bool LLVOSurfacePatch::updateGeometry(LLDrawable *drawable)
{
LL_PROFILE_ZONE_SCOPED;
@@ -208,11 +209,12 @@ BOOL LLVOSurfacePatch::updateGeometry(LLDrawable *drawable)
mLastNorthStride = north_stride;
mLastEastStride = east_stride;
- return TRUE;
+ return true;
}
void LLVOSurfacePatch::updateFaceSize(S32 idx)
{
+ LL_PROFILE_ZONE_SCOPED;
if (idx != 0)
{
LL_WARNS() << "Terrain partition requested invalid face!!!" << LL_ENDL;
@@ -236,53 +238,55 @@ void LLVOSurfacePatch::updateFaceSize(S32 idx)
}
}
-BOOL LLVOSurfacePatch::updateLOD()
+bool LLVOSurfacePatch::updateLOD()
{
- return TRUE;
+ return true;
}
-void LLVOSurfacePatch::getGeometry(LLStrider<LLVector3> &verticesp,
- LLStrider<LLVector3> &normalsp,
- LLStrider<LLVector2> &texCoords0p,
- LLStrider<LLVector2> &texCoords1p,
- LLStrider<U16> &indicesp)
+void LLVOSurfacePatch::getTerrainGeometry(LLStrider<LLVector3> &verticesp,
+ LLStrider<LLVector3> &normalsp,
+ LLStrider<LLVector2> &texCoords0p,
+ LLStrider<LLVector2> &texCoords1p,
+ LLStrider<U16> &indicesp)
{
LLFace* facep = mDrawable->getFace(0);
- if (facep)
- {
- U32 index_offset = facep->getGeomIndex();
-
- updateMainGeometry(facep,
- verticesp,
- normalsp,
- texCoords0p,
- texCoords1p,
- indicesp,
- index_offset);
- updateNorthGeometry(facep,
- verticesp,
- normalsp,
- texCoords0p,
- texCoords1p,
- indicesp,
- index_offset);
- updateEastGeometry(facep,
- verticesp,
- normalsp,
- texCoords0p,
- texCoords1p,
- indicesp,
- index_offset);
- }
+ if (!facep)
+ {
+ return;
+ }
+
+ U32 index_offset = facep->getGeomIndex();
+
+ updateMainGeometry(facep,
+ verticesp,
+ normalsp,
+ texCoords0p,
+ texCoords1p,
+ indicesp,
+ index_offset);
+ updateNorthGeometry(facep,
+ verticesp,
+ normalsp,
+ texCoords0p,
+ texCoords1p,
+ indicesp,
+ index_offset);
+ updateEastGeometry(facep,
+ verticesp,
+ normalsp,
+ texCoords0p,
+ texCoords1p,
+ indicesp,
+ index_offset);
}
void LLVOSurfacePatch::updateMainGeometry(LLFace *facep,
- LLStrider<LLVector3> &verticesp,
- LLStrider<LLVector3> &normalsp,
- LLStrider<LLVector2> &texCoords0p,
- LLStrider<LLVector2> &texCoords1p,
- LLStrider<U16> &indicesp,
- U32 &index_offset)
+ LLStrider<LLVector3> &verticesp,
+ LLStrider<LLVector3> &normalsp,
+ LLStrider<LLVector2> &texCoords0p,
+ LLStrider<LLVector2> &texCoords1p,
+ LLStrider<U16> &indicesp,
+ U32 &index_offset)
{
S32 i, j, x, y;
@@ -381,12 +385,12 @@ void LLVOSurfacePatch::updateMainGeometry(LLFace *facep,
void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
- LLStrider<LLVector3> &verticesp,
- LLStrider<LLVector3> &normalsp,
- LLStrider<LLVector2> &texCoords0p,
- LLStrider<LLVector2> &texCoords1p,
- LLStrider<U16> &indicesp,
- U32 &index_offset)
+ LLStrider<LLVector3> &verticesp,
+ LLStrider<LLVector3> &normalsp,
+ LLStrider<LLVector2> &texCoords0p,
+ LLStrider<LLVector2> &texCoords1p,
+ LLStrider<U16> &indicesp,
+ U32 &index_offset)
{
S32 i, x, y;
@@ -571,12 +575,12 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
}
void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
- LLStrider<LLVector3> &verticesp,
- LLStrider<LLVector3> &normalsp,
- LLStrider<LLVector2> &texCoords0p,
- LLStrider<LLVector2> &texCoords1p,
- LLStrider<U16> &indicesp,
- U32 &index_offset)
+ LLStrider<LLVector3> &verticesp,
+ LLStrider<LLVector3> &normalsp,
+ LLStrider<LLVector2> &texCoords0p,
+ LLStrider<LLVector2> &texCoords1p,
+ LLStrider<U16> &indicesp,
+ U32 &index_offset)
{
S32 i, x, y;
@@ -762,9 +766,9 @@ void LLVOSurfacePatch::setPatch(LLSurfacePatch *patchp)
void LLVOSurfacePatch::dirtyPatch()
{
- mDirtiedPatch = TRUE;
+ mDirtiedPatch = true;
dirtyGeom();
- mDirtyTerrain = TRUE;
+ mDirtyTerrain = true;
LLVector3 center = mPatchp->getCenterRegion();
LLSurface *surfacep = mPatchp->getSurface();
@@ -853,14 +857,14 @@ void LLVOSurfacePatch::getGeomSizesEast(const S32 stride, const S32 east_stride,
}
}
-BOOL LLVOSurfacePatch::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_unselectable, S32 *face_hitp,
+bool LLVOSurfacePatch::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, bool pick_transparent, bool pick_rigged, bool pick_unselectable, S32 *face_hitp,
LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent)
{
if (!lineSegmentBoundingBox(start, end))
{
- return FALSE;
+ return false;
}
LLVector4a da;
@@ -881,7 +885,7 @@ BOOL LLVOSurfacePatch::lineSegmentIntersect(const LLVector4a& start, const LLVec
if (mRegionp->getLandHeightRegion(origin) > origin.mV[2])
{
//origin is under ground, treat as no intersection
- return FALSE;
+ return false;
}
//step one meter at a time until intersection point found
@@ -939,7 +943,7 @@ BOOL LLVOSurfacePatch::lineSegmentIntersect(const LLVector4a& start, const LLVec
normal->load3((mRegionp->getLand().resolveNormalGlobal(mRegionp->getPosGlobalFromRegion(sample))).mV);
}
- return TRUE;
+ return true;
}
}
@@ -951,7 +955,7 @@ BOOL LLVOSurfacePatch::lineSegmentIntersect(const LLVector4a& start, const LLVec
}
- return FALSE;
+ return false;
}
void LLVOSurfacePatch::updateSpatialExtents(LLVector4a& newMin, LLVector4a &newMax)
@@ -974,14 +978,57 @@ U32 LLVOSurfacePatch::getPartitionType() const
}
LLTerrainPartition::LLTerrainPartition(LLViewerRegion* regionp)
-: LLSpatialPartition(LLDrawPoolTerrain::VERTEX_DATA_MASK, FALSE, regionp)
+: LLSpatialPartition(LLDrawPoolTerrain::VERTEX_DATA_MASK, false, regionp)
{
- mOcclusionEnabled = FALSE;
- mInfiniteFarClip = TRUE;
+ mOcclusionEnabled = false;
+ mInfiniteFarClip = true;
mDrawableType = LLPipeline::RENDER_TYPE_TERRAIN;
mPartitionType = LLViewerRegion::PARTITION_TERRAIN;
}
+// Do not add vertices; honor strict vertex count specified by strider_vertex_count
+void gen_terrain_tangents(U16 strider_vertex_count,
+ U32 strider_index_count,
+ LLStrider<LLVector3> &verticesp,
+ LLStrider<LLVector3> &normalsp,
+ LLStrider<LLVector4a> &tangentsp,
+ LLStrider<LLVector2> &texCoords0p,
+ LLStrider<U16> &indicesp)
+{
+ LL_PROFILE_ZONE_SCOPED
+
+ LLVector4a *vertices = new LLVector4a[strider_vertex_count];
+ LLVector4a *normals = new LLVector4a[strider_vertex_count];
+ LLVector4a *tangents = new LLVector4a[strider_vertex_count];
+ std::vector<LLVector2> texcoords(strider_vertex_count);
+ std::vector<U16> indices(strider_index_count);
+
+ for (U16 v = 0; v < strider_vertex_count; ++v)
+ {
+ F32 *vert = verticesp[v].mV;
+ vertices[v] = LLVector4a(vert[0], vert[1], vert[2], 1.f);
+ F32 *n = normalsp[v].mV;
+ normals[v] = LLVector4a(n[0], n[1], n[2], 1.f);
+ tangents[v] = tangentsp[v];
+ texcoords[v] = texCoords0p[v];
+ }
+ for (U32 i = 0; i < strider_index_count; ++i)
+ {
+ indices[i] = indicesp[i];
+ }
+
+ LLCalculateTangentArray(strider_vertex_count, vertices, normals, texcoords.data(), strider_index_count / 3, indices.data(), tangents);
+
+ for (U16 v = 0; v < strider_vertex_count; ++v)
+ {
+ tangentsp[v] = tangents[v];
+ }
+
+ delete[] vertices;
+ delete[] normals;
+ delete[] tangents;
+}
+
void LLTerrainPartition::getGeometry(LLSpatialGroup* group)
{
LL_PROFILE_ZONE_SCOPED;
@@ -989,35 +1036,57 @@ void LLTerrainPartition::getGeometry(LLSpatialGroup* group)
LLVertexBuffer* buffer = group->mVertexBuffer;
//get vertex buffer striders
- LLStrider<LLVector3> vertices;
- LLStrider<LLVector3> normals;
- LLStrider<LLVector2> texcoords2;
- LLStrider<LLVector2> texcoords;
- LLStrider<U16> indices;
-
- llassert_always(buffer->getVertexStrider(vertices));
- llassert_always(buffer->getNormalStrider(normals));
- llassert_always(buffer->getTexCoord0Strider(texcoords));
- llassert_always(buffer->getTexCoord1Strider(texcoords2));
- llassert_always(buffer->getIndexStrider(indices));
-
- U32 indices_index = 0;
- U32 index_offset = 0;
-
- for (std::vector<LLFace*>::iterator i = mFaceList.begin(); i != mFaceList.end(); ++i)
- {
- LLFace* facep = *i;
-
- facep->setIndicesIndex(indices_index);
- facep->setGeomIndex(index_offset);
- facep->setVertexBuffer(buffer);
-
- LLVOSurfacePatch* patchp = (LLVOSurfacePatch*) facep->getViewerObject();
- patchp->getGeometry(vertices, normals, texcoords, texcoords2, indices);
-
- indices_index += facep->getIndicesCount();
- index_offset += facep->getGeomCount();
- }
+ LLStrider<LLVector3> vertices_start;
+ LLStrider<LLVector3> normals_start;
+ LLStrider<LLVector4a> tangents_start;
+ LLStrider<LLVector2> texcoords_start;
+ LLStrider<LLVector2> texcoords2_start;
+ LLStrider<U16> indices_start;
+
+ llassert_always(buffer->getVertexStrider(vertices_start));
+ llassert_always(buffer->getNormalStrider(normals_start));
+ llassert_always(buffer->getTangentStrider(tangents_start));
+ llassert_always(buffer->getTexCoord0Strider(texcoords_start));
+ llassert_always(buffer->getTexCoord1Strider(texcoords2_start));
+ llassert_always(buffer->getIndexStrider(indices_start));
+
+ U32 indices_index = 0;
+ U32 index_offset = 0;
+
+ {
+ LLStrider<LLVector3> vertices = vertices_start;
+ LLStrider<LLVector3> normals = normals_start;
+ LLStrider<LLVector2> texcoords = texcoords_start;
+ LLStrider<LLVector2> texcoords2 = texcoords2_start;
+ LLStrider<U16> indices = indices_start;
+
+ for (std::vector<LLFace*>::iterator i = mFaceList.begin(); i != mFaceList.end(); ++i)
+ {
+ LLFace* facep = *i;
+
+ facep->setIndicesIndex(indices_index);
+ facep->setGeomIndex(index_offset);
+ facep->setVertexBuffer(buffer);
+
+ LLVOSurfacePatch* patchp = (LLVOSurfacePatch*) facep->getViewerObject();
+ patchp->getTerrainGeometry(vertices, normals, texcoords, texcoords2, indices);
+
+ indices_index += facep->getIndicesCount();
+ index_offset += facep->getGeomCount();
+ }
+ }
+
+ const bool has_tangents = tangents_start.get() != nullptr;
+ if (has_tangents)
+ {
+ LLStrider<LLVector3> vertices = vertices_start;
+ LLStrider<LLVector3> normals = normals_start;
+ LLStrider<LLVector4a> tangents = tangents_start;
+ LLStrider<LLVector2> texcoords = texcoords_start;
+ LLStrider<U16> indices = indices_start;
+
+ gen_terrain_tangents(index_offset, indices_index, vertices, normals, tangents, texcoords, indices);
+ }
buffer->unmapBuffer();
mFaceList.clear();
diff --git a/indra/newview/llvosurfacepatch.h b/indra/newview/llvosurfacepatch.h
index aed67162d1..f86dbc8407 100644
--- a/indra/newview/llvosurfacepatch.h
+++ b/indra/newview/llvosurfacepatch.h
@@ -60,20 +60,20 @@ public:
/*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);
/*virtual*/ void updateGL();
- /*virtual*/ BOOL updateGeometry(LLDrawable *drawable);
- /*virtual*/ BOOL updateLOD();
+ /*virtual*/ bool updateGeometry(LLDrawable *drawable);
+ /*virtual*/ bool updateLOD();
/*virtual*/ void updateFaceSize(S32 idx);
- void getGeometry(LLStrider<LLVector3> &verticesp,
- LLStrider<LLVector3> &normalsp,
- LLStrider<LLVector2> &texCoords0p,
- LLStrider<LLVector2> &texCoords1p,
- LLStrider<U16> &indicesp);
+ void getTerrainGeometry(LLStrider<LLVector3> &verticesp,
+ LLStrider<LLVector3> &normalsp,
+ LLStrider<LLVector2> &texCoords0p,
+ LLStrider<LLVector2> &texCoords1p,
+ LLStrider<U16> &indicesp);
/*virtual*/ void updateTextures();
/*virtual*/ void setPixelAreaAndAngle(LLAgent &agent); // generate accurate apparent angle and area
/*virtual*/ void updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax);
- /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate.
+ /*virtual*/ bool isActive() const; // Whether this object needs to do an idleUpdate.
void setPatch(LLSurfacePatch *patchp);
LLSurfacePatch *getPatch() const { return mPatchp; }
@@ -81,11 +81,11 @@ public:
void dirtyPatch();
void dirtyGeom();
- /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
+ /*virtual*/ bool lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
- BOOL pick_transparent = FALSE,
- BOOL pick_rigged = FALSE,
- BOOL pick_unselectable = TRUE,
+ bool pick_transparent = false,
+ bool pick_rigged = false,
+ bool pick_unselectable = true,
S32* face_hit = NULL, // which face was hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
@@ -93,7 +93,7 @@ public:
LLVector4a* tangent = NULL // return the surface tangent at the intersection point
);
- BOOL mDirtiedPatch;
+ bool mDirtiedPatch;
protected:
~LLVOSurfacePatch();
@@ -101,8 +101,8 @@ protected:
LLFacePool *getPool();
S32 mBaseComp;
LLSurfacePatch *mPatchp;
- BOOL mDirtyTexture;
- BOOL mDirtyTerrain;
+ bool mDirtyTexture;
+ bool mDirtyTerrain;
S32 mLastNorthStride;
S32 mLastEastStride;
diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp
index 575b1dbe7e..caee731ea3 100644
--- a/indra/newview/llvotree.cpp
+++ b/indra/newview/llvotree.cpp
@@ -135,10 +135,7 @@ void LLVOTree::initClass()
LLUUID id;
S32 S32_val;
- BOOL success = TRUE;
-
-
-
+ bool success{ true };
S32 species;
static LLStdStringHandle species_id_string = LLXmlTree::addAttributeString("species_id");
if (!tree_def->getFastAttributeS32(species_id_string, species))
@@ -250,7 +247,7 @@ void LLVOTree::initClass()
}
}
- BOOL have_all_trees = TRUE;
+ bool have_all_trees {true};
std::string err;
for (S32 i=0;i<sMaxTreeSpecies;++i)
@@ -258,7 +255,7 @@ void LLVOTree::initClass()
if (!sSpeciesTable.count(i))
{
err.append(llformat(" %d",i));
- have_all_trees = FALSE;
+ have_all_trees = false;
}
}
@@ -322,7 +319,7 @@ U32 LLVOTree::processUpdateMessage(LLMessageSystem *mesgsys,
// Load Species-Specific data
//
static const S32 MAX_TREE_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL = 32 ; //frames.
- mTreeImagep = LLViewerTextureManager::getFetchedTexture(sSpeciesTable[mSpecies]->mTextureID, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+ mTreeImagep = LLViewerTextureManager::getFetchedTexture(sSpeciesTable[mSpecies]->mTextureID, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
mTreeImagep->setMaxVirtualSizeResetInterval(MAX_TREE_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL); //allow to wait for at most 16 frames to reset virtual size.
mBranchLength = sSpeciesTable[mSpecies]->mBranchLength;
@@ -473,7 +470,7 @@ void LLVOTree::updateTextures()
LLDrawable* LLVOTree::createDrawable(LLPipeline *pipeline)
{
pipeline->allocDrawable(this);
- mDrawable->setLit(FALSE);
+ mDrawable->setLit(false);
mDrawable->setRenderType(LLPipeline::RENDER_TYPE_TREE);
@@ -493,7 +490,7 @@ LLDrawable* LLVOTree::createDrawable(LLPipeline *pipeline)
const S32 LEAF_INDICES = 24;
const S32 LEAF_VERTICES = 16;
-BOOL LLVOTree::updateGeometry(LLDrawable *drawable)
+bool LLVOTree::updateGeometry(LLDrawable *drawable)
{
LL_PROFILE_ZONE_SCOPED;
@@ -505,7 +502,7 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable)
{
facep->setVertexBuffer(NULL);
}
- return TRUE ;
+ return true ;
}
if (mDrawable->getFace(0) &&
@@ -522,7 +519,7 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable)
S32 lod;
LLFace *face = drawable->getFace(0);
- if (!face) return TRUE;
+ if (!face) return true;
face->mCenterAgent = getPositionAgent();
face->mCenterLocal = face->mCenterAgent;
@@ -545,7 +542,7 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable)
<< max_vertices << " vertices and "
<< max_indices << " indices" << LL_ENDL;
mReferenceBuffer = NULL; //unref
- return TRUE;
+ return true;
}
LLStrider<LLVector3> vertices;
@@ -874,7 +871,7 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable)
//generate tree mesh
updateMesh();
- return TRUE;
+ return true;
}
void LLVOTree::updateMesh()
@@ -1174,14 +1171,14 @@ void LLVOTree::updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
mDrawable->setPositionGroup(pos);
}
-BOOL LLVOTree::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_unselectable, S32 *face_hitp,
+bool LLVOTree::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, bool pick_transparent, bool pick_rigged, bool pick_unselectable, S32 *face_hitp,
LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent)
{
if (!lineSegmentBoundingBox(start, end))
{
- return FALSE;
+ return false;
}
const LLVector4a* exta = mDrawable->getSpatialExtents();
@@ -1218,10 +1215,10 @@ BOOL LLVOTree::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& e
{
normal->load3(norm.mV);
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
U32 LLVOTree::getPartitionType() const
@@ -1230,7 +1227,7 @@ U32 LLVOTree::getPartitionType() const
}
LLTreePartition::LLTreePartition(LLViewerRegion* regionp)
-: LLSpatialPartition(0, FALSE, regionp)
+: LLSpatialPartition(0, false, regionp)
{
mDrawableType = LLPipeline::RENDER_TYPE_TREE;
mPartitionType = LLViewerRegion::PARTITION_TREE;
diff --git a/indra/newview/llvotree.h b/indra/newview/llvotree.h
index 996e970cf8..e225775a16 100644
--- a/indra/newview/llvotree.h
+++ b/indra/newview/llvotree.h
@@ -66,7 +66,7 @@ public:
/*virtual*/ void updateTextures();
/*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);
- /*virtual*/ BOOL updateGeometry(LLDrawable *drawable);
+ /*virtual*/ bool updateGeometry(LLDrawable *drawable);
/*virtual*/ void updateSpatialExtents(LLVector4a &min, LLVector4a &max);
virtual U32 getPartitionType() const;
@@ -107,11 +107,11 @@ public:
F32 branches,
F32 alpha);
- /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
+ /*virtual*/ bool lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
- BOOL pick_transparent = FALSE,
- BOOL pick_rigged = FALSE,
- BOOL pick_unselectable = TRUE,
+ bool pick_transparent = false,
+ bool pick_rigged = false,
+ bool pick_unselectable = true,
S32* face_hit = NULL, // which face was hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index e3f2afadc5..2bb543f132 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -94,7 +94,7 @@ const F32 FORCE_SIMPLE_RENDER_AREA = 512.f;
const F32 FORCE_CULL_AREA = 8.f;
U32 JOINT_COUNT_REQUIRED_FOR_FULLRIG = 1;
-BOOL gAnimateTextures = TRUE;
+bool gAnimateTextures = true;
F32 LLVOVolume::sLODFactor = 1.f;
F32 LLVOVolume::sLODSlopDistanceFactor = 0.5f; //Changing this to zero, effectively disables the LOD transition slop
@@ -105,7 +105,7 @@ S32 LLVOVolume::mRenderComplexity_current = 0;
LLPointer<LLObjectMediaDataClient> LLVOVolume::sObjectMediaClient = NULL;
LLPointer<LLObjectMediaNavigateClient> LLVOVolume::sObjectMediaNavigateClient = NULL;
-extern BOOL gCubeSnapshot;
+extern bool gCubeSnapshot;
// Implementation class of LLMediaDataClientObject. See llmediadataclient.h
class LLMediaDataClientObjectImpl : public LLMediaDataClientObject
@@ -216,18 +216,18 @@ LLVOVolume::LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *re
mRelativeXform.setIdentity();
mRelativeXformInvTrans.setIdentity();
- mFaceMappingChanged = FALSE;
+ mFaceMappingChanged = false;
mLOD = MIN_LOD;
mLODDistance = 0.0f;
mLODAdjustedDistance = 0.0f;
mLODRadius = 0.0f;
mTextureAnimp = NULL;
- mVolumeChanged = FALSE;
+ mVolumeChanged = false;
mVObjRadius = LLVector3(1,1,0.5f).length();
mNumFaces = 0;
- mLODChanged = FALSE;
- mSculptChanged = FALSE;
- mColorChanged = FALSE;
+ mLODChanged = false;
+ mSculptChanged = false;
+ mColorChanged = false;
mSpotLightPriority = 0.f;
mSkinInfoUnavaliable = false;
@@ -296,6 +296,11 @@ void LLVOVolume::markDead()
{
mLightTexture->removeVolume(LLRender::LIGHT_TEX, this);
}
+
+ if (mIsHeroProbe)
+ {
+ gPipeline.mHeroProbeManager.unregisterViewerObject(this);
+ }
}
LLViewerObject::markDead();
@@ -400,7 +405,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys,
}
gPipeline.markTextured(mDrawable);
- mFaceMappingChanged = TRUE;
+ mFaceMappingChanged = true;
mTexAnimMode = 0;
}
}
@@ -434,7 +439,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys,
if (update_type != OUT_TERSE_IMPROVED)
{
LLVolumeParams volume_params;
- BOOL res = LLVolumeMessage::unpackVolumeParams(&volume_params, *dp);
+ bool res = LLVolumeMessage::unpackVolumeParams(&volume_params, *dp);
if (!res)
{
LL_WARNS() << "Bogus volume parameters in object " << getID() << LL_ENDL;
@@ -504,7 +509,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys,
}
gPipeline.markTextured(mDrawable);
- mFaceMappingChanged = TRUE;
+ mFaceMappingChanged = true;
mTexAnimMode = 0;
}
@@ -595,7 +600,7 @@ void LLVOVolume::animateTextures()
{
if (!mTexAnimMode)
{
- mFaceMappingChanged = TRUE;
+ mFaceMappingChanged = true;
gPipeline.markTextured(mDrawable);
}
mTexAnimMode = result | mTextureAnimp->mMode;
@@ -691,7 +696,7 @@ void LLVOVolume::animateTextures()
}
gPipeline.markTextured(mDrawable);
- mFaceMappingChanged = TRUE;
+ mFaceMappingChanged = true;
mTexAnimMode = 0;
}
}
@@ -704,11 +709,11 @@ void LLVOVolume::updateTextures()
updateTextureVirtualSize();
}
-BOOL LLVOVolume::isVisible() const
+bool LLVOVolume::isVisible() const
{
if(mDrawable.notNull() && mDrawable->isVisible())
{
- return TRUE ;
+ return true ;
}
if(isAttachment())
@@ -722,7 +727,7 @@ BOOL LLVOVolume::isVisible() const
return objp && objp->mDrawable.notNull() && objp->mDrawable->isVisible() ;
}
- return FALSE ;
+ return false ;
}
void LLVOVolume::updateTextureVirtualSize(bool forced)
@@ -854,7 +859,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced)
S32 lod = llmin(mLOD, 3);
F32 lodf = ((F32)(lod + 1.0f)/4.f);
F32 tex_size = lodf * LLViewerTexture::sMaxSculptRez ;
- mSculptTexture->addTextureStats(2.f * tex_size * tex_size, FALSE);
+ mSculptTexture->addTextureStats(2.f * tex_size * tex_size, false);
}
S32 texture_discard = mSculptTexture->getCachedRawImageLevel(); //try to match the texture
@@ -865,7 +870,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced)
current_discard < 0)) //no previous rebuild
{
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME);
- mSculptChanged = TRUE;
+ mSculptChanged = true;
}
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SCULPTED))
@@ -882,7 +887,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced)
{
LLLightImageParams* params = (LLLightImageParams*) getParameterEntry(LLNetworkData::PARAMS_LIGHT_IMAGE);
LLUUID id = params->getLightTexture();
- mLightTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE);
+ mLightTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE);
if (mLightTexture.notNull())
{
F32 rad = getLightRadius();
@@ -912,14 +917,14 @@ void LLVOVolume::updateTextureVirtualSize(bool forced)
}
}
-BOOL LLVOVolume::isActive() const
+bool LLVOVolume::isActive() const
{
return !mStatic;
}
-BOOL LLVOVolume::setMaterial(const U8 material)
+bool LLVOVolume::setMaterial(const U8 material)
{
- BOOL res = LLViewerObject::setMaterial(material);
+ bool res = LLViewerObject::setMaterial(material);
return res;
}
@@ -930,7 +935,7 @@ void LLVOVolume::setTexture(const S32 face)
gGL.getTexUnit(0)->bind(getTEImage(face));
}
-void LLVOVolume::setScale(const LLVector3 &scale, BOOL damped)
+void LLVOVolume::setScale(const LLVector3 &scale, bool damped)
{
if (scale != getScale())
{
@@ -989,14 +994,14 @@ LLDrawable *LLVOVolume::createDrawable(LLPipeline *pipeline)
if (getIsLight())
{
// Add it to the pipeline mLightSet
- gPipeline.setLight(mDrawable, TRUE);
+ gPipeline.setLight(mDrawable, true);
}
if (isReflectionProbe())
{
updateReflectionProbePtr();
}
-
+
updateRadius();
bool force_update = true; // avoid non-alpha mDistance update being optimized away
mDrawable->updateDistance(*LLViewerCamera::getInstance(), force_update);
@@ -1004,7 +1009,7 @@ LLDrawable *LLVOVolume::createDrawable(LLPipeline *pipeline)
return mDrawable;
}
-BOOL LLVOVolume::setVolume(const LLVolumeParams &params_in, const S32 detail, bool unique_volume)
+bool LLVOVolume::setVolume(const LLVolumeParams &params_in, const S32 detail, bool unique_volume)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
LLVolumeParams volume_params = params_in;
@@ -1012,7 +1017,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &params_in, const S32 detail, bo
S32 last_lod = mVolumep.notNull() ? LLVolumeLODGroup::getVolumeDetailFromScale(mVolumep->getDetail()) : -1;
S32 lod = mLOD;
- BOOL is404 = FALSE;
+ bool is404 = false;
if (isSculpted())
{
@@ -1024,7 +1029,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &params_in, const S32 detail, bo
lod = gMeshRepo.getActualMeshLOD(volume_params, lod);
if (lod == -1)
{
- is404 = TRUE;
+ is404 = true;
lod = 0;
}
}
@@ -1035,7 +1040,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &params_in, const S32 detail, bo
bool is_flexible = (volume_params.getPathParams().getCurveType() == LL_PCODE_PATH_FLEXIBLE);
if (is_flexible)
{
- setParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE, TRUE, false);
+ setParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE, true, false);
if (!mVolumeImpl)
{
LLFlexibleObjectData* data = (LLFlexibleObjectData*)getParameterEntry(LLNetworkData::PARAMS_FLEXIBLE);
@@ -1045,7 +1050,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &params_in, const S32 detail, bo
else
{
// Mark the parameter not in use
- setParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE, FALSE, false);
+ setParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE, false, false);
if (mVolumeImpl)
{
delete mVolumeImpl;
@@ -1053,14 +1058,14 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &params_in, const S32 detail, bo
if (mDrawable.notNull())
{
// Undo the damage we did to this matrix
- mDrawable->updateXform(FALSE);
+ mDrawable->updateXform(false);
}
}
}
if (is404)
{
- setIcon(LLViewerTextureManager::getFetchedTextureFromFile("icons/Inv_Mesh.png", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI));
+ setIcon(LLViewerTextureManager::getFetchedTextureFromFile("icons/Inv_Mesh.png", FTT_LOCAL_FILE, true, LLGLTexture::BOOST_UI));
//render prim proxy when mesh loading attempts give up
volume_params.setSculptID(LLUUID::null, LL_SCULPT_TYPE_NONE);
@@ -1068,7 +1073,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &params_in, const S32 detail, bo
if ((LLPrimitive::setVolume(volume_params, lod, (mVolumeImpl && mVolumeImpl->isVolumeUnique()))) || mSculptChanged)
{
- mFaceMappingChanged = TRUE;
+ mFaceMappingChanged = true;
if (mVolumeImpl)
{
@@ -1128,14 +1133,14 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &params_in, const S32 detail, bo
}
}
- return TRUE;
+ return true;
}
else if (NO_LOD == lod)
{
LLSculptIDSize::instance().resetSizeSum(volume_params.getSculptID());
}
- return FALSE;
+ return false;
}
void LLVOVolume::updateSculptTexture()
@@ -1148,7 +1153,7 @@ void LLVOVolume::updateSculptTexture()
LLUUID id = sculpt_params->getSculptTexture();
if (id.notNull())
{
- mSculptTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+ mSculptTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
}
mSkinInfoUnavaliable = false;
@@ -1189,7 +1194,7 @@ void LLVOVolume::updateVisualComplexity()
void LLVOVolume::notifyMeshLoaded()
{
- mSculptChanged = TRUE;
+ mSculptChanged = true;
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_GEOMETRY);
if (!mSkinInfo && !mSkinInfoUnavaliable)
@@ -1311,11 +1316,13 @@ void LLVOVolume::sculpt()
}
}
else
- {
+ {
+ LLImageDataSharedLock lock(raw_image);
+
sculpt_height = raw_image->getHeight();
sculpt_width = raw_image->getWidth();
sculpt_components = raw_image->getComponents();
-
+
sculpt_data = raw_image->getData();
if(LLViewerTextureManager::sTesterp)
@@ -1393,11 +1400,11 @@ std::string get_debug_object_lod_text(LLVOVolume *rootp)
return result;
}
-BOOL LLVOVolume::calcLOD()
+bool LLVOVolume::calcLOD()
{
if (mDrawable.isNull())
{
- return FALSE;
+ return false;
}
S32 cur_detail = 0;
@@ -1413,7 +1420,7 @@ BOOL LLVOVolume::calcLOD()
// Not sure how this can really happen, but alas it does. Better exit here than crashing.
if( !avatar || !avatar->mDrawable )
{
- return FALSE;
+ return false;
}
distance = avatar->mDrawable->mDistanceWRTCamera;
@@ -1441,7 +1448,7 @@ BOOL LLVOVolume::calcLOD()
if (distance <= 0.f || radius <= 0.f)
{
LL_DEBUGS("DynamicBox","CalcLOD") << "avatar distance/radius uninitialized, skipping" << LL_ENDL;
- return FALSE;
+ return false;
}
}
else
@@ -1451,7 +1458,7 @@ BOOL LLVOVolume::calcLOD()
if (distance <= 0.f || radius <= 0.f)
{
LL_DEBUGS("DynamicBox","CalcLOD") << "non-avatar distance/radius uninitialized, skipping" << LL_ENDL;
- return FALSE;
+ return false;
}
}
@@ -1541,22 +1548,22 @@ BOOL LLVOVolume::calcLOD()
mAppAngle = ll_round((F32) atan2( mDrawable->getRadius(), mDrawable->mDistanceWRTCamera) * RAD_TO_DEG, 0.01f);
mLOD = cur_detail;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-BOOL LLVOVolume::updateLOD()
+bool LLVOVolume::updateLOD()
{
if (mDrawable.isNull())
{
- return FALSE;
+ return false;
}
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
- BOOL lod_changed = FALSE;
+ bool lod_changed = false;
if (!LLSculptIDSize::instance().isUnloaded(getVolume()->getParams().getSculptID()))
{
@@ -1564,13 +1571,13 @@ BOOL LLVOVolume::updateLOD()
}
else
{
- return FALSE;
+ return false;
}
if (lod_changed)
{
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME);
- mLODChanged = TRUE;
+ mLODChanged = true;
}
else
{
@@ -1587,12 +1594,12 @@ BOOL LLVOVolume::updateLOD()
return lod_changed;
}
-BOOL LLVOVolume::setDrawableParent(LLDrawable* parentp)
+bool LLVOVolume::setDrawableParent(LLDrawable* parentp)
{
if (!LLViewerObject::setDrawableParent(parentp))
{
// no change in drawable parent
- return FALSE;
+ return false;
}
if (!mDrawable->isRoot())
@@ -1610,7 +1617,7 @@ BOOL LLVOVolume::setDrawableParent(LLDrawable* parentp)
}
}
- return TRUE;
+ return true;
}
void LLVOVolume::updateFaceFlags()
@@ -1621,7 +1628,7 @@ void LLVOVolume::updateFaceFlags()
LLFace *face = mDrawable->getFace(i);
if (face)
{
- BOOL fullbright = getTE(i)->getFullbright();
+ bool fullbright = getTE(i)->getFullbright();
face->clearState(LLFace::FULLBRIGHT | LLFace::HUD_RENDER | LLFace::LIGHT);
if (fullbright || (mMaterial == LL_MCODE_LIGHT))
@@ -1640,9 +1647,9 @@ void LLVOVolume::updateFaceFlags()
}
}
-BOOL LLVOVolume::setParent(LLViewerObject* parent)
+bool LLVOVolume::setParent(LLViewerObject* parent)
{
- BOOL ret = FALSE ;
+ bool ret = false ;
LLViewerObject *old_parent = (LLViewerObject*) getParent();
if (parent != old_parent)
{
@@ -1663,7 +1670,7 @@ void LLVOVolume::regenFaces()
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
// remove existing faces
- BOOL count_changed = mNumFaces != getNumTEs();
+ bool count_changed = mNumFaces != getNumTEs();
if (count_changed)
{
@@ -1707,17 +1714,17 @@ void LLVOVolume::regenFaces()
}
}
-BOOL LLVOVolume::genBBoxes(BOOL force_global, BOOL should_update_octree_bounds)
+bool LLVOVolume::genBBoxes(bool force_global, bool should_update_octree_bounds)
{
LL_PROFILE_ZONE_SCOPED;
- BOOL res = TRUE;
+ bool res = true;
LLVector4a min, max;
min.clear();
max.clear();
- BOOL rebuild = mDrawable->isState(LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION | LLDrawable::REBUILD_RIGGED);
+ bool rebuild = mDrawable->isState(LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION | LLDrawable::REBUILD_RIGGED);
if (getRiggedVolume())
{
@@ -1753,7 +1760,7 @@ BOOL LLVOVolume::genBBoxes(BOOL force_global, BOOL should_update_octree_bounds)
continue;
}
- BOOL face_res = face->genVolumeBBoxes(*volume, i,
+ bool face_res = face->genVolumeBBoxes(*volume, i,
mRelativeXform,
(mVolumeImpl && mVolumeImpl->isVolumeGlobal()) || force_global);
res &= face_res; // note that this result is never used
@@ -1947,7 +1954,7 @@ void LLVOVolume::updateRelativeXform(bool force_identity)
}
}
-bool LLVOVolume::lodOrSculptChanged(LLDrawable *drawable, BOOL &compiled, BOOL &should_update_octree_bounds)
+bool LLVOVolume::lodOrSculptChanged(LLDrawable *drawable, bool &compiled, bool &should_update_octree_bounds)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
bool regen_faces = false;
@@ -1978,7 +1985,7 @@ bool LLVOVolume::lodOrSculptChanged(LLDrawable *drawable, BOOL &compiled, BOOL &
updateVisualComplexity();
}
- compiled = TRUE;
+ compiled = true;
// new_lod > old_lod breaks a feedback loop between LOD updates and
// bounding box updates.
should_update_octree_bounds = should_update_octree_bounds || mSculptChanged || new_lod > old_lod;
@@ -2014,20 +2021,20 @@ bool LLVOVolume::lodOrSculptChanged(LLDrawable *drawable, BOOL &compiled, BOOL &
return regen_faces;
}
-BOOL LLVOVolume::updateGeometry(LLDrawable *drawable)
+bool LLVOVolume::updateGeometry(LLDrawable *drawable)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
if (mDrawable->isState(LLDrawable::REBUILD_RIGGED))
{
updateRiggedVolume(false);
- genBBoxes(FALSE);
+ genBBoxes(false);
mDrawable->clearState(LLDrawable::REBUILD_RIGGED);
}
if (mVolumeImpl != NULL)
{
- BOOL res;
+ bool res;
{
res = mVolumeImpl->doUpdateGeometry(drawable);
}
@@ -2045,13 +2052,13 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable)
if (mDrawable.isNull()) // Not sure why this is happening, but it is...
{
- return TRUE; // No update to complete
+ return true; // No update to complete
}
- BOOL compiled = FALSE;
+ bool compiled = false;
// This should be true in most cases, unless we're sure no octree update is
// needed.
- BOOL should_update_octree_bounds = bool(getRiggedVolume()) || mDrawable->isState(LLDrawable::REBUILD_POSITION) || !mDrawable->getSpatialExtents()->isFinite3();
+ bool should_update_octree_bounds = bool(getRiggedVolume()) || mDrawable->isState(LLDrawable::REBUILD_POSITION) || !mDrawable->getSpatialExtents()->isFinite3();
if (mVolumeChanged || mFaceMappingChanged)
{
@@ -2067,7 +2074,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable)
}
else if (mSculptChanged || mLODChanged || mColorChanged)
{
- compiled = TRUE;
+ compiled = true;
was_regen_faces = lodOrSculptChanged(drawable, compiled, should_update_octree_bounds);
}
@@ -2078,7 +2085,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable)
else if (mLODChanged || mSculptChanged || mColorChanged)
{
dirtySpatialGroup();
- compiled = TRUE;
+ compiled = true;
lodOrSculptChanged(drawable, compiled, should_update_octree_bounds);
if(drawable->isState(LLDrawable::REBUILD_RIGGED | LLDrawable::RIGGED))
@@ -2089,13 +2096,13 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable)
// it has its own drawable (it's moved) or it has changed UVs or it has changed xforms from global<->local
else
{
- compiled = TRUE;
+ compiled = true;
// All it did was move or we changed the texture coordinate offset
}
// Generate bounding boxes if needed, and update the object's size in the
// octree
- genBBoxes(FALSE, should_update_octree_bounds);
+ genBBoxes(false, should_update_octree_bounds);
// Update face flags
updateFaceFlags();
@@ -2105,11 +2112,11 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable)
LLPipeline::sCompiles++;
}
- mVolumeChanged = FALSE;
- mLODChanged = FALSE;
- mSculptChanged = FALSE;
- mFaceMappingChanged = FALSE;
- mColorChanged = FALSE;
+ mVolumeChanged = false;
+ mLODChanged = false;
+ mSculptChanged = false;
+ mFaceMappingChanged = false;
+ mColorChanged = false;
return LLViewerObject::updateGeometry(drawable);
}
@@ -2138,13 +2145,13 @@ void LLVOVolume::updateFaceSize(S32 idx)
}
}
-BOOL LLVOVolume::isRootEdit() const
+bool LLVOVolume::isRootEdit() const
{
if (mParent && !((LLViewerObject*)mParent)->isAvatar())
{
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
//virtual
@@ -2165,7 +2172,7 @@ void LLVOVolume::setNumTEs(const U8 num_tes)
setTE(i, *te) ;
mMediaImplList[i] = mMediaImplList[old_num_tes -1] ;
}
- mMediaImplList[old_num_tes -1]->setUpdated(TRUE) ;
+ mMediaImplList[old_num_tes -1]->setUpdated(true) ;
}
}
else if(old_num_tes > num_tes && mMediaImplList.size() > num_tes) //old faces removed
@@ -2191,23 +2198,23 @@ void LLVOVolume::setNumTEs(const U8 num_tes)
//virtual
void LLVOVolume::changeTEImage(S32 index, LLViewerTexture* imagep)
{
- BOOL changed = (mTEImages[index] != imagep);
+ bool changed = (mTEImages[index] != imagep);
LLViewerObject::changeTEImage(index, imagep);
if (changed)
{
gPipeline.markTextured(mDrawable);
- mFaceMappingChanged = TRUE;
+ mFaceMappingChanged = true;
}
}
void LLVOVolume::setTEImage(const U8 te, LLViewerTexture *imagep)
{
- BOOL changed = (mTEImages[te] != imagep);
+ bool changed = (mTEImages[te] != imagep);
LLViewerObject::setTEImage(te, imagep);
if (changed)
{
gPipeline.markTextured(mDrawable);
- mFaceMappingChanged = TRUE;
+ mFaceMappingChanged = true;
}
}
@@ -2222,7 +2229,7 @@ S32 LLVOVolume::setTETexture(const U8 te, const LLUUID &uuid)
shrinkWrap();
gPipeline.markTextured(mDrawable);
}
- mFaceMappingChanged = TRUE;
+ mFaceMappingChanged = true;
}
return res;
}
@@ -2247,14 +2254,14 @@ S32 LLVOVolume::setTEColor(const U8 te, const LLColor4& color)
{
gPipeline.markTextured(mDrawable);
//treat this alpha change as an LoD update since render batches may need to get rebuilt
- mLODChanged = TRUE;
+ mLODChanged = true;
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME);
}
retval = LLPrimitive::setTEColor(te, color);
if (mDrawable.notNull() && retval)
{
// These should only happen on updates which are not the initial update.
- mColorChanged = TRUE;
+ mColorChanged = true;
mDrawable->setState(LLDrawable::REBUILD_COLOR);
shrinkWrap();
dirtyMesh();
@@ -2270,7 +2277,7 @@ S32 LLVOVolume::setTEBumpmap(const U8 te, const U8 bumpmap)
if (res)
{
gPipeline.markTextured(mDrawable);
- mFaceMappingChanged = TRUE;
+ mFaceMappingChanged = true;
}
return res;
}
@@ -2281,7 +2288,7 @@ S32 LLVOVolume::setTETexGen(const U8 te, const U8 texgen)
if (res)
{
gPipeline.markTextured(mDrawable);
- mFaceMappingChanged = TRUE;
+ mFaceMappingChanged = true;
}
return res;
}
@@ -2292,7 +2299,7 @@ S32 LLVOVolume::setTEMediaTexGen(const U8 te, const U8 media)
if (res)
{
gPipeline.markTextured(mDrawable);
- mFaceMappingChanged = TRUE;
+ mFaceMappingChanged = true;
}
return res;
}
@@ -2303,7 +2310,7 @@ S32 LLVOVolume::setTEShiny(const U8 te, const U8 shiny)
if (res)
{
gPipeline.markTextured(mDrawable);
- mFaceMappingChanged = TRUE;
+ mFaceMappingChanged = true;
}
return res;
}
@@ -2314,7 +2321,7 @@ S32 LLVOVolume::setTEFullbright(const U8 te, const U8 fullbright)
if (res)
{
gPipeline.markTextured(mDrawable);
- mFaceMappingChanged = TRUE;
+ mFaceMappingChanged = true;
}
return res;
}
@@ -2325,7 +2332,7 @@ S32 LLVOVolume::setTEBumpShinyFullbright(const U8 te, const U8 bump)
if (res)
{
gPipeline.markTextured(mDrawable);
- mFaceMappingChanged = TRUE;
+ mFaceMappingChanged = true;
}
return res;
}
@@ -2336,7 +2343,7 @@ S32 LLVOVolume::setTEMediaFlags(const U8 te, const U8 media_flags)
if (res)
{
gPipeline.markTextured(mDrawable);
- mFaceMappingChanged = TRUE;
+ mFaceMappingChanged = true;
}
return res;
}
@@ -2351,7 +2358,7 @@ S32 LLVOVolume::setTEGlow(const U8 te, const F32 glow)
gPipeline.markTextured(mDrawable);
shrinkWrap();
}
- mFaceMappingChanged = TRUE;
+ mFaceMappingChanged = true;
}
return res;
}
@@ -2391,7 +2398,7 @@ S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID)
gPipeline.markTextured(mDrawable);
gPipeline.markRebuild(mDrawable,LLDrawable::REBUILD_ALL);
}
- mFaceMappingChanged = TRUE;
+ mFaceMappingChanged = true;
}
return res;
}
@@ -2409,7 +2416,7 @@ S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialPa
gPipeline.markTextured(mDrawable);
gPipeline.markRebuild(mDrawable,LLDrawable::REBUILD_ALL);
}
- mFaceMappingChanged = TRUE;
+ mFaceMappingChanged = true;
return TEM_CHANGE_TEXTURE;
}
@@ -2424,7 +2431,7 @@ S32 LLVOVolume::setTEGLTFMaterialOverride(U8 te, LLGLTFMaterial* mat)
gPipeline.markTextured(mDrawable);
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL);
}
- mFaceMappingChanged = TRUE;
+ mFaceMappingChanged = true;
}
return retval;
@@ -2437,7 +2444,7 @@ S32 LLVOVolume::setTEScale(const U8 te, const F32 s, const F32 t)
if (res)
{
gPipeline.markTextured(mDrawable);
- mFaceMappingChanged = TRUE;
+ mFaceMappingChanged = true;
}
return res;
}
@@ -2448,7 +2455,7 @@ S32 LLVOVolume::setTEScaleS(const U8 te, const F32 s)
if (res)
{
gPipeline.markTextured(mDrawable);
- mFaceMappingChanged = TRUE;
+ mFaceMappingChanged = true;
}
return res;
}
@@ -2459,7 +2466,7 @@ S32 LLVOVolume::setTEScaleT(const U8 te, const F32 t)
if (res)
{
gPipeline.markTextured(mDrawable);
- mFaceMappingChanged = TRUE;
+ mFaceMappingChanged = true;
}
return res;
}
@@ -2918,7 +2925,7 @@ void LLVOVolume::addMediaImpl(LLViewerMediaImpl* media_impl, S32 texture_index)
}
else //the face is not available now, start media on this face later.
{
- media_impl->setUpdated(TRUE) ;
+ media_impl->setUpdated(true) ;
}
}
return ;
@@ -2983,7 +2990,7 @@ void LLVOVolume::setLightTextureID(LLUUID id)
{
if (!hasLightTexture())
{
- setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE, TRUE, true);
+ setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE, true, true);
}
else if (old_texturep)
{
@@ -3011,7 +3018,7 @@ void LLVOVolume::setLightTextureID(LLUUID id)
{
old_texturep->removeVolume(LLRender::LIGHT_TEX, this);
}
- setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE, FALSE, true);
+ setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE, false, true);
parameterChanged(LLNetworkData::PARAMS_LIGHT_IMAGE, true);
mLightTexture = NULL;
}
@@ -3027,29 +3034,29 @@ void LLVOVolume::setSpotLightParams(LLVector3 params)
}
}
-void LLVOVolume::setIsLight(BOOL is_light)
+void LLVOVolume::setIsLight(bool is_light)
{
- BOOL was_light = getIsLight();
+ bool was_light = getIsLight();
if (is_light != was_light)
{
if (is_light)
{
- setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT, TRUE, true);
+ setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT, true, true);
}
else
{
- setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT, FALSE, true);
+ setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT, false, true);
}
if (is_light)
{
// Add it to the pipeline mLightSet
- gPipeline.setLight(mDrawable, TRUE);
+ gPipeline.setLight(mDrawable, true);
}
else
{
// Not a light. Remove it from the pipeline's light set.
- gPipeline.setLight(mDrawable, FALSE);
+ gPipeline.setLight(mDrawable, false);
}
}
}
@@ -3069,7 +3076,7 @@ void LLVOVolume::setLightLinearColor(const LLColor3& color)
param_block->setLinearColor(LLColor4(color, param_block->getLinearColor().mV[3]));
parameterChanged(LLNetworkData::PARAMS_LIGHT, true);
gPipeline.markTextured(mDrawable);
- mFaceMappingChanged = TRUE;
+ mFaceMappingChanged = true;
}
}
}
@@ -3128,7 +3135,7 @@ void LLVOVolume::setLightCutoff(F32 cutoff)
//----------------------------------------------------------------------------
-BOOL LLVOVolume::getIsLight() const
+bool LLVOVolume::getIsLight() const
{
mIsLight = getParameterEntryInUse(LLNetworkData::PARAMS_LIGHT);
return mIsLight;
@@ -3256,7 +3263,7 @@ LLViewerTexture* LLVOVolume::getLightTexture()
{
if (mLightTexture.isNull() || id != mLightTexture->getID())
{
- mLightTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE);
+ mLightTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE);
}
}
else
@@ -3319,23 +3326,23 @@ F32 LLVOVolume::getLightCutoff() const
}
}
-BOOL LLVOVolume::isReflectionProbe() const
+bool LLVOVolume::isReflectionProbe() const
{
return getParameterEntryInUse(LLNetworkData::PARAMS_REFLECTION_PROBE);
}
-bool LLVOVolume::setIsReflectionProbe(BOOL is_probe)
+bool LLVOVolume::setIsReflectionProbe(bool is_probe)
{
- BOOL was_probe = isReflectionProbe();
+ bool was_probe = isReflectionProbe();
if (is_probe != was_probe)
{
if (is_probe)
{
- setParameterEntryInUse(LLNetworkData::PARAMS_REFLECTION_PROBE, TRUE, true);
+ setParameterEntryInUse(LLNetworkData::PARAMS_REFLECTION_PROBE, true, true);
}
else
{
- setParameterEntryInUse(LLNetworkData::PARAMS_REFLECTION_PROBE, FALSE, true);
+ setParameterEntryInUse(LLNetworkData::PARAMS_REFLECTION_PROBE, false, true);
}
}
@@ -3408,6 +3415,22 @@ bool LLVOVolume::setReflectionProbeIsDynamic(bool is_dynamic)
return false;
}
+bool LLVOVolume::setReflectionProbeIsMirror(bool is_mirror)
+{
+ LLReflectionProbeParams *param_block = (LLReflectionProbeParams *) getParameterEntry(LLNetworkData::PARAMS_REFLECTION_PROBE);
+ if (param_block)
+ {
+ if (param_block->getIsMirror() != is_mirror)
+ {
+ param_block->setIsMirror(is_mirror);
+ parameterChanged(LLNetworkData::PARAMS_REFLECTION_PROBE, true);
+ return true;
+ }
+ }
+
+ return false;
+}
+
F32 LLVOVolume::getReflectionProbeAmbiance() const
{
const LLReflectionProbeParams* param_block = (const LLReflectionProbeParams*)getParameterEntry(LLNetworkData::PARAMS_REFLECTION_PROBE);
@@ -3456,6 +3479,18 @@ bool LLVOVolume::getReflectionProbeIsDynamic() const
return false;
}
+bool LLVOVolume::getReflectionProbeIsMirror() const
+{
+ const LLReflectionProbeParams *param_block =
+ (const LLReflectionProbeParams *) getParameterEntry(LLNetworkData::PARAMS_REFLECTION_PROBE);
+ if (param_block)
+ {
+ return param_block->getIsMirror();
+ }
+
+ return false;
+}
+
U32 LLVOVolume::getVolumeInterfaceID() const
{
if (mVolumeImpl)
@@ -3466,7 +3501,7 @@ U32 LLVOVolume::getVolumeInterfaceID() const
return 0;
}
-BOOL LLVOVolume::isFlexible() const
+bool LLVOVolume::isFlexible() const
{
if (getParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE))
{
@@ -3477,25 +3512,25 @@ BOOL LLVOVolume::isFlexible() const
U8 profile_and_hole = volume_params.getProfileParams().getCurveType();
volume_params.setType(profile_and_hole, LL_PCODE_PATH_FLEXIBLE);
}
- return TRUE;
+ return true;
}
else
{
- return FALSE;
+ return false;
}
}
-BOOL LLVOVolume::isSculpted() const
+bool LLVOVolume::isSculpted() const
{
if (getParameterEntryInUse(LLNetworkData::PARAMS_SCULPT))
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-BOOL LLVOVolume::isMesh() const
+bool LLVOVolume::isMesh() const
{
if (isSculpted())
{
@@ -3505,21 +3540,21 @@ BOOL LLVOVolume::isMesh() const
if ((sculpt_type & LL_SCULPT_TYPE_MASK) == LL_SCULPT_TYPE_MESH)
// mesh is a mesh
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
-BOOL LLVOVolume::hasLightTexture() const
+bool LLVOVolume::hasLightTexture() const
{
if (getParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE))
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool LLVOVolume::isFlexibleFast() const
@@ -3547,30 +3582,30 @@ bool LLVOVolume::isAnimatedObjectFast() const
return mIsAnimatedObject;
}
-BOOL LLVOVolume::isVolumeGlobal() const
+bool LLVOVolume::isVolumeGlobal() const
{
if (mVolumeImpl)
{
- return mVolumeImpl->isVolumeGlobal() ? TRUE : FALSE;
+ return mVolumeImpl->isVolumeGlobal() ? true : false;
}
else if (mRiggedVolume.notNull())
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-BOOL LLVOVolume::canBeFlexible() const
+bool LLVOVolume::canBeFlexible() const
{
U8 path = getVolume()->getParams().getPathParams().getCurveType();
return (path == LL_PCODE_PATH_FLEXIBLE || path == LL_PCODE_PATH_LINE);
}
-BOOL LLVOVolume::setIsFlexible(BOOL is_flexible)
+bool LLVOVolume::setIsFlexible(bool is_flexible)
{
- BOOL res = FALSE;
- BOOL was_flexible = isFlexible();
+ bool res = false;
+ bool was_flexible = isFlexible();
LLVolumeParams volume_params;
if (is_flexible)
{
@@ -3579,10 +3614,10 @@ BOOL LLVOVolume::setIsFlexible(BOOL is_flexible)
volume_params = getVolume()->getParams();
U8 profile_and_hole = volume_params.getProfileParams().getCurveType();
volume_params.setType(profile_and_hole, LL_PCODE_PATH_FLEXIBLE);
- res = TRUE;
- setFlags(FLAGS_USE_PHYSICS, FALSE);
- setFlags(FLAGS_PHANTOM, TRUE);
- setParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE, TRUE, true);
+ res = true;
+ setFlags(FLAGS_USE_PHYSICS, false);
+ setFlags(FLAGS_PHANTOM, true);
+ setParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE, true, true);
if (mDrawable)
{
mDrawable->makeActive();
@@ -3596,9 +3631,9 @@ BOOL LLVOVolume::setIsFlexible(BOOL is_flexible)
volume_params = getVolume()->getParams();
U8 profile_and_hole = volume_params.getProfileParams().getCurveType();
volume_params.setType(profile_and_hole, LL_PCODE_PATH_LINE);
- res = TRUE;
- setFlags(FLAGS_PHANTOM, FALSE);
- setParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE, FALSE, true);
+ res = true;
+ setFlags(FLAGS_PHANTOM, false);
+ setParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE, false, true);
}
}
if (res)
@@ -3625,7 +3660,7 @@ const LLMeshSkinInfo* LLVOVolume::getSkinInfo() const
}
// virtual
-BOOL LLVOVolume::isRiggedMesh() const
+bool LLVOVolume::isRiggedMesh() const
{
return isMesh() && getSkinInfo();
}
@@ -3844,7 +3879,7 @@ void LLVOVolume::generateSilhouette(LLSelectNode* nodep, const LLVector3& view_p
volume->generateSilhouetteVertices(nodep->mSilhouetteVertices, nodep->mSilhouetteNormals, view_vector, trans_mat, mRelativeXformInvTrans, nodep->getTESelectMask());
- nodep->mSilhouetteExists = TRUE;
+ nodep->mSilhouetteExists = true;
}
}
@@ -3871,12 +3906,12 @@ void LLVOVolume::updateRadius()
}
-BOOL LLVOVolume::isAttachment() const
+bool LLVOVolume::isAttachment() const
{
return mAttachmentState != 0 ;
}
-BOOL LLVOVolume::isHUDAttachment() const
+bool LLVOVolume::isHUDAttachment() const
{
// *NOTE: we assume hud attachment points are in defined range
// since this range is constant for backwards compatibility
@@ -4337,7 +4372,7 @@ void LLVOVolume::parameterChanged(U16 param_type, bool local_origin)
LLViewerObject::parameterChanged(param_type, local_origin);
}
-void LLVOVolume::parameterChanged(U16 param_type, LLNetworkData* data, BOOL in_use, bool local_origin)
+void LLVOVolume::parameterChanged(U16 param_type, LLNetworkData* data, bool in_use, bool local_origin)
{
LLViewerObject::parameterChanged(param_type, data, in_use, local_origin);
if (mVolumeImpl)
@@ -4361,7 +4396,7 @@ void LLVOVolume::parameterChanged(U16 param_type, LLNetworkData* data, BOOL in_u
}
if (mDrawable.notNull())
{
- BOOL is_light = getIsLight();
+ bool is_light = getIsLight();
if (is_light != mDrawable->isState(LLDrawable::LIGHT))
{
gPipeline.setLight(mDrawable, is_light);
@@ -4375,18 +4410,34 @@ void LLVOVolume::updateReflectionProbePtr()
{
if (isReflectionProbe())
{
- if (mReflectionProbe.isNull())
+ if (mReflectionProbe.isNull() && !getReflectionProbeIsMirror())
{
mReflectionProbe = gPipeline.mReflectionMapManager.registerViewerObject(this);
}
+ else if (mReflectionProbe.isNull() && getReflectionProbeIsMirror())
+ {
+ // Geenz: This is a special case - what we want here is a hero probe.
+ // What we want to do here is instantiate a hero probe from the hero probe manager.
+
+ if (!mIsHeroProbe)
+ mIsHeroProbe = gPipeline.mHeroProbeManager.registerViewerObject(this);
+ }
}
- else if (mReflectionProbe.notNull())
+ else if (mReflectionProbe.notNull() || getReflectionProbeIsMirror())
{
- mReflectionProbe = nullptr;
+ if (mReflectionProbe.notNull())
+ {
+ mReflectionProbe = nullptr;
+ }
+
+ if (getReflectionProbeIsMirror())
+ {
+ gPipeline.mHeroProbeManager.unregisterViewerObject(this);
+ }
}
}
-void LLVOVolume::setSelected(BOOL sel)
+void LLVOVolume::setSelected(bool sel)
{
LLViewerObject::setSelected(sel);
if (isAnimatedObject())
@@ -4422,7 +4473,7 @@ F32 LLVOVolume::getBinRadius()
//const LLVector4a* ext = mDrawable->getSpatialExtents();
bool shrink_wrap = mShouldShrinkWrap || mDrawable->isAnimating();
- bool alpha_wrap = FALSE;
+ bool alpha_wrap = false;
if (!isHUDAttachment() && mDrawable->mDistanceWRTCamera < alpha_distance_factor[2])
{
@@ -4433,14 +4484,14 @@ F32 LLVOVolume::getBinRadius()
if (face->isInAlphaPool() &&
!face->canRenderAsMask())
{
- alpha_wrap = TRUE;
+ alpha_wrap = true;
break;
}
}
}
else
{
- shrink_wrap = FALSE;
+ shrink_wrap = false;
}
if (alpha_wrap)
@@ -4502,7 +4553,7 @@ void LLVOVolume::markForUpdate()
}
LLViewerObject::markForUpdate();
- mVolumeChanged = TRUE;
+ mVolumeChanged = true;
}
LLVector3 LLVOVolume::agentPositionToVolume(const LLVector3& pos) const
@@ -4556,7 +4607,7 @@ LLVector3 LLVOVolume::volumeDirectionToAgent(const LLVector3& dir) const
}
-BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_unselectable, S32 *face_hitp,
+bool LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, bool pick_transparent, bool pick_rigged, bool pick_unselectable, S32 *face_hitp,
LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent)
{
@@ -4564,23 +4615,23 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
|| mDrawable->isDead()
|| !gPipeline.hasRenderType(mDrawable->getRenderType()))
{
- return FALSE;
+ return false;
}
if (!pick_unselectable)
{
- if (!LLSelectMgr::instance().canSelectObject(this, TRUE))
+ if (!LLSelectMgr::instance().canSelectObject(this, true))
{
- return FALSE;
+ return false;
}
}
if (getClickAction() == CLICK_ACTION_IGNORE && !LLFloater::isVisible(gFloaterTools))
{
- return FALSE;
+ return false;
}
- BOOL ret = FALSE;
+ bool ret = false;
LLVolume* volume = getVolume();
@@ -4596,7 +4647,7 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
}
else
{ //cannot pick rigged attachments on other avatars or when not in build mode
- return FALSE;
+ return false;
}
}
@@ -4699,8 +4750,8 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
}
}
- BOOL no_texture = !face->getTexture() || !face->getTexture()->hasGLTexture();
- BOOL mask = no_texture ? FALSE : face->getTexture()->getMask(face->surfaceToTexture(tc, p, n));
+ bool no_texture = !face->getTexture() || !face->getTexture()->hasGLTexture();
+ bool mask = no_texture ? false : face->getTexture()->getMask(face->surfaceToTexture(tc, p, n));
if (face &&
(ignore_alpha || pick_transparent || no_texture || mask))
{
@@ -4765,12 +4816,12 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
*tex_coord = tc;
}
- ret = TRUE;
+ ret = true;
}
}
}
}
-
+
return ret;
}
@@ -5023,21 +5074,21 @@ U32 LLVOVolume::getPartitionType() const
}
LLVolumePartition::LLVolumePartition(LLViewerRegion* regionp)
-: LLSpatialPartition(LLVOVolume::VERTEX_DATA_MASK, TRUE, regionp),
+: LLSpatialPartition(LLVOVolume::VERTEX_DATA_MASK, true, regionp),
LLVolumeGeometryManager()
{
mLODPeriod = 32;
- mDepthMask = FALSE;
+ mDepthMask = false;
mDrawableType = LLPipeline::RENDER_TYPE_VOLUME;
mPartitionType = LLViewerRegion::PARTITION_VOLUME;
mSlopRatio = 0.25f;
}
LLVolumeBridge::LLVolumeBridge(LLDrawable* drawablep, LLViewerRegion* regionp)
-: LLSpatialBridge(drawablep, TRUE, LLVOVolume::VERTEX_DATA_MASK, regionp),
+: LLSpatialBridge(drawablep, true, LLVOVolume::VERTEX_DATA_MASK, regionp),
LLVolumeGeometryManager()
{
- mDepthMask = FALSE;
+ mDepthMask = false;
mLODPeriod = 32;
mDrawableType = LLPipeline::RENDER_TYPE_VOLUME;
mPartitionType = LLViewerRegion::PARTITION_BRIDGE;
@@ -5059,30 +5110,6 @@ LLControlAVBridge::LLControlAVBridge(LLDrawable* drawablep, LLViewerRegion* regi
mPartitionType = LLViewerRegion::PARTITION_CONTROL_AV;
}
-void LLControlAVBridge::updateSpatialExtents()
-{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
-
- LLSpatialGroup* root = (LLSpatialGroup*)mOctree->getListener(0);
-
- bool rootWasDirty = root->isDirty();
-
- super::updateSpatialExtents(); // root becomes non-dirty here
-
- // SL-18251 "On-screen animesh characters using pelvis offset animations
- // disappear when root goes off-screen"
- //
- // Expand extents to include Control Avatar placed outside of the bounds
- LLControlAvatar* controlAvatar = getVObj() ? getVObj()->getControlAvatar() : NULL;
- if (controlAvatar
- && controlAvatar->mDrawable
- && controlAvatar->mDrawable->getEntry()
- && (rootWasDirty || controlAvatar->mPlaying))
- {
- root->expandExtents(controlAvatar->mDrawable->getSpatialExtents(), *mDrawable->getXform());
- }
-}
-
bool can_batch_texture(LLFace* facep)
{
if (facep->getTextureEntry()->getBumpmap())
@@ -5304,7 +5331,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
if (mat)
{
- BOOL is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) || (te->getColor().mV[3] < 0.999f) ? TRUE : FALSE;
+ bool is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) || (te->getColor().mV[3] < 0.999f) ? true : false;
if (type == LLRenderPass::PASS_ALPHA)
{
shader_mask = mat->getShaderMask(LLMaterial::DIFFUSE_ALPHA_MODE_BLEND, is_alpha);
@@ -5769,7 +5796,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
}
}
- BOOL force_simple = (facep->getPixelArea() < FORCE_SIMPLE_RENDER_AREA);
+ bool force_simple = (facep->getPixelArea() < FORCE_SIMPLE_RENDER_AREA);
U32 type = gPipeline.getPoolTypeFromTE(te, tex);
if (is_pbr && gltf_mat && gltf_mat->mAlphaMode != LLGLTFMaterial::ALPHA_MODE_BLEND)
{
@@ -5955,7 +5982,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
pbr_mask = pbr_mask | LLVertexBuffer::MAP_EMISSIVE;
}
- BOOL batch_textures = LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_OBJECT) > 1;
+ bool batch_textures = LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_OBJECT) > 1;
// add extra vertex data for deferred rendering (not necessarily for batching textures)
if (batch_textures)
@@ -5972,22 +5999,22 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
// generate render batches for static geometry
U32 extra_mask = LLVertexBuffer::MAP_TEXTURE_INDEX;
- BOOL alpha_sort = TRUE;
- BOOL rigged = FALSE;
+ bool alpha_sort = true;
+ bool rigged = false;
for (int i = 0; i < 2; ++i) //two sets, static and rigged)
{
- geometryBytes += genDrawInfo(group, simple_mask | extra_mask, sSimpleFaces[i], simple_count[i], FALSE, batch_textures, rigged);
- geometryBytes += genDrawInfo(group, fullbright_mask | extra_mask, sFullbrightFaces[i], fullbright_count[i], FALSE, batch_textures, rigged);
+ geometryBytes += genDrawInfo(group, simple_mask | extra_mask, sSimpleFaces[i], simple_count[i], false, batch_textures, rigged);
+ geometryBytes += genDrawInfo(group, fullbright_mask | extra_mask, sFullbrightFaces[i], fullbright_count[i], false, batch_textures, rigged);
geometryBytes += genDrawInfo(group, alpha_mask | extra_mask, sAlphaFaces[i], alpha_count[i], alpha_sort, batch_textures, rigged);
- geometryBytes += genDrawInfo(group, bump_mask | extra_mask, sBumpFaces[i], bump_count[i], FALSE, FALSE, rigged);
- geometryBytes += genDrawInfo(group, norm_mask | extra_mask, sNormFaces[i], norm_count[i], FALSE, FALSE, rigged);
- geometryBytes += genDrawInfo(group, spec_mask | extra_mask, sSpecFaces[i], spec_count[i], FALSE, FALSE, rigged);
- geometryBytes += genDrawInfo(group, normspec_mask | extra_mask, sNormSpecFaces[i], normspec_count[i], FALSE, FALSE, rigged);
- geometryBytes += genDrawInfo(group, pbr_mask | extra_mask, sPbrFaces[i], pbr_count[i], FALSE, FALSE, rigged);
+ geometryBytes += genDrawInfo(group, bump_mask | extra_mask, sBumpFaces[i], bump_count[i], false, false, rigged);
+ geometryBytes += genDrawInfo(group, norm_mask | extra_mask, sNormFaces[i], norm_count[i], false, false, rigged);
+ geometryBytes += genDrawInfo(group, spec_mask | extra_mask, sSpecFaces[i], spec_count[i], false, false, rigged);
+ geometryBytes += genDrawInfo(group, normspec_mask | extra_mask, sNormSpecFaces[i], normspec_count[i], false, false, rigged);
+ geometryBytes += genDrawInfo(group, pbr_mask | extra_mask, sPbrFaces[i], pbr_count[i], false, false, rigged);
// for rigged set, add weights and disable alpha sorting (rigged items use depth buffer)
extra_mask |= LLVertexBuffer::MAP_WEIGHT4;
- rigged = TRUE;
+ rigged = true;
}
group->mGeometryBytes = geometryBytes;
@@ -6157,7 +6184,7 @@ struct CompareBatchBreakerRigged
}
};
-U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace** faces, U32 face_count, BOOL distance_sort, BOOL batch_textures, BOOL rigged)
+U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace** faces, U32 face_count, bool distance_sort, bool batch_textures, bool rigged)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
@@ -6199,19 +6226,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
LLViewerTexture* last_tex = NULL;
- S32 texture_index_channels = 1;
-
- if (gGLManager.mGLSLVersionMajor > 1 || gGLManager.mGLSLVersionMinor >= 30)
- {
- texture_index_channels = LLGLSLShader::sIndexedTextureChannels-1; //always reserve one for shiny for now just for simplicity;
- }
-
- if (distance_sort)
- {
- texture_index_channels = gDeferredAlphaProgram.mFeatures.mIndexedTextureChannels;
- }
-
- texture_index_channels = LLGLSLShader::sIndexedTextureChannels;
+ S32 texture_index_channels = LLGLSLShader::sIndexedTextureChannels;
bool flexi = false;
@@ -6449,11 +6464,11 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
//append face to appropriate render batch
- BOOL force_simple = facep->getPixelArea() < FORCE_SIMPLE_RENDER_AREA;
- BOOL fullbright = facep->isState(LLFace::FULLBRIGHT);
+ bool force_simple = facep->getPixelArea() < FORCE_SIMPLE_RENDER_AREA;
+ bool fullbright = facep->isState(LLFace::FULLBRIGHT);
if ((mask & LLVertexBuffer::MAP_NORMAL) == 0)
{ //paranoia check to make sure GL doesn't try to read non-existant normals
- fullbright = TRUE;
+ fullbright = true;
}
const LLTextureEntry* te = facep->getTextureEntry();
@@ -6461,12 +6476,12 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
if (hud_group && gltf_mat == nullptr)
{ //all hud attachments are fullbright
- fullbright = TRUE;
+ fullbright = true;
}
tex = facep->getTexture();
- BOOL is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) ? TRUE : FALSE;
+ bool is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) ? true : false;
LLMaterial* mat = nullptr;
bool can_be_shiny = false;
@@ -6492,7 +6507,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
if (!gltf_mat)
{
- is_alpha = (is_alpha || blinn_phong_transparent) ? TRUE : FALSE;
+ is_alpha = (is_alpha || blinn_phong_transparent) ? true : false;
}
if (gltf_mat || (mat && !hud_group))
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index aadc1fbcf3..03dad1807e 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -85,11 +85,11 @@ public:
virtual ~LLVolumeInterface() { }
virtual LLVolumeInterfaceType getInterfaceType() const = 0;
virtual void doIdleUpdate() = 0;
- virtual BOOL doUpdateGeometry(LLDrawable *drawable) = 0;
+ virtual bool doUpdateGeometry(LLDrawable *drawable) = 0;
virtual LLVector3 getPivotPosition() const = 0;
virtual void onSetVolume(const LLVolumeParams &volume_params, const S32 detail) = 0;
- virtual void onSetScale(const LLVector3 &scale, BOOL damped) = 0;
- virtual void onParameterChanged(U16 param_type, LLNetworkData *data, BOOL in_use, bool local_origin) = 0;
+ virtual void onSetScale(const LLVector3 &scale, bool damped) = 0;
+ virtual void onParameterChanged(U16 param_type, LLNetworkData *data, bool in_use, bool local_origin) = 0;
virtual void onShift(const LLVector4a &shift_vector) = 0;
virtual bool isVolumeUnique() const = 0; // Do we need a unique LLVolume instance?
virtual bool isVolumeGlobal() const = 0; // Are we in global space?
@@ -131,16 +131,16 @@ public:
void animateTextures();
- BOOL isVisible() const ;
- BOOL isActive() const override;
- BOOL isAttachment() const override;
- BOOL isRootEdit() const override; // overridden for sake of attachments treating themselves as a root object
- BOOL isHUDAttachment() const override;
+ bool isVisible() const ;
+ bool isActive() const override;
+ bool isAttachment() const override;
+ bool isRootEdit() const override; // overridden for sake of attachments treating themselves as a root object
+ bool isHUDAttachment() const override;
void generateSilhouette(LLSelectNode* nodep, const LLVector3& view_point);
- /*virtual*/ BOOL setParent(LLViewerObject* parent) override;
+ /*virtual*/ bool setParent(LLViewerObject* parent) override;
S32 getLOD() const override { return mLOD; }
- void setNoLOD() { mLOD = NO_LOD; mLODChanged = TRUE; }
+ void setNoLOD() { mLOD = NO_LOD; mLODChanged = true; }
bool isNoLOD() const { return NO_LOD == mLOD; }
const LLVector3 getPivotPositionAgent() const override;
const LLMatrix4& getRelativeXform() const { return mRelativeXform; }
@@ -156,11 +156,11 @@ public:
/*virtual*/ U32 getTriangleCount(S32* vcount = NULL) const override;
/*virtual*/ U32 getHighLODTriangleCount() override;
- /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
+ /*virtual*/ bool lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
- BOOL pick_transparent = FALSE,
- BOOL pick_rigged = FALSE,
- BOOL pick_unselectable = TRUE,
+ bool pick_transparent = false,
+ bool pick_rigged = false,
+ bool pick_unselectable = true,
S32* face_hit = NULL, // which face was hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
@@ -174,18 +174,18 @@ public:
LLVector3 volumeDirectionToAgent(const LLVector3& dir) const;
- BOOL getVolumeChanged() const { return mVolumeChanged; }
+ bool getVolumeChanged() const { return mVolumeChanged; }
F32 getVObjRadius() const override { return mVObjRadius; };
const LLMatrix4& getWorldMatrix(LLXformMatrix* xform) const override;
void markForUpdate() override;
- void faceMappingChanged() override { mFaceMappingChanged=TRUE; }
+ void faceMappingChanged() override { mFaceMappingChanged=true; }
/*virtual*/ void onShift(const LLVector4a &shift_vector) override; // Called when the drawable shifts
/*virtual*/ void parameterChanged(U16 param_type, bool local_origin) override;
- /*virtual*/ void parameterChanged(U16 param_type, LLNetworkData* data, BOOL in_use, bool local_origin) override;
+ /*virtual*/ void parameterChanged(U16 param_type, LLNetworkData* data, bool in_use, bool local_origin) override;
// update mReflectionProbe based on isReflectionProbe()
void updateReflectionProbePtr();
@@ -195,10 +195,10 @@ public:
U32 block_num, const EObjectUpdateType update_type,
LLDataPacker *dp) override;
- /*virtual*/ void setSelected(BOOL sel) override;
- /*virtual*/ BOOL setDrawableParent(LLDrawable* parentp) override;
+ /*virtual*/ void setSelected(bool sel) override;
+ /*virtual*/ bool setDrawableParent(LLDrawable* parentp) override;
- /*virtual*/ void setScale(const LLVector3 &scale, BOOL damped) override;
+ /*virtual*/ void setScale(const LLVector3 &scale, bool damped) override;
/*virtual*/ void changeTEImage(S32 index, LLViewerTexture* new_image) override;
/*virtual*/ void setNumTEs(const U8 num_tes) override;
@@ -223,11 +223,11 @@ public:
/*virtual*/ S32 setTEScaleT(const U8 te, const F32 t) override;
/*virtual*/ S32 setTETexGen(const U8 te, const U8 texgen) override;
/*virtual*/ S32 setTEMediaTexGen(const U8 te, const U8 media) override;
- /*virtual*/ BOOL setMaterial(const U8 material) override;
+ /*virtual*/ bool setMaterial(const U8 material) override;
void setTexture(const S32 face);
S32 getIndexInTex(U32 ch) const {return mIndexInTex[ch];}
- /*virtual*/ BOOL setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume = false) override;
+ /*virtual*/ bool setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume = false) override;
void updateSculptTexture();
void setIndexInTex(U32 ch, S32 index) { mIndexInTex[ch] = index ;}
void sculpt();
@@ -236,16 +236,16 @@ public:
void* user_data, S32 status, LLExtStat ext_status);
void updateRelativeXform(bool force_identity = false);
- /*virtual*/ BOOL updateGeometry(LLDrawable *drawable) override;
+ /*virtual*/ bool updateGeometry(LLDrawable *drawable) override;
/*virtual*/ void updateFaceSize(S32 idx) override;
- /*virtual*/ BOOL updateLOD() override;
+ /*virtual*/ bool updateLOD() override;
void updateRadius() override;
/*virtual*/ void updateTextures() override;
void updateTextureVirtualSize(bool forced = false);
void updateFaceFlags();
void regenFaces();
- BOOL genBBoxes(BOOL force_global, BOOL should_update_octree_bounds = TRUE);
+ bool genBBoxes(bool force_global, bool should_update_octree_bounds = true);
void preRebuild();
virtual void updateSpatialExtents(LLVector4a& min, LLVector4a& max) override;
virtual F32 getBinRadius() override;
@@ -253,7 +253,7 @@ public:
virtual U32 getPartitionType() const override;
// For Lights
- void setIsLight(BOOL is_light);
+ void setIsLight(bool is_light);
//set the gamma-corrected (sRGB) color of this light
void setLightSRGBColor(const LLColor3& color);
//set the linear color of this light
@@ -266,7 +266,7 @@ public:
void setLightTextureID(LLUUID id);
void setSpotLightParams(LLVector3 params);
- BOOL getIsLight() const;
+ bool getIsLight() const;
bool getIsLightFast() const;
@@ -296,25 +296,27 @@ public:
F32 getLightCutoff() const;
// Reflection Probes
- bool setIsReflectionProbe(BOOL is_probe);
+ bool setIsReflectionProbe(bool is_probe);
bool setReflectionProbeAmbiance(F32 ambiance);
bool setReflectionProbeNearClip(F32 near_clip);
bool setReflectionProbeIsBox(bool is_box);
bool setReflectionProbeIsDynamic(bool is_dynamic);
+ bool setReflectionProbeIsMirror(bool is_mirror);
- BOOL isReflectionProbe() const override;
+ bool isReflectionProbe() const override;
F32 getReflectionProbeAmbiance() const;
F32 getReflectionProbeNearClip() const;
bool getReflectionProbeIsBox() const;
bool getReflectionProbeIsDynamic() const;
+ bool getReflectionProbeIsMirror() const;
// Flexible Objects
U32 getVolumeInterfaceID() const;
- virtual BOOL isFlexible() const override;
- virtual BOOL isSculpted() const override;
- virtual BOOL isMesh() const override;
- virtual BOOL isRiggedMesh() const override;
- virtual BOOL hasLightTexture() const override;
+ virtual bool isFlexible() const override;
+ virtual bool isSculpted() const override;
+ virtual bool isMesh() const override;
+ virtual bool isRiggedMesh() const override;
+ virtual bool hasLightTexture() const override;
// fast variants above that use state that is filled in later
// not reliable early in the life of an object, but should be used after
@@ -325,9 +327,9 @@ public:
bool isRiggedMeshFast() const;
bool isAnimatedObjectFast() const;
- BOOL isVolumeGlobal() const;
- BOOL canBeFlexible() const;
- BOOL setIsFlexible(BOOL is_flexible);
+ bool isVolumeGlobal() const;
+ bool canBeFlexible() const;
+ bool setIsFlexible(bool is_flexible);
const LLMeshSkinInfo* getSkinInfo() const;
const bool isSkinInfoUnavaliable() const { return mSkinInfoUnavaliable; }
@@ -420,7 +422,7 @@ public:
protected:
S32 computeLODDetail(F32 distance, F32 radius, F32 lod_factor);
- BOOL calcLOD();
+ bool calcLOD();
LLFace* addFace(S32 face_index);
// stats tracking for render complexity
@@ -434,7 +436,7 @@ protected:
void removeMediaImpl(S32 texture_index) ;
private:
- bool lodOrSculptChanged(LLDrawable *drawable, BOOL &compiled, BOOL &shouldUpdateOctreeBounds);
+ bool lodOrSculptChanged(LLDrawable *drawable, bool &compiled, bool &shouldUpdateOctreeBounds);
public:
@@ -450,16 +452,16 @@ private:
friend class LLDrawable;
friend class LLFace;
- BOOL mFaceMappingChanged;
+ bool mFaceMappingChanged;
LLFrameTimer mTextureUpdateTimer;
S32 mLOD;
- BOOL mLODChanged;
- BOOL mSculptChanged;
- BOOL mColorChanged;
+ bool mLODChanged;
+ bool mSculptChanged;
+ bool mColorChanged;
F32 mSpotLightPriority;
LLMatrix4 mRelativeXform;
LLMatrix3 mRelativeXformInvTrans;
- BOOL mVolumeChanged;
+ bool mVolumeChanged;
F32 mVObjRadius;
LLVolumeInterface *mVolumeImpl;
LLPointer<LLViewerFetchedTexture> mSculptTexture;
diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp
index 77ad967cef..b82af7076d 100644
--- a/indra/newview/llvowater.cpp
+++ b/indra/newview/llvowater.cpp
@@ -56,11 +56,11 @@ LLVOWater::LLVOWater(const LLUUID &id,
mRenderType(LLPipeline::RENDER_TYPE_WATER)
{
// Terrain must draw during selection passes so it can block objects behind it.
- mbCanSelect = FALSE;
+ mbCanSelect = false;
setScale(LLVector3(256.f, 256.f, 0.f)); // Hack for setting scale for bounding boxes/visibility.
- mUseTexture = TRUE;
- mIsEdgePatch = FALSE;
+ mUseTexture = true;
+ mIsEdgePatch = false;
}
@@ -70,9 +70,9 @@ void LLVOWater::markDead()
}
-BOOL LLVOWater::isActive() const
+bool LLVOWater::isActive() const
{
- return FALSE;
+ return false;
}
@@ -96,7 +96,7 @@ void LLVOWater::idleUpdate(LLAgent &agent, const F64 &time)
LLDrawable *LLVOWater::createDrawable(LLPipeline *pipeline)
{
pipeline->allocDrawable(this);
- mDrawable->setLit(FALSE);
+ mDrawable->setLit(false);
mDrawable->setRenderType(mRenderType);
LLDrawPoolWater *pool = (LLDrawPoolWater*) gPipeline.getPool(LLDrawPool::POOL_WATER);
@@ -113,7 +113,7 @@ LLDrawable *LLVOWater::createDrawable(LLPipeline *pipeline)
return mDrawable;
}
-BOOL LLVOWater::updateGeometry(LLDrawable *drawable)
+bool LLVOWater::updateGeometry(LLDrawable *drawable)
{
LL_PROFILE_ZONE_SCOPED;
LLFace *face;
@@ -126,7 +126,7 @@ BOOL LLVOWater::updateGeometry(LLDrawable *drawable)
face = drawable->getFace(0);
if (!face)
{
- return TRUE;
+ return true;
}
// LLVector2 uvs[4];
@@ -231,7 +231,7 @@ BOOL LLVOWater::updateGeometry(LLDrawable *drawable)
mDrawable->movePartition();
LLPipeline::sCompiles++;
- return TRUE;
+ return true;
}
void LLVOWater::initClass()
@@ -249,12 +249,12 @@ void setVecZ(LLVector3& v)
v.mV[VZ] = 1;
}
-void LLVOWater::setUseTexture(const BOOL use_texture)
+void LLVOWater::setUseTexture(const bool use_texture)
{
mUseTexture = use_texture;
}
-void LLVOWater::setIsEdgePatch(const BOOL edge_patch)
+void LLVOWater::setIsEdgePatch(const bool edge_patch)
{
mIsEdgePatch = edge_patch;
}
@@ -292,16 +292,16 @@ U32 LLVOVoidWater::getPartitionType() const
}
LLWaterPartition::LLWaterPartition(LLViewerRegion* regionp)
-: LLSpatialPartition(0, FALSE, regionp)
+: LLSpatialPartition(0, false, regionp)
{
- mInfiniteFarClip = TRUE;
+ mInfiniteFarClip = true;
mDrawableType = LLPipeline::RENDER_TYPE_WATER;
mPartitionType = LLViewerRegion::PARTITION_WATER;
}
LLVoidWaterPartition::LLVoidWaterPartition(LLViewerRegion* regionp) : LLWaterPartition(regionp)
{
- mOcclusionEnabled = FALSE;
+ mOcclusionEnabled = false;
mDrawableType = LLPipeline::RENDER_TYPE_VOIDWATER;
mPartitionType = LLViewerRegion::PARTITION_VOIDWATER;
}
diff --git a/indra/newview/llvowater.h b/indra/newview/llvowater.h
index 7a8d819215..798290ee17 100644
--- a/indra/newview/llvowater.h
+++ b/indra/newview/llvowater.h
@@ -60,7 +60,7 @@ public:
/*virtual*/ void idleUpdate(LLAgent &agent, const F64 &time);
/*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);
- /*virtual*/ BOOL updateGeometry(LLDrawable *drawable);
+ /*virtual*/ bool updateGeometry(LLDrawable *drawable);
/*virtual*/ void updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax);
/*virtual*/ void updateTextures();
@@ -68,16 +68,16 @@ public:
virtual U32 getPartitionType() const;
- /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate.
+ /*virtual*/ bool isActive() const; // Whether this object needs to do an idleUpdate.
- void setUseTexture(const BOOL use_texture);
- void setIsEdgePatch(const BOOL edge_patch);
- BOOL getUseTexture() const { return mUseTexture; }
- BOOL getIsEdgePatch() const { return mIsEdgePatch; }
+ void setUseTexture(const bool use_texture);
+ void setIsEdgePatch(const bool edge_patch);
+ bool getUseTexture() const { return mUseTexture; }
+ bool getIsEdgePatch() const { return mIsEdgePatch; }
protected:
- BOOL mUseTexture;
- BOOL mIsEdgePatch;
+ bool mUseTexture;
+ bool mIsEdgePatch;
S32 mRenderType;
};
diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp
index 9b2871c6a9..e0b312ec7c 100644
--- a/indra/newview/llvowlsky.cpp
+++ b/indra/newview/llvowlsky.cpp
@@ -70,7 +70,7 @@ inline U32 LLVOWLSky::getStarsNumIndices(void)
}
LLVOWLSky::LLVOWLSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
- : LLStaticViewerObject(id, pcode, regionp, TRUE)
+ : LLStaticViewerObject(id, pcode, regionp, true)
{
initStars();
}
@@ -80,9 +80,9 @@ void LLVOWLSky::idleUpdate(LLAgent &agent, const F64 &time)
}
-BOOL LLVOWLSky::isActive(void) const
+bool LLVOWLSky::isActive(void) const
{
- return FALSE;
+ return false;
}
LLDrawable * LLVOWLSky::createDrawable(LLPipeline * pipeline)
@@ -142,7 +142,7 @@ void LLVOWLSky::restoreGL()
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL);
}
-BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable)
+bool LLVOWLSky::updateGeometry(LLDrawable * drawable)
{
LL_PROFILE_ZONE_SCOPED;
LLStrider<LLVector3> vertices;
@@ -158,7 +158,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable)
LL_WARNS() << "Failed to allocate Vertex Buffer on full screen sky update" << LL_ENDL;
}
- BOOL success = mFsSkyVerts->getVertexStrider(vertices)
+ bool success = mFsSkyVerts->getVertexStrider(vertices)
&& mFsSkyVerts->getTexCoord0Strider(texCoords)
&& mFsSkyVerts->getIndexStrider(indices);
@@ -250,7 +250,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable)
#endif
// lock the buffer
- BOOL success = segment->getVertexStrider(vertices)
+ bool success = segment->getVertexStrider(vertices)
&& segment->getTexCoord0Strider(texCoords)
&& segment->getIndexStrider(indices);
@@ -280,7 +280,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable)
LLPipeline::sCompiles++;
- return TRUE;
+ return true;
}
void LLVOWLSky::drawStars(void)
@@ -510,7 +510,7 @@ void LLVOWLSky::updateStarColors()
}
}
-BOOL LLVOWLSky::updateStarGeometry(LLDrawable *drawable)
+bool LLVOWLSky::updateStarGeometry(LLDrawable *drawable)
{
LLStrider<LLVector3> verticesp;
LLStrider<LLColor4U> colorsp;
@@ -525,7 +525,7 @@ BOOL LLVOWLSky::updateStarGeometry(LLDrawable *drawable)
}
}
- BOOL success = mStarsVerts->getVertexStrider(verticesp)
+ bool success = mStarsVerts->getVertexStrider(verticesp)
&& mStarsVerts->getColorStrider(colorsp)
&& mStarsVerts->getTexCoord0Strider(texcoordsp);
@@ -577,5 +577,5 @@ BOOL LLVOWLSky::updateStarGeometry(LLDrawable *drawable)
}
mStarsVerts->unmapBuffer();
- return TRUE;
+ return true;
}
diff --git a/indra/newview/llvowlsky.h b/indra/newview/llvowlsky.h
index 3853dd2c70..8701328695 100644
--- a/indra/newview/llvowlsky.h
+++ b/indra/newview/llvowlsky.h
@@ -42,9 +42,9 @@ public:
LLVOWLSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
/*virtual*/ void idleUpdate(LLAgent &agent, const F64 &time);
- /*virtual*/ BOOL isActive(void) const;
+ /*virtual*/ bool isActive(void) const;
/*virtual*/ LLDrawable * createDrawable(LLPipeline *pipeline);
- /*virtual*/ BOOL updateGeometry(LLDrawable *drawable);
+ /*virtual*/ bool updateGeometry(LLDrawable *drawable);
void drawStars(void);
void drawDome(void);
@@ -75,7 +75,7 @@ private:
void updateStarColors();
// helper function for updating the stars geometry.
- BOOL updateStarGeometry(LLDrawable *drawable);
+ bool updateStarGeometry(LLDrawable *drawable);
private:
LLPointer<LLVertexBuffer> mFsSkyVerts;
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index 948fe55e0d..bd27b75088 100644
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -60,10 +60,10 @@ bool LLFindOutfitItems::operator()(LLInventoryCategory* cat,
|| (item->getType() == LLAssetType::AT_OBJECT)
|| (item->getType() == LLAssetType::AT_GESTURE))
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
//////////////////////////////////////////////////////////////////////////
@@ -100,7 +100,7 @@ LLPanelWearableOutfitItem::Params::Params()
{
}
-BOOL LLPanelWearableOutfitItem::postBuild()
+bool LLPanelWearableOutfitItem::postBuild()
{
LLPanelWearableListItem::postBuild();
@@ -115,10 +115,10 @@ BOOL LLPanelWearableOutfitItem::postBuild()
setWidgetsVisible(false);
reshapeWidgets();
}
- return TRUE;
+ return true;
}
-BOOL LLPanelWearableOutfitItem::handleDoubleClick(S32 x, S32 y, MASK mask)
+bool LLPanelWearableOutfitItem::handleDoubleClick(S32 x, S32 y, MASK mask)
{
if(!mShowWidgets)
{
@@ -133,7 +133,7 @@ BOOL LLPanelWearableOutfitItem::handleDoubleClick(S32 x, S32 y, MASK mask)
{
onAddWearable();
}
- return TRUE;
+ return true;
}
void LLPanelWearableOutfitItem::onAddWearable()
@@ -293,7 +293,7 @@ LLPanelClothingListItem::~LLPanelClothingListItem()
{
}
-BOOL LLPanelClothingListItem::postBuild()
+bool LLPanelClothingListItem::postBuild()
{
LLPanelDeletableWearableListItem::postBuild();
@@ -305,7 +305,7 @@ BOOL LLPanelClothingListItem::postBuild()
setWidgetsVisible(false);
reshapeWidgets();
- return TRUE;
+ return true;
}
//////////////////////////////////////////////////////////////////////////
@@ -370,7 +370,7 @@ LLPanelBodyPartsListItem::~LLPanelBodyPartsListItem()
{
}
-BOOL LLPanelBodyPartsListItem::postBuild()
+bool LLPanelBodyPartsListItem::postBuild()
{
LLPanelInventoryListItemBase::postBuild();
@@ -380,7 +380,7 @@ BOOL LLPanelBodyPartsListItem::postBuild()
setWidgetsVisible(false);
reshapeWidgets();
- return TRUE;
+ return true;
}
static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelDeletableWearableListItem(&typeid(LLPanelDeletableWearableListItem::Params), "deletable_wearable_list_item");
@@ -413,7 +413,7 @@ LLPanelDeletableWearableListItem::LLPanelDeletableWearableListItem(LLViewerInven
setSeparatorVisible(true);
}
-BOOL LLPanelDeletableWearableListItem::postBuild()
+bool LLPanelDeletableWearableListItem::postBuild()
{
LLPanelWearableListItem::postBuild();
@@ -426,7 +426,7 @@ BOOL LLPanelDeletableWearableListItem::postBuild()
setWidgetsVisible(false);
reshapeWidgets();
- return TRUE;
+ return true;
}
@@ -486,11 +486,11 @@ LLPanelDummyClothingListItem* LLPanelDummyClothingListItem::create(LLWearableTyp
return list_item;
}
-BOOL LLPanelDummyClothingListItem::postBuild()
+bool LLPanelDummyClothingListItem::postBuild()
{
addWidgetToRightSide("btn_add_panel");
- setIconImage(LLInventoryIcon::getIcon(LLAssetType::AT_CLOTHING, LLInventoryType::IT_NONE, mWearableType, FALSE));
+ setIconImage(LLInventoryIcon::getIcon(LLAssetType::AT_CLOTHING, LLInventoryType::IT_NONE, mWearableType, false));
updateItem(wearableTypeToString(mWearableType));
// Make it look loke clothing item - reserve space for 'delete' button
@@ -499,7 +499,7 @@ BOOL LLPanelDummyClothingListItem::postBuild()
setWidgetsVisible(false);
reshapeWidgets();
- return TRUE;
+ return true;
}
LLWearableType::EType LLPanelDummyClothingListItem::getWearableType() const
@@ -1041,8 +1041,8 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu
setMenuItemEnabled(menu, "take_off_or_detach", n_worn == n_items);
setMenuItemVisible(menu, "object_profile", !standalone);
setMenuItemEnabled(menu, "object_profile", n_items == 1);
- setMenuItemVisible(menu, "--no options--", FALSE);
- setMenuItemEnabled(menu, "--no options--", FALSE);
+ setMenuItemVisible(menu, "--no options--", false);
+ setMenuItemEnabled(menu, "--no options--", false);
// Populate or hide the "Attach to..." / "Attach to HUD..." submenus.
if (mask == MASK_ATTACHMENT && n_worn == 0)
@@ -1071,7 +1071,7 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu
}
if (num_visible_items == 0)
{
- setMenuItemVisible(menu, "--no options--", TRUE);
+ setMenuItemVisible(menu, "--no options--", true);
}
}
@@ -1091,8 +1091,8 @@ void LLWearableItemsList::ContextMenu::updateItemsLabels(LLContextMenu* menu)
menu_item->setLabel(new_label);
}
-// We need this method to convert non-zero BOOL values to exactly 1 (TRUE).
-// Otherwise code relying on a BOOL value being TRUE may fail
+// We need this method to convert non-zero bool values to exactly 1 (true).
+// Otherwise code relying on a bool value being true may fail
// (I experienced a weird assert in LLView::drawChildren() because of that.
// static
void LLWearableItemsList::ContextMenu::setMenuItemVisible(LLContextMenu* menu, const std::string& name, bool val)
diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h
index 0dbe50d5e4..4918b39141 100644
--- a/indra/newview/llwearableitemslist.h
+++ b/indra/newview/llwearableitemslist.h
@@ -83,8 +83,8 @@ public:
Params();
};
- BOOL postBuild();
- BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
+ bool postBuild();
+ bool handleDoubleClick(S32 x, S32 y, MASK mask);
static LLPanelWearableOutfitItem* create(LLViewerInventoryItem* item,
bool worn_indication_enabled,
@@ -124,7 +124,7 @@ public:
virtual ~LLPanelDeletableWearableListItem() {};
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/**
* Make button visible during mouse over event.
@@ -177,7 +177,7 @@ public:
virtual ~LLPanelClothingListItem();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/**
* Make button visible during mouse over event.
@@ -212,7 +212,7 @@ public:
virtual ~LLPanelBodyPartsListItem();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/**
* Make button visible during mouse over event.
@@ -241,7 +241,7 @@ public:
};
static LLPanelDummyClothingListItem* create(LLWearableType::EType w_type);
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
LLWearableType::EType getWearableType() const;
protected:
diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp
index de01fbb73d..20ff0146c7 100644
--- a/indra/newview/llwearablelist.cpp
+++ b/indra/newview/llwearablelist.cpp
@@ -90,14 +90,14 @@ void LLWearableList::getAsset(const LLAssetID& assetID, const std::string& weara
asset_type,
LLWearableList::processGetAssetReply,
(void*)new LLWearableArrivedData( asset_type, wearable_name, avatarp, asset_arrived_callback, userdata ),
- TRUE);
+ true);
}
}
// static
void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID& uuid, void* userdata, S32 status, LLExtStat ext_status )
{
- BOOL isNewWearable = FALSE;
+ bool isNewWearable = false;
LLWearableArrivedData* data = (LLWearableArrivedData*) userdata;
LLViewerWearable* wearable = NULL; // NULL indicates failure
LLAvatarAppearance *avatarp = data->mAvatarp;
@@ -127,7 +127,7 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID
{
if (wearable->getType() == LLWearableType::WT_COUNT)
{
- isNewWearable = TRUE;
+ isNewWearable = true;
}
delete wearable;
wearable = NULL;
diff --git a/indra/newview/llwebprofile.cpp b/indra/newview/llwebprofile.cpp
index f2d7e4585a..45388becc7 100644
--- a/indra/newview/llwebprofile.cpp
+++ b/indra/newview/llwebprofile.cpp
@@ -42,7 +42,7 @@
#include "llcorehttputil.h"
// third-party
-#include "json/reader.h" // JSON
+
/*
* Workflow:
@@ -239,10 +239,12 @@ LLCore::BufferArray::ptr_t LLWebProfile::buildPostData(const LLSD &data, LLPoint
<< "Content-Disposition: form-data; name=\"file\"; filename=\"snapshot.png\"\r\n"
<< "Content-Type: image/png\r\n\r\n";
+ LLImageDataSharedLock lock(image);
+
// Insert the image data.
//char *datap = (char *)(image->getData());
//bas.write(datap, image->getDataSize());
- U8* image_data = image->getData();
+ const U8* image_data = image->getData();
for (S32 i = 0; i < image->getDataSize(); ++i)
{
bas << image_data[i];
diff --git a/indra/newview/llwindebug.cpp b/indra/newview/llwindebug.cpp
index 92c80ce534..e298ff42bb 100644
--- a/indra/newview/llwindebug.cpp
+++ b/indra/newview/llwindebug.cpp
@@ -30,7 +30,7 @@
// based on dbghelp.h
-typedef BOOL (WINAPI *MINIDUMPWRITEDUMP)(HANDLE hProcess, DWORD dwPid, HANDLE hFile, MINIDUMP_TYPE DumpType,
+typedef bool (WINAPI *MINIDUMPWRITEDUMP)(HANDLE hProcess, DWORD dwPid, HANDLE hFile, MINIDUMP_TYPE DumpType,
CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam,
CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam,
CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam
diff --git a/indra/newview/llwindowlistener.cpp b/indra/newview/llwindowlistener.cpp
index 0edabf358f..26799d60be 100644
--- a/indra/newview/llwindowlistener.cpp
+++ b/indra/newview/llwindowlistener.cpp
@@ -330,7 +330,7 @@ void LLWindowListener::keyUp(LLSD const & evt)
}
// for WhichButton
-typedef BOOL (LLWindowCallbacks::*MouseMethod)(LLWindow *, LLCoordGL, MASK);
+typedef bool (LLWindowCallbacks::*MouseMethod)(LLWindow *, LLCoordGL, MASK);
struct Actions
{
Actions(const MouseMethod& d, const MouseMethod& u): down(d), up(u), valid(true) {}
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 9381211e9b..2d93fcee39 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -107,7 +107,7 @@ LLWorld::LLWorld() :
*(default_texture++) = MAX_WATER_COLOR.mV[2];
*(default_texture++) = MAX_WATER_COLOR.mV[3];
- mDefaultWaterTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE);
+ mDefaultWaterTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), false);
gGL.getTexUnit(0)->bind(mDefaultWaterTexturep);
mDefaultWaterTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
@@ -450,7 +450,7 @@ void LLWorld::updateAgentOffset(const LLVector3d &offset_global)
}
-BOOL LLWorld::positionRegionValidGlobal(const LLVector3d &pos_global)
+bool LLWorld::positionRegionValidGlobal(const LLVector3d &pos_global)
{
for (region_list_t::iterator iter = mRegionList.begin();
iter != mRegionList.end(); ++iter)
@@ -458,10 +458,10 @@ BOOL LLWorld::positionRegionValidGlobal(const LLVector3d &pos_global)
LLViewerRegion* regionp = *iter;
if (regionp->pointInRegionGlobal(pos_global))
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
@@ -961,7 +961,7 @@ void LLWorld::updateWaterObjects()
if (!getRegionFromHandle(region_handle))
{ // No region at that area, so make water
LLVOWater* waterp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, gAgent.getRegion());
- waterp->setUseTexture(FALSE);
+ waterp->setUseTexture(false);
waterp->setPositionGlobal(LLVector3d(x + rwidth/2,
y + rwidth/2,
256.f + water_height));
@@ -1015,8 +1015,8 @@ void LLWorld::updateWaterObjects()
mEdgeWaterObjects[dir] = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_VOID_WATER,
gAgent.getRegion());
waterp = mEdgeWaterObjects[dir];
- waterp->setUseTexture(FALSE);
- waterp->setIsEdgePatch(TRUE);
+ waterp->setUseTexture(false);
+ waterp->setIsEdgePatch(true);
gPipeline.createObject(waterp);
}
@@ -1129,7 +1129,7 @@ void process_enable_simulator(LLMessageSystem *msg, void **user_data)
LLHost sim(ip_u32, port);
// Viewer trusts the simulator.
- msg->enableCircuit(sim, TRUE);
+ msg->enableCircuit(sim, true);
LLWorld::getInstance()->addRegion(handle, sim);
// give the simulator a message it can use to get ip and port
@@ -1259,7 +1259,7 @@ void send_agent_pause()
gMessageSystem->sendReliable(regionp->getHost());
}
- gObjectList.mWasPaused = TRUE;
+ gObjectList.mWasPaused = true;
LLViewerStats::instance().getRecording().stop();
}
diff --git a/indra/newview/llworld.h b/indra/newview/llworld.h
index 2878d10f5e..ae4d1ca261 100644
--- a/indra/newview/llworld.h
+++ b/indra/newview/llworld.h
@@ -81,7 +81,7 @@ public:
LLViewerRegion* getRegionFromPosAgent(const LLVector3 &pos);
LLViewerRegion* getRegionFromHandle(const U64 &handle);
LLViewerRegion* getRegionFromID(const LLUUID& region_id);
- BOOL positionRegionValidGlobal(const LLVector3d& pos); // true if position is in valid region
+ bool positionRegionValidGlobal(const LLVector3d& pos); // true if position is in valid region
LLVector3d clipToVisibleRegions(const LLVector3d &start_pos, const LLVector3d &end_pos);
void updateAgentOffset(const LLVector3d &offset);
diff --git a/indra/newview/llworldmapmessage.cpp b/indra/newview/llworldmapmessage.cpp
index e4a9f9afdb..9b9a7f58f6 100644
--- a/indra/newview/llworldmapmessage.cpp
+++ b/indra/newview/llworldmapmessage.cpp
@@ -63,7 +63,7 @@ void LLWorldMapMessage::sendItemRequest(U32 type, U64 handle)
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->addU32Fast(_PREHASH_Flags, LAYER_FLAG);
msg->addU32Fast(_PREHASH_EstateID, 0); // Filled in on sim
- msg->addBOOLFast(_PREHASH_Godlike, FALSE); // Filled in on sim
+ msg->addBOOLFast(_PREHASH_Godlike, false); // Filled in on sim
msg->nextBlockFast(_PREHASH_RequestData);
msg->addU32Fast(_PREHASH_ItemType, type);
@@ -84,7 +84,7 @@ void LLWorldMapMessage::sendNamedRegionRequest(std::string region_name)
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->addU32Fast(_PREHASH_Flags, LAYER_FLAG);
msg->addU32Fast(_PREHASH_EstateID, 0); // Filled in on sim
- msg->addBOOLFast(_PREHASH_Godlike, FALSE); // Filled in on sim
+ msg->addBOOLFast(_PREHASH_Godlike, false); // Filled in on sim
msg->nextBlockFast(_PREHASH_NameData);
msg->addStringFast(_PREHASH_Name, region_name);
gAgent.sendReliableMessage();
@@ -138,7 +138,7 @@ void LLWorldMapMessage::sendMapBlockRequest(U16 min_x, U16 min_y, U16 max_x, U16
flags |= (return_nonexistent ? 0x10000 : 0);
msg->addU32Fast(_PREHASH_Flags, flags);
msg->addU32Fast(_PREHASH_EstateID, 0); // Filled in on sim
- msg->addBOOLFast(_PREHASH_Godlike, FALSE); // Filled in on sim
+ msg->addBOOLFast(_PREHASH_Godlike, false); // Filled in on sim
msg->nextBlockFast(_PREHASH_PositionData);
msg->addU16Fast(_PREHASH_MinX, min_x);
msg->addU16Fast(_PREHASH_MinY, min_y);
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index a8676d2ad6..a90839ae7e 100755
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -60,22 +60,22 @@
#include "llglheaders.h"
// # Constants
-static const F32 MAP_DEFAULT_SCALE = 128.f;
-static const F32 MAP_ITERP_TIME_CONSTANT = 0.75f;
-static const F32 MAP_ZOOM_ACCELERATION_TIME = 0.3f;
-static const F32 MAP_ZOOM_MAX_INTERP = 0.5f;
-static const F32 MAP_SCALE_SNAP_THRESHOLD = 0.005f;
+static constexpr F32 MAP_DEFAULT_SCALE = 128.f;
+static constexpr F32 MAP_ITERP_TIME_CONSTANT = 0.75f;
+static constexpr F32 MAP_ZOOM_ACCELERATION_TIME = 0.3f;
+static constexpr F32 MAP_ZOOM_MAX_INTERP = 0.5f;
+static constexpr F32 MAP_SCALE_SNAP_THRESHOLD = 0.005f;
// Basically a C++ implementation of the OCEAN_COLOR defined in mapstitcher.py
// Please ensure consistency between those 2 files (TODO: would be better to get that color from an asset source...)
// OCEAN_COLOR = "#1D475F"
-const F32 OCEAN_RED = (F32)(0x1D)/255.f;
-const F32 OCEAN_GREEN = (F32)(0x47)/255.f;
-const F32 OCEAN_BLUE = (F32)(0x5F)/255.f;
+constexpr F32 OCEAN_RED = (F32)(0x1D)/255.f;
+constexpr F32 OCEAN_GREEN = (F32)(0x47)/255.f;
+constexpr F32 OCEAN_BLUE = (F32)(0x5F)/255.f;
-const F32 GODLY_TELEPORT_HEIGHT = 200.f;
-const F32 BIG_DOT_RADIUS = 5.f;
-BOOL LLWorldMapView::sHandledLastClick = FALSE;
+constexpr F32 GODLY_TELEPORT_HEIGHT = 200.f;
+constexpr F32 BIG_DOT_RADIUS = 5.f;
+bool LLWorldMapView::sHandledLastClick = false;
LLUIImagePtr LLWorldMapView::sAvatarSmallImage = NULL;
LLUIImagePtr LLWorldMapView::sAvatarYouImage = NULL;
@@ -174,12 +174,12 @@ void LLWorldMapView::cleanupClass()
LLWorldMapView::LLWorldMapView() :
LLPanel(),
mBackgroundColor(LLColor4(OCEAN_RED, OCEAN_GREEN, OCEAN_BLUE, 1.f)),
- mItemPicked(FALSE),
+ mItemPicked(false),
mPanX(0.f),
mPanY(0.f),
mTargetPanX(0.f),
mTargetPanY(0.f),
- mPanning(FALSE),
+ mPanning(false),
mMouseDownPanX(0),
mMouseDownPanY(0),
mMouseDownX(0),
@@ -194,7 +194,7 @@ LLWorldMapView::LLWorldMapView() :
clearLastClick();
}
-BOOL LLWorldMapView::postBuild()
+bool LLWorldMapView::postBuild()
{
mTextBoxNorth = getChild<LLTextBox> ("floater_map_north");
mTextBoxEast = getChild<LLTextBox> ("floater_map_east");
@@ -325,7 +325,7 @@ void LLWorldMapView::translatePan(S32 delta_x, S32 delta_y)
// static
-void LLWorldMapView::setPan(S32 x, S32 y, BOOL snap)
+void LLWorldMapView::setPan(S32 x, S32 y, bool snap)
{
mMapIterpTime = MAP_ITERP_TIME_CONSTANT;
mTargetPanX = (F32) x;
@@ -339,7 +339,7 @@ void LLWorldMapView::setPan(S32 x, S32 y, BOOL snap)
}
// static
-void LLWorldMapView::setPanWithInterpTime(S32 x, S32 y, BOOL snap, F32 interp_time)
+void LLWorldMapView::setPanWithInterpTime(S32 x, S32 y, bool snap, F32 interp_time)
{
setPan(x, y, snap);
mMapIterpTime = interp_time;
@@ -350,7 +350,7 @@ bool LLWorldMapView::showRegionInfo() { return (LLWorldMipmap::scaleToLevel(mMap
///////////////////////////////////////////////////////////////////////////////////
// HELPERS
-BOOL is_agent_in_region(LLViewerRegion* region, LLSimInfo* info)
+bool is_agent_in_region(LLViewerRegion* region, LLSimInfo* info)
{
return (region && info && info->isName(region->getName()));
}
@@ -520,7 +520,7 @@ void LLWorldMapView::draw()
S32_MAX, //max_chars
mMapScale, //max_pixels
NULL,
- /*use_ellipses*/TRUE);
+ /*use_ellipses*/true);
}
}
}
@@ -552,7 +552,7 @@ void LLWorldMapView::draw()
{
drawTracking(pos_global,
lerp(LLColor4::yellow, LLColor4::orange, 0.4f),
- TRUE,
+ true,
"You are here",
"",
LLFontGL::getFontSansSerifSmall()->getLineHeight()); // offset vertically by one line, to avoid overlap with target tracking
@@ -572,7 +572,7 @@ void LLWorldMapView::draw()
LLTracker::ETrackingStatus tracking_status = LLTracker::getTrackingStatus();
if ( LLTracker::TRACKING_AVATAR == tracking_status )
{
- drawTracking( LLAvatarTracker::instance().getGlobalPos(), map_track_color, TRUE, LLTracker::getLabel(), "" );
+ drawTracking( LLAvatarTracker::instance().getGlobalPos(), map_track_color, true, LLTracker::getLabel(), "" );
}
else if ( LLTracker::TRACKING_LANDMARK == tracking_status
|| LLTracker::TRACKING_LOCATION == tracking_status )
@@ -582,7 +582,7 @@ void LLWorldMapView::draw()
LLVector3d pos_global = LLTracker::getTrackedPositionGlobal();
if (!pos_global.isExactlyZero())
{
- drawTracking( pos_global, map_track_color, TRUE, LLTracker::getLabel(), LLTracker::getToolTip() );
+ drawTracking( pos_global, map_track_color, true, LLTracker::getLabel(), LLTracker::getToolTip() );
}
}
else if (LLWorldMap::getInstance()->isTracking())
@@ -591,7 +591,7 @@ void LLWorldMapView::draw()
{
// We know this location to be invalid, draw a blue circle
LLColor4 loading_color(0.0, 0.5, 1.0, 1.0);
- drawTracking( LLWorldMap::getInstance()->getTrackedPositionGlobal(), loading_color, TRUE, getString("InvalidLocation"), "");
+ drawTracking( LLWorldMap::getInstance()->getTrackedPositionGlobal(), loading_color, true, getString("InvalidLocation"), "");
}
else
{
@@ -599,7 +599,7 @@ void LLWorldMapView::draw()
double value = fmod(current_time, 2);
value = 0.5 + 0.5*cos(value * F_PI);
LLColor4 loading_color(0.0, F32(value/2), F32(value), 1.0);
- drawTracking( LLWorldMap::getInstance()->getTrackedPositionGlobal(), loading_color, TRUE, getString("Loading"), "");
+ drawTracking( LLWorldMap::getInstance()->getTrackedPositionGlobal(), loading_color, true, getString("Loading"), "");
}
}
@@ -617,7 +617,7 @@ void LLWorldMapView::draw()
//virtual
-void LLWorldMapView::setVisible(BOOL visible)
+void LLWorldMapView::setVisible(bool visible)
{
LLPanel::setVisible(visible);
if (!visible)
@@ -831,8 +831,8 @@ void LLWorldMapView::drawItems()
bool mature_enabled = gAgent.canAccessMature();
bool adult_enabled = gAgent.canAccessAdult();
- BOOL show_mature = mature_enabled && gSavedSettings.getBOOL("ShowMatureEvents");
- BOOL show_adult = adult_enabled && gSavedSettings.getBOOL("ShowAdultEvents");
+ bool show_mature = mature_enabled && gSavedSettings.getBOOL("ShowMatureEvents");
+ bool show_adult = adult_enabled && gSavedSettings.getBOOL("ShowAdultEvents");
for (handle_list_t::iterator iter = mVisibleRegions.begin(); iter != mVisibleRegions.end(); ++iter)
{
@@ -990,7 +990,7 @@ LLVector3 LLWorldMapView::globalPosToView( const LLVector3d& global_pos )
}
-void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4& color, BOOL draw_arrow,
+void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4& color, bool draw_arrow,
const std::string& label, const std::string& tooltip, S32 vert_offset )
{
LLVector3 pos_local = globalPosToView( pos_global );
@@ -1078,7 +1078,7 @@ LLVector3d LLWorldMapView::viewPosToGlobal( S32 x, S32 y )
}
-BOOL LLWorldMapView::handleToolTip( S32 x, S32 y, MASK mask )
+bool LLWorldMapView::handleToolTip( S32 x, S32 y, MASK mask )
{
LLVector3d pos_global = viewPosToGlobal(x, y);
U64 handle = to_region_handle(pos_global);
@@ -1131,7 +1131,7 @@ BOOL LLWorldMapView::handleToolTip( S32 x, S32 y, MASK mask )
.message(tooltip_msg)
.sticky_rect(sticky_rect_screen));
}
- return TRUE;
+ return true;
}
// Pass relative Z of 0 to draw at same level.
@@ -1461,7 +1461,7 @@ void LLWorldMapView::updateDirections()
}
-void LLWorldMapView::reshape( S32 width, S32 height, BOOL called_from_parent )
+void LLWorldMapView::reshape( S32 width, S32 height, bool called_from_parent )
{
LLView::reshape( width, height, called_from_parent );
}
@@ -1546,7 +1546,7 @@ void LLWorldMapView::handleClick(S32 x, S32 y, MASK mask,
if (checkItemHit(x, y, event, id, false))
{
*hit_type = MAP_ITEM_PG_EVENT;
- mItemPicked = TRUE;
+ mItemPicked = true;
gFloaterWorldMap->trackEvent(event);
return;
}
@@ -1562,7 +1562,7 @@ void LLWorldMapView::handleClick(S32 x, S32 y, MASK mask,
if (checkItemHit(x, y, event, id, false))
{
*hit_type = MAP_ITEM_MATURE_EVENT;
- mItemPicked = TRUE;
+ mItemPicked = true;
gFloaterWorldMap->trackEvent(event);
return;
}
@@ -1578,7 +1578,7 @@ void LLWorldMapView::handleClick(S32 x, S32 y, MASK mask,
if (checkItemHit(x, y, event, id, false))
{
*hit_type = MAP_ITEM_ADULT_EVENT;
- mItemPicked = TRUE;
+ mItemPicked = true;
gFloaterWorldMap->trackEvent(event);
return;
}
@@ -1594,7 +1594,7 @@ void LLWorldMapView::handleClick(S32 x, S32 y, MASK mask,
if (checkItemHit(x, y, event, id, true))
{
*hit_type = MAP_ITEM_LAND_FOR_SALE;
- mItemPicked = TRUE;
+ mItemPicked = true;
return;
}
++it;
@@ -1611,7 +1611,7 @@ void LLWorldMapView::handleClick(S32 x, S32 y, MASK mask,
if (checkItemHit(x, y, event, id, true))
{
*hit_type = MAP_ITEM_LAND_FOR_SALE_ADULT;
- mItemPicked = TRUE;
+ mItemPicked = true;
return;
}
++it;
@@ -1624,13 +1624,13 @@ void LLWorldMapView::handleClick(S32 x, S32 y, MASK mask,
// If we get here, we haven't clicked on anything
gFloaterWorldMap->trackLocation(pos_global);
- mItemPicked = FALSE;
+ mItemPicked = false;
*id = LLUUID::null;
return;
}
-BOOL LLWorldMapView::handleMouseDown( S32 x, S32 y, MASK mask )
+bool LLWorldMapView::handleMouseDown( S32 x, S32 y, MASK mask )
{
gFocusMgr.setMouseCapture( this );
@@ -1638,11 +1638,11 @@ BOOL LLWorldMapView::handleMouseDown( S32 x, S32 y, MASK mask )
mMouseDownPanY = ll_round(mPanY);
mMouseDownX = x;
mMouseDownY = y;
- sHandledLastClick = TRUE;
- return TRUE;
+ sHandledLastClick = true;
+ return true;
}
-BOOL LLWorldMapView::handleMouseUp( S32 x, S32 y, MASK mask )
+bool LLWorldMapView::handleMouseUp( S32 x, S32 y, MASK mask )
{
if (hasMouseCapture())
{
@@ -1658,7 +1658,7 @@ BOOL LLWorldMapView::handleMouseUp( S32 x, S32 y, MASK mask )
LLUI::getInstance()->setMousePositionLocal(this, local_x, local_y);
// finish the pan
- mPanning = FALSE;
+ mPanning = false;
mMouseDownX = 0;
mMouseDownY = 0;
@@ -1672,9 +1672,9 @@ BOOL LLWorldMapView::handleMouseUp( S32 x, S32 y, MASK mask )
}
gViewerWindow->showCursor();
gFocusMgr.setMouseCapture( NULL );
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void LLWorldMapView::updateVisibleBlocks()
@@ -1708,7 +1708,7 @@ void LLWorldMapView::updateVisibleBlocks()
LLWorldMap::getInstance()->updateRegions(world_left, world_bottom, world_right, world_top);
}
-BOOL LLWorldMapView::handleHover( S32 x, S32 y, MASK mask )
+bool LLWorldMapView::handleHover( S32 x, S32 y, MASK mask )
{
if (hasMouseCapture())
{
@@ -1717,7 +1717,7 @@ BOOL LLWorldMapView::handleHover( S32 x, S32 y, MASK mask )
// just started panning, so hide cursor
if (!mPanning)
{
- mPanning = TRUE;
+ mPanning = true;
gViewerWindow->hideCursor();
}
@@ -1735,7 +1735,7 @@ BOOL LLWorldMapView::handleHover( S32 x, S32 y, MASK mask )
// doesn't matter, cursor should be hidden
gViewerWindow->setCursor(UI_CURSOR_CROSS );
- return TRUE;
+ return true;
}
else
{
@@ -1751,12 +1751,12 @@ BOOL LLWorldMapView::handleHover( S32 x, S32 y, MASK mask )
gViewerWindow->setCursor( UI_CURSOR_CROSS );
}
LL_DEBUGS("UserInput") << "hover handled by LLWorldMapView" << LL_ENDL;
- return TRUE;
+ return true;
}
}
-BOOL LLWorldMapView::handleDoubleClick( S32 x, S32 y, MASK mask )
+bool LLWorldMapView::handleDoubleClick( S32 x, S32 y, MASK mask )
{
if( sHandledLastClick )
{
@@ -1820,9 +1820,9 @@ BOOL LLWorldMapView::handleDoubleClick( S32 x, S32 y, MASK mask )
}
};
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
// static
diff --git a/indra/newview/llworldmapview.h b/indra/newview/llworldmapview.h
index ce8af76a82..14458ec5a3 100644
--- a/indra/newview/llworldmapview.h
+++ b/indra/newview/llworldmapview.h
@@ -53,16 +53,16 @@ public:
LLWorldMapView();
virtual ~LLWorldMapView();
- virtual BOOL postBuild();
+ virtual bool postBuild();
- virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE );
- virtual void setVisible(BOOL visible);
+ virtual void reshape(S32 width, S32 height, bool called_from_parent = true );
+ virtual void setVisible(bool visible);
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask );
- virtual BOOL handleHover( S32 x, S32 y, MASK mask );
- virtual BOOL handleToolTip( S32 x, S32 y, MASK mask);
+ virtual bool handleMouseDown(S32 x, S32 y, MASK mask);
+ virtual bool handleMouseUp(S32 x, S32 y, MASK mask);
+ virtual bool handleDoubleClick( S32 x, S32 y, MASK mask );
+ virtual bool handleHover( S32 x, S32 y, MASK mask );
+ virtual bool handleToolTip( S32 x, S32 y, MASK mask);
bool checkItemHit(S32 x, S32 y, LLItemInfo& item, LLUUID* id, bool track);
void handleClick(S32 x, S32 y, MASK mask, S32* hit_type, LLUUID* id);
@@ -79,8 +79,8 @@ public:
static F32 getScaleSetting();
// Pan is in pixels relative to the center of the map.
void translatePan( S32 delta_x, S32 delta_y );
- void setPan( S32 x, S32 y, BOOL snap = TRUE );
- void setPanWithInterpTime(S32 x, S32 y, BOOL snap, F32 interp_time);
+ void setPan( S32 x, S32 y, bool snap = true );
+ void setPanWithInterpTime(S32 x, S32 y, bool snap, F32 interp_time);
// Return true if the current scale level is above the threshold for accessing region info
bool showRegionInfo();
@@ -102,7 +102,7 @@ public:
// Draw the tracking indicator, doing the right thing if it's outside
// the view area.
- void drawTracking( const LLVector3d& pos_global, const LLColor4& color, BOOL draw_arrow = TRUE,
+ void drawTracking( const LLVector3d& pos_global, const LLColor4& color, bool draw_arrow = true,
const std::string& label = std::string(), const std::string& tooltip = std::string(),
S32 vert_offset = 0);
static void drawTrackingArrow(const LLRect& view_rect, S32 x, S32 y,
@@ -131,7 +131,7 @@ public:
const std::string& second_line);
// Prevents accidental double clicks
- static void clearLastClick() { sHandledLastClick = FALSE; }
+ static void clearLastClick() { sHandledLastClick = false; }
// if the view changes, download additional sim info as needed
void updateVisibleBlocks();
@@ -163,7 +163,7 @@ public:
static LLUIImagePtr sForSaleImage;
static LLUIImagePtr sForSaleAdultImage;
- BOOL mItemPicked;
+ bool mItemPicked;
F32 mPanX; // in pixels
F32 mPanY; // in pixels
@@ -174,7 +174,7 @@ public:
static bool sVisibleTilesLoaded;
// Are we mid-pan from a user drag?
- BOOL mPanning;
+ bool mPanning;
S32 mMouseDownPanX; // value at start of drag
S32 mMouseDownPanY; // value at start of drag
S32 mMouseDownX;
@@ -191,7 +191,7 @@ public:
LLTextBox* mTextBoxSouthWest;
LLTextBox* mTextBoxScrollHint;
- static BOOL sHandledLastClick;
+ static bool sHandledLastClick;
S32 mSelectIDStart;
// Keep the list of regions that are displayed on screen. Avoids iterating through the whole region map after draw().
diff --git a/indra/newview/llworldmipmap.cpp b/indra/newview/llworldmipmap.cpp
index 040d0deaf3..2c0beb0141 100644
--- a/indra/newview/llworldmipmap.cpp
+++ b/indra/newview/llworldmipmap.cpp
@@ -189,7 +189,7 @@ LLPointer<LLViewerFetchedTexture> LLWorldMipmap::loadObjectsTile(U32 grid_x, U32
// END DEBUG
//LL_INFOS("WorldMap") << "LLWorldMipmap::loadObjectsTile(), URL = " << imageurl << LL_ENDL;
- LLPointer<LLViewerFetchedTexture> img = LLViewerTextureManager::getFetchedTextureFromUrl(imageurl, FTT_MAP_TILE, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+ LLPointer<LLViewerFetchedTexture> img = LLViewerTextureManager::getFetchedTextureFromUrl(imageurl, FTT_MAP_TILE, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
LL_INFOS("MAPURL") << "fetching map tile from " << imageurl << LL_ENDL;
img->setBoostLevel(LLGLTexture::BOOST_MAP);
diff --git a/indra/newview/llxmlrpclistener.cpp b/indra/newview/llxmlrpclistener.cpp
index 3c2c6d15c4..461d556946 100644
--- a/indra/newview/llxmlrpclistener.cpp
+++ b/indra/newview/llxmlrpclistener.cpp
@@ -411,34 +411,20 @@ private:
return parseValues(status_string, "", param);
}
- /**
- * Parse key/value pairs from a given XMLRPC_VALUE into an LLSD map.
- * @param key_pfx Used to describe a given key in log messages. At top
- * level, pass "". When parsing an options array, pass the top-level key
- * name of the array plus the index of the array entry; to this we'll
- * append the subkey of interest.
- * @param param XMLRPC_VALUE iterator. At top level, pass
- * XMLRPC_RequestGetData(XMLRPC_REQUEST).
- */
- LLSD parseValues(std::string& status_string, const std::string& key_pfx, XMLRPC_VALUE param)
+ LLSD parseValue(std::string& status_string, const std::string& key, const std::string& key_pfx, XMLRPC_VALUE param)
{
- LLSD responses;
- for (XMLRPC_VALUE current = XMLRPC_VectorRewind(param); current;
- current = XMLRPC_VectorNext(param))
+ LLSD response;
+
+ XMLRPC_VALUE_TYPE_EASY type = XMLRPC_GetValueTypeEasy(param);
+ switch (type)
{
- std::string key(XMLRPC_GetValueID(current));
- LL_DEBUGS("LLXMLRPCListener") << "key: " << key_pfx << key << LL_ENDL;
- XMLRPC_VALUE_TYPE_EASY type = XMLRPC_GetValueTypeEasy(current);
- switch (type)
- {
case xmlrpc_type_empty:
LL_INFOS("LLXMLRPCListener") << "Empty result for key " << key_pfx << key << LL_ENDL;
- responses.insert(key, LLSD());
break;
case xmlrpc_type_base64:
{
- S32 len = XMLRPC_GetValueStringLen(current);
- const char* buf = XMLRPC_GetValueBase64(current);
+ S32 len = XMLRPC_GetValueStringLen(param);
+ const char* buf = XMLRPC_GetValueBase64(param);
if ((len > 0) && buf)
{
// During implementation this code was not tested
@@ -449,49 +435,44 @@ private:
LLSD::Binary data;
data.resize(len);
memcpy((void*)&data[0], (void*)buf, len);
- responses.insert(key, data);
+ response = data;
}
else
{
LL_WARNS("LLXMLRPCListener") << "Potentially malformed xmlrpc_type_base64 for key "
<< key_pfx << key << LL_ENDL;
- responses.insert(key, LLSD());
}
break;
}
case xmlrpc_type_boolean:
{
- LLSD::Boolean val(XMLRPC_GetValueBoolean(current));
- LL_DEBUGS("LLXMLRPCListener") << "val: " << val << LL_ENDL;
- responses.insert(key, val);
+ response = LLSD::Boolean(XMLRPC_GetValueBoolean(param));
+ LL_DEBUGS("LLXMLRPCListener") << "val: " << response << LL_ENDL;
break;
}
case xmlrpc_type_datetime:
{
- std::string iso8601_date(XMLRPC_GetValueDateTime_ISO8601(current));
+ std::string iso8601_date(XMLRPC_GetValueDateTime_ISO8601(param));
LL_DEBUGS("LLXMLRPCListener") << "val: " << iso8601_date << LL_ENDL;
- responses.insert(key, LLSD::Date(iso8601_date));
+ response = LLSD::Date(iso8601_date);
break;
}
case xmlrpc_type_double:
{
- LLSD::Real val(XMLRPC_GetValueDouble(current));
- LL_DEBUGS("LLXMLRPCListener") << "val: " << val << LL_ENDL;
- responses.insert(key, val);
+ response = LLSD::Real(XMLRPC_GetValueDouble(param));
+ LL_DEBUGS("LLXMLRPCListener") << "val: " << response << LL_ENDL;
break;
}
case xmlrpc_type_int:
{
- LLSD::Integer val(XMLRPC_GetValueInt(current));
- LL_DEBUGS("LLXMLRPCListener") << "val: " << val << LL_ENDL;
- responses.insert(key, val);
+ response = LLSD::Integer(XMLRPC_GetValueInt(param));
+ LL_DEBUGS("LLXMLRPCListener") << "val: " << response << LL_ENDL;
break;
}
case xmlrpc_type_string:
{
- LLSD::String val(XMLRPC_GetValueString(current));
- LL_DEBUGS("LLXMLRPCListener") << "val: " << val << LL_ENDL;
- responses.insert(key, val);
+ response = LLSD::String(XMLRPC_GetValueString(param));
+ LL_DEBUGS("LLXMLRPCListener") << "val: " << response << LL_ENDL;
break;
}
case xmlrpc_type_mixed:
@@ -501,8 +482,8 @@ private:
// recursively parsing each submap and collecting them.
LLSD array;
int i = 0; // for descriptive purposes
- for (XMLRPC_VALUE row = XMLRPC_VectorRewind(current); row;
- row = XMLRPC_VectorNext(current), ++i)
+ for (XMLRPC_VALUE row = XMLRPC_VectorRewind(param); row;
+ row = XMLRPC_VectorNext(param), ++i)
{
// Recursive call. For the lower-level key_pfx, if 'key'
// is "foo", pass "foo[0]:", then "foo[1]:", etc. In the
@@ -510,21 +491,21 @@ private:
// "foo[0]:bar", and so forth.
// Parse the scalar subkey/value pairs from this array
// entry into a temp submap. Collect such submaps in 'array'.
- array.append(parseValues(status_string,
+
+ array.append(parseValue(status_string, "",
STRINGIZE(key_pfx << key << '[' << i << "]:"),
row));
}
// Having collected an 'array' of 'submap's, insert that whole
// 'array' as the value of this 'key'.
- responses.insert(key, array);
+ response = array;
break;
}
case xmlrpc_type_struct:
{
- LLSD submap = parseValues(status_string,
+ response = parseValues(status_string,
STRINGIZE(key_pfx << key << ':'),
- current);
- responses.insert(key, submap);
+ param);
break;
}
case xmlrpc_type_none: // Not expected
@@ -532,9 +513,30 @@ private:
// whoops - unrecognized type
LL_WARNS("LLXMLRPCListener") << "Unhandled xmlrpc type " << type << " for key "
<< key_pfx << key << LL_ENDL;
- responses.insert(key, STRINGIZE("<bad XMLRPC type " << type << '>'));
+ response = STRINGIZE("<bad XMLRPC type " << type << '>');
status_string = "BadType";
- }
+ }
+ return response;
+ }
+
+ /**
+ * Parse key/value pairs from a given XMLRPC_VALUE into an LLSD map.
+ * @param key_pfx Used to describe a given key in log messages. At top
+ * level, pass "". When parsing an options array, pass the top-level key
+ * name of the array plus the index of the array entry; to this we'll
+ * append the subkey of interest.
+ * @param param XMLRPC_VALUE iterator. At top level, pass
+ * XMLRPC_RequestGetData(XMLRPC_REQUEST).
+ */
+ LLSD parseValues(std::string& status_string, const std::string& key_pfx, XMLRPC_VALUE param)
+ {
+ LLSD responses;
+ for (XMLRPC_VALUE current = XMLRPC_VectorRewind(param); current;
+ current = XMLRPC_VectorNext(param))
+ {
+ std::string key(XMLRPC_GetValueID(current));
+ LL_DEBUGS("LLXMLRPCListener") << "key: " << key_pfx << key << LL_ENDL;
+ responses.insert(key, parseValue(status_string, key, key_pfx, current));
}
return responses;
}
diff --git a/indra/newview/macview.r b/indra/newview/macview.r
deleted file mode 100755
index 8124232cf1..0000000000
--- a/indra/newview/macview.r
+++ /dev/null
@@ -1,123 +0,0 @@
-/* main.r */
-
-#include <Carbon/Carbon.r>
-#include "macmain.h"
-
-resource 'MBAR' (rMenuBar, preload) {
- { /* array MenuArray: 3 elements */
- /* [1] */
- 128,
- /* [2] */
- 129,
- /* [3] */
- 130
- }
-};
-
-resource 'MENU' (mApple, preload) {
- 128,
- textMenuProc,
- 0x7FFFFFFD,
- enabled,
- apple,
- { /* array: 2 elements */
- /* [1] */
- "About Second Life", noIcon, noKey, noMark, plain,
- /* [2] */
- "-", noIcon, noKey, noMark, plain
- }
-};
-
-resource 'MENU' (mFile, preload) {
- 129,
- textMenuProc,
- 0x1400,
- enabled,
- "File",
- { /* array: 11 elements */
- /* [1] */
- "New", noIcon, "N", noMark, plain,
- /* [2] */
- "Open", noIcon, "O", noMark, plain,
- /* [3] */
- "-", noIcon, noKey, noMark, plain,
- /* [4] */
- "Close", noIcon, "W", noMark, plain,
- /* [5] */
- "Save", noIcon, "S", noMark, plain,
- /* [6] */
- "Save As", noIcon, noKey, noMark, plain,
- /* [7] */
- "-", noIcon, noKey, noMark, plain,
- /* [8] */
- "Page Setup", noIcon, noKey, noMark, plain,
- /* [9] */
- "Print", noIcon, noKey, noMark, plain,
- /* [10] */
- "-", noIcon, noKey, noMark, plain,
- /* [11] */
- "Quit", noIcon, "Q", noMark, plain
- }
-};
-
-resource 'MENU' (mEdit, preload) {
- 130,
- textMenuProc,
- 0x0,
- enabled,
- "Edit",
- { /* array: 6 elements */
- /* [1] */
- "Undo", noIcon, "Z", noMark, plain,
- /* [2] */
- "-", noIcon, noKey, noMark, plain,
- /* [3] */
- "Cut", noIcon, "X", noMark, plain,
- /* [4] */
- "Copy", noIcon, "C", noMark, plain,
- /* [5] */
- "Paste", noIcon, "V", noMark, plain,
- /* [6] */
- "Clear", noIcon, noKey, noMark, plain
- }
-};
-
-resource 'DITL' (kAboutBox) {
- { /* array DITLarray: 3 elements */
- /* [1] */
- {16, 21, 38, 208},
- StaticText {
- disabled,
- "Hello hello hello..."
- },
- /* [2] */
- {116, 287, 136, 345},
- Button {
- enabled,
- "OK"
- },
- /* [3] */
- {54, 139, 74, 197},
- Button {
- enabled,
- "OK"
- }
- }
-};
-
-resource 'ALRT' (kAboutBox) {
- {40, 40, 139, 280},
- 200,
- { /* array: 4 elements */
- /* [1] */
- OK, visible, sound1,
- /* [2] */
- OK, visible, sound1,
- /* [3] */
- OK, visible, sound1,
- /* [4] */
- OK, visible, sound1
- },
- noAutoCenter
-};
-
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index f5f2ba52bf..42e74c05ed 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -112,11 +112,12 @@
#include "llscenemonitor.h"
#include "llprogressview.h"
#include "llcleanup.h"
+#include "gltfscenemanager.h"
#include "llenvironment.h"
#include "llsettingsvo.h"
-extern BOOL gSnapshot;
+extern bool gSnapshot;
bool gShiftFrame = false;
//cached settings
@@ -198,8 +199,13 @@ F32 LLPipeline::RenderScreenSpaceReflectionDepthRejectBias;
F32 LLPipeline::RenderScreenSpaceReflectionAdaptiveStepMultiplier;
S32 LLPipeline::RenderScreenSpaceReflectionGlossySamples;
S32 LLPipeline::RenderBufferVisualization;
+bool LLPipeline::RenderMirrors;
+S32 LLPipeline::RenderHeroProbeUpdateRate;
+S32 LLPipeline::RenderHeroProbeConservativeUpdateMultiplier;
LLTrace::EventStatHandle<S64> LLPipeline::sStatBatchSize("renderbatchsize");
+const U32 LLPipeline::MAX_BAKE_WIDTH = 512;
+
const F32 BACKLIGHT_DAY_MAGNITUDE_OBJECT = 0.1f;
const F32 BACKLIGHT_NIGHT_MAGNITUDE_OBJECT = 0.08f;
const F32 ALPHA_BLEND_CUTOFF = 0.598f;
@@ -207,11 +213,11 @@ const F32 DEFERRED_LIGHT_FALLOFF = 0.5f;
const U32 DEFERRED_VB_MASK = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_TEXCOORD1;
extern S32 gBoxFrame;
-//extern BOOL gHideSelectedObjects;
-extern BOOL gDisplaySwapBuffers;
-extern BOOL gDebugGL;
-extern BOOL gCubeSnapshot;
-extern BOOL gSnapshotNoPost;
+//extern bool gHideSelectedObjects;
+extern bool gDisplaySwapBuffers;
+extern bool gDebugGL;
+extern bool gCubeSnapshot;
+extern bool gSnapshotNoPost;
bool gAvatarBacklight = false;
@@ -325,8 +331,8 @@ bool addDeferredAttachments(LLRenderTarget& target, bool for_impostor = false)
{
bool valid = true
&& target.addColorAttachment(GL_RGBA) // frag-data[1] specular OR PBR ORM
- && target.addColorAttachment(GL_RGBA16F) // frag_data[2] normal+z+fogmask, See: class1\deferred\materialF.glsl & softenlight
- && target.addColorAttachment(GL_RGB16F); // frag_data[3] PBR emissive
+ && target.addColorAttachment(GL_RGBA16F) // frag_data[2] normal+fogmask, See: class1\deferred\materialF.glsl & softenlight
+ && target.addColorAttachment(GL_RGB16F); // frag_data[3] PBR emissive OR material env intensity
return valid;
}
@@ -433,8 +439,8 @@ void LLPipeline::init()
// disables non-object rendering (UI, sky, water, etc)
if (gSavedSettings.getBOOL("RenderPerformanceTest"))
{
- gSavedSettings.setBOOL("RenderPerformanceTest", FALSE);
- gSavedSettings.setBOOL("RenderPerformanceTest", TRUE);
+ gSavedSettings.setBOOL("RenderPerformanceTest", false);
+ gSavedSettings.setBOOL("RenderPerformanceTest", true);
}
mOldRenderDebugMask = mRenderDebugMask;
@@ -555,6 +561,9 @@ void LLPipeline::init()
connectRefreshCachedSettingsSafe("RenderScreenSpaceReflectionAdaptiveStepMultiplier");
connectRefreshCachedSettingsSafe("RenderScreenSpaceReflectionGlossySamples");
connectRefreshCachedSettingsSafe("RenderBufferVisualization");
+ connectRefreshCachedSettingsSafe("RenderMirrors");
+ connectRefreshCachedSettingsSafe("RenderHeroProbeUpdateRate");
+ connectRefreshCachedSettingsSafe("RenderHeroProbeConservativeUpdateMultiplier");
gSavedSettings.getControl("RenderAutoHideSurfaceAreaLimit")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
}
@@ -638,6 +647,7 @@ void LLPipeline::cleanup()
mCubeVB = NULL;
mReflectionMapManager.cleanup();
+ mHeroProbeManager.cleanup();
}
//============================================================================
@@ -661,12 +671,12 @@ void LLPipeline::destroyGL()
void LLPipeline::requestResizeScreenTexture()
{
- gResizeScreenTexture = TRUE;
+ gResizeScreenTexture = true;
}
void LLPipeline::requestResizeShadowTexture()
{
- gResizeShadowTexture = TRUE;
+ gResizeShadowTexture = true;
}
void LLPipeline::resizeShadowTexture()
@@ -674,7 +684,7 @@ void LLPipeline::resizeShadowTexture()
releaseSunShadowTargets();
releaseSpotShadowTargets();
allocateShadowBuffer(mRT->width, mRT->height);
- gResizeShadowTexture = FALSE;
+ gResizeShadowTexture = false;
}
void LLPipeline::resizeScreenTexture()
@@ -690,7 +700,7 @@ void LLPipeline::resizeScreenTexture()
releaseSunShadowTargets();
releaseSpotShadowTargets();
allocateScreenBuffer(resX,resY);
- gResizeScreenTexture = FALSE;
+ gResizeScreenTexture = false;
}
}
}
@@ -764,15 +774,32 @@ LLPipeline::eFBOStatus LLPipeline::doAllocateScreenBuffer(U32 resX, U32 resY)
bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
- if (mRT == &mMainRT && sReflectionProbesEnabled)
+ if (mRT == &mMainRT)
{ // hacky -- allocate auxillary buffer
- gCubeSnapshot = TRUE;
+ gCubeSnapshot = true;
mReflectionMapManager.initReflectionMaps();
+ mHeroProbeManager.initReflectionMaps();
+
+ if (sReflectionProbesEnabled)
+ {
+ gCubeSnapshot = TRUE;
+ mReflectionMapManager.initReflectionMaps();
+ }
+
mRT = &mAuxillaryRT;
U32 res = mReflectionMapManager.mProbeResolution * 4; //multiply by 4 because probes will be 16x super sampled
allocateScreenBuffer(res, res, samples);
+
+ if (RenderMirrors)
+ {
+ mHeroProbeManager.initReflectionMaps();
+ res = mHeroProbeManager.mProbeResolution; // We also scale the hero probe RT to the probe res since we don't super sample it.
+ mRT = &mHeroProbeRT;
+ allocateScreenBuffer(res, res, samples);
+ }
+
mRT = &mMainRT;
- gCubeSnapshot = FALSE;
+ gCubeSnapshot = false;
}
// remember these dimensions
@@ -915,7 +942,7 @@ bool LLPipeline::allocateShadowBuffer(U32 resX, U32 resY)
LLRenderTarget* shadow_target = getSunShadowTarget(i);
if (shadow_target)
{
- gGL.getTexUnit(0)->bind(getSunShadowTarget(i), TRUE);
+ gGL.getTexUnit(0)->bind(getSunShadowTarget(i), true);
gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_ANISOTROPIC);
gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
@@ -932,7 +959,7 @@ bool LLPipeline::allocateShadowBuffer(U32 resX, U32 resY)
LLRenderTarget* shadow_target = getSpotShadowTarget(i);
if (shadow_target)
{
- gGL.getTexUnit(0)->bind(shadow_target, TRUE);
+ gGL.getTexUnit(0)->bind(shadow_target, true);
gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_ANISOTROPIC);
gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
@@ -966,8 +993,8 @@ void LLPipeline::refreshCachedSettings()
&& LLFeatureManager::getInstance()->isFeatureAvailable("UseOcclusion")
&& gSavedSettings.getBOOL("UseOcclusion")) ? 2 : 0;
- WindLightUseAtmosShaders = TRUE; // DEPRECATED -- gSavedSettings.getBOOL("WindLightUseAtmosShaders");
- RenderDeferred = TRUE; // DEPRECATED -- gSavedSettings.getBOOL("RenderDeferred");
+ WindLightUseAtmosShaders = true; // DEPRECATED -- gSavedSettings.getBOOL("WindLightUseAtmosShaders");
+ RenderDeferred = true; // DEPRECATED -- gSavedSettings.getBOOL("RenderDeferred");
RenderDeferredSunWash = gSavedSettings.getF32("RenderDeferredSunWash");
RenderFSAASamples = LLFeatureManager::getInstance()->isFeatureAvailable("RenderFSAASamples") ? gSavedSettings.getU32("RenderFSAASamples") : 0;
RenderResolutionDivisor = gSavedSettings.getU32("RenderResolutionDivisor");
@@ -1043,6 +1070,15 @@ void LLPipeline::refreshCachedSettings()
RenderScreenSpaceReflectionAdaptiveStepMultiplier = gSavedSettings.getF32("RenderScreenSpaceReflectionAdaptiveStepMultiplier");
RenderScreenSpaceReflectionGlossySamples = gSavedSettings.getS32("RenderScreenSpaceReflectionGlossySamples");
RenderBufferVisualization = gSavedSettings.getS32("RenderBufferVisualization");
+ if (gSavedSettings.getBOOL("RenderMirrors") != (BOOL)RenderMirrors)
+ {
+ RenderMirrors = gSavedSettings.getBOOL("RenderMirrors");
+ LLViewerShaderMgr::instance()->clearShaderCache();
+ LLViewerShaderMgr::instance()->setShaders();
+ }
+ RenderHeroProbeUpdateRate = gSavedSettings.getS32("RenderHeroProbeUpdateRate");
+ RenderHeroProbeConservativeUpdateMultiplier = gSavedSettings.getS32("RenderHeroProbeConservativeUpdateMultiplier");
+
sReflectionProbesEnabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderReflectionsEnabled") && gSavedSettings.getBOOL("RenderReflectionsEnabled");
RenderSpotLight = nullptr;
@@ -1072,7 +1108,6 @@ void LLPipeline::releaseGLBuffers()
releaseLUTBuffers();
mWaterDis.release();
- mBake.release();
mSceneMap.release();
@@ -1118,6 +1153,12 @@ void LLPipeline::releaseScreenBuffers()
mRT->fxaaBuffer.release();
mRT->deferredScreen.release();
mRT->deferredLight.release();
+
+ mHeroProbeRT.uiScreen.release();
+ mHeroProbeRT.screen.release();
+ mHeroProbeRT.fxaaBuffer.release();
+ mHeroProbeRT.deferredScreen.release();
+ mHeroProbeRT.deferredLight.release();
}
void LLPipeline::releaseSunShadowTarget(U32 index)
@@ -1151,9 +1192,6 @@ void LLPipeline::createGLBuffers()
stop_glerror();
assertInitialized();
- // Use FBO for bake tex
- mBake.allocate(512, 512, GL_RGBA, true); // SL-12781 Build > Upload > Model; 3D Preview
-
stop_glerror();
GLuint resX = gViewerWindow->getWorldViewWidthRaw();
@@ -1602,7 +1640,7 @@ void LLPipeline::allocDrawable(LLViewerObject *vobj)
{
drawable->setState(LLDrawable::FORCE_INVISIBLE);
}
- drawable->updateXform(TRUE);
+ drawable->updateXform(true);
}
@@ -1753,7 +1791,7 @@ void LLPipeline::createObject(LLViewerObject* vobj)
if (drawablep->getVOVolume() && RenderAnimateRes)
{
// fun animated res
- drawablep->updateXform(TRUE);
+ drawablep->updateXform(true);
drawablep->clearState(LLDrawable::MOVE_UNDAMPED);
drawablep->setScale(LLVector3(0,0,0));
drawablep->makeActive();
@@ -2400,6 +2438,26 @@ void LLPipeline::doOcclusion(LLCamera& camera)
gGL.setColorMask(true, true);
}
+
+ if (sReflectionProbesEnabled && sUseOcclusion > 1 && !LLPipeline::sShadowRender && !gCubeSnapshot)
+ {
+ gGL.setColorMask(false, false);
+ LLGLDepthTest depth(GL_TRUE, GL_FALSE);
+ LLGLDisable cull(GL_CULL_FACE);
+
+ gOcclusionCubeProgram.bind();
+
+ if (mCubeVB.isNull())
+ { //cube VB will be used for issuing occlusion queries
+ mCubeVB = ll_create_cube_vb(LLVertexBuffer::MAP_VERTEX);
+ }
+ mCubeVB->setBuffer();
+
+ mHeroProbeManager.doOcclusion();
+ gOcclusionCubeProgram.unbind();
+
+ gGL.setColorMask(true, true);
+ }
if (LLPipeline::sUseOcclusion > 1 &&
(sCull->hasOcclusionGroups() || LLVOCachePartition::sNeedsOcclusionCheck))
@@ -2465,7 +2523,7 @@ void LLPipeline::updateGL()
{
LLGLUpdate* glu = LLGLUpdate::sGLQ.front();
glu->updateGL();
- glu->mInQ = FALSE;
+ glu->mInQ = false;
LLGLUpdate::sGLQ.pop_front();
}
}
@@ -2782,7 +2840,7 @@ void LLPipeline::markGLRebuild(LLGLUpdate* glu)
if (glu && !glu->mInQ)
{
LLGLUpdate::sGLQ.push_back(glu);
- glu->mInQ = TRUE;
+ glu->mInQ = true;
}
}
@@ -2901,7 +2959,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
if (LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD && !gCubeSnapshot)
{
LLSpatialGroup* last_group = NULL;
- BOOL fov_changed = LLViewerCamera::getInstance()->isDefaultFOVChanged();
+ bool fov_changed = LLViewerCamera::getInstance()->isDefaultFOVChanged();
for (LLCullResult::bridge_iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i)
{
LLCullResult::bridge_iterator cur_iter = i;
@@ -2990,7 +3048,7 @@ void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera)
}
}
-void LLPipeline::stateSort(LLSpatialBridge* bridge, LLCamera& camera, BOOL fov_changed)
+void LLPipeline::stateSort(LLSpatialBridge* bridge, LLCamera& camera, bool fov_changed)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
if (bridge->getSpatialGroup()->changeLOD() || fov_changed)
@@ -3048,7 +3106,7 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera)
{
if (!drawablep->isState(LLDrawable::INVISIBLE|LLDrawable::FORCE_INVISIBLE))
{
- drawablep->setVisible(camera, NULL, FALSE);
+ drawablep->setVisible(camera, NULL, false);
}
}
@@ -3543,7 +3601,7 @@ void LLPipeline::postSort(LLCamera &camera)
}
}
- // LLSpatialGroup::sNoDelete = FALSE;
+ // LLSpatialGroup::sNoDelete = false;
LL_PUSH_CALLSTACKS();
}
@@ -3566,7 +3624,7 @@ void render_hud_elements()
if (!LLPipeline::sReflectionRender && gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
{
- gViewerWindow->renderSelections(FALSE, FALSE, FALSE); // For HUD version in render_ui_3d()
+ gViewerWindow->renderSelections(false, false, false); // For HUD version in render_ui_3d()
// Draw the tracking overlays
LLTracker::render3D();
@@ -3777,6 +3835,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera, bool do_occlusion)
{
//update reflection probe uniform
mReflectionMapManager.updateUniforms();
+ mHeroProbeManager.updateUniforms();
}
U32 cur_type = 0;
@@ -4478,6 +4537,8 @@ void LLPipeline::renderDebug()
}
}
+ LL::GLTFSceneManager::instance().renderDebug();
+
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_OCCLUSION))
{ //render visible selected group occlusion geometry
gDebugProgram.bind();
@@ -4561,7 +4622,7 @@ void LLPipeline::renderDebug()
LLVertexBuffer::unbind();
LLGLEnable blend(GL_BLEND);
- LLGLDepthTest depth(TRUE, FALSE);
+ LLGLDepthTest depth(true, false);
LLGLDisable cull(GL_CULL_FACE);
gGL.color4f(1,1,1,1);
@@ -5696,7 +5757,7 @@ void LLPipeline::enableLightsDynamic()
void LLPipeline::enableLightsAvatar()
{
U32 mask = 0xff; // All lights
- setupAvatarLights(FALSE);
+ setupAvatarLights(false);
enableLights(mask);
}
@@ -5760,7 +5821,7 @@ void LLPipeline::enableLightsPreview()
void LLPipeline::enableLightsAvatarEdit(const LLColor4& color)
{
U32 mask = 0x2002; // Avatar backlight only, set ambient
- setupAvatarLights(TRUE);
+ setupAvatarLights(true);
enableLights(mask);
gGL.setAmbientLightColor(color);
@@ -6216,7 +6277,7 @@ LLVOPartGroup* LLPipeline::lineSegmentIntersectParticle(const LLVector4a& start,
LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_PARTICLE);
if (part && hasRenderType(part->mDrawableType))
{
- LLDrawable* hit = part->lineSegmentIntersect(start, local_end, TRUE, FALSE, TRUE, FALSE, face_hit, &position, NULL, NULL, NULL);
+ LLDrawable* hit = part->lineSegmentIntersect(start, local_end, true, false, true, false, face_hit, &position, NULL, NULL, NULL);
if (hit)
{
drawable = hit;
@@ -6247,6 +6308,8 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start,
bool pick_unselectable,
bool pick_reflection_probe,
S32* face_hit,
+ S32* gltf_node_hit,
+ S32* gltf_primitive_hit,
LLVector4a* intersection, // return the intersection point
LLVector2* tex_coord, // return the texture coordinates of the intersection point
LLVector4a* normal, // return the surface normal at the intersection point
@@ -6289,7 +6352,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start,
}
}
}
-
+
if (!sPickAvatar)
{
//save hit info in case we need to restore
@@ -6390,6 +6453,25 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start,
}
}
+ S32 node_hit = -1;
+ S32 primitive_hit = -1;
+ LLDrawable* hit = LL::GLTFSceneManager::instance().lineSegmentIntersect(start, local_end, pick_transparent, pick_rigged, pick_unselectable, pick_reflection_probe, &node_hit, &primitive_hit, &position, tex_coord, normal, tangent);
+ if (hit)
+ {
+ drawable = hit;
+ local_end = position;
+ }
+
+ if (gltf_node_hit)
+ {
+ *gltf_node_hit = node_hit;
+ }
+
+ if (gltf_primitive_hit)
+ {
+ *gltf_primitive_hit = primitive_hit;
+ }
+
if (intersection)
{
*intersection = position;
@@ -6424,7 +6506,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInHUD(const LLVector4a& start, c
LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_HUD);
if (part)
{
- LLDrawable* hit = part->lineSegmentIntersect(start, end, pick_transparent, FALSE, TRUE, FALSE, face_hit, intersection, tex_coord, normal, tangent);
+ LLDrawable* hit = part->lineSegmentIntersect(start, end, pick_transparent, false, true, false, face_hit, intersection, tex_coord, normal, tangent);
if (hit)
{
drawable = hit;
@@ -6505,6 +6587,15 @@ void LLPipeline::renderGLTFObjects(U32 type, bool texture, bool rigged)
gGL.loadMatrix(gGLModelView);
gGLLastMatrix = NULL;
+
+ if (!rigged)
+ {
+ LL::GLTFSceneManager::instance().renderOpaque();
+ }
+ else
+ {
+ LL::GLTFSceneManager::instance().render(true, true);
+ }
}
// Currently only used for shadows -Cosmic,2023-04-19
@@ -6542,7 +6633,7 @@ void LLPipeline::renderAlphaObjects(bool rigged)
LLGLSLShader::sCurBoundShaderPtr->uniform1i(LLShaderMgr::SUN_UP_FACTOR, sun_up);
LLGLSLShader::sCurBoundShaderPtr->uniform1f(LLShaderMgr::DEFERRED_SHADOW_TARGET_WIDTH, (float)target_width);
LLGLSLShader::sCurBoundShaderPtr->setMinimumAlpha(ALPHA_BLEND_CUTOFF);
- mSimplePool->pushRiggedGLTFBatch(*pparams, lastAvatar, lastMeshId);
+ LLRenderPass::pushRiggedGLTFBatch(*pparams, lastAvatar, lastMeshId);
}
else
{
@@ -6568,7 +6659,7 @@ void LLPipeline::renderAlphaObjects(bool rigged)
LLGLSLShader::sCurBoundShaderPtr->uniform1i(LLShaderMgr::SUN_UP_FACTOR, sun_up);
LLGLSLShader::sCurBoundShaderPtr->uniform1f(LLShaderMgr::DEFERRED_SHADOW_TARGET_WIDTH, (float)target_width);
LLGLSLShader::sCurBoundShaderPtr->setMinimumAlpha(ALPHA_BLEND_CUTOFF);
- mSimplePool->pushGLTFBatch(*pparams);
+ LLRenderPass::pushGLTFBatch(*pparams);
}
else
{
@@ -6713,6 +6804,8 @@ void LLPipeline::generateLuminance(LLRenderTarget* src, LLRenderTarget* dst)
gLuminanceProgram.bind();
+ static LLCachedControl<F32> diffuse_luminance_scale(gSavedSettings, "RenderDiffuseLuminanceScale", 1.0f);
+
S32 channel = 0;
channel = gLuminanceProgram.enableTexture(LLShaderMgr::DEFERRED_DIFFUSE);
if (channel > -1)
@@ -6726,6 +6819,16 @@ void LLPipeline::generateLuminance(LLRenderTarget* src, LLRenderTarget* dst)
mGlow[1].bindTexture(0, channel);
}
+ channel = gLuminanceProgram.enableTexture(LLShaderMgr::DEFERRED_NORMAL);
+ if (channel > -1)
+ {
+ // bind the normal map to get the environment mask
+ mRT->deferredScreen.bindTexture(2, channel, LLTexUnit::TFO_POINT);
+ }
+
+ static LLStaticHashedString diffuse_luminance_scale_s("diffuse_luminance_scale");
+ gLuminanceProgram.uniform1f(diffuse_luminance_scale_s, diffuse_luminance_scale);
+
mScreenTriangleVB->setBuffer();
mScreenTriangleVB->drawArrays(LLRender::TRIANGLES, 0, 3);
dst->flush();
@@ -6736,11 +6839,12 @@ void LLPipeline::generateLuminance(LLRenderTarget* src, LLRenderTarget* dst)
}
}
-void LLPipeline::generateExposure(LLRenderTarget* src, LLRenderTarget* dst) {
+void LLPipeline::generateExposure(LLRenderTarget* src, LLRenderTarget* dst, bool use_history) {
// exposure sample
{
LL_PROFILE_GPU_ZONE("exposure sample");
+ if (use_history)
{
// copy last frame's exposure into mLastExposure
mLastExposure.bindTarget();
@@ -6757,55 +6861,73 @@ void LLPipeline::generateExposure(LLRenderTarget* src, LLRenderTarget* dst) {
LLGLDepthTest depth(GL_FALSE, GL_FALSE);
- gExposureProgram.bind();
+ LLGLSLShader* shader;
+ if (use_history)
+ {
+ shader = &gExposureProgram;
+ }
+ else
+ {
+ shader = &gExposureProgramNoFade;
+ }
+
+ shader->bind();
- S32 channel = gExposureProgram.enableTexture(LLShaderMgr::DEFERRED_EMISSIVE);
+ S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_EMISSIVE);
if (channel > -1)
{
- mLuminanceMap.bindTexture(0, channel, LLTexUnit::TFO_TRILINEAR);
+ src->bindTexture(0, channel, LLTexUnit::TFO_TRILINEAR);
}
- channel = gExposureProgram.enableTexture(LLShaderMgr::EXPOSURE_MAP);
- if (channel > -1)
+ if (use_history)
{
- mLastExposure.bindTexture(0, channel);
+ channel = shader->enableTexture(LLShaderMgr::EXPOSURE_MAP);
+ if (channel > -1)
+ {
+ mLastExposure.bindTexture(0, channel);
+ }
}
static LLStaticHashedString dt("dt");
static LLStaticHashedString noiseVec("noiseVec");
static LLStaticHashedString dynamic_exposure_params("dynamic_exposure_params");
static LLCachedControl<F32> dynamic_exposure_coefficient(gSavedSettings, "RenderDynamicExposureCoefficient", 0.175f);
- static LLCachedControl<bool> should_auto_adjust(gSavedSettings, "RenderSkyAutoAdjustLegacy", true);
+ static LLCachedControl<bool> should_auto_adjust(gSavedSettings, "RenderSkyAutoAdjustLegacy", true);
- LLSettingsSky::ptr_t sky = LLEnvironment::instance().getCurrentSky();
+ LLSettingsSky::ptr_t sky = LLEnvironment::instance().getCurrentSky();
- F32 probe_ambiance = LLEnvironment::instance().getCurrentSky()->getReflectionProbeAmbiance(should_auto_adjust);
- F32 exp_min = 1.f;
- F32 exp_max = 1.f;
-
- if (probe_ambiance > 0.f)
- {
- F32 hdr_scale = sqrtf(LLEnvironment::instance().getCurrentSky()->getGamma())*2.f;
+ F32 probe_ambiance = LLEnvironment::instance().getCurrentSky()->getReflectionProbeAmbiance(should_auto_adjust);
+ F32 exp_min = 1.f;
+ F32 exp_max = 1.f;
- if (hdr_scale > 1.f)
- {
- exp_min = 1.f / hdr_scale;
- exp_max = hdr_scale;
- }
- }
- gExposureProgram.uniform1f(dt, gFrameIntervalSeconds);
- gExposureProgram.uniform2f(noiseVec, ll_frand() * 2.0 - 1.0, ll_frand() * 2.0 - 1.0);
- gExposureProgram.uniform3f(dynamic_exposure_params, dynamic_exposure_coefficient, exp_min, exp_max);
+ if (probe_ambiance > 0.f)
+ {
+ F32 hdr_scale = sqrtf(LLEnvironment::instance().getCurrentSky()->getGamma()) * 2.f;
+
+ if (hdr_scale > 1.f)
+ {
+ exp_min = 1.f / hdr_scale;
+ exp_max = hdr_scale;
+ }
+ }
+ shader->uniform1f(dt, gFrameIntervalSeconds);
+ shader->uniform2f(noiseVec, ll_frand() * 2.0 - 1.0, ll_frand() * 2.0 - 1.0);
+ shader->uniform3f(dynamic_exposure_params, dynamic_exposure_coefficient, exp_min, exp_max);
mScreenTriangleVB->setBuffer();
mScreenTriangleVB->drawArrays(LLRender::TRIANGLES, 0, 3);
- gGL.getTexUnit(channel)->unbind(mLastExposure.getUsage());
- gExposureProgram.unbind();
+ if (use_history)
+ {
+ gGL.getTexUnit(channel)->unbind(mLastExposure.getUsage());
+ }
+ shader->unbind();
dst->flush();
}
}
+extern LLPointer<LLImageGL> gEXRImage;
+
void LLPipeline::gammaCorrect(LLRenderTarget* src, LLRenderTarget* dst) {
dst->bindTarget();
// gamma correct lighting
@@ -6842,8 +6964,10 @@ void LLPipeline::gammaCorrect(LLRenderTarget* src, LLRenderTarget* dst) {
F32 e = llclamp(exposure(), 0.5f, 4.f);
static LLStaticHashedString s_exposure("exposure");
+ static LLStaticHashedString aces_mix("aces_mix");
shader.uniform1f(s_exposure, e);
+ shader.uniform1f(aces_mix, gEXRImage.notNull() ? 0.f : 0.3f);
mScreenTriangleVB->setBuffer();
mScreenTriangleVB->drawArrays(LLRender::TRIANGLES, 0, 3);
@@ -7160,7 +7284,7 @@ void LLPipeline::renderDoF(LLRenderTarget* src, LLRenderTarget* dst)
LLVector4a result;
result.clear();
- gViewerWindow->cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, FALSE, TRUE, TRUE, NULL, &result);
+ gViewerWindow->cursorIntersect(-1, -1, 512.f, nullptr, -1, false, false, true, true, nullptr, nullptr, nullptr, &result);
focus_point.set(result.getF32ptr());
}
@@ -7445,7 +7569,7 @@ void LLPipeline::bindShadowMaps(LLGLSLShader& shader)
S32 channel = shader.enableTexture(LLShaderMgr::DEFERRED_SHADOW0 + i, LLTexUnit::TT_TEXTURE);
if (channel > -1)
{
- gGL.getTexUnit(channel)->bind(getSunShadowTarget(i), TRUE);
+ gGL.getTexUnit(channel)->bind(getSunShadowTarget(i), true);
}
}
}
@@ -7458,7 +7582,7 @@ void LLPipeline::bindShadowMaps(LLGLSLShader& shader)
LLRenderTarget* shadow_target = getSpotShadowTarget(i - 4);
if (shadow_target)
{
- gGL.getTexUnit(channel)->bind(shadow_target, TRUE);
+ gGL.getTexUnit(channel)->bind(shadow_target, true);
}
}
}
@@ -7521,11 +7645,11 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_
{
if (depth_target)
{
- gGL.getTexUnit(channel)->bind(depth_target, TRUE);
+ gGL.getTexUnit(channel)->bind(depth_target, true);
}
else
{
- gGL.getTexUnit(channel)->bind(deferred_target, TRUE);
+ gGL.getTexUnit(channel)->bind(deferred_target, true);
}
stop_glerror();
}
@@ -7546,7 +7670,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_
if (sReflectionRender && !shader.getUniformLocation(LLShaderMgr::MODELVIEW_MATRIX))
{
- shader.uniformMatrix4fv(LLShaderMgr::MODELVIEW_MATRIX, 1, FALSE, mReflectionModelView.m);
+ shader.uniformMatrix4fv(LLShaderMgr::MODELVIEW_MATRIX, 1, false, mReflectionModelView.m);
}
channel = shader.enableTexture(LLShaderMgr::DEFERRED_NOISE);
@@ -7591,7 +7715,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_
mat[i+80] = mSunShadowMatrix[5].m[i];
}
- shader.uniformMatrix4fv(LLShaderMgr::DEFERRED_SHADOW_MATRIX, 6, FALSE, mat);
+ shader.uniformMatrix4fv(LLShaderMgr::DEFERRED_SHADOW_MATRIX, 6, false, mat);
stop_glerror();
@@ -7613,7 +7737,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_
m[4], m[5], m[6],
m[8], m[9], m[10] };
- shader.uniformMatrix3fv(LLShaderMgr::DEFERRED_ENV_MAT, 1, TRUE, mat);
+ shader.uniformMatrix3fv(LLShaderMgr::DEFERRED_ENV_MAT, 1, true, mat);
}
}
@@ -7702,7 +7826,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_
if (shader.getUniformLocation(LLShaderMgr::DEFERRED_NORM_MATRIX) >= 0)
{
glh::matrix4f norm_mat = get_current_modelview().inverse().transpose();
- shader.uniformMatrix4fv(LLShaderMgr::DEFERRED_NORM_MATRIX, 1, FALSE, norm_mat.m);
+ shader.uniformMatrix4fv(LLShaderMgr::DEFERRED_NORM_MATRIX, 1, false, norm_mat.m);
}
// auto adjust legacy sun color if needed
@@ -8215,6 +8339,7 @@ void LLPipeline::renderDeferredLighting()
LLPipeline::RENDER_TYPE_CONTROL_AV,
LLPipeline::RENDER_TYPE_ALPHA_MASK,
LLPipeline::RENDER_TYPE_FULLBRIGHT_ALPHA_MASK,
+ LLPipeline::RENDER_TYPE_TERRAIN,
LLPipeline::RENDER_TYPE_WATER,
END_RENDER_TYPES);
@@ -8446,7 +8571,7 @@ void LLPipeline::setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep)
F32 proj_range = far_clip - near_clip;
glh::matrix4f light_proj = gl_perspective(fovy, aspect, near_clip, far_clip);
screen_to_light = trans * light_proj * screen_to_light;
- shader.uniformMatrix4fv(LLShaderMgr::PROJECTOR_MATRIX, 1, FALSE, screen_to_light.m);
+ shader.uniformMatrix4fv(LLShaderMgr::PROJECTOR_MATRIX, 1, false, screen_to_light.m);
shader.uniform1f(LLShaderMgr::PROJECTOR_NEAR, near_clip);
shader.uniform3fv(LLShaderMgr::PROJECTOR_P, 1, p1.v);
shader.uniform3fv(LLShaderMgr::PROJECTOR_N, 1, n.v);
@@ -8594,7 +8719,7 @@ void LLPipeline::setEnvMat(LLGLSLShader& shader)
m[4], m[5], m[6],
m[8], m[9], m[10] };
- shader.uniformMatrix3fv(LLShaderMgr::DEFERRED_ENV_MAT, 1, TRUE, mat);
+ shader.uniformMatrix3fv(LLShaderMgr::DEFERRED_ENV_MAT, 1, true, mat);
}
void LLPipeline::bindReflectionProbes(LLGLSLShader& shader)
@@ -8618,6 +8743,17 @@ void LLPipeline::bindReflectionProbes(LLGLSLShader& shader)
mReflectionMapManager.mIrradianceMaps->bind(channel);
bound = true;
}
+
+ if (RenderMirrors)
+ {
+ channel = shader.enableTexture(LLShaderMgr::HERO_PROBE, LLTexUnit::TT_CUBE_MAP_ARRAY);
+ if (channel > -1 && mHeroProbeManager.mTexture.notNull())
+ {
+ mHeroProbeManager.mTexture->bind(channel);
+ bound = true;
+ }
+ }
+
if (bound)
{
@@ -9450,7 +9586,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
shadow_cam = camera;
shadow_cam.setFar(16.f);
- LLViewerCamera::updateFrustumPlanes(shadow_cam, FALSE, FALSE, TRUE);
+ LLViewerCamera::updateFrustumPlanes(shadow_cam, false, false, true);
LLVector3* frust = shadow_cam.mAgentFrustum;
@@ -9757,7 +9893,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
set_current_modelview(view[j]);
set_current_projection(proj[j]);
- LLViewerCamera::updateFrustumPlanes(shadow_cam, FALSE, FALSE, TRUE);
+ LLViewerCamera::updateFrustumPlanes(shadow_cam, false, false, true);
//shadow_cam.ignoreAgentFrustumPlane(LLCamera::AGENT_PLANE_NEAR);
shadow_cam.getAgentPlane(LLCamera::AGENT_PLANE_NEAR).set(shadow_near_clip);
@@ -9931,7 +10067,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
shadow_cam.setFar(far_clip);
shadow_cam.setOrigin(origin);
- LLViewerCamera::updateFrustumPlanes(shadow_cam, FALSE, FALSE, TRUE);
+ LLViewerCamera::updateFrustumPlanes(shadow_cam, false, false, true);
//
@@ -10446,7 +10582,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar, bool preview_avatar, bool
if (!preview_avatar && !for_profile)
{
- avatar->mNeedsImpostorUpdate = FALSE;
+ avatar->mNeedsImpostorUpdate = false;
avatar->cacheImpostorValues();
avatar->mLastImpostorUpdateFrameTime = gFrameTimeSeconds;
}
@@ -10832,3 +10968,12 @@ void LLPipeline::rebuildDrawInfo()
}
}
+void LLPipeline::rebuildTerrain()
+{
+ for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
+ iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
+ {
+ LLViewerRegion* region = *iter;
+ region->dirtyAllPatches();
+ }
+}
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 88a7eab813..b322173246 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -39,6 +39,7 @@
#include "lldrawable.h"
#include "llrendertarget.h"
#include "llreflectionmapmanager.h"
+#include "llheroprobemanager.h"
#include <stack>
@@ -133,6 +134,8 @@ public:
// rebuild all LLVOVolume render batches
void rebuildDrawInfo();
+ // Rebuild all terrain
+ void rebuildTerrain();
// Clear LLFace mVertexBuffer pointers
void resetVertexBuffers(LLDrawable* drawable);
@@ -151,7 +154,7 @@ public:
void renderFinalize();
void copyScreenSpaceReflections(LLRenderTarget* src, LLRenderTarget* dst);
void generateLuminance(LLRenderTarget* src, LLRenderTarget* dst);
- void generateExposure(LLRenderTarget* src, LLRenderTarget* dst);
+ void generateExposure(LLRenderTarget* src, LLRenderTarget* dst, bool use_history = true);
void gammaCorrect(LLRenderTarget* src, LLRenderTarget* dst);
void generateGlow(LLRenderTarget* src);
void applyFXAA(LLRenderTarget* src, LLRenderTarget* dst);
@@ -207,6 +210,8 @@ public:
bool pick_unselectable,
bool pick_reflection_probe,
S32* face_hit, // return the face hit
+ S32* gltf_node_hit = nullptr, // return the gltf node hit
+ S32* gltf_primitive_hit = nullptr, // return the gltf primitive hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
LLVector4a* normal = NULL, // return the surface normal at the intersection point
@@ -272,7 +277,7 @@ public:
void stateSort(LLCamera& camera, LLCullResult& result);
void stateSort(LLSpatialGroup* group, LLCamera& camera);
- void stateSort(LLSpatialBridge* bridge, LLCamera& camera, BOOL fov_changed = FALSE);
+ void stateSort(LLSpatialBridge* bridge, LLCamera& camera, bool fov_changed = false);
void stateSort(LLDrawable* drawablep, LLCamera& camera);
void postSort(LLCamera& camera);
@@ -458,6 +463,7 @@ public:
void handleShadowDetailChanged();
LLReflectionMapManager mReflectionMapManager;
+ LLHeroProbeManager mHeroProbeManager;
private:
void unloadShaders();
@@ -611,12 +617,12 @@ public:
RENDER_DEBUG_PHYSICS_SHAPES = 0x02000000,
RENDER_DEBUG_NORMALS = 0x04000000,
RENDER_DEBUG_LOD_INFO = 0x08000000,
- RENDER_DEBUG_ATTACHMENT_BYTES = 0x20000000, // not used
+ RENDER_DEBUG_NODES = 0x20000000,
RENDER_DEBUG_TEXEL_DENSITY = 0x40000000,
RENDER_DEBUG_TRIANGLE_COUNT = 0x80000000,
RENDER_DEBUG_IMPOSTORS = 0x100000000,
RENDER_DEBUG_REFLECTION_PROBES = 0x200000000,
- RENDER_DEBUG_PROBE_UPDATES = 0x400000000
+ RENDER_DEBUG_PROBE_UPDATES = 0x400000000,
};
public:
@@ -694,8 +700,12 @@ public:
RenderTargetPack mMainRT;
// auxillary 512x512 render target pack
+ // used by reflection probes and dynamic texture bakes
RenderTargetPack mAuxillaryRT;
+ // Auxillary render target pack scaled to the hero probe's per-face size.
+ RenderTargetPack mHeroProbeRT;
+
// currently used render target pack
RenderTargetPack* mRT;
@@ -754,7 +764,7 @@ public:
//water distortion texture (refraction)
LLRenderTarget mWaterDis;
- LLRenderTarget mBake;
+ static const U32 MAX_BAKE_WIDTH;
//texture for making the glow
LLRenderTarget mGlow[3];
@@ -1047,6 +1057,9 @@ public:
static F32 RenderScreenSpaceReflectionAdaptiveStepMultiplier;
static S32 RenderScreenSpaceReflectionGlossySamples;
static S32 RenderBufferVisualization;
+ static bool RenderMirrors;
+ static S32 RenderHeroProbeUpdateRate;
+ static S32 RenderHeroProbeConservativeUpdateMultiplier;
};
void render_bbox(const LLVector3 &min, const LLVector3 &max);
diff --git a/indra/newview/skins/default/textures/icons/AddItem_Disabled.png b/indra/newview/skins/default/textures/icons/AddItem_Disabled.png
index cf88c89ae5..d21b72b973 100644
--- a/indra/newview/skins/default/textures/icons/AddItem_Disabled.png
+++ b/indra/newview/skins/default/textures/icons/AddItem_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/AddItem_Off.png b/indra/newview/skins/default/textures/icons/AddItem_Off.png
index 52d4f9bc80..64108d133a 100644
--- a/indra/newview/skins/default/textures/icons/AddItem_Off.png
+++ b/indra/newview/skins/default/textures/icons/AddItem_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/AddItem_Press.png b/indra/newview/skins/default/textures/icons/AddItem_Press.png
index acc898e5f4..3168f51757 100644
--- a/indra/newview/skins/default/textures/icons/AddItem_Press.png
+++ b/indra/newview/skins/default/textures/icons/AddItem_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/AudioMute_Off.png b/indra/newview/skins/default/textures/icons/AudioMute_Off.png
index 938aaef491..dd89920fae 100644
--- a/indra/newview/skins/default/textures/icons/AudioMute_Off.png
+++ b/indra/newview/skins/default/textures/icons/AudioMute_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/AudioMute_Over.png b/indra/newview/skins/default/textures/icons/AudioMute_Over.png
index 7bd1b12aae..a4fbec4144 100644
--- a/indra/newview/skins/default/textures/icons/AudioMute_Over.png
+++ b/indra/newview/skins/default/textures/icons/AudioMute_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Audio_Off.png b/indra/newview/skins/default/textures/icons/Audio_Off.png
index ef746aab92..4f6f5512c8 100644
--- a/indra/newview/skins/default/textures/icons/Audio_Off.png
+++ b/indra/newview/skins/default/textures/icons/Audio_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Audio_Press.png b/indra/newview/skins/default/textures/icons/Audio_Press.png
index 25a669224a..0268a0f9fb 100644
--- a/indra/newview/skins/default/textures/icons/Audio_Press.png
+++ b/indra/newview/skins/default/textures/icons/Audio_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/BackArrow_Off.png b/indra/newview/skins/default/textures/icons/BackArrow_Off.png
index ff32192856..3775690531 100644
--- a/indra/newview/skins/default/textures/icons/BackArrow_Off.png
+++ b/indra/newview/skins/default/textures/icons/BackArrow_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/ClipboardMenu_Disabled.png b/indra/newview/skins/default/textures/icons/ClipboardMenu_Disabled.png
index 9a81c5f94b..c219ac4446 100644
--- a/indra/newview/skins/default/textures/icons/ClipboardMenu_Disabled.png
+++ b/indra/newview/skins/default/textures/icons/ClipboardMenu_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/ClipboardMenu_Off.png b/indra/newview/skins/default/textures/icons/ClipboardMenu_Off.png
index 88012cf8d1..586f577181 100644
--- a/indra/newview/skins/default/textures/icons/ClipboardMenu_Off.png
+++ b/indra/newview/skins/default/textures/icons/ClipboardMenu_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/ClipboardMenu_Press.png b/indra/newview/skins/default/textures/icons/ClipboardMenu_Press.png
index ab02e7d42d..697bee3bbd 100644
--- a/indra/newview/skins/default/textures/icons/ClipboardMenu_Press.png
+++ b/indra/newview/skins/default/textures/icons/ClipboardMenu_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/ClipboardSmallMenu_Disabled.png b/indra/newview/skins/default/textures/icons/ClipboardSmallMenu_Disabled.png
index 63b4bd2127..12cc1857d4 100644
--- a/indra/newview/skins/default/textures/icons/ClipboardSmallMenu_Disabled.png
+++ b/indra/newview/skins/default/textures/icons/ClipboardSmallMenu_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/ClipboardSmallMenu_Off.png b/indra/newview/skins/default/textures/icons/ClipboardSmallMenu_Off.png
index 4200182b0c..7b40e33e11 100644
--- a/indra/newview/skins/default/textures/icons/ClipboardSmallMenu_Off.png
+++ b/indra/newview/skins/default/textures/icons/ClipboardSmallMenu_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/ClipboardSmallMenu_Press.png b/indra/newview/skins/default/textures/icons/ClipboardSmallMenu_Press.png
index e12887f489..e030c44f01 100644
--- a/indra/newview/skins/default/textures/icons/ClipboardSmallMenu_Press.png
+++ b/indra/newview/skins/default/textures/icons/ClipboardSmallMenu_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Conv_log_inbox.png b/indra/newview/skins/default/textures/icons/Conv_log_inbox.png
index bb6ca28147..f4bbdc059d 100644
--- a/indra/newview/skins/default/textures/icons/Conv_log_inbox.png
+++ b/indra/newview/skins/default/textures/icons/Conv_log_inbox.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_add_person.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_add_person.png
index 0631f16f3b..acb3904e32 100644
--- a/indra/newview/skins/default/textures/icons/Conv_toolbar_add_person.png
+++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_add_person.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_ne.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_ne.png
index 578482f5ed..70dec7cad1 100644
--- a/indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_ne.png
+++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_ne.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_sw.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_sw.png
index 7676131790..13d424832b 100644
--- a/indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_sw.png
+++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_arrow_sw.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_call_log.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_call_log.png
index 2880eb766a..1866dd965c 100644
--- a/indra/newview/skins/default/textures/icons/Conv_toolbar_call_log.png
+++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_call_log.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_close.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_close.png
index d009c8f446..f4f2e2fd37 100644
--- a/indra/newview/skins/default/textures/icons/Conv_toolbar_close.png
+++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_close.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_collapse.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_collapse.png
index 8d82960e28..3c427a3cc5 100644
--- a/indra/newview/skins/default/textures/icons/Conv_toolbar_collapse.png
+++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_collapse.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_expand.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_expand.png
index f718d3fc60..6e8031b42c 100644
--- a/indra/newview/skins/default/textures/icons/Conv_toolbar_expand.png
+++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_expand.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_hang_up.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_hang_up.png
index 315e2c581a..887a3b8335 100644
--- a/indra/newview/skins/default/textures/icons/Conv_toolbar_hang_up.png
+++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_hang_up.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_open_call.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_open_call.png
index 732ab02a20..fc0da5a810 100644
--- a/indra/newview/skins/default/textures/icons/Conv_toolbar_open_call.png
+++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_open_call.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_plus.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_plus.png
index 25a32cb2ba..6d45dbbff6 100644
--- a/indra/newview/skins/default/textures/icons/Conv_toolbar_plus.png
+++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_plus.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Conv_toolbar_sort.png b/indra/newview/skins/default/textures/icons/Conv_toolbar_sort.png
index 08debeb91f..e3e5f49741 100644
--- a/indra/newview/skins/default/textures/icons/Conv_toolbar_sort.png
+++ b/indra/newview/skins/default/textures/icons/Conv_toolbar_sort.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Copy.png b/indra/newview/skins/default/textures/icons/Copy.png
index d45134e9dd..8448e70385 100644
--- a/indra/newview/skins/default/textures/icons/Copy.png
+++ b/indra/newview/skins/default/textures/icons/Copy.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/CopyBright.png b/indra/newview/skins/default/textures/icons/CopyBright.png
index 8d21c47295..ac65d68e0b 100644
--- a/indra/newview/skins/default/textures/icons/CopyBright.png
+++ b/indra/newview/skins/default/textures/icons/CopyBright.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Default_Outfit_Photo.png b/indra/newview/skins/default/textures/icons/Default_Outfit_Photo.png
index bacddcbb68..1113b4effe 100644
--- a/indra/newview/skins/default/textures/icons/Default_Outfit_Photo.png
+++ b/indra/newview/skins/default/textures/icons/Default_Outfit_Photo.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/DownArrow_Off.png b/indra/newview/skins/default/textures/icons/DownArrow_Off.png
index 60f62eed4a..2e1e2964a0 100644
--- a/indra/newview/skins/default/textures/icons/DownArrow_Off.png
+++ b/indra/newview/skins/default/textures/icons/DownArrow_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Edit_Wrench.png b/indra/newview/skins/default/textures/icons/Edit_Wrench.png
index 42f8466969..2b9ba9dc10 100644
--- a/indra/newview/skins/default/textures/icons/Edit_Wrench.png
+++ b/indra/newview/skins/default/textures/icons/Edit_Wrench.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/ExternalBrowser_Off.png b/indra/newview/skins/default/textures/icons/ExternalBrowser_Off.png
index 69646ce473..dc4532b5a1 100644
--- a/indra/newview/skins/default/textures/icons/ExternalBrowser_Off.png
+++ b/indra/newview/skins/default/textures/icons/ExternalBrowser_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Facebook.png b/indra/newview/skins/default/textures/icons/Facebook.png
index 8287d56f88..9e51e3ac7f 100644
--- a/indra/newview/skins/default/textures/icons/Facebook.png
+++ b/indra/newview/skins/default/textures/icons/Facebook.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Female.png b/indra/newview/skins/default/textures/icons/Female.png
index 67b5653a94..c9fef87b6e 100644
--- a/indra/newview/skins/default/textures/icons/Female.png
+++ b/indra/newview/skins/default/textures/icons/Female.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/ForSale_Badge.png b/indra/newview/skins/default/textures/icons/ForSale_Badge.png
index 5bee570cee..3b3a41c7c1 100644
--- a/indra/newview/skins/default/textures/icons/ForSale_Badge.png
+++ b/indra/newview/skins/default/textures/icons/ForSale_Badge.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/ForwardArrow_Off.png b/indra/newview/skins/default/textures/icons/ForwardArrow_Off.png
index e9b72b0401..c33320cf6e 100644
--- a/indra/newview/skins/default/textures/icons/ForwardArrow_Off.png
+++ b/indra/newview/skins/default/textures/icons/ForwardArrow_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/ForwardArrow_Press.png b/indra/newview/skins/default/textures/icons/ForwardArrow_Press.png
index c7b2c769ae..86eb39c43a 100644
--- a/indra/newview/skins/default/textures/icons/ForwardArrow_Press.png
+++ b/indra/newview/skins/default/textures/icons/ForwardArrow_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Generic_Group.png b/indra/newview/skins/default/textures/icons/Generic_Group.png
index 9d76f75d0f..e96b7fc992 100644
--- a/indra/newview/skins/default/textures/icons/Generic_Group.png
+++ b/indra/newview/skins/default/textures/icons/Generic_Group.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Generic_Group_Large.png b/indra/newview/skins/default/textures/icons/Generic_Group_Large.png
index 46ee6dfe2c..9396819bfb 100644
--- a/indra/newview/skins/default/textures/icons/Generic_Group_Large.png
+++ b/indra/newview/skins/default/textures/icons/Generic_Group_Large.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Generic_Object_Small.png b/indra/newview/skins/default/textures/icons/Generic_Object_Small.png
index 223874e631..142390e3f3 100644
--- a/indra/newview/skins/default/textures/icons/Generic_Object_Small.png
+++ b/indra/newview/skins/default/textures/icons/Generic_Object_Small.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Generic_Person.png b/indra/newview/skins/default/textures/icons/Generic_Person.png
index e1411354af..162735d979 100644
--- a/indra/newview/skins/default/textures/icons/Generic_Person.png
+++ b/indra/newview/skins/default/textures/icons/Generic_Person.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Generic_Person_Large.png b/indra/newview/skins/default/textures/icons/Generic_Person_Large.png
index 532288b430..5be82418c1 100644
--- a/indra/newview/skins/default/textures/icons/Generic_Person_Large.png
+++ b/indra/newview/skins/default/textures/icons/Generic_Person_Large.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Hierarchy_View_Disabled.png b/indra/newview/skins/default/textures/icons/Hierarchy_View_Disabled.png
index fb370f98d5..6d8ea5fd93 100644
--- a/indra/newview/skins/default/textures/icons/Hierarchy_View_Disabled.png
+++ b/indra/newview/skins/default/textures/icons/Hierarchy_View_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Hierarchy_View_On.png b/indra/newview/skins/default/textures/icons/Hierarchy_View_On.png
index ae8c8b4c1a..24f5210286 100644
--- a/indra/newview/skins/default/textures/icons/Hierarchy_View_On.png
+++ b/indra/newview/skins/default/textures/icons/Hierarchy_View_On.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Icon_Attachment_Large.png b/indra/newview/skins/default/textures/icons/Icon_Attachment_Large.png
index 0732a33d93..74ec3d7e69 100644
--- a/indra/newview/skins/default/textures/icons/Icon_Attachment_Large.png
+++ b/indra/newview/skins/default/textures/icons/Icon_Attachment_Large.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Icon_Attachment_Small.png b/indra/newview/skins/default/textures/icons/Icon_Attachment_Small.png
index 8124554902..9ea7c48871 100644
--- a/indra/newview/skins/default/textures/icons/Icon_Attachment_Small.png
+++ b/indra/newview/skins/default/textures/icons/Icon_Attachment_Small.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Icon_For_Sale.png b/indra/newview/skins/default/textures/icons/Icon_For_Sale.png
index 3dec6b989c..57a376f1bf 100644
--- a/indra/newview/skins/default/textures/icons/Icon_For_Sale.png
+++ b/indra/newview/skins/default/textures/icons/Icon_For_Sale.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Icon_Notification_Condense.png b/indra/newview/skins/default/textures/icons/Icon_Notification_Condense.png
index 4d245eb57a..3a19e79f82 100644
--- a/indra/newview/skins/default/textures/icons/Icon_Notification_Condense.png
+++ b/indra/newview/skins/default/textures/icons/Icon_Notification_Condense.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Icon_Notification_Expand.png b/indra/newview/skins/default/textures/icons/Icon_Notification_Expand.png
index 186822da43..f5331feb02 100644
--- a/indra/newview/skins/default/textures/icons/Icon_Notification_Expand.png
+++ b/indra/newview/skins/default/textures/icons/Icon_Notification_Expand.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Info.png b/indra/newview/skins/default/textures/icons/Info.png
index e52560281b..e05a585f0b 100644
--- a/indra/newview/skins/default/textures/icons/Info.png
+++ b/indra/newview/skins/default/textures/icons/Info.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Info_Over.png b/indra/newview/skins/default/textures/icons/Info_Over.png
index be1cd0706f..0efd596d3e 100644
--- a/indra/newview/skins/default/textures/icons/Info_Over.png
+++ b/indra/newview/skins/default/textures/icons/Info_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Info_Small.png b/indra/newview/skins/default/textures/icons/Info_Small.png
index 81078c32dc..c4ce13e132 100644
--- a/indra/newview/skins/default/textures/icons/Info_Small.png
+++ b/indra/newview/skins/default/textures/icons/Info_Small.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Alpha.png b/indra/newview/skins/default/textures/icons/Inv_Alpha.png
index b65dc1929d..fdad36e2d3 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Alpha.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Alpha.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Animation.png b/indra/newview/skins/default/textures/icons/Inv_Animation.png
index ab42c61a92..6715c736e7 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Animation.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Animation.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_BodyShape.png b/indra/newview/skins/default/textures/icons/Inv_BodyShape.png
index 97e874d70d..cb908a39fb 100644
--- a/indra/newview/skins/default/textures/icons/Inv_BodyShape.png
+++ b/indra/newview/skins/default/textures/icons/Inv_BodyShape.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_CallingCard.png b/indra/newview/skins/default/textures/icons/Inv_CallingCard.png
index 1de96475f7..ee87f8e595 100644
--- a/indra/newview/skins/default/textures/icons/Inv_CallingCard.png
+++ b/indra/newview/skins/default/textures/icons/Inv_CallingCard.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Clothing.png b/indra/newview/skins/default/textures/icons/Inv_Clothing.png
index e8d246c6fa..430dca6b5e 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Clothing.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Clothing.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Eye.png b/indra/newview/skins/default/textures/icons/Inv_Eye.png
index e619f56c2b..d715f135d3 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Eye.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Eye.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_FolderClosed.png b/indra/newview/skins/default/textures/icons/Inv_FolderClosed.png
index 342a973d00..ec99eaee9e 100644
--- a/indra/newview/skins/default/textures/icons/Inv_FolderClosed.png
+++ b/indra/newview/skins/default/textures/icons/Inv_FolderClosed.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_FolderOpen.png b/indra/newview/skins/default/textures/icons/Inv_FolderOpen.png
index 0507c2cbaf..615a6ec11b 100644
--- a/indra/newview/skins/default/textures/icons/Inv_FolderOpen.png
+++ b/indra/newview/skins/default/textures/icons/Inv_FolderOpen.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Gesture.png b/indra/newview/skins/default/textures/icons/Inv_Gesture.png
index 52695ec19b..9fee34915e 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Gesture.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Gesture.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Gloves.png b/indra/newview/skins/default/textures/icons/Inv_Gloves.png
index d6a2113aaf..aa151d5404 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Gloves.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Gloves.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Hair.png b/indra/newview/skins/default/textures/icons/Inv_Hair.png
index ae941b0dd5..62b3ae81c2 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Hair.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Hair.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Invalid.png b/indra/newview/skins/default/textures/icons/Inv_Invalid.png
index 328be104ee..6ab5ba5217 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Invalid.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Invalid.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Jacket.png b/indra/newview/skins/default/textures/icons/Inv_Jacket.png
index 3859666f7c..26514f1c0f 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Jacket.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Jacket.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Landmark.png b/indra/newview/skins/default/textures/icons/Inv_Landmark.png
index 76df984596..338323fcee 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Landmark.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Landmark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Link.png b/indra/newview/skins/default/textures/icons/Inv_Link.png
index 26bf4086fb..28c5f3635a 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Link.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Link.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_LinkFolder.png b/indra/newview/skins/default/textures/icons/Inv_LinkFolder.png
index 73a708782c..7c43ed3a43 100644
--- a/indra/newview/skins/default/textures/icons/Inv_LinkFolder.png
+++ b/indra/newview/skins/default/textures/icons/Inv_LinkFolder.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_LinkItem.png b/indra/newview/skins/default/textures/icons/Inv_LinkItem.png
index 73a708782c..7c43ed3a43 100644
--- a/indra/newview/skins/default/textures/icons/Inv_LinkItem.png
+++ b/indra/newview/skins/default/textures/icons/Inv_LinkItem.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_LookFolderClosed.png b/indra/newview/skins/default/textures/icons/Inv_LookFolderClosed.png
index f2ae828efc..46f2038279 100644
--- a/indra/newview/skins/default/textures/icons/Inv_LookFolderClosed.png
+++ b/indra/newview/skins/default/textures/icons/Inv_LookFolderClosed.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_LookFolderOpen.png b/indra/newview/skins/default/textures/icons/Inv_LookFolderOpen.png
index d454d4cd48..06a1b05983 100644
--- a/indra/newview/skins/default/textures/icons/Inv_LookFolderOpen.png
+++ b/indra/newview/skins/default/textures/icons/Inv_LookFolderOpen.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_LostClosed.png b/indra/newview/skins/default/textures/icons/Inv_LostClosed.png
index 42b5c88fdd..fc9a2a2156 100644
--- a/indra/newview/skins/default/textures/icons/Inv_LostClosed.png
+++ b/indra/newview/skins/default/textures/icons/Inv_LostClosed.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_LostOpen.png b/indra/newview/skins/default/textures/icons/Inv_LostOpen.png
index a52168d6c7..b15dc3cfa3 100644
--- a/indra/newview/skins/default/textures/icons/Inv_LostOpen.png
+++ b/indra/newview/skins/default/textures/icons/Inv_LostOpen.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Material.png b/indra/newview/skins/default/textures/icons/Inv_Material.png
index f5918ceaed..5cbb4fc5c9 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Material.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Material.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Mesh.png b/indra/newview/skins/default/textures/icons/Inv_Mesh.png
index 77e52264c3..69217d1cdc 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Mesh.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Mesh.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Notecard.png b/indra/newview/skins/default/textures/icons/Inv_Notecard.png
index 4645ab8e91..96f45bc55e 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Notecard.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Notecard.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Object.png b/indra/newview/skins/default/textures/icons/Inv_Object.png
index f883696a82..fe6b201570 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Object.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Object.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Object_Multi.png b/indra/newview/skins/default/textures/icons/Inv_Object_Multi.png
index 11f4871ad8..3793594059 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Object_Multi.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Object_Multi.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Pants.png b/indra/newview/skins/default/textures/icons/Inv_Pants.png
index fe2389f074..5673bc29ed 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Pants.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Pants.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Physics.png b/indra/newview/skins/default/textures/icons/Inv_Physics.png
index 360baec46d..43bd082d8a 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Physics.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Physics.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Script.png b/indra/newview/skins/default/textures/icons/Inv_Script.png
index 0fba27a7aa..68d2ac425f 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Script.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Script.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Settings.png b/indra/newview/skins/default/textures/icons/Inv_Settings.png
index c43ba349c4..ca6cf10314 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Settings.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Settings.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_SettingsDay.png b/indra/newview/skins/default/textures/icons/Inv_SettingsDay.png
index 258ade1327..d0c4b2cdcd 100644
--- a/indra/newview/skins/default/textures/icons/Inv_SettingsDay.png
+++ b/indra/newview/skins/default/textures/icons/Inv_SettingsDay.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_SettingsSky.png b/indra/newview/skins/default/textures/icons/Inv_SettingsSky.png
index 77858b23c3..5332404d37 100644
--- a/indra/newview/skins/default/textures/icons/Inv_SettingsSky.png
+++ b/indra/newview/skins/default/textures/icons/Inv_SettingsSky.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_SettingsWater.png b/indra/newview/skins/default/textures/icons/Inv_SettingsWater.png
index 46fb58c3f2..88ff803756 100644
--- a/indra/newview/skins/default/textures/icons/Inv_SettingsWater.png
+++ b/indra/newview/skins/default/textures/icons/Inv_SettingsWater.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Shirt.png b/indra/newview/skins/default/textures/icons/Inv_Shirt.png
index 81c1538dd2..ffabff9c6c 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Shirt.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Shirt.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Shoe.png b/indra/newview/skins/default/textures/icons/Inv_Shoe.png
index 1f52b0a6b6..784d1d23a3 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Shoe.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Shoe.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Skin.png b/indra/newview/skins/default/textures/icons/Inv_Skin.png
index b7da922046..a232c5ac67 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Skin.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Skin.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Skirt.png b/indra/newview/skins/default/textures/icons/Inv_Skirt.png
index 246e9a87aa..5970f39b1b 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Skirt.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Skirt.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Snapshot.png b/indra/newview/skins/default/textures/icons/Inv_Snapshot.png
index 39efd2be1b..9eaca9e7ef 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Snapshot.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Snapshot.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Socks.png b/indra/newview/skins/default/textures/icons/Inv_Socks.png
index 30d7d7c239..95a3a68de6 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Socks.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Socks.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Sound.png b/indra/newview/skins/default/textures/icons/Inv_Sound.png
index 44c271c868..138d4c5c36 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Sound.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Sound.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_StockFolderClosed.png b/indra/newview/skins/default/textures/icons/Inv_StockFolderClosed.png
index 4dc484dc22..c3aae7c736 100644
--- a/indra/newview/skins/default/textures/icons/Inv_StockFolderClosed.png
+++ b/indra/newview/skins/default/textures/icons/Inv_StockFolderClosed.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_StockFolderOpen.png b/indra/newview/skins/default/textures/icons/Inv_StockFolderOpen.png
index 0d140b56a7..15fd8225fc 100644
--- a/indra/newview/skins/default/textures/icons/Inv_StockFolderOpen.png
+++ b/indra/newview/skins/default/textures/icons/Inv_StockFolderOpen.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_SysClosed.png b/indra/newview/skins/default/textures/icons/Inv_SysClosed.png
index 57eafc4047..9af3b60cbd 100644
--- a/indra/newview/skins/default/textures/icons/Inv_SysClosed.png
+++ b/indra/newview/skins/default/textures/icons/Inv_SysClosed.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_SysOpen.png b/indra/newview/skins/default/textures/icons/Inv_SysOpen.png
index b080688e55..01e7dbff8f 100644
--- a/indra/newview/skins/default/textures/icons/Inv_SysOpen.png
+++ b/indra/newview/skins/default/textures/icons/Inv_SysOpen.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Tattoo.png b/indra/newview/skins/default/textures/icons/Inv_Tattoo.png
index a632197eb5..af5a780685 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Tattoo.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Tattoo.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Texture.png b/indra/newview/skins/default/textures/icons/Inv_Texture.png
index dbc41c5e99..168a97515a 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Texture.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Texture.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Toolbar_SearchVisibility.png b/indra/newview/skins/default/textures/icons/Inv_Toolbar_SearchVisibility.png
index 048da25c92..c4b186c3de 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Toolbar_SearchVisibility.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Toolbar_SearchVisibility.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_TrashClosed.png b/indra/newview/skins/default/textures/icons/Inv_TrashClosed.png
index 7a958c1ec0..89f0caa5a2 100644
--- a/indra/newview/skins/default/textures/icons/Inv_TrashClosed.png
+++ b/indra/newview/skins/default/textures/icons/Inv_TrashClosed.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_TrashOpen.png b/indra/newview/skins/default/textures/icons/Inv_TrashOpen.png
index 11e6bf33bc..d1f1eeaf42 100644
--- a/indra/newview/skins/default/textures/icons/Inv_TrashOpen.png
+++ b/indra/newview/skins/default/textures/icons/Inv_TrashOpen.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Underpants.png b/indra/newview/skins/default/textures/icons/Inv_Underpants.png
index b1e7c2a55f..77f8e55270 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Underpants.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Underpants.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Undershirt.png b/indra/newview/skins/default/textures/icons/Inv_Undershirt.png
index 9340dbb975..477d76cf11 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Undershirt.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Undershirt.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Universal.png b/indra/newview/skins/default/textures/icons/Inv_Universal.png
index 470febb9b5..65b2f88f02 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Universal.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Universal.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_UnknownObject.png b/indra/newview/skins/default/textures/icons/Inv_UnknownObject.png
index 10f2b31cb5..603a6d7aaa 100644
--- a/indra/newview/skins/default/textures/icons/Inv_UnknownObject.png
+++ b/indra/newview/skins/default/textures/icons/Inv_UnknownObject.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_VersionFolderClosed.png b/indra/newview/skins/default/textures/icons/Inv_VersionFolderClosed.png
index e89a4d7f31..cd561d24ba 100644
--- a/indra/newview/skins/default/textures/icons/Inv_VersionFolderClosed.png
+++ b/indra/newview/skins/default/textures/icons/Inv_VersionFolderClosed.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_VersionFolderOpen.png b/indra/newview/skins/default/textures/icons/Inv_VersionFolderOpen.png
index 659d7d392f..6dc9d451cc 100644
--- a/indra/newview/skins/default/textures/icons/Inv_VersionFolderOpen.png
+++ b/indra/newview/skins/default/textures/icons/Inv_VersionFolderOpen.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/List_View_Disabled.png b/indra/newview/skins/default/textures/icons/List_View_Disabled.png
index 155dee5047..125034b0cb 100644
--- a/indra/newview/skins/default/textures/icons/List_View_Disabled.png
+++ b/indra/newview/skins/default/textures/icons/List_View_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/List_View_On.png b/indra/newview/skins/default/textures/icons/List_View_On.png
index 9127c92c3b..fcf77f004f 100644
--- a/indra/newview/skins/default/textures/icons/List_View_On.png
+++ b/indra/newview/skins/default/textures/icons/List_View_On.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Lock.png b/indra/newview/skins/default/textures/icons/Lock.png
index eb5b5ae7a9..2db6ed0213 100644
--- a/indra/newview/skins/default/textures/icons/Lock.png
+++ b/indra/newview/skins/default/textures/icons/Lock.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Locked_Icon.png b/indra/newview/skins/default/textures/icons/Locked_Icon.png
index 8ead280794..4985af1be1 100644
--- a/indra/newview/skins/default/textures/icons/Locked_Icon.png
+++ b/indra/newview/skins/default/textures/icons/Locked_Icon.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Male.png b/indra/newview/skins/default/textures/icons/Male.png
index f3fad77fd0..803171f5c6 100644
--- a/indra/newview/skins/default/textures/icons/Male.png
+++ b/indra/newview/skins/default/textures/icons/Male.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Microphone_On.png b/indra/newview/skins/default/textures/icons/Microphone_On.png
index c96b500fa1..7a7d39d982 100644
--- a/indra/newview/skins/default/textures/icons/Microphone_On.png
+++ b/indra/newview/skins/default/textures/icons/Microphone_On.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/MinusItem_Disabled.png b/indra/newview/skins/default/textures/icons/MinusItem_Disabled.png
index 75bd73cef1..b62ed35182 100644
--- a/indra/newview/skins/default/textures/icons/MinusItem_Disabled.png
+++ b/indra/newview/skins/default/textures/icons/MinusItem_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/MinusItem_Off.png b/indra/newview/skins/default/textures/icons/MinusItem_Off.png
index 6f285f3546..eb7b8838f7 100644
--- a/indra/newview/skins/default/textures/icons/MinusItem_Off.png
+++ b/indra/newview/skins/default/textures/icons/MinusItem_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/MinusItem_Press.png b/indra/newview/skins/default/textures/icons/MinusItem_Press.png
index 50f65765d5..2dc6081cb0 100644
--- a/indra/newview/skins/default/textures/icons/MinusItem_Press.png
+++ b/indra/newview/skins/default/textures/icons/MinusItem_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/OptionsMenu_Disabled.png b/indra/newview/skins/default/textures/icons/OptionsMenu_Disabled.png
index fb341e9c83..5755315e23 100644
--- a/indra/newview/skins/default/textures/icons/OptionsMenu_Disabled.png
+++ b/indra/newview/skins/default/textures/icons/OptionsMenu_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/OptionsMenu_Off.png b/indra/newview/skins/default/textures/icons/OptionsMenu_Off.png
index 25b055bfc0..2e9a5faa21 100644
--- a/indra/newview/skins/default/textures/icons/OptionsMenu_Off.png
+++ b/indra/newview/skins/default/textures/icons/OptionsMenu_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/OptionsMenu_Press.png b/indra/newview/skins/default/textures/icons/OptionsMenu_Press.png
index 6e91dd7159..1b08648b51 100644
--- a/indra/newview/skins/default/textures/icons/OptionsMenu_Press.png
+++ b/indra/newview/skins/default/textures/icons/OptionsMenu_Press.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
index be58114aa1..ab8983b545 100644
--- a/indra/newview/skins/default/textures/icons/OutboxPush_Disabled.png
+++ 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
index e6b9480ab1..17e152a901 100644
--- a/indra/newview/skins/default/textures/icons/OutboxPush_Off.png
+++ 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
index ffda2e92d4..7ed854b9eb 100644
--- a/indra/newview/skins/default/textures/icons/OutboxPush_On.png
+++ 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
index 6b5911014f..1b77ccdaaa 100644
--- a/indra/newview/skins/default/textures/icons/OutboxPush_On_Over.png
+++ b/indra/newview/skins/default/textures/icons/OutboxPush_On_Over.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
index 9c26b92e73..3d352af9a1 100644
--- a/indra/newview/skins/default/textures/icons/OutboxPush_Over.png
+++ 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
index 3b5d462975..bf040e3662 100644
--- a/indra/newview/skins/default/textures/icons/OutboxPush_Press.png
+++ 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
index f85be047b0..0e1252082f 100644
--- a/indra/newview/skins/default/textures/icons/OutboxPush_Progress_1.png
+++ 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
index cd4e482216..6684b70ca8 100644
--- a/indra/newview/skins/default/textures/icons/OutboxPush_Progress_2.png
+++ 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
index d212a871ce..b8d2a86662 100644
--- a/indra/newview/skins/default/textures/icons/OutboxPush_Progress_3.png
+++ 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
index e5b6023e36..f93e844a00 100644
--- a/indra/newview/skins/default/textures/icons/OutboxPush_Progress_4.png
+++ 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
index e1911a092f..631b8475af 100644
--- a/indra/newview/skins/default/textures/icons/OutboxPush_Progress_5.png
+++ 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
index 9e59f7843a..39283fa162 100644
--- a/indra/newview/skins/default/textures/icons/OutboxPush_Progress_6.png
+++ 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
index 51e8bff646..c5576561d5 100644
--- a/indra/newview/skins/default/textures/icons/OutboxPush_Selected.png
+++ 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
index 300e2e69e1..5899b766d6 100644
--- a/indra/newview/skins/default/textures/icons/OutboxPush_Selected_Disabled.png
+++ 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
index 32fb236381..de290d8228 100644
--- a/indra/newview/skins/default/textures/icons/OutboxPush_Selected_Over.png
+++ 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
index 827f343b1e..532cdff222 100644
--- a/indra/newview/skins/default/textures/icons/OutboxPush_Selected_Press.png
+++ b/indra/newview/skins/default/textures/icons/OutboxPush_Selected_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_BuildNo_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_BuildNo_Dark.png
index fb1f7d3a6d..dd12d94ad2 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_BuildNo_Dark.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_BuildNo_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_BuildNo_Light.png b/indra/newview/skins/default/textures/icons/Parcel_BuildNo_Light.png
index e6f614b844..4739c501ad 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_BuildNo_Light.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_BuildNo_Light.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_Build_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_Build_Dark.png
index 84a96a60cb..9826491efd 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_Build_Dark.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_Build_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_DamageNo_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_DamageNo_Dark.png
index d55ebd7c67..7634e5fab0 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_DamageNo_Dark.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_DamageNo_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_Damage_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_Damage_Dark.png
index ae4077488b..7ecd645df2 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_Damage_Dark.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_Damage_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_Exp_Color.png b/indra/newview/skins/default/textures/icons/Parcel_Exp_Color.png
index 4813d37198..a1b0faa008 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_Exp_Color.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_Exp_Color.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_FlyNo_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_FlyNo_Dark.png
index af65873cb6..831c25a34b 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_FlyNo_Dark.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_FlyNo_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_FlyNo_Light.png b/indra/newview/skins/default/textures/icons/Parcel_FlyNo_Light.png
index 6ceb9d3d8f..be829fb5ef 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_FlyNo_Light.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_FlyNo_Light.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_Fly_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_Fly_Dark.png
index 7084e2f591..579bfe58f8 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_Fly_Dark.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_Fly_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_ForSale_Light.png b/indra/newview/skins/default/textures/icons/Parcel_ForSale_Light.png
index d28e5357df..3f4ee0b482 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_ForSale_Light.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_ForSale_Light.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_Health_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_Health_Dark.png
index d72f02f708..98618de927 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_Health_Dark.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_Health_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_M_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_M_Dark.png
index 60e6a00a25..ab5a1680a7 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_M_Dark.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_M_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_M_Light.png b/indra/newview/skins/default/textures/icons/Parcel_M_Light.png
index 55f97f3b4e..2db94e37c9 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_M_Light.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_M_Light.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_PG_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_PG_Dark.png
index 11ab1f1e60..e1f7613d04 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_PG_Dark.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_PG_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_PG_Light.png b/indra/newview/skins/default/textures/icons/Parcel_PG_Light.png
index b536762ddc..04d13027d2 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_PG_Light.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_PG_Light.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_PushNo_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_PushNo_Dark.png
index 8f0fe6a04d..2867004014 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_PushNo_Dark.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_PushNo_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_PushNo_Light.png b/indra/newview/skins/default/textures/icons/Parcel_PushNo_Light.png
index eba7070b4d..a3a51973af 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_PushNo_Light.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_PushNo_Light.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_Push_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_Push_Dark.png
index 08c2a18ac3..e8487ca092 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_Push_Dark.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_Push_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_R_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_R_Dark.png
index bf618752f6..5c165c2fac 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_R_Dark.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_R_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_R_Light.png b/indra/newview/skins/default/textures/icons/Parcel_R_Light.png
index a67bbd0cc5..dbf43152b3 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_R_Light.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_R_Light.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_ScriptsNo_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_ScriptsNo_Dark.png
index 8f9f37a1bf..bfc55fc403 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_ScriptsNo_Dark.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_ScriptsNo_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_Scripts_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_Scripts_Dark.png
index 8b1d6c5e14..3477e0654c 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_Scripts_Dark.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_Scripts_Dark.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
index 60d056b573..eff089487e 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_SeeAVsOff_Dark.png
+++ 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
index d004b0f750..68f0b14d44 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_SeeAVsOff_Light.png
+++ 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
index eed28765f7..200e04a59f 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_SeeAVsOn_Dark.png
+++ 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
index e35de3c2fa..14cafc5bd2 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_SeeAVsOn_Light.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_SeeAVsOn_Light.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_VoiceNo_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_VoiceNo_Dark.png
index eace54ae79..ec316e822e 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_VoiceNo_Dark.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_VoiceNo_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_VoiceNo_Light.png b/indra/newview/skins/default/textures/icons/Parcel_VoiceNo_Light.png
index 0d07e552b1..de3532a70b 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_VoiceNo_Light.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_VoiceNo_Light.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_Voice_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_Voice_Dark.png
index b36a9bd2f0..329620fa69 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_Voice_Dark.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_Voice_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_Voice_Light.png b/indra/newview/skins/default/textures/icons/Parcel_Voice_Light.png
index 86ce19474a..81e0fa7bc4 100644
--- a/indra/newview/skins/default/textures/icons/Parcel_Voice_Light.png
+++ b/indra/newview/skins/default/textures/icons/Parcel_Voice_Light.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Pathfinding_Dirty.png b/indra/newview/skins/default/textures/icons/Pathfinding_Dirty.png
index cfa12cb7cc..d8fee0fef7 100644
--- a/indra/newview/skins/default/textures/icons/Pathfinding_Dirty.png
+++ b/indra/newview/skins/default/textures/icons/Pathfinding_Dirty.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Pathfinding_Disabled.png b/indra/newview/skins/default/textures/icons/Pathfinding_Disabled.png
index 0622141848..ea2ad79611 100644
--- a/indra/newview/skins/default/textures/icons/Pathfinding_Disabled.png
+++ b/indra/newview/skins/default/textures/icons/Pathfinding_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Pause_Off.png b/indra/newview/skins/default/textures/icons/Pause_Off.png
index 77f6be569d..5d44412783 100644
--- a/indra/newview/skins/default/textures/icons/Pause_Off.png
+++ b/indra/newview/skins/default/textures/icons/Pause_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Pause_Over.png b/indra/newview/skins/default/textures/icons/Pause_Over.png
index 580808bf7e..d1609a144b 100644
--- a/indra/newview/skins/default/textures/icons/Pause_Over.png
+++ b/indra/newview/skins/default/textures/icons/Pause_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Pause_Press.png b/indra/newview/skins/default/textures/icons/Pause_Press.png
index 859db34cae..6b918d1ae6 100644
--- a/indra/newview/skins/default/textures/icons/Pause_Press.png
+++ b/indra/newview/skins/default/textures/icons/Pause_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Person_Check.png b/indra/newview/skins/default/textures/icons/Person_Check.png
index d40eafe793..39a63a70cf 100644
--- a/indra/newview/skins/default/textures/icons/Person_Check.png
+++ b/indra/newview/skins/default/textures/icons/Person_Check.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Person_Star.png b/indra/newview/skins/default/textures/icons/Person_Star.png
index e02935672f..c4e625b3c1 100644
--- a/indra/newview/skins/default/textures/icons/Person_Star.png
+++ b/indra/newview/skins/default/textures/icons/Person_Star.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Play_Off.png b/indra/newview/skins/default/textures/icons/Play_Off.png
index e594c1a4cb..dac2f2d6db 100644
--- a/indra/newview/skins/default/textures/icons/Play_Off.png
+++ b/indra/newview/skins/default/textures/icons/Play_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Play_Over.png b/indra/newview/skins/default/textures/icons/Play_Over.png
index 70ab94e8c2..1d261efcda 100644
--- a/indra/newview/skins/default/textures/icons/Play_Over.png
+++ b/indra/newview/skins/default/textures/icons/Play_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Play_Press.png b/indra/newview/skins/default/textures/icons/Play_Press.png
index b52742c6da..f7251ce549 100644
--- a/indra/newview/skins/default/textures/icons/Play_Press.png
+++ b/indra/newview/skins/default/textures/icons/Play_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Presets_Icon.png b/indra/newview/skins/default/textures/icons/Presets_Icon.png
index 503ee892a5..13642e88d1 100644
--- a/indra/newview/skins/default/textures/icons/Presets_Icon.png
+++ b/indra/newview/skins/default/textures/icons/Presets_Icon.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Presets_Icon_Graphic.png b/indra/newview/skins/default/textures/icons/Presets_Icon_Graphic.png
index 5a6628816b..96d1021f81 100644
--- a/indra/newview/skins/default/textures/icons/Presets_Icon_Graphic.png
+++ b/indra/newview/skins/default/textures/icons/Presets_Icon_Graphic.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Profile_Friend_Offline.png b/indra/newview/skins/default/textures/icons/Profile_Friend_Offline.png
index aeba6b70f7..55d922cda7 100644
--- a/indra/newview/skins/default/textures/icons/Profile_Friend_Offline.png
+++ b/indra/newview/skins/default/textures/icons/Profile_Friend_Offline.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Profile_Friend_Online.png b/indra/newview/skins/default/textures/icons/Profile_Friend_Online.png
index d668fd8dfa..febe8e78fa 100644
--- a/indra/newview/skins/default/textures/icons/Profile_Friend_Online.png
+++ b/indra/newview/skins/default/textures/icons/Profile_Friend_Online.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Profile_Perm_Find_Disabled.png b/indra/newview/skins/default/textures/icons/Profile_Perm_Find_Disabled.png
index 8f8caa10d8..2632eb173b 100644
--- a/indra/newview/skins/default/textures/icons/Profile_Perm_Find_Disabled.png
+++ b/indra/newview/skins/default/textures/icons/Profile_Perm_Find_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Profile_Perm_Find_Enabled.png b/indra/newview/skins/default/textures/icons/Profile_Perm_Find_Enabled.png
index 42a209dda5..fd8b152c12 100644
--- a/indra/newview/skins/default/textures/icons/Profile_Perm_Find_Enabled.png
+++ b/indra/newview/skins/default/textures/icons/Profile_Perm_Find_Enabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Profile_Perm_Objects_Disabled.png b/indra/newview/skins/default/textures/icons/Profile_Perm_Objects_Disabled.png
index 644edf0ef6..cef3ec4e5a 100644
--- a/indra/newview/skins/default/textures/icons/Profile_Perm_Objects_Disabled.png
+++ b/indra/newview/skins/default/textures/icons/Profile_Perm_Objects_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Profile_Perm_Objects_Enabled.png b/indra/newview/skins/default/textures/icons/Profile_Perm_Objects_Enabled.png
index 629c05ecb8..5821566703 100644
--- a/indra/newview/skins/default/textures/icons/Profile_Perm_Objects_Enabled.png
+++ b/indra/newview/skins/default/textures/icons/Profile_Perm_Objects_Enabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Profile_Perm_Online_Disabled.png b/indra/newview/skins/default/textures/icons/Profile_Perm_Online_Disabled.png
index ecf66c0ee1..ea1b55eca0 100644
--- a/indra/newview/skins/default/textures/icons/Profile_Perm_Online_Disabled.png
+++ b/indra/newview/skins/default/textures/icons/Profile_Perm_Online_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Profile_Perm_Online_Enabled.png b/indra/newview/skins/default/textures/icons/Profile_Perm_Online_Enabled.png
index 26123938fa..eb3fc9e713 100644
--- a/indra/newview/skins/default/textures/icons/Profile_Perm_Online_Enabled.png
+++ b/indra/newview/skins/default/textures/icons/Profile_Perm_Online_Enabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_1.png b/indra/newview/skins/default/textures/icons/Progress_1.png
index 5d6efbfa2a..bc7a1e7e96 100644
--- a/indra/newview/skins/default/textures/icons/Progress_1.png
+++ b/indra/newview/skins/default/textures/icons/Progress_1.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_10.png b/indra/newview/skins/default/textures/icons/Progress_10.png
index 28203324f1..acf4d21aba 100644
--- a/indra/newview/skins/default/textures/icons/Progress_10.png
+++ b/indra/newview/skins/default/textures/icons/Progress_10.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_11.png b/indra/newview/skins/default/textures/icons/Progress_11.png
index 6b87be0c3f..1842cd09d0 100644
--- a/indra/newview/skins/default/textures/icons/Progress_11.png
+++ b/indra/newview/skins/default/textures/icons/Progress_11.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_12.png b/indra/newview/skins/default/textures/icons/Progress_12.png
index 089d58b090..0ea9dda83e 100644
--- a/indra/newview/skins/default/textures/icons/Progress_12.png
+++ b/indra/newview/skins/default/textures/icons/Progress_12.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_2.png b/indra/newview/skins/default/textures/icons/Progress_2.png
index 94cb73b1f7..29d6bbcbcb 100644
--- a/indra/newview/skins/default/textures/icons/Progress_2.png
+++ b/indra/newview/skins/default/textures/icons/Progress_2.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_3.png b/indra/newview/skins/default/textures/icons/Progress_3.png
index a04a5b5263..52a03125e9 100644
--- a/indra/newview/skins/default/textures/icons/Progress_3.png
+++ b/indra/newview/skins/default/textures/icons/Progress_3.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_4.png b/indra/newview/skins/default/textures/icons/Progress_4.png
index a467098d82..4b2798519f 100644
--- a/indra/newview/skins/default/textures/icons/Progress_4.png
+++ b/indra/newview/skins/default/textures/icons/Progress_4.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_5.png b/indra/newview/skins/default/textures/icons/Progress_5.png
index ea64f1d907..3f02b8f31a 100644
--- a/indra/newview/skins/default/textures/icons/Progress_5.png
+++ b/indra/newview/skins/default/textures/icons/Progress_5.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_6.png b/indra/newview/skins/default/textures/icons/Progress_6.png
index fe4447935f..04c8f716d4 100644
--- a/indra/newview/skins/default/textures/icons/Progress_6.png
+++ b/indra/newview/skins/default/textures/icons/Progress_6.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_7.png b/indra/newview/skins/default/textures/icons/Progress_7.png
index 64fa294771..c96b4c08d6 100644
--- a/indra/newview/skins/default/textures/icons/Progress_7.png
+++ b/indra/newview/skins/default/textures/icons/Progress_7.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_8.png b/indra/newview/skins/default/textures/icons/Progress_8.png
index a1c9a7f2eb..9463f50707 100644
--- a/indra/newview/skins/default/textures/icons/Progress_8.png
+++ b/indra/newview/skins/default/textures/icons/Progress_8.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_9.png b/indra/newview/skins/default/textures/icons/Progress_9.png
index f3e9723184..928a3e934e 100644
--- a/indra/newview/skins/default/textures/icons/Progress_9.png
+++ b/indra/newview/skins/default/textures/icons/Progress_9.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Refresh_Off.png b/indra/newview/skins/default/textures/icons/Refresh_Off.png
index a8acfda741..e645a8159f 100644
--- a/indra/newview/skins/default/textures/icons/Refresh_Off.png
+++ b/indra/newview/skins/default/textures/icons/Refresh_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/SL_Logo.png b/indra/newview/skins/default/textures/icons/SL_Logo.png
index 5e376c72f9..1eafc304f5 100644
--- a/indra/newview/skins/default/textures/icons/SL_Logo.png
+++ b/indra/newview/skins/default/textures/icons/SL_Logo.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Search_Icon.png b/indra/newview/skins/default/textures/icons/Search_Icon.png
index 541aa8f52a..0ea7b14f81 100644
--- a/indra/newview/skins/default/textures/icons/Search_Icon.png
+++ b/indra/newview/skins/default/textures/icons/Search_Icon.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Shirt_Large.png b/indra/newview/skins/default/textures/icons/Shirt_Large.png
index 0f3846bccc..06fce6bbaa 100644
--- a/indra/newview/skins/default/textures/icons/Shirt_Large.png
+++ b/indra/newview/skins/default/textures/icons/Shirt_Large.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Shop.png b/indra/newview/skins/default/textures/icons/Shop.png
index 8977c49195..93353cf2fe 100644
--- a/indra/newview/skins/default/textures/icons/Shop.png
+++ b/indra/newview/skins/default/textures/icons/Shop.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/SkipBackward_Off.png b/indra/newview/skins/default/textures/icons/SkipBackward_Off.png
index 8fc10e6583..20fd2b8e22 100644
--- a/indra/newview/skins/default/textures/icons/SkipBackward_Off.png
+++ b/indra/newview/skins/default/textures/icons/SkipBackward_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/SkipForward_Off.png b/indra/newview/skins/default/textures/icons/SkipForward_Off.png
index 2892e3cfa9..30e28d3d31 100644
--- a/indra/newview/skins/default/textures/icons/SkipForward_Off.png
+++ b/indra/newview/skins/default/textures/icons/SkipForward_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/StopReload_Off.png b/indra/newview/skins/default/textures/icons/StopReload_Off.png
index 698569a540..500a81d715 100644
--- a/indra/newview/skins/default/textures/icons/StopReload_Off.png
+++ b/indra/newview/skins/default/textures/icons/StopReload_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/StopReload_Over.png b/indra/newview/skins/default/textures/icons/StopReload_Over.png
index 251b38630a..a065a37d14 100644
--- a/indra/newview/skins/default/textures/icons/StopReload_Over.png
+++ b/indra/newview/skins/default/textures/icons/StopReload_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Stop_Off.png b/indra/newview/skins/default/textures/icons/Stop_Off.png
index 3ee215d36f..2d00083e2e 100644
--- a/indra/newview/skins/default/textures/icons/Stop_Off.png
+++ b/indra/newview/skins/default/textures/icons/Stop_Off.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
index ca2e8def97..7b39e7cd6f 100644
--- a/indra/newview/skins/default/textures/icons/Sync_Disabled.png
+++ 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
index bc236c8b98..43c8707995 100644
--- a/indra/newview/skins/default/textures/icons/Sync_Enabled.png
+++ 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
index 624e556376..218edaa986 100644
--- a/indra/newview/skins/default/textures/icons/Sync_Progress_1.png
+++ 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
index 5769803b3f..23cb9d63c0 100644
--- a/indra/newview/skins/default/textures/icons/Sync_Progress_2.png
+++ 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
index 92d4bfb020..490826011a 100644
--- a/indra/newview/skins/default/textures/icons/Sync_Progress_3.png
+++ 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
index 6d43eb3a9f..de1c815e90 100644
--- a/indra/newview/skins/default/textures/icons/Sync_Progress_4.png
+++ 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
index 766d063c99..2897b37382 100644
--- a/indra/newview/skins/default/textures/icons/Sync_Progress_5.png
+++ 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
index dfe7f68b72..862410e9e4 100644
--- a/indra/newview/skins/default/textures/icons/Sync_Progress_6.png
+++ b/indra/newview/skins/default/textures/icons/Sync_Progress_6.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/System_Notification_Large.png b/indra/newview/skins/default/textures/icons/System_Notification_Large.png
index 434ce3e8b6..01c6e31f41 100644
--- a/indra/newview/skins/default/textures/icons/System_Notification_Large.png
+++ b/indra/newview/skins/default/textures/icons/System_Notification_Large.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/System_Notification_Small.png b/indra/newview/skins/default/textures/icons/System_Notification_Small.png
index 027a8446d8..69b823d852 100644
--- a/indra/newview/skins/default/textures/icons/System_Notification_Small.png
+++ b/indra/newview/skins/default/textures/icons/System_Notification_Small.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/TrashItem_Disabled.png b/indra/newview/skins/default/textures/icons/TrashItem_Disabled.png
index caaf45a99f..800d9434d2 100644
--- a/indra/newview/skins/default/textures/icons/TrashItem_Disabled.png
+++ b/indra/newview/skins/default/textures/icons/TrashItem_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/TrashItem_Off.png b/indra/newview/skins/default/textures/icons/TrashItem_Off.png
index bb64920ec4..0cbff4f1d7 100644
--- a/indra/newview/skins/default/textures/icons/TrashItem_Off.png
+++ b/indra/newview/skins/default/textures/icons/TrashItem_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/TrashItem_Press.png b/indra/newview/skins/default/textures/icons/TrashItem_Press.png
index c62f833d86..fac13226e7 100644
--- a/indra/newview/skins/default/textures/icons/TrashItem_Press.png
+++ b/indra/newview/skins/default/textures/icons/TrashItem_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/UnZoom_Off.png b/indra/newview/skins/default/textures/icons/UnZoom_Off.png
index c794113755..34ec3f5de8 100644
--- a/indra/newview/skins/default/textures/icons/UnZoom_Off.png
+++ b/indra/newview/skins/default/textures/icons/UnZoom_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/UpArrow_Off.png b/indra/newview/skins/default/textures/icons/UpArrow_Off.png
index 00015bce20..d5ddc353e7 100644
--- a/indra/newview/skins/default/textures/icons/UpArrow_Off.png
+++ b/indra/newview/skins/default/textures/icons/UpArrow_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Video_URL_Off.png b/indra/newview/skins/default/textures/icons/Video_URL_Off.png
index 40e5df7d81..d37a189645 100644
--- a/indra/newview/skins/default/textures/icons/Video_URL_Off.png
+++ b/indra/newview/skins/default/textures/icons/Video_URL_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/VoicePTT_Lvl1.png b/indra/newview/skins/default/textures/icons/VoicePTT_Lvl1.png
index cd18ae310d..3ad6a5ba5b 100644
--- a/indra/newview/skins/default/textures/icons/VoicePTT_Lvl1.png
+++ b/indra/newview/skins/default/textures/icons/VoicePTT_Lvl1.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/VoicePTT_Lvl2.png b/indra/newview/skins/default/textures/icons/VoicePTT_Lvl2.png
index b0ed6ee8eb..deae5cb989 100644
--- a/indra/newview/skins/default/textures/icons/VoicePTT_Lvl2.png
+++ b/indra/newview/skins/default/textures/icons/VoicePTT_Lvl2.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/VoicePTT_Lvl3.png b/indra/newview/skins/default/textures/icons/VoicePTT_Lvl3.png
index 14ec77b99a..a4a171bd81 100644
--- a/indra/newview/skins/default/textures/icons/VoicePTT_Lvl3.png
+++ b/indra/newview/skins/default/textures/icons/VoicePTT_Lvl3.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/VoicePTT_Off.png b/indra/newview/skins/default/textures/icons/VoicePTT_Off.png
index 48be51e9af..533663a4fa 100644
--- a/indra/newview/skins/default/textures/icons/VoicePTT_Off.png
+++ b/indra/newview/skins/default/textures/icons/VoicePTT_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/VoicePTT_On.png b/indra/newview/skins/default/textures/icons/VoicePTT_On.png
index be4881b64c..f673671082 100644
--- a/indra/newview/skins/default/textures/icons/VoicePTT_On.png
+++ b/indra/newview/skins/default/textures/icons/VoicePTT_On.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Web_Profile_Off.png b/indra/newview/skins/default/textures/icons/Web_Profile_Off.png
index 5716dd6d22..cf8f9c8f94 100644
--- a/indra/newview/skins/default/textures/icons/Web_Profile_Off.png
+++ b/indra/newview/skins/default/textures/icons/Web_Profile_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/YouAreHere_Badge.png b/indra/newview/skins/default/textures/icons/YouAreHere_Badge.png
index c057e9743d..ed1805c096 100644
--- a/indra/newview/skins/default/textures/icons/YouAreHere_Badge.png
+++ b/indra/newview/skins/default/textures/icons/YouAreHere_Badge.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Zoom_Off.png b/indra/newview/skins/default/textures/icons/Zoom_Off.png
index d096720c9c..833e608201 100644
--- a/indra/newview/skins/default/textures/icons/Zoom_Off.png
+++ b/indra/newview/skins/default/textures/icons/Zoom_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/add_icon.png b/indra/newview/skins/default/textures/icons/add_icon.png
index cb68ee8e16..daedd49933 100644
--- a/indra/newview/skins/default/textures/icons/add_icon.png
+++ b/indra/newview/skins/default/textures/icons/add_icon.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/back_arrow_off.png b/indra/newview/skins/default/textures/icons/back_arrow_off.png
index e7cea49d73..ab82dfc0a7 100644
--- a/indra/newview/skins/default/textures/icons/back_arrow_off.png
+++ b/indra/newview/skins/default/textures/icons/back_arrow_off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/back_arrow_over.png b/indra/newview/skins/default/textures/icons/back_arrow_over.png
index 4e5a93a25f..ad8c1f8d2c 100644
--- a/indra/newview/skins/default/textures/icons/back_arrow_over.png
+++ b/indra/newview/skins/default/textures/icons/back_arrow_over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/back_arrow_press.png b/indra/newview/skins/default/textures/icons/back_arrow_press.png
index 289b8c20e6..8aecc3d876 100644
--- a/indra/newview/skins/default/textures/icons/back_arrow_press.png
+++ b/indra/newview/skins/default/textures/icons/back_arrow_press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/check_mark.png b/indra/newview/skins/default/textures/icons/check_mark.png
index fefd202dec..5431dd31c8 100644
--- a/indra/newview/skins/default/textures/icons/check_mark.png
+++ b/indra/newview/skins/default/textures/icons/check_mark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/collapse_to_one_line.png b/indra/newview/skins/default/textures/icons/collapse_to_one_line.png
index d57144a645..3730924ad8 100644
--- a/indra/newview/skins/default/textures/icons/collapse_to_one_line.png
+++ b/indra/newview/skins/default/textures/icons/collapse_to_one_line.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/copy_clipboard.png b/indra/newview/skins/default/textures/icons/copy_clipboard.png
index bb1ceff1ce..c6f267e944 100644
--- a/indra/newview/skins/default/textures/icons/copy_clipboard.png
+++ b/indra/newview/skins/default/textures/icons/copy_clipboard.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/delete_icon.png b/indra/newview/skins/default/textures/icons/delete_icon.png
index 37ce374653..0700e52a8c 100644
--- a/indra/newview/skins/default/textures/icons/delete_icon.png
+++ b/indra/newview/skins/default/textures/icons/delete_icon.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/edit_mine.png b/indra/newview/skins/default/textures/icons/edit_mine.png
index a0bc7efd25..2fb10deba2 100644
--- a/indra/newview/skins/default/textures/icons/edit_mine.png
+++ b/indra/newview/skins/default/textures/icons/edit_mine.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/edit_theirs.png b/indra/newview/skins/default/textures/icons/edit_theirs.png
index ed36ad7cfc..586c08c181 100644
--- a/indra/newview/skins/default/textures/icons/edit_theirs.png
+++ b/indra/newview/skins/default/textures/icons/edit_theirs.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/emoji_picker_icon.png b/indra/newview/skins/default/textures/icons/emoji_picker_icon.png
index ad4f3fa63c..6c1a1a3c62 100644
--- a/indra/newview/skins/default/textures/icons/emoji_picker_icon.png
+++ b/indra/newview/skins/default/textures/icons/emoji_picker_icon.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/expand_one_liner.png b/indra/newview/skins/default/textures/icons/expand_one_liner.png
index 58b7d90131..0d1a60547a 100644
--- a/indra/newview/skins/default/textures/icons/expand_one_liner.png
+++ b/indra/newview/skins/default/textures/icons/expand_one_liner.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/file_upload.png b/indra/newview/skins/default/textures/icons/file_upload.png
index 58f2757136..52f75172c1 100644
--- a/indra/newview/skins/default/textures/icons/file_upload.png
+++ b/indra/newview/skins/default/textures/icons/file_upload.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/hand.png b/indra/newview/skins/default/textures/icons/hand.png
index 41b9600da6..d8ef2e22fa 100644
--- a/indra/newview/skins/default/textures/icons/hand.png
+++ b/indra/newview/skins/default/textures/icons/hand.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/map_placeholder.png b/indra/newview/skins/default/textures/icons/map_placeholder.png
index 31e457aa75..80e5deac7e 100644
--- a/indra/newview/skins/default/textures/icons/map_placeholder.png
+++ b/indra/newview/skins/default/textures/icons/map_placeholder.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/multi_folder_mode.png b/indra/newview/skins/default/textures/icons/multi_folder_mode.png
index 8cda3efc36..13762173a5 100644
--- a/indra/newview/skins/default/textures/icons/multi_folder_mode.png
+++ b/indra/newview/skins/default/textures/icons/multi_folder_mode.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/nearby_chat_icon.png b/indra/newview/skins/default/textures/icons/nearby_chat_icon.png
index 5ac4258b9d..c5f52f010e 100644
--- a/indra/newview/skins/default/textures/icons/nearby_chat_icon.png
+++ b/indra/newview/skins/default/textures/icons/nearby_chat_icon.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/object_icon.png b/indra/newview/skins/default/textures/icons/object_icon.png
index 223874e631..51bf0b0649 100644
--- a/indra/newview/skins/default/textures/icons/object_icon.png
+++ b/indra/newview/skins/default/textures/icons/object_icon.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/paste_clipboard.png b/indra/newview/skins/default/textures/icons/paste_clipboard.png
index e1589ab098..810e603ef0 100644
--- a/indra/newview/skins/default/textures/icons/paste_clipboard.png
+++ b/indra/newview/skins/default/textures/icons/paste_clipboard.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/pop_up_caution.png b/indra/newview/skins/default/textures/icons/pop_up_caution.png
index 8364bcc328..63b5cdfe83 100644
--- a/indra/newview/skins/default/textures/icons/pop_up_caution.png
+++ b/indra/newview/skins/default/textures/icons/pop_up_caution.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/profile_badge_beta.png b/indra/newview/skins/default/textures/icons/profile_badge_beta.png
index 7c8a723c47..e378eebf9a 100644
--- a/indra/newview/skins/default/textures/icons/profile_badge_beta.png
+++ b/indra/newview/skins/default/textures/icons/profile_badge_beta.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/profile_badge_beta_lifetime.png b/indra/newview/skins/default/textures/icons/profile_badge_beta_lifetime.png
index 7c38e9e2ae..f2fc8e0853 100644
--- a/indra/newview/skins/default/textures/icons/profile_badge_beta_lifetime.png
+++ b/indra/newview/skins/default/textures/icons/profile_badge_beta_lifetime.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/profile_badge_lifetime.png b/indra/newview/skins/default/textures/icons/profile_badge_lifetime.png
index 475edd080e..85b8e688b4 100644
--- a/indra/newview/skins/default/textures/icons/profile_badge_lifetime.png
+++ b/indra/newview/skins/default/textures/icons/profile_badge_lifetime.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/profile_badge_linden.png b/indra/newview/skins/default/textures/icons/profile_badge_linden.png
index 1b6ac03e86..6ff3a97fdc 100644
--- a/indra/newview/skins/default/textures/icons/profile_badge_linden.png
+++ b/indra/newview/skins/default/textures/icons/profile_badge_linden.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/profile_badge_pplus_lifetime.png b/indra/newview/skins/default/textures/icons/profile_badge_pplus_lifetime.png
index 4286995202..aebd10f4b3 100644
--- a/indra/newview/skins/default/textures/icons/profile_badge_pplus_lifetime.png
+++ b/indra/newview/skins/default/textures/icons/profile_badge_pplus_lifetime.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/profile_badge_premium_lifetime.png b/indra/newview/skins/default/textures/icons/profile_badge_premium_lifetime.png
index 47e93c4fac..06669bb228 100644
--- a/indra/newview/skins/default/textures/icons/profile_badge_premium_lifetime.png
+++ b/indra/newview/skins/default/textures/icons/profile_badge_premium_lifetime.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_off.png b/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_off.png
index 3a2ed399b2..331553492c 100644
--- a/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_off.png
+++ b/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_off_pressed.png b/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_off_pressed.png
index 789f59a491..e9e9c1b626 100644
--- a/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_off_pressed.png
+++ b/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_off_pressed.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_on.png b/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_on.png
index 4fb56c389c..4f5374d614 100644
--- a/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_on.png
+++ b/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_on.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_on_pressed.png b/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_on_pressed.png
index ae04a256a4..e8a64541ee 100644
--- a/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_on_pressed.png
+++ b/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_on_pressed.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/remove_icon.png b/indra/newview/skins/default/textures/icons/remove_icon.png
index 6e62ee33f4..0df57d6c64 100644
--- a/indra/newview/skins/default/textures/icons/remove_icon.png
+++ b/indra/newview/skins/default/textures/icons/remove_icon.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/see_me_online.png b/indra/newview/skins/default/textures/icons/see_me_online.png
index 52dc2ae74f..4059035b20 100644
--- a/indra/newview/skins/default/textures/icons/see_me_online.png
+++ b/indra/newview/skins/default/textures/icons/see_me_online.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/see_on_map.png b/indra/newview/skins/default/textures/icons/see_on_map.png
index 200e649818..c9e8d721af 100644
--- a/indra/newview/skins/default/textures/icons/see_on_map.png
+++ b/indra/newview/skins/default/textures/icons/see_on_map.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/single_folder_back.png b/indra/newview/skins/default/textures/icons/single_folder_back.png
index b614e9ef9b..4ccea718c6 100644
--- a/indra/newview/skins/default/textures/icons/single_folder_back.png
+++ b/indra/newview/skins/default/textures/icons/single_folder_back.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/single_folder_forward.png b/indra/newview/skins/default/textures/icons/single_folder_forward.png
index c7bee3522d..614ad18f48 100644
--- a/indra/newview/skins/default/textures/icons/single_folder_forward.png
+++ b/indra/newview/skins/default/textures/icons/single_folder_forward.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/single_folder_mode.png b/indra/newview/skins/default/textures/icons/single_folder_mode.png
index f70b754123..1382e8750b 100644
--- a/indra/newview/skins/default/textures/icons/single_folder_mode.png
+++ b/indra/newview/skins/default/textures/icons/single_folder_mode.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/single_folder_up.png b/indra/newview/skins/default/textures/icons/single_folder_up.png
index 651b2b1af1..55d55434d2 100644
--- a/indra/newview/skins/default/textures/icons/single_folder_up.png
+++ b/indra/newview/skins/default/textures/icons/single_folder_up.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/snapshot_icon.png b/indra/newview/skins/default/textures/icons/snapshot_icon.png
index 41d524678f..990a41e5b7 100644
--- a/indra/newview/skins/default/textures/icons/snapshot_icon.png
+++ b/indra/newview/skins/default/textures/icons/snapshot_icon.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/texture_icon.png b/indra/newview/skins/default/textures/icons/texture_icon.png
index 278760a5b0..e87ba4ba99 100644
--- a/indra/newview/skins/default/textures/icons/texture_icon.png
+++ b/indra/newview/skins/default/textures/icons/texture_icon.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/thumbnail_fallback_icon.png b/indra/newview/skins/default/textures/icons/thumbnail_fallback_icon.png
index 8d5ca624af..9199697375 100644
--- a/indra/newview/skins/default/textures/icons/thumbnail_fallback_icon.png
+++ b/indra/newview/skins/default/textures/icons/thumbnail_fallback_icon.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/unknown_icon.png b/indra/newview/skins/default/textures/icons/unknown_icon.png
index 8441d86596..9a4e7f8616 100644
--- a/indra/newview/skins/default/textures/icons/unknown_icon.png
+++ b/indra/newview/skins/default/textures/icons/unknown_icon.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Arrow_Down.png b/indra/newview/skins/default/textures/widgets/Arrow_Down.png
index cb4eea953c..8b592ed840 100644
--- a/indra/newview/skins/default/textures/widgets/Arrow_Down.png
+++ b/indra/newview/skins/default/textures/widgets/Arrow_Down.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Arrow_Left.png b/indra/newview/skins/default/textures/widgets/Arrow_Left.png
index a424282839..04416541b9 100644
--- a/indra/newview/skins/default/textures/widgets/Arrow_Left.png
+++ b/indra/newview/skins/default/textures/widgets/Arrow_Left.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Arrow_Right.png b/indra/newview/skins/default/textures/widgets/Arrow_Right.png
index e32bee8f34..e57452a558 100644
--- a/indra/newview/skins/default/textures/widgets/Arrow_Right.png
+++ b/indra/newview/skins/default/textures/widgets/Arrow_Right.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Arrow_Small_Left.png b/indra/newview/skins/default/textures/widgets/Arrow_Small_Left.png
index 2d624c3779..a1b82d5101 100644
--- a/indra/newview/skins/default/textures/widgets/Arrow_Small_Left.png
+++ b/indra/newview/skins/default/textures/widgets/Arrow_Small_Left.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Arrow_Small_Right.png b/indra/newview/skins/default/textures/widgets/Arrow_Small_Right.png
index 91c03c426e..0e05d76852 100644
--- a/indra/newview/skins/default/textures/widgets/Arrow_Small_Right.png
+++ b/indra/newview/skins/default/textures/widgets/Arrow_Small_Right.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Arrow_Small_Up.png b/indra/newview/skins/default/textures/widgets/Arrow_Small_Up.png
index 38aac0e5ca..348bc4c019 100644
--- a/indra/newview/skins/default/textures/widgets/Arrow_Small_Up.png
+++ b/indra/newview/skins/default/textures/widgets/Arrow_Small_Up.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Arrow_Up.png b/indra/newview/skins/default/textures/widgets/Arrow_Up.png
index 48df69d82e..8b3da09d79 100644
--- a/indra/newview/skins/default/textures/widgets/Arrow_Up.png
+++ b/indra/newview/skins/default/textures/widgets/Arrow_Up.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Badge_Background.png b/indra/newview/skins/default/textures/widgets/Badge_Background.png
index 5089c30312..5abc1bf489 100644
--- a/indra/newview/skins/default/textures/widgets/Badge_Background.png
+++ 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
index 4b086a63fb..57d3be2320 100644
--- a/indra/newview/skins/default/textures/widgets/Badge_Border.png
+++ b/indra/newview/skins/default/textures/widgets/Badge_Border.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Disabled.png b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Disabled.png
index 3897e16801..139d71ae2e 100644
--- a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Disabled.png
+++ b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Off.png b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Off.png
index 95a4a36c9d..24bcfc4524 100644
--- a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Off.png
+++ b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Over.png b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Over.png
index 20d1ebf53d..ca7ff3687a 100644
--- a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Over.png
+++ b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Press.png b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Press.png
index 63f4b503e2..6ae73ffcdd 100644
--- a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Press.png
+++ b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Disabled.png b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Disabled.png
index d570f77f6d..2cf3de24c0 100644
--- a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Disabled.png
+++ b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Off.png b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Off.png
index 28a002b118..0147c4b9a7 100644
--- a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Off.png
+++ b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Over.png b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Over.png
index a195e80b0e..497642a620 100644
--- a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Over.png
+++ b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Press.png b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Press.png
index 9863ee32cb..7bfe8e5d8d 100644
--- a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Press.png
+++ b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Disabled.png b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Disabled.png
index 2ffbc4a16f..d9c9692114 100644
--- a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Disabled.png
+++ b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Off.png b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Off.png
index ce47da169b..dbf133cea6 100644
--- a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Off.png
+++ b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Over.png b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Over.png
index 2225150983..f7990c37ae 100644
--- a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Over.png
+++ b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Press.png b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Press.png
index 2d541d0f70..71da02ae1d 100644
--- a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Press.png
+++ b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_Disabled.png b/indra/newview/skins/default/textures/widgets/Checkbox_Disabled.png
index c1ee210099..8439f82e29 100644
--- a/indra/newview/skins/default/textures/widgets/Checkbox_Disabled.png
+++ b/indra/newview/skins/default/textures/widgets/Checkbox_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_Off.png b/indra/newview/skins/default/textures/widgets/Checkbox_Off.png
index 2525405f37..cb9a04d84f 100644
--- a/indra/newview/skins/default/textures/widgets/Checkbox_Off.png
+++ b/indra/newview/skins/default/textures/widgets/Checkbox_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_On.png b/indra/newview/skins/default/textures/widgets/Checkbox_On.png
index 2d9dba1592..0ec090504a 100644
--- a/indra/newview/skins/default/textures/widgets/Checkbox_On.png
+++ b/indra/newview/skins/default/textures/widgets/Checkbox_On.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_On_Disabled.png b/indra/newview/skins/default/textures/widgets/Checkbox_On_Disabled.png
index beaa7bcbf6..5759f7de69 100644
--- a/indra/newview/skins/default/textures/widgets/Checkbox_On_Disabled.png
+++ b/indra/newview/skins/default/textures/widgets/Checkbox_On_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_On_Press.png b/indra/newview/skins/default/textures/widgets/Checkbox_On_Press.png
index 5bced95a89..ba46e91c55 100644
--- a/indra/newview/skins/default/textures/widgets/Checkbox_On_Press.png
+++ b/indra/newview/skins/default/textures/widgets/Checkbox_On_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_Press.png b/indra/newview/skins/default/textures/widgets/Checkbox_Press.png
index 44be193678..5f5a33d878 100644
--- a/indra/newview/skins/default/textures/widgets/Checkbox_Press.png
+++ b/indra/newview/skins/default/textures/widgets/Checkbox_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_Disabled.png b/indra/newview/skins/default/textures/widgets/ComboButton_Disabled.png
index d0fff1b3c3..ebeb813349 100644
--- a/indra/newview/skins/default/textures/widgets/ComboButton_Disabled.png
+++ b/indra/newview/skins/default/textures/widgets/ComboButton_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_Hover.png b/indra/newview/skins/default/textures/widgets/ComboButton_Hover.png
index d492b30b40..1377d35e1a 100644
--- a/indra/newview/skins/default/textures/widgets/ComboButton_Hover.png
+++ b/indra/newview/skins/default/textures/widgets/ComboButton_Hover.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_Off.png b/indra/newview/skins/default/textures/widgets/ComboButton_Off.png
index 80402458b7..4f573cf6fa 100644
--- a/indra/newview/skins/default/textures/widgets/ComboButton_Off.png
+++ b/indra/newview/skins/default/textures/widgets/ComboButton_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_On.png b/indra/newview/skins/default/textures/widgets/ComboButton_On.png
index b42cc7542e..2739cb4684 100644
--- a/indra/newview/skins/default/textures/widgets/ComboButton_On.png
+++ b/indra/newview/skins/default/textures/widgets/ComboButton_On.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_Selected.png b/indra/newview/skins/default/textures/widgets/ComboButton_Selected.png
index bbc0657487..1a834bfbbc 100644
--- a/indra/newview/skins/default/textures/widgets/ComboButton_Selected.png
+++ b/indra/newview/skins/default/textures/widgets/ComboButton_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_UpOff.png b/indra/newview/skins/default/textures/widgets/ComboButton_UpOff.png
index 2330cb420b..5a067aca7c 100644
--- a/indra/newview/skins/default/textures/widgets/ComboButton_UpOff.png
+++ b/indra/newview/skins/default/textures/widgets/ComboButton_UpOff.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_UpSelected.png b/indra/newview/skins/default/textures/widgets/ComboButton_UpSelected.png
index b7b5c2e1d4..ff56367147 100644
--- a/indra/newview/skins/default/textures/widgets/ComboButton_UpSelected.png
+++ b/indra/newview/skins/default/textures/widgets/ComboButton_UpSelected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/DisclosureArrow_Opened_Off.png b/indra/newview/skins/default/textures/widgets/DisclosureArrow_Opened_Off.png
index 75057938d2..115ec7a11f 100644
--- a/indra/newview/skins/default/textures/widgets/DisclosureArrow_Opened_Off.png
+++ b/indra/newview/skins/default/textures/widgets/DisclosureArrow_Opened_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/DropDown_Disabled.png b/indra/newview/skins/default/textures/widgets/DropDown_Disabled.png
index b295752ea9..9a69f7e0d9 100644
--- a/indra/newview/skins/default/textures/widgets/DropDown_Disabled.png
+++ b/indra/newview/skins/default/textures/widgets/DropDown_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/DropDown_Off.png b/indra/newview/skins/default/textures/widgets/DropDown_Off.png
index 4764ed4ee2..b118e7a7d4 100644
--- a/indra/newview/skins/default/textures/widgets/DropDown_Off.png
+++ b/indra/newview/skins/default/textures/widgets/DropDown_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/DropDown_On.png b/indra/newview/skins/default/textures/widgets/DropDown_On.png
index 10262d3979..613a8c2ff6 100644
--- a/indra/newview/skins/default/textures/widgets/DropDown_On.png
+++ b/indra/newview/skins/default/textures/widgets/DropDown_On.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/DropDown_Press.png b/indra/newview/skins/default/textures/widgets/DropDown_Press.png
index 16cb25cc77..fa3a152df1 100644
--- a/indra/newview/skins/default/textures/widgets/DropDown_Press.png
+++ b/indra/newview/skins/default/textures/widgets/DropDown_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/DropTarget.png b/indra/newview/skins/default/textures/widgets/DropTarget.png
index 3740c98cbc..01e7a88861 100644
--- a/indra/newview/skins/default/textures/widgets/DropTarget.png
+++ b/indra/newview/skins/default/textures/widgets/DropTarget.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Error_Tag_Background.png b/indra/newview/skins/default/textures/widgets/Error_Tag_Background.png
index c8dbc8e87a..439fce3dd3 100644
--- a/indra/newview/skins/default/textures/widgets/Error_Tag_Background.png
+++ b/indra/newview/skins/default/textures/widgets/Error_Tag_Background.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Linden_Dollar_Alert.png b/indra/newview/skins/default/textures/widgets/Linden_Dollar_Alert.png
index a1f21e8194..3b3f276e6d 100644
--- a/indra/newview/skins/default/textures/widgets/Linden_Dollar_Alert.png
+++ b/indra/newview/skins/default/textures/widgets/Linden_Dollar_Alert.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Linden_Dollar_Background.png b/indra/newview/skins/default/textures/widgets/Linden_Dollar_Background.png
index 61f9b076ce..ba4ab2d0c9 100644
--- a/indra/newview/skins/default/textures/widgets/Linden_Dollar_Background.png
+++ b/indra/newview/skins/default/textures/widgets/Linden_Dollar_Background.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ListItem_Over.png b/indra/newview/skins/default/textures/widgets/ListItem_Over.png
index 4b2b9ab3e5..e72c1c4020 100644
--- a/indra/newview/skins/default/textures/widgets/ListItem_Over.png
+++ b/indra/newview/skins/default/textures/widgets/ListItem_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ListItem_Select.png b/indra/newview/skins/default/textures/widgets/ListItem_Select.png
index 317c672441..0e16a8b454 100644
--- a/indra/newview/skins/default/textures/widgets/ListItem_Select.png
+++ b/indra/newview/skins/default/textures/widgets/ListItem_Select.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
index e603c44384..de71f763d3 100644
--- a/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Off.png
+++ 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
index fbc164123f..8bfa3acb42 100644
--- a/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Selected.png
+++ b/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Marketplace_Dropzone_Background.png b/indra/newview/skins/default/textures/widgets/Marketplace_Dropzone_Background.png
index 9478f7b813..9eb4a5c55d 100644
--- a/indra/newview/skins/default/textures/widgets/Marketplace_Dropzone_Background.png
+++ b/indra/newview/skins/default/textures/widgets/Marketplace_Dropzone_Background.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/New_Tag_Background.png b/indra/newview/skins/default/textures/widgets/New_Tag_Background.png
index cd639dd80f..3631d90825 100644
--- a/indra/newview/skins/default/textures/widgets/New_Tag_Background.png
+++ b/indra/newview/skins/default/textures/widgets/New_Tag_Background.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/New_Tag_Border.png b/indra/newview/skins/default/textures/widgets/New_Tag_Border.png
index 56df0d0127..d9b78eeea4 100644
--- a/indra/newview/skins/default/textures/widgets/New_Tag_Border.png
+++ b/indra/newview/skins/default/textures/widgets/New_Tag_Border.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ProgressBar.png b/indra/newview/skins/default/textures/widgets/ProgressBar.png
index 3f0e4eba28..4d0d123987 100644
--- a/indra/newview/skins/default/textures/widgets/ProgressBar.png
+++ b/indra/newview/skins/default/textures/widgets/ProgressBar.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ProgressBarSolid.png b/indra/newview/skins/default/textures/widgets/ProgressBarSolid.png
index ec0926bfa1..59a798464d 100644
--- a/indra/newview/skins/default/textures/widgets/ProgressBarSolid.png
+++ b/indra/newview/skins/default/textures/widgets/ProgressBarSolid.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ProgressTrack.png b/indra/newview/skins/default/textures/widgets/ProgressTrack.png
index bb6d9f4144..f4be9f5ccd 100644
--- a/indra/newview/skins/default/textures/widgets/ProgressTrack.png
+++ b/indra/newview/skins/default/textures/widgets/ProgressTrack.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Disabled.png b/indra/newview/skins/default/textures/widgets/PushButton_Disabled.png
index 04e91bdaab..e99ec4b14b 100644
--- a/indra/newview/skins/default/textures/widgets/PushButton_Disabled.png
+++ b/indra/newview/skins/default/textures/widgets/PushButton_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Login.png b/indra/newview/skins/default/textures/widgets/PushButton_Login.png
index 6f8b5a0770..8e7d932ab1 100644
--- a/indra/newview/skins/default/textures/widgets/PushButton_Login.png
+++ b/indra/newview/skins/default/textures/widgets/PushButton_Login.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Login_Over.png b/indra/newview/skins/default/textures/widgets/PushButton_Login_Over.png
index e9e8af13d4..038ba23be2 100644
--- a/indra/newview/skins/default/textures/widgets/PushButton_Login_Over.png
+++ b/indra/newview/skins/default/textures/widgets/PushButton_Login_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Login_Pressed.png b/indra/newview/skins/default/textures/widgets/PushButton_Login_Pressed.png
index 4a9f1052b3..828aa1a139 100644
--- a/indra/newview/skins/default/textures/widgets/PushButton_Login_Pressed.png
+++ b/indra/newview/skins/default/textures/widgets/PushButton_Login_Pressed.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Off.png b/indra/newview/skins/default/textures/widgets/PushButton_Off.png
index 1ee0329e66..29eeed7c78 100644
--- a/indra/newview/skins/default/textures/widgets/PushButton_Off.png
+++ b/indra/newview/skins/default/textures/widgets/PushButton_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/PushButton_On.png b/indra/newview/skins/default/textures/widgets/PushButton_On.png
index 661d1c5611..65d92a9d82 100644
--- a/indra/newview/skins/default/textures/widgets/PushButton_On.png
+++ b/indra/newview/skins/default/textures/widgets/PushButton_On.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/PushButton_On_Selected.png b/indra/newview/skins/default/textures/widgets/PushButton_On_Selected.png
index 48e8aa2eab..8588576fb0 100644
--- a/indra/newview/skins/default/textures/widgets/PushButton_On_Selected.png
+++ b/indra/newview/skins/default/textures/widgets/PushButton_On_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Over.png b/indra/newview/skins/default/textures/widgets/PushButton_Over.png
index c227f07513..819f27c0ba 100644
--- a/indra/newview/skins/default/textures/widgets/PushButton_Over.png
+++ b/indra/newview/skins/default/textures/widgets/PushButton_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Press.png b/indra/newview/skins/default/textures/widgets/PushButton_Press.png
index 0a4a3a6ad9..b0a92d8ffe 100644
--- a/indra/newview/skins/default/textures/widgets/PushButton_Press.png
+++ b/indra/newview/skins/default/textures/widgets/PushButton_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Selected.png b/indra/newview/skins/default/textures/widgets/PushButton_Selected.png
index 0a4a3a6ad9..b0a92d8ffe 100644
--- a/indra/newview/skins/default/textures/widgets/PushButton_Selected.png
+++ b/indra/newview/skins/default/textures/widgets/PushButton_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Selected_Disabled.png b/indra/newview/skins/default/textures/widgets/PushButton_Selected_Disabled.png
index 661d1c5611..65d92a9d82 100644
--- a/indra/newview/skins/default/textures/widgets/PushButton_Selected_Disabled.png
+++ b/indra/newview/skins/default/textures/widgets/PushButton_Selected_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Selected_Press.png b/indra/newview/skins/default/textures/widgets/PushButton_Selected_Press.png
index 48e8aa2eab..8588576fb0 100644
--- a/indra/newview/skins/default/textures/widgets/PushButton_Selected_Press.png
+++ b/indra/newview/skins/default/textures/widgets/PushButton_Selected_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_Disabled.png b/indra/newview/skins/default/textures/widgets/RadioButton_Disabled.png
index a1052684b9..32ec25fe0e 100644
--- a/indra/newview/skins/default/textures/widgets/RadioButton_Disabled.png
+++ b/indra/newview/skins/default/textures/widgets/RadioButton_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_Off.png b/indra/newview/skins/default/textures/widgets/RadioButton_Off.png
index c58e0305ef..5d267af5dc 100644
--- a/indra/newview/skins/default/textures/widgets/RadioButton_Off.png
+++ b/indra/newview/skins/default/textures/widgets/RadioButton_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_On.png b/indra/newview/skins/default/textures/widgets/RadioButton_On.png
index c09a2197c7..e6bf0db157 100644
--- a/indra/newview/skins/default/textures/widgets/RadioButton_On.png
+++ b/indra/newview/skins/default/textures/widgets/RadioButton_On.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_On_Disabled.png b/indra/newview/skins/default/textures/widgets/RadioButton_On_Disabled.png
index d7d444fd0c..72aae43618 100644
--- a/indra/newview/skins/default/textures/widgets/RadioButton_On_Disabled.png
+++ b/indra/newview/skins/default/textures/widgets/RadioButton_On_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_On_Press.png b/indra/newview/skins/default/textures/widgets/RadioButton_On_Press.png
index a707e8ceb8..f3883b82b3 100644
--- a/indra/newview/skins/default/textures/widgets/RadioButton_On_Press.png
+++ b/indra/newview/skins/default/textures/widgets/RadioButton_On_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_Press.png b/indra/newview/skins/default/textures/widgets/RadioButton_Press.png
index 33eaa14030..0025256045 100644
--- a/indra/newview/skins/default/textures/widgets/RadioButton_Press.png
+++ b/indra/newview/skins/default/textures/widgets/RadioButton_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Down.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Down.png
index 186822da43..768909d447 100644
--- a/indra/newview/skins/default/textures/widgets/ScrollArrow_Down.png
+++ b/indra/newview/skins/default/textures/widgets/ScrollArrow_Down.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Down_Opaque.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Down_Opaque.png
index a396380fb2..1c57521e9e 100644
--- a/indra/newview/skins/default/textures/widgets/ScrollArrow_Down_Opaque.png
+++ b/indra/newview/skins/default/textures/widgets/ScrollArrow_Down_Opaque.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Down_Over_Opaque.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Down_Over_Opaque.png
index 9568dea78a..3db7be9ffa 100644
--- a/indra/newview/skins/default/textures/widgets/ScrollArrow_Down_Over_Opaque.png
+++ b/indra/newview/skins/default/textures/widgets/ScrollArrow_Down_Over_Opaque.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Left.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Left.png
index 42f999a451..9ef73f48a5 100644
--- a/indra/newview/skins/default/textures/widgets/ScrollArrow_Left.png
+++ b/indra/newview/skins/default/textures/widgets/ScrollArrow_Left.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Left_Opaque.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Left_Opaque.png
index 549b3980f6..0fb0671036 100644
--- a/indra/newview/skins/default/textures/widgets/ScrollArrow_Left_Opaque.png
+++ b/indra/newview/skins/default/textures/widgets/ScrollArrow_Left_Opaque.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Left_Over_Opaque.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Left_Over_Opaque.png
index a74abd5d8a..464130c359 100644
--- a/indra/newview/skins/default/textures/widgets/ScrollArrow_Left_Over_Opaque.png
+++ b/indra/newview/skins/default/textures/widgets/ScrollArrow_Left_Over_Opaque.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Right.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Right.png
index 176ffcdbb9..8a59274b8a 100644
--- a/indra/newview/skins/default/textures/widgets/ScrollArrow_Right.png
+++ b/indra/newview/skins/default/textures/widgets/ScrollArrow_Right.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Right_Opaque.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Right_Opaque.png
index 36056d0ad9..ab1f1ac90b 100644
--- a/indra/newview/skins/default/textures/widgets/ScrollArrow_Right_Opaque.png
+++ b/indra/newview/skins/default/textures/widgets/ScrollArrow_Right_Opaque.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Right_Over_Opaque.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Right_Over_Opaque.png
index 0c1fd6956b..e5a94429a3 100644
--- a/indra/newview/skins/default/textures/widgets/ScrollArrow_Right_Over_Opaque.png
+++ b/indra/newview/skins/default/textures/widgets/ScrollArrow_Right_Over_Opaque.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Up.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Up.png
index 4d245eb57a..064580f0c8 100644
--- a/indra/newview/skins/default/textures/widgets/ScrollArrow_Up.png
+++ b/indra/newview/skins/default/textures/widgets/ScrollArrow_Up.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Up_Opaque.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Up_Opaque.png
index 67a7a5568b..2cc4857d27 100644
--- a/indra/newview/skins/default/textures/widgets/ScrollArrow_Up_Opaque.png
+++ b/indra/newview/skins/default/textures/widgets/ScrollArrow_Up_Opaque.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Up_Over_Opaque.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Up_Over_Opaque.png
index 0cc8c4404b..2018b53af9 100644
--- a/indra/newview/skins/default/textures/widgets/ScrollArrow_Up_Over_Opaque.png
+++ b/indra/newview/skins/default/textures/widgets/ScrollArrow_Up_Over_Opaque.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz.png b/indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz.png
index 8a085aa966..9afc907c1c 100644
--- a/indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz.png
+++ b/indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollThumb_Vert.png b/indra/newview/skins/default/textures/widgets/ScrollThumb_Vert.png
index fc7fd93e7a..ede643e528 100644
--- a/indra/newview/skins/default/textures/widgets/ScrollThumb_Vert.png
+++ b/indra/newview/skins/default/textures/widgets/ScrollThumb_Vert.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollTrack_Horiz.png b/indra/newview/skins/default/textures/widgets/ScrollTrack_Horiz.png
index 4f31c48c02..35da770073 100644
--- a/indra/newview/skins/default/textures/widgets/ScrollTrack_Horiz.png
+++ b/indra/newview/skins/default/textures/widgets/ScrollTrack_Horiz.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollTrack_Vert.png b/indra/newview/skins/default/textures/widgets/ScrollTrack_Vert.png
index f89ee3f68f..cf67c23133 100644
--- a/indra/newview/skins/default/textures/widgets/ScrollTrack_Vert.png
+++ b/indra/newview/skins/default/textures/widgets/ScrollTrack_Vert.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Disabled.png
index 3b39c51a77..ba63751690 100644
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Disabled.png
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Off.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Off.png
index 57ed79d733..1a9f7e9d71 100644
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Off.png
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Over.png
index 5b8878e0cb..e4fcf491ba 100644
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Over.png
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Press.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Press.png
index 379953216b..dbe6651dc8 100644
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Press.png
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected.png
index 379953216b..dbe6651dc8 100644
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected.png
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Disabled.png
index 77c4224539..300a7d73cd 100644
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Disabled.png
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Over.png
index 8b93dd551e..c7ee699210 100644
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Over.png
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Press.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Press.png
index 3f207cbea2..f9cb95ff4b 100644
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Press.png
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Disabled.png
index deb87c8489..d9f05d33ec 100644
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Disabled.png
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected.png
index ca7027da91..d2342f6538 100644
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected.png
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Disabled.png
index 220df9db25..6223ad8dfe 100644
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Disabled.png
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Press.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Press.png
index dde367f05e..101d5a0930 100644
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Press.png
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Disabled.png
index 8e6b9c8c6f..ecd2144d6d 100644
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Disabled.png
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Off.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Off.png
index b1521199ff..1901d5e843 100644
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Off.png
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Selected.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Selected.png
index 1574f48b28..fd1dd4207c 100644
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Selected.png
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Over.png
index 2717e7d7b0..534c30cddc 100644
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Over.png
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Press.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Press.png
index 3883518033..a97612ce2f 100644
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Press.png
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected.png
index 3883518033..a97612ce2f 100644
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected.png
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Disabled.png
index ab31f6ded7..fdf09e920d 100644
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Disabled.png
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Press.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Press.png
index 1574f48b28..144d23cc6c 100644
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Press.png
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SliderThumb_Disabled.png b/indra/newview/skins/default/textures/widgets/SliderThumb_Disabled.png
index 8888e134d1..5cfa3ae4e1 100644
--- a/indra/newview/skins/default/textures/widgets/SliderThumb_Disabled.png
+++ b/indra/newview/skins/default/textures/widgets/SliderThumb_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SliderThumb_Off.png b/indra/newview/skins/default/textures/widgets/SliderThumb_Off.png
index b627232012..66cdcbeb94 100644
--- a/indra/newview/skins/default/textures/widgets/SliderThumb_Off.png
+++ b/indra/newview/skins/default/textures/widgets/SliderThumb_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SliderThumb_Press.png b/indra/newview/skins/default/textures/widgets/SliderThumb_Press.png
index 7081f9cfe0..0bf8e43e81 100644
--- a/indra/newview/skins/default/textures/widgets/SliderThumb_Press.png
+++ b/indra/newview/skins/default/textures/widgets/SliderThumb_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SliderTrack_Horiz.png b/indra/newview/skins/default/textures/widgets/SliderTrack_Horiz.png
index 232006ee5a..720830f83f 100644
--- a/indra/newview/skins/default/textures/widgets/SliderTrack_Horiz.png
+++ b/indra/newview/skins/default/textures/widgets/SliderTrack_Horiz.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SliderTrack_Vert.png b/indra/newview/skins/default/textures/widgets/SliderTrack_Vert.png
index cd002b3973..c01db44707 100644
--- a/indra/newview/skins/default/textures/widgets/SliderTrack_Vert.png
+++ b/indra/newview/skins/default/textures/widgets/SliderTrack_Vert.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Down_Off.png b/indra/newview/skins/default/textures/widgets/Stepper_Down_Off.png
index cf0d8ee2c1..51d269bd45 100644
--- a/indra/newview/skins/default/textures/widgets/Stepper_Down_Off.png
+++ b/indra/newview/skins/default/textures/widgets/Stepper_Down_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Down_Press.png b/indra/newview/skins/default/textures/widgets/Stepper_Down_Press.png
index fe3a7beafd..b4f19b7dbb 100644
--- a/indra/newview/skins/default/textures/widgets/Stepper_Down_Press.png
+++ b/indra/newview/skins/default/textures/widgets/Stepper_Down_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Up_Off.png b/indra/newview/skins/default/textures/widgets/Stepper_Up_Off.png
index 133589b8a6..a01d928aef 100644
--- a/indra/newview/skins/default/textures/widgets/Stepper_Up_Off.png
+++ b/indra/newview/skins/default/textures/widgets/Stepper_Up_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Up_Press.png b/indra/newview/skins/default/textures/widgets/Stepper_Up_Press.png
index e83babc519..d5b672d943 100644
--- a/indra/newview/skins/default/textures/widgets/Stepper_Up_Press.png
+++ b/indra/newview/skins/default/textures/widgets/Stepper_Up_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/TextField_Active.png b/indra/newview/skins/default/textures/widgets/TextField_Active.png
index ca6daab4e0..9eb5b6a36e 100644
--- a/indra/newview/skins/default/textures/widgets/TextField_Active.png
+++ b/indra/newview/skins/default/textures/widgets/TextField_Active.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/TextField_Disabled.png b/indra/newview/skins/default/textures/widgets/TextField_Disabled.png
index 3d205a3f2e..3b1ac6b9ed 100644
--- a/indra/newview/skins/default/textures/widgets/TextField_Disabled.png
+++ b/indra/newview/skins/default/textures/widgets/TextField_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/TextField_Off.png b/indra/newview/skins/default/textures/widgets/TextField_Off.png
index 911d907acc..afe091d613 100644
--- a/indra/newview/skins/default/textures/widgets/TextField_Off.png
+++ b/indra/newview/skins/default/textures/widgets/TextField_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/TextField_Search_Active.png b/indra/newview/skins/default/textures/widgets/TextField_Search_Active.png
index fa79cb6260..572535f1ab 100644
--- a/indra/newview/skins/default/textures/widgets/TextField_Search_Active.png
+++ b/indra/newview/skins/default/textures/widgets/TextField_Search_Active.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/TextField_Search_Disabled.png b/indra/newview/skins/default/textures/widgets/TextField_Search_Disabled.png
index 8b504af101..94b4b158f7 100644
--- a/indra/newview/skins/default/textures/widgets/TextField_Search_Disabled.png
+++ b/indra/newview/skins/default/textures/widgets/TextField_Search_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/TextField_Search_Highlight.png b/indra/newview/skins/default/textures/widgets/TextField_Search_Highlight.png
index e3944289c6..7768da04e8 100644
--- a/indra/newview/skins/default/textures/widgets/TextField_Search_Highlight.png
+++ b/indra/newview/skins/default/textures/widgets/TextField_Search_Highlight.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/TextField_Search_Off.png b/indra/newview/skins/default/textures/widgets/TextField_Search_Off.png
index 862b13d219..fccd38c807 100644
--- a/indra/newview/skins/default/textures/widgets/TextField_Search_Off.png
+++ b/indra/newview/skins/default/textures/widgets/TextField_Search_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Tooltip.png b/indra/newview/skins/default/textures/widgets/Tooltip.png
index 3c4d6a965d..1be53bdaa2 100644
--- a/indra/newview/skins/default/textures/widgets/Tooltip.png
+++ b/indra/newview/skins/default/textures/widgets/Tooltip.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/bevel_background.png b/indra/newview/skins/default/textures/widgets/bevel_background.png
index fb5067503d..6304124aec 100644
--- a/indra/newview/skins/default/textures/widgets/bevel_background.png
+++ b/indra/newview/skins/default/textures/widgets/bevel_background.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/buy_off.png b/indra/newview/skins/default/textures/widgets/buy_off.png
index ee5979046f..7af02357ac 100644
--- a/indra/newview/skins/default/textures/widgets/buy_off.png
+++ b/indra/newview/skins/default/textures/widgets/buy_off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/buy_over.png b/indra/newview/skins/default/textures/widgets/buy_over.png
index 93adb68c86..5dafd9f47e 100644
--- a/indra/newview/skins/default/textures/widgets/buy_over.png
+++ b/indra/newview/skins/default/textures/widgets/buy_over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/buy_press.png b/indra/newview/skins/default/textures/widgets/buy_press.png
index 3f442d6eaa..83db005fd7 100644
--- a/indra/newview/skins/default/textures/widgets/buy_press.png
+++ b/indra/newview/skins/default/textures/widgets/buy_press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/horizontal_drag_handle.png b/indra/newview/skins/default/textures/widgets/horizontal_drag_handle.png
index 5f5a33be42..631d653968 100644
--- a/indra/newview/skins/default/textures/widgets/horizontal_drag_handle.png
+++ b/indra/newview/skins/default/textures/widgets/horizontal_drag_handle.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/jump_left_in.png b/indra/newview/skins/default/textures/widgets/jump_left_in.png
index a1425ccfa0..073606628c 100644
--- a/indra/newview/skins/default/textures/widgets/jump_left_in.png
+++ b/indra/newview/skins/default/textures/widgets/jump_left_in.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/jump_left_out.png b/indra/newview/skins/default/textures/widgets/jump_left_out.png
index 38edf47d19..71d5c5c36a 100644
--- a/indra/newview/skins/default/textures/widgets/jump_left_out.png
+++ b/indra/newview/skins/default/textures/widgets/jump_left_out.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/jump_right_in.png b/indra/newview/skins/default/textures/widgets/jump_right_in.png
index 39359ab2e2..96f8501932 100644
--- a/indra/newview/skins/default/textures/widgets/jump_right_in.png
+++ b/indra/newview/skins/default/textures/widgets/jump_right_in.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/jump_right_out.png b/indra/newview/skins/default/textures/widgets/jump_right_out.png
index 3f76bbffac..9c02f5f649 100644
--- a/indra/newview/skins/default/textures/widgets/jump_right_out.png
+++ b/indra/newview/skins/default/textures/widgets/jump_right_out.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/track_control_moon_back.png b/indra/newview/skins/default/textures/widgets/track_control_moon_back.png
index 30f538d35b..03d1e805e1 100644
--- a/indra/newview/skins/default/textures/widgets/track_control_moon_back.png
+++ b/indra/newview/skins/default/textures/widgets/track_control_moon_back.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/track_control_moon_front.png b/indra/newview/skins/default/textures/widgets/track_control_moon_front.png
index d3882c5e4c..cdc52fe08a 100644
--- a/indra/newview/skins/default/textures/widgets/track_control_moon_front.png
+++ b/indra/newview/skins/default/textures/widgets/track_control_moon_front.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/track_control_rotate_bottom.png b/indra/newview/skins/default/textures/widgets/track_control_rotate_bottom.png
index 232c812aae..c08b54c269 100644
--- a/indra/newview/skins/default/textures/widgets/track_control_rotate_bottom.png
+++ b/indra/newview/skins/default/textures/widgets/track_control_rotate_bottom.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/track_control_rotate_bottom_active.png b/indra/newview/skins/default/textures/widgets/track_control_rotate_bottom_active.png
index 911618b08e..a2b37d1b43 100644
--- a/indra/newview/skins/default/textures/widgets/track_control_rotate_bottom_active.png
+++ b/indra/newview/skins/default/textures/widgets/track_control_rotate_bottom_active.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/track_control_rotate_left_side.png b/indra/newview/skins/default/textures/widgets/track_control_rotate_left_side.png
index bcc78fc5e4..3439e8717f 100644
--- a/indra/newview/skins/default/textures/widgets/track_control_rotate_left_side.png
+++ b/indra/newview/skins/default/textures/widgets/track_control_rotate_left_side.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/track_control_rotate_left_side_active.png b/indra/newview/skins/default/textures/widgets/track_control_rotate_left_side_active.png
index 2fe04b93f1..fa745175be 100644
--- a/indra/newview/skins/default/textures/widgets/track_control_rotate_left_side_active.png
+++ b/indra/newview/skins/default/textures/widgets/track_control_rotate_left_side_active.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/track_control_rotate_right_side.png b/indra/newview/skins/default/textures/widgets/track_control_rotate_right_side.png
index d0827abf28..f92fdb3d92 100644
--- a/indra/newview/skins/default/textures/widgets/track_control_rotate_right_side.png
+++ b/indra/newview/skins/default/textures/widgets/track_control_rotate_right_side.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/track_control_rotate_right_side_active.png b/indra/newview/skins/default/textures/widgets/track_control_rotate_right_side_active.png
index 824051562f..23571d6473 100644
--- a/indra/newview/skins/default/textures/widgets/track_control_rotate_right_side_active.png
+++ b/indra/newview/skins/default/textures/widgets/track_control_rotate_right_side_active.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/track_control_rotate_top.png b/indra/newview/skins/default/textures/widgets/track_control_rotate_top.png
index 13a5e9c2e8..ae67084a7d 100644
--- a/indra/newview/skins/default/textures/widgets/track_control_rotate_top.png
+++ b/indra/newview/skins/default/textures/widgets/track_control_rotate_top.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/track_control_rotate_top_active.png b/indra/newview/skins/default/textures/widgets/track_control_rotate_top_active.png
index 9a7493703b..4e1d0ad096 100644
--- a/indra/newview/skins/default/textures/widgets/track_control_rotate_top_active.png
+++ b/indra/newview/skins/default/textures/widgets/track_control_rotate_top_active.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/track_control_sphere.png b/indra/newview/skins/default/textures/widgets/track_control_sphere.png
index a13b7725ea..60a81d1fea 100644
--- a/indra/newview/skins/default/textures/widgets/track_control_sphere.png
+++ b/indra/newview/skins/default/textures/widgets/track_control_sphere.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/track_control_sun_back.png b/indra/newview/skins/default/textures/widgets/track_control_sun_back.png
index 23c89068f8..b3191ccc5d 100644
--- a/indra/newview/skins/default/textures/widgets/track_control_sun_back.png
+++ b/indra/newview/skins/default/textures/widgets/track_control_sun_back.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/track_control_sun_front.png b/indra/newview/skins/default/textures/widgets/track_control_sun_front.png
index 6dfdc04423..1cdcbf7861 100644
--- a/indra/newview/skins/default/textures/widgets/track_control_sun_front.png
+++ b/indra/newview/skins/default/textures/widgets/track_control_sun_front.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/vertical_drag_handle.png b/indra/newview/skins/default/textures/widgets/vertical_drag_handle.png
index 2ce5208c21..d78e898a9c 100644
--- a/indra/newview/skins/default/textures/widgets/vertical_drag_handle.png
+++ b/indra/newview/skins/default/textures/widgets/vertical_drag_handle.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Dragbar.png b/indra/newview/skins/default/textures/windows/Dragbar.png
index d94dda1aae..3a998abdc3 100644
--- a/indra/newview/skins/default/textures/windows/Dragbar.png
+++ b/indra/newview/skins/default/textures/windows/Dragbar.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Flyout_Left.png b/indra/newview/skins/default/textures/windows/Flyout_Left.png
index 6ac9fe2efd..3110d7f6b5 100644
--- a/indra/newview/skins/default/textures/windows/Flyout_Left.png
+++ b/indra/newview/skins/default/textures/windows/Flyout_Left.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Flyout_Pointer.png b/indra/newview/skins/default/textures/windows/Flyout_Pointer.png
index 69fc08ceaa..4076bb393e 100644
--- a/indra/newview/skins/default/textures/windows/Flyout_Pointer.png
+++ b/indra/newview/skins/default/textures/windows/Flyout_Pointer.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Flyout_Right.png b/indra/newview/skins/default/textures/windows/Flyout_Right.png
index aa1f0625aa..4c55cd6287 100644
--- a/indra/newview/skins/default/textures/windows/Flyout_Right.png
+++ b/indra/newview/skins/default/textures/windows/Flyout_Right.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Close_Foreground.png b/indra/newview/skins/default/textures/windows/Icon_Close_Foreground.png
index 3534b716fd..cb516886a2 100644
--- a/indra/newview/skins/default/textures/windows/Icon_Close_Foreground.png
+++ b/indra/newview/skins/default/textures/windows/Icon_Close_Foreground.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Close_Press.png b/indra/newview/skins/default/textures/windows/Icon_Close_Press.png
index ea547fca6f..283981f6ea 100644
--- a/indra/newview/skins/default/textures/windows/Icon_Close_Press.png
+++ b/indra/newview/skins/default/textures/windows/Icon_Close_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Close_Toast.png b/indra/newview/skins/default/textures/windows/Icon_Close_Toast.png
index ecf01c617a..b08ffbc742 100644
--- a/indra/newview/skins/default/textures/windows/Icon_Close_Toast.png
+++ b/indra/newview/skins/default/textures/windows/Icon_Close_Toast.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Dock_Foreground.png b/indra/newview/skins/default/textures/windows/Icon_Dock_Foreground.png
index 4207ba68e5..7508fcb25e 100644
--- a/indra/newview/skins/default/textures/windows/Icon_Dock_Foreground.png
+++ b/indra/newview/skins/default/textures/windows/Icon_Dock_Foreground.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Dock_Press.png b/indra/newview/skins/default/textures/windows/Icon_Dock_Press.png
index 2d09475783..3f2c560398 100644
--- a/indra/newview/skins/default/textures/windows/Icon_Dock_Press.png
+++ b/indra/newview/skins/default/textures/windows/Icon_Dock_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Gear.png b/indra/newview/skins/default/textures/windows/Icon_Gear.png
index e1e89b8f32..7cf85bece4 100644
--- a/indra/newview/skins/default/textures/windows/Icon_Gear.png
+++ b/indra/newview/skins/default/textures/windows/Icon_Gear.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Gear_Background.png b/indra/newview/skins/default/textures/windows/Icon_Gear_Background.png
index 93d62a8d4f..09d83e62e4 100644
--- a/indra/newview/skins/default/textures/windows/Icon_Gear_Background.png
+++ b/indra/newview/skins/default/textures/windows/Icon_Gear_Background.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Gear_Foreground.png b/indra/newview/skins/default/textures/windows/Icon_Gear_Foreground.png
index b2b2a77a88..fa998eee5d 100644
--- a/indra/newview/skins/default/textures/windows/Icon_Gear_Foreground.png
+++ b/indra/newview/skins/default/textures/windows/Icon_Gear_Foreground.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Gear_Press.png b/indra/newview/skins/default/textures/windows/Icon_Gear_Press.png
index 6fc3744d6b..603fa2f388 100644
--- a/indra/newview/skins/default/textures/windows/Icon_Gear_Press.png
+++ b/indra/newview/skins/default/textures/windows/Icon_Gear_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Help_Foreground.png b/indra/newview/skins/default/textures/windows/Icon_Help_Foreground.png
index 177c0675bb..1bde4c040a 100644
--- a/indra/newview/skins/default/textures/windows/Icon_Help_Foreground.png
+++ b/indra/newview/skins/default/textures/windows/Icon_Help_Foreground.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Help_Press.png b/indra/newview/skins/default/textures/windows/Icon_Help_Press.png
index aa21a1c789..f3b885283f 100644
--- a/indra/newview/skins/default/textures/windows/Icon_Help_Press.png
+++ b/indra/newview/skins/default/textures/windows/Icon_Help_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Minimize_Foreground.png b/indra/newview/skins/default/textures/windows/Icon_Minimize_Foreground.png
index a98a3a98c2..942efb40f7 100644
--- a/indra/newview/skins/default/textures/windows/Icon_Minimize_Foreground.png
+++ b/indra/newview/skins/default/textures/windows/Icon_Minimize_Foreground.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Minimize_Press.png b/indra/newview/skins/default/textures/windows/Icon_Minimize_Press.png
index 5df0e7691c..1fe37b7a2e 100644
--- a/indra/newview/skins/default/textures/windows/Icon_Minimize_Press.png
+++ b/indra/newview/skins/default/textures/windows/Icon_Minimize_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Restore_Foreground.png b/indra/newview/skins/default/textures/windows/Icon_Restore_Foreground.png
index b4d4ef01fc..7840deccb8 100644
--- a/indra/newview/skins/default/textures/windows/Icon_Restore_Foreground.png
+++ b/indra/newview/skins/default/textures/windows/Icon_Restore_Foreground.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Restore_Press.png b/indra/newview/skins/default/textures/windows/Icon_Restore_Press.png
index 0d0238dc32..33258a0bc5 100644
--- a/indra/newview/skins/default/textures/windows/Icon_Restore_Press.png
+++ b/indra/newview/skins/default/textures/windows/Icon_Restore_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Undock_Foreground.png b/indra/newview/skins/default/textures/windows/Icon_Undock_Foreground.png
index 9a71d16a3f..df826226e6 100644
--- a/indra/newview/skins/default/textures/windows/Icon_Undock_Foreground.png
+++ b/indra/newview/skins/default/textures/windows/Icon_Undock_Foreground.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Inspector_Background.png b/indra/newview/skins/default/textures/windows/Inspector_Background.png
index 4c2a728ac5..3053269b84 100644
--- a/indra/newview/skins/default/textures/windows/Inspector_Background.png
+++ b/indra/newview/skins/default/textures/windows/Inspector_Background.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Inspector_Hover.png b/indra/newview/skins/default/textures/windows/Inspector_Hover.png
index feeee78033..0cb846eba0 100644
--- a/indra/newview/skins/default/textures/windows/Inspector_Hover.png
+++ b/indra/newview/skins/default/textures/windows/Inspector_Hover.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Inspector_I.png b/indra/newview/skins/default/textures/windows/Inspector_I.png
index b4875fd638..843f6e9fbe 100644
--- a/indra/newview/skins/default/textures/windows/Inspector_I.png
+++ b/indra/newview/skins/default/textures/windows/Inspector_I.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Resize_Corner.png b/indra/newview/skins/default/textures/windows/Resize_Corner.png
index 16ed63e428..f52b7ced4a 100644
--- a/indra/newview/skins/default/textures/windows/Resize_Corner.png
+++ b/indra/newview/skins/default/textures/windows/Resize_Corner.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Toast_Background.png b/indra/newview/skins/default/textures/windows/Toast_Background.png
index f27d1a12ec..00676350ca 100644
--- a/indra/newview/skins/default/textures/windows/Toast_Background.png
+++ b/indra/newview/skins/default/textures/windows/Toast_Background.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Toast_CloseBtn.png b/indra/newview/skins/default/textures/windows/Toast_CloseBtn.png
index 78b137cdaf..f37d8d085d 100644
--- a/indra/newview/skins/default/textures/windows/Toast_CloseBtn.png
+++ b/indra/newview/skins/default/textures/windows/Toast_CloseBtn.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Toast_Over.png b/indra/newview/skins/default/textures/windows/Toast_Over.png
index 807e8e553c..5191e0858d 100644
--- a/indra/newview/skins/default/textures/windows/Toast_Over.png
+++ b/indra/newview/skins/default/textures/windows/Toast_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Volume_Background.png b/indra/newview/skins/default/textures/windows/Volume_Background.png
index 43aaa441f5..9f8680d079 100644
--- a/indra/newview/skins/default/textures/windows/Volume_Background.png
+++ b/indra/newview/skins/default/textures/windows/Volume_Background.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Wearables_Divider.png b/indra/newview/skins/default/textures/windows/Wearables_Divider.png
index 9dce7bf45c..8795ccd661 100644
--- a/indra/newview/skins/default/textures/windows/Wearables_Divider.png
+++ b/indra/newview/skins/default/textures/windows/Wearables_Divider.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Window_Background.png b/indra/newview/skins/default/textures/windows/Window_Background.png
index db253900af..9864ec0db8 100644
--- a/indra/newview/skins/default/textures/windows/Window_Background.png
+++ b/indra/newview/skins/default/textures/windows/Window_Background.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Window_Foreground.png b/indra/newview/skins/default/textures/windows/Window_Foreground.png
index b81ec5b43c..a86b236504 100644
--- a/indra/newview/skins/default/textures/windows/Window_Foreground.png
+++ b/indra/newview/skins/default/textures/windows/Window_Foreground.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Window_NoTitle_Background.png b/indra/newview/skins/default/textures/windows/Window_NoTitle_Background.png
index a570ac06bd..d01f82a310 100644
--- a/indra/newview/skins/default/textures/windows/Window_NoTitle_Background.png
+++ b/indra/newview/skins/default/textures/windows/Window_NoTitle_Background.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Window_NoTitle_Foreground.png b/indra/newview/skins/default/textures/windows/Window_NoTitle_Foreground.png
index d573e8c69a..1966400641 100644
--- a/indra/newview/skins/default/textures/windows/Window_NoTitle_Foreground.png
+++ b/indra/newview/skins/default/textures/windows/Window_NoTitle_Foreground.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/add_payment_image_center.png b/indra/newview/skins/default/textures/windows/add_payment_image_center.png
index b5459136cb..fa3575f53d 100644
--- a/indra/newview/skins/default/textures/windows/add_payment_image_center.png
+++ b/indra/newview/skins/default/textures/windows/add_payment_image_center.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/add_payment_image_left.png b/indra/newview/skins/default/textures/windows/add_payment_image_left.png
index 7fb65e724a..a3c154477f 100644
--- a/indra/newview/skins/default/textures/windows/add_payment_image_left.png
+++ b/indra/newview/skins/default/textures/windows/add_payment_image_left.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/add_payment_image_right.png b/indra/newview/skins/default/textures/windows/add_payment_image_right.png
index f1937b6318..1edc10064d 100644
--- a/indra/newview/skins/default/textures/windows/add_payment_image_right.png
+++ b/indra/newview/skins/default/textures/windows/add_payment_image_right.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/hint_arrow_down.png b/indra/newview/skins/default/textures/windows/hint_arrow_down.png
index 0cb5a819ec..b449d3be7c 100644
--- a/indra/newview/skins/default/textures/windows/hint_arrow_down.png
+++ b/indra/newview/skins/default/textures/windows/hint_arrow_down.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/hint_arrow_left.png b/indra/newview/skins/default/textures/windows/hint_arrow_left.png
index 45204d9132..d93d621067 100644
--- a/indra/newview/skins/default/textures/windows/hint_arrow_left.png
+++ b/indra/newview/skins/default/textures/windows/hint_arrow_left.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/hint_arrow_lower_left.png b/indra/newview/skins/default/textures/windows/hint_arrow_lower_left.png
index 3e3ae9f42d..5e8def5a5b 100644
--- a/indra/newview/skins/default/textures/windows/hint_arrow_lower_left.png
+++ b/indra/newview/skins/default/textures/windows/hint_arrow_lower_left.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/hint_arrow_right.png b/indra/newview/skins/default/textures/windows/hint_arrow_right.png
index 3fe7a773c3..3524487fb3 100644
--- a/indra/newview/skins/default/textures/windows/hint_arrow_right.png
+++ b/indra/newview/skins/default/textures/windows/hint_arrow_right.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/hint_arrow_up.png b/indra/newview/skins/default/textures/windows/hint_arrow_up.png
index 44f003dc63..aca440d712 100644
--- a/indra/newview/skins/default/textures/windows/hint_arrow_up.png
+++ b/indra/newview/skins/default/textures/windows/hint_arrow_up.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/hint_background.png b/indra/newview/skins/default/textures/windows/hint_background.png
index e25f354347..d045bc5e29 100644
--- a/indra/newview/skins/default/textures/windows/hint_background.png
+++ b/indra/newview/skins/default/textures/windows/hint_background.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/login_sl_logo.png b/indra/newview/skins/default/textures/windows/login_sl_logo.png
index 1eede80c83..e4d4eb3ebf 100644
--- a/indra/newview/skins/default/textures/windows/login_sl_logo.png
+++ b/indra/newview/skins/default/textures/windows/login_sl_logo.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/login_sl_logo_small.png b/indra/newview/skins/default/textures/windows/login_sl_logo_small.png
index c5933001f0..36fb15de08 100644
--- a/indra/newview/skins/default/textures/windows/login_sl_logo_small.png
+++ b/indra/newview/skins/default/textures/windows/login_sl_logo_small.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/startup_logo.png b/indra/newview/skins/default/textures/windows/startup_logo.png
index b89449692b..6a81a6451d 100644
--- a/indra/newview/skins/default/textures/windows/startup_logo.png
+++ b/indra/newview/skins/default/textures/windows/startup_logo.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/yellow_gradient.png b/indra/newview/skins/default/textures/windows/yellow_gradient.png
index 5bd21b4297..4a07282ecb 100644
--- a/indra/newview/skins/default/textures/windows/yellow_gradient.png
+++ b/indra/newview/skins/default/textures/windows/yellow_gradient.png
Binary files differ
diff --git a/indra/newview/skins/default/xui/de/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/de/floater_texture_fetch_debugger.xml
deleted file mode 100644
index 97b0364832..0000000000
--- a/indra/newview/skins/default/xui/de/floater_texture_fetch_debugger.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="TexFetchDebugger" title="Debugger für Texturabruffehler">
- <text name="total_num_fetched_label">
- 1, Gesamtzahl abgerufener Texturen: [NUM]
- </text>
- <text name="total_num_fetching_requests_label">
- 2, Gesamtzahl von Abrufanforderungen: [NUM]
- </text>
- <text name="total_num_cache_hits_label">
- 3, Gesamtzahl von Cachetreffern: [NUM]
- </text>
- <text name="total_num_visible_tex_label">
- 4, Gesamtzahl sichtbarer Texturen: [NUM]
- </text>
- <text name="total_num_visible_tex_fetch_req_label">
- 5, Gesamtzahl von Abrufanforderungen für sichtbare Texturen: [NUM]
- </text>
- <text name="total_fetched_data_label">
- 6, Gesamtmenge abgerufener Daten: [SIZE1] KB, decodierte Daten: [SIZE2] KB, [PIXEL] MPixel
- </text>
- <text name="total_fetched_vis_data_label">
- 7, Gesamtmenge sichtbarer Daten: [SIZE1] KB, decodierte Daten: [SIZE2] KB
- </text>
- <text name="total_fetched_rendered_data_label">
- 8, Gesamtmenge dargestellter Daten: [SIZE1] KB, decodierte Daten: [SIZE2] KB, [PIXEL] MPixel
- </text>
- <text name="total_time_cache_read_label">
- 9, Gesamtzeit Cache-Lesezugriffe: [TIME] s
- </text>
- <text name="total_time_cache_write_label">
- 10, Gesamtzeit Cache-Schreibzugriffe: [TIME] s
- </text>
- <text name="total_time_decode_label">
- 11, Gesamtzeit Decodierung: [TIME] s
- </text>
- <text name="total_time_gl_label">
- 12, Gesamtzeit GL-Texturerstellung: [TIME] s
- </text>
- <text name="total_time_http_label">
- 13, Gesamtzeit HTTP-Abrufe: [TIME] s
- </text>
- <text name="total_time_fetch_label">
- 14, Gesamtzeit für alle Abrufe: [TIME] s
- </text>
- <text name="total_time_refetch_vis_cache_label">
- 15, Neuabruf sichtbarer Texturen aus Cache, Zeit: [TIME] s, Abrufmenge: [SIZE2] KB, [PIXEL] MPixel
- </text>
- <text name="total_time_refetch_all_cache_label">
- 16, Neuabruf aller Texturen aus Cache, Zeit: [TIME] s, Abrufmenge: [SIZE2] KB, [PIXEL] MPixel
- </text>
- <text name="total_time_refetch_vis_http_label">
- 17, Neuabruf sichtbarer Texturen von HTTP, Zeit: [TIME] s, Abrufmenge: [SIZE2] KB, [PIXEL] MPixel
- </text>
- <text name="total_time_refetch_all_http_label">
- 18, Neuabruf aller Texturen von HTTP, Zeit: [TIME] s, Abrufmenge: [SIZE2] KB, [PIXEL] MPixel
- </text>
- <spinner label="19, Verhältnis Texel/Pixel:" name="texel_pixel_ratio"/>
- <text name="texture_source_label">
- 20, Texturquelle:
- </text>
- <radio_group name="texture_source">
- <radio_item label="Cache + HTTP" name="0"/>
- <radio_item label="Nur HTTP" name="1"/>
- </radio_group>
- <button label="Starten" name="start_btn"/>
- <button label="Zurücksetzen" name="clear_btn"/>
- <button label="Schließen" name="close_btn"/>
- <button label="Cache-Lesezugriff" name="cacheread_btn"/>
- <button label="Cache-Schreibzugriff" name="cachewrite_btn"/>
- <button label="HTTP" name="http_btn"/>
- <button label="Decodieren" name="decode_btn"/>
- <button label="GL-Textur" name="gl_btn"/>
- <button label="Neuabruf sichtbarer Texturen (Cache)" name="refetchviscache_btn"/>
- <button label="Neuabruf des gesamten Cache" name="refetchallcache_btn"/>
- <button label="Neuabruf sichtbarer Texturen (HTTP)" name="refetchvishttp_btn"/>
- <button label="Neuabruf des gesamten HTTP" name="refetchallhttp_btn"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/de/panel_region_terrain.xml b/indra/newview/skins/default/xui/de/panel_region_terrain.xml
index 42ba5b5269..7738427fe3 100644
--- a/indra/newview/skins/default/xui/de/panel_region_terrain.xml
+++ b/indra/newview/skins/default/xui/de/panel_region_terrain.xml
@@ -10,7 +10,7 @@
<spinner label="Obere Terraingrenze" name="terrain_raise_spin"/>
<spinner label="Untere Terraingrenze" name="terrain_lower_spin"/>
<text name="detail_texture_text">
- Terraintexturen (erfordert 24-Bit-.tga-Dateien mit einer Größe von 1024x1024)
+ Terraintexturen
</text>
<text name="height_text_lbl">
1 (niedrig)
diff --git a/indra/newview/skins/default/xui/en/floater_adjust_environment.xml b/indra/newview/skins/default/xui/en/floater_adjust_environment.xml
index 91a1dffcb5..889eeb5369 100644
--- a/indra/newview/skins/default/xui/en/floater_adjust_environment.xml
+++ b/indra/newview/skins/default/xui/en/floater_adjust_environment.xml
@@ -12,7 +12,7 @@
can_resize="false">
<string name="hdr_string">HDR Scale:</string>
<string name="brightness_string">Brightness:</string>
- <string name="hdr_tooltip">Intensity of lightning effects such as realistically bright skies and dynamic exposure. 1.0 is the default, 0 is off, values between 0 and 1 are mixing Ambient with HDR.</string>
+ <string name="hdr_tooltip">Intensity of lighting effects such as realistically bright skies and dynamic exposure. 1.0 is the default, 0 is off, values between 0 and 1 are mixing Ambient with HDR.</string>
<layout_stack name="outer_stack"
width="845"
height="275"
diff --git a/indra/newview/skins/default/xui/en/floater_change_item_thumbnail.xml b/indra/newview/skins/default/xui/en/floater_change_item_thumbnail.xml
index 223069ed0c..465580301e 100644
--- a/indra/newview/skins/default/xui/en/floater_change_item_thumbnail.xml
+++ b/indra/newview/skins/default/xui/en/floater_change_item_thumbnail.xml
@@ -9,6 +9,10 @@
width="319">
<floater.string
+ name="multiple_item_names">
+ Multiple items selected
+ </floater.string>
+ <floater.string
name="title_item_thumbnail">
CHANGE ITEM IMAGE
</floater.string>
@@ -72,6 +76,22 @@
height="256"
width="256"
/>
+ <text
+ name="multiple_lbl"
+ font="SansSerifBig"
+ text_color="White"
+ halign="center"
+ valign="center"
+ use_ellipses="true"
+ follows="top|left"
+ layout="topleft"
+ height="256"
+ width="256"
+ top_delta="0"
+ left_delta="0"
+ visible =" false">
+ Multiple thumbnails
+ </text>
<button
follows="right|bottom"
diff --git a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
index bc237322af..64f612f943 100644
--- a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
@@ -128,6 +128,42 @@
Avatar
</text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="30"
+ top_delta="16"
+ width="128"
+ name="AvatarComplexityModeLabel"
+ text_readonly_color="LabelDisabledColor">
+ Avatar display:
+ </text>
+
+ <combo_box
+ control_name="RenderAvatarComplexityMode"
+ height="18"
+ layout="topleft"
+ left_delta="130"
+ top_delta="0"
+ name="AvatarComplexityMode"
+ width="150">
+ <combo_box.item
+ label="Limit by complexity"
+ name="0"
+ value="0"/>
+ <combo_box.item
+ label="Always show friends"
+ name="1"
+ value="1"/>
+ <combo_box.item
+ label="Only show friends"
+ name="2"
+ value="2"/>
+ </combo_box>
+
<slider
control_name="IndirectMaxComplexity"
tool_tip="Controls at what point a visually complex avatar is drawn as a JellyDoll"
@@ -335,21 +371,9 @@
name="FSAADisabled"
value="0" />
<combo_box.item
- label="2x"
- name="2x"
+ label="FXAA"
+ name="FXAA"
value="2" />
- <combo_box.item
- label="4x"
- name="4x"
- value="4" />
- <combo_box.item
- label="8x"
- name="8x"
- value="8" />
- <combo_box.item
- label="16x"
- name="16x"
- value="16" />
</combo_box>
<text
type="string"
@@ -357,44 +381,23 @@
follows="left|top"
height="16"
layout="topleft"
- left_pad="10"
- name="antialiasing restart"
- top_delta="0"
- width="130">
- (requires restart)
- </text>
- <view_border
- bevel_style="in"
- height="322"
- layout="topleft"
- left="385"
- name="vert_border"
- top="16"
- width="0"/>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
name="MeshText"
- top_delta="20"
- left="400"
- top="21"
+ top_delta="16"
+ left="10"
width="128">
- Mesh
+ Mesh
</text>
<slider
control_name="RenderTerrainLODFactor"
- follows="left|top"
+ follows="topleft"
height="16"
increment="0.125"
initial_value="160"
label="Terrain Mesh Detail:"
label_width="185"
layout="topleft"
- left="420"
+ left="30"
min_val="1"
max_val="2"
name="TerrainMeshDetail"
@@ -408,7 +411,7 @@
<text
type="string"
length="1"
- follows="left|top"
+ follows="topleft"
height="16"
layout="topleft"
name="TerrainMeshDetailText"
@@ -416,19 +419,19 @@
top_delta="0"
left_delta="304"
width="65">
- Low
+ Low
</text>
<slider
control_name="RenderTreeLODFactor"
- follows="left|top"
+ follows="topleft"
height="16"
increment="0.125"
initial_value="160"
label="Trees:"
label_width="185"
layout="topleft"
- left="420"
+ left="30"
name="TreeMeshDetail"
show_text="false"
top_delta="16"
@@ -447,7 +450,7 @@
top_delta="0"
left_delta="304"
width="65">
- Low
+ Low
</text>
<slider
@@ -459,7 +462,7 @@
label="Objects:"
label_width="185"
layout="topleft"
- left="420"
+ left="30"
min_val="0"
max_val="4"
name="ObjectMeshDetail"
@@ -480,7 +483,7 @@
top_delta="0"
left_delta="304"
width="65">
- Low
+ Low
</text>
<slider
@@ -491,7 +494,7 @@
label="Flexiprims:"
label_width="185"
layout="topleft"
- left="420"
+ left="30"
name="FlexibleMeshDetail"
show_text="false"
top_delta="16"
@@ -510,8 +513,28 @@
top_delta="0"
left_delta="304"
width="65">
- Low
+ Low
</text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left_pad="10"
+ name="antialiasing restart"
+ top_delta="0"
+ width="130">
+ (requires restart)
+ </text>
+ <view_border
+ bevel_style="in"
+ height="322"
+ layout="topleft"
+ left="385"
+ name="vert_border"
+ top="16"
+ width="0"/>
<text
type="string"
@@ -520,7 +543,7 @@
height="16"
layout="topleft"
name="ShadersText"
- top_delta="20"
+ top_delta="-10"
left="400"
width="128">
Shaders
@@ -534,7 +557,7 @@
layout="topleft"
left="420"
name="TransparentWater"
- top_delta="16"
+ top_delta="18"
width="300">
<check_box.commit_callback
function="Pref.RenderOptionUpdate" />
@@ -555,7 +578,7 @@
max_val="128"
name="SkyMeshDetail"
show_text="false"
- top_delta="16"
+ top_delta="22"
width="260">
<slider.commit_callback
function="Pref.UpdateSliderText"
@@ -583,7 +606,7 @@
layout="topleft"
left="420"
name="UseSSAO"
- top_delta="16"
+ top_delta="22"
width="240">
<check_box.commit_callback
function="Pref.RenderOptionUpdate" />
@@ -597,7 +620,7 @@
layout="topleft"
left="420"
name="UseDoF"
- top_delta="16"
+ top_delta="20"
width="240">
<check_box.commit_callback
function="Pref.RenderOptionUpdate" />
@@ -612,7 +635,7 @@
left="420"
name="RenderShadowDetailText"
text_readonly_color="LabelDisabledColor"
- top_delta="16"
+ top_delta="22"
width="128">
Shadows:
</text>
@@ -646,7 +669,7 @@
layout="topleft"
left="420"
name="ScreenSpaceReflections"
- top_delta="16"
+ top_delta="24"
width="240">
<check_box.commit_callback
function="Pref.RenderOptionUpdate" />
@@ -661,7 +684,7 @@
left="420"
name="ReflectionDetailText"
text_readonly_color="LabelDisabledColor"
- top_delta="16"
+ top_delta="22"
width="128">
Reflection Detail:
</text>
@@ -697,7 +720,7 @@
left="420"
name="ReflectionProbeText"
text_readonly_color="LabelDisabledColor"
- top_delta="16"
+ top_delta="22"
width="128">
Reflection Coverage:
</text>
@@ -743,10 +766,106 @@
max_val="1.5"
name="RenderExposure"
show_text="true"
- top_delta="20"
+ top_delta="24"
width="260">
</slider>
+ <!-- Mirror settings. -->
+ <check_box
+ control_name="RenderMirrors"
+ height="16"
+ initial_value="false"
+ label="Mirrors"
+ layout="topleft"
+ left="420"
+ name="Mirrors"
+ top_delta="24"
+ width="240">
+ <check_box.commit_callback
+ function="Pref.RenderOptionUpdate" />
+ </check_box>
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="420"
+ name="MirrorResolutionText"
+ text_readonly_color="LabelDisabledColor"
+ top_delta="22"
+ width="128">
+ Mirror Resolution:
+ </text>
+
+ <combo_box
+ control_name="RenderHeroProbeResolution"
+ height="18"
+ layout="topleft"
+ left_delta="130"
+ top_delta="0"
+ name="MirrorResolution"
+ width="150">
+ <combo_box.item
+ label="256"
+ name="0"
+ value="256"/>
+ <combo_box.item
+ label="512"
+ name="1"
+ value="512"/>
+ <combo_box.item
+ label="1024"
+ name="2"
+ value="1024"/>
+ <combo_box.item
+ label="2048"
+ name="3"
+ value="2048"/>
+ </combo_box>
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="420"
+ name="HeroProbeUpdateText"
+ text_readonly_color="LabelDisabledColor"
+ top_delta="22"
+ width="128">
+ Mirror Update Rate:
+ </text>
+
+ <combo_box
+ control_name="RenderHeroProbeUpdateRate"
+ height="18"
+ layout="topleft"
+ left_delta="130"
+ top_delta="0"
+ name="HeroProbeUpdateRate"
+ width="150">
+ <combo_box.item
+ label="Every Frame"
+ name="0"
+ value="1"/>
+ <combo_box.item
+ label="Every 2nd Frame"
+ name="1"
+ value="2"/>
+ <combo_box.item
+ label="Every 3rd Frame"
+ name="2"
+ value="3"/>
+ <combo_box.item
+ label="Every 4th Frame"
+ name="3"
+ value="4"/>
+ </combo_box>
+ <!-- End of mirror settings -->
+
<!-- End of Advanced Settings block -->
<view_border
bevel_style="in"
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index 490b516ac6..3ee4a354d4 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -2410,7 +2410,6 @@ even though the user gets a free copy.
name="object_horizontal"
top_pad="10"
width="278" />
-
<check_box
height="16"
label="Light"
@@ -2560,16 +2559,52 @@ even though the user gets a free copy.
name="Box"
value="Box"/>
</combo_box>
+
<check_box
- height="16"
- label="Dynamic"
+ height="16"
+ label="Dynamic"
+ layout="topleft"
+ left="10"
+ name="Probe Dynamic"
+ tool_tip="When enabled, Avatars will appear in reflections within this probe's influence volume."
+ bottom_delta="19"
+ width="60" />
+
+ <text
+ bottom_delta="-8"
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
layout="topleft"
left="10"
- name="Probe Dynamic"
- tool_tip="When enabled, Avatars will appear in reflections within this probe's influence volume."
- bottom_delta="19"
- width="60" />
- <spinner bottom_delta="19"
+ name="Probe Update Label"
+ text_readonly_color="LabelDisabledColor"
+ width="100">
+ Probe Update
+ </text>
+ <combo_box
+ height="19"
+ top_delta="0"
+ left="144"
+ follows="left|top"
+ name="Probe Update Type"
+ tool_tip="Determines how the probe updates. Static updates the slowest and without avatars. Dynamic updates more frequently, with avatars visible in the probes. Mirror turns this probe into a realtime planar projected mirror probe, but does not calculate ambiance."
+ width="108">
+ <combo_box.item
+ label="Static"
+ name="Static"
+ value="Static" />
+ <combo_box.item
+ label="Dynamic"
+ name="Dynamic"
+ value="Dynamic"/>
+ <combo_box.item
+ label="Mirror"
+ name="Mirror"
+ value="Mirror"/>
+ </combo_box>
+ <spinner bottom_delta="17"
decimal_digits="3"
follows="left|top"
height="16"
diff --git a/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml b/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml
index c11f1c88cb..16907d3577 100644
--- a/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml
@@ -426,6 +426,234 @@
<menu_item_separator
layout="topleft"
name="Subfolder Separator" />
+ <menu
+ label="Create new"
+ layout="topleft"
+ name="create_new">
+ <menu_item_call
+ label="New Folder"
+ layout="topleft"
+ name="New Folder">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="category" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Script"
+ layout="topleft"
+ name="New Script">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="lsl" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Notecard"
+ layout="topleft"
+ name="New Note">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="notecard" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Gesture"
+ layout="topleft"
+ name="New Gesture">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="gesture" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Material"
+ layout="topleft"
+ name="New Material">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="material" />
+ <menu_item_call.on_enable
+ function="Inventory.MaterialsEnabled" />
+ </menu_item_call>
+ <menu
+ label="New Clothes"
+ layout="topleft"
+ name="New Clothes">
+ <menu_item_call
+ label="New Shirt"
+ layout="topleft"
+ name="New Shirt">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="shirt" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Pants"
+ layout="topleft"
+ name="New Pants">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="pants" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Shoes"
+ layout="topleft"
+ name="New Shoes">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="shoes" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Socks"
+ layout="topleft"
+ name="New Socks">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="socks" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Jacket"
+ layout="topleft"
+ name="New Jacket">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="jacket" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Skirt"
+ layout="topleft"
+ name="New Skirt">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="skirt" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Gloves"
+ layout="topleft"
+ name="New Gloves">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="gloves" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Undershirt"
+ layout="topleft"
+ name="New Undershirt">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="undershirt" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Underpants"
+ layout="topleft"
+ name="New Underpants">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="underpants" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Alpha Mask"
+ layout="topleft"
+ name="New Alpha Mask">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="alpha" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Tattoo"
+ layout="topleft"
+ name="New Tattoo">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="tattoo" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Universal"
+ layout="topleft"
+ name="New Universal">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="universal" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Physics"
+ layout="topleft"
+ name="New Physics">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="physics" />
+ </menu_item_call>
+ </menu>
+ <menu
+ label="New Body Parts"
+ layout="topleft"
+ name="New Body Parts">
+ <menu_item_call
+ label="New Shape"
+ layout="topleft"
+ name="New Shape">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="shape" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Skin"
+ layout="topleft"
+ name="New Skin">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="skin" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Hair"
+ layout="topleft"
+ name="New Hair">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="hair" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Eyes"
+ layout="topleft"
+ name="New Eyes">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="eyes" />
+ </menu_item_call>
+ </menu>
+ <menu
+ label="New Settings"
+ layout="topleft"
+ name="New Settings">
+ <menu_item_call
+ label="New Sky"
+ layout="topleft"
+ name="New Sky">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="sky"/>
+ <menu_item_call.on_enable
+ function="Inventory.EnvironmentEnabled" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Water"
+ layout="topleft"
+ name="New Water">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="water"/>
+ <menu_item_call.on_enable
+ function="Inventory.EnvironmentEnabled" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Day Cycle"
+ layout="topleft"
+ name="New Day Cycle">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="daycycle"/>
+ <menu_item_call.on_enable
+ function="Inventory.EnvironmentEnabled" />
+ </menu_item_call>
+ </menu>
+ </menu>
<menu_item_call
label="Create folder from selected"
layout="topleft"
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 13064db712..ae96289f36 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory_add.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory_add.xml
@@ -13,7 +13,7 @@
name="upload"
tear_off="true">
<menu_item_call
- label="Image (L$[COST])..."
+ label="Image..."
layout="topleft"
name="Upload Image"
shortcut="control|U">
diff --git a/indra/newview/skins/default/xui/en/menu_nearby_media.xml b/indra/newview/skins/default/xui/en/menu_nearby_media.xml
new file mode 100644
index 0000000000..7c91241a19
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/menu_nearby_media.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<toggleable_menu
+ name="menu_nearby_media"
+ left="0"
+ bottom="0"
+ visible="false"
+ mouse_opaque="false">
+ <menu_item_call
+ label="Copy Url"
+ name="copy_url">
+ <menu_item_call.on_click
+ function="SelectedMediaCtrl.Action"
+ parameter="copy_url" />
+ </menu_item_call>
+ <menu_item_call
+ label="Copy Data"
+ name="copy_data">
+ <menu_item_call.on_click
+ function="SelectedMediaCtrl.Action"
+ parameter="copy_data" />
+ <menu_item_call.on_visible
+ function="SelectedMediaCtrl.Visible"
+ parameter="copy_data" />
+ </menu_item_call>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_object.xml b/indra/newview/skins/default/xui/en/menu_object.xml
index cbd38b1db8..2df581fa2c 100644
--- a/indra/newview/skins/default/xui/en/menu_object.xml
+++ b/indra/newview/skins/default/xui/en/menu_object.xml
@@ -173,6 +173,8 @@
function="Object.Take"/>
<menu_item_call.on_enable
function="Object.VisibleTake"/>
+ <menu_item_call.on_visible
+ function="Object.VisibleTakeSingle"/>
</menu_item_call>
<menu_item_call
enabled="false"
@@ -182,6 +184,52 @@
function="Tools.TakeCopy" />
<menu_item_call.on_enable
function="Tools.EnableTakeCopy" />
+ <menu_item_call.on_visible
+ function="Object.VisibleTakeSingle"/>
+ </menu_item_call>
+ <menu_item_call
+ label="Take as combined item"
+ layout="topleft"
+ name="Take combined">
+ <menu_item_call.on_click
+ function="Object.Take"/>
+ <menu_item_call.on_enable
+ function="Object.VisibleTake"/>
+ <menu_item_call.on_visible
+ function="Object.VisibleTakeMultiple"/>
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Take copy as combined item"
+ name="Take Copy combined">
+ <menu_item_call.on_click
+ function="Tools.TakeCopy" />
+ <menu_item_call.on_enable
+ function="Tools.EnableTakeCopy" />
+ <menu_item_call.on_visible
+ function="Object.VisibleTakeMultiple"/>
+ </menu_item_call>
+ <menu_item_call
+ label="Take as separate items"
+ layout="topleft"
+ name="Take Separate">
+ <menu_item_call.on_click
+ function="Object.TakeSeparate"/>
+ <menu_item_call.on_enable
+ function="Object.EnableTakeMultiple"/>
+ <menu_item_call.on_visible
+ function="Object.VisibleTakeMultiple"/>
+ </menu_item_call>
+ <menu_item_call
+ label="Take copies as separate items"
+ layout="topleft"
+ name="Take Copy Separate">
+ <menu_item_call.on_click
+ function="Object.TakeSeparateCopy"/>
+ <menu_item_call.on_enable
+ function="Tools.EnableCopySeparate"/>
+ <menu_item_call.on_visible
+ function="Object.VisibleTakeMultiple"/>
</menu_item_call>
<menu_item_call
enabled="false"
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 53f703e56d..9697774fd9 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -1620,7 +1620,7 @@ function="World.EnvPreset"
name="Upload"
tear_off="true">
<menu_item_call
- label="Image (L$[COST])..."
+ label="Image..."
layout="topleft"
name="Upload Image"
shortcut="control|U">
@@ -2039,7 +2039,57 @@ function="World.EnvPreset"
function="Advanced.ToggleRenderType"
parameter="simple" />
</menu_item_check>
- <menu_item_check
+ <menu_item_check
+ label="Materials"
+ name="Rendering Type Materials">
+ <menu_item_check.on_check
+ function="Advanced.CheckRenderType"
+ parameter="materials" />
+ <menu_item_check.on_click
+ function="Advanced.ToggleRenderType"
+ parameter="materials" />
+ </menu_item_check>
+ <menu_item_check
+ label="Alpha Mask"
+ name="Rendering Type Alpha Mask">
+ <menu_item_check.on_check
+ function="Advanced.CheckRenderType"
+ parameter="alpha_mask" />
+ <menu_item_check.on_click
+ function="Advanced.ToggleRenderType"
+ parameter="alpha_mask" />
+ </menu_item_check>
+ <menu_item_check
+ label="Fullbright Alpha Mask"
+ name="Rendering Type Fullbright Alpha Mask">
+ <menu_item_check.on_check
+ function="Advanced.CheckRenderType"
+ parameter="fullbright_alpha_mask" />
+ <menu_item_check.on_click
+ function="Advanced.ToggleRenderType"
+ parameter="fullbright_alpha_mask" />
+ </menu_item_check>
+ <menu_item_check
+ label="Glow"
+ name="Rendering Type Glow">
+ <menu_item_check.on_check
+ function="Advanced.CheckRenderType"
+ parameter="glow" />
+ <menu_item_check.on_click
+ function="Advanced.ToggleRenderType"
+ parameter="glow" />
+ </menu_item_check>
+ <menu_item_check
+ label="Fullbright"
+ name="Rendering Type Glow">
+ <menu_item_check.on_check
+ function="Advanced.CheckRenderType"
+ parameter="fullbright" />
+ <menu_item_check.on_click
+ function="Advanced.ToggleRenderType"
+ parameter="fullbright" />
+ </menu_item_check>
+ <menu_item_check
label="Alpha"
name="Rendering Type Alpha"
shortcut="control|alt|shift|2">
@@ -2794,6 +2844,30 @@ function="World.EnvPreset"
parameter="mem_leaking" />
</menu_item_call>
</menu>
+ <menu
+ create_jump_keys="true"
+ label="GLTF"
+ name="GLTF"
+ tear_off="true">
+ <menu_item_call
+ label="Open..."
+ name="Open...">
+ <menu_item_call.on_click
+ function="Advanced.ClickGLTFOpen" />
+ </menu_item_call>
+ <menu_item_call
+ label="Save As..."
+ name="Save As...">
+ <menu_item_call.on_click
+ function="Advanced.ClickGLTFSaveAs" />
+ </menu_item_call>
+ <menu_item_call
+ label="Decompose..."
+ name="Decompose...">
+ <menu_item_call.on_click
+ function="Advanced.ClickGLTFDecompose" />
+ </menu_item_call>
+ </menu>
<menu
create_jump_keys="true"
label="Render Tests"
@@ -2840,6 +2914,12 @@ function="World.EnvPreset"
<menu_item_call.on_click
function="Advanced.ClickRenderBenchmark" />
</menu_item_call>
+ <menu_item_call
+ label="HDRI Preview"
+ name="HDRI Preview">
+ <menu_item_call.on_click
+ function="Advanced.ClickHDRIPreview" />
+ </menu_item_call>
</menu>
<menu
create_jump_keys="true"
@@ -2877,6 +2957,16 @@ function="World.EnvPreset"
parameter="octree" />
</menu_item_check>
<menu_item_check
+ label="GLTF Nodes"
+ name="GLTF Nodes">
+ <menu_item_check.on_check
+ function="Advanced.CheckInfoDisplay"
+ parameter="nodes" />
+ <menu_item_check.on_click
+ function="Advanced.ToggleInfoDisplay"
+ parameter="nodes" />
+ </menu_item_check>
+ <menu_item_check
label="Shadow Frusta"
name="Shadow Frusta">
<menu_item_check.on_check
@@ -3319,6 +3409,13 @@ function="World.EnvPreset"
<menu_item_call.on_click
function="Advanced.ClearShaderCache" />
</menu_item_call>
+ <menu_item_call
+ enabled="true"
+ label="Rebuild Terrain"
+ name="Rebuild Terrain">
+ <menu_item_call.on_click
+ function="Advanced.RebuildTerrain" />
+ </menu_item_call>
<menu_item_separator />
<menu_item_call
enabled="true"
@@ -3940,6 +4037,16 @@ function="World.EnvPreset"
function="Advanced.ToggleDebugCharacterVis" />
</menu_item_check>
<menu_item_check
+ label="Debug Character Rez State"
+ name="Debug Character Rez State">
+ <menu_item_check.on_check
+ function="CheckControl"
+ parameter="NameTagDebugAVRezState" />
+ <menu_item_check.on_click
+ function="ToggleControl"
+ parameter="NameTagDebugAVRezState" />
+ </menu_item_check>
+ <menu_item_check
label="Show Collision Skeleton"
name="Show Collision Skeleton">
<menu_item_check.on_check
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 3e1b1c4a67..4ed7c5250a 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -4002,10 +4002,39 @@ Are you sure you want to return objects owned by [USER_NAME]?
icon="alertmodal.tga"
name="InvalidTerrainBitDepth"
type="alertmodal">
+ <unique combine="cancel_old" />
Couldn&apos;t set region textures:
Terrain texture [TEXTURE_NUM] has an invalid bit depth of [TEXTURE_BIT_DEPTH].
-Replace texture [TEXTURE_NUM] with a 24-bit [MAX_SIZE]x[MAX_SIZE] or smaller image then click &quot;Apply&quot; again.
+Replace texture [TEXTURE_NUM] with an RGB [MAX_SIZE]x[MAX_SIZE] or smaller image then click &quot;Apply&quot; again.
+ <tag>fail</tag>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="InvalidTerrainAlphaNotFullyLoaded"
+ type="alertmodal">
+ <unique combine="cancel_old" />
+Couldn&apos;t set region textures:
+Terrain texture [TEXTURE_NUM] is not fully loaded, but is assumed to contain transparency due to a bit depth of [TEXTURE_BIT_DEPTH]. Transparency is not currently supported for terrain textures.
+
+If texture [TEXTURE_NUM] is opaque, wait for the texture to fully load and then click &quot;Apply&quot; again.
+
+Alpha is only supported for terrain materials (PBR Metallic Roughness), when alphaMode="MASK" and doubleSided=false.
+ <tag>fail</tag>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="InvalidTerrainAlpha"
+ type="alertmodal">
+ <unique combine="cancel_old" />
+Couldn&apos;t set region textures:
+Terrain texture [TEXTURE_NUM] contains transparency. Transparency is not currently supported for terrain textures.
+
+Replace texture [TEXTURE_NUM] with an opaque RGB image, then click &quot;Apply&quot; again.
+
+Alpha is only supported for terrain materials (PBR Metallic Roughness), when alphaMode="MASK" and doubleSided=false.
<tag>fail</tag>
</notification>
@@ -4013,10 +4042,55 @@ Replace texture [TEXTURE_NUM] with a 24-bit [MAX_SIZE]x[MAX_SIZE] or smaller ima
icon="alertmodal.tga"
name="InvalidTerrainSize"
type="alertmodal">
+ <unique combine="cancel_old" />
Couldn&apos;t set region textures:
Terrain texture [TEXTURE_NUM] is too large at [TEXTURE_SIZE_X]x[TEXTURE_SIZE_Y].
-Replace texture [TEXTURE_NUM] with a 24-bit [MAX_SIZE]x[MAX_SIZE] or smaller image then click &quot;Apply&quot; again.
+Replace texture [TEXTURE_NUM] with an RGB [MAX_SIZE]x[MAX_SIZE] or smaller image then click &quot;Apply&quot; again.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="InvalidTerrainMaterialNotLoaded"
+ type="alertmodal">
+ <unique combine="cancel_old" />
+Couldn&apos;t set region materials:
+Terrain material [MATERIAL_NUM] is not loaded.
+
+Wait for the material to load, or replace material [MATERIAL_NUM] with a valid material.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="InvalidTerrainMaterialLoadFailed"
+ type="alertmodal">
+ <unique combine="cancel_old" />
+Couldn&apos;t set region materials:
+Terrain material [MATERIAL_NUM] failed to load.
+
+Replace material [MATERIAL_NUM] with a valid material.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="InvalidTerrainMaterialDoubleSided"
+ type="alertmodal">
+ <unique combine="cancel_old" />
+Couldn&apos;t set region materials:
+Terrain material [MATERIAL_NUM] is double-sided. Double-sided materials are not currently supported for PBR terrain.
+
+Replace material [MATERIAL_NUM] with a material with doubleSided=false.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="InvalidTerrainMaterialAlphaMode"
+ type="alertmodal">
+ <unique combine="cancel_old" />
+Couldn&apos;t set region materials:
+Terrain material [MATERIAL_NUM] is using the unsupported alphaMode="[MATERIAL_ALPHA_MODE]".
+
+Replace material [MATERIAL_NUM] with a material with alphaMode="OPAQUE" or alphaMode="MASK".
</notification>
<notification
@@ -6218,6 +6292,17 @@ Are you sure you want to delete them?
yestext="OK"/>
</notification>
+ <notification
+ icon="alertmodal.tga"
+ name="ThumbnailSelectionTooLarge"
+ type="alertmodal">
+ <unique/>
+ You can only modify up to 50 thumbnails at a time.
+ <usetemplate
+ name="okbutton"
+ yestext="OK"/>
+ </notification>
+
<notification
icon="alertmodal.tga"
name="ConfirmUnlink"
@@ -9253,6 +9338,15 @@ Unable to upload texture: &apos;[NAME]&apos;
</notification>
<notification
+ icon="alertmodal.tga"
+ name="CannotLoad"
+ type="alertmodal">
+ Unable to load [WHAT].
+ [REASON]
+ <tag>fail</tag>
+ </notification>
+
+ <notification
icon="alertmodal.tga"
name="CannotUploadMaterial"
type="alertmodal">
@@ -12322,5 +12416,27 @@ are wearing now.
name="okignore"
yestext="OK"/>
</notification>
-
+
+ <notification
+ icon="alertmodal.tga"
+ name="GLTFOpenSelection"
+ type="alert">
+ You must select an object to act as a handle to the GLTF asset you are previewing.
+ <tag>fail</tag>
+ <usetemplate
+ name="okbutton"
+ yestext="OK"/>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="GLTFSaveSelection"
+ type="alert">
+ You must select an object that has a GLTF asset associated with it.
+ <tag>fail</tag>
+ <usetemplate
+ name="okbutton"
+ yestext="OK"/>
+ </notification>
+
</notifications>
diff --git a/indra/newview/skins/default/xui/en/panel_performance_nearby.xml b/indra/newview/skins/default/xui/en/panel_performance_nearby.xml
index ca961747c4..4409feb23a 100644
--- a/indra/newview/skins/default/xui/en/panel_performance_nearby.xml
+++ b/indra/newview/skins/default/xui/en/panel_performance_nearby.xml
@@ -135,18 +135,41 @@
name="exceptions_btn"
width="100">
</button>
- <check_box
- control_name="AlwaysRenderFriends"
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
height="16"
- initial_value="true"
- label="Always display friends in full detail"
- label_text.text_color="White"
layout="topleft"
- name="display_friends"
- top_pad="3"
left="18"
- width="256">
- </check_box>
+ top_pad="3"
+ name="AvatarComplexityModeLabel"
+ text_readonly_color="LabelDisabledColor"
+ width="128">
+ Avatar display:
+ </text>
+ <combo_box
+ control_name="RenderAvatarComplexityMode"
+ height="23"
+ layout="topleft"
+ left_delta="130"
+ top_delta="-4"
+ name="AvatarComplexityMode"
+ width="150">
+ <combo_box.item
+ label="Limit by complexity"
+ name="0"
+ value="0"/>
+ <combo_box.item
+ label="Always show friends"
+ name="1"
+ value="1"/>
+ <combo_box.item
+ label="Only show friends"
+ name="2"
+ value="2"/>
+ </combo_box>
<view_border
bevel_style="in"
height="0"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
index adc0337edd..5d347397bf 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
@@ -242,6 +242,41 @@
<button.commit_callback
function="Pref.AutoAdjustments"/>
</button>
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="30"
+ top_delta="42"
+ width="128"
+ name="AvatarComplexityModeLabel"
+ text_readonly_color="LabelDisabledColor">
+ Avatar display:
+ </text>
+ <combo_box
+ control_name="RenderAvatarComplexityMode"
+ height="23"
+ layout="topleft"
+ left_delta="130"
+ top_delta="-4"
+ name="AvatarComplexityMode"
+ width="150">
+ <combo_box.item
+ label="Limit by complexity"
+ name="0"
+ value="0"/>
+ <combo_box.item
+ label="Always show friends"
+ name="1"
+ value="1"/>
+ <combo_box.item
+ label="Only show friends"
+ name="2"
+ value="2"/>
+ </combo_box>
<slider
control_name="IndirectMaxComplexity"
@@ -250,7 +285,7 @@
height="16"
initial_value="101"
increment="1"
- label="Avatar Maximum Complexity:"
+ label="Avatar maximum complexity:"
label_width="165"
layout="topleft"
left="30"
@@ -258,7 +293,7 @@
max_val="101"
name="IndirectMaxComplexity"
show_text="false"
- top_delta="40"
+ top_delta="28"
width="300">
<slider.commit_callback
function="Pref.UpdateIndirectMaxComplexity"
@@ -277,32 +312,7 @@
width="65">
0
</text>
-<text
-type="string"
-length="1"
-follows="left|top"
-height="16"
-layout="topleft"
-left_delta="68"
-name="IndirectMaxComplexityLink"
-mouse_opaque="false"
-top_delta="0"
-width="120">
-[https://community.secondlife.com/t5/Featured-News/Why-are-all-these-people-made-of-colored-jelly/ba-p/3031255 What's this?]
-</text>
-
- <check_box
- control_name="AlwaysRenderFriends"
- height="16"
- initial_value="true"
- label="Always Render Friends"
- layout="topleft"
- left="30"
- name="AlwaysRenderFriends"
- top_delta="24"
- width="256">
- </check_box>
<button
height="23"
label="Exceptions..."
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 ad41691323..73e0a1000f 100644
--- a/indra/newview/skins/default/xui/en/panel_region_terrain.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_terrain.xml
@@ -79,26 +79,55 @@
<text
type="string"
length="1"
+ halign="left"
+ valign="center"
follows="left|top"
height="20"
layout="topleft"
- left="10"
name="detail_texture_text"
- top="110"
- width="300">
- Terrain Textures (requires 1024x1024, 24 bit .tga files)
+ left="10"
+ top="105"
+ width="170">
+ Terrain Textures
</text>
+ <text
+ type="string"
+ length="1"
+ halign="left"
+ valign="center"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ name="detail_material_text"
+ left="10"
+ top="105"
+ width="170">
+ Terrain Materials
+ </text>
+ <check_box
+ height="20"
+ halign="left"
+ valign="center"
+ follows="left|top"
+ layout="topleft"
+ top_delta="1"
+ left_delta="180"
+ label="PBR Metallic Roughness"
+ name="terrain_material_type"
+ tool_tip="If checked, use PBR Metallic Roughness materials for terrain. Otherwise, use textures."
+ left_pad="2"
+ width="200" />
<texture_picker
follows="left|top"
height="100"
layout="topleft"
- left_delta="0"
+ left="10"
name="texture_detail_0"
default_image_id="0bc58228-74a0-7e83-89bc-5c23464bcec5"
- top_delta="20"
+ top_delta="30"
width="100" />
<texture_picker
- follows="left|top"
+ follows="top"
height="100"
layout="topleft"
left_pad="10"
@@ -124,6 +153,50 @@
default_image_id="53a2f406-4895-1d13-d541-d2e3b86bc19c"
top_delta="0"
width="100" />
+ <texture_picker
+ visible="false"
+ follows="left|top"
+ height="100"
+ layout="topleft"
+ left="10"
+ name="material_detail_0"
+ pick_type="material"
+ default_image_id="968cbad0-4dad-d64e-71b5-72bf13ad051a"
+ top_delta="0"
+ width="100" />
+ <texture_picker
+ visible="false"
+ follows="left|top"
+ height="100"
+ layout="topleft"
+ left_pad="10"
+ name="material_detail_1"
+ pick_type="material"
+ default_image_id="968cbad0-4dad-d64e-71b5-72bf13ad051a"
+ top_delta="0"
+ width="100" />
+ <texture_picker
+ visible="false"
+ follows="left|top"
+ height="100"
+ layout="topleft"
+ left_pad="10"
+ name="material_detail_2"
+ pick_type="material"
+ default_image_id="968cbad0-4dad-d64e-71b5-72bf13ad051a"
+ top_delta="0"
+ width="100" />
+ <texture_picker
+ visible="false"
+ follows="left|top"
+ height="100"
+ layout="topleft"
+ left_pad="10"
+ name="material_detail_3"
+ pick_type="material"
+ default_image_id="968cbad0-4dad-d64e-71b5-72bf13ad051a"
+ top_delta="0"
+ width="100" />
<text
type="string"
length="1"
@@ -185,6 +258,19 @@
Texture Elevation Ranges
</text>
<text
+ visible="false"
+ type="string"
+ length="1"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left="10"
+ name="height_text_lbl5_material"
+ top_delta="0"
+ width="300">
+ Material Elevation Ranges
+ </text>
+ <text
follows="left|top"
height="20"
layout="topleft"
@@ -196,6 +282,18 @@
These values represent the blend range for the textures above.
</text>
<text
+ visible="false"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left="10"
+ name="height_text_lbl10_material"
+ top_delta="0"
+ width="200"
+ word_wrap="true">
+ These values represent the blend range for the materials above.
+ </text>
+ <text
follows="left|top"
height="60"
layout="topleft"
@@ -207,6 +305,18 @@
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
+ visible="false"
+ follows="left|top"
+ height="60"
+ layout="topleft"
+ left_delta="0"
+ name="height_text_lbl11_material"
+ top_delta="0"
+ width="200"
+ word_wrap="true">
+ Measured in meters, the LOW value is the MAXIMUM height of Material #1, and the HIGH value is the MINIMUM height of Material #4.
+ </text>
+ <text
follows="left|top"
height="20"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml b/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml
index 59ee0c6ad5..a29cdb5b41 100644
--- a/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml
+++ b/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml
@@ -9,7 +9,7 @@
top="0">
<string name="hdr_string">HDR Scale:</string>
<string name="brightness_string">Brightness:</string>
- <string name="hdr_tooltip">Intensity of lightning effects such as realistically bright skies and dynamic exposure. 1.0 is the default, 0 is off, values between 0 and 1 are mixing Ambient with HDR.</string>
+ <string name="hdr_tooltip">Intensity of lighting effects such as realistically bright skies and dynamic exposure. 1.0 is the default, 0 is off, values between 0 and 1 are mixing Ambient with HDR.</string>
<layout_stack
name="main_ls"
follows="all"
@@ -318,7 +318,7 @@
layout="topleft"
left_delta="-5"
top_delta="25"
- tooltip="Irradiance control. When not zero, enables HDR lighting model."
+ tool_tip="Irradiance control. When not zero, enables HDR lighting model."
width="200">
Reflection Probe Ambiance (HDR):
</text>
diff --git a/indra/newview/skins/default/xui/es/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/es/floater_texture_fetch_debugger.xml
deleted file mode 100644
index 59aaf7f74a..0000000000
--- a/indra/newview/skins/default/xui/es/floater_texture_fetch_debugger.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="TexFetchDebugger" title="Depurador de obtención de texturas">
- <text name="total_num_fetched_label">
- 1, Número total de texturas obtenidas: [NUM]
- </text>
- <text name="total_num_fetching_requests_label">
- 2, Número total de solicitudes de obtención: [NUM]
- </text>
- <text name="total_num_cache_hits_label">
- 3, Número total de aciertos de caché: [NUM]
- </text>
- <text name="total_num_visible_tex_label">
- 4, Número total de texturas visibles: [NUM]
- </text>
- <text name="total_num_visible_tex_fetch_req_label">
- 5, Número total de solicitudes de obtención de texturas visibles: [NUM]
- </text>
- <text name="total_fetched_data_label">
- 6, Número total de datos obtenidos: [SIZE1] KB, Datos descodificados: [SIZE2] KB, [PIXEL] MPíxeles
- </text>
- <text name="total_fetched_vis_data_label">
- 7, Número total de datos visibles: [SIZE1] KB, Datos descodificados: [SIZE2] KB
- </text>
- <text name="total_fetched_rendered_data_label">
- 8, Número total de datos representados: [SIZE1] KB, Datos descodificados: [SIZE2] KB, [PIXEL] MPíxeles
- </text>
- <text name="total_time_cache_read_label">
- 9, Tiempo total en lecturas de caché: [TIME] segundos
- </text>
- <text name="total_time_cache_write_label">
- 10, Tiempo total en escrituras de caché: [TIME] segundos
- </text>
- <text name="total_time_decode_label">
- 11, Tiempo total en descodificaciones: [TIME] segundos
- </text>
- <text name="total_time_gl_label">
- 12, Tiempo total en la creación de texturas gl: [TIME] segundos
- </text>
- <text name="total_time_http_label">
- 13, Tiempo total en obtención de HTTP: [TIME] segundos
- </text>
- <text name="total_time_fetch_label">
- 14, Tiempo total en obtención completa: [TIME] segundos
- </text>
- <text name="total_time_refetch_vis_cache_label">
- 15, Volviendo a obtener visibles de la caché, Tiempo: [TIME] segundos, Obtenidos: [SIZE] KB, [PIXEL] MPíxeles
- </text>
- <text name="total_time_refetch_all_cache_label">
- 16, Volviendo a obtener todas las texturas de caché, Tiempo: [TIME] segundos, Obtenidos: [SIZE] KB, [PIXEL] MPíxeles
- </text>
- <text name="total_time_refetch_vis_http_label">
- 17, Volviendo a obtener visibles de HTTP, Tiempo: [TIME] segundos, Obtenidos: [SIZE] KB, [PIXEL] MPíxeles
- </text>
- <text name="total_time_refetch_all_http_label">
- 18, Volviendo a obtener todas las texturas de HTTP, Tiempo: [TIME] segundos, Obtenidos: [SIZE] KB, [PIXEL] MPíxeles
- </text>
- <spinner label="19, Proporción de texeles/píxeles:" name="texel_pixel_ratio"/>
- <text name="texture_source_label">
- 20, Fuente de texturas:
- </text>
- <radio_group name="texture_source">
- <radio_item label="Caché + HTTP" name="0"/>
- <radio_item label="Solo HTTP" name="1"/>
- </radio_group>
- <button label="Iniciar" name="start_btn"/>
- <button label="Restablecer" name="clear_btn"/>
- <button label="Cerrar" name="close_btn"/>
- <button label="Lectura de caché" name="cacheread_btn"/>
- <button label="Escritura de caché" name="cachewrite_btn"/>
- <button label="HTTP" name="http_btn"/>
- <button label="Descodificar" name="decode_btn"/>
- <button label="Textura GL" name="gl_btn"/>
- <button label="Volver a obtener caché de vis." name="refetchviscache_btn"/>
- <button label="Volver a obtener toda la caché" name="refetchallcache_btn"/>
- <button label="Volver a obtener HTTP de vis." name="refetchvishttp_btn"/>
- <button label="Volver a obtener todo el HTTP" name="refetchallhttp_btn"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/es/panel_region_terrain.xml b/indra/newview/skins/default/xui/es/panel_region_terrain.xml
index 9aba5299cb..5e6e89893e 100644
--- a/indra/newview/skins/default/xui/es/panel_region_terrain.xml
+++ b/indra/newview/skins/default/xui/es/panel_region_terrain.xml
@@ -12,7 +12,7 @@ del terreno" name="terrain_raise_spin"/>
<spinner bottom_delta="-34" label="Límite de bajada del
terreno" name="terrain_lower_spin"/>
<text name="detail_texture_text">
- Texturas del terreno (requiere archivos .tga de 1024x1024, 24 bits)
+ Texturas del terreno
</text>
<text name="height_text_lbl">
1 (bajo)
diff --git a/indra/newview/skins/default/xui/fr/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/fr/floater_texture_fetch_debugger.xml
deleted file mode 100644
index caae15ea17..0000000000
--- a/indra/newview/skins/default/xui/fr/floater_texture_fetch_debugger.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="TexFetchDebugger" title="Outil de débogage de la récupération des textures">
- <text name="total_num_fetched_label">
- 1, nombre total de textures récupérées : [NUM]
- </text>
- <text name="total_num_fetching_requests_label">
- 2, nombre total de demandes de récupération : [NUM]
- </text>
- <text name="total_num_cache_hits_label">
- 3, nombre total de présences dans le cache : [NUM]
- </text>
- <text name="total_num_visible_tex_label">
- 4, nombre total de textures visibles : [NUM]
- </text>
- <text name="total_num_visible_tex_fetch_req_label">
- 5, nombre total de demandes de récupération de textures visibles : [NUM]
- </text>
- <text name="total_fetched_data_label">
- 6, nombre total de données récupérées : [SIZE1] Ko, données décodées : [SIZE2] Ko, [PIXEL] Mpixels
- </text>
- <text name="total_fetched_vis_data_label">
- 7, nombre total de données visibles : [SIZE1] Ko, données décodées : [SIZE2] Ko
- </text>
- <text name="total_fetched_rendered_data_label">
- 8, nombre total de données rendues : [SIZE1] Ko, données décodées : [SIZE2] Ko, [PIXEL] Mpixels
- </text>
- <text name="total_time_cache_read_label">
- 9, durée totale des lectures du cache : [TIME] secondes
- </text>
- <text name="total_time_cache_write_label">
- 10, durée totale des écritures du cache : [TIME] secondes
- </text>
- <text name="total_time_decode_label">
- 11, durée totale des décodages : [TIME] secondes
- </text>
- <text name="total_time_gl_label">
- 12, durée totale de la création de textures GL : [TIME] secondes
- </text>
- <text name="total_time_http_label">
- 13, durée totale de la récupération HTTP : [TIME] secondes
- </text>
- <text name="total_time_fetch_label">
- 14, durée totale de la récupération intégrale : [TIME] secondes
- </text>
- <text name="total_time_refetch_vis_cache_label">
- 15, nouvelle récupération des données visibles du cache, Durée : [TIME] secondes, Récupéré : [SIZE] Ko, [PIXEL] Mpixels
- </text>
- <text name="total_time_refetch_all_cache_label">
- 16, nouvelle récupération de toutes les textures du cache, Durée : [TIME] secondes, Récupéré : [SIZE] Ko, [PIXEL] Mpixels
- </text>
- <text name="total_time_refetch_vis_http_label">
- 17, nouvelle récupération des données visibles de la requête HTTP, Durée : [TIME] secondes, Récupéré : [SIZE] Ko, [PIXEL] Mpixels
- </text>
- <text name="total_time_refetch_all_http_label">
- 18, nouvelle récupération de toutes les textures de la requête HTTP, Durée : [TIME] secondes, Récupéré : [SIZE] Ko, [PIXEL] Mpixels
- </text>
- <spinner label="19, taux de texels/pixels :" name="texel_pixel_ratio"/>
- <text name="texture_source_label">
- 20, source des textures :
- </text>
- <radio_group name="texture_source">
- <radio_item label="Cache + HTTP" name="0"/>
- <radio_item label="HTTP uniquement" name="1"/>
- </radio_group>
- <button label="Démarrer" name="start_btn"/>
- <button label="Réinitialiser" name="clear_btn"/>
- <button label="Fermer" name="close_btn"/>
- <button label="Lecture du cache" name="cacheread_btn"/>
- <button label="Écriture du cache" name="cachewrite_btn"/>
- <button label="HTTP" name="http_btn"/>
- <button label="Décoder" name="decode_btn"/>
- <button label="Texture GL" name="gl_btn"/>
- <button label="Récupérer à nouveau les données visibles du cache" name="refetchviscache_btn"/>
- <button label="Récupérer cache" name="refetchallcache_btn"/>
- <button label="Récupérer à nouveau les données visibles de la requête HTTP" name="refetchvishttp_btn"/>
- <button label="Récupérer HTTP" name="refetchallhttp_btn"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/fr/panel_region_terrain.xml b/indra/newview/skins/default/xui/fr/panel_region_terrain.xml
index bbab00ca24..d99948804a 100644
--- a/indra/newview/skins/default/xui/fr/panel_region_terrain.xml
+++ b/indra/newview/skins/default/xui/fr/panel_region_terrain.xml
@@ -12,7 +12,7 @@ terrain" name="terrain_raise_spin"/>
<spinner bottom_delta="-34" label="Limite d&apos;abaissement
du terrain" name="terrain_lower_spin"/>
<text name="detail_texture_text">
- Textures du terrain (fichiers .tga 1024 x 1024, 24 bit requis)
+ Textures du terrain
</text>
<text name="height_text_lbl">
1 (Bas)
diff --git a/indra/newview/skins/default/xui/it/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/it/floater_texture_fetch_debugger.xml
deleted file mode 100644
index 49b6453319..0000000000
--- a/indra/newview/skins/default/xui/it/floater_texture_fetch_debugger.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="TexFetchDebugger" title="Debugger recupero texture">
- <text name="total_num_fetched_label">
- 1, Numero totale di texture recuperate: [NUM]
- </text>
- <text name="total_num_fetching_requests_label">
- 2, Numero totale di richieste di recupero: [NUM]
- </text>
- <text name="total_num_cache_hits_label">
- 3, Numero totale di recuperi dalla cache: [NUM]
- </text>
- <text name="total_num_visible_tex_label">
- 4, Numero totale di texture visibili: [NUM]
- </text>
- <text name="total_num_visible_tex_fetch_req_label">
- 5, Numero totale di richieste di fetching texture visibili: [NUM]
- </text>
- <text name="total_fetched_data_label">
- 6, Numero totale di fetching dati: [SIZE1] KB, Dati decodificati: [SIZE2] KB, [PIXEL] MPixel
- </text>
- <text name="total_fetched_vis_data_label">
- 7, Numero totale di dati visibili: [SIZE1] KB, Dati decodificati: [SIZE2] KB
- </text>
- <text name="total_fetched_rendered_data_label">
- 8, Numero totale di rendering dei dati: [SIZE1] KB, Dati decodificati: [SIZE2] KB, [PIXEL] MPixel
- </text>
- <text name="total_time_cache_read_label">
- 9, Tempo totale letture cache: [TIME] secondi
- </text>
- <text name="total_time_cache_write_label">
- 10, Tempo totale scrittura cache: [TIME] secondi
- </text>
- <text name="total_time_decode_label">
- 11, Tempo totale decodifica: [TIME] secondi
- </text>
- <text name="total_time_gl_label">
- 12, Tempo totale creazione texture gl: [TIME] secondi
- </text>
- <text name="total_time_http_label">
- 13, Tempo totale fetching HTTP: [TIME] secondi
- </text>
- <text name="total_time_fetch_label">
- 14, Tempo totale complessivo fetching: [TIME] secondi
- </text>
- <text name="total_time_refetch_vis_cache_label">
- 15, Nuovo fetching elementi visibili dalla cache, Tempo: [TIME] secondi, fetching: [SIZE] KB, [PIXEL] MPixels
- </text>
- <text name="total_time_refetch_all_cache_label">
- 16, Nuovo fetching di tutte le texture dalla cache, Tempo: [TIME] secondi, fetching: [SIZE] KB, [PIXEL] MPixels
- </text>
- <text name="total_time_refetch_vis_http_label">
- 17, Nuovo fetching elementi visibili da HTTP, Tempo: [TIME] secondi, fetching: [SIZE] KB, [PIXEL] MPixels
- </text>
- <text name="total_time_refetch_all_http_label">
- 18, Nuovo fetching di tutte le texture da HTTP, Tempo: [TIME] secondi, fetching: [SIZE] KB, [PIXEL] MPixels
- </text>
- <spinner label="19, Rapporto Texel/Pixel:" name="texel_pixel_ratio"/>
- <text name="texture_source_label">
- 20, Fonte texture:
- </text>
- <radio_group name="texture_source">
- <radio_item label="Cache + HTTP" name="0"/>
- <radio_item label="Solo HTTP" name="1"/>
- </radio_group>
- <button label="Attiva" name="start_btn"/>
- <button label="Reimposta" name="clear_btn"/>
- <button label="Chiudi" name="close_btn"/>
- <button label="Lettura cache" name="cacheread_btn"/>
- <button label="Scrittura cache" name="cachewrite_btn"/>
- <button label="HTTP" name="http_btn"/>
- <button label="Decodifica" name="decode_btn"/>
- <button label="Texture GL" name="gl_btn"/>
- <button label="Nuovo fetch visibili cache" name="refetchviscache_btn"/>
- <button label="Nuovo fetching di tutta la cache" name="refetchallcache_btn"/>
- <button label="Nuovo fetch visibili HTTP" name="refetchvishttp_btn"/>
- <button label="Nuovo fetching di tutto il contenuto HTTP" name="refetchallhttp_btn"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/it/panel_region_terrain.xml b/indra/newview/skins/default/xui/it/panel_region_terrain.xml
index e08c55f63b..0583b4e02e 100644
--- a/indra/newview/skins/default/xui/it/panel_region_terrain.xml
+++ b/indra/newview/skins/default/xui/it/panel_region_terrain.xml
@@ -12,7 +12,7 @@ terreno" name="terrain_raise_spin"/>
<spinner bottom_delta="-34" label="Limite di abbassamento
del terreno" name="terrain_lower_spin"/>
<text name="detail_texture_text">
- Texture terreno (richiede file 1024x1024, 24 bit .tga)
+ Texture terreno
</text>
<text name="height_text_lbl">
1 (basso)
diff --git a/indra/newview/skins/default/xui/ja/floater_outfit_photo_preview.xml b/indra/newview/skins/default/xui/ja/floater_outfit_photo_preview.xml
deleted file mode 100644
index 96809924c1..0000000000
--- a/indra/newview/skins/default/xui/ja/floater_outfit_photo_preview.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="outfit_photo_preview">
- <floater.string name="Title">
- テスクチャ:[NAME]
- </floater.string>
- <floater.string name="exceed_limits">
- アウトフィット画像の最大サイズは[MAX_WIDTH]✕[MAX_HEIGHT]です。他のテスクチャを選択してください。
- </floater.string>
- <floater.string name="photo_confirmation">
- この画像を[OUTFIT]のアウトフィット画像にしますか?
- </floater.string>
- <text name="dimensions">
- [WIDTH]px✕[HEIGHT]px
- </text>
- <text name="notification"/>
- <button label="OK" name="ok_btn"/>
- <button label="キャンセル" name="cancel_btn"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_simple_outfit_snapshot.xml b/indra/newview/skins/default/xui/ja/floater_simple_outfit_snapshot.xml
deleted file mode 100644
index 0b8030048d..0000000000
--- a/indra/newview/skins/default/xui/ja/floater_simple_outfit_snapshot.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="simple_outfit_snapshot" title="アウトフィットのスナップショット">
- <ui_ctrl name="thumbnail_placeholder"/>
- <button label="画像を撮影" name="new_snapshot_btn"/>
- <button label="保存(L$ [UPLOAD_COST])" name="save_btn"/>
- <button label="キャンセル" name="cancel_btn"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/ja/floater_texture_fetch_debugger.xml
deleted file mode 100644
index c22cbba0d5..0000000000
--- a/indra/newview/skins/default/xui/ja/floater_texture_fetch_debugger.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="TexFetchDebugger" title="テクスチャ取得デバッガ">
- <text name="total_num_fetched_label">
- 1,取得したテクスチャの合計数:[NUM]
- </text>
- <text name="total_num_fetching_requests_label">
- 2,取得リクエストの合計数:[NUM]
- </text>
- <text name="total_num_cache_hits_label">
- 3,キャッシュヒットの合計数:[NUM]
- </text>
- <text name="total_num_visible_tex_label">
- 4,表示テクスチャの合計数:[NUM]
- </text>
- <text name="total_num_visible_tex_fetch_req_label">
- 5,表示テクスチャ取得リクエストの合計数:[NUM]
- </text>
- <text name="total_fetched_data_label">
- 6,取得したデータの合計数:[SIZE1]㎅、デコードされたデータ:[SIZE2]㎅、[PIXEL]メガピクセル
- </text>
- <text name="total_fetched_vis_data_label">
- 7,表示データの合計数:[SIZE1]㎅、デコードされたデータ:[SIZE2]㎅
- </text>
- <text name="total_fetched_rendered_data_label">
- 8,レンダリングされたデータの合計数:[SIZE1]㎅、デコードされたデータ:[SIZE2]㎅、[PIXEL]メガピクセル
- </text>
- <text name="total_time_cache_read_label">
- 9,キャッシュ読み取りの合計時間:[TIME]秒
- </text>
- <text name="total_time_cache_write_label">
- 10,キャッシュ書き込みの合計時間:[TIME]秒
- </text>
- <text name="total_time_decode_label">
- 11,デコードの合計時間:[TIME]秒
- </text>
- <text name="total_time_gl_label">
- 12,glテクスチャ作成の合計時間:[TIME]秒
- </text>
- <text name="total_time_http_label">
- 13,HTTP取得の合計時間:[TIME]秒
- </text>
- <text name="total_time_fetch_label">
- 14,取得全体の合計時間:[TIME]秒
- </text>
- <text name="total_time_refetch_vis_cache_label">
- 15,キャッシュから表示テクスチャを再取得、時間:[TIME]秒、取得:[SIZE]㎅、[PIXEL]メガピクセル
- </text>
- <text name="total_time_refetch_all_cache_label">
- 16,キャッシュからすべてのテクスチャを再フェッチ中、時間:[TIME]秒、フェッチ済み:[SIZE]㎅、[PIXEL]メガピクセル
- </text>
- <text name="total_time_refetch_vis_http_label">
- 17,HTTPから可視ファイルを再フェッチ中、時間:[TIME]秒、フェッチ済み:[SIZE]㎅、[PIXEL]メガピクセル
- </text>
- <text name="total_time_refetch_all_http_label">
- 18,HTTPからすべてのテクスチャを再フェッチ中、時間:[TIME]秒、フェッチ済み:[SIZE]㎅、[PIXEL]メガピクセル
- </text>
- <spinner label="19、テセル/ピクセル比:" name="texel_pixel_ratio"/>
- <text name="texture_source_label">
- 20、テクスチャ ソース:
- </text>
- <radio_group name="texture_source">
- <radio_item label="キャッシュ + HTTP" name="0"/>
- <radio_item label="HTTP のみ" name="1"/>
- </radio_group>
- <button label="開始" name="start_btn"/>
- <button label="リセット" name="clear_btn"/>
- <button label="閉じる" name="close_btn"/>
- <button label="キャッシュ読み取り" name="cacheread_btn"/>
- <button label="キャッシュ書き込み" name="cachewrite_btn"/>
- <button label="HTTP" name="http_btn"/>
- <button label="デコード" name="decode_btn"/>
- <button label="GLテクスチャ" name="gl_btn"/>
- <button label="キャッシュ表示テクスチャ再取得" name="refetchviscache_btn"/>
- <button label="すべてのキャッシュを再フェッチ" name="refetchallcache_btn"/>
- <button label="HTTP表示テクスチャ再取得" name="refetchvishttp_btn"/>
- <button label="すべての HTTP を再フェッチ" name="refetchallhttp_btn"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_grids.xml b/indra/newview/skins/default/xui/ja/panel_preferences_grids.xml
deleted file mode 100644
index 18aca0dafc..0000000000
--- a/indra/newview/skins/default/xui/ja/panel_preferences_grids.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="グリッド" name="grids">
- <text name="add_grid_text">
- 新しいグリッドを追加:
- </text>
- <line_editor name="add_grid" label="ログインURIを入力"/>
- <button label="追加" name="add_grid_commit"/>
- <text name="manage_grid_text">
- グリッド管理:
- </text>
- <scroll_list name="grid_list">
- <scroll_list.columns label="グリッド名" name="grid_label"/>
- <scroll_list.columns label="ログインURI" name="login_uri"/>
- <scroll_list.commit_callback function="Pref.SelectGrid"/>
- </scroll_list>
- <button label="有効化" name="activate_grid"/>
- <button label="リフレッシュ" name="refresh_grid"/>
- <button label="削除" name="remove_grid"/>
- <button label="デバッグ" name="debug_grid"/>
- <check_box label="ログイン時にグリッド選択を表示" name="show_grid_selection_check" tool_tip="ログイン画面にグリッド選択を表示して、他のワールドにログインします。"/>
-</panel>
diff --git a/indra/newview/skins/default/xui/ja/panel_region_terrain.xml b/indra/newview/skins/default/xui/ja/panel_region_terrain.xml
index 5470bd6e3b..11e8d0d169 100644
--- a/indra/newview/skins/default/xui/ja/panel_region_terrain.xml
+++ b/indra/newview/skins/default/xui/ja/panel_region_terrain.xml
@@ -10,7 +10,7 @@
<spinner label="地形の上昇限度" name="terrain_raise_spin"/>
<spinner label="地形の下降限度" name="terrain_lower_spin"/>
<text name="detail_texture_text">
- 地形テクスチャ(1024✕1024 の 24 bit .tga ファイル)
+ 地形テクスチャ
</text>
<text name="height_text_lbl">
1(低)
diff --git a/indra/newview/skins/default/xui/pl/floater_outfit_photo_preview.xml b/indra/newview/skins/default/xui/pl/floater_outfit_photo_preview.xml
deleted file mode 100644
index 8c7de8e34e..0000000000
--- a/indra/newview/skins/default/xui/pl/floater_outfit_photo_preview.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="outfit_photo_preview">
- <floater.string name="Title">
- Tekstura: [NAME]
- </floater.string>
- <floater.string name="exceed_limits">
- Maks. rozmiar zdjęcia stroju to [MAX_WIDTH]*[MAX_HEIGHT]. Wybierz inną teksturę.
- </floater.string>
- <floater.string name="photo_confirmation">
- Ustawić to zdjęcie dla stroju [OUTFIT]?
- </floater.string>
- <button label="Anuluj" name="cancel_btn" />
-</floater>
diff --git a/indra/newview/skins/default/xui/pl/floater_simple_outfit_snapshot.xml b/indra/newview/skins/default/xui/pl/floater_simple_outfit_snapshot.xml
deleted file mode 100644
index 1a60b557b2..0000000000
--- a/indra/newview/skins/default/xui/pl/floater_simple_outfit_snapshot.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="simple_outfit_snapshot" title="ZDJĘCIE STROJU">
- <button label="Zrób zdjęcie" name="new_snapshot_btn" />
- <button label="Zapisz ([UPLOAD_COST]L$)" name="save_btn" />
- <button label="Anuluj" name="cancel_btn" />
-</floater>
diff --git a/indra/newview/skins/default/xui/pl/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/pl/floater_texture_fetch_debugger.xml
deleted file mode 100644
index fc0687f333..0000000000
--- a/indra/newview/skins/default/xui/pl/floater_texture_fetch_debugger.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="TexFetchDebugger" title="Debuger ładowania tekstur">
- <text name="total_num_fetched_label">
- 1, Pobranych tekstur: [NUM]
- </text>
- <text name="total_num_fetching_requests_label">
- 2, Próśb o pobranie: [NUM]
- </text>
- <text name="total_num_cache_hits_label">
- 3, Trafień w cache: [NUM]
- </text>
- <text name="total_num_visible_tex_label">
- 4, Widocznych tekstur: [NUM]
- </text>
- <text name="total_num_visible_tex_fetch_req_label">
- 5, Próśb o pobranie widocznych tekstur: [NUM]
- </text>
- <text name="total_fetched_data_label">
- 6, Pobrane: [SIZE1]KB, zdekodowane: [SIZE2]KB, [PIXEL]MPikseli
- </text>
- <text name="total_fetched_vis_data_label">
- 7, Widoczne: [SIZE1]KB, zdekodowane: [SIZE2]KB
- </text>
- <text name="total_fetched_rendered_data_label">
- 8, Zrenderowane: [SIZE1]KB, zdekodowane: [SIZE2]KB, [PIXEL]MPikseli
- </text>
- <text name="total_time_cache_read_label">
- 9, Odczyty cache: [TIME] sekund
- </text>
- <text name="total_time_cache_write_label">
- 10, Zapisy cache: [TIME] sekund
- </text>
- <text name="total_time_decode_label">
- 11, Zdekodowania: [TIME] sekund
- </text>
- <text name="total_time_gl_label">
- 12, Tworzenie tekstur GL: [TIME] sekund
- </text>
- <text name="total_time_http_label">
- 13, Pobieranie przez HTTP: [TIME] sekund
- </text>
- <text name="total_time_fetch_label">
- 14, Pobieranie w sumie: [TIME] sekund
- </text>
- <text name="total_time_refetch_vis_cache_label">
- 15, Ponowne pobier. widocznych z cache, czas: [TIME] sekund, pobrano: [SIZE]KB, [PIXEL]MPikseli
- </text>
- <text name="total_time_refetch_all_cache_label">
- 16, Ponowne pobier. wszystkich z cache, czas: [TIME] sekund, pobrano: [SIZE]KB, [PIXEL]MPikseli
- </text>
- <text name="total_time_refetch_vis_http_label">
- 17, Ponowne pobier. widocznych z HTTP, czas: [TIME] sekund, pobrano: [SIZE]KB, [PIXEL]MPikseli
- </text>
- <text name="total_time_refetch_all_http_label">
- 18, Ponowne pobier. wszystkich z HTTP, czas: [TIME] sekund, pobrano: [SIZE]KB, [PIXEL]MPikseli
- </text>
- <spinner label="19, Wspł. Teksel/Piksel:" name="texel_pixel_ratio" />
- <text name="texture_source_label">
- 20, Źródło tekstur:
- </text>
- <radio_group name="texture_source">
- <radio_item label="Tylko HTTP" name="1" />
- </radio_group>
- <button label="Zamknij" name="close_btn" />
- <button label="Odcz. cache" name="cacheread_btn" />
- <button label="Zapis cache" name="cachewrite_btn" />
- <button label="Dekoduj" name="decode_btn" />
- <button label="Tekstura GL" name="gl_btn" />
- <button label="Odśw. przez cache" name="refetchviscache_btn" />
- <button label="Odśw. całe cache" name="refetchallcache_btn" />
- <button label="Odśw. przez HTTP" name="refetchvishttp_btn" />
- <button label="Odśw. całe HTTP" name="refetchallhttp_btn" />
-</floater>
diff --git a/indra/newview/skins/default/xui/pl/panel_region_terrain.xml b/indra/newview/skins/default/xui/pl/panel_region_terrain.xml
index 2d4286334f..c1dde04ff0 100644
--- a/indra/newview/skins/default/xui/pl/panel_region_terrain.xml
+++ b/indra/newview/skins/default/xui/pl/panel_region_terrain.xml
@@ -7,7 +7,7 @@
<spinner label="Górny limit terenu" name="terrain_raise_spin" />
<spinner label="Dolny limit terenu" name="terrain_lower_spin" />
<text name="detail_texture_text">
- Tekstury terenu (1024x1024, 24 bitowy plik .tga)
+ Tekstury terenu
</text>
<text name="height_text_lbl">
1 (Nisko)
diff --git a/indra/newview/skins/default/xui/pt/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/pt/floater_texture_fetch_debugger.xml
deleted file mode 100644
index 0e897aea09..0000000000
--- a/indra/newview/skins/default/xui/pt/floater_texture_fetch_debugger.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="TexFetchDebugger" title="Depurador de obtenção de textura">
- <text name="total_num_fetched_label">
- 1, Número total de texturas obtidas: [NUM]
- </text>
- <text name="total_num_fetching_requests_label">
- 2, Número total de solicitações de obtenção: [NUM]
- </text>
- <text name="total_num_cache_hits_label">
- 3, Número total de acertos de cache: [NUM]
- </text>
- <text name="total_num_visible_tex_label">
- 4, Número total de texturas visíveis: [NUM]
- </text>
- <text name="total_num_visible_tex_fetch_req_label">
- 5, Número total de solicitações de obtenção de texturas visíveis: [NUM]
- </text>
- <text name="total_fetched_data_label">
- 6, Número total de dados obtidos: [SIZE1]KB, Dados decodificados: [SIZE2]KB, [PIXEL]MPixels
- </text>
- <text name="total_fetched_vis_data_label">
- 7, Número total de dados visíveis: [SIZE1]KB, Dados decodificados: [SIZE2]KB
- </text>
- <text name="total_fetched_rendered_data_label">
- 8, Número total de dados renderizados: [SIZE1]KB, Dados decodificados: [SIZE2]KB, [PIXEL]MPixels
- </text>
- <text name="total_time_cache_read_label">
- 9, Tempo total de leituras de cache: [TIME] segundos
- </text>
- <text name="total_time_cache_write_label">
- 10, Tempo total de gravações em cache: [TIME] segundos
- </text>
- <text name="total_time_decode_label">
- 11, Tempo total das decodificações: [TIME] segundos
- </text>
- <text name="total_time_gl_label">
- 12, Tempo total de criação de texturas gl: [TIME] segundos
- </text>
- <text name="total_time_http_label">
- 13, Tempo total de obtenção de HTTP: [TIME] segundos
- </text>
- <text name="total_time_fetch_label">
- 14, Tempo total de obtenção completa: [TIME] segundos
- </text>
- <text name="total_time_refetch_vis_cache_label">
- 15, Obtendo novamente visíveis do cache, Tempo: [TIME] segundos, Obtidos: [SIZE]KB, [PIXEL]MPixels
- </text>
- <text name="total_time_refetch_all_cache_label">
- 16, Obtendo novamente todas as texturas do cache, Tempo: [TIME] segundos, Obtidos: [SIZE]KB, [PIXEL]MPixels
- </text>
- <text name="total_time_refetch_vis_http_label">
- 17, Obtendo novamente visíveis do HTTP, Tempo: [TIME] segundos, Obtidos: [SIZE]KB, [PIXEL]MPixels
- </text>
- <text name="total_time_refetch_all_http_label">
- 18, Obtendo novamente todas as texturas do HTTP, Tempo: [TIME] segundos, Obtidos: [SIZE]KB, [PIXEL]MPixels
- </text>
- <spinner label="19, Proporção de texel/pixel:" name="texel_pixel_ratio"/>
- <text name="texture_source_label">
- 20, Origem da textura:
- </text>
- <radio_group name="texture_source">
- <radio_item label="Cache + HTTP" name="0"/>
- <radio_item label="Apenas HTTP" name="1"/>
- </radio_group>
- <button label="Iniciar" name="start_btn"/>
- <button label="Redefinir" name="clear_btn"/>
- <button label="Fechar" name="close_btn"/>
- <button label="Leitura do cache" name="cacheread_btn"/>
- <button label="Gravação em cache" name="cachewrite_btn"/>
- <button label="HTTP" name="http_btn"/>
- <button label="Decodificar" name="decode_btn"/>
- <button label="Textura GL" name="gl_btn"/>
- <button label="Obter novamente cache visível" name="refetchviscache_btn"/>
- <button label="Obter todo o cache novamente" name="refetchallcache_btn"/>
- <button label="Obter novamente HTTP visível" name="refetchvishttp_btn"/>
- <button label="Obter todo o HTTP novamente" name="refetchallhttp_btn"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/pt/panel_region_terrain.xml b/indra/newview/skins/default/xui/pt/panel_region_terrain.xml
index 1d312aeed9..92d6859882 100644
--- a/indra/newview/skins/default/xui/pt/panel_region_terrain.xml
+++ b/indra/newview/skins/default/xui/pt/panel_region_terrain.xml
@@ -12,7 +12,7 @@ terreno" name="terrain_raise_spin"/>
<spinner bottom_delta="-34" label="Limite mais baixo do
terreno" name="terrain_lower_spin"/>
<text name="detail_texture_text">
- Texturas de terreno (exige arquivos .tga 1024x1024, 24 bit)
+ Texturas de terreno
</text>
<text name="height_text_lbl">
1 (Baixo)
diff --git a/indra/newview/skins/default/xui/ru/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/ru/floater_texture_fetch_debugger.xml
deleted file mode 100644
index 628e6c5c87..0000000000
--- a/indra/newview/skins/default/xui/ru/floater_texture_fetch_debugger.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="TexFetchDebugger" title="Отладчик извлечения текстур">
- <text name="total_num_fetched_label">
- 1, Общее количество извлеченных текстур: [NUM]
- </text>
- <text name="total_num_fetching_requests_label">
- 2, Общее количество запросов на извлечение: [NUM]
- </text>
- <text name="total_num_cache_hits_label">
- 3, Общее количество попаданий в кэш: [NUM]
- </text>
- <text name="total_num_visible_tex_label">
- 4, Общее количество видимых текстур: [NUM]
- </text>
- <text name="total_num_visible_tex_fetch_req_label">
- 5, Общее количество запросов на извлечение видимых текстур: [NUM]
- </text>
- <text name="total_fetched_data_label">
- 6, Общий объем извлеченных данных: [SIZE1] КБ, декодированные данные: [SIZE2] КБ, [PIXEL] Мпикселов
- </text>
- <text name="total_fetched_vis_data_label">
- 7, Общий объем видимых данных: [SIZE1] КБ, декодированные данные: [SIZE2] КБ
- </text>
- <text name="total_fetched_rendered_data_label">
- 8, Общий объем визуализированных данных: [SIZE1] КБ, декодированные данные: [SIZE2] КБ, [PIXEL] Мпикселов
- </text>
- <text name="total_time_cache_read_label">
- 9, Общее время чтения из кэша: [TIME] с
- </text>
- <text name="total_time_cache_write_label">
- 10, Общее время записи в кэш: [TIME] с
- </text>
- <text name="total_time_decode_label">
- 11, Общее время декодирования: [TIME] с
- </text>
- <text name="total_time_gl_label">
- 12, Общее время создания текстур: [TIME] с
- </text>
- <text name="total_time_http_label">
- 13, Общее время HTTP-извлечения: [TIME] с
- </text>
- <text name="total_time_fetch_label">
- 14, Общее время полного извлечения: [TIME] с
- </text>
- <text name="total_time_refetch_vis_cache_label">
- 15, Повторное извлечение из кэша, время: [TIME] с, извлечено: [SIZE] КБ, [PIXEL] Мпикселов
- </text>
- <text name="total_time_refetch_all_cache_label">
- 16, Повторное извлечение всех текстур из кэша, время: [TIME] с, извлечено: [SIZE] КБ, [PIXEL] Мпикселов
- </text>
- <text name="total_time_refetch_vis_http_label">
- 17, Повторное извлечение из HTTP, время: [TIME] с, извлечено: [SIZE] КБ, [PIXEL] Мпикселов
- </text>
- <text name="total_time_refetch_all_http_label">
- 18, Повторное извлечение всех текстур из HTTP, время: [TIME] с, извлечено: [SIZE] КБ, [PIXEL] Мпикселов
- </text>
- <spinner label="19, Отношение текселы/пикселы:" name="texel_pixel_ratio"/>
- <text name="texture_source_label">
- 20, Истояник текстур:
- </text>
- <radio_group name="texture_source">
- <radio_item label="Кэш + HTTP" name="0"/>
- <radio_item label="Только HTTP" name="1"/>
- </radio_group>
- <button label="Пуск" name="start_btn"/>
- <button label="Сброс" name="clear_btn"/>
- <button label="Закрыть" name="close_btn"/>
- <button label="Чтение кэша" name="cacheread_btn"/>
- <button label="Запись в кэш" name="cachewrite_btn"/>
- <button label="HTTP" name="http_btn"/>
- <button label="Декодировать" name="decode_btn"/>
- <button label="Текстура GL" name="gl_btn"/>
- <button label="Повторно извлечь из кэша" name="refetchviscache_btn"/>
- <button label="Повторно извлечь все из кэша" name="refetchallcache_btn"/>
- <button label="Повторно извлечь из HTTP" name="refetchvishttp_btn"/>
- <button label="Повторно извлечь все из HTTP" name="refetchallhttp_btn"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/ru/panel_region_terrain.xml b/indra/newview/skins/default/xui/ru/panel_region_terrain.xml
index 76b4f513a8..2752d409cb 100644
--- a/indra/newview/skins/default/xui/ru/panel_region_terrain.xml
+++ b/indra/newview/skins/default/xui/ru/panel_region_terrain.xml
@@ -10,7 +10,7 @@
<spinner label="Верх. точка ландшафта" name="terrain_raise_spin"/>
<spinner label="Ниж. точка ландшафта" name="terrain_lower_spin"/>
<text name="detail_texture_text">
- Текстуры ландшафта (требования: 1024x1024, 24-битные, TGA)
+ Текстуры ландшафта
</text>
<text name="height_text_lbl">
1 (Низ)
diff --git a/indra/newview/skins/default/xui/tr/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/tr/floater_texture_fetch_debugger.xml
deleted file mode 100644
index 42426225c7..0000000000
--- a/indra/newview/skins/default/xui/tr/floater_texture_fetch_debugger.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="TexFetchDebugger" title="Doku Alımı Hata Ayıklayıcı">
- <text name="total_num_fetched_label">
- 1, Alınan dokuların toplam sayısı: [NUM]
- </text>
- <text name="total_num_fetching_requests_label">
- 2, Toplam alım talebi sayısı: [NUM]
- </text>
- <text name="total_num_cache_hits_label">
- 3, Toplam önbellek isabet sayısı: [NUM]
- </text>
- <text name="total_num_visible_tex_label">
- 4, Görünür dokuların toplam sayısı: [NUM]
- </text>
- <text name="total_num_visible_tex_fetch_req_label">
- 5, Görünür dokuların alınması için toplam talep sayısı: [NUM]
- </text>
- <text name="total_fetched_data_label">
- 6, Alınan verilerin toplam sayısı: [SIZE1]KB, Şifresi Çözülen Veri: [SIZE2]KB, [PIXEL]MPiksel
- </text>
- <text name="total_fetched_vis_data_label">
- 7, Görünür verilerin toplam sayısı: [SIZE1]KB, Şifresi Çözülen Veri: [SIZE2]KB
- </text>
- <text name="total_fetched_rendered_data_label">
- 8, İşlenen verilerin toplam sayısı: [SIZE1]KB, Şifresi Çözülen Veri: [SIZE2]KB, [PIXEL]MPiksel
- </text>
- <text name="total_time_cache_read_label">
- 9, Önbellek okunması için toplam süre: [TIME] saniye
- </text>
- <text name="total_time_cache_write_label">
- 10, Önbellek yazılması için toplam süre: [TIME] saniye
- </text>
- <text name="total_time_decode_label">
- 11, Şifre çözülmesi için toplam süre: [TIME] saniye
- </text>
- <text name="total_time_gl_label">
- 12, GL doku oluşturma için toplam süre: [TIME] saniye
- </text>
- <text name="total_time_http_label">
- 13, HTTP alımı için toplam süre: [TIME] saniye
- </text>
- <text name="total_time_fetch_label">
- 14, Tüm alımlar için toplam süre: [TIME] saniye
- </text>
- <text name="total_time_refetch_vis_cache_label">
- 15, Görünür dokuların önbellekten tekrar alınması, Süre: [TIME] saniye, Alınan: [SIZE]KB, [PIXEL]MPiksel
- </text>
- <text name="total_time_refetch_all_cache_label">
- 16, Tüm dokuların önbellekten tekrar alınması, Süre: [TIME] saniye, Alınan: [SIZE]KB, [PIXEL]MPiksel
- </text>
- <text name="total_time_refetch_vis_http_label">
- 17, Görünür dokuların HTTP&apos;den tekrar alınması, Süre: [TIME] saniye, Alınan: [SIZE]KB, [PIXEL]MPiksel
- </text>
- <text name="total_time_refetch_all_http_label">
- 18, Tüm dokuların HTTP&apos;den tekrar alınması, Süre: [TIME] saniye, Alınan: [SIZE]KB, [PIXEL]MPiksel
- </text>
- <spinner label="19, Teksel/Piksel Oranı:" name="texel_pixel_ratio"/>
- <text name="texture_source_label">
- 20, Doku Kaynağı:
- </text>
- <radio_group name="texture_source">
- <radio_item label="Önbellek + HTTP" name="0"/>
- <radio_item label="Sadece HTTP" name="1"/>
- </radio_group>
- <button label="Başla" name="start_btn"/>
- <button label="Sıfırla" name="clear_btn"/>
- <button label="Kapat" name="close_btn"/>
- <button label="Önbellek Okunması" name="cacheread_btn"/>
- <button label="Önbellek Yazılması" name="cachewrite_btn"/>
- <button label="HTTP" name="http_btn"/>
- <button label="Şifre Çöz" name="decode_btn"/>
- <button label="GL Dokusu" name="gl_btn"/>
- <button label="Görünür Dokuları Önbellekten Tekrar Al" name="refetchviscache_btn"/>
- <button label="Tüm Önbelleği Tekrar Al" name="refetchallcache_btn"/>
- <button label="Görünür Dokuları HTTP&apos;den Tekrar Al" name="refetchvishttp_btn"/>
- <button label="Tüm HTTP&apos;yi Tekrar Al" name="refetchallhttp_btn"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/tr/panel_region_terrain.xml b/indra/newview/skins/default/xui/tr/panel_region_terrain.xml
index e25047301d..00560d4c5b 100644
--- a/indra/newview/skins/default/xui/tr/panel_region_terrain.xml
+++ b/indra/newview/skins/default/xui/tr/panel_region_terrain.xml
@@ -10,7 +10,7 @@
<spinner label="Yüzey Yükslt. Limiti" name="terrain_raise_spin"/>
<spinner label="Yüzey Alçatma Limiti" name="terrain_lower_spin"/>
<text name="detail_texture_text">
- Yüzey Dokuları (1024x1024, 24 bit .tga dosyalar gerektirir)
+ Yüzey Dokuları
</text>
<text name="height_text_lbl">
1 (Düşük)
diff --git a/indra/newview/skins/default/xui/zh/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/zh/floater_texture_fetch_debugger.xml
deleted file mode 100644
index 0dcac17a75..0000000000
--- a/indra/newview/skins/default/xui/zh/floater_texture_fetch_debugger.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="TexFetchDebugger" title="材質擷取除錯器">
- <text name="total_num_fetched_label">
- 1. 已擷取材質總數:[NUM]
- </text>
- <text name="total_num_fetching_requests_label">
- 2. 總擷取請求數:[NUM]
- </text>
- <text name="total_num_cache_hits_label">
- 3. 快取總讀取數:[NUM]
- </text>
- <text name="total_num_visible_tex_label">
- 4. 可見材質總數:[NUM]
- </text>
- <text name="total_num_visible_tex_fetch_req_label">
- 5. 可見材質擷取總請求數:[NUM]
- </text>
- <text name="total_fetched_data_label">
- 6. 總擷取資料量:[SIZE1] KB,解碼資料量:[SIZE2] KB,[PIXEL] 百萬像素
- </text>
- <text name="total_fetched_vis_data_label">
- 7. 可見資料總量:[SIZE1] KB,解碼資料量:[SIZE2] KB
- </text>
- <text name="total_fetched_rendered_data_label">
- 8. 總呈像資料量:[SIZE1] KB,解碼資料量:[SIZE2] KB,[PIXEL] 百萬像素
- </text>
- <text name="total_time_cache_read_label">
- 9. 快取讀取總時間:[TIME] 秒
- </text>
- <text name="total_time_cache_write_label">
- 10. 快取寫入總時間:[TIME] 秒
- </text>
- <text name="total_time_decode_label">
- 11. 解碼總時間:[TIME] 秒
- </text>
- <text name="total_time_gl_label">
- 12. 建立 gl 材質總時間:[TIME] 秒
- </text>
- <text name="total_time_http_label">
- 13. HTTP 擷取總時間:[TIME] 秒
- </text>
- <text name="total_time_fetch_label">
- 14. 所有擷取動作總時間:[TIME] 秒
- </text>
- <text name="total_time_refetch_vis_cache_label">
- 15. 自快取重新擷取可見材質,時間:[TIME] 秒,擷取量:[SIZE] KB,[PIXEL] 百萬像素
- </text>
- <text name="total_time_refetch_all_cache_label">
- 16. 從快取重新擷取所有材質,時間:[TIME] 秒,擷取量:[SIZE] KB,[PIXEL] 百萬像素
- </text>
- <text name="total_time_refetch_vis_http_label">
- 17. 自 HTTP 重新擷取可見材質,時間:[TIME] 秒,擷取量:[SIZE] KB,[PIXEL] 百萬像素
- </text>
- <text name="total_time_refetch_all_http_label">
- 18. 自 HTTP 重新擷取所有材質,時間:[TIME] 秒,擷取量:[SIZE] KB,[PIXEL] 百萬像素
- </text>
- <spinner label="19. 材質/像素比率:" name="texel_pixel_ratio"/>
- <text name="texture_source_label">
- 20. 材質來源:
- </text>
- <radio_group name="texture_source">
- <radio_item label="快取 + HTTP" name="0"/>
- <radio_item label="僅限 HTTP" name="1"/>
- </radio_group>
- <button label="開始" name="start_btn"/>
- <button label="重設" name="clear_btn"/>
- <button label="關閉" name="close_btn"/>
- <button label="快取讀取" name="cacheread_btn"/>
- <button label="快取寫入" name="cachewrite_btn"/>
- <button label="HTTP" name="http_btn"/>
- <button label="解碼" name="decode_btn"/>
- <button label="GL 材質" name="gl_btn"/>
- <button label="快取重取可見材質" name="refetchviscache_btn"/>
- <button label="重新擷取所有快取" name="refetchallcache_btn"/>
- <button label="HTTP 重取可見材質" name="refetchvishttp_btn"/>
- <button label="重新擷取所有 HTTP" name="refetchallhttp_btn"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/zh/panel_region_terrain.xml b/indra/newview/skins/default/xui/zh/panel_region_terrain.xml
index 81bce46876..8490eeaafc 100644
--- a/indra/newview/skins/default/xui/zh/panel_region_terrain.xml
+++ b/indra/newview/skins/default/xui/zh/panel_region_terrain.xml
@@ -10,7 +10,7 @@
<spinner label="地形提升限制" name="terrain_raise_spin"/>
<spinner label="地形降低限制" name="terrain_lower_spin"/>
<text name="detail_texture_text">
- 地形材質(須 1024x1024,24 位元 .tga 檔格式)
+ 地形材質
</text>
<text name="height_text_lbl">
1(低)
diff --git a/indra/newview/tests/llagentaccess_test.cpp b/indra/newview/tests/llagentaccess_test.cpp
index 45ce1ba62f..7d1071e98a 100644
--- a/indra/newview/tests/llagentaccess_test.cpp
+++ b/indra/newview/tests/llagentaccess_test.cpp
@@ -55,12 +55,12 @@ LLControlVariable* LLControlGroup::declareU32(const std::string& name, U32 initi
return NULL;
}
-void LLControlGroup::setU32(const std::string& name, U32 val)
+void LLControlGroup::setU32(std::string_view name, U32 val)
{
test_preferred_maturity = val;
}
-U32 LLControlGroup::getU32(const std::string& name)
+U32 LLControlGroup::getU32(std::string_view name)
{
return test_preferred_maturity;
}
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index 696fe3536c..70a73b9ca8 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -74,7 +74,7 @@ static LLSD gLoginCreds;
static bool gDisconnectCalled = false;
#include "../llviewerwindow.h"
-void LLViewerWindow::setShowProgress(BOOL show) {}
+void LLViewerWindow::setShowProgress(bool show) {}
LLProgressView * LLViewerWindow::getProgressView(void) const { return 0; }
LLViewerWindow* gViewerWindow;
@@ -198,13 +198,13 @@ LLControlGroup gSavedSettings("Global");
LLControlGroup::LLControlGroup(const std::string& name) :
LLInstanceTracker<LLControlGroup, std::string>(name){}
LLControlGroup::~LLControlGroup() {}
-void LLControlGroup::setBOOL(const std::string& name, BOOL val) {}
-BOOL LLControlGroup::getBOOL(const std::string& name) { return FALSE; }
-F32 LLControlGroup::getF32(const std::string& name) { return 0.0f; }
-U32 LLControlGroup::saveToFile(const std::string& filename, BOOL nondefault_only) { return 1; }
-void LLControlGroup::setString(const std::string& name, const std::string& val) {}
-std::string LLControlGroup::getString(const std::string& name) { return "test_string"; }
-LLControlVariable* LLControlGroup::declareBOOL(const std::string& name, BOOL initial_val, const std::string& comment, LLControlVariable::ePersist persist) { return NULL; }
+void LLControlGroup::setBOOL(std::string_view name, bool val) {}
+bool LLControlGroup::getBOOL(std::string_view name) { return false; }
+F32 LLControlGroup::getF32(std::string_view name) { return 0.0f; }
+U32 LLControlGroup::saveToFile(const std::string& filename, bool nondefault_only) { return 1; }
+void LLControlGroup::setString(std::string_view name, const std::string& val) {}
+std::string LLControlGroup::getString(std::string_view name) { return "test_string"; }
+LLControlVariable* LLControlGroup::declareBOOL(const std::string& name, bool initial_val, const std::string& comment, LLControlVariable::ePersist persist) { return NULL; }
LLControlVariable* LLControlGroup::declareString(const std::string& name, const std::string &initial_val, const std::string& comment, LLControlVariable::ePersist persist) { return NULL; }
#include "lluicolortable.h"
@@ -235,7 +235,7 @@ static LLEventPump * gTOSReplyPump = NULL;
LLPointer<LLSecAPIHandler> gSecAPIHandler;
//static
-LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, BOOL focus)
+LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, bool focus)
{
gTOSType = name;
gTOSReplyPump = &LLEventPumps::instance().obtain(key["reply_pump"]);
@@ -345,13 +345,13 @@ namespace tut
gTOSReplyPump = 0; // clear the callback.
- gSavedSettings.declareBOOL("NoInventoryLibrary", FALSE, "", LLControlVariable::PERSIST_NO);
- gSavedSettings.declareBOOL("ConnectAsGod", FALSE, "", LLControlVariable::PERSIST_NO);
- gSavedSettings.declareBOOL("UseDebugMenus", FALSE, "", LLControlVariable::PERSIST_NO);
+ gSavedSettings.declareBOOL("NoInventoryLibrary", false, "", LLControlVariable::PERSIST_NO);
+ gSavedSettings.declareBOOL("ConnectAsGod", false, "", LLControlVariable::PERSIST_NO);
+ gSavedSettings.declareBOOL("UseDebugMenus", false, "", LLControlVariable::PERSIST_NO);
gSavedSettings.declareString("ClientSettingsFile", "test_settings.xml", "", LLControlVariable::PERSIST_NO);
gSavedSettings.declareString("NextLoginLocation", "", "", LLControlVariable::PERSIST_NO);
- gSavedSettings.declareBOOL("LoginLastLocation", FALSE, "", LLControlVariable::PERSIST_NO);
- gSavedSettings.declareBOOL("CmdLineSkipUpdater", TRUE, "", LLControlVariable::PERSIST_NO);
+ gSavedSettings.declareBOOL("LoginLastLocation", false, "", LLControlVariable::PERSIST_NO);
+ gSavedSettings.declareBOOL("CmdLineSkipUpdater", true, "", LLControlVariable::PERSIST_NO);
LLSD authenticator = LLSD::emptyMap();
LLSD identifier = LLSD::emptyMap();
diff --git a/indra/newview/tests/llsecapi_test.cpp b/indra/newview/tests/llsecapi_test.cpp
index 7d2a9a436f..169a3ab1a2 100644
--- a/indra/newview/tests/llsecapi_test.cpp
+++ b/indra/newview/tests/llsecapi_test.cpp
@@ -43,8 +43,8 @@ LLControlVariable* LLControlGroup::declareString(const std::string& name,
const std::string& initial_val,
const std::string& comment,
LLControlVariable::ePersist persist) {return NULL;}
-void LLControlGroup::setString(const std::string& name, const std::string& val){}
-std::string LLControlGroup::getString(const std::string& name)
+void LLControlGroup::setString(std::string_view name, const std::string& val){}
+std::string LLControlGroup::getString(std::string_view name)
{
return "";
}
@@ -109,10 +109,10 @@ namespace tut
{
// retrieve an unknown handler
- ensure("'Unknown' handler should be NULL", !(BOOL)getSecHandler("unknown"));
+ ensure("'Unknown' handler should be NULL", getSecHandler("unknown") == nullptr);
LLPointer<LLSecAPIHandler> test1_handler = new LLSecAPIBasicHandler();
registerSecHandler("sectest1", test1_handler);
- ensure("'Unknown' handler should be NULL", !(BOOL)getSecHandler("unknown"));
+ ensure("'Unknown' handler should be NULL", getSecHandler("unknown") == nullptr);
LLPointer<LLSecAPIHandler> retrieved_test1_handler = getSecHandler("sectest1");
ensure("Retrieved sectest1 handler should be the same",
retrieved_test1_handler == test1_handler);
@@ -120,7 +120,7 @@ namespace tut
// insert a second handler
LLPointer<LLSecAPIHandler> test2_handler = new LLSecAPIBasicHandler();
registerSecHandler("sectest2", test2_handler);
- ensure("'Unknown' handler should be NULL", !(BOOL)getSecHandler("unknown"));
+ ensure("'Unknown' handler should be NULL", getSecHandler("unknown") == nullptr);
retrieved_test1_handler = getSecHandler("sectest1");
ensure("Retrieved sectest1 handler should be the same",
retrieved_test1_handler == test1_handler);
diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp
index da742370fc..c04d8cdc35 100644
--- a/indra/newview/tests/llsechandler_basic_test.cpp
+++ b/indra/newview/tests/llsechandler_basic_test.cpp
@@ -78,8 +78,8 @@ LLControlVariable* LLControlGroup::declareString(const std::string& name,
const std::string& initial_val,
const std::string& comment,
LLControlVariable::ePersist persist) {return NULL;}
-void LLControlGroup::setString(const std::string& name, const std::string& val){}
-std::string LLControlGroup::getString(const std::string& name)
+void LLControlGroup::setString(std::string_view name, const std::string& val){}
+std::string LLControlGroup::getString(std::string_view name)
{
if (name == "FirstName")
@@ -90,7 +90,7 @@ std::string LLControlGroup::getString(const std::string& name)
}
// Stub for --no-verify-ssl-cert
-BOOL LLControlGroup::getBOOL(const std::string& name) { return FALSE; }
+bool LLControlGroup::getBOOL(std::string_view name) { return false; }
LLSD LLCredential::getLoginParams()
{
@@ -964,7 +964,7 @@ namespace tut
// test creation of credentials
my_cred = handler->createCredential("mysavedgrid", my_id, my_authenticator);
// test save without saving authenticator.
- handler->saveCredential(my_cred, FALSE);
+ handler->saveCredential(my_cred, false);
my_new_cred = handler->loadCredential("mysavedgrid");
ensure_equals("saved credential without auth",
(const std::string)my_new_cred->getIdentifier()["type"], "test_type");
diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp
index 8d21b6ed69..1da419d058 100644
--- a/indra/newview/tests/llslurl_test.cpp
+++ b/indra/newview/tests/llslurl_test.cpp
@@ -64,14 +64,14 @@ LLControlVariable* LLControlGroup::declareString(const std::string& name,
const std::string& initial_val,
const std::string& comment,
LLControlVariable::ePersist persist) {return NULL;}
-void LLControlGroup::setString(const std::string& name, const std::string& val){}
+void LLControlGroup::setString(std::string_view name, const std::string& val){}
std::string gCmdLineLoginURI;
std::string gCmdLineGridChoice;
std::string gCmdLineHelperURI;
std::string gLoginPage;
std::string gCurrentGrid;
-std::string LLControlGroup::getString(const std::string& name)
+std::string LLControlGroup::getString(std::string_view name)
{
if (name == "CmdLineGridChoice")
return gCmdLineGridChoice;
@@ -84,7 +84,7 @@ std::string LLControlGroup::getString(const std::string& name)
return "";
}
-LLSD LLControlGroup::getLLSD(const std::string& name)
+LLSD LLControlGroup::getLLSD(std::string_view name)
{
if (name == "CmdLineLoginURI")
{
@@ -96,9 +96,9 @@ LLSD LLControlGroup::getLLSD(const std::string& name)
return LLSD();
}
-LLPointer<LLControlVariable> LLControlGroup::getControl(const std::string& name)
+LLPointer<LLControlVariable> LLControlGroup::getControl(std::string_view name)
{
- ctrl_name_table_t::iterator iter = mNameTable.find(name);
+ ctrl_name_table_t::iterator iter = mNameTable.find(name.data());
return iter == mNameTable.end() ? LLPointer<LLControlVariable>() : iter->second;
}
diff --git a/indra/newview/tests/llviewerassetstats_test.cpp b/indra/newview/tests/llviewerassetstats_test.cpp
index e2e7f09c3b..bdf91d0f07 100644
--- a/indra/newview/tests/llviewerassetstats_test.cpp
+++ b/indra/newview/tests/llviewerassetstats_test.cpp
@@ -43,7 +43,7 @@ namespace LLStatViewer
LLTrace::SampleStatHandle<> FPS_SAMPLE("fpssample");
}
-void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts)
+void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts, F32& avg_cloud_time, S32& cloud_avatars)
{
counts.resize(3);
counts[0] = 0;
diff --git a/indra/newview/tests/llviewercontrollistener_test.cpp b/indra/newview/tests/llviewercontrollistener_test.cpp
index 8aed2a8043..175c442dc5 100644
--- a/indra/newview/tests/llviewercontrollistener_test.cpp
+++ b/indra/newview/tests/llviewercontrollistener_test.cpp
@@ -40,7 +40,7 @@ namespace tut
{
Global.declareString("strvar", "woof", "string variable");
// together we will stroll the boolvar, ma cherie
- Global.declareBOOL("boolvar", TRUE, "bool variable");
+ Global.declareBOOL("boolvar", true, "bool variable");
}
};
typedef test_group<llviewercontrollistener_data> llviewercontrollistener_group;
@@ -167,7 +167,7 @@ namespace tut
"boolvar",
llsd::map("name", "boolvar",
"type", "Boolean",
- "value", TRUE,
+ "value", true,
"comment", "bool variable")));
}
} // namespace tut
diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp
index f6456a2839..828c0da96c 100644
--- a/indra/newview/tests/llviewerhelputil_test.cpp
+++ b/indra/newview/tests/llviewerhelputil_test.cpp
@@ -53,8 +53,8 @@ LLControlVariable* LLControlGroup::declareString(const std::string& name,
const std::string& initial_val,
const std::string& comment,
LLControlVariable::ePersist persist) {return NULL;}
-void LLControlGroup::setString(const std::string& name, const std::string& val){}
-std::string LLControlGroup::getString(const std::string& name)
+void LLControlGroup::setString(std::string_view name, const std::string& val){}
+std::string LLControlGroup::getString(std::string_view name)
{
if (name == "HelpURLFormat")
return gHelpURL;
@@ -75,7 +75,7 @@ static void substitute_string(std::string &input, const std::string &search, con
#include "../llagent.h"
LLAgent::LLAgent() : mAgentAccess(NULL) { }
LLAgent::~LLAgent() { }
-bool LLAgent::isGodlike() const { return FALSE; }
+bool LLAgent::isGodlike() const { return false; }
LLAgent gAgent;
diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp
index fe81fd63ea..4e5caf2ffe 100644
--- a/indra/newview/tests/llviewernetwork_test.cpp
+++ b/indra/newview/tests/llviewernetwork_test.cpp
@@ -73,14 +73,14 @@ LLControlVariable* LLControlGroup::declareString(const std::string& name,
const std::string& initial_val,
const std::string& comment,
LLControlVariable::ePersist persist) {return NULL;}
-void LLControlGroup::setString(const std::string& name, const std::string& val){}
+void LLControlGroup::setString(std::string_view name, const std::string& val){}
std::string gCmdLineLoginURI;
std::string gCmdLineGridChoice;
std::string gCmdLineHelperURI;
std::string gLoginPage;
std::string gCurrentGrid;
-std::string LLControlGroup::getString(const std::string& name)
+std::string LLControlGroup::getString(std::string_view name)
{
if (name == "CmdLineGridChoice")
return gCmdLineGridChoice;
@@ -93,7 +93,7 @@ std::string LLControlGroup::getString(const std::string& name)
return "";
}
-LLSD LLControlGroup::getLLSD(const std::string& name)
+LLSD LLControlGroup::getLLSD(std::string_view name)
{
if (name == "CmdLineLoginURI")
{
@@ -105,9 +105,9 @@ LLSD LLControlGroup::getLLSD(const std::string& name)
return LLSD();
}
-LLPointer<LLControlVariable> LLControlGroup::getControl(const std::string& name)
+LLPointer<LLControlVariable> LLControlGroup::getControl(std::string_view name)
{
- ctrl_name_table_t::iterator iter = mNameTable.find(name);
+ ctrl_name_table_t::iterator iter = mNameTable.find(name.data());
return iter == mNameTable.end() ? LLPointer<LLControlVariable>() : iter->second;
}
diff --git a/indra/newview/tests/llworldmap_test.cpp b/indra/newview/tests/llworldmap_test.cpp
index f1dd8acccf..1f5a838e2a 100644
--- a/indra/newview/tests/llworldmap_test.cpp
+++ b/indra/newview/tests/llworldmap_test.cpp
@@ -49,7 +49,7 @@
// Stub image calls
void LLGLTexture::setBoostLevel(S32 ) { }
void LLGLTexture::setAddressMode(LLTexUnit::eTextureAddressMode ) { }
-LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture(const LLUUID&, FTType, BOOL, LLGLTexture::EBoostLevel, S8,
+LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture(const LLUUID&, FTType, bool, LLGLTexture::EBoostLevel, S8,
LLGLint, LLGLenum, LLHost ) { return NULL; }
// Stub related map calls
diff --git a/indra/newview/tests/llworldmipmap_test.cpp b/indra/newview/tests/llworldmipmap_test.cpp
index 142d75bcfd..5f86968463 100644
--- a/indra/newview/tests/llworldmipmap_test.cpp
+++ b/indra/newview/tests/llworldmipmap_test.cpp
@@ -43,12 +43,12 @@
// * A simulator for a class can be implemented here. Please comment and document thoroughly.
void LLGLTexture::setBoostLevel(S32 ) { }
-LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromUrl(const std::string&, FTType, BOOL, LLGLTexture::EBoostLevel, S8,
+LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromUrl(const std::string&, FTType, bool, LLGLTexture::EBoostLevel, S8,
LLGLint, LLGLenum, const LLUUID& ) { return NULL; }
LLControlGroup::LLControlGroup(const std::string& name) : LLInstanceTracker<LLControlGroup, std::string>(name) { }
LLControlGroup::~LLControlGroup() { }
-std::string LLControlGroup::getString(const std::string& ) { return std::string("test_url"); }
+std::string LLControlGroup::getString(std::string_view) { return std::string("test_url"); }
LLControlGroup gSavedSettings("test_settings");
// End Stubbing
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 4de4dc8fc5..63383e52bb 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -547,12 +547,6 @@ class Windows_x86_64_Manifest(ViewerManifest):
# Get shared libs from the shared libs staging directory
with self.prefix(src=os.path.join(self.args['build'], os.pardir,
'sharedlibs', self.args['buildtype'])):
- # Get fmodstudio dll if needed
- if self.args['fmodstudio'] == 'ON':
- if(self.args['buildtype'].lower() == 'debug'):
- self.path("fmodL.dll")
- else:
- self.path("fmod.dll")
if self.args['openal'] == 'ON':
# Get openal dll
@@ -1022,19 +1016,14 @@ class Darwin_x86_64_Manifest(ViewerManifest):
'libvivoxsdk.dylib',
):
self.path2basename(relpkgdir, libfile)
-
- # Fmod studio dylibs (vary based on configuration)
- if self.args['fmodstudio'] == 'ON':
- if self.args['buildtype'].lower() == 'debug':
- for libfile in (
- "libfmodL.dylib",
- ):
- dylibs += path_optional(os.path.join(debpkgdir, libfile), libfile)
- else:
- for libfile in (
- "libfmod.dylib",
- ):
- dylibs += path_optional(os.path.join(relpkgdir, libfile), libfile)
+
+ # OpenAL dylibs
+ if self.args['openal'] == 'ON':
+ for libfile in (
+ "libopenal.dylib",
+ "libalut.dylib",
+ ):
+ dylibs += path_optional(os.path.join(relpkgdir, libfile), libfile)
# our apps
executable_path = {}
@@ -1364,16 +1353,6 @@ class Linux_i686_Manifest(LinuxManifest):
print("tcmalloc files not found, skipping")
pass
- if self.args['fmodstudio'] == 'ON':
- try:
- self.path("libfmod.so.11.7")
- self.path("libfmod.so.11")
- self.path("libfmod.so")
- pass
- except:
- print("Skipping libfmod.so - not found")
- pass
-
# Vivox runtimes
with self.prefix(src=relpkgdir, dst="bin"):
self.path("SLVoice")
@@ -1403,11 +1382,9 @@ if __name__ == "__main__":
print(('%s \\\n%s' %
(sys.executable,
' '.join((("'%s'" % arg) if ' ' in arg else arg) for arg in sys.argv))))
- # fmodstudio and openal can be used simultaneously and controled by environment
extra_arguments = [
dict(name='bugsplat', description="""BugSplat database to which to post crashes,
if BugSplat crash reporting is desired""", default=''),
- dict(name='fmodstudio', description="""Indication if fmod studio libraries are needed""", default='OFF'),
dict(name='openal', description="""Indication openal libraries are needed""", default='OFF'),
]
try: