Fixes for tattoo tinting - With any luck this will reduce the number of ruths.

Signed-off-by: Beeks <HgDelirium@gmail.com>
This commit is contained in:
Beeks
2010-09-26 14:24:34 -04:00
parent 961d2e44f5
commit 4cace48a9b
4 changed files with 35 additions and 97 deletions

View File

@@ -6608,8 +6608,7 @@
</layer>
<layer
name="head_tattoo">
<texture
local_texture="head_tattoo" />
<texture local_texture="head_tattoo" />
<param id="1062" group="1" edit_group="colorpicker_driven" wearable="tattoo"
name="tattoo_head_red" value_min="0" value_max="1" value_default="1">
<param_color>
@@ -6749,11 +6748,9 @@
</param>
</layer>
<layer
name="upper_tattoo">
<texture
local_texture="upper_tattoo" />
<param id="1065" group="1" edit_group="colorpicker_driven" wearable="tattoo"
<layer name="upper_tattoo">
<texture local_texture="upper_tattoo" />
<param id="1065" group="1" edit_group="colorpicker_driven" wearable="tattoo"
name="tattoo_upper_red" value_min="0" value_max="1" value_default="1">
<param_color>
<value color="0, 0, 0, 255" />
@@ -7972,9 +7969,8 @@
<layer
name="lower_tattoo">
<texture
local_texture="lower_tattoo" />
<param id="1068" group="1" edit_group="colorpicker_driven" wearable="tattoo"
<texture local_texture="lower_tattoo" />
<param id="1068" group="1" edit_group="colorpicker_driven" wearable="tattoo"
name="tattoo_lower_red" value_min="0" value_max="1" value_default="1">
<param_color>
<value color="0, 0, 0, 255" />

View File

@@ -2212,7 +2212,6 @@ void LLFloaterCustomize::initWearablePanels()
part->mTargetOffset.setVec(0.f, 0.f, 0.1f);
part->mCameraOffset.setVec(-2.5f, 0.5f, 0.8f);
panel->addSubpart(LLStringUtil::null, SUBPART_TATTOO, part);
panel->addColorSwatch(TEX_LOWER_TATTOO, "Color/Tint");
panel->addTextureDropTarget(TEX_LOWER_TATTOO, "Lower Tattoo",
LLUUID::null,
@@ -2223,6 +2222,7 @@ void LLFloaterCustomize::initWearablePanels()
panel->addTextureDropTarget(TEX_HEAD_TATTOO, "Head Tattoo",
LLUUID::null,
TRUE);
panel->addColorSwatch(TEX_LOWER_TATTOO, "Color/Tint"); //-ASC-TTRFE
}
/////////////////////////////////////////

View File

