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(-) (limited to 'indra') 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(-) (limited to 'indra') 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(-) (limited to 'indra') 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(-) (limited to 'indra') 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(+) (limited to 'indra') 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(-) (limited to 'indra') 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(-) (limited to 'indra') 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(-) (limited to 'indra') 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(-) (limited to 'indra') 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(-) (limited to 'indra') 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(-) (limited to 'indra') 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 1ad46b5cd0fcac0d3224d37d555092258593eabd Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Mon, 24 May 2010 13:59:10 -0700 Subject: DEV-50173 - investigate certificate code performance DEV-50166 - LLBasicCertificateChain::validate calls in log Added caching of certificates that have been validated. The sha1 hash for the certificate is stored and is associated with the from and to times. When the certificate is validated, the code determines whether the certificate has successfully been validated before by looking for it in the cache, and then checks the date of the cert. If that is successful, the validation calls with success. Otherwise, it proceeds to do a full validation of the certificate. --- indra/newview/llsecapi.cpp | 2 +- indra/newview/llsecapi.h | 31 ++++--- indra/newview/llsechandler_basic.cpp | 114 +++++++++++++++++------- indra/newview/llsechandler_basic.h | 23 +++-- indra/newview/llstartup.cpp | 3 +- indra/newview/llxmlrpctransaction.cpp | 3 +- indra/newview/tests/llsechandler_basic_test.cpp | 34 +++---- 7 files changed, 134 insertions(+), 76 deletions(-) (limited to 'indra') diff --git a/indra/newview/llsecapi.cpp b/indra/newview/llsecapi.cpp index 1caeec5b04..9e636f38c0 100644 --- a/indra/newview/llsecapi.cpp +++ b/indra/newview/llsecapi.cpp @@ -124,7 +124,7 @@ int secapiSSLCertVerifyCallback(X509_STORE_CTX *ctx, void *param) // we rely on libcurl to validate the hostname, as libcurl does more extensive validation // leaving our hostname validation call mechanism for future additions with respect to // OS native (Mac keyring, windows CAPI) validation. - chain->validate(VALIDATION_POLICY_SSL & (~VALIDATION_POLICY_HOSTNAME), store, validation_params); + store->validate(VALIDATION_POLICY_SSL & (~VALIDATION_POLICY_HOSTNAME), chain, validation_params); } catch (LLCertValidationTrustException& cert_exception) { diff --git a/indra/newview/llsecapi.h b/indra/newview/llsecapi.h index 59a1e1eff0..5a1a3879d4 100644 --- a/indra/newview/llsecapi.h +++ b/indra/newview/llsecapi.h @@ -154,7 +154,7 @@ public: // return an LLSD object containing information about the certificate // such as its name, signature, expiry time, serial number - virtual LLSD getLLSD() const=0; + virtual void getLLSD(LLSD& llsd)=0; // return an openSSL X509 struct for the certificate virtual X509* getOpenSSLX509() const=0; @@ -231,6 +231,18 @@ public: virtual LLPointer erase(iterator cert)=0; }; +// class LLCertificateChain +// Class representing a chain of certificates in order, with the +// first element being the child cert. +class LLCertificateChain : virtual public LLCertificateVector +{ + +public: + LLCertificateChain() {} + + virtual ~LLCertificateChain() {} + +}; // class LLCertificateStore // represents a store of certificates, typically a store of root CA @@ -250,30 +262,17 @@ public: // return the store id virtual std::string storeId() const=0; -}; - -// class LLCertificateChain -// Class representing a chain of certificates in order, with the -// first element being the child cert. -class LLCertificateChain : virtual public LLCertificateVector -{ - -public: - LLCertificateChain() {} - virtual ~LLCertificateChain() {} - // validate a certificate chain given the params. // Will throw exceptions on error virtual void validate(int validation_policy, - LLPointer ca_store, + LLPointer cert_chain, const LLSD& validation_params) =0; + }; - - inline bool operator==(const LLCertificateVector::iterator& _lhs, const LLCertificateVector::iterator& _rhs) { diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp index edf5ce9b60..84ab9b9175 100644 --- a/indra/newview/llsechandler_basic.cpp +++ b/indra/newview/llsechandler_basic.cpp @@ -85,7 +85,6 @@ LLBasicCertificate::LLBasicCertificate(const std::string& pem_cert) { throw LLInvalidCertificate(this); } - _initLLSD(); } @@ -96,7 +95,6 @@ LLBasicCertificate::LLBasicCertificate(X509* pCert) throw LLInvalidCertificate(this); } mCert = X509_dup(pCert); - _initLLSD(); } LLBasicCertificate::~LLBasicCertificate() @@ -150,9 +148,13 @@ std::vector LLBasicCertificate::getBinary() const } -LLSD LLBasicCertificate::getLLSD() const +void LLBasicCertificate::getLLSD(LLSD &llsd) { - return mLLSDInfo; + if (mLLSDInfo.isUndefined()) + { + _initLLSD(); + } + llsd = mLLSDInfo; } // Initialize the LLSD info for the certificate @@ -516,8 +518,9 @@ LLBasicCertificateVector::iterator LLBasicCertificateVector::find(const LLSD& pa cert++) { - found= TRUE; - LLSD cert_info = (*cert)->getLLSD(); + found= TRUE; + LLSD cert_info; + (*cert)->getLLSD(cert_info); for (LLSD::map_const_iterator param = params.beginMap(); param != params.endMap(); param++) @@ -543,7 +546,8 @@ LLBasicCertificateVector::iterator LLBasicCertificateVector::find(const LLSD& pa void LLBasicCertificateVector::insert(iterator _iter, LLPointer cert) { - LLSD cert_info = cert->getLLSD(); + LLSD cert_info; + cert->getLLSD(cert_info); if (cert_info.isMap() && cert_info.has(CERT_SHA1_DIGEST)) { LLSD existing_cert_info = LLSD::emptyMap(); @@ -691,7 +695,8 @@ LLBasicCertificateChain::LLBasicCertificateChain(const X509_STORE_CTX* store) while(untrusted_certs.size() > 0) { LLSD find_data = LLSD::emptyMap(); - LLSD cert_data = current->getLLSD(); + LLSD cert_data; + current->getLLSD(cert_data); // we simply build the chain via subject/issuer name as the // client should not have passed in multiple CA's with the same // subject name. If they did, it'll come out in the wash during @@ -850,12 +855,13 @@ bool _LLSDArrayIncludesValue(const LLSD& llsd_set, LLSD llsd_value) } void _validateCert(int validation_policy, - const LLPointer cert, + LLPointer cert, const LLSD& validation_params, int depth) { - LLSD current_cert_info = cert->getLLSD(); + LLSD current_cert_info; + cert->getLLSD(current_cert_info); // check basic properties exist in the cert if(!current_cert_info.has(CERT_SUBJECT_NAME) || !current_cert_info.has(CERT_SUBJECT_NAME_STRING)) { @@ -943,8 +949,9 @@ bool _verify_signature(LLPointer parent, LLPointer child) { bool verify_result = FALSE; - LLSD cert1 = parent->getLLSD(); - LLSD cert2 = child->getLLSD(); + LLSD cert1, cert2; + parent->getLLSD(cert1); + child->getLLSD(cert2); X509 *signing_cert = parent->getOpenSSLX509(); X509 *child_cert = child->getOpenSSLX509(); if((signing_cert != NULL) && (child_cert != NULL)) @@ -979,6 +986,7 @@ bool _verify_signature(LLPointer parent, return verify_result; } + // validate the certificate chain against a store. // There are many aspects of cert validatioin policy involved in // trust validation. The policies in this validation algorithm include @@ -993,8 +1001,8 @@ bool _verify_signature(LLPointer parent, // and verify the last cert is in the certificate store, or points // to a cert in the store. It validates whether any cert in the chain // is trusted in the store, even if it's not the last one. -void LLBasicCertificateChain::validate(int validation_policy, - LLPointer ca_store, +void LLBasicCertificateStore::validate(int validation_policy, + LLPointer cert_chain, const LLSD& validation_params) { @@ -1002,8 +1010,8 @@ void LLBasicCertificateChain::validate(int validation_policy, { throw LLCertException(NULL, "No certs in chain"); } - iterator current_cert = begin(); - LLSD current_cert_info = (*current_cert)->getLLSD(); + iterator current_cert = cert_chain->begin(); + LLSD current_cert_info; LLSD validation_date; if (validation_params.has(CERT_VALIDATION_DATE)) { @@ -1012,6 +1020,7 @@ void LLBasicCertificateChain::validate(int validation_policy, if (validation_policy & VALIDATION_POLICY_HOSTNAME) { + (*current_cert)->getLLSD(current_cert_info); if(!validation_params.has(CERT_HOSTNAME)) { throw LLCertException((*current_cert), "No hostname passed in for validation"); @@ -1021,7 +1030,7 @@ void LLBasicCertificateChain::validate(int validation_policy, throw LLInvalidCertificate((*current_cert)); } - LL_INFOS("SECAPI") << "Validating the hostname " << validation_params[CERT_HOSTNAME].asString() << + LL_DEBUGS("SECAPI") << "Validating the hostname " << validation_params[CERT_HOSTNAME].asString() << "against the cert CN " << current_cert_info[CERT_SUBJECT_NAME][CERT_NAME_CN].asString() << LL_ENDL; if(!_cert_hostname_wildcard_match(validation_params[CERT_HOSTNAME].asString(), current_cert_info[CERT_SUBJECT_NAME][CERT_NAME_CN].asString())) @@ -1030,16 +1039,50 @@ void LLBasicCertificateChain::validate(int validation_policy, (*current_cert)); } } - + // check the cache of already validated certs + X509* cert_x509 = (*current_cert)->getOpenSSLX509(); + if(!cert_x509) + { + throw LLInvalidCertificate((*current_cert)); + } + std::string sha1_hash((const char *)cert_x509->sha1_hash, SHA_DIGEST_LENGTH); + t_cert_cache::iterator cache_entry = mTrustedCertCache.find(sha1_hash); + if(cache_entry != mTrustedCertCache.end()) + { + LL_DEBUGS("SECAPI") << "Found cert in cache" << LL_ENDL; + // this cert is in the cache, so validate the time. + if (validation_policy & VALIDATION_POLICY_TIME) + { + LLDate validation_date(time(NULL)); + if(validation_params.has(CERT_VALIDATION_DATE)) + { + validation_date = validation_params[CERT_VALIDATION_DATE]; + } + + if((validation_date < cache_entry->second.first) || + (validation_date > cache_entry->second.second)) + { + throw LLCertValidationExpirationException((*current_cert), validation_date); + } + } + // successfully found in cache + return; + } + if(current_cert_info.isUndefined()) + { + (*current_cert)->getLLSD(current_cert_info); + } + LLDate from_time = current_cert_info[CERT_VALID_FROM].asDate(); + LLDate to_time = current_cert_info[CERT_VALID_TO].asDate(); int depth = 0; LLPointer previous_cert; // loop through the cert chain, validating the current cert against the next one. - while(current_cert != end()) + while(current_cert != cert_chain->end()) { int local_validation_policy = validation_policy; - if(current_cert == begin()) + if(current_cert == cert_chain->begin()) { // for the child cert, we don't validate CA stuff local_validation_policy &= ~(VALIDATION_POLICY_CA_KU | @@ -1061,23 +1104,23 @@ void LLBasicCertificateChain::validate(int validation_policy, depth); // look for a CA in the CA store that may belong to this chain. - LLSD cert_llsd = (*current_cert)->getLLSD(); LLSD cert_search_params = LLSD::emptyMap(); // is the cert itself in the store? - cert_search_params[CERT_SHA1_DIGEST] = cert_llsd[CERT_SHA1_DIGEST]; - LLCertificateStore::iterator found_store_cert = ca_store->find(cert_search_params); - if(found_store_cert != ca_store->end()) + cert_search_params[CERT_SHA1_DIGEST] = current_cert_info[CERT_SHA1_DIGEST]; + LLCertificateStore::iterator found_store_cert = find(cert_search_params); + if(found_store_cert != end()) { + mTrustedCertCache[sha1_hash] = std::pair(from_time, to_time); return; } // is the parent in the cert store? cert_search_params = LLSD::emptyMap(); - cert_search_params[CERT_SUBJECT_NAME_STRING] = cert_llsd[CERT_ISSUER_NAME_STRING]; - if (cert_llsd.has(CERT_AUTHORITY_KEY_IDENTIFIER)) + cert_search_params[CERT_SUBJECT_NAME_STRING] = current_cert_info[CERT_ISSUER_NAME_STRING]; + if (current_cert_info.has(CERT_AUTHORITY_KEY_IDENTIFIER)) { - LLSD cert_aki = cert_llsd[CERT_AUTHORITY_KEY_IDENTIFIER]; + LLSD cert_aki = current_cert_info[CERT_AUTHORITY_KEY_IDENTIFIER]; if(cert_aki.has(CERT_AUTHORITY_KEY_IDENTIFIER_ID)) { cert_search_params[CERT_SUBJECT_KEY_IDENTFIER] = cert_aki[CERT_AUTHORITY_KEY_IDENTIFIER_ID]; @@ -1087,11 +1130,10 @@ void LLBasicCertificateChain::validate(int validation_policy, cert_search_params[CERT_SERIAL_NUMBER] = cert_aki[CERT_AUTHORITY_KEY_IDENTIFIER_SERIAL]; } } - found_store_cert = ca_store->find(cert_search_params); + found_store_cert = find(cert_search_params); - if(found_store_cert != ca_store->end()) + if(found_store_cert != end()) { - LLSD foo = (*found_store_cert)->getLLSD(); // validate the store cert against the depth _validateCert(validation_policy & VALIDATION_POLICY_CA_BASIC_CONSTRAINTS, (*found_store_cert), @@ -1105,11 +1147,16 @@ void LLBasicCertificateChain::validate(int validation_policy, throw LLCertValidationInvalidSignatureException(*current_cert); } // successfully validated. + mTrustedCertCache[sha1_hash] = std::pair(from_time, to_time); return; } previous_cert = (*current_cert); current_cert++; - depth++; + depth++; + if(current_cert != current_cert != cert_chain->end()) + { + (*current_cert)->getLLSD(current_cert_info); + } } if (validation_policy & VALIDATION_POLICY_TRUSTED) { @@ -1118,6 +1165,7 @@ void LLBasicCertificateChain::validate(int validation_policy, throw LLCertValidationTrustException((*this)[size()-1]); } + mTrustedCertCache[sha1_hash] = std::pair(from_time, to_time); } @@ -1155,7 +1203,7 @@ void LLSecAPIBasicHandler::init() "CA.pem"); - LL_INFOS("SECAPI") << "Loading certificate store from " << store_file << LL_ENDL; + LL_DEBUGS("SECAPI") << "Loading certificate store from " << store_file << LL_ENDL; mStore = new LLBasicCertificateStore(store_file); // grab the application CA.pem file that contains the well-known certs shipped @@ -1465,7 +1513,7 @@ void LLSecAPIBasicHandler::saveCredential(LLPointer cred, bool sav { credential["authenticator"] = cred->getAuthenticator(); } - LL_INFOS("SECAPI") << "Saving Credential " << cred->getGrid() << ":" << cred->userID() << " " << save_authenticator << LL_ENDL; + LL_DEBUGS("SECAPI") << "Saving Credential " << cred->getGrid() << ":" << cred->userID() << " " << save_authenticator << LL_ENDL; setProtectedData("credential", cred->getGrid(), credential); //*TODO: If we're saving Agni credentials, should we write the // credentials to the legacy password.dat/etc? diff --git a/indra/newview/llsechandler_basic.h b/indra/newview/llsechandler_basic.h index 4bbb73f062..3ddd36a81a 100644 --- a/indra/newview/llsechandler_basic.h +++ b/indra/newview/llsechandler_basic.h @@ -59,12 +59,13 @@ public: virtual std::string getPem() const; virtual std::vector getBinary() const; - virtual LLSD getLLSD() const; + virtual void getLLSD(LLSD &llsd); virtual X509* getOpenSSLX509() const; // set llsd elements for testing void setLLSD(const std::string name, const LLSD& value) { mLLSDInfo[name] = value; } + protected: // certificates are stored as X509 objects, as validation and @@ -173,8 +174,21 @@ public: // return the store id virtual std::string storeId() const; + // validate a certificate chain against a certificate store, using the + // given validation policy. + virtual void validate(int validation_policy, + LLPointer ca_chain, + const LLSD& validation_params); + protected: - std::vector >mCerts; + std::vector > mCerts; + + // cache of cert sha1 hashes to from/to date pairs, to improve + // performance of cert trust. Note, these are not the CA certs, + // but the certs that have been validated against this store. + typedef std::map > t_cert_cache; + t_cert_cache mTrustedCertCache; + std::string mFilename; }; @@ -189,11 +203,6 @@ public: virtual ~LLBasicCertificateChain() {} - // validate a certificate chain against a certificate store, using the - // given validation policy. - virtual void validate(int validation_policy, - LLPointer ca_store, - const LLSD& validation_params); }; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 0a464b3b6c..7022d83868 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2702,7 +2702,8 @@ LLSD transform_cert_args(LLPointer cert) { LLSD args = LLSD::emptyMap(); std::string value; - LLSD cert_info = cert->getLLSD(); + LLSD cert_info; + cert->getLLSD(cert_info); // convert all of the elements in the cert into // args for the xml dialog, so we have flexability to // display various parts of the cert by only modifying diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index da61840761..bc1a48e26a 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -247,7 +247,8 @@ int LLXMLRPCTransaction::Impl::_sslCertVerifyCallback(X509_STORE_CTX *ctx, void validation_params[CERT_HOSTNAME] = uri.hostName(); try { - chain->validate(VALIDATION_POLICY_SSL, store, validation_params); + // don't validate hostname. Let libcurl do it instead. That way, it'll handle redirects + store->validate(VALIDATION_POLICY_SSL & (~VALIDATION_POLICY_HOSTNAME), chain, validation_params); } catch (LLCertValidationTrustException& cert_exception) { diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp index fd680b24f0..d1330e2270 100644 --- a/indra/newview/tests/llsechandler_basic_test.cpp +++ b/indra/newview/tests/llsechandler_basic_test.cpp @@ -950,15 +950,15 @@ namespace tut test_chain->add(new LLBasicCertificate(mX509IntermediateCert)); - test_chain->validate(0, test_store, validation_params); + test_store->validate(0, test_chain, validation_params); // add the root certificate to the chain and revalidate test_chain->add(new LLBasicCertificate(mX509RootCert)); - test_chain->validate(0, test_store, validation_params); + test_store->validate(0, test_chain, validation_params); // add the child cert at the head of the chain, and revalidate (3 deep chain) test_chain->insert(test_chain->begin(), new LLBasicCertificate(mX509ChildCert)); - test_chain->validate(0, test_store, validation_params); + test_store->validate(0, test_chain, validation_params); // basic failure cases test_chain = new LLBasicCertificateChain(NULL); @@ -967,14 +967,14 @@ namespace tut ensure_throws("no CA, with only a child cert", LLCertValidationTrustException, (*test_chain)[0], - test_chain->validate, + test_store->validate, VALIDATION_POLICY_TRUSTED, - test_store, + test_chain, validation_params); // validate without the trust flag. - test_chain->validate(0, test_store, validation_params); + test_store->validate(0, test_chain, validation_params); // clear out the store test_store = new LLBasicCertificateStore("mycertstore.pem"); @@ -983,9 +983,9 @@ namespace tut ensure_throws("no CA, with child and intermediate certs", LLCertValidationTrustException, (*test_chain)[1], - test_chain->validate, + test_store->validate, VALIDATION_POLICY_TRUSTED, - test_store, + test_chain, validation_params); // validate without the trust flag test_chain->validate(0, test_store, validation_params); @@ -994,7 +994,7 @@ namespace tut LLSD child_info = (*test_chain)[0]->getLLSD(); validation_params = LLSD::emptyMap(); validation_params[CERT_VALIDATION_DATE] = LLDate(child_info[CERT_VALID_FROM].asDate().secondsSinceEpoch() + 1.0); - test_chain->validate(VALIDATION_POLICY_TIME, test_store, validation_params); + test_store->validate(VALIDATION_POLICY_TIME, test_chain, validation_params); validation_params = LLSD::emptyMap(); validation_params[CERT_VALIDATION_DATE] = child_info[CERT_VALID_FROM].asDate(); @@ -1005,9 +1005,9 @@ namespace tut ensure_throws("Child cert not yet valid" , LLCertValidationExpirationException, (*test_chain)[0], - test_chain->validate, + test_store->validate, VALIDATION_POLICY_TIME, - test_store, + test_chain, validation_params); validation_params = LLSD::emptyMap(); validation_params[CERT_VALIDATION_DATE] = LLDate(child_info[CERT_VALID_TO].asDate().secondsSinceEpoch() + 1.0); @@ -1016,9 +1016,9 @@ namespace tut ensure_throws("Child cert expired", LLCertValidationExpirationException, (*test_chain)[0], - test_chain->validate, + test_store->validate, VALIDATION_POLICY_TIME, - test_store, + test_chain, validation_params); // test SSL KU @@ -1026,7 +1026,7 @@ namespace tut test_chain = new LLBasicCertificateChain(NULL); test_chain->add(new LLBasicCertificate(mX509ChildCert)); test_chain->add(new LLBasicCertificate(mX509IntermediateCert)); - test_chain->validate(VALIDATION_POLICY_SSL_KU, test_store, validation_params); + test_store->validate(VALIDATION_POLICY_SSL_KU, test_chain, validation_params); test_chain = new LLBasicCertificateChain(NULL); test_chain->add(new LLBasicCertificate(mX509TestCert)); @@ -1034,9 +1034,9 @@ namespace tut ensure_throws("Cert doesn't have ku", LLCertKeyUsageValidationException, (*test_chain)[0], - test_chain->validate, + test_store->validate, VALIDATION_POLICY_SSL_KU, - test_store, + test_chain, validation_params); // test sha1RSA validation @@ -1044,7 +1044,7 @@ namespace tut test_chain->add(new LLBasicCertificate(mSha1RSATestCert)); test_chain->add(new LLBasicCertificate(mSha1RSATestCA)); - test_chain->validate(0, test_store, validation_params); + test_store->validate(0, test_chain, validation_params); } }; -- 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(-) (limited to 'indra') 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 a7d1c68c787fcccf888632b9787c4cc9b30393f7 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Mon, 24 May 2010 15:31:10 -0700 Subject: Fixup some certificate related unit tests --- indra/newview/llsechandler_basic.cpp | 2 +- indra/newview/tests/llsechandler_basic_test.cpp | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp index 84ab9b9175..a81cde3126 100644 --- a/indra/newview/llsechandler_basic.cpp +++ b/indra/newview/llsechandler_basic.cpp @@ -1153,7 +1153,7 @@ void LLBasicCertificateStore::validate(int validation_policy, previous_cert = (*current_cert); current_cert++; depth++; - if(current_cert != current_cert != cert_chain->end()) + if(current_cert != cert_chain->end()) { (*current_cert)->getLLSD(current_cert_info); } diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp index d1330e2270..dfbd596d39 100644 --- a/indra/newview/tests/llsechandler_basic_test.cpp +++ b/indra/newview/tests/llsechandler_basic_test.cpp @@ -328,7 +328,8 @@ namespace tut ensure_equals("Der Format is correct", memcmp(buffer, mDerFormat.c_str(), mDerFormat.length()), 0); - LLSD llsd_cert = test_cert->getLLSD(); + LLSD llsd_cert; + test_cert->getLLSD(llsd_cert); std::ostringstream llsd_value; llsd_value << LLSDOStreamer(llsd_cert) << std::endl; std::string llsd_cert_str = llsd_value.str(); @@ -988,10 +989,11 @@ namespace tut test_chain, validation_params); // validate without the trust flag - test_chain->validate(0, test_store, validation_params); + test_store->validate(0, test_chain, validation_params); // Test time validity - LLSD child_info = (*test_chain)[0]->getLLSD(); + LLSD child_info; + ((*test_chain)[0])->getLLSD(child_info); validation_params = LLSD::emptyMap(); validation_params[CERT_VALIDATION_DATE] = LLDate(child_info[CERT_VALID_FROM].asDate().secondsSinceEpoch() + 1.0); test_store->validate(VALIDATION_POLICY_TIME, test_chain, validation_params); -- cgit v1.2.3 From 32ad37b3f7ca48564bd15de2664f323ad4a2d367 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Mon, 24 May 2010 16:21:29 -0700 Subject: Few more touchups for the cert performance code --- indra/newview/llsechandler_basic.cpp | 5 ++--- indra/newview/tests/llsechandler_basic_test.cpp | 10 +++++++++- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp index a81cde3126..5f24d4398a 100644 --- a/indra/newview/llsechandler_basic.cpp +++ b/indra/newview/llsechandler_basic.cpp @@ -1006,7 +1006,7 @@ void LLBasicCertificateStore::validate(int validation_policy, const LLSD& validation_params) { - if(size() < 1) + if(cert_chain->size() < 1) { throw LLCertException(NULL, "No certs in chain"); } @@ -1160,9 +1160,8 @@ void LLBasicCertificateStore::validate(int validation_policy, } if (validation_policy & VALIDATION_POLICY_TRUSTED) { - LLPointer untrusted_ca_cert = (*this)[size()-1]; // we reached the end without finding a trusted cert. - throw LLCertValidationTrustException((*this)[size()-1]); + throw LLCertValidationTrustException((*cert_chain)[cert_chain->size()-1]); } mTrustedCertCache[sha1_hash] = std::pair(from_time, to_time); diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp index dfbd596d39..df0673a159 100644 --- a/indra/newview/tests/llsechandler_basic_test.cpp +++ b/indra/newview/tests/llsechandler_basic_test.cpp @@ -963,8 +963,15 @@ namespace tut // basic failure cases test_chain = new LLBasicCertificateChain(NULL); - //validate with only the child cert + //validate with only the child cert in chain, but child cert was previously + // trusted test_chain->add(new LLBasicCertificate(mX509ChildCert)); + + // validate without the trust flag. + test_store->validate(VALIDATION_POLICY_TRUSTED, test_chain, validation_params); + + // Validate with child cert but no parent, and no parent in CA store + test_store = new LLBasicCertificateStore("mycertstore.pem"); ensure_throws("no CA, with only a child cert", LLCertValidationTrustException, (*test_chain)[0], @@ -1033,6 +1040,7 @@ namespace tut test_chain = new LLBasicCertificateChain(NULL); test_chain->add(new LLBasicCertificate(mX509TestCert)); + test_store = new LLBasicCertificateStore("mycertstore.pem"); ensure_throws("Cert doesn't have ku", LLCertKeyUsageValidationException, (*test_chain)[0], -- 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(-) (limited to 'indra') 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(-) (limited to 'indra') 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(-) (limited to 'indra') 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(-) (limited to 'indra') 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(-) (limited to 'indra') 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 cca5aa48ae07a2d0e4f4a26e647b360c098cd831 Mon Sep 17 00:00:00 2001 From: karina Date: Wed, 26 May 2010 23:46:42 -0700 Subject: Add new mechanism for getting a unique machine id. --- indra/newview/CMakeLists.txt | 2 + indra/newview/llappviewer.cpp | 2 + indra/newview/llmachineid.cpp | 267 +++++++++++++++++++++ indra/newview/llmachineid.h | 56 +++++ indra/newview/llsechandler_basic.cpp | 19 +- indra/newview/llxmlrpctransaction.cpp | 6 +- .../newview/skins/default/xui/en/notifications.xml | 31 +++ indra/newview/tests/llsechandler_basic_test.cpp | 15 +- 8 files changed, 380 insertions(+), 18 deletions(-) create mode 100644 indra/newview/llmachineid.cpp create mode 100644 indra/newview/llmachineid.h (limited to 'indra') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index d77d53f6af..ec0116bd87 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -272,6 +272,7 @@ set(viewer_SOURCE_FILES lllogchat.cpp llloginhandler.cpp lllogininstance.cpp + llmachineid.cpp llmanip.cpp llmaniprotate.cpp llmanipscale.cpp @@ -787,6 +788,7 @@ set(viewer_HEADER_FILES lllogchat.h llloginhandler.h lllogininstance.h + llmachineid.h llmanip.h llmaniprotate.h llmanipscale.h diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f7f7cb599e..5756eade87 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -195,6 +195,7 @@ // Include for security api initialization #include "llsecapi.h" +#include "llmachineid.h" // *FIX: These extern globals should be cleaned up. // The globals either represent state/config/resource-storage of either @@ -619,6 +620,7 @@ bool LLAppViewer::init() // *NOTE:Mani - LLCurl::initClass is not thread safe. // Called before threads are created. LLCurl::initClass(); + LLMachineID::init(); initThreads(); writeSystemInfo(); diff --git a/indra/newview/llmachineid.cpp b/indra/newview/llmachineid.cpp new file mode 100644 index 0000000000..b691baaf08 --- /dev/null +++ b/indra/newview/llmachineid.cpp @@ -0,0 +1,267 @@ +/** + * @file llmachineid.cpp + * @brief retrieves unique machine ids + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" +#include "lluuid.h" +#include "llmachineid.h" +#define _WIN32_DCOM +#include +using namespace std; +#include +#include + +unsigned char static_unique_id[] = {0,0,0,0,0,0}; +bool static has_static_unique_id = false; + +// get an unique machine id. +// NOT THREAD SAFE - do before setting up threads. +// MAC Address doesn't work for Windows 7 since the first returned hardware MAC address changes with each reboot, Go figure?? + +S32 LLMachineID::init() +{ + memset(static_unique_id,0,sizeof(static_unique_id)); + size_t len = sizeof(static_unique_id); + S32 ret_code = 0; +#if LL_WINDOWS +# pragma comment(lib, "wbemuuid.lib") + + // algorithm to detect BIOS serial number found at: + // http://msdn.microsoft.com/en-us/library/aa394077%28VS.85%29.aspx + // we can't use the MAC address since on Windows 7, the first returned MAC address changes with every reboot. + + + HRESULT hres; + + // Step 1: -------------------------------------------------- + // Initialize COM. ------------------------------------------ + + hres = CoInitializeEx(0, COINIT_MULTITHREADED); + if (FAILED(hres)) + { + LL_DEBUGS("AppInit") << "Failed to initialize COM library. Error code = 0x" << hex << hres << LL_ENDL; + return 1; // Program has failed. + } + + // Step 2: -------------------------------------------------- + // Set general COM security levels -------------------------- + // Note: If you are using Windows 2000, you need to specify - + // the default authentication credentials for a user by using + // a SOLE_AUTHENTICATION_LIST structure in the pAuthList ---- + // parameter of CoInitializeSecurity ------------------------ + + hres = CoInitializeSecurity( + NULL, + -1, // COM authentication + NULL, // Authentication services + NULL, // Reserved + RPC_C_AUTHN_LEVEL_DEFAULT, // Default authentication + RPC_C_IMP_LEVEL_IMPERSONATE, // Default Impersonation + NULL, // Authentication info + EOAC_NONE, // Additional capabilities + NULL // Reserved + ); + + + if (FAILED(hres)) + { + LL_DEBUGS("AppInit") << "Failed to initialize security. Error code = 0x" << hex << hres << LL_ENDL; + CoUninitialize(); + return 1; // Program has failed. + } + + // Step 3: --------------------------------------------------- + // Obtain the initial locator to WMI ------------------------- + + IWbemLocator *pLoc = NULL; + + hres = CoCreateInstance( + CLSID_WbemLocator, + 0, + CLSCTX_INPROC_SERVER, + IID_IWbemLocator, (LPVOID *) &pLoc); + + if (FAILED(hres)) + { + LL_DEBUGS("AppInit") << "Failed to create IWbemLocator object." << " Err code = 0x" << hex << hres << LL_ENDL; + CoUninitialize(); + return 1; // Program has failed. + } + + // Step 4: ----------------------------------------------------- + // Connect to WMI through the IWbemLocator::ConnectServer method + + IWbemServices *pSvc = NULL; + + // Connect to the root\cimv2 namespace with + // the current user and obtain pointer pSvc + // to make IWbemServices calls. + hres = pLoc->ConnectServer( + _bstr_t(L"ROOT\\CIMV2"), // Object path of WMI namespace + NULL, // User name. NULL = current user + NULL, // User password. NULL = current + 0, // Locale. NULL indicates current + NULL, // Security flags. + 0, // Authority (e.g. Kerberos) + 0, // Context object + &pSvc // pointer to IWbemServices proxy + ); + + if (FAILED(hres)) + { + LL_DEBUGS("AppInit") << "Could not connect. Error code = 0x" << hex << hres << LL_ENDL; + pLoc->Release(); + CoUninitialize(); + return 1; // Program has failed. + } + + LL_DEBUGS("AppInit") << "Connected to ROOT\\CIMV2 WMI namespace" << LL_ENDL; + + + // Step 5: -------------------------------------------------- + // Set security levels on the proxy ------------------------- + + hres = CoSetProxyBlanket( + pSvc, // Indicates the proxy to set + RPC_C_AUTHN_WINNT, // RPC_C_AUTHN_xxx + RPC_C_AUTHZ_NONE, // RPC_C_AUTHZ_xxx + NULL, // Server principal name + RPC_C_AUTHN_LEVEL_CALL, // RPC_C_AUTHN_LEVEL_xxx + RPC_C_IMP_LEVEL_IMPERSONATE, // RPC_C_IMP_LEVEL_xxx + NULL, // client identity + EOAC_NONE // proxy capabilities + ); + + if (FAILED(hres)) + { + LL_DEBUGS("AppInit") << "Could not set proxy blanket. Error code = 0x" << hex << hres << LL_ENDL; + pSvc->Release(); + pLoc->Release(); + CoUninitialize(); + return 1; // Program has failed. + } + + // Step 6: -------------------------------------------------- + // Use the IWbemServices pointer to make requests of WMI ---- + + // For example, get the name of the operating system + IEnumWbemClassObject* pEnumerator = NULL; + hres = pSvc->ExecQuery( + bstr_t("WQL"), + bstr_t("SELECT * FROM Win32_OperatingSystem"), + WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY, + NULL, + &pEnumerator); + + if (FAILED(hres)) + { + LL_DEBUGS("AppInit") << "Query for operating system name failed." << " Error code = 0x" << hex << hres << LL_ENDL; + pSvc->Release(); + pLoc->Release(); + CoUninitialize(); + return 1; // Program has failed. + } + + // Step 7: ------------------------------------------------- + // Get the data from the query in step 6 ------------------- + + IWbemClassObject *pclsObj = NULL; + ULONG uReturn = 0; + + while (pEnumerator) + { + HRESULT hr = pEnumerator->Next(WBEM_INFINITE, 1, + &pclsObj, &uReturn); + + if(0 == uReturn) + { + break; + } + + VARIANT vtProp; + + // Get the value of the Name property + hr = pclsObj->Get(L"SerialNumber", 0, &vtProp, 0, 0); + LL_DEBUGS("AppInit") << " Serial Number : " << vtProp.bstrVal << LL_ENDL; + // use characters in the returned Serial Number to create a byte array of size len + BSTR serialNumber ( vtProp.bstrVal); + unsigned int j = 0; + while( vtProp.bstrVal[j] != 0) + { + for (unsigned int i = 0; i < len; i++) + { + if (vtProp.bstrVal[j] == 0) + break; + + static_unique_id[i] = (unsigned int)(static_unique_id[i] + serialNumber[j]); + j++; + } + } + VariantClear(&vtProp); + + pclsObj->Release(); + pclsObj = NULL; + break; + } + + // Cleanup + // ======== + + if (pSvc) + pSvc->Release(); + if (pLoc) + pLoc->Release(); + if (pEnumerator) + pEnumerator->Release(); + CoUninitialize(); + ret_code=0; +#else + ret_code = LLUUID::getNodeID(&static_unique_id); +#endif + has_static_unique_id = true; + return ret_code; +} + + +S32 LLMachineID::getUniqueID(unsigned char *unique_id, size_t len) +{ + if (has_static_unique_id) + { + memcpy ( unique_id, &static_unique_id, len); + LL_DEBUGS("AppInit") << "UniqueID: " << unique_id[0] << unique_id[1]<< unique_id[2] << unique_id[3] << unique_id[4] << unique_id [5] << LL_ENDL; + return 1; + } + return 0; +} + + + + diff --git a/indra/newview/llmachineid.h b/indra/newview/llmachineid.h new file mode 100644 index 0000000000..8160309b47 --- /dev/null +++ b/indra/newview/llmachineid.h @@ -0,0 +1,56 @@ +/** + * @file llmachineid.h + * @brief retrieves unique machine ids + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLMACHINEID_H +#define LL_LLMACHINEID_H + + +class LLMachineID +{ +public: + LLMachineID(); + virtual ~LLMachineID(); + static S32 getUniqueID(unsigned char *unique_id, size_t len); + static S32 init(); + +protected: + +private: + + +}; + + + + + +#endif // LL_LLMACHINEID_H diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp index edf5ce9b60..c006f4dd0d 100644 --- a/indra/newview/llsechandler_basic.cpp +++ b/indra/newview/llsechandler_basic.cpp @@ -52,6 +52,7 @@ LLS * By copying, modifying or distributing this software, you acknowledge #include #include #include +#include "llmachineid.h" @@ -1195,9 +1196,9 @@ void LLSecAPIBasicHandler::_readProtectedData() U8 buffer[BUFFER_READ_SIZE]; U8 decrypted_buffer[BUFFER_READ_SIZE]; int decrypted_length; - unsigned char MACAddress[MAC_ADDRESS_BYTES]; - LLUUID::getNodeID(MACAddress); - LLXORCipher cipher(MACAddress, MAC_ADDRESS_BYTES); + unsigned char unique_id[MAC_ADDRESS_BYTES]; + LLMachineID::getUniqueID(unique_id, sizeof(unique_id)); + LLXORCipher cipher(unique_id, sizeof(unique_id)); // read in the salt and key protected_data_stream.read((char *)salt, STORE_SALT_SIZE); @@ -1281,9 +1282,9 @@ void LLSecAPIBasicHandler::_writeProtectedData() EVP_CIPHER_CTX ctx; EVP_CIPHER_CTX_init(&ctx); EVP_EncryptInit(&ctx, EVP_rc4(), salt, NULL); - unsigned char MACAddress[MAC_ADDRESS_BYTES]; - LLUUID::getNodeID(MACAddress); - LLXORCipher cipher(MACAddress, MAC_ADDRESS_BYTES); + unsigned char unique_id[MAC_ADDRESS_BYTES]; + LLMachineID::getUniqueID(unique_id, sizeof(unique_id)); + LLXORCipher cipher(unique_id, sizeof(unique_id)); cipher.encrypt(salt, STORE_SALT_SIZE); protected_data_stream.write((const char *)salt, STORE_SALT_SIZE); @@ -1501,9 +1502,9 @@ std::string LLSecAPIBasicHandler::_legacyLoadPassword() } // Decipher with MAC address - unsigned char MACAddress[MAC_ADDRESS_BYTES]; - LLUUID::getNodeID(MACAddress); - LLXORCipher cipher(MACAddress, 6); + unsigned char unique_id[MAC_ADDRESS_BYTES]; + LLMachineID::getUniqueID(unique_id, sizeof(unique_id)); + LLXORCipher cipher(unique_id, sizeof(unique_id)); cipher.decrypt(&buffer[0], buffer.size()); return std::string((const char*)&buffer[0], buffer.size()); diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index da61840761..58ba9e1378 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -514,7 +514,9 @@ void LLXMLRPCTransaction::Impl::setStatus(EStatus status, "Despite our best efforts, something unexpected has gone wrong. \n" " \n" "Please check secondlife.com/status \n" - "to see if there is a known problem with the service."; + "to see if there is a known problem with the service.\n" + "If you continue to experience problems," + "Please check your network and firewall setup.\n"; mStatusURI = "http://secondlife.com/status/"; } @@ -550,7 +552,7 @@ void LLXMLRPCTransaction::Impl::setCurlStatus(CURLcode code) "Often this means that your computer\'s clock is set incorrectly.\n" "Please go to Control Panels and make sure the time and date\n" "are set correctly.\n" - "\n" + "Also check that your network and firewall are setup correctly.\n" "If you continue to receive this error, please go\n" "to the Support section of the SecondLife.com web site\n" "and report the problem."; diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 999f804e71..b9aec7dd63 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -6182,6 +6182,37 @@ Avatar '[NAME]' entered appearance mode. Avatar '[NAME]' left appearance mode. + + We're having trouble connecting using [PROTOCOL] [HOSTID]. + Please check your network and firewall setup. +
+
- - - - - - - - - - - - - + + + + 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(-) (limited to 'indra') 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(-) (limited to 'indra') 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(-) (limited to 'indra') 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(+) (limited to 'indra') 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(+) (limited to 'indra') 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(+) (limited to 'indra') 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(-) (limited to 'indra') 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(-) (limited to 'indra') 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(+) (limited to 'indra') 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(-) (limited to 'indra') 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(-) (limited to 'indra') 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 From 0b96ae29cf0b2baf4732e09a28a5f76d3df05727 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 28 May 2010 14:02:44 -0400 Subject: Fixed linux compile error due to missing forward declare in lltextureview.h. --- indra/newview/lltextureview.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/lltextureview.h b/indra/newview/lltextureview.h index 6072cd3f11..dfd9c42c2c 100644 --- a/indra/newview/lltextureview.h +++ b/indra/newview/lltextureview.h @@ -38,6 +38,7 @@ class LLViewerFetchedTexture; class LLTextureBar; class LLGLTexMemBar; +class LLAvatarTexBar; class LLTextureView : public LLContainerView { -- cgit v1.2.3 From 3f5abfb2bf58032242d6c24328463558a1828b20 Mon Sep 17 00:00:00 2001 From: Eli Linden Date: Fri, 28 May 2010 11:47:38 -0700 Subject: ND-46735 WIP FR JA linguistic --- .../newview/skins/default/xui/fr/floater_preview_gesture.xml | 12 ++++++------ indra/newview/skins/default/xui/fr/floater_tools.xml | 2 +- indra/newview/skins/default/xui/fr/notifications.xml | 2 +- indra/newview/skins/default/xui/fr/panel_edit_pick.xml | 4 ++-- .../skins/default/xui/fr/panel_group_control_panel.xml | 2 +- indra/newview/skins/default/xui/fr/panel_group_notices.xml | 6 +++--- indra/newview/skins/default/xui/fr/panel_notes.xml | 2 +- indra/newview/skins/default/xui/fr/panel_people.xml | 2 +- .../skins/default/xui/fr/panel_preferences_advanced.xml | 2 +- indra/newview/skins/default/xui/fr/panel_profile.xml | 2 +- indra/newview/skins/default/xui/fr/strings.xml | 2 +- .../newview/skins/default/xui/ja/floater_avatar_textures.xml | 2 +- indra/newview/skins/default/xui/ja/floater_god_tools.xml | 2 +- indra/newview/skins/default/xui/ja/floater_moveview.xml | 12 ++++++------ indra/newview/skins/default/xui/ja/menu_avatar_self.xml | 4 ++-- .../skins/default/xui/ja/panel_bodyparts_list_button_bar.xml | 4 ++-- .../skins/default/xui/ja/panel_clothing_list_button_bar.xml | 2 +- indra/newview/skins/default/xui/ja/panel_edit_shape.xml | 2 +- indra/newview/skins/default/xui/ja/panel_region_general.xml | 2 +- indra/newview/skins/default/xui/ja/panel_region_texture.xml | 4 ++-- 20 files changed, 36 insertions(+), 36 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/fr/floater_preview_gesture.xml b/indra/newview/skins/default/xui/fr/floater_preview_gesture.xml index 7133f8754c..1d164ac661 100644 --- a/indra/newview/skins/default/xui/fr/floater_preview_gesture.xml +++ b/indra/newview/skins/default/xui/fr/floater_preview_gesture.xml @@ -31,10 +31,10 @@ Description : - Déclencheur : + Déclench. : - Remplacer par : + Rempl. par : @@ -50,20 +50,20 @@ Étapes : -