Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 831 vs 832 for /trunk/Source Code/Geometry/Importer/DVDConverter.cpp

Diff revisions: vs.
  @@ -410,13 +410,11 @@
410 410 break;
411 411 }
412 412 // get full path
413 - stringImpl path(Texture::s_defaultTextureFilePath);
414 - path.append("/");
415 - path.append(tName.data);
416 -
417 - std::pair<stringImpl, stringImpl> fileResult = SplitPathToNameAndLocation(path);
418 - const stringImpl& img_name = fileResult.first;
419 - const stringImpl& img_path = fileResult.second;
413 + stringImpl path(Paths::g_assetsLocation + Paths::g_texturesLocation + tName.data);
414 +
415 + FileWithPath fileResult = splitPathToNameAndLocation(path);
416 + const stringImpl& img_name = fileResult._fileName;
417 + const stringImpl& img_path = fileResult._path;
420 418
421 419 // if we have a name and an extension
422 420 if (!img_name.substr(img_name.find_first_of(".")).empty()) {
  @@ -457,13 +455,11 @@
457 455 result = source->GetTexture(aiTextureType_NORMALS, 0, &tName, &mapping,
458 456 &uvInd, &blend, &op, mode);
459 457 if (result == AI_SUCCESS) {
460 - stringImpl path(Texture::s_defaultTextureFilePath);
461 - path.append("/");
462 - path.append(tName.data);
463 -
464 - std::pair<stringImpl, stringImpl> fileResult = SplitPathToNameAndLocation(path);
465 - const stringImpl& img_name = fileResult.first;
466 - const stringImpl& img_path = fileResult.second;
458 + stringImpl path(Paths::g_assetsLocation + Paths::g_texturesLocation + tName.data);
459 +
460 + FileWithPath fileResult = splitPathToNameAndLocation(path);
461 + const stringImpl& img_name = fileResult._fileName;
462 + const stringImpl& img_path = fileResult._path;
467 463
468 464 Import::TextureEntry& texture = material._textures[to_const_uint(ShaderProgram::TextureUsage::NORMALMAP)];
469 465
  @@ -489,13 +485,11 @@
489 485 result = source->GetTexture(aiTextureType_HEIGHT, 0, &tName, &mapping,
490 486 &uvInd, &blend, &op, mode);
491 487 if (result == AI_SUCCESS) {
492 - stringImpl path(Texture::s_defaultTextureFilePath);
493 - path.append("/");
494 - path.append(tName.data);
495 -
496 - std::pair<stringImpl, stringImpl> fileResult = SplitPathToNameAndLocation(path);
497 - const stringImpl& img_name = fileResult.first;
498 - const stringImpl& img_path = fileResult.second;
488 + stringImpl path(Paths::g_assetsLocation + Paths::g_texturesLocation + tName.data);
489 +
490 + FileWithPath fileResult = splitPathToNameAndLocation(path);
491 + const stringImpl& img_name = fileResult._fileName;
492 + const stringImpl& img_path = fileResult._path;
499 493
500 494 Import::TextureEntry& texture = material._textures[to_const_uint(ShaderProgram::TextureUsage::NORMALMAP)];
501 495 if (img_name.rfind('.') != stringImpl::npos) {
  @@ -525,13 +519,11 @@
525 519 result = source->GetTexture(aiTextureType_OPACITY, 0, &tName, &mapping,
526 520 &uvInd, &blend, &op, mode);
527 521 if (result == AI_SUCCESS) {
528 - stringImpl path(Texture::s_defaultTextureFilePath);
529 - path.append("/");
530 - path.append(tName.data);
531 -
532 - std::pair<stringImpl, stringImpl> fileResult = SplitPathToNameAndLocation(path);
533 - const stringImpl& img_name = fileResult.first;
534 - const stringImpl& img_path = fileResult.second;
522 + stringImpl path(Paths::g_assetsLocation + Paths::g_texturesLocation + tName.data);
523 +
524 + FileWithPath fileResult = splitPathToNameAndLocation(path);
525 + const stringImpl& img_name = fileResult._fileName;
526 + const stringImpl& img_path = fileResult._path;
535 527
536 528 Import::TextureEntry& texture = material._textures[to_const_uint(ShaderProgram::TextureUsage::OPACITY)];
537 529
  @@ -558,13 +550,11 @@
558 550 result = source->GetTexture(aiTextureType_SPECULAR, 0, &tName, &mapping,
559 551 &uvInd, &blend, &op, mode);
560 552 if (result == AI_SUCCESS) {
561 - stringImpl path(Texture::s_defaultTextureFilePath);
562 - path.append("/");
563 - path.append(tName.data);
564 -
565 - std::pair<stringImpl, stringImpl> fileResult = SplitPathToNameAndLocation(path);
566 - const stringImpl& img_name = fileResult.first;
567 - const stringImpl& img_path = fileResult.second;
553 + stringImpl path(Paths::g_assetsLocation + Paths::g_texturesLocation + tName.data);
554 +
555 + FileWithPath fileResult = splitPathToNameAndLocation(path);
556 + const stringImpl& img_name = fileResult._fileName;
557 + const stringImpl& img_path = fileResult._path;
568 558
569 559 Import::TextureEntry& texture = material._textures[to_const_uint(ShaderProgram::TextureUsage::SPECULAR)];
570 560 if (img_name.rfind('.') != stringImpl::npos) {