From d692ed38bda3bf2d229cedb26b3dd7ef859daa42 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 20 Apr 2010 15:30:51 -0400 Subject: For EXT-6953: improved default animations. Moved LLUUID values to .cpp file --- indra/llcharacter/llanimationstates.cpp | 136 ++++++++++++++++ indra/llcharacter/llanimationstates.h | 271 ++++++++++++++++---------------- 2 files changed, 271 insertions(+), 136 deletions(-) diff --git a/indra/llcharacter/llanimationstates.cpp b/indra/llcharacter/llanimationstates.cpp index 365fb673f3..ea3546fa1e 100644 --- a/indra/llcharacter/llanimationstates.cpp +++ b/indra/llcharacter/llanimationstates.cpp @@ -39,6 +39,142 @@ #include "llanimationstates.h" #include "llstring.h" +const LLUUID ANIM_AGENT_AFRAID = LLUUID("6b61c8e8-4747-0d75-12d7-e49ff207a4ca"); +const LLUUID ANIM_AGENT_AIM_BAZOOKA_R = LLUUID("b5b4a67d-0aee-30d2-72cd-77b333e932ef"); +const LLUUID ANIM_AGENT_AIM_BOW_L = LLUUID("46bb4359-de38-4ed8-6a22-f1f52fe8f506"); +const LLUUID ANIM_AGENT_AIM_HANDGUN_R = LLUUID("3147d815-6338-b932-f011-16b56d9ac18b"); +const LLUUID ANIM_AGENT_AIM_RIFLE_R = LLUUID("ea633413-8006-180a-c3ba-96dd1d756720"); +const LLUUID ANIM_AGENT_ANGRY = LLUUID("5747a48e-073e-c331-f6f3-7c2149613d3e"); +const LLUUID ANIM_AGENT_AWAY = LLUUID("fd037134-85d4-f241-72c6-4f42164fedee"); +const LLUUID ANIM_AGENT_BACKFLIP = LLUUID("c4ca6188-9127-4f31-0158-23c4e2f93304"); +const LLUUID ANIM_AGENT_BELLY_LAUGH = LLUUID("18b3a4b5-b463-bd48-e4b6-71eaac76c515"); +const LLUUID ANIM_AGENT_BLOW_KISS = LLUUID("db84829b-462c-ee83-1e27-9bbee66bd624"); +const LLUUID ANIM_AGENT_BORED = LLUUID("b906c4ba-703b-1940-32a3-0c7f7d791510"); +const LLUUID ANIM_AGENT_BOW = LLUUID("82e99230-c906-1403-4d9c-3889dd98daba"); +const LLUUID ANIM_AGENT_BRUSH = LLUUID("349a3801-54f9-bf2c-3bd0-1ac89772af01"); +const LLUUID ANIM_AGENT_BUSY = LLUUID("efcf670c-2d18-8128-973a-034ebc806b67"); +const LLUUID ANIM_AGENT_CLAP = LLUUID("9b0c1c4e-8ac7-7969-1494-28c874c4f668"); +const LLUUID ANIM_AGENT_COURTBOW = LLUUID("9ba1c942-08be-e43a-fb29-16ad440efc50"); +const LLUUID ANIM_AGENT_CROUCH = LLUUID("201f3fdf-cb1f-dbec-201f-7333e328ae7c"); +const LLUUID ANIM_AGENT_CROUCHWALK = LLUUID("47f5f6fb-22e5-ae44-f871-73aaaf4a6022"); +const LLUUID ANIM_AGENT_CRY = LLUUID("92624d3e-1068-f1aa-a5ec-8244585193ed"); +const LLUUID ANIM_AGENT_CUSTOMIZE = LLUUID("038fcec9-5ebd-8a8e-0e2e-6e71a0a1ac53"); +const LLUUID ANIM_AGENT_CUSTOMIZE_DONE = LLUUID("6883a61a-b27b-5914-a61e-dda118a9ee2c"); +const LLUUID ANIM_AGENT_DANCE1 = LLUUID("b68a3d7c-de9e-fc87-eec8-543d787e5b0d"); +const LLUUID ANIM_AGENT_DANCE2 = LLUUID("928cae18-e31d-76fd-9cc9-2f55160ff818"); +const LLUUID ANIM_AGENT_DANCE3 = LLUUID("30047778-10ea-1af7-6881-4db7a3a5a114"); +const LLUUID ANIM_AGENT_DANCE4 = LLUUID("951469f4-c7b2-c818-9dee-ad7eea8c30b7"); +const LLUUID ANIM_AGENT_DANCE5 = LLUUID("4bd69a1d-1114-a0b4-625f-84e0a5237155"); +const LLUUID ANIM_AGENT_DANCE6 = LLUUID("cd28b69b-9c95-bb78-3f94-8d605ff1bb12"); +const LLUUID ANIM_AGENT_DANCE7 = LLUUID("a54d8ee2-28bb-80a9-7f0c-7afbbe24a5d6"); +const LLUUID ANIM_AGENT_DANCE8 = LLUUID("b0dc417c-1f11-af36-2e80-7e7489fa7cdc"); +const LLUUID ANIM_AGENT_DEAD = LLUUID("57abaae6-1d17-7b1b-5f98-6d11a6411276"); +const LLUUID ANIM_AGENT_DRINK = LLUUID("0f86e355-dd31-a61c-fdb0-3a96b9aad05f"); +const LLUUID ANIM_AGENT_EMBARRASSED = LLUUID("514af488-9051-044a-b3fc-d4dbf76377c6"); +const LLUUID ANIM_AGENT_EXPRESS_AFRAID = LLUUID("aa2df84d-cf8f-7218-527b-424a52de766e"); +const LLUUID ANIM_AGENT_EXPRESS_ANGER = LLUUID("1a03b575-9634-b62a-5767-3a679e81f4de"); +const LLUUID ANIM_AGENT_EXPRESS_BORED = LLUUID("214aa6c1-ba6a-4578-f27c-ce7688f61d0d"); +const LLUUID ANIM_AGENT_EXPRESS_CRY = LLUUID("d535471b-85bf-3b4d-a542-93bea4f59d33"); +const LLUUID ANIM_AGENT_EXPRESS_DISDAIN = LLUUID("d4416ff1-09d3-300f-4183-1b68a19b9fc1"); +const LLUUID ANIM_AGENT_EXPRESS_EMBARRASSED = LLUUID("0b8c8211-d78c-33e8-fa28-c51a9594e424"); +const LLUUID ANIM_AGENT_EXPRESS_FROWN = LLUUID("fee3df48-fa3d-1015-1e26-a205810e3001"); +const LLUUID ANIM_AGENT_EXPRESS_KISS = LLUUID("1e8d90cc-a84e-e135-884c-7c82c8b03a14"); +const LLUUID ANIM_AGENT_EXPRESS_LAUGH = LLUUID("62570842-0950-96f8-341c-809e65110823"); +const LLUUID ANIM_AGENT_EXPRESS_OPEN_MOUTH = LLUUID("d63bc1f9-fc81-9625-a0c6-007176d82eb7"); +const LLUUID ANIM_AGENT_EXPRESS_REPULSED = LLUUID("f76cda94-41d4-a229-2872-e0296e58afe1"); +const LLUUID ANIM_AGENT_EXPRESS_SAD = LLUUID("eb6ebfb2-a4b3-a19c-d388-4dd5c03823f7"); +const LLUUID ANIM_AGENT_EXPRESS_SHRUG = LLUUID("a351b1bc-cc94-aac2-7bea-a7e6ebad15ef"); +const LLUUID ANIM_AGENT_EXPRESS_SMILE = LLUUID("b7c7c833-e3d3-c4e3-9fc0-131237446312"); +const LLUUID ANIM_AGENT_EXPRESS_SURPRISE = LLUUID("728646d9-cc79-08b2-32d6-937f0a835c24"); +const LLUUID ANIM_AGENT_EXPRESS_TONGUE_OUT = LLUUID("835965c6-7f2f-bda2-5deb-2478737f91bf"); +const LLUUID ANIM_AGENT_EXPRESS_TOOTHSMILE = LLUUID("b92ec1a5-e7ce-a76b-2b05-bcdb9311417e"); +const LLUUID ANIM_AGENT_EXPRESS_WINK = LLUUID("da020525-4d94-59d6-23d7-81fdebf33148"); +const LLUUID ANIM_AGENT_EXPRESS_WORRY = LLUUID("9c05e5c7-6f07-6ca4-ed5a-b230390c3950"); +const LLUUID ANIM_AGENT_FALLDOWN = LLUUID("666307d9-a860-572d-6fd4-c3ab8865c094"); +const LLUUID ANIM_AGENT_FEMALE_WALK = LLUUID("f5fc7433-043d-e819-8298-f519a119b688"); +const LLUUID ANIM_AGENT_FINGER_WAG = LLUUID("c1bc7f36-3ba0-d844-f93c-93be945d644f"); +const LLUUID ANIM_AGENT_FIST_PUMP = LLUUID("7db00ccd-f380-f3ee-439d-61968ec69c8a"); +const LLUUID ANIM_AGENT_FLY = LLUUID("aec4610c-757f-bc4e-c092-c6e9caf18daf"); +const LLUUID ANIM_AGENT_FLYSLOW = LLUUID("2b5a38b2-5e00-3a97-a495-4c826bc443e6"); +const LLUUID ANIM_AGENT_HELLO = LLUUID("9b29cd61-c45b-5689-ded2-91756b8d76a9"); +const LLUUID ANIM_AGENT_HOLD_BAZOOKA_R = LLUUID("ef62d355-c815-4816-2474-b1acc21094a6"); +const LLUUID ANIM_AGENT_HOLD_BOW_L = LLUUID("8b102617-bcba-037b-86c1-b76219f90c88"); +const LLUUID ANIM_AGENT_HOLD_HANDGUN_R = LLUUID("efdc1727-8b8a-c800-4077-975fc27ee2f2"); +const LLUUID ANIM_AGENT_HOLD_RIFLE_R = LLUUID("3d94bad0-c55b-7dcc-8763-033c59405d33"); +const LLUUID ANIM_AGENT_HOLD_THROW_R = LLUUID("7570c7b5-1f22-56dd-56ef-a9168241bbb6"); +const LLUUID ANIM_AGENT_HOVER = LLUUID("4ae8016b-31b9-03bb-c401-b1ea941db41d"); +const LLUUID ANIM_AGENT_HOVER_DOWN = LLUUID("20f063ea-8306-2562-0b07-5c853b37b31e"); +const LLUUID ANIM_AGENT_HOVER_UP = LLUUID("62c5de58-cb33-5743-3d07-9e4cd4352864"); +const LLUUID ANIM_AGENT_IMPATIENT = LLUUID("5ea3991f-c293-392e-6860-91dfa01278a3"); +const LLUUID ANIM_AGENT_JUMP = LLUUID("2305bd75-1ca9-b03b-1faa-b176b8a8c49e"); +const LLUUID ANIM_AGENT_JUMP_FOR_JOY = LLUUID("709ea28e-1573-c023-8bf8-520c8bc637fa"); +const LLUUID ANIM_AGENT_KISS_MY_BUTT = LLUUID("19999406-3a3a-d58c-a2ac-d72e555dcf51"); +const LLUUID ANIM_AGENT_LAND = LLUUID("7a17b059-12b2-41b1-570a-186368b6aa6f"); +const LLUUID ANIM_AGENT_LAUGH_SHORT = LLUUID("ca5b3f14-3194-7a2b-c894-aa699b718d1f"); +const LLUUID ANIM_AGENT_MEDIUM_LAND = LLUUID("f4f00d6e-b9fe-9292-f4cb-0ae06ea58d57"); +const LLUUID ANIM_AGENT_MOTORCYCLE_SIT = LLUUID("08464f78-3a8e-2944-cba5-0c94aff3af29"); +const LLUUID ANIM_AGENT_MUSCLE_BEACH = LLUUID("315c3a41-a5f3-0ba4-27da-f893f769e69b"); +const LLUUID ANIM_AGENT_NO = LLUUID("5a977ed9-7f72-44e9-4c4c-6e913df8ae74"); +const LLUUID ANIM_AGENT_NO_UNHAPPY = LLUUID("d83fa0e5-97ed-7eb2-e798-7bd006215cb4"); +const LLUUID ANIM_AGENT_NYAH_NYAH = LLUUID("f061723d-0a18-754f-66ee-29a44795a32f"); +const LLUUID ANIM_AGENT_ONETWO_PUNCH = LLUUID("eefc79be-daae-a239-8c04-890f5d23654a"); +const LLUUID ANIM_AGENT_PEACE = LLUUID("b312b10e-65ab-a0a4-8b3c-1326ea8e3ed9"); +const LLUUID ANIM_AGENT_POINT_ME = LLUUID("17c024cc-eef2-f6a0-3527-9869876d7752"); +const LLUUID ANIM_AGENT_POINT_YOU = LLUUID("ec952cca-61ef-aa3b-2789-4d1344f016de"); +const LLUUID ANIM_AGENT_PRE_JUMP = LLUUID("7a4e87fe-de39-6fcb-6223-024b00893244"); +const LLUUID ANIM_AGENT_PUNCH_LEFT = LLUUID("f3300ad9-3462-1d07-2044-0fef80062da0"); +const LLUUID ANIM_AGENT_PUNCH_RIGHT = LLUUID("c8e42d32-7310-6906-c903-cab5d4a34656"); +const LLUUID ANIM_AGENT_REPULSED = LLUUID("36f81a92-f076-5893-dc4b-7c3795e487cf"); +const LLUUID ANIM_AGENT_ROUNDHOUSE_KICK = LLUUID("49aea43b-5ac3-8a44-b595-96100af0beda"); +const LLUUID ANIM_AGENT_RPS_COUNTDOWN = LLUUID("35db4f7e-28c2-6679-cea9-3ee108f7fc7f"); +const LLUUID ANIM_AGENT_RPS_PAPER = LLUUID("0836b67f-7f7b-f37b-c00a-460dc1521f5a"); +const LLUUID ANIM_AGENT_RPS_ROCK = LLUUID("42dd95d5-0bc6-6392-f650-777304946c0f"); +const LLUUID ANIM_AGENT_RPS_SCISSORS = LLUUID("16803a9f-5140-e042-4d7b-d28ba247c325"); +const LLUUID ANIM_AGENT_RUN = LLUUID("05ddbff8-aaa9-92a1-2b74-8fe77a29b445"); +const LLUUID ANIM_AGENT_SAD = LLUUID("0eb702e2-cc5a-9a88-56a5-661a55c0676a"); +const LLUUID ANIM_AGENT_SALUTE = LLUUID("cd7668a6-7011-d7e2-ead8-fc69eff1a104"); +const LLUUID ANIM_AGENT_SHOOT_BOW_L = LLUUID("e04d450d-fdb5-0432-fd68-818aaf5935f8"); +const LLUUID ANIM_AGENT_SHOUT = LLUUID("6bd01860-4ebd-127a-bb3d-d1427e8e0c42"); +const LLUUID ANIM_AGENT_SHRUG = LLUUID("70ea714f-3a97-d742-1b01-590a8fcd1db5"); +const LLUUID ANIM_AGENT_SIT = LLUUID("1a5fe8ac-a804-8a5d-7cbd-56bd83184568"); +const LLUUID ANIM_AGENT_SIT_FEMALE = LLUUID("b1709c8d-ecd3-54a1-4f28-d55ac0840782"); +const LLUUID ANIM_AGENT_SIT_GENERIC = LLUUID("245f3c54-f1c0-bf2e-811f-46d8eeb386e7"); +const LLUUID ANIM_AGENT_SIT_GROUND = LLUUID("1c7600d6-661f-b87b-efe2-d7421eb93c86"); +const LLUUID ANIM_AGENT_SIT_GROUND_CONSTRAINED = LLUUID("1a2bd58e-87ff-0df8-0b4c-53e047b0bb6e"); +const LLUUID ANIM_AGENT_SIT_TO_STAND = LLUUID("a8dee56f-2eae-9e7a-05a2-6fb92b97e21e"); +const LLUUID ANIM_AGENT_SLEEP = LLUUID("f2bed5f9-9d44-39af-b0cd-257b2a17fe40"); +const LLUUID ANIM_AGENT_SMOKE_IDLE = LLUUID("d2f2ee58-8ad1-06c9-d8d3-3827ba31567a"); +const LLUUID ANIM_AGENT_SMOKE_INHALE = LLUUID("6802d553-49da-0778-9f85-1599a2266526"); +const LLUUID ANIM_AGENT_SMOKE_THROW_DOWN = LLUUID("0a9fb970-8b44-9114-d3a9-bf69cfe804d6"); +const LLUUID ANIM_AGENT_SNAPSHOT = LLUUID("eae8905b-271a-99e2-4c0e-31106afd100c"); +const LLUUID ANIM_AGENT_STAND = LLUUID("2408fe9e-df1d-1d7d-f4ff-1384fa7b350f"); +const LLUUID ANIM_AGENT_STANDUP = LLUUID("3da1d753-028a-5446-24f3-9c9b856d9422"); +const LLUUID ANIM_AGENT_STAND_1 = LLUUID("15468e00-3400-bb66-cecc-646d7c14458e"); +const LLUUID ANIM_AGENT_STAND_2 = LLUUID("370f3a20-6ca6-9971-848c-9a01bc42ae3c"); +const LLUUID ANIM_AGENT_STAND_3 = LLUUID("42b46214-4b44-79ae-deb8-0df61424ff4b"); +const LLUUID ANIM_AGENT_STAND_4 = LLUUID("f22fed8b-a5ed-2c93-64d5-bdd8b93c889f"); +const LLUUID ANIM_AGENT_STRETCH = LLUUID("80700431-74ec-a008-14f8-77575e73693f"); +const LLUUID ANIM_AGENT_STRIDE = LLUUID("1cb562b0-ba21-2202-efb3-30f82cdf9595"); +const LLUUID ANIM_AGENT_SURF = LLUUID("41426836-7437-7e89-025d-0aa4d10f1d69"); +const LLUUID ANIM_AGENT_SURPRISE = LLUUID("313b9881-4302-73c0-c7d0-0e7a36b6c224"); +const LLUUID ANIM_AGENT_SWORD_STRIKE = LLUUID("85428680-6bf9-3e64-b489-6f81087c24bd"); +const LLUUID ANIM_AGENT_TALK = LLUUID("5c682a95-6da4-a463-0bf6-0f5b7be129d1"); +const LLUUID ANIM_AGENT_TANTRUM = LLUUID("11000694-3f41-adc2-606b-eee1d66f3724"); +const LLUUID ANIM_AGENT_THROW_R = LLUUID("aa134404-7dac-7aca-2cba-435f9db875ca"); +const LLUUID ANIM_AGENT_TRYON_SHIRT = LLUUID("83ff59fe-2346-f236-9009-4e3608af64c1"); +const LLUUID ANIM_AGENT_TURNLEFT = LLUUID("56e0ba0d-4a9f-7f27-6117-32f2ebbf6135"); +const LLUUID ANIM_AGENT_TURNRIGHT = LLUUID("2d6daa51-3192-6794-8e2e-a15f8338ec30"); +const LLUUID ANIM_AGENT_TYPE = LLUUID("c541c47f-e0c0-058b-ad1a-d6ae3a4584d9"); +const LLUUID ANIM_AGENT_WALK = LLUUID("6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0"); +const LLUUID ANIM_AGENT_WHISPER = LLUUID("7693f268-06c7-ea71-fa21-2b30d6533f8f"); +const LLUUID ANIM_AGENT_WHISTLE = LLUUID("b1ed7982-c68e-a982-7561-52a88a5298c0"); +const LLUUID ANIM_AGENT_WINK = LLUUID("869ecdad-a44b-671e-3266-56aef2e3ac2e"); +const LLUUID ANIM_AGENT_WINK_HOLLYWOOD = LLUUID("c0c4030f-c02b-49de-24ba-2331f43fe41c"); +const LLUUID ANIM_AGENT_WORRY = LLUUID("9f496bd2-589a-709f-16cc-69bf7df1d36c"); +const LLUUID ANIM_AGENT_YES = LLUUID("15dd911d-be82-2856-26db-27659b142875"); +const LLUUID ANIM_AGENT_YES_HAPPY = LLUUID("b8c8b2a3-9008-1771-3bfc-90924955ab2d"); +const LLUUID ANIM_AGENT_YOGA_FLOAT = LLUUID("42ecd00b-9947-a97c-400a-bbc9174c7aeb"); + LLUUID AGENT_WALK_ANIMS[] = {ANIM_AGENT_WALK, ANIM_AGENT_RUN, ANIM_AGENT_CROUCHWALK, ANIM_AGENT_TURNLEFT, ANIM_AGENT_TURNRIGHT}; S32 NUM_AGENT_WALK_ANIMS = LL_ARRAY_SIZE(AGENT_WALK_ANIMS); diff --git a/indra/llcharacter/llanimationstates.h b/indra/llcharacter/llanimationstates.h index 56b24d5215..1a85755a1e 100644 --- a/indra/llcharacter/llanimationstates.h +++ b/indra/llcharacter/llanimationstates.h @@ -49,142 +49,141 @@ //----------------------------------------------------------------------------- const S32 MAX_CONCURRENT_ANIMS = 16; - -const LLUUID ANIM_AGENT_AFRAID = LLUUID("6b61c8e8-4747-0d75-12d7-e49ff207a4ca"); -const LLUUID ANIM_AGENT_AIM_BAZOOKA_R = LLUUID("b5b4a67d-0aee-30d2-72cd-77b333e932ef"); -const LLUUID ANIM_AGENT_AIM_BOW_L = LLUUID("46bb4359-de38-4ed8-6a22-f1f52fe8f506"); -const LLUUID ANIM_AGENT_AIM_HANDGUN_R = LLUUID("3147d815-6338-b932-f011-16b56d9ac18b"); -const LLUUID ANIM_AGENT_AIM_RIFLE_R = LLUUID("ea633413-8006-180a-c3ba-96dd1d756720"); -const LLUUID ANIM_AGENT_ANGRY = LLUUID("5747a48e-073e-c331-f6f3-7c2149613d3e"); -const LLUUID ANIM_AGENT_AWAY = LLUUID("fd037134-85d4-f241-72c6-4f42164fedee"); -const LLUUID ANIM_AGENT_BACKFLIP = LLUUID("c4ca6188-9127-4f31-0158-23c4e2f93304"); -const LLUUID ANIM_AGENT_BELLY_LAUGH = LLUUID("18b3a4b5-b463-bd48-e4b6-71eaac76c515"); -const LLUUID ANIM_AGENT_BLOW_KISS = LLUUID("db84829b-462c-ee83-1e27-9bbee66bd624"); -const LLUUID ANIM_AGENT_BORED = LLUUID("b906c4ba-703b-1940-32a3-0c7f7d791510"); -const LLUUID ANIM_AGENT_BOW = LLUUID("82e99230-c906-1403-4d9c-3889dd98daba"); -const LLUUID ANIM_AGENT_BRUSH = LLUUID("349a3801-54f9-bf2c-3bd0-1ac89772af01"); -const LLUUID ANIM_AGENT_BUSY = LLUUID("efcf670c-2d18-8128-973a-034ebc806b67"); -const LLUUID ANIM_AGENT_CLAP = LLUUID("9b0c1c4e-8ac7-7969-1494-28c874c4f668"); -const LLUUID ANIM_AGENT_COURTBOW = LLUUID("9ba1c942-08be-e43a-fb29-16ad440efc50"); -const LLUUID ANIM_AGENT_CROUCH = LLUUID("201f3fdf-cb1f-dbec-201f-7333e328ae7c"); -const LLUUID ANIM_AGENT_CROUCHWALK = LLUUID("47f5f6fb-22e5-ae44-f871-73aaaf4a6022"); -const LLUUID ANIM_AGENT_CRY = LLUUID("92624d3e-1068-f1aa-a5ec-8244585193ed"); -const LLUUID ANIM_AGENT_CUSTOMIZE = LLUUID("038fcec9-5ebd-8a8e-0e2e-6e71a0a1ac53"); -const LLUUID ANIM_AGENT_CUSTOMIZE_DONE = LLUUID("6883a61a-b27b-5914-a61e-dda118a9ee2c"); -const LLUUID ANIM_AGENT_DANCE1 = LLUUID("b68a3d7c-de9e-fc87-eec8-543d787e5b0d"); -const LLUUID ANIM_AGENT_DANCE2 = LLUUID("928cae18-e31d-76fd-9cc9-2f55160ff818"); -const LLUUID ANIM_AGENT_DANCE3 = LLUUID("30047778-10ea-1af7-6881-4db7a3a5a114"); -const LLUUID ANIM_AGENT_DANCE4 = LLUUID("951469f4-c7b2-c818-9dee-ad7eea8c30b7"); -const LLUUID ANIM_AGENT_DANCE5 = LLUUID("4bd69a1d-1114-a0b4-625f-84e0a5237155"); -const LLUUID ANIM_AGENT_DANCE6 = LLUUID("cd28b69b-9c95-bb78-3f94-8d605ff1bb12"); -const LLUUID ANIM_AGENT_DANCE7 = LLUUID("a54d8ee2-28bb-80a9-7f0c-7afbbe24a5d6"); -const LLUUID ANIM_AGENT_DANCE8 = LLUUID("b0dc417c-1f11-af36-2e80-7e7489fa7cdc"); -const LLUUID ANIM_AGENT_DEAD = LLUUID("57abaae6-1d17-7b1b-5f98-6d11a6411276"); -const LLUUID ANIM_AGENT_DRINK = LLUUID("0f86e355-dd31-a61c-fdb0-3a96b9aad05f"); -const LLUUID ANIM_AGENT_EMBARRASSED = LLUUID("514af488-9051-044a-b3fc-d4dbf76377c6"); -const LLUUID ANIM_AGENT_EXPRESS_AFRAID = LLUUID("aa2df84d-cf8f-7218-527b-424a52de766e"); -const LLUUID ANIM_AGENT_EXPRESS_ANGER = LLUUID("1a03b575-9634-b62a-5767-3a679e81f4de"); -const LLUUID ANIM_AGENT_EXPRESS_BORED = LLUUID("214aa6c1-ba6a-4578-f27c-ce7688f61d0d"); -const LLUUID ANIM_AGENT_EXPRESS_CRY = LLUUID("d535471b-85bf-3b4d-a542-93bea4f59d33"); -const LLUUID ANIM_AGENT_EXPRESS_DISDAIN = LLUUID("d4416ff1-09d3-300f-4183-1b68a19b9fc1"); -const LLUUID ANIM_AGENT_EXPRESS_EMBARRASSED = LLUUID("0b8c8211-d78c-33e8-fa28-c51a9594e424"); -const LLUUID ANIM_AGENT_EXPRESS_FROWN = LLUUID("fee3df48-fa3d-1015-1e26-a205810e3001"); -const LLUUID ANIM_AGENT_EXPRESS_KISS = LLUUID("1e8d90cc-a84e-e135-884c-7c82c8b03a14"); -const LLUUID ANIM_AGENT_EXPRESS_LAUGH = LLUUID("62570842-0950-96f8-341c-809e65110823"); -const LLUUID ANIM_AGENT_EXPRESS_OPEN_MOUTH = LLUUID("d63bc1f9-fc81-9625-a0c6-007176d82eb7"); -const LLUUID ANIM_AGENT_EXPRESS_REPULSED = LLUUID("f76cda94-41d4-a229-2872-e0296e58afe1"); -const LLUUID ANIM_AGENT_EXPRESS_SAD = LLUUID("eb6ebfb2-a4b3-a19c-d388-4dd5c03823f7"); -const LLUUID ANIM_AGENT_EXPRESS_SHRUG = LLUUID("a351b1bc-cc94-aac2-7bea-a7e6ebad15ef"); -const LLUUID ANIM_AGENT_EXPRESS_SMILE = LLUUID("b7c7c833-e3d3-c4e3-9fc0-131237446312"); -const LLUUID ANIM_AGENT_EXPRESS_SURPRISE = LLUUID("728646d9-cc79-08b2-32d6-937f0a835c24"); -const LLUUID ANIM_AGENT_EXPRESS_TONGUE_OUT = LLUUID("835965c6-7f2f-bda2-5deb-2478737f91bf"); -const LLUUID ANIM_AGENT_EXPRESS_TOOTHSMILE = LLUUID("b92ec1a5-e7ce-a76b-2b05-bcdb9311417e"); -const LLUUID ANIM_AGENT_EXPRESS_WINK = LLUUID("da020525-4d94-59d6-23d7-81fdebf33148"); -const LLUUID ANIM_AGENT_EXPRESS_WORRY = LLUUID("9c05e5c7-6f07-6ca4-ed5a-b230390c3950"); -const LLUUID ANIM_AGENT_FALLDOWN = LLUUID("666307d9-a860-572d-6fd4-c3ab8865c094"); -const LLUUID ANIM_AGENT_FEMALE_WALK = LLUUID("f5fc7433-043d-e819-8298-f519a119b688"); -const LLUUID ANIM_AGENT_FINGER_WAG = LLUUID("c1bc7f36-3ba0-d844-f93c-93be945d644f"); -const LLUUID ANIM_AGENT_FIST_PUMP = LLUUID("7db00ccd-f380-f3ee-439d-61968ec69c8a"); -const LLUUID ANIM_AGENT_FLY = LLUUID("aec4610c-757f-bc4e-c092-c6e9caf18daf"); -const LLUUID ANIM_AGENT_FLYSLOW = LLUUID("2b5a38b2-5e00-3a97-a495-4c826bc443e6"); -const LLUUID ANIM_AGENT_HELLO = LLUUID("9b29cd61-c45b-5689-ded2-91756b8d76a9"); -const LLUUID ANIM_AGENT_HOLD_BAZOOKA_R = LLUUID("ef62d355-c815-4816-2474-b1acc21094a6"); -const LLUUID ANIM_AGENT_HOLD_BOW_L = LLUUID("8b102617-bcba-037b-86c1-b76219f90c88"); -const LLUUID ANIM_AGENT_HOLD_HANDGUN_R = LLUUID("efdc1727-8b8a-c800-4077-975fc27ee2f2"); -const LLUUID ANIM_AGENT_HOLD_RIFLE_R = LLUUID("3d94bad0-c55b-7dcc-8763-033c59405d33"); -const LLUUID ANIM_AGENT_HOLD_THROW_R = LLUUID("7570c7b5-1f22-56dd-56ef-a9168241bbb6"); -const LLUUID ANIM_AGENT_HOVER = LLUUID("4ae8016b-31b9-03bb-c401-b1ea941db41d"); -const LLUUID ANIM_AGENT_HOVER_DOWN = LLUUID("20f063ea-8306-2562-0b07-5c853b37b31e"); -const LLUUID ANIM_AGENT_HOVER_UP = LLUUID("62c5de58-cb33-5743-3d07-9e4cd4352864"); -const LLUUID ANIM_AGENT_IMPATIENT = LLUUID("5ea3991f-c293-392e-6860-91dfa01278a3"); -const LLUUID ANIM_AGENT_JUMP = LLUUID("2305bd75-1ca9-b03b-1faa-b176b8a8c49e"); -const LLUUID ANIM_AGENT_JUMP_FOR_JOY = LLUUID("709ea28e-1573-c023-8bf8-520c8bc637fa"); -const LLUUID ANIM_AGENT_KISS_MY_BUTT = LLUUID("19999406-3a3a-d58c-a2ac-d72e555dcf51"); -const LLUUID ANIM_AGENT_LAND = LLUUID("7a17b059-12b2-41b1-570a-186368b6aa6f"); -const LLUUID ANIM_AGENT_LAUGH_SHORT = LLUUID("ca5b3f14-3194-7a2b-c894-aa699b718d1f"); -const LLUUID ANIM_AGENT_MEDIUM_LAND = LLUUID("f4f00d6e-b9fe-9292-f4cb-0ae06ea58d57"); -const LLUUID ANIM_AGENT_MOTORCYCLE_SIT = LLUUID("08464f78-3a8e-2944-cba5-0c94aff3af29"); -const LLUUID ANIM_AGENT_MUSCLE_BEACH = LLUUID("315c3a41-a5f3-0ba4-27da-f893f769e69b"); -const LLUUID ANIM_AGENT_NO = LLUUID("5a977ed9-7f72-44e9-4c4c-6e913df8ae74"); -const LLUUID ANIM_AGENT_NO_UNHAPPY = LLUUID("d83fa0e5-97ed-7eb2-e798-7bd006215cb4"); -const LLUUID ANIM_AGENT_NYAH_NYAH = LLUUID("f061723d-0a18-754f-66ee-29a44795a32f"); -const LLUUID ANIM_AGENT_ONETWO_PUNCH = LLUUID("eefc79be-daae-a239-8c04-890f5d23654a"); -const LLUUID ANIM_AGENT_PEACE = LLUUID("b312b10e-65ab-a0a4-8b3c-1326ea8e3ed9"); -const LLUUID ANIM_AGENT_POINT_ME = LLUUID("17c024cc-eef2-f6a0-3527-9869876d7752"); -const LLUUID ANIM_AGENT_POINT_YOU = LLUUID("ec952cca-61ef-aa3b-2789-4d1344f016de"); -const LLUUID ANIM_AGENT_PRE_JUMP = LLUUID("7a4e87fe-de39-6fcb-6223-024b00893244"); -const LLUUID ANIM_AGENT_PUNCH_LEFT = LLUUID("f3300ad9-3462-1d07-2044-0fef80062da0"); -const LLUUID ANIM_AGENT_PUNCH_RIGHT = LLUUID("c8e42d32-7310-6906-c903-cab5d4a34656"); -const LLUUID ANIM_AGENT_REPULSED = LLUUID("36f81a92-f076-5893-dc4b-7c3795e487cf"); -const LLUUID ANIM_AGENT_ROUNDHOUSE_KICK = LLUUID("49aea43b-5ac3-8a44-b595-96100af0beda"); -const LLUUID ANIM_AGENT_RPS_COUNTDOWN = LLUUID("35db4f7e-28c2-6679-cea9-3ee108f7fc7f"); -const LLUUID ANIM_AGENT_RPS_PAPER = LLUUID("0836b67f-7f7b-f37b-c00a-460dc1521f5a"); -const LLUUID ANIM_AGENT_RPS_ROCK = LLUUID("42dd95d5-0bc6-6392-f650-777304946c0f"); -const LLUUID ANIM_AGENT_RPS_SCISSORS = LLUUID("16803a9f-5140-e042-4d7b-d28ba247c325"); -const LLUUID ANIM_AGENT_RUN = LLUUID("05ddbff8-aaa9-92a1-2b74-8fe77a29b445"); -const LLUUID ANIM_AGENT_SAD = LLUUID("0eb702e2-cc5a-9a88-56a5-661a55c0676a"); -const LLUUID ANIM_AGENT_SALUTE = LLUUID("cd7668a6-7011-d7e2-ead8-fc69eff1a104"); -const LLUUID ANIM_AGENT_SHOOT_BOW_L = LLUUID("e04d450d-fdb5-0432-fd68-818aaf5935f8"); -const LLUUID ANIM_AGENT_SHOUT = LLUUID("6bd01860-4ebd-127a-bb3d-d1427e8e0c42"); -const LLUUID ANIM_AGENT_SHRUG = LLUUID("70ea714f-3a97-d742-1b01-590a8fcd1db5"); -const LLUUID ANIM_AGENT_SIT = LLUUID("1a5fe8ac-a804-8a5d-7cbd-56bd83184568"); -const LLUUID ANIM_AGENT_SIT_FEMALE = LLUUID("b1709c8d-ecd3-54a1-4f28-d55ac0840782"); -const LLUUID ANIM_AGENT_SIT_GENERIC = LLUUID("245f3c54-f1c0-bf2e-811f-46d8eeb386e7"); -const LLUUID ANIM_AGENT_SIT_GROUND = LLUUID("1c7600d6-661f-b87b-efe2-d7421eb93c86"); -const LLUUID ANIM_AGENT_SIT_GROUND_CONSTRAINED = LLUUID("1a2bd58e-87ff-0df8-0b4c-53e047b0bb6e"); -const LLUUID ANIM_AGENT_SIT_TO_STAND = LLUUID("a8dee56f-2eae-9e7a-05a2-6fb92b97e21e"); -const LLUUID ANIM_AGENT_SLEEP = LLUUID("f2bed5f9-9d44-39af-b0cd-257b2a17fe40"); -const LLUUID ANIM_AGENT_SMOKE_IDLE = LLUUID("d2f2ee58-8ad1-06c9-d8d3-3827ba31567a"); -const LLUUID ANIM_AGENT_SMOKE_INHALE = LLUUID("6802d553-49da-0778-9f85-1599a2266526"); -const LLUUID ANIM_AGENT_SMOKE_THROW_DOWN = LLUUID("0a9fb970-8b44-9114-d3a9-bf69cfe804d6"); -const LLUUID ANIM_AGENT_SNAPSHOT = LLUUID("eae8905b-271a-99e2-4c0e-31106afd100c"); -const LLUUID ANIM_AGENT_STAND = LLUUID("2408fe9e-df1d-1d7d-f4ff-1384fa7b350f"); -const LLUUID ANIM_AGENT_STANDUP = LLUUID("3da1d753-028a-5446-24f3-9c9b856d9422"); -const LLUUID ANIM_AGENT_STAND_1 = LLUUID("15468e00-3400-bb66-cecc-646d7c14458e"); -const LLUUID ANIM_AGENT_STAND_2 = LLUUID("370f3a20-6ca6-9971-848c-9a01bc42ae3c"); -const LLUUID ANIM_AGENT_STAND_3 = LLUUID("42b46214-4b44-79ae-deb8-0df61424ff4b"); -const LLUUID ANIM_AGENT_STAND_4 = LLUUID("f22fed8b-a5ed-2c93-64d5-bdd8b93c889f"); -const LLUUID ANIM_AGENT_STRETCH = LLUUID("80700431-74ec-a008-14f8-77575e73693f"); -const LLUUID ANIM_AGENT_STRIDE = LLUUID("1cb562b0-ba21-2202-efb3-30f82cdf9595"); -const LLUUID ANIM_AGENT_SURF = LLUUID("41426836-7437-7e89-025d-0aa4d10f1d69"); -const LLUUID ANIM_AGENT_SURPRISE = LLUUID("313b9881-4302-73c0-c7d0-0e7a36b6c224"); -const LLUUID ANIM_AGENT_SWORD_STRIKE = LLUUID("85428680-6bf9-3e64-b489-6f81087c24bd"); -const LLUUID ANIM_AGENT_TALK = LLUUID("5c682a95-6da4-a463-0bf6-0f5b7be129d1"); -const LLUUID ANIM_AGENT_TANTRUM = LLUUID("11000694-3f41-adc2-606b-eee1d66f3724"); -const LLUUID ANIM_AGENT_THROW_R = LLUUID("aa134404-7dac-7aca-2cba-435f9db875ca"); -const LLUUID ANIM_AGENT_TRYON_SHIRT = LLUUID("83ff59fe-2346-f236-9009-4e3608af64c1"); -const LLUUID ANIM_AGENT_TURNLEFT = LLUUID("56e0ba0d-4a9f-7f27-6117-32f2ebbf6135"); -const LLUUID ANIM_AGENT_TURNRIGHT = LLUUID("2d6daa51-3192-6794-8e2e-a15f8338ec30"); -const LLUUID ANIM_AGENT_TYPE = LLUUID("c541c47f-e0c0-058b-ad1a-d6ae3a4584d9"); -const LLUUID ANIM_AGENT_WALK = LLUUID("6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0"); -const LLUUID ANIM_AGENT_WHISPER = LLUUID("7693f268-06c7-ea71-fa21-2b30d6533f8f"); -const LLUUID ANIM_AGENT_WHISTLE = LLUUID("b1ed7982-c68e-a982-7561-52a88a5298c0"); -const LLUUID ANIM_AGENT_WINK = LLUUID("869ecdad-a44b-671e-3266-56aef2e3ac2e"); -const LLUUID ANIM_AGENT_WINK_HOLLYWOOD = LLUUID("c0c4030f-c02b-49de-24ba-2331f43fe41c"); -const LLUUID ANIM_AGENT_WORRY = LLUUID("9f496bd2-589a-709f-16cc-69bf7df1d36c"); -const LLUUID ANIM_AGENT_YES = LLUUID("15dd911d-be82-2856-26db-27659b142875"); -const LLUUID ANIM_AGENT_YES_HAPPY = LLUUID("b8c8b2a3-9008-1771-3bfc-90924955ab2d"); -const LLUUID ANIM_AGENT_YOGA_FLOAT = LLUUID("42ecd00b-9947-a97c-400a-bbc9174c7aeb"); +extern const LLUUID ANIM_AGENT_AFRAID; +extern const LLUUID ANIM_AGENT_AIM_BAZOOKA_R; +extern const LLUUID ANIM_AGENT_AIM_BOW_L; +extern const LLUUID ANIM_AGENT_AIM_HANDGUN_R; +extern const LLUUID ANIM_AGENT_AIM_RIFLE_R; +extern const LLUUID ANIM_AGENT_ANGRY; +extern const LLUUID ANIM_AGENT_AWAY; +extern const LLUUID ANIM_AGENT_BACKFLIP; +extern const LLUUID ANIM_AGENT_BELLY_LAUGH; +extern const LLUUID ANIM_AGENT_BLOW_KISS; +extern const LLUUID ANIM_AGENT_BORED; +extern const LLUUID ANIM_AGENT_BOW; +extern const LLUUID ANIM_AGENT_BRUSH; +extern const LLUUID ANIM_AGENT_BUSY; +extern const LLUUID ANIM_AGENT_CLAP; +extern const LLUUID ANIM_AGENT_COURTBOW; +extern const LLUUID ANIM_AGENT_CROUCH; +extern const LLUUID ANIM_AGENT_CROUCHWALK; +extern const LLUUID ANIM_AGENT_CRY; +extern const LLUUID ANIM_AGENT_CUSTOMIZE; +extern const LLUUID ANIM_AGENT_CUSTOMIZE_DONE; +extern const LLUUID ANIM_AGENT_DANCE1; +extern const LLUUID ANIM_AGENT_DANCE2; +extern const LLUUID ANIM_AGENT_DANCE3; +extern const LLUUID ANIM_AGENT_DANCE4; +extern const LLUUID ANIM_AGENT_DANCE5; +extern const LLUUID ANIM_AGENT_DANCE6; +extern const LLUUID ANIM_AGENT_DANCE7; +extern const LLUUID ANIM_AGENT_DANCE8; +extern const LLUUID ANIM_AGENT_DEAD; +extern const LLUUID ANIM_AGENT_DRINK; +extern const LLUUID ANIM_AGENT_EMBARRASSED; +extern const LLUUID ANIM_AGENT_EXPRESS_AFRAID; +extern const LLUUID ANIM_AGENT_EXPRESS_ANGER; +extern const LLUUID ANIM_AGENT_EXPRESS_BORED; +extern const LLUUID ANIM_AGENT_EXPRESS_CRY; +extern const LLUUID ANIM_AGENT_EXPRESS_DISDAIN; +extern const LLUUID ANIM_AGENT_EXPRESS_EMBARRASSED; +extern const LLUUID ANIM_AGENT_EXPRESS_FROWN; +extern const LLUUID ANIM_AGENT_EXPRESS_KISS; +extern const LLUUID ANIM_AGENT_EXPRESS_LAUGH; +extern const LLUUID ANIM_AGENT_EXPRESS_OPEN_MOUTH; +extern const LLUUID ANIM_AGENT_EXPRESS_REPULSED; +extern const LLUUID ANIM_AGENT_EXPRESS_SAD; +extern const LLUUID ANIM_AGENT_EXPRESS_SHRUG; +extern const LLUUID ANIM_AGENT_EXPRESS_SMILE; +extern const LLUUID ANIM_AGENT_EXPRESS_SURPRISE; +extern const LLUUID ANIM_AGENT_EXPRESS_TONGUE_OUT; +extern const LLUUID ANIM_AGENT_EXPRESS_TOOTHSMILE; +extern const LLUUID ANIM_AGENT_EXPRESS_WINK; +extern const LLUUID ANIM_AGENT_EXPRESS_WORRY; +extern const LLUUID ANIM_AGENT_FALLDOWN; +extern const LLUUID ANIM_AGENT_FEMALE_WALK; +extern const LLUUID ANIM_AGENT_FINGER_WAG; +extern const LLUUID ANIM_AGENT_FIST_PUMP; +extern const LLUUID ANIM_AGENT_FLY; +extern const LLUUID ANIM_AGENT_FLYSLOW; +extern const LLUUID ANIM_AGENT_HELLO; +extern const LLUUID ANIM_AGENT_HOLD_BAZOOKA_R; +extern const LLUUID ANIM_AGENT_HOLD_BOW_L; +extern const LLUUID ANIM_AGENT_HOLD_HANDGUN_R; +extern const LLUUID ANIM_AGENT_HOLD_RIFLE_R; +extern const LLUUID ANIM_AGENT_HOLD_THROW_R; +extern const LLUUID ANIM_AGENT_HOVER; +extern const LLUUID ANIM_AGENT_HOVER_DOWN; +extern const LLUUID ANIM_AGENT_HOVER_UP; +extern const LLUUID ANIM_AGENT_IMPATIENT; +extern const LLUUID ANIM_AGENT_JUMP; +extern const LLUUID ANIM_AGENT_JUMP_FOR_JOY; +extern const LLUUID ANIM_AGENT_KISS_MY_BUTT; +extern const LLUUID ANIM_AGENT_LAND; +extern const LLUUID ANIM_AGENT_LAUGH_SHORT; +extern const LLUUID ANIM_AGENT_MEDIUM_LAND; +extern const LLUUID ANIM_AGENT_MOTORCYCLE_SIT; +extern const LLUUID ANIM_AGENT_MUSCLE_BEACH; +extern const LLUUID ANIM_AGENT_NO; +extern const LLUUID ANIM_AGENT_NO_UNHAPPY; +extern const LLUUID ANIM_AGENT_NYAH_NYAH; +extern const LLUUID ANIM_AGENT_ONETWO_PUNCH; +extern const LLUUID ANIM_AGENT_PEACE; +extern const LLUUID ANIM_AGENT_POINT_ME; +extern const LLUUID ANIM_AGENT_POINT_YOU; +extern const LLUUID ANIM_AGENT_PRE_JUMP; +extern const LLUUID ANIM_AGENT_PUNCH_LEFT; +extern const LLUUID ANIM_AGENT_PUNCH_RIGHT; +extern const LLUUID ANIM_AGENT_REPULSED; +extern const LLUUID ANIM_AGENT_ROUNDHOUSE_KICK; +extern const LLUUID ANIM_AGENT_RPS_COUNTDOWN; +extern const LLUUID ANIM_AGENT_RPS_PAPER; +extern const LLUUID ANIM_AGENT_RPS_ROCK; +extern const LLUUID ANIM_AGENT_RPS_SCISSORS; +extern const LLUUID ANIM_AGENT_RUN; +extern const LLUUID ANIM_AGENT_SAD; +extern const LLUUID ANIM_AGENT_SALUTE; +extern const LLUUID ANIM_AGENT_SHOOT_BOW_L; +extern const LLUUID ANIM_AGENT_SHOUT; +extern const LLUUID ANIM_AGENT_SHRUG; +extern const LLUUID ANIM_AGENT_SIT; +extern const LLUUID ANIM_AGENT_SIT_FEMALE; +extern const LLUUID ANIM_AGENT_SIT_GENERIC; +extern const LLUUID ANIM_AGENT_SIT_GROUND; +extern const LLUUID ANIM_AGENT_SIT_GROUND_CONSTRAINED; +extern const LLUUID ANIM_AGENT_SIT_TO_STAND; +extern const LLUUID ANIM_AGENT_SLEEP; +extern const LLUUID ANIM_AGENT_SMOKE_IDLE; +extern const LLUUID ANIM_AGENT_SMOKE_INHALE; +extern const LLUUID ANIM_AGENT_SMOKE_THROW_DOWN; +extern const LLUUID ANIM_AGENT_SNAPSHOT; +extern const LLUUID ANIM_AGENT_STAND; +extern const LLUUID ANIM_AGENT_STANDUP; +extern const LLUUID ANIM_AGENT_STAND_1; +extern const LLUUID ANIM_AGENT_STAND_2; +extern const LLUUID ANIM_AGENT_STAND_3; +extern const LLUUID ANIM_AGENT_STAND_4; +extern const LLUUID ANIM_AGENT_STRETCH; +extern const LLUUID ANIM_AGENT_STRIDE; +extern const LLUUID ANIM_AGENT_SURF; +extern const LLUUID ANIM_AGENT_SURPRISE; +extern const LLUUID ANIM_AGENT_SWORD_STRIKE; +extern const LLUUID ANIM_AGENT_TALK; +extern const LLUUID ANIM_AGENT_TANTRUM; +extern const LLUUID ANIM_AGENT_THROW_R; +extern const LLUUID ANIM_AGENT_TRYON_SHIRT; +extern const LLUUID ANIM_AGENT_TURNLEFT; +extern const LLUUID ANIM_AGENT_TURNRIGHT; +extern const LLUUID ANIM_AGENT_TYPE; +extern const LLUUID ANIM_AGENT_WALK; +extern const LLUUID ANIM_AGENT_WHISPER; +extern const LLUUID ANIM_AGENT_WHISTLE; +extern const LLUUID ANIM_AGENT_WINK; +extern const LLUUID ANIM_AGENT_WINK_HOLLYWOOD; +extern const LLUUID ANIM_AGENT_WORRY; +extern const LLUUID ANIM_AGENT_YES; +extern const LLUUID ANIM_AGENT_YES_HAPPY; +extern const LLUUID ANIM_AGENT_YOGA_FLOAT; extern LLUUID AGENT_WALK_ANIMS[]; extern S32 NUM_AGENT_WALK_ANIMS; -- cgit v1.2.3 From 6aa3b75224f68fffc640253ced8bf5c162acdf2d Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 21 Apr 2010 19:08:15 -0400 Subject: For EXT-6953: improved default animations. --- indra/llcharacter/llanimationstates.cpp | 7 +++ indra/llcharacter/llanimationstates.h | 4 ++ indra/newview/app_settings/settings.xml | 12 ++++- indra/newview/llvoavatar.cpp | 84 ++++++++++++++++++++++++--------- indra/newview/llvoavatar.h | 1 + 5 files changed, 84 insertions(+), 24 deletions(-) diff --git a/indra/llcharacter/llanimationstates.cpp b/indra/llcharacter/llanimationstates.cpp index ea3546fa1e..09deaf1932 100644 --- a/indra/llcharacter/llanimationstates.cpp +++ b/indra/llcharacter/llanimationstates.cpp @@ -39,6 +39,9 @@ #include "llanimationstates.h" #include "llstring.h" +// Would be nice to be able to toggle at run-time, but not gonna +// happen while we're using const LLUUIDs as keys. + const LLUUID ANIM_AGENT_AFRAID = LLUUID("6b61c8e8-4747-0d75-12d7-e49ff207a4ca"); const LLUUID ANIM_AGENT_AIM_BAZOOKA_R = LLUUID("b5b4a67d-0aee-30d2-72cd-77b333e932ef"); const LLUUID ANIM_AGENT_AIM_BOW_L = LLUUID("46bb4359-de38-4ed8-6a22-f1f52fe8f506"); @@ -91,6 +94,8 @@ const LLUUID ANIM_AGENT_EXPRESS_TOOTHSMILE = LLUUID("b92ec1a5-e7ce-a76b-2b05-bcd const LLUUID ANIM_AGENT_EXPRESS_WINK = LLUUID("da020525-4d94-59d6-23d7-81fdebf33148"); const LLUUID ANIM_AGENT_EXPRESS_WORRY = LLUUID("9c05e5c7-6f07-6ca4-ed5a-b230390c3950"); const LLUUID ANIM_AGENT_FALLDOWN = LLUUID("666307d9-a860-572d-6fd4-c3ab8865c094"); +const LLUUID ANIM_AGENT_FEMALE_RUN_NEW = LLUUID("5c083e7f-6462-a637-8d33-afaefa7a97bc"); +const LLUUID ANIM_AGENT_FEMALE_WALK_NEW = LLUUID("14b7b3c8-8987-85ab-9f29-5a5956058e55"); const LLUUID ANIM_AGENT_FEMALE_WALK = LLUUID("f5fc7433-043d-e819-8298-f519a119b688"); const LLUUID ANIM_AGENT_FINGER_WAG = LLUUID("c1bc7f36-3ba0-d844-f93c-93be945d644f"); const LLUUID ANIM_AGENT_FIST_PUMP = LLUUID("7db00ccd-f380-f3ee-439d-61968ec69c8a"); @@ -130,6 +135,7 @@ const LLUUID ANIM_AGENT_RPS_COUNTDOWN = LLUUID("35db4f7e-28c2-6679-cea9-3ee108f const LLUUID ANIM_AGENT_RPS_PAPER = LLUUID("0836b67f-7f7b-f37b-c00a-460dc1521f5a"); const LLUUID ANIM_AGENT_RPS_ROCK = LLUUID("42dd95d5-0bc6-6392-f650-777304946c0f"); const LLUUID ANIM_AGENT_RPS_SCISSORS = LLUUID("16803a9f-5140-e042-4d7b-d28ba247c325"); +const LLUUID ANIM_AGENT_RUN_NEW = LLUUID("25f649b2-c600-9ae3-a8e7-9eca357a20ce"); const LLUUID ANIM_AGENT_RUN = LLUUID("05ddbff8-aaa9-92a1-2b74-8fe77a29b445"); const LLUUID ANIM_AGENT_SAD = LLUUID("0eb702e2-cc5a-9a88-56a5-661a55c0676a"); const LLUUID ANIM_AGENT_SALUTE = LLUUID("cd7668a6-7011-d7e2-ead8-fc69eff1a104"); @@ -165,6 +171,7 @@ const LLUUID ANIM_AGENT_TRYON_SHIRT = LLUUID("83ff59fe-2346-f236-9009-4e3608af const LLUUID ANIM_AGENT_TURNLEFT = LLUUID("56e0ba0d-4a9f-7f27-6117-32f2ebbf6135"); const LLUUID ANIM_AGENT_TURNRIGHT = LLUUID("2d6daa51-3192-6794-8e2e-a15f8338ec30"); const LLUUID ANIM_AGENT_TYPE = LLUUID("c541c47f-e0c0-058b-ad1a-d6ae3a4584d9"); +const LLUUID ANIM_AGENT_WALK_NEW = LLUUID("fa1e3197-5e7f-20d1-16d1-f5addc999ce7"); const LLUUID ANIM_AGENT_WALK = LLUUID("6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0"); const LLUUID ANIM_AGENT_WHISPER = LLUUID("7693f268-06c7-ea71-fa21-2b30d6533f8f"); const LLUUID ANIM_AGENT_WHISTLE = LLUUID("b1ed7982-c68e-a982-7561-52a88a5298c0"); diff --git a/indra/llcharacter/llanimationstates.h b/indra/llcharacter/llanimationstates.h index 1a85755a1e..18a19c3eb5 100644 --- a/indra/llcharacter/llanimationstates.h +++ b/indra/llcharacter/llanimationstates.h @@ -101,7 +101,9 @@ extern const LLUUID ANIM_AGENT_EXPRESS_TOOTHSMILE; extern const LLUUID ANIM_AGENT_EXPRESS_WINK; extern const LLUUID ANIM_AGENT_EXPRESS_WORRY; extern const LLUUID ANIM_AGENT_FALLDOWN; +extern const LLUUID ANIM_AGENT_FEMALE_RUN_NEW; extern const LLUUID ANIM_AGENT_FEMALE_WALK; +extern const LLUUID ANIM_AGENT_FEMALE_WALK_NEW; extern const LLUUID ANIM_AGENT_FINGER_WAG; extern const LLUUID ANIM_AGENT_FIST_PUMP; extern const LLUUID ANIM_AGENT_FLY; @@ -141,6 +143,7 @@ extern const LLUUID ANIM_AGENT_RPS_PAPER; extern const LLUUID ANIM_AGENT_RPS_ROCK; extern const LLUUID ANIM_AGENT_RPS_SCISSORS; extern const LLUUID ANIM_AGENT_RUN; +extern const LLUUID ANIM_AGENT_RUN_NEW; extern const LLUUID ANIM_AGENT_SAD; extern const LLUUID ANIM_AGENT_SALUTE; extern const LLUUID ANIM_AGENT_SHOOT_BOW_L; @@ -176,6 +179,7 @@ extern const LLUUID ANIM_AGENT_TURNLEFT; extern const LLUUID ANIM_AGENT_TURNRIGHT; extern const LLUUID ANIM_AGENT_TYPE; extern const LLUUID ANIM_AGENT_WALK; +extern const LLUUID ANIM_AGENT_WALK_NEW; extern const LLUUID ANIM_AGENT_WHISPER; extern const LLUUID ANIM_AGENT_WHISTLE; extern const LLUUID ANIM_AGENT_WINK; diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index c9b5631d54..6f08cd7579 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10183,7 +10183,17 @@ Value 10.0 - + UseNewWalkRun + + Comment + Replace standard walk/run animations with new ones. + Persist + 1 + Type + Boolean + Value + 0 + UseStartScreen Comment diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 3f021d1f84..05cb914e90 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1225,7 +1225,11 @@ void LLVOAvatar::initInstance(void) registerMotion( ANIM_AGENT_EXPRESS_TOOTHSMILE, LLEmote::create ); registerMotion( ANIM_AGENT_EXPRESS_WINK, LLEmote::create ); registerMotion( ANIM_AGENT_EXPRESS_WORRY, LLEmote::create ); + registerMotion( ANIM_AGENT_FEMALE_RUN_NEW, LLKeyframeWalkMotion::create ); + registerMotion( ANIM_AGENT_FEMALE_WALK, LLKeyframeWalkMotion::create ); + registerMotion( ANIM_AGENT_FEMALE_WALK_NEW, LLKeyframeWalkMotion::create ); registerMotion( ANIM_AGENT_RUN, LLKeyframeWalkMotion::create ); + registerMotion( ANIM_AGENT_RUN_NEW, LLKeyframeWalkMotion::create ); registerMotion( ANIM_AGENT_STAND, LLKeyframeStandMotion::create ); registerMotion( ANIM_AGENT_STAND_1, LLKeyframeStandMotion::create ); registerMotion( ANIM_AGENT_STAND_2, LLKeyframeStandMotion::create ); @@ -1235,6 +1239,7 @@ void LLVOAvatar::initInstance(void) registerMotion( ANIM_AGENT_TURNLEFT, LLKeyframeWalkMotion::create ); registerMotion( ANIM_AGENT_TURNRIGHT, LLKeyframeWalkMotion::create ); registerMotion( ANIM_AGENT_WALK, LLKeyframeWalkMotion::create ); + registerMotion( ANIM_AGENT_WALK_NEW, LLKeyframeWalkMotion::create ); // motions without a start/stop bit registerMotion( ANIM_AGENT_BODY_NOISE, LLBodyNoiseMotion::create ); @@ -4369,34 +4374,74 @@ void LLVOAvatar::resetAnimations() flushAllMotions(); } -//----------------------------------------------------------------------------- -// startMotion() -// 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) +// Override selectively based on avatar sex and whether we're using new +// animations. +LLUUID LLVOAvatar::remapMotionID(const LLUUID& id) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - + BOOL use_new_walk_run = gSavedSettings.getBOOL("UseNewWalkRun"); + LLUUID result = id; + // start special case female walk for female avatars if (getSex() == SEX_FEMALE) { if (id == ANIM_AGENT_WALK) { - return LLCharacter::startMotion(ANIM_AGENT_FEMALE_WALK, time_offset); + if (use_new_walk_run) + result = ANIM_AGENT_FEMALE_WALK_NEW; + else + result = ANIM_AGENT_FEMALE_WALK; + } + else if (id == ANIM_AGENT_RUN) + { + // There is no old female run animation, so only override + // in one case. + if (use_new_walk_run) + result = ANIM_AGENT_FEMALE_RUN_NEW; } else if (id == ANIM_AGENT_SIT) { - return LLCharacter::startMotion(ANIM_AGENT_SIT_FEMALE, time_offset); + result = ANIM_AGENT_SIT_FEMALE; } } + else + { + // Male avatar. + if (id == ANIM_AGENT_WALK) + { + if (use_new_walk_run) + result = ANIM_AGENT_WALK_NEW; + } + else if (id == ANIM_AGENT_RUN) + { + if (use_new_walk_run) + result = ANIM_AGENT_RUN_NEW; + } + + } - if (isSelf() && id == ANIM_AGENT_AWAY) + return result; + +} + +//----------------------------------------------------------------------------- +// startMotion() +// 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) +{ + llinfos << "motion " << id.asString() << llendl; + + LLMemType mt(LLMemType::MTYPE_AVATAR); + + LLUUID remap_id = remapMotionID(id); + + if (isSelf() && remap_id == ANIM_AGENT_AWAY) { gAgent.setAFK(); } - return LLCharacter::startMotion(id, time_offset); + return LLCharacter::startMotion(remap_id, time_offset); } //----------------------------------------------------------------------------- @@ -4404,21 +4449,14 @@ BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) //----------------------------------------------------------------------------- BOOL LLVOAvatar::stopMotion(const LLUUID& id, BOOL stop_immediate) { + LLUUID remap_id = remapMotionID(id); + if (isSelf()) { - gAgent.onAnimStop(id); - } - - if (id == ANIM_AGENT_WALK) - { - LLCharacter::stopMotion(ANIM_AGENT_FEMALE_WALK, stop_immediate); - } - else if (id == ANIM_AGENT_SIT) - { - LLCharacter::stopMotion(ANIM_AGENT_SIT_FEMALE, stop_immediate); + gAgent.onAnimStop(remap_id); } - return LLCharacter::stopMotion(id, stop_immediate); + return LLCharacter::stopMotion(remap_id, stop_immediate); } //----------------------------------------------------------------------------- diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index c80d59966c..f06bb458c5 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -157,6 +157,7 @@ public: virtual LLJoint* getCharacterJoint(U32 num); virtual BOOL allocateCharacterJoints(U32 num); + 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 void stopMotionFromSource(const LLUUID& source_id); -- cgit v1.2.3 From 063a7a531a66ad1d83e644217a9488682d94b231 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 23 Apr 2010 16:00:12 -0400 Subject: Improved default animations - work in progress --- indra/llcharacter/llanimationstates.cpp | 26 ++++++++++++-- indra/llcharacter/llanimationstates.h | 6 ++++ indra/llcharacter/llmotioncontroller.cpp | 29 ++++++++++++++++ indra/llcharacter/llmotioncontroller.h | 2 ++ indra/newview/llappviewer.cpp | 8 ++--- indra/newview/llvoavatar.cpp | 59 ++++++++++++++++++++++++++++++-- 6 files changed, 120 insertions(+), 10 deletions(-) diff --git a/indra/llcharacter/llanimationstates.cpp b/indra/llcharacter/llanimationstates.cpp index 09deaf1932..ef0745fbcc 100644 --- a/indra/llcharacter/llanimationstates.cpp +++ b/indra/llcharacter/llanimationstates.cpp @@ -95,8 +95,8 @@ const LLUUID ANIM_AGENT_EXPRESS_WINK = LLUUID("da020525-4d94-59d6-23d7-81fdebf3 const LLUUID ANIM_AGENT_EXPRESS_WORRY = LLUUID("9c05e5c7-6f07-6ca4-ed5a-b230390c3950"); const LLUUID ANIM_AGENT_FALLDOWN = LLUUID("666307d9-a860-572d-6fd4-c3ab8865c094"); const LLUUID ANIM_AGENT_FEMALE_RUN_NEW = LLUUID("5c083e7f-6462-a637-8d33-afaefa7a97bc"); -const LLUUID ANIM_AGENT_FEMALE_WALK_NEW = LLUUID("14b7b3c8-8987-85ab-9f29-5a5956058e55"); const LLUUID ANIM_AGENT_FEMALE_WALK = LLUUID("f5fc7433-043d-e819-8298-f519a119b688"); +const LLUUID ANIM_AGENT_FEMALE_WALK_NEW = LLUUID("14b7b3c8-8987-85ab-9f29-5a5956058e55"); const LLUUID ANIM_AGENT_FINGER_WAG = LLUUID("c1bc7f36-3ba0-d844-f93c-93be945d644f"); const LLUUID ANIM_AGENT_FIST_PUMP = LLUUID("7db00ccd-f380-f3ee-439d-61968ec69c8a"); const LLUUID ANIM_AGENT_FLY = LLUUID("aec4610c-757f-bc4e-c092-c6e9caf18daf"); @@ -135,8 +135,8 @@ const LLUUID ANIM_AGENT_RPS_COUNTDOWN = LLUUID("35db4f7e-28c2-6679-cea9-3ee108f const LLUUID ANIM_AGENT_RPS_PAPER = LLUUID("0836b67f-7f7b-f37b-c00a-460dc1521f5a"); const LLUUID ANIM_AGENT_RPS_ROCK = LLUUID("42dd95d5-0bc6-6392-f650-777304946c0f"); const LLUUID ANIM_AGENT_RPS_SCISSORS = LLUUID("16803a9f-5140-e042-4d7b-d28ba247c325"); -const LLUUID ANIM_AGENT_RUN_NEW = LLUUID("25f649b2-c600-9ae3-a8e7-9eca357a20ce"); const LLUUID ANIM_AGENT_RUN = LLUUID("05ddbff8-aaa9-92a1-2b74-8fe77a29b445"); +const LLUUID ANIM_AGENT_RUN_NEW = LLUUID("25f649b2-c600-9ae3-a8e7-9eca357a20ce"); const LLUUID ANIM_AGENT_SAD = LLUUID("0eb702e2-cc5a-9a88-56a5-661a55c0676a"); const LLUUID ANIM_AGENT_SALUTE = LLUUID("cd7668a6-7011-d7e2-ead8-fc69eff1a104"); const LLUUID ANIM_AGENT_SHOOT_BOW_L = LLUUID("e04d450d-fdb5-0432-fd68-818aaf5935f8"); @@ -171,8 +171,8 @@ const LLUUID ANIM_AGENT_TRYON_SHIRT = LLUUID("83ff59fe-2346-f236-9009-4e3608af const LLUUID ANIM_AGENT_TURNLEFT = LLUUID("56e0ba0d-4a9f-7f27-6117-32f2ebbf6135"); const LLUUID ANIM_AGENT_TURNRIGHT = LLUUID("2d6daa51-3192-6794-8e2e-a15f8338ec30"); const LLUUID ANIM_AGENT_TYPE = LLUUID("c541c47f-e0c0-058b-ad1a-d6ae3a4584d9"); -const LLUUID ANIM_AGENT_WALK_NEW = LLUUID("fa1e3197-5e7f-20d1-16d1-f5addc999ce7"); const LLUUID ANIM_AGENT_WALK = LLUUID("6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0"); +const LLUUID ANIM_AGENT_WALK_NEW = LLUUID("fa1e3197-5e7f-20d1-16d1-f5addc999ce7"); const LLUUID ANIM_AGENT_WHISPER = LLUUID("7693f268-06c7-ea71-fa21-2b30d6533f8f"); const LLUUID ANIM_AGENT_WHISTLE = LLUUID("b1ed7982-c68e-a982-7561-52a88a5298c0"); const LLUUID ANIM_AGENT_WINK = LLUUID("869ecdad-a44b-671e-3266-56aef2e3ac2e"); @@ -259,7 +259,9 @@ LLAnimationLibrary::LLAnimationLibrary() : mAnimMap[ANIM_AGENT_EXPRESS_WINK]= mAnimStringTable.addString("express_wink_emote"); mAnimMap[ANIM_AGENT_EXPRESS_WORRY]= mAnimStringTable.addString("express_worry_emote"); mAnimMap[ANIM_AGENT_FALLDOWN]= mAnimStringTable.addString("falldown"); + mAnimMap[ANIM_AGENT_FEMALE_RUN_NEW]= mAnimStringTable.addString("female_run_new"); mAnimMap[ANIM_AGENT_FEMALE_WALK]= mAnimStringTable.addString("female_walk"); + mAnimMap[ANIM_AGENT_FEMALE_WALK_NEW]= mAnimStringTable.addString("female_walk_new"); mAnimMap[ANIM_AGENT_FINGER_WAG]= mAnimStringTable.addString("angry_fingerwag"); mAnimMap[ANIM_AGENT_FIST_PUMP]= mAnimStringTable.addString("fist_pump"); mAnimMap[ANIM_AGENT_FLY]= mAnimStringTable.addString("fly"); @@ -299,6 +301,7 @@ LLAnimationLibrary::LLAnimationLibrary() : mAnimMap[ANIM_AGENT_RPS_ROCK]= mAnimStringTable.addString("rps_rock"); mAnimMap[ANIM_AGENT_RPS_SCISSORS]= mAnimStringTable.addString("rps_scissors"); mAnimMap[ANIM_AGENT_RUN]= mAnimStringTable.addString("run"); + mAnimMap[ANIM_AGENT_RUN_NEW]= mAnimStringTable.addString("run_new"); mAnimMap[ANIM_AGENT_SAD]= mAnimStringTable.addString("express_sad"); mAnimMap[ANIM_AGENT_SALUTE]= mAnimStringTable.addString("salute"); mAnimMap[ANIM_AGENT_SHOOT_BOW_L]= mAnimStringTable.addString("shoot_l_bow"); @@ -334,6 +337,7 @@ LLAnimationLibrary::LLAnimationLibrary() : mAnimMap[ANIM_AGENT_TURNRIGHT]= mAnimStringTable.addString("turnright"); mAnimMap[ANIM_AGENT_TYPE]= mAnimStringTable.addString("type"); mAnimMap[ANIM_AGENT_WALK]= mAnimStringTable.addString("walk"); + mAnimMap[ANIM_AGENT_WALK_NEW]= mAnimStringTable.addString("walk_new"); mAnimMap[ANIM_AGENT_WHISPER]= mAnimStringTable.addString("whisper"); mAnimMap[ANIM_AGENT_WHISTLE]= mAnimStringTable.addString("whistle"); mAnimMap[ANIM_AGENT_WINK]= mAnimStringTable.addString("express_wink"); @@ -403,6 +407,14 @@ LLUUID LLAnimationLibrary::stringToAnimState( const std::string& name, BOOL allo return id; } +//----------------------------------------------------------------------------- +// Associate an anim state with a name +//----------------------------------------------------------------------------- +void LLAnimationLibrary::animStateSetString( const LLUUID& state, const std::string& name) +{ + mAnimMap[state] = mAnimStringTable.addString(name); +} + // Animation states that the user can trigger as part of a gesture // See struct LLAnimStateEntry in header for label location information const LLAnimStateEntry gUserAnimStates[] = { @@ -480,6 +492,14 @@ const LLAnimStateEntry gUserAnimStates[] = { const S32 gUserAnimStatesCount = LL_ARRAY_SIZE(gUserAnimStates); +std::string animationName( const LLUUID& id ) +{ + const char *cptr = gAnimLibrary.animStateToString(id); + if (cptr) + return std::string(cptr); + else + return std::string("[") + id.asString() + std::string("]"); +} // End diff --git a/indra/llcharacter/llanimationstates.h b/indra/llcharacter/llanimationstates.h index 18a19c3eb5..8b6052e0f0 100644 --- a/indra/llcharacter/llanimationstates.h +++ b/indra/llcharacter/llanimationstates.h @@ -227,6 +227,11 @@ public: // Retun NULL if the name is invalid. //----------------------------------------------------------------------------- LLUUID stringToAnimState( const std::string& name, BOOL allow_ids = TRUE ); + + //----------------------------------------------------------------------------- + // Associate an anim state with a name + //----------------------------------------------------------------------------- + void animStateSetString( const LLUUID& state, const std::string& name); }; struct LLAnimStateEntry @@ -252,6 +257,7 @@ extern const LLAnimStateEntry gUserAnimStates[]; extern const S32 gUserAnimStatesCount; extern LLAnimationLibrary gAnimLibrary; +std::string animationName( const LLUUID& id ); #endif // LL_LLANIMATIONSTATES_H diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index bb9625b2bd..318fac847b 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -392,6 +392,8 @@ LLMotion* LLMotionController::createMotion( const LLUUID &id ) //----------------------------------------------------------------------------- BOOL LLMotionController::startMotion(const LLUUID &id, F32 start_offset) { + llinfos << animationName(id) << llendl; + // do we have an instance of this motion for this character? LLMotion *motion = findMotion(id); @@ -804,6 +806,8 @@ void LLMotionController::updateLoadingMotions() //----------------------------------------------------------------------------- void LLMotionController::updateMotions(bool force_update) { + dumpMotions(); + BOOL use_quantum = (mTimeStep != 0.f); // Always update mPrevTimerElapsed @@ -1032,6 +1036,31 @@ LLMotion* LLMotionController::findMotion(const LLUUID& id) const } } +//----------------------------------------------------------------------------- +// dumpMotions() +//----------------------------------------------------------------------------- +void LLMotionController::dumpMotions() +{ + for (motion_map_t::iterator iter = mAllMotions.begin(); + iter != mAllMotions.end(); iter++) + { + llinfos << "=====================================" << llendl; + LLUUID id = iter->first; + std::string state_string; + LLMotion *motion = iter->second; + if (mLoadingMotions.find(motion) != mLoadingMotions.end()) + state_string += std::string("l"); + if (mLoadedMotions.find(motion) != mLoadedMotions.end()) + state_string += std::string("L"); + if (std::find(mActiveMotions.begin(), mActiveMotions.end(), motion)!=mActiveMotions.end()) + state_string += std::string("A"); + if (mDeprecatedMotions.find(motion) != mDeprecatedMotions.end()) + state_string += std::string("D"); + llinfos << animationName(id) << " " << state_string << llendl; + + } +} + //----------------------------------------------------------------------------- // deactivateAllMotions() //----------------------------------------------------------------------------- diff --git a/indra/llcharacter/llmotioncontroller.h b/indra/llcharacter/llmotioncontroller.h index 5c3ec223cb..83dc2d487a 100644 --- a/indra/llcharacter/llmotioncontroller.h +++ b/indra/llcharacter/llmotioncontroller.h @@ -169,6 +169,8 @@ public: bool isMotionLoading( LLMotion *motion ); LLMotion *findMotion( const LLUUID& id ) const; + void dumpMotions(); + protected: // internal operations act on motion instances directly // as there can be duplicate motions per id during blending overlap diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 2f9bbb1407..b78d968e0e 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3243,11 +3243,11 @@ bool LLAppViewer::initCache() { LLVFile::initClass(); - //llinfos << "Static VFS listing" << llendl; - //gStaticVFS->listFiles(); + llinfos << "======= Static VFS listing ========" << llendl; + gStaticVFS->listFiles(); - //llinfos << "regular VFS listing" << llendl; - //gVFS->listFiles(); + llinfos << "========= regular VFS listing =====" << llendl; + gVFS->listFiles(); return true; } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 05cb914e90..02baaeae41 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1114,6 +1114,17 @@ void LLVOAvatar::initClass() { llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << llendl; } + + gAnimLibrary.animStateSetString(ANIM_AGENT_BODY_NOISE,"body_noise"); + gAnimLibrary.animStateSetString(ANIM_AGENT_BREATHE_ROT,"breathe_rot"); + gAnimLibrary.animStateSetString(ANIM_AGENT_EDITING,"editing"); + gAnimLibrary.animStateSetString(ANIM_AGENT_EYE,"eye"); + gAnimLibrary.animStateSetString(ANIM_AGENT_FLY_ADJUST,"fly_adjust"); + gAnimLibrary.animStateSetString(ANIM_AGENT_HAND_MOTION,"hand_motion"); + gAnimLibrary.animStateSetString(ANIM_AGENT_HEAD_ROT,"head_rot"); + gAnimLibrary.animStateSetString(ANIM_AGENT_PELVIS_FIX,"pelvis_fix"); + gAnimLibrary.animStateSetString(ANIM_AGENT_TARGET,"target"); + gAnimLibrary.animStateSetString(ANIM_AGENT_WALK_ADJUST,"walk_adjust"); } @@ -2120,6 +2131,30 @@ S32 LLVOAvatar::setTETexture(const U8 te, const LLUUID& uuid) static LLFastTimer::DeclareTimer FTM_AVATAR_UPDATE("Update Avatar"); static LLFastTimer::DeclareTimer FTM_JOINT_UPDATE("Update Joints"); +void dumpAnimationState(LLVOAvatar *self) +{ + llinfos << "==============================================" << llendl; + for (LLVOAvatar::AnimIterator it = self->mSignaledAnimations.begin(); it != self->mSignaledAnimations.end(); ++it) + { + LLUUID id = it->first; + std::string playtag = ""; + if (self->mPlayingAnimations.find(id) != self->mPlayingAnimations.end()) + { + playtag = "*"; + } + llinfos << animationName(id) << playtag << llendl; + } + for (LLVOAvatar::AnimIterator it = self->mPlayingAnimations.begin(); it != self->mPlayingAnimations.end(); ++it) + { + LLUUID id = it->first; + bool is_signaled = self->mSignaledAnimations.find(id) != self->mSignaledAnimations.end(); + if (!is_signaled) + { + llinfos << animationName(id) << "!S" << llendl; + } + } +} + //------------------------------------------------------------------------ // idleUpdate() //------------------------------------------------------------------------ @@ -2223,6 +2258,12 @@ BOOL LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) idleUpdateNameTag( root_pos_last ); idleUpdateRenderCost(); idleUpdateTractorBeam(); + + if (isSelf()) + { + dumpAnimationState(this); + } + return TRUE; } @@ -4430,12 +4471,17 @@ LLUUID LLVOAvatar::remapMotionID(const LLUUID& id) //----------------------------------------------------------------------------- BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) { - llinfos << "motion " << id.asString() << llendl; - LLMemType mt(LLMemType::MTYPE_AVATAR); + llinfos << "motion requested " << id.asString() << " " << animationName(id) << llendl; + LLUUID remap_id = remapMotionID(id); - + + if (remap_id != id) + { + llinfos << "motion resultant " << remap_id.asString() << " " << animationName(remap_id) << llendl; + } + if (isSelf() && remap_id == ANIM_AGENT_AWAY) { gAgent.setAFK(); @@ -4449,8 +4495,15 @@ BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) //----------------------------------------------------------------------------- BOOL LLVOAvatar::stopMotion(const LLUUID& id, BOOL stop_immediate) { + llinfos << "motion requested " << id.asString() << " " << animationName(id) << llendl; + LLUUID remap_id = remapMotionID(id); + if (remap_id != id) + { + llinfos << "motion resultant " << remap_id.asString() << " " << animationName(remap_id) << llendl; + } + if (isSelf()) { gAgent.onAnimStop(remap_id); -- cgit v1.2.3 From 2927ae2fa4058f249b8ff1e6bd7ed87b02917d57 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 26 Apr 2010 17:45:32 -0400 Subject: Improved default animations - work in progress --- indra/llcharacter/llmotioncontroller.cpp | 10 +++++++--- indra/llcharacter/llmotioncontroller.h | 1 + indra/newview/llvoavatar.cpp | 10 +++++----- indra/newview/llvoavatarself.cpp | 4 +++- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index 318fac847b..5070f83ed6 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -143,7 +143,8 @@ LLMotionController::LLMotionController() mPauseTime(0.f), mTimeStep(0.f), mTimeStepCount(0), - mLastInterp(0.f) + mLastInterp(0.f), + mIsSelf(FALSE) { } @@ -806,7 +807,10 @@ void LLMotionController::updateLoadingMotions() //----------------------------------------------------------------------------- void LLMotionController::updateMotions(bool force_update) { - dumpMotions(); + if (mIsSelf) + { + dumpMotions(); + } BOOL use_quantum = (mTimeStep != 0.f); @@ -1041,10 +1045,10 @@ LLMotion* LLMotionController::findMotion(const LLUUID& id) const //----------------------------------------------------------------------------- void LLMotionController::dumpMotions() { + llinfos << "=====================================" << llendl; for (motion_map_t::iterator iter = mAllMotions.begin(); iter != mAllMotions.end(); iter++) { - llinfos << "=====================================" << llendl; LLUUID id = iter->first; std::string state_string; LLMotion *motion = iter->second; diff --git a/indra/llcharacter/llmotioncontroller.h b/indra/llcharacter/llmotioncontroller.h index 83dc2d487a..30ab0cbdc9 100644 --- a/indra/llcharacter/llmotioncontroller.h +++ b/indra/llcharacter/llmotioncontroller.h @@ -92,6 +92,7 @@ class LLMotionController public: typedef std::list motion_list_t; typedef std::set motion_set_t; + BOOL mIsSelf; public: // Constructor diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 02baaeae41..62823648b7 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2259,11 +2259,6 @@ BOOL LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) idleUpdateRenderCost(); idleUpdateTractorBeam(); - if (isSelf()) - { - dumpAnimationState(this); - } - return TRUE; } @@ -3066,6 +3061,11 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) } } + if (isSelf()) + { + dumpAnimationState(this); + } + if (gNoRender) { // Hack if we're running drones... diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 7473adda1f..9bed75c0a6 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -143,7 +143,9 @@ LLVOAvatarSelf::LLVOAvatarSelf(const LLUUID& id, mRegionCrossingCount(0) { gAgentWearables.setAvatarObject(this); - + + mMotionController.mIsSelf = TRUE; + lldebugs << "Marking avatar as self " << id << llendl; } -- cgit v1.2.3 From 969a4bf934030fe543cd9b05e3ef1e2da0ba11d1 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 27 Apr 2010 23:01:11 -0400 Subject: work in progress on improved default animations --- indra/llcharacter/llmotioncontroller.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index 5070f83ed6..6df72a4d9b 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -449,9 +449,15 @@ BOOL LLMotionController::stopMotionInstance(LLMotion* motion, BOOL stop_immediat return FALSE; } + // If on active list, stop it if (isMotionActive(motion) && !motion->isStopped()) { + if (motion->getID() == ANIM_AGENT_FEMALE_WALK_NEW || motion->getID() == ANIM_AGENT_FEMALE_WALK) + { + llinfos << "stop female walk: " << animationName(motion->getID()) << llendl; + } + motion->setStopTime(mAnimTime); if (stop_immediate) { -- cgit v1.2.3 From e9effbe73a995b7356ae711a3406f253a779005f Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 29 Apr 2010 15:58:50 -0400 Subject: For EXT-6953: Evaluate and implement Richard's improved default animations. New versions of animations fix looping and other problems, reduced log spam. --- indra/llcharacter/llanimationstates.cpp | 8 ++++---- indra/llcharacter/llmotioncontroller.cpp | 27 ++++++++++++++++++++++++++- indra/newview/llvoavatar.cpp | 2 +- 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/indra/llcharacter/llanimationstates.cpp b/indra/llcharacter/llanimationstates.cpp index ef0745fbcc..bcc28cfc8f 100644 --- a/indra/llcharacter/llanimationstates.cpp +++ b/indra/llcharacter/llanimationstates.cpp @@ -94,9 +94,9 @@ const LLUUID ANIM_AGENT_EXPRESS_TOOTHSMILE = LLUUID("b92ec1a5-e7ce-a76b-2b05-bcd const LLUUID ANIM_AGENT_EXPRESS_WINK = LLUUID("da020525-4d94-59d6-23d7-81fdebf33148"); const LLUUID ANIM_AGENT_EXPRESS_WORRY = LLUUID("9c05e5c7-6f07-6ca4-ed5a-b230390c3950"); const LLUUID ANIM_AGENT_FALLDOWN = LLUUID("666307d9-a860-572d-6fd4-c3ab8865c094"); -const LLUUID ANIM_AGENT_FEMALE_RUN_NEW = LLUUID("5c083e7f-6462-a637-8d33-afaefa7a97bc"); +const LLUUID ANIM_AGENT_FEMALE_RUN_NEW = LLUUID("85995026-eade-5d78-d364-94a64512cb66"); const LLUUID ANIM_AGENT_FEMALE_WALK = LLUUID("f5fc7433-043d-e819-8298-f519a119b688"); -const LLUUID ANIM_AGENT_FEMALE_WALK_NEW = LLUUID("14b7b3c8-8987-85ab-9f29-5a5956058e55"); +const LLUUID ANIM_AGENT_FEMALE_WALK_NEW = LLUUID("d60c41d2-7c24-7074-d3fa-6101cea22a51"); const LLUUID ANIM_AGENT_FINGER_WAG = LLUUID("c1bc7f36-3ba0-d844-f93c-93be945d644f"); const LLUUID ANIM_AGENT_FIST_PUMP = LLUUID("7db00ccd-f380-f3ee-439d-61968ec69c8a"); const LLUUID ANIM_AGENT_FLY = LLUUID("aec4610c-757f-bc4e-c092-c6e9caf18daf"); @@ -136,7 +136,7 @@ const LLUUID ANIM_AGENT_RPS_PAPER = LLUUID("0836b67f-7f7b-f37b-c00a-460dc1521f const LLUUID ANIM_AGENT_RPS_ROCK = LLUUID("42dd95d5-0bc6-6392-f650-777304946c0f"); const LLUUID ANIM_AGENT_RPS_SCISSORS = LLUUID("16803a9f-5140-e042-4d7b-d28ba247c325"); const LLUUID ANIM_AGENT_RUN = LLUUID("05ddbff8-aaa9-92a1-2b74-8fe77a29b445"); -const LLUUID ANIM_AGENT_RUN_NEW = LLUUID("25f649b2-c600-9ae3-a8e7-9eca357a20ce"); +const LLUUID ANIM_AGENT_RUN_NEW = LLUUID("1ab1b236-cd08-21e6-0cbc-0d923fc6eca2"); const LLUUID ANIM_AGENT_SAD = LLUUID("0eb702e2-cc5a-9a88-56a5-661a55c0676a"); const LLUUID ANIM_AGENT_SALUTE = LLUUID("cd7668a6-7011-d7e2-ead8-fc69eff1a104"); const LLUUID ANIM_AGENT_SHOOT_BOW_L = LLUUID("e04d450d-fdb5-0432-fd68-818aaf5935f8"); @@ -172,7 +172,7 @@ const LLUUID ANIM_AGENT_TURNLEFT = LLUUID("56e0ba0d-4a9f-7f27-6117-32f2ebbf613 const LLUUID ANIM_AGENT_TURNRIGHT = LLUUID("2d6daa51-3192-6794-8e2e-a15f8338ec30"); const LLUUID ANIM_AGENT_TYPE = LLUUID("c541c47f-e0c0-058b-ad1a-d6ae3a4584d9"); const LLUUID ANIM_AGENT_WALK = LLUUID("6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0"); -const LLUUID ANIM_AGENT_WALK_NEW = LLUUID("fa1e3197-5e7f-20d1-16d1-f5addc999ce7"); +const LLUUID ANIM_AGENT_WALK_NEW = LLUUID("33339176-7ddc-9397-94a4-bf3403cbc8f5"); const LLUUID ANIM_AGENT_WHISPER = LLUUID("7693f268-06c7-ea71-fa21-2b30d6533f8f"); const LLUUID ANIM_AGENT_WHISTLE = LLUUID("b1ed7982-c68e-a982-7561-52a88a5298c0"); const LLUUID ANIM_AGENT_WINK = LLUUID("869ecdad-a44b-671e-3266-56aef2e3ac2e"); diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index 6df72a4d9b..80d98a1cee 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -552,6 +552,26 @@ void LLMotionController::updateIdleActiveMotions() } } + +void breakWalkIf(LLMotion *motionp, BOOL flag) +{ + if ( + (motionp->getID() == ANIM_AGENT_FEMALE_WALK) || + (motionp->getID() == ANIM_AGENT_FEMALE_WALK_NEW) || + (motionp->getID() == ANIM_AGENT_FEMALE_RUN_NEW) || + (motionp->getID() == ANIM_AGENT_FEMALE_WALK_NEW) || + (motionp->getID() == ANIM_AGENT_WALK) || + (motionp->getID() == ANIM_AGENT_RUN) || + (motionp->getID() == ANIM_AGENT_RUN_NEW) + ) + { + if (flag) + { + llinfos << "break here" << llendl; + } + } +} + //----------------------------------------------------------------------------- // updateMotionsByType() //----------------------------------------------------------------------------- @@ -690,6 +710,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty // perform motion update update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature); + breakWalkIf(motionp,!update_result); } //********************** @@ -712,7 +733,9 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty } // perform motion update + breakWalkIf(motionp,TRUE); update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature); + breakWalkIf(motionp,!update_result); } //********************** @@ -735,11 +758,13 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty } // perform motion update update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature); + breakWalkIf(motionp,!update_result); } else { posep->setWeight(0.f); update_result = motionp->onUpdate(0.f, last_joint_signature); + breakWalkIf(motionp,!update_result); } // allow motions to deactivate themselves @@ -815,7 +840,7 @@ void LLMotionController::updateMotions(bool force_update) { if (mIsSelf) { - dumpMotions(); + //dumpMotions(); } BOOL use_quantum = (mTimeStep != 0.f); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 62823648b7..05583c0944 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3063,7 +3063,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) if (isSelf()) { - dumpAnimationState(this); + // dumpAnimationState(this); } if (gNoRender) -- cgit v1.2.3 From 29740b0e3dee7f124cc8790ec5f1e444b3bcda79 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 30 Apr 2010 17:54:38 -0400 Subject: For EXT-6953: Evaluate and implement Richard's improved default animations. Diagnostic info. --- indra/llcharacter/llkeyframewalkmotion.cpp | 25 ++++++++++++++----------- indra/llcharacter/llmotioncontroller.cpp | 2 +- indra/newview/llvoavatar.cpp | 12 ++++++++++++ 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/indra/llcharacter/llkeyframewalkmotion.cpp b/indra/llcharacter/llkeyframewalkmotion.cpp index 461309bee9..f6c43effdf 100644 --- a/indra/llcharacter/llkeyframewalkmotion.cpp +++ b/indra/llcharacter/llkeyframewalkmotion.cpp @@ -48,8 +48,9 @@ const F32 MAX_WALK_PLAYBACK_SPEED = 8.f; // max m/s for which we adjust walk cyc const F32 MIN_WALK_SPEED = 0.1f; // minimum speed at which we use velocity for down foot detection const F32 MAX_TIME_DELTA = 2.f; //max two seconds a frame for calculating interpolation -const F32 SPEED_ADJUST_MAX = 2.5f; // maximum adjustment of walk animation playback speed -const F32 SPEED_ADJUST_MAX_SEC = 3.f; // maximum adjustment to walk animation playback speed for a second +F32 SPEED_ADJUST_MAX = 2.5f; // maximum adjustment of walk animation playback speed +F32 SPEED_ADJUST_MAX_SEC = 3.f; // maximum adjustment to walk animation playback speed for a second +F32 ANIM_SPEED_MAX = 5.0f; // absolute limit on animation speed const F32 DRIFT_COMP_MAX_TOTAL = 0.07f;//0.55f; // maximum drift compensation overall, in any direction const F32 DRIFT_COMP_MAX_SPEED = 4.f; // speed at which drift compensation total maxes out const F32 MAX_ROLL = 0.6f; @@ -300,6 +301,7 @@ BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask) // and if we're moving backward, we walk backward F32 directional_factor = localVel.mV[VX] * mRelativeDir; + if (speed > 0.1f) { // calculate ratio of desired foot velocity to detected foot velocity @@ -318,15 +320,16 @@ BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask) } mAnimSpeed = (mAvgSpeed + mSpeedAdjust) * mRelativeDir; -// char debug_text[64]; -// sprintf(debug_text, "Foot slip vel: %.2f", footSlipVelocity); -// mCharacter->addDebugText(debug_text); -// sprintf(debug_text, "Speed: %.2f", mAvgSpeed); -// mCharacter->addDebugText(debug_text); -// sprintf(debug_text, "Speed Adjust: %.2f", mSpeedAdjust); -// mCharacter->addDebugText(debug_text); -// sprintf(debug_text, "Animation Playback Speed: %.2f", mAnimSpeed); -// mCharacter->addDebugText(debug_text); + mAnimSpeed = llclamp(mAnimSpeed, -ANIM_SPEED_MAX, ANIM_SPEED_MAX); + char debug_text[64]; + sprintf(debug_text, "Foot slip vel: %.2f", footSlipVelocity); + mCharacter->addDebugText(debug_text); + sprintf(debug_text, "Speed: %.2f", mAvgSpeed); + mCharacter->addDebugText(debug_text); + sprintf(debug_text, "Speed Adjust: %.2f", mSpeedAdjust); + mCharacter->addDebugText(debug_text); + sprintf(debug_text, "Animation Playback Speed: %.2f", mAnimSpeed); + mCharacter->addDebugText(debug_text); mCharacter->setAnimationData("Walk Speed", &mAnimSpeed); // clamp pelvis offset to a 90 degree arc behind the nominal position diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index 80d98a1cee..ca10f5f572 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -559,8 +559,8 @@ void breakWalkIf(LLMotion *motionp, BOOL flag) (motionp->getID() == ANIM_AGENT_FEMALE_WALK) || (motionp->getID() == ANIM_AGENT_FEMALE_WALK_NEW) || (motionp->getID() == ANIM_AGENT_FEMALE_RUN_NEW) || - (motionp->getID() == ANIM_AGENT_FEMALE_WALK_NEW) || (motionp->getID() == ANIM_AGENT_WALK) || + (motionp->getID() == ANIM_AGENT_WALK_NEW) || (motionp->getID() == ANIM_AGENT_RUN) || (motionp->getID() == ANIM_AGENT_RUN_NEW) ) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 05583c0944..e9de29ff56 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -95,6 +95,11 @@ #include "llvoiceclient.h" #include "llvoicevisualizer.h" // Ventrella +#include "lldebugmessagebox.h" +extern F32 SPEED_ADJUST_MAX; +extern F32 SPEED_ADJUST_MAX_SEC; +extern F32 ANIM_SPEED_MAX; + #if LL_MSVC // disable boost::lexical_cast warning #pragma warning (disable:4702) @@ -3031,6 +3036,13 @@ void LLVOAvatar::slamPosition() //------------------------------------------------------------------------ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) { + if (!LLApp::isExiting()) + { + LLDebugVarMessageBox::show("Adj Max", &SPEED_ADJUST_MAX, 5.0f, 0.1f); + LLDebugVarMessageBox::show("Adj Max Sec", &SPEED_ADJUST_MAX_SEC, 5.0f, 0.1f); + LLDebugVarMessageBox::show("Anim Max", &ANIM_SPEED_MAX, 10.0f, 0.1f); + } + LLMemType mt(LLMemType::MTYPE_AVATAR); // clear debug text -- cgit v1.2.3 From 6081ad52c3711010e03c26679849921d4e5968bc Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 6 May 2010 19:10:11 -0400 Subject: Improved default animations - work in progress --- indra/llcharacter/llkeyframewalkmotion.cpp | 26 ++++++++++++++++++++++++-- indra/llcharacter/llmotioncontroller.cpp | 2 +- indra/llcharacter/llmotioncontroller.h | 4 +++- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llvoavatar.cpp | 12 +++++++++--- 5 files changed, 48 insertions(+), 7 deletions(-) diff --git a/indra/llcharacter/llkeyframewalkmotion.cpp b/indra/llcharacter/llkeyframewalkmotion.cpp index f6c43effdf..3cf4d695dd 100644 --- a/indra/llcharacter/llkeyframewalkmotion.cpp +++ b/indra/llcharacter/llkeyframewalkmotion.cpp @@ -50,7 +50,8 @@ const F32 MIN_WALK_SPEED = 0.1f; // minimum speed at which we use velocity for d const F32 MAX_TIME_DELTA = 2.f; //max two seconds a frame for calculating interpolation F32 SPEED_ADJUST_MAX = 2.5f; // maximum adjustment of walk animation playback speed F32 SPEED_ADJUST_MAX_SEC = 3.f; // maximum adjustment to walk animation playback speed for a second -F32 ANIM_SPEED_MAX = 5.0f; // absolute limit on animation speed +F32 ANIM_SPEED_MAX = 10.0f; // absolute upper limit on animation speed +F32 ANIM_SPEED_MIN = 0.0f; // absolute lower limit on animation speed const F32 DRIFT_COMP_MAX_TOTAL = 0.07f;//0.55f; // maximum drift compensation overall, in any direction const F32 DRIFT_COMP_MAX_SPEED = 4.f; // speed at which drift compensation total maxes out const F32 MAX_ROLL = 0.6f; @@ -320,7 +321,14 @@ BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask) } mAnimSpeed = (mAvgSpeed + mSpeedAdjust) * mRelativeDir; - mAnimSpeed = llclamp(mAnimSpeed, -ANIM_SPEED_MAX, ANIM_SPEED_MAX); + if (mAnimSpeed>0) + { + mAnimSpeed = llclamp(mAnimSpeed, ANIM_SPEED_MIN, ANIM_SPEED_MAX); + } + else + { + mAnimSpeed = llclamp(mAnimSpeed, -ANIM_SPEED_MAX, -ANIM_SPEED_MIN); + } char debug_text[64]; sprintf(debug_text, "Foot slip vel: %.2f", footSlipVelocity); mCharacter->addDebugText(debug_text); @@ -331,6 +339,20 @@ BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask) sprintf(debug_text, "Animation Playback Speed: %.2f", mAnimSpeed); mCharacter->addDebugText(debug_text); mCharacter->setAnimationData("Walk Speed", &mAnimSpeed); + if (mCharacter->getMotionController().mIsSelf) + { + F32 elapsed = mCharacter->getMotionController().getFrameTimer().getElapsedTimeF32(); + llinfos << "PLOT elapsed: " << elapsed +// << " footSlipVelocity: " << footSlipVelocity +// << " speed: " << speed +// << " mAvgCorrection: " << mAvgCorrection + << " mAvgSpeed: " << mAvgSpeed +// << " mSpeedAdjust: " << mSpeedAdjust + << " mAnimSpeed: " << mAnimSpeed + << " ANIM_SPEED_MAX: " << ANIM_SPEED_MAX + << " ANIM_SPEED_MIN: " << ANIM_SPEED_MIN + << llendl; + } // clamp pelvis offset to a 90 degree arc behind the nominal position F32 drift_comp_max = llclamp(speed, 0.f, DRIFT_COMP_MAX_SPEED) / DRIFT_COMP_MAX_SPEED; diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index ca10f5f572..51a9120cbb 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -567,7 +567,7 @@ void breakWalkIf(LLMotion *motionp, BOOL flag) { if (flag) { - llinfos << "break here" << llendl; +// llinfos << "break here" << llendl; } } } diff --git a/indra/llcharacter/llmotioncontroller.h b/indra/llcharacter/llmotioncontroller.h index 30ab0cbdc9..f8bf5ac289 100644 --- a/indra/llcharacter/llmotioncontroller.h +++ b/indra/llcharacter/llmotioncontroller.h @@ -171,7 +171,9 @@ public: LLMotion *findMotion( const LLUUID& id ) const; void dumpMotions(); - + + const LLFrameTimer& getFrameTimer() { return mTimer; } + protected: // internal operations act on motion instances directly // as there can be duplicate motions per id during blending overlap diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 6f08cd7579..fa9dc2d3c1 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10194,6 +10194,17 @@ Value 0 + ShowWalkSliders + + Comment + Allow walk params to be adjusted on the fly. + Persist + 1 + Type + Boolean + Value + 0 + UseStartScreen Comment diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index e9de29ff56..3e6ec21017 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -99,6 +99,7 @@ extern F32 SPEED_ADJUST_MAX; extern F32 SPEED_ADJUST_MAX_SEC; extern F32 ANIM_SPEED_MAX; +extern F32 ANIM_SPEED_MIN; #if LL_MSVC // disable boost::lexical_cast warning @@ -3038,9 +3039,14 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) { if (!LLApp::isExiting()) { - LLDebugVarMessageBox::show("Adj Max", &SPEED_ADJUST_MAX, 5.0f, 0.1f); - LLDebugVarMessageBox::show("Adj Max Sec", &SPEED_ADJUST_MAX_SEC, 5.0f, 0.1f); - LLDebugVarMessageBox::show("Anim Max", &ANIM_SPEED_MAX, 10.0f, 0.1f); + BOOL show_walk_sliders = gSavedSettings.getBOOL("ShowWalkSliders"); + if (show_walk_sliders) + { + LLDebugVarMessageBox::show("Adj Max", &SPEED_ADJUST_MAX, 5.0f, 0.1f); + LLDebugVarMessageBox::show("Adj Max Sec", &SPEED_ADJUST_MAX_SEC, 5.0f, 0.1f); + LLDebugVarMessageBox::show("Anim Max", &ANIM_SPEED_MAX, 10.0f, 0.1f); + LLDebugVarMessageBox::show("Anim Min", &ANIM_SPEED_MIN, 10.0f, 0.1f); + } } LLMemType mt(LLMemType::MTYPE_AVATAR); -- cgit v1.2.3 From 9e5fe84c9e6f6027878d70350c8f60e4c2be7e48 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 7 May 2010 15:10:50 -0400 Subject: For EXT-6953: Evaluate and implement Richard's improved default animations. Cleanup and log spam reduction. --- indra/llcharacter/llanimationstates.cpp | 3 --- indra/llcharacter/llkeyframewalkmotion.cpp | 26 ++++++++++----------- indra/llcharacter/llmotioncontroller.cpp | 37 ------------------------------ indra/newview/llappviewer.cpp | 8 +++---- indra/newview/llvoavatar.cpp | 27 +++++++++++----------- indra/newview/llvoavatar.h | 1 + 6 files changed, 30 insertions(+), 72 deletions(-) diff --git a/indra/llcharacter/llanimationstates.cpp b/indra/llcharacter/llanimationstates.cpp index bcc28cfc8f..879f97deec 100644 --- a/indra/llcharacter/llanimationstates.cpp +++ b/indra/llcharacter/llanimationstates.cpp @@ -39,9 +39,6 @@ #include "llanimationstates.h" #include "llstring.h" -// Would be nice to be able to toggle at run-time, but not gonna -// happen while we're using const LLUUIDs as keys. - const LLUUID ANIM_AGENT_AFRAID = LLUUID("6b61c8e8-4747-0d75-12d7-e49ff207a4ca"); const LLUUID ANIM_AGENT_AIM_BAZOOKA_R = LLUUID("b5b4a67d-0aee-30d2-72cd-77b333e932ef"); const LLUUID ANIM_AGENT_AIM_BOW_L = LLUUID("46bb4359-de38-4ed8-6a22-f1f52fe8f506"); diff --git a/indra/llcharacter/llkeyframewalkmotion.cpp b/indra/llcharacter/llkeyframewalkmotion.cpp index 3cf4d695dd..232b617d69 100644 --- a/indra/llcharacter/llkeyframewalkmotion.cpp +++ b/indra/llcharacter/llkeyframewalkmotion.cpp @@ -329,25 +329,23 @@ BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask) { mAnimSpeed = llclamp(mAnimSpeed, -ANIM_SPEED_MAX, -ANIM_SPEED_MIN); } - char debug_text[64]; - sprintf(debug_text, "Foot slip vel: %.2f", footSlipVelocity); - mCharacter->addDebugText(debug_text); - sprintf(debug_text, "Speed: %.2f", mAvgSpeed); - mCharacter->addDebugText(debug_text); - sprintf(debug_text, "Speed Adjust: %.2f", mSpeedAdjust); - mCharacter->addDebugText(debug_text); - sprintf(debug_text, "Animation Playback Speed: %.2f", mAnimSpeed); - mCharacter->addDebugText(debug_text); - mCharacter->setAnimationData("Walk Speed", &mAnimSpeed); +// char debug_text[64]; +// sprintf(debug_text, "Foot slip vel: %.2f", footSlipVelocity); +// mCharacter->addDebugText(debug_text); +// sprintf(debug_text, "Speed: %.2f", mAvgSpeed); +// mCharacter->addDebugText(debug_text); +// sprintf(debug_text, "Speed Adjust: %.2f", mSpeedAdjust); +// mCharacter->addDebugText(debug_text); +// sprintf(debug_text, "Animation Playback Speed: %.2f", mAnimSpeed); +// mCharacter->addDebugText(debug_text); + mCharacter->setAnimationData("Walk Speed", &mAnimSpeed); if (mCharacter->getMotionController().mIsSelf) { F32 elapsed = mCharacter->getMotionController().getFrameTimer().getElapsedTimeF32(); llinfos << "PLOT elapsed: " << elapsed -// << " footSlipVelocity: " << footSlipVelocity -// << " speed: " << speed -// << " mAvgCorrection: " << mAvgCorrection + << " footSlipVelocity: " << footSlipVelocity + << " mAvgCorrection: " << mAvgCorrection << " mAvgSpeed: " << mAvgSpeed -// << " mSpeedAdjust: " << mSpeedAdjust << " mAnimSpeed: " << mAnimSpeed << " ANIM_SPEED_MAX: " << ANIM_SPEED_MAX << " ANIM_SPEED_MIN: " << ANIM_SPEED_MIN diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index 51a9120cbb..04524dc015 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -393,8 +393,6 @@ LLMotion* LLMotionController::createMotion( const LLUUID &id ) //----------------------------------------------------------------------------- BOOL LLMotionController::startMotion(const LLUUID &id, F32 start_offset) { - llinfos << animationName(id) << llendl; - // do we have an instance of this motion for this character? LLMotion *motion = findMotion(id); @@ -453,11 +451,6 @@ BOOL LLMotionController::stopMotionInstance(LLMotion* motion, BOOL stop_immediat // If on active list, stop it if (isMotionActive(motion) && !motion->isStopped()) { - if (motion->getID() == ANIM_AGENT_FEMALE_WALK_NEW || motion->getID() == ANIM_AGENT_FEMALE_WALK) - { - llinfos << "stop female walk: " << animationName(motion->getID()) << llendl; - } - motion->setStopTime(mAnimTime); if (stop_immediate) { @@ -552,26 +545,6 @@ void LLMotionController::updateIdleActiveMotions() } } - -void breakWalkIf(LLMotion *motionp, BOOL flag) -{ - if ( - (motionp->getID() == ANIM_AGENT_FEMALE_WALK) || - (motionp->getID() == ANIM_AGENT_FEMALE_WALK_NEW) || - (motionp->getID() == ANIM_AGENT_FEMALE_RUN_NEW) || - (motionp->getID() == ANIM_AGENT_WALK) || - (motionp->getID() == ANIM_AGENT_WALK_NEW) || - (motionp->getID() == ANIM_AGENT_RUN) || - (motionp->getID() == ANIM_AGENT_RUN_NEW) - ) - { - if (flag) - { -// llinfos << "break here" << llendl; - } - } -} - //----------------------------------------------------------------------------- // updateMotionsByType() //----------------------------------------------------------------------------- @@ -710,7 +683,6 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty // perform motion update update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature); - breakWalkIf(motionp,!update_result); } //********************** @@ -733,9 +705,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty } // perform motion update - breakWalkIf(motionp,TRUE); update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature); - breakWalkIf(motionp,!update_result); } //********************** @@ -758,13 +728,11 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty } // perform motion update update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature); - breakWalkIf(motionp,!update_result); } else { posep->setWeight(0.f); update_result = motionp->onUpdate(0.f, last_joint_signature); - breakWalkIf(motionp,!update_result); } // allow motions to deactivate themselves @@ -838,11 +806,6 @@ void LLMotionController::updateLoadingMotions() //----------------------------------------------------------------------------- void LLMotionController::updateMotions(bool force_update) { - if (mIsSelf) - { - //dumpMotions(); - } - BOOL use_quantum = (mTimeStep != 0.f); // Always update mPrevTimerElapsed diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index b78d968e0e..c013831c83 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3243,11 +3243,11 @@ bool LLAppViewer::initCache() { LLVFile::initClass(); - llinfos << "======= Static VFS listing ========" << llendl; - gStaticVFS->listFiles(); + //llinfos << "======= Static VFS listing ========" << llendl; + //gStaticVFS->listFiles(); - llinfos << "========= regular VFS listing =====" << llendl; - gVFS->listFiles(); + //llinfos << "========= regular VFS listing =====" << llendl; + //gVFS->listFiles(); return true; } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 3e6ec21017..b94fc3021c 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2137,23 +2137,26 @@ S32 LLVOAvatar::setTETexture(const U8 te, const LLUUID& uuid) static LLFastTimer::DeclareTimer FTM_AVATAR_UPDATE("Update Avatar"); static LLFastTimer::DeclareTimer FTM_JOINT_UPDATE("Update Joints"); -void dumpAnimationState(LLVOAvatar *self) +//------------------------------------------------------------------------ +// LLVOAvatar::dumpAnimationState() +//------------------------------------------------------------------------ +void LLVOAvatar::dumpAnimationState() { llinfos << "==============================================" << llendl; - for (LLVOAvatar::AnimIterator it = self->mSignaledAnimations.begin(); it != self->mSignaledAnimations.end(); ++it) + for (LLVOAvatar::AnimIterator it = mSignaledAnimations.begin(); it != mSignaledAnimations.end(); ++it) { LLUUID id = it->first; std::string playtag = ""; - if (self->mPlayingAnimations.find(id) != self->mPlayingAnimations.end()) + if (mPlayingAnimations.find(id) != mPlayingAnimations.end()) { playtag = "*"; } llinfos << animationName(id) << playtag << llendl; } - for (LLVOAvatar::AnimIterator it = self->mPlayingAnimations.begin(); it != self->mPlayingAnimations.end(); ++it) + for (LLVOAvatar::AnimIterator it = mPlayingAnimations.begin(); it != mPlayingAnimations.end(); ++it) { LLUUID id = it->first; - bool is_signaled = self->mSignaledAnimations.find(id) != self->mSignaledAnimations.end(); + bool is_signaled = mSignaledAnimations.find(id) != mSignaledAnimations.end(); if (!is_signaled) { llinfos << animationName(id) << "!S" << llendl; @@ -3079,11 +3082,6 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) } } - if (isSelf()) - { - // dumpAnimationState(this); - } - if (gNoRender) { // Hack if we're running drones... @@ -4491,13 +4489,13 @@ BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) { LLMemType mt(LLMemType::MTYPE_AVATAR); - llinfos << "motion requested " << id.asString() << " " << animationName(id) << llendl; + lldebugs << "motion requested " << id.asString() << " " << animationName(id) << llendl; LLUUID remap_id = remapMotionID(id); if (remap_id != id) { - llinfos << "motion resultant " << remap_id.asString() << " " << animationName(remap_id) << llendl; + lldebugs << "motion resultant " << remap_id.asString() << " " << animationName(remap_id) << llendl; } if (isSelf() && remap_id == ANIM_AGENT_AWAY) @@ -4513,17 +4511,18 @@ BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) //----------------------------------------------------------------------------- BOOL LLVOAvatar::stopMotion(const LLUUID& id, BOOL stop_immediate) { - llinfos << "motion requested " << id.asString() << " " << animationName(id) << llendl; + lldebugs << "motion requested " << id.asString() << " " << animationName(id) << llendl; LLUUID remap_id = remapMotionID(id); if (remap_id != id) { - llinfos << "motion resultant " << remap_id.asString() << " " << animationName(remap_id) << llendl; + lldebugs << "motion resultant " << remap_id.asString() << " " << animationName(remap_id) << llendl; } if (isSelf()) { + // BAP - was onAnimStop(id) originally - verify fix. gAgent.onAnimStop(remap_id); } diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index f06bb458c5..bf075a199c 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -164,6 +164,7 @@ public: virtual void requestStopMotion(LLMotion* motion); LLMotion* findMotion(const LLUUID& id) const; void startDefaultMotions(); + void dumpAnimationState(); virtual LLJoint* getJoint(const std::string &name); virtual LLJoint* getRootJoint() { return &mRoot; } -- cgit v1.2.3 From e319e13a9759e758791d0aecab7f7b72d58a9a7b Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 18 May 2010 21:06:45 -0400 Subject: EXT-6953 WIP - cache dumping option to help with updating static vfs cache with new contents --- indra/newview/app_settings/settings.xml | 11 ++++++++ indra/newview/llappviewer.cpp | 46 +++++++++++++++++++++++++++++---- 2 files changed, 52 insertions(+), 5 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index d65a1ca583..75232da541 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10362,6 +10362,17 @@ Value 0 + DumpVFSCaches + + Comment + Dump VFS caches on startup. + Persist + 1 + Type + Boolean + Value + 0 + UseStartScreen Comment diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 82b6f1286f..d7632e69e8 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2979,6 +2979,42 @@ S32 LLAppViewer::getCacheVersion() return cache_version ; } +void dumpVFSCaches() +{ + llinfos << "======= Dumping Static VFS ========" << llendl; + gStaticVFS->listFiles(); +#if LL_WINDOWS + WCHAR w_str[MAX_PATH]; + GetCurrentDirectory(MAX_PATH, w_str); + S32 res = LLFile::mkdir("StaticVFSDump"); + if (res == -1) + { + if (errno != EEXIST) + { + llwarns << "Couldn't create StaticVFSDump" << llendl; + } + } + SetCurrentDirectory(utf8str_to_utf16str("StaticVFSDump").c_str()); + gStaticVFS->dumpFiles(); + SetCurrentDirectory(w_str); +#endif + + llinfos << "========= Dumping regular VFS ====" << llendl; + gVFS->listFiles(); +#if LL_WINDOWS + res = LLFile::mkdir("VFSDump"); + if (res == -1) + { + if (errno != EEXIST) + { + llwarns << "Couldn't create VFSDump" << llendl; + } + } + SetCurrentDirectory(utf8str_to_utf16str("VFSDump").c_str()); + gVFS->dumpFiles(); + SetCurrentDirectory(w_str); +#endif +} bool LLAppViewer::initCache() { mPurgeCache = false; @@ -3196,11 +3232,11 @@ bool LLAppViewer::initCache() { LLVFile::initClass(); - //llinfos << "======= Static VFS listing ========" << llendl; - //gStaticVFS->listFiles(); - - //llinfos << "========= regular VFS listing =====" << llendl; - //gVFS->listFiles(); + if (gSavedSettings.getBOOL("DumpVFSCaches")) + { + dumpVFSCaches(); + + } return true; } -- cgit v1.2.3 From e3753ed8b2c52e98e282e82ea5169bda0b34a2a6 Mon Sep 17 00:00:00 2001 From: "Karl Stiefvater (qarl)" Date: Fri, 21 May 2010 16:11:21 -0500 Subject: S3 feature/gpu table implementation. reviewed by palmer and davep. --- indra/newview/app_settings/settings.xml | 11 +++ indra/newview/llfeaturemanager.cpp | 144 ++++++++++++++++++++++++++++---- indra/newview/llfeaturemanager.h | 6 ++ indra/newview/llstartup.cpp | 9 ++ indra/newview/llviewerwindow.cpp | 1 + 5 files changed, 156 insertions(+), 15 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 418032c554..a79e07bdb6 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4150,6 +4150,17 @@ Value 1 + LastGPUClass + + Comment + [DO NOT MODIFY] previous GPU class for tracking hardware changes + Persist + 1 + Type + S32 + Value + -1 + LastFeatureVersion Comment diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 50b08f782a..4fdb010162 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -45,10 +45,13 @@ #include "llsecondlifeurls.h" #include "llappviewer.h" +#include "llhttpclient.h" +#include "llnotificationsutil.h" #include "llviewercontrol.h" #include "llworld.h" #include "lldrawpoolterrain.h" #include "llviewertexturelist.h" +#include "llversioninfo.h" #include "llwindow.h" #include "llui.h" #include "llcontrol.h" @@ -62,15 +65,20 @@ #if LL_DARWIN const char FEATURE_TABLE_FILENAME[] = "featuretable_mac.txt"; +const char FEATURE_TABLE_VER_FILENAME[] = "featuretable_mac.%s.txt"; #elif LL_LINUX const char FEATURE_TABLE_FILENAME[] = "featuretable_linux.txt"; +const char FEATURE_TABLE_VER_FILENAME[] = "featuretable_linux.%s.txt"; #elif LL_SOLARIS const char FEATURE_TABLE_FILENAME[] = "featuretable_solaris.txt"; +const char FEATURE_TABLE_VER_FILENAME[] = "featuretable_solaris.%s.txt"; #else const char FEATURE_TABLE_FILENAME[] = "featuretable.txt"; +const char FEATURE_TABLE_VER_FILENAME[] = "featuretable.%s.txt"; #endif const char GPU_TABLE_FILENAME[] = "gpu_table.txt"; +const char GPU_TABLE_VER_FILENAME[] = "gpu_table.%s.txt"; LLFeatureInfo::LLFeatureInfo(const std::string& name, const BOOL available, const F32 level) : mValid(TRUE), mName(name), mAvailable(available), mRecommendedLevel(level) @@ -215,22 +223,44 @@ BOOL LLFeatureManager::loadFeatureTables() mSkippedFeatures.insert("RenderVBOEnable"); mSkippedFeatures.insert("RenderFogRatio"); - std::string data_path = gDirUtilp->getAppRODataDir(); + // first table is install with app + std::string app_path = gDirUtilp->getAppRODataDir(); + app_path += gDirUtilp->getDirDelimiter(); + app_path += FEATURE_TABLE_FILENAME; - data_path += gDirUtilp->getDirDelimiter(); + // second table is downloaded with HTTP + std::string http_filename = llformat(FEATURE_TABLE_VER_FILENAME, LLVersionInfo::getVersion().c_str()); + std::string http_path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, http_filename); - data_path += FEATURE_TABLE_FILENAME; - lldebugs << "Looking for feature table in " << data_path << llendl; + // use HTTP table if it exists + std::string path; + if (gDirUtilp->fileExists(http_path)) + { + path = http_path; + } + else + { + path = app_path; + } + + + return parseFeatureTable(path); +} + + +BOOL LLFeatureManager::parseFeatureTable(std::string filename) +{ + llinfos << "Looking for feature table in " << filename << llendl; llifstream file; std::string name; U32 version; - file.open(data_path); /*Flawfinder: ignore*/ + file.open(filename); /*Flawfinder: ignore*/ if (!file) { - LL_WARNS("RenderInit") << "Unable to open feature table!" << LL_ENDL; + LL_WARNS("RenderInit") << "Unable to open feature table " << filename << LL_ENDL; return FALSE; } @@ -239,7 +269,7 @@ BOOL LLFeatureManager::loadFeatureTables() file >> version; if (name != "version") { - LL_WARNS("RenderInit") << data_path << " does not appear to be a valid feature table!" << LL_ENDL; + LL_WARNS("RenderInit") << filename << " does not appear to be a valid feature table!" << LL_ENDL; return FALSE; } @@ -302,24 +332,44 @@ BOOL LLFeatureManager::loadFeatureTables() void LLFeatureManager::loadGPUClass() { - std::string data_path = gDirUtilp->getAppRODataDir(); - - data_path += gDirUtilp->getDirDelimiter(); - - data_path += GPU_TABLE_FILENAME; - // defaults mGPUClass = GPU_CLASS_UNKNOWN; mGPUString = gGLManager.getRawGLString(); mGPUSupported = FALSE; + // first table is in the app dir + std::string app_path = gDirUtilp->getAppRODataDir(); + app_path += gDirUtilp->getDirDelimiter(); + app_path += GPU_TABLE_FILENAME; + + // second table is downloaded with HTTP + std::string http_filename = llformat(GPU_TABLE_VER_FILENAME, LLVersionInfo::getVersion().c_str()); + std::string http_path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, http_filename); + + // use HTTP table if it exists + std::string path; + if (gDirUtilp->fileExists(http_path)) + { + path = http_path; + } + else + { + path = app_path; + } + + parseGPUTable(path); +} + + +void LLFeatureManager::parseGPUTable(std::string filename) +{ llifstream file; - file.open(data_path); /*Flawfinder: ignore*/ + file.open(filename); if (!file) { - LL_WARNS("RenderInit") << "Unable to open GPU table: " << data_path << "!" << LL_ENDL; + LL_WARNS("RenderInit") << "Unable to open GPU table: " << filename << "!" << LL_ENDL; return; } @@ -403,6 +453,70 @@ void LLFeatureManager::loadGPUClass() LL_WARNS("RenderInit") << "Couldn't match GPU to a class: " << gGLManager.getRawGLString() << LL_ENDL; } +// responder saves table into file +class LLHTTPFeatureTableResponder : public LLHTTPClient::Responder +{ +public: + + LLHTTPFeatureTableResponder(std::string filename) : + mFilename(filename) + { + } + + + virtual void completedRaw(U32 status, const std::string& reason, + const LLChannelDescriptors& channels, + const LLIOPipe::buffer_ptr_t& buffer) + { + if (isGoodStatus(status)) + { + // write to file + + llinfos << "writing feature table to " << mFilename << llendl; + + S32 file_size = buffer->countAfter(channels.in(), NULL); + if (file_size > 0) + { + // read from buffer + U8* copy_buffer = new U8[file_size]; + buffer->readAfter(channels.in(), NULL, copy_buffer, file_size); + + // write to file + LLAPRFile out(mFilename, LL_APR_WB); + out.write(copy_buffer, file_size); + out.close(); + } + } + + } + +private: + std::string mFilename; +}; + +void fetch_table(std::string table) +{ + const std::string base = "http://viewer-settings.s3.amazonaws.com/"; + + const std::string filename = llformat(table.c_str(), LLVersionInfo::getVersion().c_str()); + + const std::string url = base + filename; + + const std::string path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, filename); + + llinfos << "LLFeatureManager fetching " << url << " into " << path << llendl; + + LLHTTPClient::get(url, new LLHTTPFeatureTableResponder(path)); +} + +// fetch table(s) from a website (S3) +void LLFeatureManager::fetchHTTPTables() +{ + fetch_table(FEATURE_TABLE_VER_FILENAME); + fetch_table(GPU_TABLE_VER_FILENAME); +} + + void LLFeatureManager::cleanupFeatureTables() { std::for_each(mMaskList.begin(), mMaskList.end(), DeletePairedPointer()); diff --git a/indra/newview/llfeaturemanager.h b/indra/newview/llfeaturemanager.h index dd218d428f..c2ecede2c5 100644 --- a/indra/newview/llfeaturemanager.h +++ b/indra/newview/llfeaturemanager.h @@ -48,6 +48,7 @@ typedef enum EGPUClass GPU_CLASS_3 = 3 } EGPUClass; + class LLFeatureInfo { public: @@ -144,8 +145,13 @@ public: // in the skip list if true void applyFeatures(bool skipFeatures); + // load the dynamic GPU/feature table from a website + void fetchHTTPTables(); + protected: void loadGPUClass(); + BOOL parseFeatureTable(std::string filename); + void parseGPUTable(std::string filename); void initBaseMask(); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 0a464b3b6c..b28377e591 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -384,13 +384,22 @@ bool idle_startup() { LLNotificationsUtil::add("DisplaySetToRecommended"); } + else if ((gSavedSettings.getS32("LastGPUClass") != LLFeatureManager::getInstance()->getGPUClass()) && + (gSavedSettings.getS32("LastGPUClass") != -1)) + { + LLNotificationsUtil::add("DisplaySetToRecommended"); + } else if (!gViewerWindow->getInitAlert().empty()) { LLNotificationsUtil::add(gViewerWindow->getInitAlert()); } gSavedSettings.setS32("LastFeatureVersion", LLFeatureManager::getInstance()->getVersion()); + gSavedSettings.setS32("LastGPUClass", LLFeatureManager::getInstance()->getGPUClass()); + // load dynamic GPU/feature tables from website (S3) + LLFeatureManager::getInstance()->fetchHTTPTables(); + std::string xml_file = LLUI::locateSkin("xui_version.xml"); LLXMLNodePtr root; bool xml_ok = false; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index e0463e3c4a..9fc7d6a56d 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1433,6 +1433,7 @@ LLViewerWindow::LLViewerWindow( if (LLFeatureManager::getInstance()->isSafe() || (gSavedSettings.getS32("LastFeatureVersion") != LLFeatureManager::getInstance()->getVersion()) + || (gSavedSettings.getS32("LastGPUClass") != LLFeatureManager::getInstance()->getGPUClass()) || (gSavedSettings.getBOOL("ProbeHardwareOnStartup"))) { LLFeatureManager::getInstance()->applyRecommendedSettings(); -- cgit v1.2.3 From 670e316dd78e386e5d52da3162d87e0333b29d8a Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 24 May 2010 18:05:15 -0400 Subject: Static VFS cache tracing --- indra/llmessage/llassetstorage.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index bf0ed97143..970b6747f7 100644 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -440,6 +440,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL if (mShutDown) { + llinfos << "ASSET_TRACE cancelled " << uuid << " type " << LLAssetType::lookup(type) << " shutting down" << llendl; return; // don't get the asset or do any callbacks, we are shutting down } @@ -456,6 +457,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL // Try static VFS first. if (findInStaticVFSAndInvokeCallback(uuid,type,callback,user_data)) { + llinfos << "ASSET_TRACE asset " << uuid << " found in static VFS" << llendl; return; } @@ -472,6 +474,8 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL { callback(mVFS, uuid, type, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED); } + + llinfos << "ASSET_TRACE asset " << uuid << " found in VFS" << llendl; } else { @@ -512,7 +516,6 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL // This can be overridden by subclasses _queueDataRequest(uuid, type, callback, user_data, duplicate, is_priority); } - llinfos << "ASSET_TRACE asset " << uuid << " found in VFS" << llendl; } -- cgit v1.2.3 From 9b57c13efcc2c4f1de6cfd07322beffc89f5c3a0 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Tue, 25 May 2010 19:02:39 -0400 Subject: EXT-7209 EXT-7366 WIP better handling of wearable editor camera views Added code to get camera change to trigger on first opening a wearable editor. Also fixed a minor label issue that was causing skirt editor to fail. Code reviewed by Seraph --- indra/newview/llpaneleditwearable.cpp | 111 ++++++++++++--------- indra/newview/llpaneleditwearable.h | 7 +- .../skins/default/xui/en/panel_edit_wearable.xml | 2 +- 3 files changed, 71 insertions(+), 49 deletions(-) diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 8e9b164c09..359b523dd6 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -215,7 +215,9 @@ LLEditWearableDictionary::~LLEditWearableDictionary() LLEditWearableDictionary::Wearables::Wearables() { - addEntry(LLWearableType::WT_SHAPE, new WearableEntry(LLWearableType::WT_SHAPE,"edit_shape_title","shape_desc_text",0,0,9, SUBPART_SHAPE_HEAD, SUBPART_SHAPE_EYES, SUBPART_SHAPE_EARS, SUBPART_SHAPE_NOSE, SUBPART_SHAPE_MOUTH, SUBPART_SHAPE_CHIN, SUBPART_SHAPE_TORSO, SUBPART_SHAPE_LEGS, SUBPART_SHAPE_WHOLE)); + // note the subpart that is listed first is treated as "default", regardless of what order is in enum. + // Please match the order presented in XUI. -Nyx + addEntry(LLWearableType::WT_SHAPE, new WearableEntry(LLWearableType::WT_SHAPE,"edit_shape_title","shape_desc_text",0,0,9, SUBPART_SHAPE_WHOLE, SUBPART_SHAPE_HEAD, SUBPART_SHAPE_EYES, SUBPART_SHAPE_EARS, SUBPART_SHAPE_NOSE, SUBPART_SHAPE_MOUTH, SUBPART_SHAPE_CHIN, SUBPART_SHAPE_TORSO, SUBPART_SHAPE_LEGS )); addEntry(LLWearableType::WT_SKIN, new WearableEntry(LLWearableType::WT_SKIN,"edit_skin_title","skin_desc_text",0,3,4, TEX_HEAD_BODYPAINT, TEX_UPPER_BODYPAINT, TEX_LOWER_BODYPAINT, SUBPART_SKIN_COLOR, SUBPART_SKIN_FACEDETAIL, SUBPART_SKIN_MAKEUP, SUBPART_SKIN_BODYDETAIL)); addEntry(LLWearableType::WT_HAIR, new WearableEntry(LLWearableType::WT_HAIR,"edit_hair_title","hair_desc_text",0,1,4, TEX_HAIR, SUBPART_HAIR_COLOR, SUBPART_HAIR_STYLE, SUBPART_HAIR_EYEBROWS, SUBPART_HAIR_FACIAL)); addEntry(LLWearableType::WT_EYES, new WearableEntry(LLWearableType::WT_EYES,"edit_eyes_title","eyes_desc_text",0,1,1, TEX_EYES_IRIS, SUBPART_EYES)); @@ -893,8 +895,68 @@ void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show) // Update picker controls state for_each_picker_ctrl_entry (targetPanel, type, boost::bind(set_enabled_color_swatch_ctrl, show, _1, _2)); for_each_picker_ctrl_entry (targetPanel, type, boost::bind(set_enabled_texture_ctrl, show, _1, _2)); + + showDefaultSubpart(); +} + +void LLPanelEditWearable::showDefaultSubpart() +{ + changeCamera(0); +} + +void LLPanelEditWearable::onTabExpandedCollapsed(const LLSD& param, U8 index) +{ + bool expanded = param.asBoolean(); + + if (!mWearablePtr || !gAgentCamera.cameraCustomizeAvatar()) + { + // we don't have a valid wearable we're editing, or we've left the wearable editor + return; + } + + if (expanded) + { + changeCamera(index); + } + } +void LLPanelEditWearable::changeCamera(U8 subpart) +{ + const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(mWearablePtr->getType()); + if (!wearable_entry) + { + llinfos << "could not get wearable dictionary entry for wearable type: " << mWearablePtr->getType() << llendl; + return; + } + + if (subpart >= wearable_entry->mSubparts.size()) + { + llinfos << "accordion tab expanded for invalid subpart. Wearable type: " << mWearablePtr->getType() << " subpart num: " << subpart << llendl; + return; + } + + ESubpart subpart_e = wearable_entry->mSubparts[subpart]; + const LLEditWearableDictionary::SubpartEntry *subpart_entry = LLEditWearableDictionary::getInstance()->getSubpart(subpart_e); + + if (!subpart_entry) + { + llwarns << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << llendl; + return; + } + + // Update the camera + gMorphView->setCameraDistToDefault(); + gMorphView->setCameraTargetJoint( gAgentAvatarp->getJoint( subpart_entry->mTargetJoint ) ); + gMorphView->setCameraTargetOffset( subpart_entry->mTargetOffset ); + gMorphView->setCameraOffset( subpart_entry->mCameraOffset ); + if (gSavedSettings.getBOOL("AppearanceCameraMovement")) + { + gMorphView->updateCamera(); + } +} + + void LLPanelEditWearable::initializePanel() { if (!mWearablePtr) @@ -969,6 +1031,7 @@ void LLPanelEditWearable::initializePanel() for_each_picker_ctrl_entry (getPanel(type), type, boost::bind(init_color_swatch_ctrl, this, _1, _2)); for_each_picker_ctrl_entry (getPanel(type), type, boost::bind(init_texture_ctrl, this, _1, _2)); + showDefaultSubpart(); updateVerbs(); } @@ -994,52 +1057,6 @@ void LLPanelEditWearable::updateTypeSpecificControls(LLWearableType::EType type) } } -void LLPanelEditWearable::onTabExpandedCollapsed(const LLSD& param, U8 index) -{ - bool expanded = param.asBoolean(); - - if (!mWearablePtr || !gAgentCamera.cameraCustomizeAvatar()) - { - // we don't have a valid wearable we're editing, or we've left the wearable editor - return; - } - - if (expanded) - { - const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(mWearablePtr->getType()); - if (!wearable_entry) - { - llinfos << "could not get wearable dictionary entry for wearable type: " << mWearablePtr->getType() << llendl; - return; - } - - if (index >= wearable_entry->mSubparts.size()) - { - llinfos << "accordion tab expanded for invalid subpart. Wearable type: " << mWearablePtr->getType() << " subpart num: " << index << llendl; - return; - } - - ESubpart subpart_e = wearable_entry->mSubparts[index]; - const LLEditWearableDictionary::SubpartEntry *subpart_entry = LLEditWearableDictionary::getInstance()->getSubpart(subpart_e); - - if (!subpart_entry) - { - llwarns << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << llendl; - return; - } - - // Update the camera - gMorphView->setCameraTargetJoint( gAgentAvatarp->getJoint( subpart_entry->mTargetJoint ) ); - gMorphView->setCameraTargetOffset( subpart_entry->mTargetOffset ); - gMorphView->setCameraOffset( subpart_entry->mCameraOffset ); - gMorphView->setCameraDistToDefault(); - if (gSavedSettings.getBOOL("AppearanceCameraMovement")) - { - gMorphView->updateCamera(); - } - } -} - void LLPanelEditWearable::updateScrollingPanelUI() { // do nothing if we don't have a valid wearable we're editing diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h index 6f9ac82407..5de2bcb170 100644 --- a/indra/newview/llpaneleditwearable.h +++ b/indra/newview/llpaneleditwearable.h @@ -63,10 +63,12 @@ public: void saveChanges(); void revertChanges(); + void showDefaultSubpart(); + void onTabExpandedCollapsed(const LLSD& param, U8 index); + static void onRevertButtonClicked(void* userdata); void onCommitSexChange(); - void onTabExpandedCollapsed(const LLSD& param, U8 index); private: typedef std::map value_map_t; @@ -86,6 +88,9 @@ private: void toggleTypeSpecificControls(LLWearableType::EType type); void updateTypeSpecificControls(LLWearableType::EType type); + // changes camera angle to default for selected subpart + void changeCamera(U8 subpart); + // the pointer to the wearable we're editing. NULL means we're not editing a wearable. LLWearable *mWearablePtr; LLViewerInventoryItem* mWearableItem; diff --git a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml index 71f740590b..0455086ef3 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml @@ -107,7 +107,7 @@ left="0" Jacket: + name="skirt_desc_text"> Skirt: Date: Tue, 25 May 2010 19:30:08 -0400 Subject: EXT-7392 WIP correct implementation of isTextureVisible() This is needed so that we don't duplicate this functionality for EXT-7392. Its late, so will be reviewed tomorrow (but before code is pushed!) --- indra/newview/llvoavatar.cpp | 23 +++++++++++++++++++++++ indra/newview/llvoavatar.h | 14 +++----------- indra/newview/llvoavatarself.cpp | 26 ++++++++++++++++++++++++++ indra/newview/llvoavatarself.h | 3 +++ 4 files changed, 55 insertions(+), 11 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 4371396629..76aa2ae0f1 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -7887,3 +7887,26 @@ BOOL LLVOAvatar::isTextureDefined(LLVOAvatarDefines::ETextureIndex te, U32 index getImage(te, index)->getID() != IMG_DEFAULT); } +//virtual +BOOL LLVOAvatar::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) 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)); + } +} + +//virtual +BOOL LLVOAvatar::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, LLWearable *wearable) const +{ + // non-self avatars don't have wearables + return FALSE; +} + diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 86a7cdae02..df47e9ba1d 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -462,7 +462,9 @@ public: //-------------------------------------------------------------------- public: virtual BOOL isTextureDefined(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const; - BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex index) const; + virtual BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const; + virtual BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex type, LLWearable *wearable) const; + protected: BOOL isFullyBaked(); static BOOL areAllNearbyInstancesBaked(S32& grey_avatars); @@ -1039,14 +1041,4 @@ protected: // Shared with LLVOAvatarSelf }; // LLVOAvatar -//------------------------------------------------------------------------ -// Inlines -//------------------------------------------------------------------------ -inline BOOL LLVOAvatar::isTextureVisible(LLVOAvatarDefines::ETextureIndex te) const -{ - return ((isTextureDefined(te) || isSelf()) - && (getTEImage(te)->getID() != IMG_INVISIBLE - || LLDrawPoolAlpha::sShowDebugAlpha)); -} - #endif // LL_VO_AVATAR_H diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index cf3fb01b5a..ebca12dee8 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1332,6 +1332,32 @@ BOOL LLVOAvatarSelf::isTextureDefined(LLVOAvatarDefines::ETextureIndex type, U32 return isDefined; } +//virtual +BOOL LLVOAvatarSelf::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const +{ + if (isIndexBakedTexture(type)) + { + return LLVOAvatar::isTextureVisible(type,0); + } + + LLUUID tex_id = getLocalTextureID(type,index); + return (tex_id != IMG_INVISIBLE) + || (LLDrawPoolAlpha::sShowDebugAlpha); +} + +//virtual +BOOL LLVOAvatarSelf::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, LLWearable *wearable) const +{ + if (isIndexBakedTexture(type)) + { + return isTextureVisible(type); + } + + U32 index = gAgentWearables.getWearableIndex(wearable); + return isTextureVisible(type,index); +} + + //----------------------------------------------------------------------------- // requestLayerSetUploads() //----------------------------------------------------------------------------- diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index 8e6d9698f2..189c1ac808 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -179,6 +179,9 @@ public: BOOL isLocalTextureDataFinal(const LLTexLayerSet* layerset) const; // If you want to check all textures of a given type, pass gAgentWearables.getWearableCount() for index /*virtual*/ BOOL isTextureDefined(LLVOAvatarDefines::ETextureIndex type, U32 index) const; + /*virtual*/ BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const; + /*virtual*/ BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex type, LLWearable *wearable) const; + //-------------------------------------------------------------------- // Local Textures -- cgit v1.2.3 From b524aacb599b8c907e02eeb56b7441f42e9ddad2 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Tue, 25 May 2010 20:17:23 -0400 Subject: EXT-7213 WIP kill old appearance editor and all traces of code First pass - eliminated all references to gFloaterCustomize except those that call saveIfDirty. Haven't compiled, haven't reviewed. Will clean up in further patches and get reviewed before pushing. --- indra/newview/llagentcamera.cpp | 20 -------------------- indra/newview/llinventorybridge.cpp | 11 +++-------- indra/newview/llpaneleditwearable.cpp | 4 ++++ indra/newview/llpaneleditwearable.h | 2 ++ indra/newview/llsidepanelappearance.cpp | 16 ++++++++++++++++ indra/newview/llsidepanelappearance.h | 2 ++ indra/newview/llviewerinventory.cpp | 5 +++-- indra/newview/llviewerwindow.cpp | 2 +- indra/newview/llwearable.cpp | 16 ++++++++++------ 9 files changed, 41 insertions(+), 37 deletions(-) diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 9638d0e94f..d9eceec30d 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -1538,26 +1538,6 @@ F32 LLAgentCamera::calcCustomizeAvatarUIOffset(const LLVector3d& camera_pos_glob { F32 ui_offset = 0.f; - if (gFloaterCustomize) - { - const LLRect& rect = gFloaterCustomize->getRect(); - - // Move the camera so that the avatar isn't covered up by this floater. - F32 fraction_of_fov = 0.5f - (0.5f * (1.f - llmin(1.f, ((F32)rect.getWidth() / (F32)gViewerWindow->getWindowWidthScaled())))); - F32 apparent_angle = fraction_of_fov * LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect(); // radians - F32 offset = tan(apparent_angle); - - if( rect.mLeft < (gViewerWindow->getWindowWidthScaled() - rect.mRight) ) - { - // Move the avatar to the right (camera to the left) - ui_offset = offset; - } - else - { - // Move the avatar to the left (camera to the right) - ui_offset = -offset; - } - } F32 range = (F32)dist_vec(camera_pos_global, getFocusGlobal()); mUIOffset = lerp(mUIOffset, ui_offset, LLCriticalDamp::getInterpolant(0.05f)); return mUIOffset * range; diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 0f532236e4..7625a7ab83 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -62,6 +62,7 @@ #include "llpreviewgesture.h" #include "llpreviewtexture.h" #include "llselectmgr.h" +#include "llsidepanelappearance.h" #include "llsidetray.h" #include "lltrans.h" #include "llviewerassettype.h" @@ -4884,15 +4885,9 @@ void LLWearableBridge::editOnAvatar() const LLWearable* wearable = gAgentWearables.getWearableFromItemID(linked_id); if( wearable ) { - // Set the tab to the right wearable. - if (gFloaterCustomize) - gFloaterCustomize->setCurrentWearableType( wearable->getType() ); + LLPanel * panel = LLSideTray::getInstance()->getPanel("sidepanel_appearance"); - if( CAMERA_MODE_CUSTOMIZE_AVATAR != gAgentCamera.getCameraMode() ) - { - // Start Avatar Customization - gAgentCamera.changeCameraToCustomizeAvatar(); - } + LLSidePanelAppearance::editWearable(wearable, panel); } } diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 359b523dd6..2ba39fca9c 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -956,6 +956,10 @@ void LLPanelEditWearable::changeCamera(U8 subpart) } } +void LLPanelEditWearable::updateScrollingPanelList() +{ + updateScrollingPanelUI(); +} void LLPanelEditWearable::initializePanel() { diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h index 5de2bcb170..0af3758a4e 100644 --- a/indra/newview/llpaneleditwearable.h +++ b/indra/newview/llpaneleditwearable.h @@ -66,6 +66,8 @@ public: void showDefaultSubpart(); void onTabExpandedCollapsed(const LLSD& param, U8 index); + void updateScrollingPanelList(); + static void onRevertButtonClicked(void* userdata); void onCommitSexChange(); diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index 010d593b27..6f934a0b66 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -465,3 +465,19 @@ void LLSidepanelAppearance::setWearablesLoading(bool val) childSetVisible("wearables_loading_indicator", val); childSetVisible("edit_outfit_btn", !val); } + +void LLSidepanelAppearance::showDefaultSubpart() +{ + if (mEditWearable->getVisible()) + { + mEditWearable->showDefaultSubpart(); + } +} + +void LLSidepanelAppearance::updateScrollingPanelList() +{ + if (mEditWearable->getVisible()) + { + mEditWearable->updateScrollingPanelList(); + } +} diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h index 12303b6e96..5bde962c8d 100644 --- a/indra/newview/llsidepanelappearance.h +++ b/indra/newview/llsidepanelappearance.h @@ -67,6 +67,8 @@ public: void showOutfitEditPanel(); void showWearableEditPanel(LLWearable *wearable = NULL); void setWearablesLoading(bool val); + void showDefaultSubpart(); + void updateScrollingPanelList(); private: void onFilterEdit(const std::string& search_string); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index f0532d5a31..838f57073e 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -883,9 +883,10 @@ void ModifiedCOFCallback::fire(const LLUUID& inv_item) if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode() ) { // If we're in appearance editing mode, the current tab may need to be refreshed - if (gFloaterCustomize) + LLSidepanelAppearance *panel = dynamic_cast(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + if (panel) { - gFloaterCustomize->switchToDefaultSubpart(); + panel->showDefaultSubpart(); } } } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index e0463e3c4a..f72f122f8a 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4545,7 +4545,7 @@ void LLViewerWindow::restoreGL(const std::string& progress_message) gResizeScreenTexture = TRUE; - if (gFloaterCustomize && gFloaterCustomize->getVisible()) + if (gAgentCamera.cameraCustomizeAvatar()) { LLVisualParamHint::requestHintUpdates(); } diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 10b9a18fa8..358defbb31 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -705,9 +705,9 @@ void LLWearable::removeFromAvatar( LLWearableType::EType type, BOOL upload_bake } } - if( gFloaterCustomize ) + if( gAgentCamera.cameraCustomizeAvatar() ) { - gFloaterCustomize->setWearable(type, NULL, PERM_ALL, TRUE); + LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit")); } gAgentAvatarp->updateVisualParams(); @@ -976,9 +976,11 @@ void LLWearable::revertValues() syncImages(mSavedTEMap, mTEMap); - if( gFloaterCustomize ) + + LLSidepanelAppearance *panel = dynamic_cast(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + if( panel ) { - gFloaterCustomize->updateScrollingPanelList(TRUE); + panel->updateScrollingPanelList(); } } @@ -1015,9 +1017,11 @@ void LLWearable::saveValues() // Deep copy of mTEMap (copies only those tes that are current, filling in defaults where needed) syncImages(mTEMap, mSavedTEMap); - if( gFloaterCustomize ) + + LLSidepanelAppearance *panel = dynamic_cast(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + if( panel ) { - gFloaterCustomize->updateScrollingPanelList(TRUE); + panel->updateScrollingPanelList(); } } -- cgit v1.2.3 From 1084bfef0057de5cd3201426aaad68329a62a0da Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Wed, 26 May 2010 13:27:19 -0400 Subject: EXT-7213 WIP kill old appearance editor and all traces of code part 2 - correcting a few points that would have broken the build. Final version will be reviewed before pushing. --- indra/newview/llagentwearables.cpp | 17 +++++++++++++++++ indra/newview/llagentwearables.h | 1 + indra/newview/llinventorybridge.cpp | 4 ++-- indra/newview/llviewerinventory.cpp | 3 ++- indra/newview/llvoavatar.cpp | 2 +- indra/newview/llvoavatarself.cpp | 4 ++-- indra/newview/llwearable.cpp | 13 ++++++++----- 7 files changed, 33 insertions(+), 11 deletions(-) diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 68c4fa1ea0..0f9ab6cfa1 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -617,6 +617,23 @@ const LLWearable* LLAgentWearables::getWearableFromItemID(const LLUUID& item_id) return NULL; } +LLWearable* LLAgentWearables::getWearableFromItemID(const LLUUID& item_id) +{ + const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id); + for (S32 i=0; i < LLWearableType::WT_COUNT; i++) + { + for (U32 j=0; j < getWearableCount((LLWearableType::EType)i); j++) + { + LLWearable * curr_wearable = getWearable((LLWearableType::EType)i, j); + if (curr_wearable && (curr_wearable->getItemID() == base_item_id)) + { + return curr_wearable; + } + } + } + return NULL; +} + LLWearable* LLAgentWearables::getWearableFromAssetID(const LLUUID& asset_id) { for (S32 i=0; i < LLWearableType::WT_COUNT; i++) diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index 1f19d1045b..c53b1333fc 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -91,6 +91,7 @@ public: const LLUUID getWearableItemID(LLWearableType::EType type, U32 index /*= 0*/) const; const LLUUID getWearableAssetID(LLWearableType::EType type, U32 index /*= 0*/) const; const LLWearable* getWearableFromItemID(const LLUUID& item_id) const; + LLWearable* getWearableFromItemID(const LLUUID& item_id); LLWearable* getWearableFromAssetID(const LLUUID& asset_id); LLInventoryItem* getWearableInventoryItem(LLWearableType::EType type, U32 index /*= 0*/); static BOOL selfHasWearable(LLWearableType::EType type); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 39fcf867b1..3ff88ec951 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4879,12 +4879,12 @@ void LLWearableBridge::onEditOnAvatar(void* user_data) void LLWearableBridge::editOnAvatar() { - const LLWearable* wearable = gAgentWearables.getWearableFromItemID(mUUID); + LLWearable* wearable = gAgentWearables.getWearableFromItemID(mUUID); if( wearable ) { LLPanel * panel = LLSideTray::getInstance()->getPanel("sidepanel_appearance"); - LLSidePanelAppearance::editWearable(wearable, panel); + LLSidepanelAppearance::editWearable(wearable, panel); } } diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 838f57073e..4dbede79da 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -64,6 +64,7 @@ #include "llfloatercustomize.h" #include "llcommandhandler.h" #include "llviewermessage.h" +#include "llsidepanelappearance.h" ///---------------------------------------------------------------------------- /// Helper class to store special inventory item names @@ -883,7 +884,7 @@ void ModifiedCOFCallback::fire(const LLUUID& inv_item) if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode() ) { // If we're in appearance editing mode, the current tab may need to be refreshed - LLSidepanelAppearance *panel = dynamic_cast(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + LLSidepanelAppearance *panel = dynamic_cast(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); if (panel) { panel->showDefaultSubpart(); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 76aa2ae0f1..a1637c4724 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -7888,7 +7888,7 @@ BOOL LLVOAvatar::isTextureDefined(LLVOAvatarDefines::ETextureIndex te, U32 index } //virtual -BOOL LLVOAvatar::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const +BOOL LLVOAvatar::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index ) const { if (isIndexLocalTexture(type)) { diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index ebca12dee8..1ad4175a42 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1333,11 +1333,11 @@ BOOL LLVOAvatarSelf::isTextureDefined(LLVOAvatarDefines::ETextureIndex type, U32 } //virtual -BOOL LLVOAvatarSelf::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const +BOOL LLVOAvatarSelf::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index) const { if (isIndexBakedTexture(type)) { - return LLVOAvatar::isTextureVisible(type,0); + return LLVOAvatar::isTextureVisible(type, (U32)0); } LLUUID tex_id = getLocalTextureID(type,index); diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 358defbb31..94d70992f6 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -33,23 +33,26 @@ #include "llviewerprecompiledheaders.h" #include "llagent.h" +#include "llagentcamera.h" #include "llagentwearables.h" +#include "lldictionary.h" #include "llfloatercustomize.h" #include "lllocaltextureobject.h" #include "llnotificationsutil.h" #include "llviewertexturelist.h" #include "llinventorymodel.h" #include "llinventoryobserver.h" +#include "llsidepanelappearance.h" +#include "llsidetray.h" +#include "lltexlayer.h" +#include "lltexglobalcolor.h" +#include "lltrans.h" #include "llviewerregion.h" +#include "llvisualparam.h" #include "llvoavatar.h" #include "llvoavatarself.h" #include "llvoavatardefines.h" #include "llwearable.h" -#include "lldictionary.h" -#include "lltrans.h" -#include "lltexlayer.h" -#include "llvisualparam.h" -#include "lltexglobalcolor.h" using namespace LLVOAvatarDefines; -- cgit v1.2.3 From ec7dbc704040dfcdcd101f090dbb2f780ca0ee8a Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Wed, 26 May 2010 18:22:04 -0400 Subject: EXT-7213 WIP kill old appearance editor and traces of code Removed last remaining references to gFloaterCustomize. Next step: kill the files themselves. Will be reviewed when complete, before pushing --- indra/newview/llagentwearables.cpp | 10 ++++------ indra/newview/llappearancemgr.cpp | 14 ++++++-------- indra/newview/llinventorybridge.cpp | 12 +++++------- indra/newview/llviewermenu.cpp | 16 +++++++--------- indra/newview/llwearable.cpp | 8 -------- 5 files changed, 22 insertions(+), 38 deletions(-) diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 0f9ab6cfa1..1deba2e2e6 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1676,14 +1676,12 @@ void LLAgentWearables::userRemoveWearablesOfType(const LLWearableType::EType &ty void LLAgentWearables::userRemoveAllClothes() { // We have to do this up front to avoid having to deal with the case of multiple wearables being dirty. - if (gFloaterCustomize) + if (gAgentCamera.cameraCustomizeAvatar()) { - gFloaterCustomize->askToSaveIfDirty(userRemoveAllClothesStep2); - } - else - { - userRemoveAllClothesStep2(TRUE); + // switching to outfit editor should automagically save any currently edited wearable + LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit")); } + userRemoveAllClothesStep2(TRUE); } // static diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index e017fffa54..5a4c30a307 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -34,6 +34,7 @@ #include "llaccordionctrltab.h" #include "llagent.h" +#include "llagentcamera.h" #include "llagentwearables.h" #include "llappearancemgr.h" #include "llcommandhandler.h" @@ -1362,16 +1363,13 @@ void LLAppearanceMgr::wearInventoryCategoryOnAvatar( LLInventoryCategory* catego llinfos << "wearInventoryCategoryOnAvatar( " << category->getName() << " )" << llendl; - if( gFloaterCustomize ) + if (gAgentCamera.cameraCustomizeAvatar()) { - gFloaterCustomize->askToSaveIfDirty(boost::bind(&LLAppearanceMgr::changeOutfit, - &LLAppearanceMgr::instance(), - _1, category->getUUID(), append)); - } - else - { - LLAppearanceMgr::changeOutfit(TRUE, category->getUUID(), append); + // switching to outfit editor should automagically save any currently edited wearable + LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit")); } + + LLAppearanceMgr::changeOutfit(TRUE, category->getUUID(), append); } void LLAppearanceMgr::wearOutfitByName(const std::string& name) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 3ff88ec951..f3dfde03c3 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4447,15 +4447,13 @@ void remove_inventory_category_from_avatar( LLInventoryCategory* category ) << " )" << llendl; - if( gFloaterCustomize ) + if (gAgentCamera.cameraCustomizeAvatar()) { - gFloaterCustomize->askToSaveIfDirty( - boost::bind(remove_inventory_category_from_avatar_step2, _1, category->getUUID())); - } - else - { - remove_inventory_category_from_avatar_step2(TRUE, category->getUUID() ); + // switching to outfit editor should automagically save any currently edited wearable + LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit")); } + + remove_inventory_category_from_avatar_step2(TRUE, category->getUUID() ); } struct OnRemoveStruct diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index d0ac103f56..b1b6db3305 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3736,17 +3736,15 @@ void reset_view_final( BOOL proceed ); void handle_reset_view() { - if( (CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode()) && gFloaterCustomize ) + if (gAgentCamera.cameraCustomizeAvatar()) { - // Show dialog box if needed. - gFloaterCustomize->askToSaveIfDirty( reset_view_final ); - } - else - { - gAgentCamera.switchCameraPreset(CAMERA_PRESET_REAR_VIEW); - reset_view_final( TRUE ); - LLFloaterCamera::resetCameraMode(); + // switching to outfit editor should automagically save any currently edited wearable + LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "my_outfits")); } + + gAgentCamera.switchCameraPreset(CAMERA_PRESET_REAR_VIEW); + reset_view_final( TRUE ); + LLFloaterCamera::resetCameraMode(); } class LLViewResetView : public view_listener_t diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 94d70992f6..0fcb257e74 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -579,14 +579,6 @@ BOOL LLWearable::isDirty() const } } - //if( gFloaterCustomize ) - //{ - // if( mDescription != gFloaterCustomize->getWearableDescription( mType ) ) - // { - // return TRUE; - // } - //} - return FALSE; } -- cgit v1.2.3 From c63233106b4785de86a0cff3d108e36b7db2b127 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Thu, 27 May 2010 14:47:27 +0300 Subject: EXT-7090 FIXED Made snapshot preview and minimap(like in 1.23) floaters showable in mouselook mode. reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/449/ --HG-- branch : product-engine --- indra/llui/llfloaterreg.cpp | 13 ++++++++++++- indra/llui/llfloaterreg.h | 4 ++++ indra/newview/app_settings/settings.xml | 14 ++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index 7588d8ab7a..85f9af126c 100644 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -47,6 +47,7 @@ LLFloaterReg::instance_map_t LLFloaterReg::sInstanceMap; LLFloaterReg::build_map_t LLFloaterReg::sBuildMap; std::map LLFloaterReg::sGroupMap; bool LLFloaterReg::sBlockShowFloaters = false; +std::set LLFloaterReg::sAlwaysShowableList; static LLFloaterRegListener sFloaterRegListener; @@ -219,7 +220,9 @@ LLFloaterReg::const_instance_list_t& LLFloaterReg::getFloaterList(const std::str //static LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, BOOL focus) { - if( sBlockShowFloaters ) + if( sBlockShowFloaters + // see EXT-7090 + && sAlwaysShowableList.find(name) == sAlwaysShowableList.end()) return 0;// LLFloater* instance = getInstance(name, key); if (instance) @@ -403,6 +406,14 @@ void LLFloaterReg::registerControlVariables() declareVisibilityControl(name); } } + + const LLSD& exclude_list = LLUI::sSettingGroups["config"]->getLLSD("always_showable_floaters"); + for (LLSD::array_const_iterator iter = exclude_list.beginArray(); + iter != exclude_list.endArray(); + iter++) + { + sAlwaysShowableList.insert(iter->asString()); + } } // Callbacks diff --git a/indra/llui/llfloaterreg.h b/indra/llui/llfloaterreg.h index 5cacf76771..f1ba41f638 100644 --- a/indra/llui/llfloaterreg.h +++ b/indra/llui/llfloaterreg.h @@ -76,6 +76,10 @@ private: static build_map_t sBuildMap; static std::map sGroupMap; static bool sBlockShowFloaters; + /** + * Defines list of floater names that can be shown despite state of sBlockShowFloaters. + */ + static std::set sAlwaysShowableList; public: // Registration diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 59b6115fab..693093c6ce 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11217,5 +11217,19 @@ Value 178 + always_showable_floaters + + Comment + Floaters that can be shown despite mouselook mode + Persist + 1 + Type + LLSD + Value + + snapshot + mini_map + + -- cgit v1.2.3 From 751b141be0a6481711bb61fb804fb3f5934b051f Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 27 May 2010 17:33:56 +0300 Subject: EXT-7497 FIXED Made Build, Search, Map, Mini-Map and Sidebar buttons in bottomtray hidden by default. Also declaration of all settings related to bottom bar buttons and custom chatbar width were moved from code to settings.xml to prevent issues with resetting of these settings between restarts. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/452/ --HG-- branch : product-engine --- indra/newview/app_settings/settings.xml | 110 ++++++++++++++++++++++++++++++++ indra/newview/llbottomtray.cpp | 12 ---- 2 files changed, 110 insertions(+), 12 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 59b6115fab..a5cfc4d01b 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1597,6 +1597,17 @@ Value 1 + ChatBarCustomWidth + + Comment + Stores customized width of chat bar. + Persist + 1 + Type + S32 + Value + 0 + CreateToolCopyCenters Comment @@ -8063,6 +8074,28 @@ Value 1 + ShowBuildButton + + Comment + Shows/Hides Build button in the bottom tray. + Persist + 1 + Type + Boolean + Value + 0 + + ShowCameraButton + + Comment + Show/Hide View button in the bottom tray. + Persist + 1 + Type + Boolean + Value + 1 + ShowConsoleWindow Comment @@ -8140,6 +8173,17 @@ Value 0 + ShowGestureButton + + Comment + Shows/Hides Gesture button in the bottom tray. + Persist + 1 + Type + Boolean + Value + 1 + ShowHoverTips Comment @@ -8162,6 +8206,28 @@ Value 0 + ShowMiniMapButton + + Comment + Shows/Hides Mini-Map button in the bottom tray. + Persist + 1 + Type + Boolean + Value + 0 + + ShowMoveButton + + Comment + Shows/Hides Move button in the bottom tray. + Persist + 1 + Type + Boolean + Value + 1 + ShowScriptErrors Comment @@ -8184,6 +8250,39 @@ Value 1 + ShowSearchButton + + Comment + Shows/Hides Search button in the bottom tray. + Persist + 1 + Type + Boolean + Value + 0 + + ShowSidebarButton + + Comment + Shows/hides Sidebar button in the bottom tray. + Persist + 1 + Type + Boolean + Value + 0 + + ShowSnapshotButton + + Comment + Shows/Hides Snapshot button button in the bottom tray. + Persist + 1 + Type + Boolean + Value + 1 + ShowObjectRenderingCost Comment @@ -8217,6 +8316,17 @@ Value 1 + ShowWorldMapButton + + Comment + Shows/Hides Map button in the bottom tray. + Persist + 1 + Type + Boolean + Value + 0 + SidebarCameraMovement Comment diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index ae97460468..1603ff0a54 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -1220,18 +1220,6 @@ void LLBottomTray::initButtonsVisibility() void LLBottomTray::setButtonsControlsAndListeners() { - gSavedSettings.declareBOOL("ShowGestureButton", TRUE, "Shows/Hides Gesture button in the bottom tray. (Declared in code)"); - gSavedSettings.declareBOOL("ShowMoveButton", TRUE, "Shows/Hides Move button in the bottom tray. (Declared in code)"); - gSavedSettings.declareBOOL("ShowSnapshotButton", TRUE, "Shows/Hides Snapshot button button in the bottom tray. (Declared in code)"); - gSavedSettings.declareBOOL("ShowCameraButton", TRUE, "Show/Hide View button in the bottom tray. (Declared in code)"); - gSavedSettings.declareBOOL("ShowSidebarButton", TRUE, "Shows/hides Sidebar button in the bottom tray. (Declared in code)"); - gSavedSettings.declareBOOL("ShowBuildButton", TRUE, "Shows/Hides Build button in the bottom tray. (Declared in code)"); - gSavedSettings.declareBOOL("ShowSearchButton", TRUE, "Shows/Hides Search button in the bottom tray. (Declared in code)"); - gSavedSettings.declareBOOL("ShowWorldMapButton", TRUE, "Shows/Hides Map button in the bottom tray. (Declared in code)"); - gSavedSettings.declareBOOL("ShowMiniMapButton", TRUE, "Shows/Hides Mini-Map button in the bottom tray. (Declared in code)"); - - gSavedSettings.declareS32("ChatBarCustomWidth", 0, "Stores customized width of chat bar. (Declared in code)"); - gSavedSettings.getControl("ShowGestureButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_GESTURES, _2)); gSavedSettings.getControl("ShowMoveButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_MOVEMENT, _2)); gSavedSettings.getControl("ShowCameraButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_CAMERA, _2)); -- cgit v1.2.3 From cf2268635ca6aef99b1d6c01083be4b4a292646a Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 27 May 2010 17:36:34 +0300 Subject: EXT-6937 FIXED Implemented initializing of moderate_mode on first join voice chat. This is a workaround until a way to request the current voice channel moderation mode is implemented in the viewer. Details: * Added method to initialize Speaker manager's Voice moderate_mode once Agent's participant state is known. * Once agent's voice participant is updated this method is called. * This method initializes Voice moderate_mode only once. This is necessary to process "Mute everyone" menu item calls properly. Also renamed moderateVoiceOtherParticipants methods with moderateVoiceAllParticipants and related staff. Reviewed by Aimee Walton at https://codereview.productengine.com/secondlife/r/448/ --HG-- branch : product-engine --- indra/newview/llparticipantlist.cpp | 10 +++--- indra/newview/llparticipantlist.h | 10 +++--- indra/newview/llspeakers.cpp | 65 ++++++++++++++++++------------------- indra/newview/llspeakers.h | 30 +++++++++++------ indra/newview/llvoicevivox.cpp | 8 ++++- 5 files changed, 67 insertions(+), 56 deletions(-) diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index b975536f8b..4f0946774a 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -793,7 +793,7 @@ void LLParticipantList::LLParticipantListMenu::moderateVoice(const LLSD& userdat else { bool unmute_all = userdata.asString() == "unmute_all"; - moderateVoiceOtherParticipants(LLUUID::null, unmute_all); + moderateVoiceAllParticipants(unmute_all); } } @@ -806,7 +806,7 @@ void LLParticipantList::LLParticipantListMenu::moderateVoiceParticipant(const LL } } -void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute) +void LLParticipantList::LLParticipantListMenu::moderateVoiceAllParticipants(bool unmute) { LLIMSpeakerMgr* mgr = dynamic_cast(mParent.mSpeakerMgr); if (mgr) @@ -815,12 +815,11 @@ void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(co { LLSD payload; payload["session_id"] = mgr->getSessionID(); - payload["excluded_avatar_id"] = excluded_avatar_id; LLNotificationsUtil::add("ConfirmMuteAll", LLSD(), payload, confirmMuteAllCallback); return; } - mgr->moderateVoiceOtherParticipants(excluded_avatar_id, unmute); + mgr->moderateVoiceAllParticipants(unmute); } } @@ -835,13 +834,12 @@ void LLParticipantList::LLParticipantListMenu::confirmMuteAllCallback(const LLSD const LLSD& payload = notification["payload"]; const LLUUID& session_id = payload["session_id"]; - const LLUUID& excluded_avatar_id = payload["excluded_avatar_id"]; LLIMSpeakerMgr * speaker_manager = dynamic_cast ( LLIMModel::getInstance()->getSpeakerManager(session_id)); if (speaker_manager) { - speaker_manager->moderateVoiceOtherParticipants(excluded_avatar_id, false); + speaker_manager->moderateVoiceAllParticipants(false); } return; diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index 967c8b78cf..3fe45fa591 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -187,7 +187,7 @@ class LLParticipantList * @param userdata can be "selected" or "others". * * @see moderateVoiceParticipant() - * @see moderateVoiceOtherParticipants() + * @see moderateVoiceAllParticipants() */ void moderateVoice(const LLSD& userdata); @@ -200,22 +200,20 @@ class LLParticipantList * @param[in] avatar_id UUID of avatar to be processed * @param[in] unmute if true - specified avatar will be muted, otherwise - unmuted. * - * @see moderateVoiceOtherParticipants() + * @see moderateVoiceAllParticipants() */ void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute); /** - * Mutes/Unmutes all avatars except specified for current group voice chat. + * Mutes/Unmutes all avatars for current group voice chat. * * It only marks avatars as muted for session and does not use local Agent's Block list. - * It based call moderateVoiceParticipant() for each avatar should be muted/unmuted. * - * @param[in] excluded_avatar_id UUID of avatar NOT to be processed * @param[in] unmute if true - avatars will be muted, otherwise - unmuted. * * @see moderateVoiceParticipant() */ - void moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute); + void moderateVoiceAllParticipants(bool unmute); static void confirmMuteAllCallback(const LLSD& notification, const LLSD& response); }; diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 9da3db3032..bf00b47c21 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -251,6 +251,8 @@ bool LLSpeakersDelayActionsStorage::onTimerActionCallback(const LLUUID& speaker_ LLSpeakerMgr::LLSpeakerMgr(LLVoiceChannel* channelp) : mVoiceChannel(channelp) +, mVoiceModerated(false) +, mModerateModeHandledFirstTime(false) { static LLUICachedControl remove_delay ("SpeakerParticipantRemoveDelay", 10.0); @@ -297,6 +299,33 @@ LLPointer LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::strin return speakerp; } +// *TODO: Once way to request the current voice channel moderation mode is implemented +// this method with related code should be removed. +/* + Initializes "moderate_mode" of voice session on first join. + + This is WORKAROUND because a way to request the current voice channel moderation mode exists + but is not implemented in viewer yet. See EXT-6937. +*/ +void LLSpeakerMgr::initVoiceModerateMode() +{ + if (!mModerateModeHandledFirstTime && (mVoiceChannel && mVoiceChannel->isActive())) + { + LLPointer speakerp; + + if (mSpeakers.find(gAgentID) != mSpeakers.end()) + { + speakerp = mSpeakers[gAgentID]; + } + + if (speakerp.notNull()) + { + mVoiceModerated = speakerp->mModeratorMutedVoice; + mModerateModeHandledFirstTime = true; + } + } +} + void LLSpeakerMgr::update(BOOL resort_ok) { if (!LLVoiceClient::getInstance()) @@ -529,7 +558,6 @@ BOOL LLSpeakerMgr::isVoiceActive() // LLIMSpeakerMgr // LLIMSpeakerMgr::LLIMSpeakerMgr(LLVoiceChannel* channel) : LLSpeakerMgr(channel) -, mVoiceModerated(false) { } @@ -762,31 +790,9 @@ void LLIMSpeakerMgr::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmu new ModerationResponder(getSessionID())); } -void LLIMSpeakerMgr::moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute_everyone_else) +void LLIMSpeakerMgr::moderateVoiceAllParticipants( bool unmute_everyone ) { - // *TODO: mantipov: add more intellectual processing of several following requests if it is needed. - /* - Such situation should be tested: - "Moderator sends the same second request before first response is come" - Moderator sends "mute everyone else" for A and then for B - two requests to disallow voice chat are sent - UUID of B is stored. - Then first response (to disallow voice chat) is come - request to allow voice for stored avatar (B) - Then second response (to disallow voice chat) is come - have nothing to do, the latest selected speaker is already enabled - - What can happen? - If request to allow voice for stored avatar (B) is processed on server BEFORE - second request to disallow voice chat all speakers will be disabled on voice. - But I'm not sure such situation is possible. - See EXT-3431. - */ - - mReverseVoiceModeratedAvatarID = excluded_avatar_id; - - - if (mVoiceModerated == !unmute_everyone_else) + if (mVoiceModerated == !unmute_everyone) { // session already in requested state. Just force participants which do not match it. forceVoiceModeratedMode(mVoiceModerated); @@ -794,7 +800,7 @@ void LLIMSpeakerMgr::moderateVoiceOtherParticipants(const LLUUID& excluded_avata else { // otherwise set moderated mode for a whole session. - moderateVoiceSession(getSessionID(), !unmute_everyone_else); + moderateVoiceSession(getSessionID(), !unmute_everyone); } } @@ -804,13 +810,6 @@ void LLIMSpeakerMgr::processSessionUpdate(const LLSD& session_update) session_update["moderated_mode"].has("voice")) { mVoiceModerated = session_update["moderated_mode"]["voice"]; - - if (mReverseVoiceModeratedAvatarID.notNull()) - { - moderateVoiceParticipant(mReverseVoiceModeratedAvatarID, mVoiceModerated); - - mReverseVoiceModeratedAvatarID = LLUUID::null; - } } } diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h index b38acb7bc4..4a250de82f 100644 --- a/indra/newview/llspeakers.h +++ b/indra/newview/llspeakers.h @@ -242,6 +242,13 @@ public: */ bool removeAvalineSpeaker(const LLUUID& speaker_id) { return removeSpeaker(speaker_id); } + /** + * Initializes mVoiceModerated depend on LLSpeaker::mModeratorMutedVoice of agent's participant. + * + * Is used only to implement workaround to initialize mVoiceModerated on first join to group chat. See EXT-6937 + */ + void initVoiceModerateMode(); + protected: virtual void updateSpeakerList(); void setSpeakerNotInChannel(LLSpeaker* speackerp); @@ -258,6 +265,14 @@ protected: * time out speakers when they are not part of current session */ LLSpeakersDelayActionsStorage* mSpeakerDelayRemover; + + // *TODO: should be moved back into LLIMSpeakerMgr when a way to request the current voice channel + // moderation mode is implemented: See EXT-6937 + bool mVoiceModerated; + + // *TODO: To be removed when a way to request the current voice channel + // moderation mode is implemented: See EXT-6937 + bool mModerateModeHandledFirstTime; }; class LLIMSpeakerMgr : public LLSpeakerMgr @@ -279,22 +294,21 @@ public: * @param[in] avatar_id UUID of avatar to be processed * @param[in] unmute if false - specified avatar will be muted, otherwise - unmuted. * - * @see moderateVoiceOtherParticipants() + * @see moderateVoiceAllParticipants() */ void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute); /** - * Mutes/Unmutes all avatars except specified for current group voice chat. + * Mutes/Unmutes all avatars for current group voice chat. * * It only marks avatars as muted for session and does not use local Agent's Block list. - * It based call moderateVoiceParticipant() for each avatar should be muted/unmuted. + * It calls forceVoiceModeratedMode() in case of session is already in requested state. * - * @param[in] excluded_avatar_id UUID of avatar NOT to be processed - * @param[in] unmute_everyone_else if false - avatars will be muted, otherwise - unmuted. + * @param[in] unmute_everyone if false - avatars will be muted, otherwise - unmuted. * * @see moderateVoiceParticipant() */ - void moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute_everyone_else); + void moderateVoiceAllParticipants(bool unmute_everyone); void processSessionUpdate(const LLSD& session_update); @@ -308,10 +322,6 @@ protected: */ void forceVoiceModeratedMode(bool should_be_muted); -private: - LLUUID mReverseVoiceModeratedAvatarID; - bool mVoiceModerated; - }; class LLActiveSpeakerMgr : public LLSpeakerMgr, public LLSingleton diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index bcb1a70efb..1597691347 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -3698,9 +3698,15 @@ void LLVivoxVoiceClient::participantUpdatedEvent( if (speaker_manager) { speaker_manager->update(true); + + // also initialize voice moderate_mode depend on Agent's participant. See EXT-6937. + // *TODO: remove once a way to request the current voice channel moderation mode is implemented. + if (gAgentID == participant->mAvatarID) + { + speaker_manager->initVoiceModerateMode(); + } } } - } else { -- cgit v1.2.3 From 097f9711f22df449c11b3dcd960186a206bcd3ac Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Thu, 27 May 2010 18:36:07 +0300 Subject: EXT-2260 FIXED Changed camera floater according to new style - Implemented new widget- panel_camera_item, to use in camera floater. They are used inside of two panels. Their order is configurable via XML. Mouse down callbacks and images which are used for selected and and unselected items are also set in XML. - Now there are only 3 buttons instead of four at the bottom of the floater- pan and orbit are now shown simultaneously. - Implemented correct work of object view after moving from camera modes to presets list (and back). It wasn't workin completely correct in old version of floater. - Integrated new art. Reviewed by Igor Borovkov at https://codereview.productengine.com/secondlife/r/436/ --HG-- branch : product-engine --- indra/newview/llbottomtray.cpp | 2 +- indra/newview/llfloatercamera.cpp | 263 +++++++--- indra/newview/llfloatercamera.h | 68 ++- .../textures/bottomtray/Cam_Preset_Back_Off.png | Bin 700 -> 49285 bytes .../textures/bottomtray/Cam_Preset_Back_On.png | Bin 754 -> 50855 bytes .../textures/bottomtray/Cam_Preset_Front_Off.png | Bin 959 -> 50394 bytes .../textures/bottomtray/Cam_Preset_Front_On.png | Bin 1087 -> 50127 bytes .../textures/bottomtray/Cam_Preset_Side_Off.png | Bin 945 -> 49268 bytes .../textures/bottomtray/Cam_Preset_Side_On.png | Bin 1049 -> 50209 bytes .../textures/bottomtray/Mouselook_View_Off.png | Bin 0 -> 51189 bytes .../textures/bottomtray/Mouselook_View_On.png | Bin 0 -> 53113 bytes .../textures/bottomtray/Object_View_Off.png | Bin 0 -> 55000 bytes .../default/textures/bottomtray/Object_View_On.png | Bin 0 -> 51183 bytes .../textures/bottomtray/PanOrbit_Disabled.png | Bin 0 -> 50975 bytes .../default/textures/bottomtray/PanOrbit_Off.png | Bin 0 -> 51539 bytes .../default/textures/bottomtray/PanOrbit_Over.png | Bin 0 -> 54713 bytes .../default/textures/bottomtray/PanOrbit_Press.png | Bin 0 -> 51053 bytes indra/newview/skins/default/textures/textures.xml | 7 + .../skins/default/xui/en/floater_camera.xml | 549 +++++++++++---------- 19 files changed, 529 insertions(+), 360 deletions(-) create mode 100644 indra/newview/skins/default/textures/bottomtray/Mouselook_View_Off.png create mode 100644 indra/newview/skins/default/textures/bottomtray/Mouselook_View_On.png create mode 100644 indra/newview/skins/default/textures/bottomtray/Object_View_Off.png create mode 100644 indra/newview/skins/default/textures/bottomtray/Object_View_On.png create mode 100644 indra/newview/skins/default/textures/bottomtray/PanOrbit_Disabled.png create mode 100644 indra/newview/skins/default/textures/bottomtray/PanOrbit_Off.png create mode 100644 indra/newview/skins/default/textures/bottomtray/PanOrbit_Over.png create mode 100644 indra/newview/skins/default/textures/bottomtray/PanOrbit_Press.png diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 1603ff0a54..a057421135 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -168,7 +168,7 @@ LLBottomTray::LLBottomTray(const LLSD&) LLUICtrlFactory::getInstance()->buildPanel(this,"panel_bottomtray.xml"); - LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraPresets, _2)); + LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraItem, _2)); //this is to fix a crash that occurs because LLBottomTray is a singleton //and thus is deleted at the end of the viewers lifetime, but to be cleanly diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index d84ebef1dd..ca346138fb 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -47,15 +47,19 @@ #include "lltoolfocus.h" #include "llslider.h" +static LLDefaultChildRegistry::Register r("panel_camera_item"); + // Constants const F32 CAMERA_BUTTON_DELAY = 0.0f; #define ORBIT "cam_rotate_stick" #define PAN "cam_track_stick" #define ZOOM "zoom" -#define PRESETS "camera_presets" +#define PRESETS "preset_views_list" #define CONTROLS "controls" +bool LLFloaterCamera::sFreeCamera = false; + // Zoom the camera in and out class LLPanelCameraZoom : public LLPanel @@ -78,6 +82,68 @@ private: LLSlider* mSlider; }; +LLPanelCameraItem::Params::Params() +: icon_over("icon_over"), + icon_selected("icon_selected"), + picture("picture"), + text("text"), + selected_picture("selected_picture"), + mousedown_callback("mousedown_callback") +{ +} + +LLPanelCameraItem::LLPanelCameraItem(const LLPanelCameraItem::Params& p) +: LLPanel(p) +{ + LLIconCtrl::Params icon_params = p.picture; + mPicture = LLUICtrlFactory::create(icon_params); + addChild(mPicture); + + icon_params = p.icon_over; + mIconOver = LLUICtrlFactory::create(icon_params); + addChild(mIconOver); + + icon_params = p.icon_selected; + mIconSelected = LLUICtrlFactory::create(icon_params); + addChild(mIconSelected); + + icon_params = p.selected_picture; + mPictureSelected = LLUICtrlFactory::create(icon_params); + addChild(mPictureSelected); + + LLTextBox::Params text_params = p.text; + mText = LLUICtrlFactory::create(text_params); + addChild(mText); + + if (p.mousedown_callback.isProvided()) + { + setCommitCallback(initCommitCallback(p.mousedown_callback)); + } +} + +BOOL LLPanelCameraItem::postBuild() +{ + setMouseEnterCallback(boost::bind(&LLPanelCameraItem::childSetVisible, this, "hovered_icon", true)); + setMouseLeaveCallback(boost::bind(&LLPanelCameraItem::childSetVisible, this, "hovered_icon", false)); + setMouseDownCallback(boost::bind(&LLPanelCameraItem::onAnyMouseClick, this)); + setRightMouseDownCallback(boost::bind(&LLPanelCameraItem::onAnyMouseClick, this)); + return TRUE; +} + +void LLPanelCameraItem::onAnyMouseClick() +{ + if (mCommitSignal) (*mCommitSignal)(this, LLSD()); +} + +void LLPanelCameraItem::setValue(const LLSD& value) +{ + if (!value.isMap()) return;; + if (!value.has("selected")) return; + childSetVisible("selected_icon", value["selected"]); + childSetVisible("picture", !value["selected"]); + childSetVisible("selected_picture", value["selected"]); +} + static LLRegisterPanelClassWrapper t_camera_zoom_panel("camera_zoom_panel"); //------------------------------------------------------------------------------- @@ -153,16 +219,11 @@ void activate_camera_tool() return false; } -bool LLFloaterCamera::inAvatarViewMode() -{ - return mCurrMode == CAMERA_CTRL_MODE_AVATAR_VIEW; -} - void LLFloaterCamera::resetCameraMode() { LLFloaterCamera* floater_camera = LLFloaterCamera::findInstance(); if (!floater_camera) return; - floater_camera->switchMode(CAMERA_CTRL_MODE_ORBIT); + floater_camera->switchMode(CAMERA_CTRL_MODE_PAN); } void LLFloaterCamera::update() @@ -180,9 +241,13 @@ void LLFloaterCamera::toPrevMode() /*static*/ void LLFloaterCamera::onLeavingMouseLook() { LLFloaterCamera* floater_camera = LLFloaterCamera::findInstance(); - if (floater_camera && floater_camera->inFreeCameraMode()) + if (floater_camera) { - activate_camera_tool(); + floater_camera->updateItemsSelection(); + if(floater_camera->inFreeCameraMode()) + { + activate_camera_tool(); + } } } @@ -216,24 +281,24 @@ void LLFloaterCamera::onClose(bool app_quitting) //We don't care of camera mode if app is quitting if(app_quitting) return; - // When mCurrMode is in CAMERA_CTRL_MODE_ORBIT + // When mCurrMode is in CAMERA_CTRL_MODE_PAN // switchMode won't modify mPrevMode, so force it here. // It is needed to correctly return to previous mode on open, see EXT-2727. - if (mCurrMode == CAMERA_CTRL_MODE_ORBIT) - mPrevMode = CAMERA_CTRL_MODE_ORBIT; + if (mCurrMode == CAMERA_CTRL_MODE_PAN) + mPrevMode = CAMERA_CTRL_MODE_PAN; // HACK: Should always close as docked to prevent toggleInstance without calling onOpen. if ( !isDocked() ) setDocked(true); - switchMode(CAMERA_CTRL_MODE_ORBIT); + switchMode(CAMERA_CTRL_MODE_PAN); mClosed = TRUE; } LLFloaterCamera::LLFloaterCamera(const LLSD& val) : LLTransientDockableFloater(NULL, true, val), mClosed(FALSE), - mCurrMode(CAMERA_CTRL_MODE_ORBIT), - mPrevMode(CAMERA_CTRL_MODE_ORBIT) + mCurrMode(CAMERA_CTRL_MODE_PAN), + mPrevMode(CAMERA_CTRL_MODE_PAN) { } @@ -247,16 +312,32 @@ BOOL LLFloaterCamera::postBuild() mZoom = getChild(ZOOM); mTrack = getChild(PAN); - assignButton2Mode(CAMERA_CTRL_MODE_ORBIT, "orbit_btn"); + assignButton2Mode(CAMERA_CTRL_MODE_MODES, "avatarview_btn"); assignButton2Mode(CAMERA_CTRL_MODE_PAN, "pan_btn"); - assignButton2Mode(CAMERA_CTRL_MODE_FREE_CAMERA, "freecamera_btn"); - assignButton2Mode(CAMERA_CTRL_MODE_AVATAR_VIEW, "avatarview_btn"); + assignButton2Mode(CAMERA_CTRL_MODE_PRESETS, "presets_btn"); update(); return LLDockableFloater::postBuild(); } +void LLFloaterCamera::fillFlatlistFromPanel (LLFlatListView* list, LLPanel* panel) +{ + // copying child list and then iterating over a copy, because list itself + // is changed in process + const child_list_t child_list = *panel->getChildList(); + child_list_t::const_reverse_iterator iter = child_list.rbegin(); + child_list_t::const_reverse_iterator end = child_list.rend(); + for ( ; iter != end; ++iter) + { + LLView* view = *iter; + LLPanel* item = dynamic_cast(view); + if (panel) + list->addItem(item); + } + +} + ECameraControlMode LLFloaterCamera::determineMode() { LLTool* curr_tool = LLToolMgr::getInstance()->getCurrentTool(); @@ -267,10 +348,10 @@ ECameraControlMode LLFloaterCamera::determineMode() if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) { - return CAMERA_CTRL_MODE_AVATAR_VIEW; + return CAMERA_CTRL_MODE_PRESETS; } - return CAMERA_CTRL_MODE_ORBIT; + return CAMERA_CTRL_MODE_PAN; } @@ -301,21 +382,16 @@ void LLFloaterCamera::setModeTitle(const ECameraControlMode mode) std::string title; switch(mode) { - case CAMERA_CTRL_MODE_ORBIT: - title = getString("orbit_mode_title"); + case CAMERA_CTRL_MODE_MODES: + title = getString("camera_modes_title"); break; case CAMERA_CTRL_MODE_PAN: title = getString("pan_mode_title"); break; - case CAMERA_CTRL_MODE_AVATAR_VIEW: - title = getString("avatar_view_mode_title"); - break; - case CAMERA_CTRL_MODE_FREE_CAMERA: - title = getString("free_mode_title"); + case CAMERA_CTRL_MODE_PRESETS: + title = getString("presets_mode_title"); break; default: - // title should be provided for all modes - llassert(false); break; } setTitle(title); @@ -327,19 +403,28 @@ void LLFloaterCamera::switchMode(ECameraControlMode mode) switch (mode) { - case CAMERA_CTRL_MODE_ORBIT: - clear_camera_tool(); + case CAMERA_CTRL_MODE_MODES: + if(sFreeCamera) + { + switchMode(CAMERA_CTRL_MODE_FREE_CAMERA); + } break; case CAMERA_CTRL_MODE_PAN: + sFreeCamera = false; clear_camera_tool(); break; case CAMERA_CTRL_MODE_FREE_CAMERA: + sFreeCamera = true; activate_camera_tool(); break; - case CAMERA_CTRL_MODE_AVATAR_VIEW: + case CAMERA_CTRL_MODE_PRESETS: + if(sFreeCamera) + { + switchMode(CAMERA_CTRL_MODE_FREE_CAMERA); + } break; default: @@ -368,66 +453,80 @@ void LLFloaterCamera::assignButton2Mode(ECameraControlMode mode, const std::stri void LLFloaterCamera::updateState() { + childSetVisible(ZOOM, CAMERA_CTRL_MODE_PAN == mCurrMode); + + bool show_presets = (CAMERA_CTRL_MODE_PRESETS == mCurrMode) || (CAMERA_CTRL_MODE_FREE_CAMERA == mCurrMode + && CAMERA_CTRL_MODE_PRESETS == mPrevMode); + childSetVisible(PRESETS, show_presets); + + bool show_camera_modes = CAMERA_CTRL_MODE_MODES == mCurrMode || (CAMERA_CTRL_MODE_FREE_CAMERA == mCurrMode + && CAMERA_CTRL_MODE_MODES == mPrevMode); + childSetVisible("camera_modes_list", show_camera_modes); + + updateItemsSelection(); + + if (CAMERA_CTRL_MODE_FREE_CAMERA == mCurrMode) + { + return; + } + //updating buttons std::map::const_iterator iter = mMode2Button.begin(); for (; iter != mMode2Button.end(); ++iter) { iter->second->setToggleState(iter->first == mCurrMode); } - - childSetVisible(ORBIT, CAMERA_CTRL_MODE_ORBIT == mCurrMode); - childSetVisible(PAN, CAMERA_CTRL_MODE_PAN == mCurrMode); - childSetVisible(ZOOM, CAMERA_CTRL_MODE_AVATAR_VIEW != mCurrMode); - childSetVisible(PRESETS, CAMERA_CTRL_MODE_AVATAR_VIEW == mCurrMode); - - updateCameraPresetButtons(); setModeTitle(mCurrMode); - - - //hiding or showing the panel with controls by reshaping the floater - bool showControls = CAMERA_CTRL_MODE_FREE_CAMERA != mCurrMode; - if (showControls == childIsVisible(CONTROLS)) return; - - childSetVisible(CONTROLS, showControls); - - LLRect rect = getRect(); - LLRect controls_rect; - if (childGetRect(CONTROLS, controls_rect)) - { - S32 floater_header_size = getHeaderHeight(); - S32 height = controls_rect.getHeight() - floater_header_size; - S32 newHeight = rect.getHeight(); - - if (showControls) - { - newHeight += height; - } - else - { - newHeight -= height; - } - - rect.setOriginAndSize(rect.mLeft, rect.mBottom, rect.getWidth(), newHeight); - reshape(rect.getWidth(), rect.getHeight()); - setRect(rect); - - } } -void LLFloaterCamera::updateCameraPresetButtons() +void LLFloaterCamera::updateItemsSelection() { ECameraPreset preset = (ECameraPreset) gSavedSettings.getU32("CameraPreset"); - - childSetValue("rear_view", preset == CAMERA_PRESET_REAR_VIEW); - childSetValue("group_view", preset == CAMERA_PRESET_GROUP_VIEW); - childSetValue("front_view", preset == CAMERA_PRESET_FRONT_VIEW); - childSetValue("mouselook_view", gAgentCamera.cameraMouselook()); + LLSD argument; + argument["selected"] = preset == CAMERA_PRESET_REAR_VIEW; + getChild("rear_view")->setValue(argument); + argument["selected"] = preset == CAMERA_PRESET_GROUP_VIEW; + getChild("group_view")->setValue(argument); + argument["selected"] = preset == CAMERA_PRESET_FRONT_VIEW; + getChild("front_view")->setValue(argument); + argument["selected"] = gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK; + getChild("mouselook_view")->setValue(argument); + argument["selected"] = mCurrMode == CAMERA_CTRL_MODE_FREE_CAMERA; + getChild("object_view")->setValue(argument); } -void LLFloaterCamera::onClickCameraPresets(const LLSD& param) +void LLFloaterCamera::onClickCameraItem(const LLSD& param) { std::string name = param.asString(); + if ("mouselook_view" == name) + { + gAgentCamera.changeCameraToMouselook(); + } + else if ("object_view" == name) + { + LLFloaterCamera* camera_floater = LLFloaterCamera::findInstance(); + if (camera_floater) + camera_floater->switchMode(CAMERA_CTRL_MODE_FREE_CAMERA); + } + else + { + switchToPreset(name); + } + + LLFloaterCamera* camera_floater = LLFloaterCamera::findInstance(); + if (camera_floater) + { + camera_floater->updateItemsSelection(); + camera_floater->fromFreeToPresets(); + } +} + +/*static*/ +void LLFloaterCamera::switchToPreset(const std::string& name) +{ + sFreeCamera = false; + clear_camera_tool(); if ("rear_view" == name) { gAgentCamera.switchCameraPreset(CAMERA_PRESET_REAR_VIEW); @@ -440,12 +539,12 @@ void LLFloaterCamera::onClickCameraPresets(const LLSD& param) { gAgentCamera.switchCameraPreset(CAMERA_PRESET_FRONT_VIEW); } - else if ("mouselook_view" == name) +} + +void LLFloaterCamera::fromFreeToPresets() +{ + if (!sFreeCamera && mCurrMode == CAMERA_CTRL_MODE_FREE_CAMERA && mPrevMode == CAMERA_CTRL_MODE_PRESETS) { - gAgentCamera.changeCameraToMouselook(); + switchMode(CAMERA_CTRL_MODE_PRESETS); } - - LLFloaterCamera* camera_floater = LLFloaterCamera::findInstance(); - if (camera_floater) - camera_floater->updateCameraPresetButtons(); } diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h index b268839165..8fa7a53996 100644 --- a/indra/newview/llfloatercamera.h +++ b/indra/newview/llfloatercamera.h @@ -34,6 +34,9 @@ #define LLFLOATERCAMERA_H #include "lltransientdockablefloater.h" +#include "lliconctrl.h" +#include "lltextbox.h" +#include "llflatlistview.h" class LLJoystickCameraRotate; class LLJoystickCameraZoom; @@ -43,10 +46,10 @@ class LLPanelCameraZoom; enum ECameraControlMode { - CAMERA_CTRL_MODE_ORBIT, + CAMERA_CTRL_MODE_MODES, CAMERA_CTRL_MODE_PAN, CAMERA_CTRL_MODE_FREE_CAMERA, - CAMERA_CTRL_MODE_AVATAR_VIEW + CAMERA_CTRL_MODE_PRESETS }; class LLFloaterCamera @@ -58,8 +61,8 @@ public: /* whether in free camera mode */ static bool inFreeCameraMode(); - /* callback for camera presets changing */ - static void onClickCameraPresets(const LLSD& param); + /* callback for camera items selection changing */ + static void onClickCameraItem(const LLSD& param); static void onLeavingMouseLook(); @@ -68,7 +71,14 @@ public: /* determines actual mode and updates ui */ void update(); - + + /*switch to one of the camera presets (front, rear, side)*/ + static void switchToPreset(const std::string& name); + + /* move to CAMERA_CTRL_MODE_PRESETS from CAMERA_CTRL_MODE_FREE_CAMERA if we are on presets panel and + are not in free camera mode*/ + void fromFreeToPresets(); + virtual void onOpen(const LLSD& key); virtual void onClose(bool app_quitting); @@ -88,9 +98,6 @@ private: ECameraControlMode determineMode(); - /* whether in avatar view (first person) mode */ - bool inAvatarViewMode(); - /* resets to the previous mode */ void toPrevMode(); @@ -106,18 +113,59 @@ private: /* updates the state (UI) according to the current mode */ void updateState(); - /* update camera preset buttons toggle state according to the currently selected preset */ - void updateCameraPresetButtons(); + /* update camera modes items selection and camera preset items selection according to the currently selected preset */ + void updateItemsSelection(); void onClickBtn(ECameraControlMode mode); void assignButton2Mode(ECameraControlMode mode, const std::string& button_name); + // fills flatlist with items from given panel + void fillFlatlistFromPanel (LLFlatListView* list, LLPanel* panel); + // set to true when free camera mode is selected in modes list + // remains true until preset camera mode is chosen, or pan button is clicked, or escape pressed + static bool sFreeCamera; BOOL mClosed; ECameraControlMode mPrevMode; ECameraControlMode mCurrMode; std::map mMode2Button; +}; +/** + * Class used to represent widgets from panel_camera_item.xml- + * panels that contain pictures and text. Pictures are different + * for selected and unselected state (this state is nor stored- icons + * are changed in setValue()). This class doesn't implement selection logic- + * it's items are used inside of flatlist. + */ +class LLPanelCameraItem + : public LLPanel +{ +public: + struct Params : public LLInitParam::Block + { + Optional icon_over; + Optional icon_selected; + Optional picture; + Optional selected_picture; + + Optional text; + Optional mousedown_callback; + Params(); + }; + /*virtual*/ BOOL postBuild(); + /** setting on/off background icon to indicate selected state */ + /*virtual*/ void setValue(const LLSD& value); + // sends commit signal + void onAnyMouseClick(); +protected: + friend class LLUICtrlFactory; + LLPanelCameraItem(const Params&); + LLIconCtrl* mIconOver; + LLIconCtrl* mIconSelected; + LLIconCtrl* mPicture; + LLIconCtrl* mPictureSelected; + LLTextBox* mText; }; #endif diff --git a/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Back_Off.png b/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Back_Off.png index 3cfe2e850e..00158a7bc2 100644 Binary files a/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Back_Off.png and b/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Back_Off.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Back_On.png b/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Back_On.png index bb5d85e410..3748f5e190 100644 Binary files a/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Back_On.png and b/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Back_On.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Front_Off.png b/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Front_Off.png index 9876aa456c..c49b8f9a27 100644 Binary files a/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Front_Off.png and b/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Front_Off.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Front_On.png b/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Front_On.png index f481fed88c..bc8c4db04d 100644 Binary files a/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Front_On.png and b/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Front_On.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Side_Off.png b/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Side_Off.png index d58b4ff990..b919a0a152 100644 Binary files a/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Side_Off.png and b/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Side_Off.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Side_On.png b/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Side_On.png index 6e73898992..de9da359a0 100644 Binary files a/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Side_On.png and b/indra/newview/skins/default/textures/bottomtray/Cam_Preset_Side_On.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/Mouselook_View_Off.png b/indra/newview/skins/default/textures/bottomtray/Mouselook_View_Off.png new file mode 100644 index 0000000000..8d32cad95f Binary files /dev/null and b/indra/newview/skins/default/textures/bottomtray/Mouselook_View_Off.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/Mouselook_View_On.png b/indra/newview/skins/default/textures/bottomtray/Mouselook_View_On.png new file mode 100644 index 0000000000..4c98e35868 Binary files /dev/null and b/indra/newview/skins/default/textures/bottomtray/Mouselook_View_On.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/Object_View_Off.png b/indra/newview/skins/default/textures/bottomtray/Object_View_Off.png new file mode 100644 index 0000000000..e9dea7e17e Binary files /dev/null and b/indra/newview/skins/default/textures/bottomtray/Object_View_Off.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/Object_View_On.png b/indra/newview/skins/default/textures/bottomtray/Object_View_On.png new file mode 100644 index 0000000000..7a348ba22e Binary files /dev/null and b/indra/newview/skins/default/textures/bottomtray/Object_View_On.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/PanOrbit_Disabled.png b/indra/newview/skins/default/textures/bottomtray/PanOrbit_Disabled.png new file mode 100644 index 0000000000..20fa40e127 Binary files /dev/null and b/indra/newview/skins/default/textures/bottomtray/PanOrbit_Disabled.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/PanOrbit_Off.png b/indra/newview/skins/default/textures/bottomtray/PanOrbit_Off.png new file mode 100644 index 0000000000..53efa3a9a9 Binary files /dev/null and b/indra/newview/skins/default/textures/bottomtray/PanOrbit_Off.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/PanOrbit_Over.png b/indra/newview/skins/default/textures/bottomtray/PanOrbit_Over.png new file mode 100644 index 0000000000..f1420e0002 Binary files /dev/null and b/indra/newview/skins/default/textures/bottomtray/PanOrbit_Over.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/PanOrbit_Press.png b/indra/newview/skins/default/textures/bottomtray/PanOrbit_Press.png new file mode 100644 index 0000000000..89a6269edc Binary files /dev/null and b/indra/newview/skins/default/textures/bottomtray/PanOrbit_Press.png differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 91890009f4..57f23c7e76 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -278,6 +278,9 @@ with the same filename but different name + + + @@ -338,10 +341,14 @@ with the same filename but different name + + + + diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml index 999cb9ed97..75b0457c90 100644 --- a/indra/newview/skins/default/xui/en/floater_camera.xml +++ b/indra/newview/skins/default/xui/en/floater_camera.xml @@ -1,267 +1,282 @@ - - - - Rotate Camera Around Focus - - - Zoom Camera Towards Focus - - - Move Camera Up and Down, Left and Right - - - Orbit - - - Pan - - - Presets - - - View Object - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + Rotate Camera Around Focus + + + Zoom Camera Towards Focus + + + Move Camera Up and Down, Left and Right + + + Camera modes + + + Orbit Zoom Pan + + + Preset Views + + + View Object + + + + + + + + + Front View + + + + + + + + Side View + + + + + + + + Rear View + + + + + + + + Object View + + + + + + + + Mouselook View + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From a0351c6ea4446bfa8fc85450c2603251cd703c2c Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Thu, 27 May 2010 18:41:28 +0300 Subject: EXT-7200 FIXED Integrated art missing from appearance. Replaced "Shop" button text with icon, changed sizes of buttons according to comments in ticket, also changed heights of hovered and selected icons for items- made them equal to heights of panels they are used on. Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/410/ --HG-- branch : product-engine --- .../newview/skins/default/textures/icons/Shop.png | Bin 0 -> 647 bytes indra/newview/skins/default/textures/textures.xml | 1 + .../default/xui/en/panel_body_parts_list_item.xml | 32 +++++++++++------ .../xui/en/panel_bodyparts_list_button_bar.xml | 4 +-- .../xui/en/panel_clothing_list_button_bar.xml | 4 +-- .../default/xui/en/panel_clothing_list_item.xml | 39 ++++++++++++++------- .../xui/en/panel_dummy_clothing_list_item.xml | 10 +++--- .../skins/default/xui/en/sidepanel_appearance.xml | 2 +- 8 files changed, 59 insertions(+), 33 deletions(-) create mode 100644 indra/newview/skins/default/textures/icons/Shop.png diff --git a/indra/newview/skins/default/textures/icons/Shop.png b/indra/newview/skins/default/textures/icons/Shop.png new file mode 100644 index 0000000000..d7e0001dc6 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Shop.png differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 57f23c7e76..29c72a414b 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -453,6 +453,7 @@ with the same filename but different name + diff --git a/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml b/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml index e3f6045e27..2edd643cc5 100644 --- a/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml @@ -1,7 +1,7 @@ - + height="23" + width="23" + tab_stop="false"> + + - - - - - - - - - - - - - + + + + Rotate Camera Around Focus + + + Zoom Camera Towards Focus + + + Move Camera Up and Down, Left and Right + + + Camera modes + + + Orbit Zoom Pan + + + Preset Views + + + View Object + + + + + + + + + Front View + + + + + + + + Side View + + + + + + + + Rear View + + + + + + + + Object View + + + + + + + + Mouselook View + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/widgets/panel_camera_item.xml b/indra/newview/skins/default/xui/en/widgets/panel_camera_item.xml index a77b81f76f..98707b8495 100644 --- a/indra/newview/skins/default/xui/en/widgets/panel_camera_item.xml +++ b/indra/newview/skins/default/xui/en/widgets/panel_camera_item.xml @@ -1,70 +1,70 @@ - - - - - - - - Text - - \ No newline at end of file + + + + + + + + Text + + -- cgit v1.2.3 From e25d0d34ba1b88008ef3bfbf40fb43f498bc1bea Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Fri, 28 May 2010 12:01:26 +0100 Subject: CID-481 Checker: FORWARD_NULL Function: LLTaskInvFVBridge::createObjectBridge(LLPanelObjectInventory *, LLInventoryObject *) File: /indra/newview/llpanelobjectinventory.cpp --- indra/newview/llpanelobjectinventory.cpp | 54 +++++++++++++++----------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 0d3beaa9a5..c557e9b85d 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -1249,29 +1249,30 @@ LLTaskInvFVBridge* LLTaskInvFVBridge::createObjectBridge(LLPanelObjectInventory* { LLTaskInvFVBridge* new_bridge = NULL; const LLInventoryItem* item = dynamic_cast(object); + const U32 itemflags = ( NULL == item ? 0 : item->getFlags() ); LLAssetType::EType type = object->getType(); switch(type) { case LLAssetType::AT_TEXTURE: new_bridge = new LLTaskTextureBridge(panel, - object->getUUID(), - object->getName()); + object->getUUID(), + object->getName()); break; case LLAssetType::AT_SOUND: new_bridge = new LLTaskSoundBridge(panel, - object->getUUID(), - object->getName()); + object->getUUID(), + object->getName()); break; case LLAssetType::AT_LANDMARK: new_bridge = new LLTaskLandmarkBridge(panel, - object->getUUID(), - object->getName()); + object->getUUID(), + object->getName()); break; case LLAssetType::AT_CALLINGCARD: new_bridge = new LLTaskCallingCardBridge(panel, - object->getUUID(), - object->getName()); + object->getUUID(), + object->getName()); break; case LLAssetType::AT_SCRIPT: // OLD SCRIPTS DEPRECATED - JC @@ -1281,45 +1282,42 @@ LLTaskInvFVBridge* LLTaskInvFVBridge::createObjectBridge(LLPanelObjectInventory* // object->getName()); break; case LLAssetType::AT_OBJECT: - { - U32 flags = ( NULL == item ? 0 : item->getFlags() ); - new_bridge = new LLTaskObjectBridge(panel, - object->getUUID(), - object->getName(), - flags); - } + new_bridge = new LLTaskObjectBridge(panel, + object->getUUID(), + object->getName(), + itemflags); break; case LLAssetType::AT_NOTECARD: new_bridge = new LLTaskNotecardBridge(panel, - object->getUUID(), - object->getName()); + object->getUUID(), + object->getName()); break; case LLAssetType::AT_ANIMATION: new_bridge = new LLTaskAnimationBridge(panel, - object->getUUID(), - object->getName()); + object->getUUID(), + object->getName()); break; case LLAssetType::AT_GESTURE: new_bridge = new LLTaskGestureBridge(panel, - object->getUUID(), - object->getName()); + object->getUUID(), + object->getName()); break; case LLAssetType::AT_CLOTHING: case LLAssetType::AT_BODYPART: new_bridge = new LLTaskWearableBridge(panel, - object->getUUID(), - object->getName(), - item->getFlags()); + object->getUUID(), + object->getName(), + itemflags); break; case LLAssetType::AT_CATEGORY: new_bridge = new LLTaskCategoryBridge(panel, - object->getUUID(), - object->getName()); + object->getUUID(), + object->getName()); break; case LLAssetType::AT_LSL_TEXT: new_bridge = new LLTaskLSLBridge(panel, - object->getUUID(), - object->getName()); + object->getUUID(), + object->getName()); break; default: llinfos << "Unhandled inventory type (llassetstorage.h): " -- cgit v1.2.3 From c68e4c559718740bc19eb3c9c71a11d450bae3b5 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Fri, 28 May 2010 12:04:49 +0100 Subject: CID-478 Checker: NULL_RETURNS Function: LLCOFWearables::buildBodypartListItem(LLViewerInventoryItem *) File: /indra/newview/llcofwearables.cpp --- indra/newview/llcofwearables.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index dfc203111a..661449c60c 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -340,14 +340,15 @@ LLPanelClothingListItem* LLCOFWearables::buildClothingListItem(LLViewerInventory LLPanelBodyPartsListItem* LLCOFWearables::buildBodypartListItem(LLViewerInventoryItem* item) { llassert(item); - + if (!item) return NULL; LLPanelBodyPartsListItem* item_panel = LLPanelBodyPartsListItem::create(item); if (!item_panel) return NULL; //updating verbs //we don't need to use permissions of a link but of an actual/linked item if (item->getLinkedItem()) item = item->getLinkedItem(); - + llassert(item); + if (!item) return NULL; bool allow_modify = item->getPermissions().allowModifyBy(gAgentID); item_panel->setShowLockButton(!allow_modify); item_panel->setShowEditButton(allow_modify); -- cgit v1.2.3 From 89990d746e7cef9e96c6aa350d25309f7c0c29de Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Fri, 28 May 2010 12:06:03 +0100 Subject: CID-477 Checker: NULL_RETURNS Function: LLCOFWearables::buildClothingListItem(LLViewerInventoryItem *, bool, bool) File: /indra/newview/llcofwearables.cpp --- indra/newview/llcofwearables.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index 661449c60c..0864d63919 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -308,13 +308,15 @@ void LLCOFWearables::populateAttachmentsAndBodypartsLists(const LLInventoryModel LLPanelClothingListItem* LLCOFWearables::buildClothingListItem(LLViewerInventoryItem* item, bool first, bool last) { llassert(item); - + if (!item) return NULL; LLPanelClothingListItem* item_panel = LLPanelClothingListItem::create(item); if (!item_panel) return NULL; //updating verbs //we don't need to use permissions of a link but of an actual/linked item if (item->getLinkedItem()) item = item->getLinkedItem(); + llassert(item); + if (!item) return NULL; bool allow_modify = item->getPermissions().allowModifyBy(gAgentID); -- cgit v1.2.3 From b3f758785dd0ee165276c0ac97e1823e44536cc8 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Fri, 28 May 2010 12:07:45 +0100 Subject: CID-479 Checker: UNINIT_CTOR Function: LLVivoxVoiceClient::sessionState::sessionState() File: /indra/newview/llvoicevivox.cpp --- indra/newview/llvoicevivox.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 1597691347..f90d46bc9c 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -5538,6 +5538,7 @@ LLVivoxVoiceClient::sessionState::sessionState() : mVoiceEnabled(false), mReconnect(false), mVolumeDirty(false), + mMuteDirty(false), mParticipantsChanged(false) { } -- cgit v1.2.3 From 14e03b56fc363d83004d0c0ae5d79a9bedf68eae Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Fri, 28 May 2010 12:09:48 +0100 Subject: CID-480 Checker: UNINIT_CTOR Function: LLVivoxVoiceClient::participantState::participantState(const std::basic_string, std::allocator>&) File: /indra/newview/llvoicevivox.cpp --- indra/newview/llvoicevivox.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index f90d46bc9c..c6c155f0f0 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -4088,7 +4088,9 @@ LLVivoxVoiceClient::participantState::participantState(const std::string &uri) : mLastSpokeTimestamp(0.f), mPower(0.f), mVolume(LLVoiceClient::VOLUME_DEFAULT), + mUserVolume(0), mOnMuteList(false), + mVolumeSet(false), mVolumeDirty(false), mAvatarIDValid(false), mIsSelf(false) -- cgit v1.2.3 From 878e1d06d5e9ac3bb6c002d3fd7342f5beda2017 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Fri, 28 May 2010 12:20:06 +0100 Subject: CID-476 Checker: NULL_RETURNS Function: LLPanelEditWearable::updateScrollingPanelUI() File: /indra/newview/llpaneleditwearable.cpp --- indra/newview/llpaneleditwearable.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 9eccceca66..36f2d05fab 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -1095,6 +1095,8 @@ void LLPanelEditWearable::updateScrollingPanelUI() if(panel && (mWearablePtr->getItemID().notNull())) { const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(type); + llassert(wearable_entry); + if (!wearable_entry) return; U8 num_subparts = wearable_entry->mSubparts.size(); LLScrollingPanelParam::sUpdateDelayFrames = 0; -- cgit v1.2.3 From 3927d183278e4cc11396a2c78b9393bcf6b0e802 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Fri, 28 May 2010 12:31:43 +0100 Subject: CID-466 Checker: NULL_RETURNS Function: LLInventoryItemsList::refresh() File: /indra/newview/llinventoryitemslist.cpp --- indra/newview/llinventoryitemslist.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp index 1c3eb547bb..750cdfb678 100644 --- a/indra/newview/llinventoryitemslist.cpp +++ b/indra/newview/llinventoryitemslist.cpp @@ -388,7 +388,7 @@ void LLInventoryItemsList::refresh() computeDifference(getIDs(), added_items, removed_items); bool add_limit_exceeded = false; - unsigned nadded = 0; + unsigned int nadded = 0; uuid_vec_t::const_iterator it = added_items.begin(); for( ; added_items.end() != it; ++it) @@ -400,8 +400,12 @@ void LLInventoryItemsList::refresh() } LLViewerInventoryItem* item = gInventory.getItem(*it); // Do not rearrange items on each adding, let's do that on filter call - addNewItem(item, false); - ++nadded; + llassert(item); + if (item) + { + addNewItem(item, false); + ++nadded; + } } it = removed_items.begin(); -- cgit v1.2.3 From 6f8e96159a59b3e519cf7a5abba3ae34abcab725 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Fri, 28 May 2010 12:41:54 +0100 Subject: CID-448 Checker: UNINIT_CTOR Function: LLVoiceClient::LLVoiceClient() File: /indra/newview/llvoiceclient.cpp --- indra/newview/llvoiceclient.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 91353281a8..42e44634b6 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -81,8 +81,10 @@ std::string LLVoiceClientStatusObserver::status2string(LLVoiceClientStatusObserv /////////////////////////////////////////////////////////////////////////////////////////////// LLVoiceClient::LLVoiceClient() + : + mVoiceModule(NULL), + m_servicePump(NULL) { - mVoiceModule = NULL; } //--------------------------------------------------- -- cgit v1.2.3 From 58fb834a6ea3698ec6d89cb07e543d088dc69c00 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Fri, 28 May 2010 12:46:31 +0100 Subject: CID-443 Checker: FORWARD_NULL Function: LLBasicCertificateVector::BasicIteratorImpl::equals(const LLPointer &) const File: /indra/newview/llsechandler_basic.h --- indra/newview/llsechandler_basic.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/llsechandler_basic.h b/indra/newview/llsechandler_basic.h index 4bbb73f062..407e74ad00 100644 --- a/indra/newview/llsechandler_basic.h +++ b/indra/newview/llsechandler_basic.h @@ -116,6 +116,8 @@ public: virtual bool equals(const LLPointer& _iter) const { const BasicIteratorImpl *rhs_iter = dynamic_cast(_iter.get()); + llassert(rhs_iter); + if (!rhs_iter) return 0; return (mIter == rhs_iter->mIter); } virtual LLPointer get() -- cgit v1.2.3 From 7e0b36d6102f5e285296cd8e0dc6961b5c73c7cb Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Fri, 28 May 2010 12:47:45 +0100 Subject: CID-442 Checker: FORWARD_NULL Function: LLBasicCertificateVector::insert(LLCertificateVector::iterator, LLPointer) File: /indra/newview/llsechandler_basic.cpp --- indra/newview/llsechandler_basic.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp index edf5ce9b60..c4c13ccdca 100644 --- a/indra/newview/llsechandler_basic.cpp +++ b/indra/newview/llsechandler_basic.cpp @@ -541,7 +541,7 @@ LLBasicCertificateVector::iterator LLBasicCertificateVector::find(const LLSD& pa // Insert a certificate into the store. If the certificate already // exists in the store, nothing is done. void LLBasicCertificateVector::insert(iterator _iter, - LLPointer cert) + LLPointer cert) { LLSD cert_info = cert->getLLSD(); if (cert_info.isMap() && cert_info.has(CERT_SHA1_DIGEST)) @@ -551,7 +551,11 @@ void LLBasicCertificateVector::insert(iterator _iter, if(find(existing_cert_info) == end()) { BasicIteratorImpl *basic_iter = dynamic_cast(_iter.mImpl.get()); - mCerts.insert(basic_iter->mIter, cert); + llassert(basic_iter); + if (basic_iter) + { + mCerts.insert(basic_iter->mIter, cert); + } } } } -- cgit v1.2.3 From e07deaa3dac6b9bc651034543c174e974b4b9ad2 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Fri, 28 May 2010 11:38:37 -0400 Subject: AVP-44 WIP architectural cleanup for multi-wearables Implemented some resident-suggested tweaks to better support multiwearables code reviewed by Seraph --- indra/newview/llagentwearables.cpp | 14 +++++++------- indra/newview/llagentwearables.h | 5 +++-- indra/newview/llappearancemgr.cpp | 5 +++-- indra/newview/llwearabletype.cpp | 2 +- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index cc9e68d593..e5796f8e63 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -718,16 +718,16 @@ U32 LLAgentWearables::pushWearable(const LLWearableType::EType type, LLWearable { // no null wearables please! llwarns << "Null wearable sent for type " << type << llendl; - return MAX_WEARABLES_PER_TYPE; + return MAX_CLOTHING_PER_TYPE; } - if (type < LLWearableType::WT_COUNT || mWearableDatas[type].size() < MAX_WEARABLES_PER_TYPE) + if (type < LLWearableType::WT_COUNT || mWearableDatas[type].size() < MAX_CLOTHING_PER_TYPE) { mWearableDatas[type].push_back(wearable); wearableUpdated(wearable); checkWearableAgainstInventory(wearable); return mWearableDatas[type].size()-1; } - return MAX_WEARABLES_PER_TYPE; + return MAX_CLOTHING_PER_TYPE; } void LLAgentWearables::wearableUpdated(LLWearable *wearable) @@ -764,7 +764,7 @@ void LLAgentWearables::popWearable(LLWearable *wearable) U32 index = getWearableIndex(wearable); LLWearableType::EType type = wearable->getType(); - if (index < MAX_WEARABLES_PER_TYPE && index < getWearableCount(type)) + if (index < MAX_CLOTHING_PER_TYPE && index < getWearableCount(type)) { popWearable(type, index); } @@ -785,7 +785,7 @@ U32 LLAgentWearables::getWearableIndex(LLWearable *wearable) { if (wearable == NULL) { - return MAX_WEARABLES_PER_TYPE; + return MAX_CLOTHING_PER_TYPE; } const LLWearableType::EType type = wearable->getType(); @@ -793,7 +793,7 @@ U32 LLAgentWearables::getWearableIndex(LLWearable *wearable) if (wearable_iter == mWearableDatas.end()) { llwarns << "tried to get wearable index with an invalid type!" << llendl; - return MAX_WEARABLES_PER_TYPE; + return MAX_CLOTHING_PER_TYPE; } const wearableentry_vec_t& wearable_vec = wearable_iter->second; for(U32 index = 0; index < wearable_vec.size(); index++) @@ -804,7 +804,7 @@ U32 LLAgentWearables::getWearableIndex(LLWearable *wearable) } } - return MAX_WEARABLES_PER_TYPE; + return MAX_CLOTHING_PER_TYPE; } const LLWearable* LLAgentWearables::getWearable(const LLWearableType::EType type, U32 index) const diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index c53b1333fc..5d5c5ae371 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -102,6 +102,9 @@ public: U32 getWearableCount(const LLWearableType::EType type) const; U32 getWearableCount(const U32 tex_index) const; + static const U32 MAX_CLOTHING_PER_TYPE = 5; + + //-------------------------------------------------------------------- // Setters //-------------------------------------------------------------------- @@ -274,8 +277,6 @@ private: LLPointer mCB; }; - static const U32 MAX_WEARABLES_PER_TYPE = 1; - }; // LLAgentWearables extern LLAgentWearables gAgentWearables; diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 8cc4436188..c417f8bdf5 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -970,7 +970,7 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append) getDescendentsOfAssetType(category, wear_items, LLAssetType::AT_CLOTHING, false); // Reduce wearables to max of one per type. removeDuplicateItems(wear_items); - filterWearableItems(wear_items, 5); + filterWearableItems(wear_items, LLAgentWearables::MAX_CLOTHING_PER_TYPE); // - Attachments: include COF contents only if appending. LLInventoryModel::item_array_t obj_items; @@ -1525,11 +1525,12 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, bool do_update else { LLPointer cb = do_update ? new ModifiedCOFCallback : 0; + const std::string description = vitem->getIsLinkType() ? vitem->getDescription() : ""; link_inventory_item( gAgent.getID(), vitem->getLinkedUUID(), getCOF(), vitem->getName(), - vitem->getDescription(), + description, LLAssetType::AT_LINK, cb); } diff --git a/indra/newview/llwearabletype.cpp b/indra/newview/llwearabletype.cpp index c692df06ad..2a14ace38c 100644 --- a/indra/newview/llwearabletype.cpp +++ b/indra/newview/llwearabletype.cpp @@ -85,7 +85,7 @@ LLWearableDictionary::LLWearableDictionary() addEntry(LLWearableType::WT_TATTOO, new WearableEntry("tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_TATTOO)); addEntry(LLWearableType::WT_INVALID, new WearableEntry("invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE)); addEntry(LLWearableType::WT_NONE, new WearableEntry("none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE)); - addEntry(LLWearableType::WT_COUNT, NULL); + addEntry(LLWearableType::WT_COUNT, new WearableEntry("count", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE)); } // static -- cgit v1.2.3