#include "brushmodule.h"
#include "brush.h"
+bool g_writeMapComments = true;
+
class NameObserver {
UniqueNames &m_names;
CopiedString m_name;
void Map_ExportSelected(TextOutputStream &out, const MapFormat &format)
{
- format.writeGraph(GlobalSceneGraph().root(), Map_Traverse_Selected, out);
+ format.writeGraph(GlobalSceneGraph().root(), Map_Traverse_Selected, out, g_writeMapComments);
}
void Map_Traverse(scene::Node &root, const scene::Traversable::Walker &walker)
void Map_constructPreferences(PreferencesPage &page)
{
page.appendCheckBox("", "Load last map on open", g_bLoadLastMap);
+ page.appendCheckBox("", "Add entity and brush number comments on map write", g_writeMapComments);
}
GlobalPreferenceSystem().registerPreference("LastMap", make_property_string(g_strLastMap));
GlobalPreferenceSystem().registerPreference("LoadLastMap", make_property_string(g_bLoadLastMap));
GlobalPreferenceSystem().registerPreference("MapInfoDlg", make_property<WindowPosition_String>(g_posMapInfoWnd));
+ GlobalPreferenceSystem().registerPreference("WriteMapComments", make_property_string(g_writeMapComments));
PreferencesDialog_addSettingsPreferences(makeCallbackF(Map_constructPreferences));