From 27e74d25a1827ea875f18f057a13e8c3c086c944 Mon Sep 17 00:00:00 2001 From: "Aaron Terrell (Enus)" Date: Tue, 24 Aug 2010 22:26:07 -0700 Subject: fixing test names for reporting purposes - removing ' test'. also, updated docs to remove that naming schema --- indra/llprimitive/tests/llmediaentry_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/tests/llmediaentry_test.cpp b/indra/llprimitive/tests/llmediaentry_test.cpp index 5234ea25f9..16e5f894e2 100644 --- a/indra/llprimitive/tests/llmediaentry_test.cpp +++ b/indra/llprimitive/tests/llmediaentry_test.cpp @@ -169,7 +169,7 @@ namespace tut namespace { // this is for naming our tests to make pretty output - tut::factory tf("MediaEntry Test"); + tut::factory tf("LLMediaEntry"); } namespace tut -- cgit v1.3 From 48743cbd41ab56b42959c47de8f5451f85741fbb Mon Sep 17 00:00:00 2001 From: "Aaron Terrell (Enus)" Date: Tue, 24 Aug 2010 23:41:47 -0700 Subject: standardizing test suite names as class name under test --- indra/llcharacter/tests/lljoint_test.cpp | 2 +- indra/llcommon/tests/bitpack_test.cpp | 2 +- indra/llcommon/tests/commonmisc_test.cpp | 6 +++--- indra/llcommon/tests/llbase64_test.cpp | 2 +- indra/llcommon/tests/lldate_test.cpp | 2 +- indra/llcommon/tests/lldependencies_test.cpp | 2 +- indra/llcommon/tests/llframetimer_test.cpp | 2 +- indra/llcommon/tests/llprocessor_test.cpp | 2 +- indra/llcommon/tests/llrand_test.cpp | 2 +- indra/llcommon/tests/llsdserialize_test.cpp | 2 +- indra/llcommon/tests/llstring_test.cpp | 2 +- indra/llcommon/tests/lltreeiterators_test.cpp | 2 +- indra/llcommon/tests/stringize_test.cpp | 2 +- indra/llimage/tests/llimageworker_test.cpp | 4 ++-- indra/llinventory/tests/inventorymisc_test.cpp | 2 +- indra/llinventory/tests/llparcel_test.cpp | 2 +- indra/llmath/tests/llmodularmath_test.cpp | 2 +- indra/llmath/tests/llquaternion_test.cpp | 2 +- indra/llmath/tests/m3math_test.cpp | 2 +- indra/llmath/tests/mathmisc_test.cpp | 6 +++--- indra/llmath/tests/v2math_test.cpp | 2 +- indra/llmath/tests/v3color_test.cpp | 2 +- indra/llmath/tests/v3dmath_test.cpp | 2 +- indra/llmath/tests/v3math_test.cpp | 2 +- indra/llmath/tests/v4color_test.cpp | 2 +- indra/llmath/tests/v4coloru_test.cpp | 2 +- indra/llmath/tests/v4math_test.cpp | 2 +- indra/llmath/tests/xform_test.cpp | 2 +- indra/llmessage/tests/llhost_test.cpp | 2 +- indra/llmessage/tests/llmime_test.cpp | 4 ++-- indra/llmessage/tests/llnamevalue_test.cpp | 2 +- indra/llmessage/tests/llpartdata_test.cpp | 2 +- indra/llmessage/tests/llxfer_file_test.cpp | 2 +- indra/llprimitive/tests/llprimitive_test.cpp | 2 +- indra/newview/tests/llagentaccess_test.cpp | 2 +- indra/newview/tests/lldateutil_test.cpp | 2 +- indra/newview/tests/llmediadataclient_test.cpp | 2 +- indra/newview/tests/llsecapi_test.cpp | 2 +- indra/newview/tests/llsechandler_basic_test.cpp | 2 +- indra/newview/tests/llslurl_test.cpp | 2 +- indra/newview/tests/lltextureinfo_test.cpp | 2 +- indra/newview/tests/lltextureinfodetails_test.cpp | 2 +- indra/newview/tests/lltexturestatsuploader_test.cpp | 2 +- indra/newview/tests/llviewerhelputil_test.cpp | 2 +- indra/newview/tests/llviewernetwork_test.cpp | 2 +- indra/newview/tests/llworldmap_test.cpp | 6 +++--- indra/newview/tests/llworldmipmap_test.cpp | 2 +- 47 files changed, 55 insertions(+), 55 deletions(-) (limited to 'indra/llprimitive') diff --git a/indra/llcharacter/tests/lljoint_test.cpp b/indra/llcharacter/tests/lljoint_test.cpp index 1c861b390a..e92aa832d6 100644 --- a/indra/llcharacter/tests/lljoint_test.cpp +++ b/indra/llcharacter/tests/lljoint_test.cpp @@ -42,7 +42,7 @@ namespace tut }; typedef test_group lljoint_test; typedef lljoint_test::object lljoint_object; - tut::lljoint_test lljoint_testcase("lljoint"); + tut::lljoint_test lljoint_testcase("LLJoint"); template<> template<> void lljoint_object::test<1>() diff --git a/indra/llcommon/tests/bitpack_test.cpp b/indra/llcommon/tests/bitpack_test.cpp index a74b5ebc3a..05289881d0 100644 --- a/indra/llcommon/tests/bitpack_test.cpp +++ b/indra/llcommon/tests/bitpack_test.cpp @@ -40,7 +40,7 @@ namespace tut }; typedef test_group bit_pack_t; typedef bit_pack_t::object bit_pack_object_t; - tut::bit_pack_t tut_bit_pack("bitpack"); + tut::bit_pack_t tut_bit_pack("LLBitPack"); // pack -> unpack template<> template<> diff --git a/indra/llcommon/tests/commonmisc_test.cpp b/indra/llcommon/tests/commonmisc_test.cpp index 390e3719cf..b115c153c1 100644 --- a/indra/llcommon/tests/commonmisc_test.cpp +++ b/indra/llcommon/tests/commonmisc_test.cpp @@ -59,7 +59,7 @@ namespace tut }; typedef test_group sd_test; typedef sd_test::object sd_object; - tut::sd_test sd("llsd"); + tut::sd_test sd("LLSD"); template<> template<> void sd_object::test<1>() @@ -450,7 +450,7 @@ namespace tut }; typedef test_group mem_test; typedef mem_test::object mem_object; - tut::mem_test mem_stream("memory_stream"); + tut::mem_test mem_stream("LLMemoryStream"); template<> template<> void mem_object::test<1>() @@ -643,7 +643,7 @@ namespace tut }; typedef test_group hash_test; typedef hash_test::object hash_object; - tut::hash_test hash_tester("hash_test"); + tut::hash_test hash_tester("LLHash"); template<> template<> void hash_object::test<1>() diff --git a/indra/llcommon/tests/llbase64_test.cpp b/indra/llcommon/tests/llbase64_test.cpp index 70036dc186..d0394150fa 100644 --- a/indra/llcommon/tests/llbase64_test.cpp +++ b/indra/llcommon/tests/llbase64_test.cpp @@ -41,7 +41,7 @@ namespace tut }; typedef test_group base64_test; typedef base64_test::object base64_object; - tut::base64_test base64("base64"); + tut::base64_test base64("LLBase64"); template<> template<> void base64_object::test<1>() diff --git a/indra/llcommon/tests/lldate_test.cpp b/indra/llcommon/tests/lldate_test.cpp index a8bfda5424..7c95ccb91f 100644 --- a/indra/llcommon/tests/lldate_test.cpp +++ b/indra/llcommon/tests/lldate_test.cpp @@ -71,7 +71,7 @@ namespace tut }; typedef test_group date_test_t; typedef date_test_t::object date_test_object_t; - tut::date_test_t tut_date_test("date_test"); + tut::date_test_t tut_date_test("LLDate"); /* format validation */ template<> template<> diff --git a/indra/llcommon/tests/lldependencies_test.cpp b/indra/llcommon/tests/lldependencies_test.cpp index e4e30a33ec..e40743ccf7 100644 --- a/indra/llcommon/tests/lldependencies_test.cpp +++ b/indra/llcommon/tests/lldependencies_test.cpp @@ -145,7 +145,7 @@ namespace tut }; typedef test_group deps_group; typedef deps_group::object deps_object; - tut::deps_group depsgr("lldependencies"); + tut::deps_group depsgr("LLDependencies"); template<> template<> void deps_object::test<1>() diff --git a/indra/llcommon/tests/llframetimer_test.cpp b/indra/llcommon/tests/llframetimer_test.cpp index 215dde7e70..8ac1c91a3a 100644 --- a/indra/llcommon/tests/llframetimer_test.cpp +++ b/indra/llcommon/tests/llframetimer_test.cpp @@ -43,7 +43,7 @@ namespace tut }; typedef test_group frametimer_group_t; typedef frametimer_group_t::object frametimer_object_t; - tut::frametimer_group_t frametimer_instance("frametimer"); + tut::frametimer_group_t frametimer_instance("LLFrameTimer"); template<> template<> void frametimer_object_t::test<1>() diff --git a/indra/llcommon/tests/llprocessor_test.cpp b/indra/llcommon/tests/llprocessor_test.cpp index 14adcc7303..884e1b5e5b 100644 --- a/indra/llcommon/tests/llprocessor_test.cpp +++ b/indra/llcommon/tests/llprocessor_test.cpp @@ -38,7 +38,7 @@ namespace tut typedef test_group processor_t; typedef processor_t::object processor_object_t; - tut::processor_t tut_processor("processor"); + tut::processor_t tut_processor("LLProcessor"); template<> template<> void processor_object_t::test<1>() diff --git a/indra/llcommon/tests/llrand_test.cpp b/indra/llcommon/tests/llrand_test.cpp index a21159d47e..383e6f9e0a 100644 --- a/indra/llcommon/tests/llrand_test.cpp +++ b/indra/llcommon/tests/llrand_test.cpp @@ -39,7 +39,7 @@ namespace tut typedef test_group random_t; typedef random_t::object random_object_t; - tut::random_t tut_random("random"); + tut::random_t tut_random("LLSeedRand"); template<> template<> void random_object_t::test<1>() diff --git a/indra/llcommon/tests/llsdserialize_test.cpp b/indra/llcommon/tests/llsdserialize_test.cpp index 9eaa307141..770443da1d 100644 --- a/indra/llcommon/tests/llsdserialize_test.cpp +++ b/indra/llcommon/tests/llsdserialize_test.cpp @@ -74,7 +74,7 @@ namespace tut typedef test_group sd_xml_test; typedef sd_xml_test::object sd_xml_object; - tut::sd_xml_test sd_xml_stream("sd_xml_serialization"); + tut::sd_xml_test sd_xml_stream("LLSDXMLFormatter"); template<> template<> void sd_xml_object::test<1>() diff --git a/indra/llcommon/tests/llstring_test.cpp b/indra/llcommon/tests/llstring_test.cpp index aa36aab0dc..304e91ed92 100644 --- a/indra/llcommon/tests/llstring_test.cpp +++ b/indra/llcommon/tests/llstring_test.cpp @@ -38,7 +38,7 @@ namespace tut }; typedef test_group string_index_t; typedef string_index_t::object string_index_object_t; - tut::string_index_t tut_string_index("string_test"); + tut::string_index_t tut_string_index("LLString"); template<> template<> void string_index_object_t::test<1>() diff --git a/indra/llcommon/tests/lltreeiterators_test.cpp b/indra/llcommon/tests/lltreeiterators_test.cpp index b0b4c7e0ad..1d619867d4 100644 --- a/indra/llcommon/tests/lltreeiterators_test.cpp +++ b/indra/llcommon/tests/lltreeiterators_test.cpp @@ -56,7 +56,7 @@ namespace tut }; typedef test_group iter_group; typedef iter_group::object iter_object; - tut::iter_group ig("lltreeiterators"); + tut::iter_group ig("LLTreeIterators"); } // namespace tut /***************************************************************************** diff --git a/indra/llcommon/tests/stringize_test.cpp b/indra/llcommon/tests/stringize_test.cpp index 757aa85ed7..3d34f23998 100644 --- a/indra/llcommon/tests/stringize_test.cpp +++ b/indra/llcommon/tests/stringize_test.cpp @@ -80,7 +80,7 @@ namespace tut }; typedef test_group stringize_group; typedef stringize_group::object stringize_object; - tut::stringize_group strzgrp("stringize"); + tut::stringize_group strzgrp("stringize_h"); template<> template<> void stringize_object::test<1>() diff --git a/indra/llimage/tests/llimageworker_test.cpp b/indra/llimage/tests/llimageworker_test.cpp index 98694aa7ee..a109276709 100644 --- a/indra/llimage/tests/llimageworker_test.cpp +++ b/indra/llimage/tests/llimageworker_test.cpp @@ -144,11 +144,11 @@ namespace tut // Tut templating thingamagic: test group, object and test instance typedef test_group imagedecodethread_t; typedef imagedecodethread_t::object imagedecodethread_object_t; - tut::imagedecodethread_t tut_imagedecodethread("imagedecodethread"); + tut::imagedecodethread_t tut_imagedecodethread("LLImageDecodeThread"); typedef test_group imagerequest_t; typedef imagerequest_t::object imagerequest_object_t; - tut::imagerequest_t tut_imagerequest("imagerequest"); + tut::imagerequest_t tut_imagerequest("LLImageRequest"); // --------------------------------------------------------------------------------------- // Test functions diff --git a/indra/llinventory/tests/inventorymisc_test.cpp b/indra/llinventory/tests/inventorymisc_test.cpp index 9773a3fed4..c9af7c4eac 100644 --- a/indra/llinventory/tests/inventorymisc_test.cpp +++ b/indra/llinventory/tests/inventorymisc_test.cpp @@ -100,7 +100,7 @@ namespace tut }; typedef test_group inventory_test; typedef inventory_test::object inventory_object; - tut::inventory_test inv("llinventory"); + tut::inventory_test inv("LLInventory"); //***class LLInventoryType***// diff --git a/indra/llinventory/tests/llparcel_test.cpp b/indra/llinventory/tests/llparcel_test.cpp index 80d0bdae5a..f2e4b03ff7 100644 --- a/indra/llinventory/tests/llparcel_test.cpp +++ b/indra/llinventory/tests/llparcel_test.cpp @@ -40,7 +40,7 @@ namespace tut }; typedef test_group llinventoryparcel_test; typedef llinventoryparcel_test::object llinventoryparcel_object; - tut::llinventoryparcel_test llinventoryparcel("llinventoryparcel"); + tut::llinventoryparcel_test llinventoryparcel("LLInventoryParcel"); template<> template<> void llinventoryparcel_object::test<1>() diff --git a/indra/llmath/tests/llmodularmath_test.cpp b/indra/llmath/tests/llmodularmath_test.cpp index e6525542f1..063d3ef79f 100644 --- a/indra/llmath/tests/llmodularmath_test.cpp +++ b/indra/llmath/tests/llmodularmath_test.cpp @@ -39,7 +39,7 @@ namespace tut }; typedef test_group modularmath_test; typedef modularmath_test::object modularmath_object; - tut::modularmath_test modularmath_testcase("modularmath"); + tut::modularmath_test modularmath_testcase("LLModularMath"); template<> template<> void modularmath_object::test<1>() diff --git a/indra/llmath/tests/llquaternion_test.cpp b/indra/llmath/tests/llquaternion_test.cpp index 29e7793d49..9e79b299ff 100644 --- a/indra/llmath/tests/llquaternion_test.cpp +++ b/indra/llmath/tests/llquaternion_test.cpp @@ -43,7 +43,7 @@ namespace tut }; typedef test_group llquat_test_t; typedef llquat_test_t::object llquat_test_object_t; - tut::llquat_test_t tut_llquat_test("llquat"); + tut::llquat_test_t tut_llquat_test("LLQuaternion"); //test case for LLQuaternion::LLQuaternion(void) fn. template<> template<> diff --git a/indra/llmath/tests/m3math_test.cpp b/indra/llmath/tests/m3math_test.cpp index 3b424f79c6..8abf61b740 100644 --- a/indra/llmath/tests/m3math_test.cpp +++ b/indra/llmath/tests/m3math_test.cpp @@ -44,7 +44,7 @@ namespace tut }; typedef test_group m3math_test_t; typedef m3math_test_t::object m3math_test_object_t; - tut::m3math_test_t tut_m3math_test("m3math_test"); + tut::m3math_test_t tut_m3math_test("m3math_h"); //test case for setIdentity() fn. template<> template<> diff --git a/indra/llmath/tests/mathmisc_test.cpp b/indra/llmath/tests/mathmisc_test.cpp index 58b78cd491..91a2e6c009 100644 --- a/indra/llmath/tests/mathmisc_test.cpp +++ b/indra/llmath/tests/mathmisc_test.cpp @@ -45,7 +45,7 @@ namespace tut }; typedef test_group math_test; typedef math_test::object math_object; - tut::math_test tm("basic_linden_math"); + tut::math_test tm("BasicLindenMath"); template<> template<> void math_object::test<1>() @@ -178,7 +178,7 @@ namespace tut }; typedef test_group uuid_test; typedef uuid_test::object uuid_object; - tut::uuid_test tu("uuid"); + tut::uuid_test tu("LLUUID"); template<> template<> void uuid_object::test<1>() @@ -233,7 +233,7 @@ namespace tut }; typedef test_group crc_test; typedef crc_test::object crc_object; - tut::crc_test tc("crc"); + tut::crc_test tc("LLCrc"); template<> template<> void crc_object::test<1>() diff --git a/indra/llmath/tests/v2math_test.cpp b/indra/llmath/tests/v2math_test.cpp index e112892c49..9747996b25 100644 --- a/indra/llmath/tests/v2math_test.cpp +++ b/indra/llmath/tests/v2math_test.cpp @@ -39,7 +39,7 @@ namespace tut }; typedef test_group v2math_test; typedef v2math_test::object v2math_object; - tut::v2math_test v2math_testcase("v2math"); + tut::v2math_test v2math_testcase("v2math_h"); template<> template<> void v2math_object::test<1>() diff --git a/indra/llmath/tests/v3color_test.cpp b/indra/llmath/tests/v3color_test.cpp index 4a05a84123..2c00f00ab3 100644 --- a/indra/llmath/tests/v3color_test.cpp +++ b/indra/llmath/tests/v3color_test.cpp @@ -39,7 +39,7 @@ namespace tut }; typedef test_group v3color_test; typedef v3color_test::object v3color_object; - tut::v3color_test v3color_testcase("v3color"); + tut::v3color_test v3color_testcase("v3color_h"); template<> template<> void v3color_object::test<1>() diff --git a/indra/llmath/tests/v3dmath_test.cpp b/indra/llmath/tests/v3dmath_test.cpp index 68bcbd124f..b67346f4e5 100644 --- a/indra/llmath/tests/v3dmath_test.cpp +++ b/indra/llmath/tests/v3dmath_test.cpp @@ -43,7 +43,7 @@ namespace tut }; typedef test_group v3dmath_test; typedef v3dmath_test::object v3dmath_object; - tut::v3dmath_test v3dmath_testcase("v3dmath"); + tut::v3dmath_test v3dmath_testcase("v3dmath_h"); template<> template<> void v3dmath_object::test<1>() diff --git a/indra/llmath/tests/v3math_test.cpp b/indra/llmath/tests/v3math_test.cpp index e6ef5d5012..e4732bf861 100644 --- a/indra/llmath/tests/v3math_test.cpp +++ b/indra/llmath/tests/v3math_test.cpp @@ -45,7 +45,7 @@ namespace tut }; typedef test_group v3math_test; typedef v3math_test::object v3math_object; - tut::v3math_test v3math_testcase("v3math"); + tut::v3math_test v3math_testcase("v3math_h"); template<> template<> void v3math_object::test<1>() diff --git a/indra/llmath/tests/v4color_test.cpp b/indra/llmath/tests/v4color_test.cpp index dde5f9069b..fbd43625d1 100644 --- a/indra/llmath/tests/v4color_test.cpp +++ b/indra/llmath/tests/v4color_test.cpp @@ -43,7 +43,7 @@ namespace tut }; typedef test_group v4color_test; typedef v4color_test::object v4color_object; - tut::v4color_test v4color_testcase("v4color"); + tut::v4color_test v4color_testcase("v4color_h"); template<> template<> void v4color_object::test<1>() diff --git a/indra/llmath/tests/v4coloru_test.cpp b/indra/llmath/tests/v4coloru_test.cpp index 1408d05b81..6d84ba41ef 100644 --- a/indra/llmath/tests/v4coloru_test.cpp +++ b/indra/llmath/tests/v4coloru_test.cpp @@ -42,7 +42,7 @@ namespace tut }; typedef test_group v4coloru_test; typedef v4coloru_test::object v4coloru_object; - tut::v4coloru_test v4coloru_testcase("v4coloru"); + tut::v4coloru_test v4coloru_testcase("v4coloru_h"); template<> template<> void v4coloru_object::test<1>() diff --git a/indra/llmath/tests/v4math_test.cpp b/indra/llmath/tests/v4math_test.cpp index 24c1af5e61..b1f934e555 100644 --- a/indra/llmath/tests/v4math_test.cpp +++ b/indra/llmath/tests/v4math_test.cpp @@ -41,7 +41,7 @@ namespace tut }; typedef test_group v4math_test; typedef v4math_test::object v4math_object; - tut::v4math_test v4math_testcase("v4math"); + tut::v4math_test v4math_testcase("v4math_h"); template<> template<> void v4math_object::test<1>() diff --git a/indra/llmath/tests/xform_test.cpp b/indra/llmath/tests/xform_test.cpp index 1337daa50a..49870eef3c 100644 --- a/indra/llmath/tests/xform_test.cpp +++ b/indra/llmath/tests/xform_test.cpp @@ -38,7 +38,7 @@ namespace tut }; typedef test_group xform_test_t; typedef xform_test_t::object xform_test_object_t; - tut::xform_test_t tut_xform_test("xform_test"); + tut::xform_test_t tut_xform_test("LLXForm"); //test case for init(), getParent(), getRotation(), getPositionW(), getWorldRotation() fns. template<> template<> diff --git a/indra/llmessage/tests/llhost_test.cpp b/indra/llmessage/tests/llhost_test.cpp index 36f819ad33..b20bceae1d 100644 --- a/indra/llmessage/tests/llhost_test.cpp +++ b/indra/llmessage/tests/llhost_test.cpp @@ -39,7 +39,7 @@ namespace tut }; typedef test_group host_test; typedef host_test::object host_object; - tut::host_test host_testcase("llhost"); + tut::host_test host_testcase("LLHost"); template<> template<> diff --git a/indra/llmessage/tests/llmime_test.cpp b/indra/llmessage/tests/llmime_test.cpp index 0616c070c4..aed5c4589c 100644 --- a/indra/llmessage/tests/llmime_test.cpp +++ b/indra/llmessage/tests/llmime_test.cpp @@ -41,7 +41,7 @@ namespace tut }; typedef test_group mime_index_t; typedef mime_index_t::object mime_index_object_t; - tut::mime_index_t tut_mime_index("mime_index"); + tut::mime_index_t tut_mime_index("LLMime"); template<> template<> void mime_index_object_t::test<1>() @@ -228,7 +228,7 @@ namespace tut }; typedef test_group mime_parse_t; typedef mime_parse_t::object mime_parse_object_t; - tut::mime_parse_t tut_mime_parse("mime_parse"); + tut::mime_parse_t tut_mime_parse("LLMimeParse"); template<> template<> void mime_parse_object_t::test<1>() diff --git a/indra/llmessage/tests/llnamevalue_test.cpp b/indra/llmessage/tests/llnamevalue_test.cpp index da22ec80ef..8902fdd2e8 100644 --- a/indra/llmessage/tests/llnamevalue_test.cpp +++ b/indra/llmessage/tests/llnamevalue_test.cpp @@ -49,7 +49,7 @@ namespace tut }; typedef test_group namevalue_t; typedef namevalue_t::object namevalue_object_t; - tut::namevalue_t tut_namevalue("namevalue_test"); + tut::namevalue_t tut_namevalue("LLNameValue"); template<> template<> diff --git a/indra/llmessage/tests/llpartdata_test.cpp b/indra/llmessage/tests/llpartdata_test.cpp index b26e7a5849..9123bd06c7 100644 --- a/indra/llmessage/tests/llpartdata_test.cpp +++ b/indra/llmessage/tests/llpartdata_test.cpp @@ -44,7 +44,7 @@ namespace tut }; typedef test_group partdata_test_t; typedef partdata_test_t::object partdata_test_object_t; - tut::partdata_test_t tut_partdata_test("partdata_test"); + tut::partdata_test_t tut_partdata_test("LLPartData"); template<> template<> void partdata_test_object_t::test<1>() diff --git a/indra/llmessage/tests/llxfer_file_test.cpp b/indra/llmessage/tests/llxfer_file_test.cpp index 081f898417..a8c1adf9b4 100644 --- a/indra/llmessage/tests/llxfer_file_test.cpp +++ b/indra/llmessage/tests/llxfer_file_test.cpp @@ -38,7 +38,7 @@ namespace tut }; typedef test_group llxfer_test; typedef llxfer_test::object llxfer_object; - tut::llxfer_test llxfer("llxfer"); + tut::llxfer_test llxfer("LLXferFile"); template<> template<> void llxfer_object::test<1>() diff --git a/indra/llprimitive/tests/llprimitive_test.cpp b/indra/llprimitive/tests/llprimitive_test.cpp index e181a59dd6..0d60c7cd15 100644 --- a/indra/llprimitive/tests/llprimitive_test.cpp +++ b/indra/llprimitive/tests/llprimitive_test.cpp @@ -96,7 +96,7 @@ namespace tut typedef test_group llprimitive_t; typedef llprimitive_t::object llprimitive_object_t; - tut::llprimitive_t tut_llprimitive("llprimitive"); + tut::llprimitive_t tut_llprimitive("LLPrimitive"); template<> template<> void llprimitive_object_t::test<1>() diff --git a/indra/newview/tests/llagentaccess_test.cpp b/indra/newview/tests/llagentaccess_test.cpp index a0a9659475..c970d79975 100644 --- a/indra/newview/tests/llagentaccess_test.cpp +++ b/indra/newview/tests/llagentaccess_test.cpp @@ -74,7 +74,7 @@ namespace tut typedef test_group agentaccess_t; typedef agentaccess_t::object agentaccess_object_t; - tut::agentaccess_t tut_agentaccess("agentaccess"); + tut::agentaccess_t tut_agentaccess("LLAgentAccess"); template<> template<> void agentaccess_object_t::test<1>() diff --git a/indra/newview/tests/lldateutil_test.cpp b/indra/newview/tests/lldateutil_test.cpp index 530171b87e..99b346cff8 100644 --- a/indra/newview/tests/lldateutil_test.cpp +++ b/indra/newview/tests/lldateutil_test.cpp @@ -103,7 +103,7 @@ namespace tut typedef test_group dateutil_t; typedef dateutil_t::object dateutil_object_t; - tut::dateutil_t tut_dateutil("dateutil"); + tut::dateutil_t tut_dateutil("LLDateUtil"); template<> template<> void dateutil_object_t::test<1>() diff --git a/indra/newview/tests/llmediadataclient_test.cpp b/indra/newview/tests/llmediadataclient_test.cpp index 495073cf67..92e77a7b10 100644 --- a/indra/newview/tests/llmediadataclient_test.cpp +++ b/indra/newview/tests/llmediadataclient_test.cpp @@ -234,7 +234,7 @@ namespace tut typedef test_group mediadataclient_t; typedef mediadataclient_t::object mediadataclient_object_t; - tut::mediadataclient_t tut_mediadataclient("mediadataclient"); + tut::mediadataclient_t tut_mediadataclient("LLMediaDataClient"); void ensure(const std::string &msg, int value, int expected) { diff --git a/indra/newview/tests/llsecapi_test.cpp b/indra/newview/tests/llsecapi_test.cpp index d5b6555b6e..c319a47915 100644 --- a/indra/newview/tests/llsecapi_test.cpp +++ b/indra/newview/tests/llsecapi_test.cpp @@ -147,7 +147,7 @@ namespace tut // Tut templating thingamagic: test group, object and test instance typedef test_group secapiTestFactory; typedef secapiTestFactory::object secapiTestObject; - tut::secapiTestFactory tut_test("llsecapi"); + tut::secapiTestFactory tut_test("LLSecAPI"); // --------------------------------------------------------------------------------------- // Test functions diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp index c48498ebcd..daa10819fc 100644 --- a/indra/newview/tests/llsechandler_basic_test.cpp +++ b/indra/newview/tests/llsechandler_basic_test.cpp @@ -311,7 +311,7 @@ namespace tut // Tut templating thingamagic: test group, object and test instance typedef test_group sechandler_basic_test_factory; typedef sechandler_basic_test_factory::object sechandler_basic_test_object; - tut::sechandler_basic_test_factory tut_test("llsechandler_basic"); + tut::sechandler_basic_test_factory tut_test("LLSecHandler"); // --------------------------------------------------------------------------------------- // Test functions diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp index 753151bdd8..8a293d1625 100644 --- a/indra/newview/tests/llslurl_test.cpp +++ b/indra/newview/tests/llslurl_test.cpp @@ -96,7 +96,7 @@ namespace tut // Tut templating thingamagic: test group, object and test instance typedef test_group slurlTestFactory; typedef slurlTestFactory::object slurlTestObject; - tut::slurlTestFactory tut_test("llslurl"); + tut::slurlTestFactory tut_test("LLSlurl"); // --------------------------------------------------------------------------------------- // Test functions diff --git a/indra/newview/tests/lltextureinfo_test.cpp b/indra/newview/tests/lltextureinfo_test.cpp index 7fa8602adc..73ace1de37 100644 --- a/indra/newview/tests/lltextureinfo_test.cpp +++ b/indra/newview/tests/lltextureinfo_test.cpp @@ -68,7 +68,7 @@ namespace tut // Tut templating thingamagic: test group, object and test instance typedef test_group textureinfo_t; typedef textureinfo_t::object textureinfo_object_t; - tut::textureinfo_t tut_textureinfo("textureinfo"); + tut::textureinfo_t tut_textureinfo("LLTectureInfo"); // --------------------------------------------------------------------------------------- diff --git a/indra/newview/tests/lltextureinfodetails_test.cpp b/indra/newview/tests/lltextureinfodetails_test.cpp index 3cd4c10da2..31ec5f9d4e 100644 --- a/indra/newview/tests/lltextureinfodetails_test.cpp +++ b/indra/newview/tests/lltextureinfodetails_test.cpp @@ -67,7 +67,7 @@ namespace tut // Tut templating thingamagic: test group, object and test instance typedef test_group textureinfodetails_t; typedef textureinfodetails_t::object textureinfodetails_object_t; - tut::textureinfodetails_t tut_textureinfodetails("textureinfodetails"); + tut::textureinfodetails_t tut_textureinfodetails("LLTextureInfoDetails"); // --------------------------------------------------------------------------------------- diff --git a/indra/newview/tests/lltexturestatsuploader_test.cpp b/indra/newview/tests/lltexturestatsuploader_test.cpp index caeabd08b3..cfb2c267cc 100644 --- a/indra/newview/tests/lltexturestatsuploader_test.cpp +++ b/indra/newview/tests/lltexturestatsuploader_test.cpp @@ -90,7 +90,7 @@ namespace tut // Tut templating thingamagic: test group, object and test instance typedef test_group texturestatsuploader_t; typedef texturestatsuploader_t::object texturestatsuploader_object_t; - tut::texturestatsuploader_t tut_texturestatsuploader("texturestatsuploader"); + tut::texturestatsuploader_t tut_texturestatsuploader("LLTextureStatsUploader"); // --------------------------------------------------------------------------------------- diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp index 4c71f15db1..a0f1d1c3c3 100644 --- a/indra/newview/tests/llviewerhelputil_test.cpp +++ b/indra/newview/tests/llviewerhelputil_test.cpp @@ -109,7 +109,7 @@ namespace tut typedef test_group viewerhelputil_t; typedef viewerhelputil_t::object viewerhelputil_object_t; - tut::viewerhelputil_t tut_viewerhelputil("viewerhelputil"); + tut::viewerhelputil_t tut_viewerhelputil("LLViewerHelpUtil"); template<> template<> void viewerhelputil_object_t::test<1>() diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp index 2320201ee8..6cd2db487b 100644 --- a/indra/newview/tests/llviewernetwork_test.cpp +++ b/indra/newview/tests/llviewernetwork_test.cpp @@ -122,7 +122,7 @@ namespace tut // Tut templating thingamagic: test group, object and test instance typedef test_group viewerNetworkTestFactory; typedef viewerNetworkTestFactory::object viewerNetworkTestObject; - tut::viewerNetworkTestFactory tut_test("llviewernetwork"); + tut::viewerNetworkTestFactory tut_test("LLViewerNetwork"); // --------------------------------------------------------------------------------------- // Test functions diff --git a/indra/newview/tests/llworldmap_test.cpp b/indra/newview/tests/llworldmap_test.cpp index 443279c062..b976ac5ea9 100644 --- a/indra/newview/tests/llworldmap_test.cpp +++ b/indra/newview/tests/llworldmap_test.cpp @@ -144,15 +144,15 @@ namespace tut // Tut templating thingamagic: test group, object and test instance typedef test_group iteminfo_t; typedef iteminfo_t::object iteminfo_object_t; - tut::iteminfo_t tut_iteminfo("iteminfo"); + tut::iteminfo_t tut_iteminfo("LLItemInfo"); typedef test_group siminfo_t; typedef siminfo_t::object siminfo_object_t; - tut::siminfo_t tut_siminfo("siminfo"); + tut::siminfo_t tut_siminfo("LLSimInfo"); typedef test_group worldmap_t; typedef worldmap_t::object worldmap_object_t; - tut::worldmap_t tut_worldmap("worldmap"); + tut::worldmap_t tut_worldmap("LLWorldMap"); // --------------------------------------------------------------------------------------- // Test functions diff --git a/indra/newview/tests/llworldmipmap_test.cpp b/indra/newview/tests/llworldmipmap_test.cpp index 272e59061d..54887ae219 100644 --- a/indra/newview/tests/llworldmipmap_test.cpp +++ b/indra/newview/tests/llworldmipmap_test.cpp @@ -89,7 +89,7 @@ namespace tut // Tut templating thingamagic: test group, object and test instance typedef test_group worldmipmap_t; typedef worldmipmap_t::object worldmipmap_object_t; - tut::worldmipmap_t tut_worldmipmap("worldmipmap"); + tut::worldmipmap_t tut_worldmipmap("LLWorldMipmap"); // --------------------------------------------------------------------------------------- // Test functions -- cgit v1.3 From c7f5a9419b4b93efdc04ebfbb8e05a2ef0e09142 Mon Sep 17 00:00:00 2001 From: prep linden Date: Fri, 24 Sep 2010 13:11:53 -0400 Subject: Added support for joint offsets --- indra/llcharacter/lljoint.cpp | 15 ++++ indra/llcharacter/lljoint.h | 4 + indra/llprimitive/llmodel.cpp | 15 ++++ indra/llprimitive/llmodel.h | 2 +- indra/newview/llfloatermodelpreview.cpp | 127 +++++++++++++++++++++++++++++++- indra/newview/llmeshrepository.cpp | 17 +++++ indra/newview/llmeshrepository.h | 2 + indra/newview/llviewerfoldertype.cpp | 3 + indra/newview/llvoavatar.cpp | 10 +++ indra/newview/llvoavatar.h | 4 +- indra/newview/llvovolume.cpp | 26 +++++++ 11 files changed, 222 insertions(+), 3 deletions(-) (limited to 'indra/llprimitive') diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index 5c49214051..2449b01e15 100755 --- a/indra/llcharacter/lljoint.cpp +++ b/indra/llcharacter/lljoint.cpp @@ -239,6 +239,21 @@ void LLJoint::setPosition( const LLVector3& pos ) } } +//-------------------------------------------------------------------- +// storeCurrentXform() +//-------------------------------------------------------------------- +void LLJoint::storeCurrentXform( const LLVector3& pos ) +{ + mOldXform = mXform; + setPosition( pos ); +} +//-------------------------------------------------------------------- +// restoreOldXform() +//-------------------------------------------------------------------- +void LLJoint::restoreOldXform( void ) +{ + mXform = mOldXform; +} //-------------------------------------------------------------------- // getWorldPosition() diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h index 0473d1599a..cf644e899f 100755 --- a/indra/llcharacter/lljoint.h +++ b/indra/llcharacter/lljoint.h @@ -86,6 +86,7 @@ protected: // explicit transformation members LLXformMatrix mXform; + LLXformMatrix mOldXform; public: U32 mDirtyFlags; @@ -178,6 +179,9 @@ public: S32 getJointNum() const { return mJointNum; } void setJointNum(S32 joint_num) { mJointNum = joint_num; } + + void restoreOldXform( void ); + void storeCurrentXform( const LLVector3& pos ); }; #endif // LL_LLJOINT_H diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index 349c844470..f3f9c29157 100755 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -1342,6 +1342,21 @@ LLSD LLModel::writeModel(std::ostream& ostr, LLModel* physics, LLModel* high, LL mdl["skin"]["bind_shape_matrix"][i*4+j] = high->mBindShapeMatrix.mMatrix[i][j]; } } + + if ( high->mAlternateBindMatrix.size() > 0 ) + { + for (U32 i = 0; i < high->mJointList.size(); ++i) + { + for (U32 j = 0; j < 4; j++) + { + for (U32 k = 0; k < 4; k++) + { + mdl["skin"]["alt_inverse_bind_matrix"][i][j*4+k] = high->mAlternateBindMatrix[i].mMatrix[j][k]; + } + } + } + } + } if (!decomp.empty()) diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h index ea703d7228..ff22d39e60 100755 --- a/indra/llprimitive/llmodel.h +++ b/indra/llprimitive/llmodel.h @@ -152,7 +152,7 @@ public: LLMatrix4 mBindShapeMatrix; std::vector mInvBindMatrix; - + std::vector mAlternateBindMatrix; std::string mLabel; LLVector3 mNormalizedScale; diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 1796f76f03..3fe5d08bb3 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -318,6 +318,8 @@ LLFloaterModelPreview::~LLFloaterModelPreview() { sInstance = NULL; + gAgentAvatarp->resetJointPositions(); + delete mModelPreview; if (mGLName) @@ -1304,6 +1306,106 @@ void LLModelLoader::run() model->mBindShapeMatrix = rotation; }*/ + //The joint transfom map that we'll populate below + std::map jointTransforms; + jointTransforms.clear(); + + //Some collada setup for accessing the skeleton + daeElement* pElement = 0; + dae.getDatabase()->getElement( &pElement, 0, 0, "skeleton" ); + domInstance_controller::domSkeleton* pSkeleton = daeSafeCast( pElement ); + if ( pSkeleton ) + { + //Get the root node of the skeleton + daeElement* pSkeletonRootNode = pSkeleton->getValue().getElement(); + if ( pSkeletonRootNode ) + { + //Once we have the root node - start acccessing it's joint components + static const int jointCnt = mJointMap.size(); + std::map :: const_iterator jointIt = mJointMap.begin(); + bool missingID = false; + //Loop over all the possible joints within the .dae - using the allowed joint list in the ctor. + for ( int i=0; i(resolver.getElement()); + if ( pJoint ) + { + //Pull out the translate id and store it in the jointTranslations map + daeSIDResolver jointResolver( pJoint, "./translate" ); + domTranslate* pTranslate = daeSafeCast( jointResolver.getElement() ); + + LLMatrix4 workingTransform; + + //Translation + if ( pTranslate ) + { + domFloat3 jointTrans = pTranslate->getValue(); + LLVector3 singleJointTranslation( jointTrans[0], jointTrans[1], jointTrans[2] ); + workingTransform.setTranslation( singleJointTranslation ); + } + else + { + missingID = true; + llwarns<< "No translation sid!" << llendl; + } + //Store the joint transform w/respect to it's name. + jointTransforms[(*jointIt).second.c_str()] = workingTransform; + + } + else + { + missingID = true; + llwarns<< "Missing joint." << llendl; + } + } + + //If anything failed in regards to extracting the skeleton, joints or translation id, + //mention it + if ( missingID ) + { + llwarns<< "Partial jointmap found in asset - did you mean to just have a partial map?" << llendl; + } + + //Set the joint translations on the avatar + //The joints are reset in the dtor + jointIt = mJointMap.begin(); + for ( int i=0; igetJoint( lookingForJoint ); + if ( pJoint ) + { + pJoint->storeCurrentXform( jointTransform.getTranslation() ); + } + else + { + //Most likely an error in the asset. + llwarns<<"Tried to apply joint position from .dae, but it did not exist in the avatar rig." << llendl; + } + } + } + } + else + { + llwarns<<"No root node in this skeleton" << llendl; + } + } + else + { + llwarns<<"No skeleton in this asset" << llendl; + } domSkin::domJoints* joints = skin->getJoints(); @@ -1391,6 +1493,29 @@ void LLModelLoader::run() } } + //We need to construct the alternate bind matrix (which contains the new joint positions) + //in the same order as they were stored in the joint buffer. The joints associated + //with the skeleton are not stored in the same order as they are in the exported joint buffer. + //This remaps the skeletal joints to be in the same order as the joints stored in the model. + std::vector :: const_iterator jointIt = model->mJointList.begin(); + static const int jointCnt = model->mJointList.size(); + for ( int i=0; imInvBindMatrix[i]; + newInverse.setTranslation( jointTransforms[lookingForJoint].getTranslation() ); + model->mAlternateBindMatrix.push_back( newInverse ); + } + else + { + llwarns<<"Possibly misnamed/missing joint [" <mJointList = base->mJointList; target_model->mInvBindMatrix = base->mInvBindMatrix; target_model->mBindShapeMatrix = base->mBindShapeMatrix; - + target_model->mAlternateBindMatrix = base->mAlternateBindMatrix; //copy material list target_model->mMaterialList = base->mMaterialList; diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 8b14af009c..8381847842 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -1016,6 +1016,23 @@ bool LLMeshRepoThread::skinInfoReceived(const LLUUID& mesh_id, U8* data, S32 dat } } + if (skin.has("alt_inverse_bind_matrix")) + { + for (U32 i = 0; i < skin["alt_inverse_bind_matrix"].size(); ++i) + { + LLMatrix4 mat; + for (U32 j = 0; j < 4; j++) + { + for (U32 k = 0; k < 4; k++) + { + mat.mMatrix[j][k] = skin["alt_inverse_bind_matrix"][i][j*4+k].asReal(); + } + } + + info.mAlternateBindMatrix.push_back(mat); + } + } + mSkinInfoQ.push(info); } diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index a2f403e214..7a65ea7a44 100755 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -132,6 +132,8 @@ public: LLUUID mMeshID; std::vector mJointNames; std::vector mInvBindMatrix; + std::vector mAlternateBindMatrix; + LLMatrix4 mBindShapeMatrix; }; diff --git a/indra/newview/llviewerfoldertype.cpp b/indra/newview/llviewerfoldertype.cpp index 3105a6ec43..1056db34ee 100755 --- a/indra/newview/llviewerfoldertype.cpp +++ b/indra/newview/llviewerfoldertype.cpp @@ -132,6 +132,9 @@ LLViewerFolderDictionary::LLViewerFolderDictionary() addEntry(LLFolderType::FT_CURRENT_OUTFIT, new ViewerFolderEntry("Current Outfit", "Inv_SysOpen", "Inv_SysClosed", TRUE)); addEntry(LLFolderType::FT_OUTFIT, new ViewerFolderEntry("New Outfit", "Inv_LookFolderOpen", "Inv_LookFolderClosed", TRUE)); addEntry(LLFolderType::FT_MY_OUTFITS, new ViewerFolderEntry("My Outfits", "Inv_SysOpen", "Inv_SysClosed", TRUE)); + addEntry(LLFolderType::FT_MESH, new ViewerFolderEntry("Mesh", "Inv_SysOpen", "Inv_SysClosed", FALSE)); + + addEntry(LLFolderType::FT_INBOX, new ViewerFolderEntry("Inbox", "Inv_SysOpen", "Inv_SysClosed", FALSE)); addEntry(LLFolderType::FT_NONE, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", FALSE, "default")); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 54400c184b..1c65b18206 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -4783,6 +4783,16 @@ LLJoint *LLVOAvatar::getJoint( const std::string &name ) return jointp; } +//----------------------------------------------------------------------------- +// resetJointPositions +//----------------------------------------------------------------------------- +void LLVOAvatar::resetJointPositions( void ) +{ + for(S32 i = 0; i < (S32)mNumJoints; ++i) + { + mSkeleton[i].restoreOldXform(); + } +} //----------------------------------------------------------------------------- // getCharacterPosition() //----------------------------------------------------------------------------- diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 955deff1ea..af5cde7f46 100755 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -169,7 +169,9 @@ public: virtual LLJoint* getJoint(const std::string &name); virtual LLJoint* getRootJoint() { return &mRoot; } - + + void resetJointPositions( void ); + virtual const char* getAnimationPrefix() { return "avatar"; } virtual const LLUUID& getID(); virtual LLVector3 getVolumePos(S32 joint_index, LLVector3& volume_offset); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index d96b6eccb1..ed9ea2320e 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4027,6 +4027,32 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) //get drawpool of avatar with rigged face LLDrawPoolAvatar* pool = get_avatar_drawpool(vobj); + //Determine if we've received skininfo that contains an + //alternate bind matrix - if it does then apply the translational component + //to the joints of the avatar. + const LLVOAvatar* pAvatarVO = vobj->getAvatar(); + if ( pAvatarVO ) + { + const LLMeshSkinInfo* pSkinData = gMeshRepo.getSkinInfo( vobj->getVolume()->getParams().getSculptID() ); + if ( pSkinData ) + { + static const int bindCnt = pSkinData->mAlternateBindMatrix.size(); + if ( bindCnt > 0 ) + { + static const int jointCnt = pSkinData->mJointNames.size(); + for ( int i=0; imJointNames[i].c_str(); + LLJoint* pJoint = vobj->getAvatar()->getJoint( lookingForJoint ); + if ( pJoint ) + { + pJoint->storeCurrentXform( pSkinData->mAlternateBindMatrix[i].getTranslation() ); + } + } + } + } + } + if (pool) { const LLTextureEntry* te = facep->getTextureEntry(); -- cgit v1.3 From 613894c8cca25f9fa86da7056da3594fe8771d46 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 28 Sep 2010 13:45:42 -0500 Subject: SH-238 Add check boxes to upload skin weights (or not) and/or joint positions (or not). Remove llfloaterimportcollada Reviewed by Prep. --- indra/llprimitive/llmodel.cpp | 10 +- indra/llprimitive/llmodel.h | 4 +- indra/newview/llassetuploadresponders.cpp | 5 +- indra/newview/llfloaterimportcollada.cpp | 4 + indra/newview/llfloaterimportcollada.h | 4 + indra/newview/llfloatermodelpreview.cpp | 114 ++++++++++++++++++--- indra/newview/llfloatermodelpreview.h | 7 +- indra/newview/llmeshrepository.cpp | 16 ++- indra/newview/llmeshrepository.h | 8 +- indra/newview/llviewerfloaterreg.cpp | 2 - indra/newview/llviewermenufile.cpp | 16 --- indra/newview/llvovolume.cpp | 4 +- .../skins/default/xui/en/floater_model_preview.xml | 19 +++- 13 files changed, 158 insertions(+), 55 deletions(-) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index f3f9c29157..b2f80de12a 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -1288,11 +1288,11 @@ LLModel* LLModel::loadModelFromDomMesh(domMesh *mesh) } //static -LLSD LLModel::writeModel(std::string filename, LLModel* physics, LLModel* high, LLModel* medium, LLModel* low, LLModel* impostor, LLModel::physics_shape& decomp, BOOL nowrite) +LLSD LLModel::writeModel(std::string filename, LLModel* physics, LLModel* high, LLModel* medium, LLModel* low, LLModel* impostor, LLModel::physics_shape& decomp, bool upload_skin, bool upload_joints, bool nowrite) { std::ofstream os(filename.c_str(), std::ofstream::out | std::ofstream::binary); - LLSD header = writeModel(os, physics, high, medium, low, impostor, decomp, nowrite); + LLSD header = writeModel(os, physics, high, medium, low, impostor, decomp, upload_skin, upload_joints, nowrite); os.close(); @@ -1300,7 +1300,7 @@ LLSD LLModel::writeModel(std::string filename, LLModel* physics, LLModel* high, } //static -LLSD LLModel::writeModel(std::ostream& ostr, LLModel* physics, LLModel* high, LLModel* medium, LLModel* low, LLModel* impostor, LLModel::physics_shape& decomp, BOOL nowrite) +LLSD LLModel::writeModel(std::ostream& ostr, LLModel* physics, LLModel* high, LLModel* medium, LLModel* low, LLModel* impostor, LLModel::physics_shape& decomp, bool upload_skin, bool upload_joints, bool nowrite) { LLSD mdl; @@ -1313,7 +1313,7 @@ LLSD LLModel::writeModel(std::ostream& ostr, LLModel* physics, LLModel* high, LL physics }; - bool skinning = high && !high->mSkinWeights.empty(); + bool skinning = upload_skin && high && !high->mSkinWeights.empty(); if (skinning) { //write skinning block @@ -1343,7 +1343,7 @@ LLSD LLModel::writeModel(std::ostream& ostr, LLModel* physics, LLModel* high, LL } } - if ( high->mAlternateBindMatrix.size() > 0 ) + if ( upload_joints && high->mAlternateBindMatrix.size() > 0 ) { for (U32 i = 0; i < high->mJointList.size(); ++i) { diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h index ff22d39e60..e6696b984f 100644 --- a/indra/llprimitive/llmodel.h +++ b/indra/llprimitive/llmodel.h @@ -60,8 +60,8 @@ public: typedef std::vector > physics_shape; LLModel(LLVolumeParams& params, F32 detail); - static LLSD writeModel(std::string filename, LLModel* physics, LLModel* high, LLModel* medium, LLModel* low, LLModel* imposotr, LLModel::physics_shape& physics_shape, BOOL nowrite = FALSE); - static LLSD writeModel(std::ostream& ostr, LLModel* physics, LLModel* high, LLModel* medium, LLModel* low, LLModel* imposotr, LLModel::physics_shape& physics_shape, BOOL nowrite = FALSE); + static LLSD writeModel(std::string filename, LLModel* physics, LLModel* high, LLModel* medium, LLModel* low, LLModel* imposotr, LLModel::physics_shape& physics_shape, bool upload_skin, bool upload_joints, bool nowrite = FALSE); + static LLSD writeModel(std::ostream& ostr, LLModel* physics, LLModel* high, LLModel* medium, LLModel* low, LLModel* imposotr, LLModel::physics_shape& physics_shape, bool upload_skin, bool upload_joints, bool nowrite = FALSE); static LLSD writeModelToStream(std::ostream& ostr, LLSD& mdl, BOOL nowrite = FALSE); static LLModel* loadModelFromAsset(std::string filename, S32 lod); static LLModel* loadModelFromDae(std::string filename); diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index d44fb84f14..6c571c8edf 100644 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -42,7 +42,6 @@ #include "llinventorydefines.h" #include "llinventoryobserver.h" #include "llinventorypanel.h" -#include "llfloaterimportcollada.h" #include "llpermissionsflags.h" #include "llpreviewnotecard.h" #include "llpreviewscript.h" @@ -334,7 +333,7 @@ void LLNewAgentInventoryResponder::uploadFailure(const LLSD& content) { LLAssetUploadResponder::uploadFailure(content); - LLImportColladaAssetCache::getInstance()->assetUploaded(mVFileID, content["new_asset"], FALSE); + //LLImportColladaAssetCache::getInstance()->assetUploaded(mVFileID, content["new_asset"], FALSE); } //virtual @@ -424,7 +423,7 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content) userdata); } - LLImportColladaAssetCache::getInstance()->assetUploaded(mVFileID, content["new_asset"], TRUE); + //LLImportColladaAssetCache::getInstance()->assetUploaded(mVFileID, content["new_asset"], TRUE); } LLSendTexLayerResponder::LLSendTexLayerResponder(const LLSD& post_data, diff --git a/indra/newview/llfloaterimportcollada.cpp b/indra/newview/llfloaterimportcollada.cpp index 000347f68c..dd1cf67ebf 100644 --- a/indra/newview/llfloaterimportcollada.cpp +++ b/indra/newview/llfloaterimportcollada.cpp @@ -29,8 +29,11 @@ * $/LicenseInfo$ */ + #include "llviewerprecompiledheaders.h" +#if 0 //DEPRECATED + #include "llfloaterimportcollada.h" #include "dae.h" @@ -1111,3 +1114,4 @@ void LLImportCollada::onCommitCancel(LLUICtrl*, void*) getInstance()->endImport(); } +#endif diff --git a/indra/newview/llfloaterimportcollada.h b/indra/newview/llfloaterimportcollada.h index 4eb263901b..a165bb8dca 100644 --- a/indra/newview/llfloaterimportcollada.h +++ b/indra/newview/llfloaterimportcollada.h @@ -30,6 +30,8 @@ * $/LicenseInfo$ */ +#if 0 //DEPRECATED + #ifndef LL_LLFLOATERIMPORTCOLLADA_H #define LL_LLFLOATERIMPORTCOLLADA_H @@ -136,3 +138,5 @@ private: }; #endif // LL_LLFLOATERIMPORTCOLLADA_H + +#endif //DEPRECATED diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 0cdd5b9898..f995ddd6d0 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -297,6 +297,12 @@ BOOL LLFloaterModelPreview::postBuild() childSetCommitCallback("preview_lod_combo", onPreviewLODCommit, this); + childSetCommitCallback("upload_skin", onUploadSkinCommit, this); + childSetCommitCallback("upload_joints", onUploadJointsCommit, this); + + childDisable("upload_skin"); + childDisable("upload_joints"); + const U32 width = 512; const U32 height = 512; @@ -389,6 +395,35 @@ void LLFloaterModelPreview::setLimit(S32 lod, S32 limit) } } +//static +void LLFloaterModelPreview::onUploadJointsCommit(LLUICtrl*,void* userdata) +{ + LLFloaterModelPreview *fp =(LLFloaterModelPreview *)userdata; + + if (!fp->mModelPreview) + { + return; + } + + fp->mModelPreview->refresh(); +} + +//static +void LLFloaterModelPreview::onUploadSkinCommit(LLUICtrl*,void* userdata) +{ + LLFloaterModelPreview *fp =(LLFloaterModelPreview *)userdata; + + if (!fp->mModelPreview) + { + return; + } + + fp->mModelPreview->refresh(); + fp->mModelPreview->resetPreviewTarget(); + fp->mModelPreview->clearBuffers(); +} + +//static void LLFloaterModelPreview::onPreviewLODCommit(LLUICtrl* ctrl, void* userdata) { LLFloaterModelPreview *fp =(LLFloaterModelPreview *)userdata; @@ -2031,13 +2066,15 @@ U32 LLModelPreview::calcResourceCost() LLModel::physics_shape& physics_shape = instance.mLOD[LLModel::LOD_PHYSICS] ? instance.mLOD[LLModel::LOD_PHYSICS]->mPhysicsShape : instance.mModel->mPhysicsShape; LLSD ret = LLModel::writeModel("", - instance.mLOD[4], + instance.mLOD[4], instance.mLOD[3], instance.mLOD[2], instance.mLOD[1], instance.mLOD[0], physics_shape, - TRUE); + mFMP->childGetValue("upload_skin").asBoolean(), + mFMP->childGetValue("upload_joints").asBoolean(), + true); cost += gMeshRepo.calcResourceCost(ret); @@ -2203,12 +2240,17 @@ void LLModelPreview::loadModelCallback(S32 lod) mDirty = true; + resetPreviewTarget(); + + mFMP->mLoading = FALSE; + refresh(); +} + +void LLModelPreview::resetPreviewTarget() +{ mPreviewTarget = (mModelLoader->mExtents[0] + mModelLoader->mExtents[1]) * 0.5f; mPreviewScale = (mModelLoader->mExtents[1] - mModelLoader->mExtents[0]) * 0.5f; setPreviewTarget(mPreviewScale.magVec()*2.f); - - mFMP->mLoading = FALSE; - refresh(); } void LLModelPreview::smoothNormals() @@ -2556,7 +2598,7 @@ void LLModelPreview::genLODs(S32 which_lod) if (mVertexBuffer[5].empty()) { - genBuffers(5); + genBuffers(5, false); } U32 tri_count = 0; @@ -2935,7 +2977,15 @@ void LLModelPreview::setPreviewTarget(F32 distance) mCameraOffset.clearVec(); } -void LLModelPreview::genBuffers(S32 lod) +void LLModelPreview::clearBuffers() +{ + for (U32 i = 0; i < 6; i++) + { + mVertexBuffer[i].clear(); + } +} + +void LLModelPreview::genBuffers(S32 lod, bool avatar_preview) { U32 tri_count = 0; U32 vertex_count = 0; @@ -2986,7 +3036,7 @@ void LLModelPreview::genBuffers(S32 lod) LLVertexBuffer* vb = NULL; - bool skinned = !mdl->mSkinWeights.empty(); + bool skinned = avatar_preview && !mdl->mSkinWeights.empty(); U32 mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0; @@ -3021,13 +3071,12 @@ void LLModelPreview::genBuffers(S32 lod) if (skinned) { - // build vertices and normals for (U32 i = 0; i < num_vertices; i++) { //find closest weight to vf.mVertices[i].mPosition LLVector3 pos(vf.mPositions[i].getF32ptr()); - LLModel::weight_list weight_list = base_mdl->getJointInfluences(pos); + const LLModel::weight_list& weight_list = base_mdl->getJointInfluences(pos); LLVector4 w(0,0,0,0); if (weight_list.size() > 4) @@ -3102,6 +3151,9 @@ BOOL LLModelPreview::render() gl_rect_2d_simple( width, height ); bool avatar_preview = false; + bool upload_skin = mFMP->childGetValue("upload_skin").asBoolean(); + bool upload_joints = mFMP->childGetValue("upload_joints").asBoolean(); + for (LLModelLoader::scene::iterator iter = mScene[mPreviewLOD].begin(); iter != mScene[mPreviewLOD].end(); ++iter) { for (LLModelLoader::model_instance_list::iterator model_iter = iter->second.begin(); model_iter != iter->second.end(); ++model_iter) @@ -3115,6 +3167,39 @@ BOOL LLModelPreview::render() } } + if (upload_skin && !avatar_preview) + { + mFMP->childSetValue("upload_skin", false); + upload_skin = false; + } + + if (!upload_skin && upload_joints) + { + mFMP->childSetValue("upload_joints", false); + upload_joints = false; + } + + if (!avatar_preview) + { + mFMP->childDisable("upload_skin"); + } + else + { + mFMP->childEnable("upload_skin"); + } + + if (!upload_skin) + { + mFMP->childDisable("upload_joints"); + } + else + { + mFMP->childEnable("upload_joints"); + } + + avatar_preview = avatar_preview && upload_skin; + + mFMP->childSetEnabled("consolidate", !avatar_preview); F32 explode = mFMP->mDecompFloater ? mFMP->mDecompFloater->childGetValue("explode").asReal() : 0.f; @@ -3171,8 +3256,8 @@ BOOL LLModelPreview::render() if (!mBaseModel.empty() && mVertexBuffer[5].empty()) { - genBuffers(-1); - genBuffers(3); + genBuffers(-1, avatar_preview); + //genBuffers(3); //genLODs(); } @@ -3194,7 +3279,7 @@ BOOL LLModelPreview::render() { if (mVertexBuffer[mPreviewLOD].empty()) { - genBuffers(mPreviewLOD); + genBuffers(mPreviewLOD, avatar_preview); } if (!avatar_preview) @@ -3527,7 +3612,8 @@ void LLFloaterModelPreview::onUpload(void* user_data) mp->mModelPreview->rebuildUploadData(); - gMeshRepo.uploadModel(mp->mModelPreview->mUploadData, mp->mModelPreview->mPreviewScale, mp->childGetValue("upload_textures").asBoolean()); + gMeshRepo.uploadModel(mp->mModelPreview->mUploadData, mp->mModelPreview->mPreviewScale, + mp->childGetValue("upload_textures").asBoolean(), mp->childGetValue("upload_skin"), mp->childGetValue("upload_joints")); mp->closeFloater(false); } diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index 5de3ebf5e3..08ac3873db 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -113,12 +113,14 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex LLModelPreview(S32 width, S32 height, LLFloaterModelPreview* fmp); virtual ~LLModelPreview(); + void resetPreviewTarget(); void setPreviewTarget(F32 distance); void setTexture(U32 name) { mTextureName = name; } BOOL render(); void update(); - void genBuffers(S32 lod); + void genBuffers(S32 lod, bool skinned); + void clearBuffers(); void refresh(); void rotate(F32 yaw_radians, F32 pitch_radians); void zoom(F32 zoom_amt); @@ -225,6 +227,9 @@ protected: friend class LLPhysicsDecomp; friend class LLPhysicsDecompFloater; + static void onUploadJointsCommit(LLUICtrl*,void*); + static void onUploadSkinCommit(LLUICtrl*,void*); + static void onPreviewLODCommit(LLUICtrl*,void*); static void onHighLODCommit(LLUICtrl*,void*); diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 8381847842..508e1a9444 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -1121,11 +1121,14 @@ bool LLMeshRepoThread::decompositionReceived(const LLUUID& mesh_id, U8* data, S3 return true; } -LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list& data, LLVector3& scale, bool upload_textures) +LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list& data, LLVector3& scale, bool upload_textures, + bool upload_skin, bool upload_joints) : LLThread("mesh upload") { mInstanceList = data; mUploadTextures = upload_textures; + mUploadSkin = upload_skin; + mUploadJoints = upload_joints; mMutex = new LLMutex(NULL); mCurlRequest = NULL; mPendingConfirmations = 0; @@ -2118,9 +2121,10 @@ const LLMeshDecomposition* LLMeshRepository::getDecomposition(const LLUUID& mesh return NULL; } -void LLMeshRepository::uploadModel(std::vector& data, LLVector3& scale, bool upload_textures) +void LLMeshRepository::uploadModel(std::vector& data, LLVector3& scale, bool upload_textures, + bool upload_skin, bool upload_joints) { - LLMeshUploadThread* thread = new LLMeshUploadThread(data, scale, upload_textures); + LLMeshUploadThread* thread = new LLMeshUploadThread(data, scale, upload_textures, upload_skin, upload_joints); mUploads.push_back(thread); thread->start(); } @@ -2165,6 +2169,8 @@ void LLMeshUploadThread::sendCostRequest(LLMeshUploadData& data) data.mModel[LLModel::LOD_LOW], data.mModel[LLModel::LOD_IMPOSTOR], phys_shape, + mUploadSkin, + mUploadJoints, true); std::string desc = data.mBaseModel->mLabel; @@ -2248,7 +2254,9 @@ void LLMeshUploadThread::doUploadModel(LLMeshUploadData& data) data.mModel[LLModel::LOD_MEDIUM], data.mModel[LLModel::LOD_LOW], data.mModel[LLModel::LOD_IMPOSTOR], - phys_shape); + phys_shape, + mUploadSkin, + mUploadJoints); data.mAssetData = ostr.str(); diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index 7a65ea7a44..f8d2a0590c 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -334,6 +334,8 @@ public: bool mFinished; LLVector3 mOrigin; bool mUploadTextures; + bool mUploadSkin; + bool mUploadJoints; LLHost mHost; std::string mUploadObjectAssetCapability; @@ -348,7 +350,8 @@ public: std::map, LLTextureUploadData> mTextureMap; - LLMeshUploadThread(instance_list& data, LLVector3& scale, bool upload_textures); + LLMeshUploadThread(instance_list& data, LLVector3& scale, bool upload_textures, + bool upload_skin, bool upload_joints); ~LLMeshUploadThread(); void uploadTexture(LLTextureUploadData& data); @@ -403,7 +406,8 @@ public: const LLMeshSkinInfo* getSkinInfo(const LLUUID& mesh_id); const LLMeshDecomposition* getDecomposition(const LLUUID& mesh_id); - void uploadModel(std::vector& data, LLVector3& scale, bool upload_textures); + void uploadModel(std::vector& data, LLVector3& scale, bool upload_textures, + bool upload_skin, bool upload_joints); S32 getMeshSize(const LLUUID& mesh_id, S32 lod); diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 2a62a13a3e..75df2357d0 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -71,7 +71,6 @@ #include "llimfloater.h" #include "llfloaterinspect.h" #include "llfloaterinventory.h" -#include "llfloaterimportcollada.h" #include "llfloaterjoystick.h" #include "llfloaterlagmeter.h" #include "llfloaterland.h" @@ -175,7 +174,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("hud", "floater_hud.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("impanel", "floater_im_session.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("import_collada", "floater_import_collada.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("im_container", "floater_im_container.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("im_well_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("incoming_call", "floater_incoming_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 0460ac0988..91781f27a4 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -40,7 +40,6 @@ #include "llfilepicker.h" #include "llfloaterreg.h" #include "llbuycurrencyhtml.h" -#include "llfloaterimportcollada.h" #include "llfloatermodelpreview.h" #include "llfloatersnapshot.h" #include "llimage.h" @@ -67,7 +66,6 @@ #include "lluploaddialog.h" #include "lltrans.h" #include "llfloaterbuycurrency.h" -#include "llfloaterimportcollada.h" // linden libraries #include "llassetuploadresponders.h" @@ -350,19 +348,6 @@ class LLFileUploadImage : public view_listener_t } }; -class LLFileUploadScene : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - std::string filename = upload_pick((void *)LLFilePicker::FFLOAD_COLLADA); - if (!filename.empty()) - { - LLImportCollada::getInstance()->importFile(filename); - } - return TRUE; - } -}; - class LLFileUploadModel : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -1402,7 +1387,6 @@ void init_menu_file() view_listener_t::addCommit(new LLFileUploadSound(), "File.UploadSound"); view_listener_t::addCommit(new LLFileUploadAnim(), "File.UploadAnim"); view_listener_t::addCommit(new LLFileUploadModel(), "File.UploadModel"); - view_listener_t::addCommit(new LLFileUploadScene(), "File.UploadScene"); view_listener_t::addCommit(new LLFileUploadBulk(), "File.UploadBulk"); view_listener_t::addCommit(new LLFileCloseWindow(), "File.CloseWindow"); view_listener_t::addCommit(new LLFileCloseAllWindows(), "File.CloseAllWindows"); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index ed9ea2320e..30bd981aa6 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4036,10 +4036,10 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) const LLMeshSkinInfo* pSkinData = gMeshRepo.getSkinInfo( vobj->getVolume()->getParams().getSculptID() ); if ( pSkinData ) { - static const int bindCnt = pSkinData->mAlternateBindMatrix.size(); + const int bindCnt = pSkinData->mAlternateBindMatrix.size(); if ( bindCnt > 0 ) { - static const int jointCnt = pSkinData->mJointNames.size(); + const int jointCnt = pSkinData->mJointNames.size(); for ( int i=0; imJointNames[i].c_str(); diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml index de9f3ee87e..f505e99c02 100644 --- a/indra/newview/skins/default/xui/en/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml @@ -134,8 +134,21 @@ [TRIANGLES] Triangles, [HULLS] Hulls, [POINTS] Points - - + + + Include: + + + + + + + + + Description: @@ -144,8 +157,6 @@