SL-17653 Flip imported GLTF textures, remove .dae and .glb/.gltf from file dialogs that don't support them

meow-7.2.2
Dave Parks 2022-06-23 18:06:55 -05:00
parent beb763c4a0
commit 6ce3df5514
2 changed files with 7 additions and 2 deletions

View File

@ -59,7 +59,7 @@ LLFilePicker LLFilePicker::sInstance;
#define XML_FILTER L"XML files (*.xml)\0*.xml\0"
#define SLOBJECT_FILTER L"Objects (*.slobject)\0*.slobject\0"
#define RAW_FILTER L"RAW files (*.raw)\0*.raw\0"
#define MODEL_FILTER L"Model files (*.dae; *.gltf; *.glb)\0*.dae;*.gltf;*.glb\0"
#define MODEL_FILTER L"Model files (*.dae)\0*.dae\0"
#define MATERIAL_FILTER L"GLTF Files (*.gltf; *.glb)\0*.gltf;*.glb\0"
#define SCRIPT_FILTER L"Script files (*.lsl)\0*.lsl\0"
#define DICTIONARY_FILTER L"Dictionary files (*.dic; *.xcu)\0*.dic;*.xcu\0"

View File

@ -280,7 +280,7 @@ private:
};
LLMaterialFilePicker::LLMaterialFilePicker(LLMaterialEditor* me)
: LLFilePickerThread(LLFilePicker::FFLOAD_MODEL)
: LLFilePickerThread(LLFilePicker::FFLOAD_MATERIAL)
{
mME = me;
}
@ -325,6 +325,7 @@ static LLViewerFetchedTexture* get_texture(const std::string& folder, const tiny
image->component <= 4)
{
LLPointer<LLImageRaw> rawImage = new LLImageRaw(&image->image[0], image->width, image->height, image->component);
rawImage->verticalFlip();
ret = LLViewerTextureManager::getFetchedTexture(rawImage, FTType::FTT_LOCAL_FILE, true);
@ -449,6 +450,8 @@ void LLMaterialFilePicker::loadMaterial(const std::string& filename)
mME->setDoubleSided(material_in.doubleSided);
mME->openFloater();
mME->applyToSelection();
}
void LLMaterialEditor::importMaterial()
@ -484,5 +487,7 @@ void LLMaterialEditor::applyToSelection()
vobjp->getTE(i)->setGLTFMaterial(mat);
vobjp->updateTEMaterialTextures(i);
}
vobjp->markForUpdate(TRUE);
}
}