feat: modules moved and engine moved to submodule

This commit is contained in:
Jan van der Weide 2025-04-12 18:40:44 +02:00
parent dfb5e645cd
commit c33d2130cc
5136 changed files with 225275 additions and 64485 deletions

View file

@ -30,8 +30,6 @@
#include "csg_gizmos.h"
#ifdef TOOLS_ENABLED
#include "editor/editor_node.h"
#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
@ -156,6 +154,8 @@ CSGShapeEditor::CSGShapeEditor() {
options->hide();
options->set_text(TTR("CSG"));
options->set_switch_on_hover(true);
options->set_flat(false);
options->set_theme_type_variation("FlatMenuButton");
Node3DEditor::get_singleton()->add_control_to_menu_panel(options);
options->get_popup()->add_item(TTR("Bake Mesh Instance"), MENU_OPTION_BAKE_MESH_INSTANCE);
@ -187,9 +187,6 @@ CSGShape3DGizmoPlugin::CSGShape3DGizmoPlugin() {
create_handle_material("handles");
}
CSGShape3DGizmoPlugin::~CSGShape3DGizmoPlugin() {
}
String CSGShape3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
CSGShape3D *cs = Object::cast_to<CSGShape3D>(p_gizmo->get_node_3d());
@ -227,7 +224,7 @@ Variant CSGShape3DGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo
if (Object::cast_to<CSGCylinder3D>(cs)) {
CSGCylinder3D *s = Object::cast_to<CSGCylinder3D>(cs);
return p_id == 0 ? s->get_radius() : s->get_height();
return Vector2(s->get_radius(), s->get_height());
}
if (Object::cast_to<CSGTorus3D>(cs)) {
@ -384,7 +381,7 @@ void CSGShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector<Vector3> faces = cs->get_brush_faces();
if (faces.size() == 0) {
if (faces.is_empty()) {
return;
}
@ -508,5 +505,3 @@ EditorPluginCSG::EditorPluginCSG() {
csg_shape_editor = memnew(CSGShapeEditor);
EditorNode::get_singleton()->get_gui_base()->add_child(csg_shape_editor);
}
#endif // TOOLS_ENABLED

View file

@ -28,10 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef CSG_GIZMOS_H
#define CSG_GIZMOS_H
#ifdef TOOLS_ENABLED
#pragma once
#include "../csg_shape.h"
@ -62,7 +59,6 @@ public:
virtual void commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, const Variant &p_restore, bool p_cancel) override;
CSGShape3DGizmoPlugin();
~CSGShape3DGizmoPlugin();
};
class CSGShapeEditor : public Control {
@ -104,7 +100,3 @@ public:
EditorPluginCSG();
};
#endif // TOOLS_ENABLED
#endif // CSG_GIZMOS_H