Skip to content

Commit

Permalink
- добавлено создание папки с результатами
Browse files Browse the repository at this point in the history
- убран префикс из имен файлов анимаций

fix #6
  • Loading branch information
abramcumner committed Jun 6, 2019
1 parent 1d49112 commit 47a0186
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sources/utils/converter/object_tools.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ std::function<bool(const std::string&)> create_filter(const std::string& motion_

void object_tools::save_skl(xray_re::xr_object& object, const char* source, const cl_parser& cl) const
{
std::string prefix;
xr_file_system::split_path(source, 0, &prefix);
if (m_output_file.empty() && !m_output_folder.empty())
xr_file_system::instance().create_path(m_output_folder);

std::string motion_name;
cl.get_string("-skl", motion_name);

Expand All @@ -119,7 +120,7 @@ void object_tools::save_skl(xray_re::xr_object& object, const char* source, cons
continue;

std::string name{ el->name() };
std::string target = m_output_file.empty() ? m_output_folder + prefix + '_' + name + ".skl" : m_output_file;
std::string target = m_output_file.empty() ? m_output_folder + name + ".skl" : m_output_file;
if (!el->save_skl(target.c_str()))
msg("can't save %s", target.c_str());

Expand Down

0 comments on commit 47a0186

Please sign in to comment.