@@ -798,13 +798,11 @@ void upload_new_resource(const std::string& src_filename, std::string name,
return;
}
}
// <edit>
else if(exten == "ogg")
{
asset_type = LLAssetType::AT_SOUND; // tag it as audio
filename = src_filename;
}
// </edit>
else if(exten == "tmp")
{
// This is a generic .lin resource file
@@ -924,82 +922,21 @@ void upload_new_resource(const std::string& src_filename, std::string name,
}
else if (exten == "bvh")
{
// <edit> THE FUCK WE DON'T
//error_message = llformat("We do not currently support bulk upload of animation files\n");
//upload_error(error_message, "DoNotSupportBulkAnimationUpload", filename, args);
//return;
asset_type = LLAssetType::AT_ANIMATION;
S32 file_size;
LLAPRFile fp;
if(!fp.open(src_filename, LL_APR_RB, LLAPRFile::local, &file_size))
{
args["ERROR_MESSAGE"] = llformat("Couldn't read file %s\n", src_filename.c_str());
LLNotifications::instance().add("ErrorMessage", args);
return;
}
char* file_buffer = new char[file_size + 1];
if(!fp.read(file_buffer, file_size))
{
fp.close();
delete[] file_buffer;
args["ERROR_MESSAGE"] = llformat("Couldn't read file %s\n", src_filename.c_str());
LLNotifications::instance().add("ErrorMessage", args);
return;
}
LLBVHLoader* loaderp = new LLBVHLoader(file_buffer);
if(!loaderp->isInitialized())
{
fp.close();
delete[] file_buffer;
args["ERROR_MESSAGE"] = llformat("Couldn't convert file %s to internal animation format\n", src_filename.c_str());
LLNotifications::instance().add("ErrorMessage", args);
return;
}
S32 buffer_size = loaderp->getOutputSize();
U8* buffer = new U8[buffer_size];
LLDataPackerBinaryBuffer dp(buffer, buffer_size);
loaderp->serialize(dp);
LLAPRFile apr_file;
apr_file.open(filename, LL_APR_WB, LLAPRFile::local);
apr_file.write(buffer, buffer_size);
delete[] file_buffer;
delete[] buffer;
fp.close();
apr_file.close();
// </edit>
error_message = llformat("We do not currently support bulk upload of animation files\n");
upload_error(error_message, "DoNotSupportBulkAnimationUpload", filename, args);
return;
}
// <edit>
else if (exten == "animatn")
else if (exten == "anim" || exten == "animatn")
{
asset_type = LLAssetType::AT_ANIMATION;
filename = src_filename;
}
else if(exten == "jp2" || exten == "j2k" || exten == "j2c")
else if(exten == "j2k" || exten == "jp2" || exten == "j2c")
{
asset_type = LLAssetType::AT_TEXTURE;
filename = src_filename;
}
else if(exten == "gesture")
{
asset_type = LLAssetType::AT_GESTURE;
filename = src_filename;
}
else if(exten == "notecard")
{
asset_type = LLAssetType::AT_NOTECARD;
filename = src_filename;
}
else if(exten == "lsl")
{
asset_type = LLAssetType::AT_LSL_TEXT;
filename = src_filename;
}
else if(exten == "eyes" || exten == "gloves" || exten == "hair" || exten == "jacket" || exten == "pants" || exten == "shape" || exten == "shirt" || exten == "shoes" || exten == "skin" || exten == "skirt" || exten == "socks" || exten == "underpants" || exten == "undershirt" || exten == "bodypart" || exten == "clothing")
{
asset_type = LLAssetType::AT_CLOTHING;
filename = src_filename;
}
// </edit>
else
{
@@ -1105,7 +1042,8 @@ void temp_upload_callback(const LLUUID& uuid, void* user_data, S32 result, LLExt
perms->setMaskNext(PERM_ALL);
LLUUID destination = gInventory.findCategoryUUIDForType(LLAssetType::AT_TEXTURE);
if (gSavedSettings.getBOOL("AscentUseSystemFolder") && gSavedSettings.getBOOL("AscentSystemTemporary"))
BOOL bUseSystemInventory = (gSavedSettings.getBOOL("AscentUseSystemFolder") && gSavedSettings.getBOOL("AscentSystemTemporary"));
if (bUseSystemInventory)
{
destination = gSystemFolderAssets;
}
@@ -1121,7 +1059,16 @@ void temp_upload_callback(const LLUUID& uuid, void* user_data, S32 result, LLExt
LLSaleInfo::DEFAULT,
0,
time_corrected());
LLLocalInventory::addItem(item);
if (bUseSystemInventory)
{
LLLocalInventory::addItem(item);
}
else
{
item->updateServer(TRUE);
gInventory.updateItem(item);
gInventory.notifyObservers();
}
}
else
{

View File

@@ -8656,13 +8656,13 @@ BOOL LLVOAvatar::teToColorParams( ETextureIndex te, const char* param_name[3] )
param_name[2] = "skirt_blue";
break;
case TEX_HEAD_TATTOO:
case TEX_HEAD_TATTOO: //-ASC-TTRFE
case TEX_LOWER_TATTOO:
case TEX_UPPER_TATTOO:
param_name[0] = "tattoo_red";
param_name[1] = "tattoo_green";
param_name[2] = "tattoo_blue";
break;
break;
default:
llassert(0);
@@ -9102,7 +9102,8 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
&& mBakedTextureData[baked_index].mLastTextureIndex != IMG_DEFAULT
&& baked_index != BAKED_SKIRT)
{
setTEImage(mBakedTextureData[baked_index].mTextureIndex, gImageList.getImage(mBakedTextureData[baked_index].mLastTextureIndex));
setTEImage(mBakedTextureData[baked_index].mTextureIndex,
gImageList.getImage(mBakedTextureData[baked_index].mLastTextureIndex));
}
}
@@ -9121,16 +9122,12 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
}
setCompositeUpdatesEnabled( FALSE );
// <edit>
/*
if (!mIsSelf)
{
releaseUnnecessaryTextures();
//releaseUnnecessaryTextures(); Commented out to ensure that users get the right client data -HgB
}
*/
// </edit>
updateMeshTextures(); // enables updates for laysets without baked textures.
// parse visual params
@@ -9149,6 +9146,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
{
for( S32 i = 0; i < num_blocks; i++ )
{
while( param && (param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE) )
{
param = getNextVisualParam();
@@ -9156,7 +9154,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
if( !param )
{
llwarns << "Number of params in AvatarAppearance msg does not match number of params in avatar xml file for " << getFullname() << " (Too few)." << llendl;
llwarns << "Number of params in AvatarAppearance msg does not match number of params in avatar xml file for " << getFullname() << " (Too many)." << llendl;
return;
}
@@ -9206,11 +9204,8 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
}
if( param )
{
if (param->getName() == "tattoo_red")
llinfos << "No tattoo tinting for " << getFullname() << "." << llendl;
else
llwarns << "Number of params in AvatarAppearance msg does not match number of params in avatar xml file for " << getFullname() << " (Prematurely reached end of list at " << param->getName() << ")." << llendl;
return;
llwarns << "Number of params in AvatarAppearance msg does not match number of params in avatar xml file for " << getFullname() << " (Prematurely reached end of list at " << param->getName() << ")." << llendl;
//return; //ASC-TTRFE
}
if (params_changed)