Skip to content

Commit

Permalink
ed ror copy common .material, rename colliding meshes
Browse files Browse the repository at this point in the history
  • Loading branch information
cryham committed Feb 17, 2024
1 parent d1659a7 commit ff100cc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/editor/ExportRoR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,19 @@ void ExportRoR::ExportTrack() // whole, full

ExportRoad();


// just copy common .material to track dir (done by convert in materials/)
string pathMtr = pSet->pathExportRoR + "materials/";
std::vector<string> files{
"objects_static.material",
"rocks.material",
"trees_ch.material",
"trees.material"};
for (auto& mtr : files)
CopyFile(pathMtr + mtr, path + mtr);

// todo and their textures? for used mesh materials ?


// 🖼️ copy Preview mini
//------------------------------------------------------------
Expand Down
8 changes: 8 additions & 0 deletions src/editor/ExportRoR_Veget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,14 @@ void ExportRoR::ExportVeget()
//----------------------------------
if (exists)
{
string name = mesh;
// rename colliding names with RoR
name = StringUtil::replaceAll(name, "palm2", "palm22");
if (name == mesh)
name = StringUtil::replaceAll(name, "palm", "palm11");
if (name != mesh)
gui->Exp(CGui::TXT, "renamed to: "+name);

if (!copyVeget)
++iVegetMesh;
else
Expand Down

0 comments on commit ff100cc

Please sign in to comment.