relative path is not computed if already relative; editor updates;
This commit is contained in:
@@ -189,14 +189,14 @@ void LayerWindow::ResizeLayout()
|
||||
y += enableNoneButton.GetSize().y;
|
||||
y += padding;
|
||||
|
||||
float off_x = padding;
|
||||
float off_x = padding + 30;
|
||||
for (uint32_t i = 0; i < arraysize(layers); ++i)
|
||||
{
|
||||
layers[i].SetPos(XMFLOAT2(off_x, y));
|
||||
off_x += 50;
|
||||
if (off_x + layers[i].GetSize().x > width - padding)
|
||||
{
|
||||
off_x = padding;
|
||||
off_x = padding + 30;
|
||||
y += layers[i].GetSize().y;
|
||||
y += padding;
|
||||
}
|
||||
|
||||
+10
-10
@@ -860,15 +860,15 @@ void TerrainWindow::SetupAssets()
|
||||
terrain_preset.material_Slope.SetRoughness(0.1f);
|
||||
terrain_preset.material_LowAltitude.SetRoughness(1);
|
||||
terrain_preset.material_HighAltitude.SetRoughness(1);
|
||||
terrain_preset.material_Base.textures[MaterialComponent::BASECOLORMAP].name = "terrain/base.jpg";
|
||||
terrain_preset.material_Base.textures[MaterialComponent::NORMALMAP].name = "terrain/base_nor.jpg";
|
||||
terrain_preset.material_Slope.textures[MaterialComponent::BASECOLORMAP].name = "terrain/slope.jpg";
|
||||
terrain_preset.material_Slope.textures[MaterialComponent::NORMALMAP].name = "terrain/slope_nor.jpg";
|
||||
terrain_preset.material_LowAltitude.textures[MaterialComponent::BASECOLORMAP].name = "terrain/low_altitude.jpg";
|
||||
terrain_preset.material_LowAltitude.textures[MaterialComponent::NORMALMAP].name = "terrain/low_altitude_nor.jpg";
|
||||
terrain_preset.material_HighAltitude.textures[MaterialComponent::BASECOLORMAP].name = "terrain/high_altitude.jpg";
|
||||
terrain_preset.material_HighAltitude.textures[MaterialComponent::NORMALMAP].name = "terrain/high_altitude_nor.jpg";
|
||||
terrain_preset.material_GrassParticle.textures[MaterialComponent::BASECOLORMAP].name = "terrain/grassparticle.png";
|
||||
terrain_preset.material_Base.textures[MaterialComponent::BASECOLORMAP].name = wi::helper::GetCurrentPath() + "/terrain/base.jpg";
|
||||
terrain_preset.material_Base.textures[MaterialComponent::NORMALMAP].name = wi::helper::GetCurrentPath() + "/terrain/base_nor.jpg";
|
||||
terrain_preset.material_Slope.textures[MaterialComponent::BASECOLORMAP].name = wi::helper::GetCurrentPath() + "/terrain/slope.jpg";
|
||||
terrain_preset.material_Slope.textures[MaterialComponent::NORMALMAP].name = wi::helper::GetCurrentPath() + "/terrain/slope_nor.jpg";
|
||||
terrain_preset.material_LowAltitude.textures[MaterialComponent::BASECOLORMAP].name = wi::helper::GetCurrentPath() + "/terrain/low_altitude.jpg";
|
||||
terrain_preset.material_LowAltitude.textures[MaterialComponent::NORMALMAP].name = wi::helper::GetCurrentPath() + "/terrain/low_altitude_nor.jpg";
|
||||
terrain_preset.material_HighAltitude.textures[MaterialComponent::BASECOLORMAP].name = wi::helper::GetCurrentPath() + "/terrain/high_altitude.jpg";
|
||||
terrain_preset.material_HighAltitude.textures[MaterialComponent::NORMALMAP].name = wi::helper::GetCurrentPath() + "/terrain/high_altitude_nor.jpg";
|
||||
terrain_preset.material_GrassParticle.textures[MaterialComponent::BASECOLORMAP].name = wi::helper::GetCurrentPath() + "/terrain/grassparticle.png";
|
||||
terrain_preset.material_GrassParticle.alphaRef = 0.75f;
|
||||
terrain_preset.grass_properties.length = 2;
|
||||
terrain_preset.grass_properties.frameCount = 2;
|
||||
@@ -882,7 +882,7 @@ void TerrainWindow::SetupAssets()
|
||||
terrain_preset.material_GrassParticle.CreateRenderData();
|
||||
|
||||
Scene props_scene;
|
||||
wi::scene::LoadModel(props_scene, "terrain/props.wiscene");
|
||||
wi::scene::LoadModel(props_scene, wi::helper::GetCurrentPath() + "/terrain/props.wiscene");
|
||||
|
||||
// Tree prop:
|
||||
if(props_scene.Entity_FindByName("tree_mesh") != INVALID_ENTITY)
|
||||
|
||||
@@ -649,11 +649,14 @@ namespace wi::helper
|
||||
#else
|
||||
|
||||
std::filesystem::path filepath = path;
|
||||
std::filesystem::path rootpath = rootdir;
|
||||
std::filesystem::path relative = std::filesystem::relative(path, rootdir);
|
||||
if (!relative.empty())
|
||||
if (filepath.is_absolute())
|
||||
{
|
||||
path = relative.string();
|
||||
std::filesystem::path rootpath = rootdir;
|
||||
std::filesystem::path relative = std::filesystem::relative(path, rootdir);
|
||||
if (!relative.empty())
|
||||
{
|
||||
path = relative.string();
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PLATFORM_UWP
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace wi::version
|
||||
// minor features, major updates, breaking compatibility changes
|
||||
const int minor = 71;
|
||||
// minor bug fixes, alterations, refactors, updates
|
||||
const int revision = 56;
|
||||
const int revision = 57;
|
||||
|
||||
const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user