From f277aed2186871ad7fd76de3a49348ed5ba94e3b Mon Sep 17 00:00:00 2001 From: Anchor Linden Date: Thu, 24 May 2018 01:17:07 -0700 Subject: [DRTVWR-455] - add new bake testure and tattoo slots --- indra/llprimitive/llprimitive.cpp | 53 ++- indra/llprimitive/llprimitive.h | 2 +- indra/newview/llpaneleditwearable.cpp | 2 +- .../skins/default/xui/en/floater_texture_ctrl.xml | 2 +- .../skins/default/xui/en/panel_edit_tattoo.xml | 417 +++++++++++---------- .../skins/default/xui/en/panel_edit_wearable.xml | 4 +- indra/newview/tests/lldateutil_test.cpp | 2 +- indra/newview/tests/llworldmap_test.cpp | 2 +- 8 files changed, 254 insertions(+), 230 deletions(-) diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index bfa65666b5..6aa6493303 100644 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -1029,23 +1029,32 @@ S32 LLPrimitive::packTEField(U8 *cur_ptr, U8 *data_ptr, U8 data_size, U8 last_fa } } - //assign exception faces to cur_ptr - if (exception_faces >= (0x1 << 7)) - { - if (exception_faces >= (0x1 << 14)) - { - if (exception_faces >= (0x1 << 21)) - { - if (exception_faces >= (0x1 << 28)) - { - *cur_ptr++ = (U8)(((exception_faces >> 28) & 0x7F) | 0x80); - } - *cur_ptr++ = (U8)(((exception_faces >> 21) & 0x7F) | 0x80); - } - *cur_ptr++ = (U8)(((exception_faces >> 14) & 0x7F) | 0x80); - } - *cur_ptr++ = (U8)(((exception_faces >> 7) & 0x7F) | 0x80); - } + //assign exception faces to cur_ptr + if (exception_faces >= ((U64)0x1 << 7)) + { + if (exception_faces >= ((U64)0x1 << 14)) + { + if (exception_faces >= ((U64)0x1 << 21)) + { + if (exception_faces >= ((U64)0x1 << 28)) + { + if (exception_faces >= ((U64)0x1 << 35)) + { + if (exception_faces >= ((U64)0x1 << 42)) + { + *cur_ptr++ = (U8)(((exception_faces >> 42) & 0x7F) | 0x80); + } + *cur_ptr++ = (U8)(((exception_faces >> 35) & 0x7F) | 0x80); + } + *cur_ptr++ = (U8)(((exception_faces >> 28) & 0x7F) | 0x80); + } + *cur_ptr++ = (U8)(((exception_faces >> 21) & 0x7F) | 0x80); + } + *cur_ptr++ = (U8)(((exception_faces >> 14) & 0x7F) | 0x80); + } + *cur_ptr++ = (U8)(((exception_faces >> 7) & 0x7F) | 0x80); + } + *cur_ptr++ = (U8)(exception_faces & 0x7F); @@ -1105,7 +1114,7 @@ S32 LLPrimitive::unpackTEField(U8 *cur_ptr, U8 *buffer_end, U8 *data_ptr, U8 dat // Includes information about image ID, color, scale S,T, offset S,T and rotation BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const { - const U32 MAX_TES = 32; + const U32 MAX_TES = 42; U8 image_ids[MAX_TES*16]; U8 colors[MAX_TES*4]; @@ -1190,7 +1199,7 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const BOOL LLPrimitive::packTEMessage(LLDataPacker &dp) const { - const U32 MAX_TES = 32; + const U32 MAX_TES = 42; U8 image_ids[MAX_TES*16]; U8 colors[MAX_TES*4]; @@ -1303,6 +1312,8 @@ S32 LLPrimitive::parseTEMessage(LLMessageSystem* mesgsys, char const* block_name mesgsys->getBinaryDataFast(block_name, _PREHASH_TextureEntry, tec.packed_buffer, 0, block_num, LLTEContents::MAX_TE_BUFFER); } + + tec.face_count = llmin((U32)getNumTEs(),(U32)LLTEContents::MAX_TES); U8 *cur_ptr = tec.packed_buffer; @@ -1375,6 +1386,8 @@ S32 LLPrimitive::applyParsedTEMessage(LLTEContents& tec) retval |= setTEColor(i, color); + + } return retval; @@ -1393,7 +1406,7 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp) { // use a negative block_num to indicate a single-block read (a non-variable block) S32 retval = 0; - const U32 MAX_TES = 32; + const U32 MAX_TES = 42; // Avoid construction of 32 UUIDs per call static LLUUID image_ids[MAX_TES]; diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h index 19d9d52817..05dbca67c1 100644 --- a/indra/llprimitive/llprimitive.h +++ b/indra/llprimitive/llprimitive.h @@ -297,7 +297,7 @@ public: // - Vir struct LLTEContents { - static const U32 MAX_TES = 32; + static const U32 MAX_TES = 42; U8 image_data[MAX_TES*16]; U8 colors[MAX_TES*4]; diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 0ee1d451c0..73534bf495 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -369,7 +369,7 @@ LLEditWearableDictionary::TextureCtrls::TextureCtrls() addEntry (TEX_LEFT_LEG_TATTOO, new PickerControlEntry(TEX_LEFT_LEG_TATTOO, "Left Leg Tattoo", LLUUID::null, TRUE)); addEntry (TEX_AUX1_TATTOO, new PickerControlEntry(TEX_AUX1_TATTOO, "Aux1 Tattoo", LLUUID::null, TRUE)); addEntry (TEX_AUX2_TATTOO, new PickerControlEntry(TEX_AUX2_TATTOO, "Aux2 Tattoo", LLUUID::null, TRUE)); - addEntry (TEX_AUX3_BAKED, new PickerControlEntry(TEX_AUX3_TATTOO, "Aux3 Tattoo", LLUUID::null, TRUE)); + addEntry (TEX_AUX3_TATTOO, new PickerControlEntry(TEX_AUX3_TATTOO, "Aux3 Tattoo", LLUUID::null, TRUE)); } LLEditWearableDictionary::PickerControlEntry::PickerControlEntry(ETextureIndex tex_index, diff --git a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml index 549f4aca28..d122d7491c 100644 --- a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml @@ -245,7 +245,7 @@ follows="left|top" name="l_bake_use_texture_combo_box" tool_tip="Choose the bake texture" - width="108" + width="118" visible="false"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 97c830a421..f34b913218 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml @@ -3,7 +3,7 @@ background_visible="true" bevel_style="in" follows="all" - height="700" + height="570" help_topic="edit_wearable" label="Wearable" layout="topleft" @@ -411,7 +411,7 @@ gString; typedef std::pair< std::string, int > count_string_t; std::map< count_string_t, std::string > gCountString; -std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args) +std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args, bool def_string) { std::string text = gString[xml_desc]; LLStringUtil::format(text, args); diff --git a/indra/newview/tests/llworldmap_test.cpp b/indra/newview/tests/llworldmap_test.cpp index 84194adb5d..f1dd8acccf 100644 --- a/indra/newview/tests/llworldmap_test.cpp +++ b/indra/newview/tests/llworldmap_test.cpp @@ -66,7 +66,7 @@ void LLWorldMipmap::equalizeBoostLevels() { } LLPointer LLWorldMipmap::getObjectsTile(U32 grid_x, U32 grid_y, S32 level, bool load) { return NULL; } // Stub other stuff -std::string LLTrans::getString(const std::string &, const LLStringUtil::format_map_t& ) { return std::string("test_trans"); } +std::string LLTrans::getString(const std::string &, const LLStringUtil::format_map_t&, bool def_string) { return std::string("test_trans"); } void LLUIString::updateResult() const { } void LLUIString::setArg(const std::string& , const std::string& ) { } void LLUIString::assign(const std::string& ) { } -- cgit v1.2.3