Skip to content

Commit

Permalink
Copy faces
Browse files Browse the repository at this point in the history
  • Loading branch information
UnrealKaraulov committed Dec 18, 2023
1 parent 46edbc7 commit 17d1ff7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/editor/Command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ void DuplicateBspModelCommand::execute()

ent->setOrAddKeyvalue("model", "*" + std::to_string(newModelIdx));


map->remove_unused_model_structures(CLEAN_LEAVES);

renderer->loadLightmaps();
Expand Down
15 changes: 14 additions & 1 deletion src/editor/Gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,24 @@ void Gui::copyTexture()
print_log(PRINT_RED | PRINT_INTENSITY, get_localized_string(LANG_0313));
return;
}
else if (app->pickInfo.selectedFaces.size() == 0 || app->pickInfo.selectedFaces.size() > 1)
else if (app->pickInfo.selectedFaces.size() == 0 )
{
print_log(PRINT_RED | PRINT_INTENSITY, get_localized_string(LANG_0314));
return;
}
else if (app->pickInfo.selectedFaces.size() >= 1)
{
std::string outfaces;
for (const auto& f : app->pickInfo.selectedFaces)
{
outfaces += std::to_string(f) + " ";
}
if (outfaces.size())
{
outfaces.pop_back();
ImGui::SetClipboardText(outfaces.c_str());
}
}
BSPTEXTUREINFO& texinfo = map->texinfos[map->faces[app->pickInfo.selectedFaces[0]].iTextureInfo];
copiedMiptex = texinfo.iMiptex == -1 || texinfo.iMiptex >= map->textureCount ? 0 : texinfo.iMiptex;
}
Expand Down

0 comments on commit 17d1ff7

Please sign in to comment.