@@ -1333,22 +1333,22 @@ const std::string LLMaterialEditor::buildMaterialDescription()
1333
1333
desc << mNormalName ;
1334
1334
}
1335
1335
1336
- // trim last char if it's a ',' in case there is no normal texture
1337
- // present and the code above inserts one
1338
- // (no need to check for string length - always has initial string)
1339
- std::string::iterator iter = desc.str ().end () - 1 ;
1340
- if (*iter == ' ,' )
1341
- {
1342
- desc.str ().erase (iter);
1343
- }
1344
-
1345
1336
// sanitize the material description so that it's compatible with the inventory
1346
1337
// note: split this up because clang doesn't like operating directly on the
1347
1338
// str() - error: lvalue reference to type 'basic_string<...>' cannot bind to a
1348
1339
// temporary of type 'basic_string<...>'
1349
1340
std::string inv_desc = desc.str ();
1350
1341
LLInventoryObject::correctInventoryName (inv_desc);
1351
1342
1343
+ // trim last char if it's a ',' in case there is no normal texture
1344
+ // present and the code above inserts one
1345
+ // (no need to check for string length - always has initial string)
1346
+ std::string::iterator iter = inv_desc.end () - 1 ;
1347
+ if (*iter == ' ,' )
1348
+ {
1349
+ inv_desc.erase (iter);
1350
+ }
1351
+
1352
1352
return inv_desc;
1353
1353
}
1354
1354
@@ -2685,10 +2685,8 @@ const std::string LLMaterialEditor::getImageNameFromUri(std::string image_uri, c
2685
2685
// so we can include everything
2686
2686
if (stripped_uri.length () > 0 )
2687
2687
{
2688
- // example "DamagedHelmet: base layer"
2688
+ // example "base layer"
2689
2689
return STRINGIZE (
2690
- mMaterialNameShort <<
2691
- " : " <<
2692
2690
stripped_uri <<
2693
2691
" (" <<
2694
2692
texture_type <<
@@ -2697,28 +2695,17 @@ const std::string LLMaterialEditor::getImageNameFromUri(std::string image_uri, c
2697
2695
}
2698
2696
else
2699
2697
// uri doesn't include the type (because the uri is empty)
2700
- // so we must reorganize the string a bit to include the name
2701
- // and an explicit name type
2698
+ // include an explicit name type
2702
2699
{
2703
- // example "DamagedHelmet: (Emissive)"
2704
- return STRINGIZE (
2705
- mMaterialNameShort <<
2706
- " (" <<
2707
- texture_type <<
2708
- " )"
2709
- );
2700
+ // example "Emissive"
2701
+ return texture_type;
2710
2702
}
2711
2703
}
2712
2704
else
2713
- // uri includes the type so just use it directly with the
2714
- // name of the material
2705
+ // uri includes the type so just use it directly
2715
2706
{
2716
- return STRINGIZE (
2717
- // example: AlienBust: normal_layer
2718
- mMaterialNameShort <<
2719
- " : " <<
2720
- stripped_uri
2721
- );
2707
+ // example: "normal_layer"
2708
+ return stripped_uri;
2722
2709
}
2723
2710
}
2724
2711
0 commit comments