Modules: Don't build editor-specific classes in templates
They're moved to an `editor` subfolder so that we can easily handle them separately.
This commit is contained in:
@ -5,4 +5,7 @@ Import("env_modules")
|
||||
|
||||
env_gridmap = env_modules.Clone()
|
||||
|
||||
# Godot's own source files
|
||||
env_gridmap.add_source_files(env.modules_sources, "*.cpp")
|
||||
if env["tools"]:
|
||||
env_gridmap.add_source_files(env.modules_sources, "editor/*.cpp")
|
||||
|
||||
@ -29,14 +29,16 @@
|
||||
/*************************************************************************/
|
||||
|
||||
#include "grid_map_editor_plugin.h"
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
|
||||
#include "core/input/input.h"
|
||||
#include "core/os/keyboard.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "editor/plugins/node_3d_editor_plugin.h"
|
||||
#include "scene/3d/camera_3d.h"
|
||||
|
||||
#include "core/os/keyboard.h"
|
||||
#include "scene/main/window.h"
|
||||
|
||||
void GridMapEditor::_node_removed(Node *p_node) {
|
||||
@ -1479,3 +1481,5 @@ GridMapEditorPlugin::GridMapEditorPlugin() {
|
||||
|
||||
GridMapEditorPlugin::~GridMapEditorPlugin() {
|
||||
}
|
||||
|
||||
#endif // TOOLS_ENABLED
|
||||
@ -31,8 +31,10 @@
|
||||
#ifndef GRID_MAP_EDITOR_PLUGIN_H
|
||||
#define GRID_MAP_EDITOR_PLUGIN_H
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
|
||||
#include "../grid_map.h"
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "grid_map.h"
|
||||
#include "scene/gui/item_list.h"
|
||||
#include "scene/gui/slider.h"
|
||||
#include "scene/gui/spin_box.h"
|
||||
@ -249,4 +251,6 @@ public:
|
||||
~GridMapEditorPlugin();
|
||||
};
|
||||
|
||||
#endif // CUBE_GRID_MAP_EDITOR_PLUGIN_H
|
||||
#endif // TOOLS_ENABLED
|
||||
|
||||
#endif // GRID_MAP_EDITOR_PLUGIN_H
|
||||
@ -28,21 +28,25 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#include "register_types.h"
|
||||
#ifndef _3D_DISABLED
|
||||
|
||||
#include "register_types.h"
|
||||
|
||||
#include "core/object/class_db.h"
|
||||
#include "grid_map.h"
|
||||
#include "grid_map_editor_plugin.h"
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
#include "editor/grid_map_editor_plugin.h"
|
||||
#endif
|
||||
|
||||
void register_gridmap_types() {
|
||||
#ifndef _3D_DISABLED
|
||||
GDREGISTER_CLASS(GridMap);
|
||||
#ifdef TOOLS_ENABLED
|
||||
EditorPlugins::add_by_type<GridMapEditorPlugin>();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void unregister_gridmap_types() {
|
||||
}
|
||||
|
||||
#endif // _3D_DISABLED
|
||||
|
||||
Reference in New Issue
Block a user