mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-02-06 16:16:06 +01:00
Renamed the new gizmo.
This commit is contained in:
parent
91f6141b5c
commit
dbff74222c
@ -49,8 +49,8 @@ sources = [
|
||||
|
||||
if env["tools"]:
|
||||
sources.append("editor/terrain_world_editor.cpp")
|
||||
sources.append("editor/terraman_gizmo.cpp")
|
||||
sources.append("editor/terraman_gizmo_plugin.cpp")
|
||||
sources.append("editor/terrain_world_gizmo.cpp")
|
||||
sources.append("editor/terrain_world_gizmo_plugin.cpp")
|
||||
|
||||
if env["module_texture_packer_enabled"]:
|
||||
sources.append("library/terrain_library_merger.cpp")
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include "editor/editor_scale.h"
|
||||
#include "editor/editor_settings.h"
|
||||
|
||||
#include "modules/terraman/editor/terraman_gizmo_plugin.h"
|
||||
#include "terrain_world_gizmo_plugin.h"
|
||||
|
||||
#include "../world/terrain_world.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
|
@ -43,7 +43,7 @@ class HSlider;
|
||||
class BoxContainer;
|
||||
class HFlowContainer;
|
||||
class SpinBox;
|
||||
class TerramanGizmoPlugin;
|
||||
class TerrainWorldGizmoPlugin;
|
||||
|
||||
class TerrainWorldEditor : public PanelContainer {
|
||||
GDCLASS(TerrainWorldEditor, PanelContainer);
|
||||
@ -183,7 +183,7 @@ class TerrainWorldEditorPlugin : public EditorPlugin {
|
||||
|
||||
TerrainWorldEditor *terrain_world_editor;
|
||||
EditorNode *editor;
|
||||
Ref<TerramanGizmoPlugin> gizmo_plugin;
|
||||
Ref<TerrainWorldGizmoPlugin> gizmo_plugin;
|
||||
|
||||
protected:
|
||||
void _notification(int p_what);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*************************************************************************/
|
||||
/* terraman_gizmo.cpp */
|
||||
/* terrain_world_gizmo.cpp */
|
||||
/*************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* PANDEMONIUM ENGINE */
|
||||
@ -29,27 +29,26 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#include "terraman_gizmo.h"
|
||||
#include "terrain_world_gizmo.h"
|
||||
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "scene/3d/camera.h"
|
||||
|
||||
void TerramanGizmo::set_visible(const bool visible) {
|
||||
void TerrainWorldGizmo::set_visible(const bool visible) {
|
||||
_visible = visible;
|
||||
redraw();
|
||||
}
|
||||
|
||||
void TerramanGizmo::set_editor_plugin(EditorPlugin *editor_plugin) {
|
||||
void TerrainWorldGizmo::set_editor_plugin(EditorPlugin *editor_plugin) {
|
||||
_editor_plugin = editor_plugin;
|
||||
|
||||
_undo_redo = EditorNode::get_undo_redo();
|
||||
}
|
||||
|
||||
void TerramanGizmo::set_handle(int index, bool secondary, Camera *camera, const Point2 &point) {
|
||||
void TerrainWorldGizmo::set_handle(int index, bool secondary, Camera *camera, const Point2 &point) {
|
||||
}
|
||||
|
||||
void TerramanGizmo::redraw() {
|
||||
void TerrainWorldGizmo::redraw() {
|
||||
clear();
|
||||
|
||||
if (!_visible) {
|
||||
@ -84,18 +83,18 @@ void TerramanGizmo::redraw() {
|
||||
}
|
||||
*/
|
||||
}
|
||||
void TerramanGizmo::apply() {
|
||||
void TerrainWorldGizmo::apply() {
|
||||
}
|
||||
|
||||
TerramanGizmo::TerramanGizmo() {
|
||||
TerrainWorldGizmo::TerrainWorldGizmo() {
|
||||
_editor_plugin = nullptr;
|
||||
_undo_redo = nullptr;
|
||||
|
||||
_visible = false;
|
||||
}
|
||||
|
||||
TerramanGizmo::~TerramanGizmo() {
|
||||
TerrainWorldGizmo::~TerrainWorldGizmo() {
|
||||
}
|
||||
|
||||
void TerramanGizmo::_bind_methods() {
|
||||
void TerrainWorldGizmo::_bind_methods() {
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
#define TERRAMAN_GIZMO_H
|
||||
|
||||
/*************************************************************************/
|
||||
/* terraman_gizmo.h */
|
||||
/* terrain_world_gizmo.h */
|
||||
/*************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* PANDEMONIUM ENGINE */
|
||||
@ -34,8 +34,6 @@
|
||||
|
||||
#include "editor/spatial_editor_gizmos.h"
|
||||
|
||||
#include "core/variant/variant.h"
|
||||
|
||||
class Camera;
|
||||
class MeshDataResource;
|
||||
class MDREDMeshOutline;
|
||||
@ -43,8 +41,8 @@ class InputEvent;
|
||||
class EditorPlugin;
|
||||
class UndoRedo;
|
||||
|
||||
class TerramanGizmo : public EditorSpatialGizmo {
|
||||
GDCLASS(TerramanGizmo, EditorSpatialGizmo);
|
||||
class TerrainWorldGizmo : public EditorSpatialGizmo {
|
||||
GDCLASS(TerrainWorldGizmo, EditorSpatialGizmo);
|
||||
|
||||
public:
|
||||
void set_visible(const bool visible);
|
||||
@ -55,8 +53,8 @@ public:
|
||||
void redraw();
|
||||
void apply();
|
||||
|
||||
TerramanGizmo();
|
||||
~TerramanGizmo();
|
||||
TerrainWorldGizmo();
|
||||
~TerrainWorldGizmo();
|
||||
|
||||
PoolVector3Array _vertices;
|
||||
PoolIntArray _indices;
|
@ -1,5 +1,5 @@
|
||||
/*************************************************************************/
|
||||
/* terrmana_gizmo_plugin.cpp */
|
||||
/* terrain_world_gizmo_plugin.cpp */
|
||||
/*************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* PANDEMONIUM ENGINE */
|
||||
@ -29,27 +29,27 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#include "terraman_gizmo_plugin.h"
|
||||
#include "terrain_world_gizmo_plugin.h"
|
||||
|
||||
#include "../world/terrain_world.h"
|
||||
#include "terrain_world_editor.h"
|
||||
#include "terraman_gizmo.h"
|
||||
#include "terrain_world_gizmo.h"
|
||||
|
||||
String TerramanGizmoPlugin::get_gizmo_name() const {
|
||||
return "TerramanGizmo";
|
||||
String TerrainWorldGizmoPlugin::get_gizmo_name() const {
|
||||
return "TerrainWorldGizmo";
|
||||
}
|
||||
int TerramanGizmoPlugin::get_priority() const {
|
||||
int TerrainWorldGizmoPlugin::get_priority() const {
|
||||
return 100;
|
||||
}
|
||||
bool TerramanGizmoPlugin::is_handle_highlighted(const EditorSpatialGizmo *p_gizmo, int p_idx, bool p_secondary) const {
|
||||
bool TerrainWorldGizmoPlugin::is_handle_highlighted(const EditorSpatialGizmo *p_gizmo, int p_idx, bool p_secondary) const {
|
||||
return EditorSpatialGizmoPlugin::is_handle_highlighted(p_gizmo, p_idx, p_secondary);
|
||||
}
|
||||
|
||||
Ref<EditorSpatialGizmo> TerramanGizmoPlugin::create_gizmo(Spatial *p_spatial) {
|
||||
Ref<EditorSpatialGizmo> TerrainWorldGizmoPlugin::create_gizmo(Spatial *p_spatial) {
|
||||
TerrainWorld *world = Object::cast_to<TerrainWorld>(p_spatial);
|
||||
|
||||
if (world) {
|
||||
Ref<TerramanGizmo> gizmo;
|
||||
Ref<TerrainWorldGizmo> gizmo;
|
||||
gizmo.instance();
|
||||
|
||||
gizmo->set_editor_plugin(plugin);
|
||||
@ -61,7 +61,7 @@ Ref<EditorSpatialGizmo> TerramanGizmoPlugin::create_gizmo(Spatial *p_spatial) {
|
||||
}
|
||||
}
|
||||
|
||||
TerramanGizmoPlugin::TerramanGizmoPlugin() {
|
||||
TerrainWorldGizmoPlugin::TerrainWorldGizmoPlugin() {
|
||||
plugin = nullptr;
|
||||
|
||||
create_material("main", Color(0.7, 0.7, 0.7));
|
||||
@ -69,8 +69,8 @@ TerramanGizmoPlugin::TerramanGizmoPlugin() {
|
||||
create_handle_material("handles");
|
||||
}
|
||||
|
||||
TerramanGizmoPlugin::~TerramanGizmoPlugin() {
|
||||
TerrainWorldGizmoPlugin::~TerrainWorldGizmoPlugin() {
|
||||
}
|
||||
|
||||
void TerramanGizmoPlugin::_bind_methods() {
|
||||
void TerrainWorldGizmoPlugin::_bind_methods() {
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
#define TERRAMAN_GIZMO_PLUGIN_H
|
||||
|
||||
/*************************************************************************/
|
||||
/* terraman_gizmo_plugin.h */
|
||||
/* terrain_world_gizmo_plugin.h */
|
||||
/*************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* PANDEMONIUM ENGINE */
|
||||
@ -36,8 +36,8 @@
|
||||
|
||||
class TerrainWorldEditorPlugin;
|
||||
|
||||
class TerramanGizmoPlugin : public EditorSpatialGizmoPlugin {
|
||||
GDCLASS(TerramanGizmoPlugin, EditorSpatialGizmoPlugin);
|
||||
class TerrainWorldGizmoPlugin : public EditorSpatialGizmoPlugin {
|
||||
GDCLASS(TerrainWorldGizmoPlugin, EditorSpatialGizmoPlugin);
|
||||
|
||||
public:
|
||||
void _init();
|
||||
@ -45,8 +45,8 @@ public:
|
||||
int get_priority() const;
|
||||
bool is_handle_highlighted(const EditorSpatialGizmo *p_gizmo, int p_idx, bool p_secondary) const;
|
||||
|
||||
TerramanGizmoPlugin();
|
||||
~TerramanGizmoPlugin();
|
||||
TerrainWorldGizmoPlugin();
|
||||
~TerrainWorldGizmoPlugin();
|
||||
|
||||
TerrainWorldEditorPlugin *plugin;
|
||||
|
Loading…
Reference in New Issue
Block a user