Skip to content
Snippets Groups Projects
Commit 82c99ffa authored by Ptolemy's avatar Ptolemy
Browse files

Merge branch 'DRTVWR-559' of bitbucket.org:lindenlab/viewer into DRTVWR-559

parents 980e8c0a 4f9f7de3
No related branches found
No related tags found
No related merge requests found
...@@ -61,6 +61,7 @@ LLFilePicker LLFilePicker::sInstance; ...@@ -61,6 +61,7 @@ LLFilePicker LLFilePicker::sInstance;
#define RAW_FILTER L"RAW files (*.raw)\0*.raw\0" #define RAW_FILTER L"RAW files (*.raw)\0*.raw\0"
#define MODEL_FILTER L"Model files (*.dae)\0*.dae\0" #define MODEL_FILTER L"Model files (*.dae)\0*.dae\0"
#define MATERIAL_FILTER L"GLTF Files (*.gltf; *.glb)\0*.gltf;*.glb\0" #define MATERIAL_FILTER L"GLTF Files (*.gltf; *.glb)\0*.gltf;*.glb\0"
#define MATERIAL_TEXTURES_FILTER L"GLTF Import (*.gltf; *.glb; *.tga; *.bmp; *.jpg; *.jpeg; *.png)\0*.gltf;*.glb;*.tga;*.bmp;*.jpg;*.jpeg;*.png\0"
#define SCRIPT_FILTER L"Script files (*.lsl)\0*.lsl\0" #define SCRIPT_FILTER L"Script files (*.lsl)\0*.lsl\0"
#define DICTIONARY_FILTER L"Dictionary files (*.dic; *.xcu)\0*.dic;*.xcu\0" #define DICTIONARY_FILTER L"Dictionary files (*.dic; *.xcu)\0*.dic;*.xcu\0"
#endif #endif
...@@ -220,6 +221,12 @@ BOOL LLFilePicker::setupFilter(ELoadFilter filter) ...@@ -220,6 +221,12 @@ BOOL LLFilePicker::setupFilter(ELoadFilter filter)
mOFN.lpstrFilter = MATERIAL_FILTER \ mOFN.lpstrFilter = MATERIAL_FILTER \
L"\0"; L"\0";
break; break;
case FFLOAD_MATERIAL_TEXTURE:
mOFN.lpstrFilter = MATERIAL_TEXTURES_FILTER \
MATERIAL_FILTER \
IMAGE_FILTER \
L"\0";
break;
case FFLOAD_SCRIPT: case FFLOAD_SCRIPT:
mOFN.lpstrFilter = SCRIPT_FILTER \ mOFN.lpstrFilter = SCRIPT_FILTER \
L"\0"; L"\0";
......
...@@ -87,7 +87,8 @@ class LLFilePicker ...@@ -87,7 +87,8 @@ class LLFilePicker
FFLOAD_DICTIONARY = 12, FFLOAD_DICTIONARY = 12,
FFLOAD_DIRECTORY = 13, // To call from lldirpicker. FFLOAD_DIRECTORY = 13, // To call from lldirpicker.
FFLOAD_EXE = 14, // Note: EXE will be treated as ALL on Windows and Linux but not on Darwin FFLOAD_EXE = 14, // Note: EXE will be treated as ALL on Windows and Linux but not on Darwin
FFLOAD_MATERIAL = 15 FFLOAD_MATERIAL = 15,
FFLOAD_MATERIAL_TEXTURE = 16,
}; };
enum ESaveFilter enum ESaveFilter
......
...@@ -908,7 +908,11 @@ void LLFloaterTexturePicker::onBtnAdd(void* userdata) ...@@ -908,7 +908,11 @@ void LLFloaterTexturePicker::onBtnAdd(void* userdata)
{ {
LLFloaterTexturePicker* self = (LLFloaterTexturePicker*)userdata; LLFloaterTexturePicker* self = (LLFloaterTexturePicker*)userdata;
LLFilePickerReplyThread::startPicker(boost::bind(&onPickerCallback, _1, self->getHandle()), LLFilePicker::FFLOAD_ALL, true); // todo: there will be changes to texture picker to forbid
// selection of materials in some cases, like landmarks, once
// it gets implemented, update code to select FLOAD_* filter
// based on picker's material/texture mode.
LLFilePickerReplyThread::startPicker(boost::bind(&onPickerCallback, _1, self->getHandle()), LLFilePicker::FFLOAD_MATERIAL_TEXTURE, true);
} }
// static // static
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment