mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-04-19 01:43:12 +02:00
Ran include-what-you-use on classes under editor/plugins. It still needs cleanups though.
This commit is contained in:
parent
1ab4a46da0
commit
a112bd877c
@ -33,6 +33,30 @@
|
||||
#include "canvas_item_editor_plugin.h"
|
||||
#include "core/os/keyboard.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/color.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/math/geometry.h"
|
||||
#include "core/math/math_defs.h"
|
||||
#include "core/math/math_funcs.h"
|
||||
#include "core/math/transform_2d.h"
|
||||
#include "core/os/input_event.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/pool_vector.h"
|
||||
#include "core/typedefs.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "scene/2d/node_2d.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/dialogs.h"
|
||||
#include "scene/gui/separator.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/main/scene_tree.h"
|
||||
#include "scene/resources/font.h"
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
AbstractPolygon2DEditor::Vertex::Vertex() :
|
||||
polygon(-1),
|
||||
|
@ -31,11 +31,29 @@
|
||||
/*************************************************************************/
|
||||
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_plugin.h"
|
||||
|
||||
#include "scene/2d/polygon_2d.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/variant.h"
|
||||
#include "core/vector.h"
|
||||
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
|
||||
class CanvasItemEditor;
|
||||
class ConfirmationDialog;
|
||||
class Control;
|
||||
class EditorNode;
|
||||
class InputEvent;
|
||||
class Node2D;
|
||||
class Node;
|
||||
class Panel;
|
||||
class ToolButton;
|
||||
class UndoRedo;
|
||||
|
||||
class AbstractPolygon2DEditor : public HBoxContainer {
|
||||
GDCLASS(AbstractPolygon2DEditor, HBoxContainer);
|
||||
|
@ -33,6 +33,37 @@
|
||||
#include "core/os/keyboard.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "scene/animation/animation_blend_tree.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/color.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "core/list.h"
|
||||
#include "core/math/math_funcs.h"
|
||||
#include "core/math/rect2.h"
|
||||
#include "core/math/transform_2d.h"
|
||||
#include "core/os/input_event.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "core/variant.h"
|
||||
#include "editor/editor_file_dialog.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "scene/2d/canvas_item.h"
|
||||
#include "scene/animation/animation_player.h"
|
||||
#include "scene/gui/base_button.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/label.h"
|
||||
#include "scene/gui/line_edit.h"
|
||||
#include "scene/gui/panel_container.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "scene/gui/separator.h"
|
||||
#include "scene/gui/spin_box.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/resources/font.h"
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
StringName AnimationNodeBlendSpace1DEditor::get_blend_position_path() const {
|
||||
StringName path = AnimationTreeEditor::get_singleton()->get_base_path() + "blend_position";
|
||||
|
@ -39,6 +39,27 @@
|
||||
#include "scene/gui/graph_edit.h"
|
||||
#include "scene/gui/popup.h"
|
||||
#include "scene/gui/tree.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/string_name.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/vector.h"
|
||||
#include "scene/animation/animation_tree.h"
|
||||
|
||||
class Button;
|
||||
class Control;
|
||||
class EditorFileDialog;
|
||||
class HBoxContainer;
|
||||
class InputEvent;
|
||||
class Label;
|
||||
class LineEdit;
|
||||
class PanelContainer;
|
||||
class PopupMenu;
|
||||
class SpinBox;
|
||||
class ToolButton;
|
||||
class UndoRedo;
|
||||
class VSeparator;
|
||||
|
||||
class AnimationNodeBlendSpace1DEditor : public AnimationTreeNodeEditorPlugin {
|
||||
GDCLASS(AnimationNodeBlendSpace1DEditor, AnimationTreeNodeEditorPlugin);
|
||||
|
@ -32,15 +32,42 @@
|
||||
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "core/math/delaunay.h"
|
||||
#include "core/os/input.h"
|
||||
#include "core/os/keyboard.h"
|
||||
#include "core/project_settings.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "scene/animation/animation_blend_tree.h"
|
||||
#include "scene/animation/animation_player.h"
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/panel.h"
|
||||
#include "scene/main/viewport.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/color.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/list.h"
|
||||
#include "core/math/geometry.h"
|
||||
#include "core/math/math_funcs.h"
|
||||
#include "core/math/rect2.h"
|
||||
#include "core/math/transform_2d.h"
|
||||
#include "core/os/input_event.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "core/variant.h"
|
||||
#include "editor/editor_file_dialog.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "scene/2d/canvas_item.h"
|
||||
#include "scene/gui/base_button.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/grid_container.h"
|
||||
#include "scene/gui/label.h"
|
||||
#include "scene/gui/line_edit.h"
|
||||
#include "scene/gui/option_button.h"
|
||||
#include "scene/gui/panel_container.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "scene/gui/separator.h"
|
||||
#include "scene/gui/spin_box.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/resources/font.h"
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
bool AnimationNodeBlendSpace2DEditor::can_edit(const Ref<AnimationNode> &p_node) {
|
||||
Ref<AnimationNodeBlendSpace2D> bs2d = p_node;
|
||||
|
@ -39,6 +39,28 @@
|
||||
#include "scene/gui/graph_edit.h"
|
||||
#include "scene/gui/popup.h"
|
||||
#include "scene/gui/tree.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/string_name.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/vector.h"
|
||||
#include "scene/animation/animation_tree.h"
|
||||
|
||||
class Button;
|
||||
class Control;
|
||||
class EditorFileDialog;
|
||||
class HBoxContainer;
|
||||
class InputEvent;
|
||||
class Label;
|
||||
class LineEdit;
|
||||
class OptionButton;
|
||||
class PanelContainer;
|
||||
class PopupMenu;
|
||||
class SpinBox;
|
||||
class ToolButton;
|
||||
class UndoRedo;
|
||||
class VSeparator;
|
||||
|
||||
class AnimationNodeBlendSpace2DEditor : public AnimationTreeNodeEditorPlugin {
|
||||
GDCLASS(AnimationNodeBlendSpace2DEditor, AnimationTreeNodeEditorPlugin);
|
||||
|
@ -31,18 +31,43 @@
|
||||
#include "animation_blend_tree_editor_plugin.h"
|
||||
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "core/os/input.h"
|
||||
#include "core/os/keyboard.h"
|
||||
#include "core/project_settings.h"
|
||||
#include "editor/editor_inspector.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "scene/3d/skeleton.h"
|
||||
#include "scene/animation/animation_player.h"
|
||||
#include "scene/gui/graph_node.h"
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/panel.h"
|
||||
#include "scene/gui/progress_bar.h"
|
||||
#include "scene/main/viewport.h"
|
||||
#include "core/array.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/color.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/hash_map.h"
|
||||
#include "core/list.h"
|
||||
#include "core/node_path.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/set.h"
|
||||
#include "core/typedefs.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "editor/editor_file_dialog.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "scene/2d/canvas_item.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/check_box.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/dialogs.h"
|
||||
#include "scene/gui/graph_edit.h"
|
||||
#include "scene/gui/label.h"
|
||||
#include "scene/gui/line_edit.h"
|
||||
#include "scene/gui/panel_container.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "scene/gui/separator.h"
|
||||
#include "scene/gui/tree.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/resources/animation.h"
|
||||
#include "scene/resources/style_box.h"
|
||||
|
||||
void AnimationNodeBlendTreeEditor::add_custom_type(const String &p_name, const Ref<Script> &p_script) {
|
||||
for (int i = 0; i < add_options.size(); i++) {
|
||||
|
@ -39,8 +39,30 @@
|
||||
#include "scene/gui/graph_edit.h"
|
||||
#include "scene/gui/popup.h"
|
||||
#include "scene/gui/tree.h"
|
||||
#include "core/map.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/script_language.h"
|
||||
#include "core/string_name.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/variant.h"
|
||||
#include "core/vector.h"
|
||||
#include "scene/animation/animation_tree.h"
|
||||
|
||||
class ProgressBar;
|
||||
class AcceptDialog;
|
||||
class Array;
|
||||
class CheckBox;
|
||||
class EditorFileDialog;
|
||||
class EditorProperty;
|
||||
class GraphEdit;
|
||||
class Label;
|
||||
class MenuButton;
|
||||
class Node;
|
||||
class PanelContainer;
|
||||
class Tree;
|
||||
class UndoRedo;
|
||||
|
||||
class AnimationNodeBlendTreeEditor : public AnimationTreeNodeEditorPlugin {
|
||||
GDCLASS(AnimationNodeBlendTreeEditor, AnimationTreeNodeEditorPlugin);
|
||||
|
@ -38,12 +38,50 @@
|
||||
#include "editor/animation_track_editor.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "editor/editor_settings.h"
|
||||
|
||||
// For onion skinning.
|
||||
#include "editor/plugins/canvas_item_editor_plugin.h"
|
||||
#include "editor/plugins/spatial_editor_plugin.h"
|
||||
#include "scene/main/viewport.h"
|
||||
#include "servers/visual_server.h"
|
||||
#include "core/array.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/color.h"
|
||||
#include "core/error_list.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/image.h"
|
||||
#include "core/list.h"
|
||||
#include "core/math/math_funcs.h"
|
||||
#include "core/math/rect2.h"
|
||||
#include "core/os/input_event.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/resource.h"
|
||||
#include "core/rid_handle.h"
|
||||
#include "core/string_name.h"
|
||||
#include "core/typedefs.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "core/variant.h"
|
||||
#include "editor/editor_data.h"
|
||||
#include "editor/editor_file_dialog.h"
|
||||
#include "editor/editor_inspector.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/scene_tree_dock.h"
|
||||
#include "editor/scene_tree_editor.h"
|
||||
#include "scene/animation/animation_player.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/dialogs.h"
|
||||
#include "scene/gui/label.h"
|
||||
#include "scene/gui/line_edit.h"
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/option_button.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "scene/gui/separator.h"
|
||||
#include "scene/gui/spin_box.h"
|
||||
#include "scene/gui/tree.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/main/scene_tree.h"
|
||||
#include "scene/resources/animation.h"
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
void AnimationPlayerEditor::_node_removed(Node *p_node) {
|
||||
if (player && player == p_node) {
|
||||
|
@ -37,9 +37,38 @@
|
||||
#include "scene/gui/slider.h"
|
||||
#include "scene/gui/spin_box.h"
|
||||
#include "scene/gui/texture_button.h"
|
||||
#include "core/dictionary.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/rid.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/vector.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "scene/resources/material.h"
|
||||
#include "scene/resources/shader.h"
|
||||
|
||||
class AnimationTrackEditor;
|
||||
class AnimationPlayerEditorPlugin;
|
||||
class AcceptDialog;
|
||||
class AnimationPlayer;
|
||||
class Button;
|
||||
class ConfirmationDialog;
|
||||
class Control;
|
||||
class EditorFileDialog;
|
||||
class EditorNode;
|
||||
class InputEvent;
|
||||
class Label;
|
||||
class LineEdit;
|
||||
class MenuButton;
|
||||
class Node;
|
||||
class OptionButton;
|
||||
class Resource;
|
||||
class SpinBox;
|
||||
class Texture;
|
||||
class Tree;
|
||||
class UndoRedo;
|
||||
|
||||
class AnimationPlayerEditor : public VBoxContainer {
|
||||
GDCLASS(AnimationPlayerEditor, VBoxContainer);
|
||||
|
@ -31,16 +31,40 @@
|
||||
#include "animation_state_machine_editor.h"
|
||||
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "core/math/delaunay.h"
|
||||
#include "core/os/input.h"
|
||||
#include "core/os/keyboard.h"
|
||||
#include "core/project_settings.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "scene/animation/animation_blend_tree.h"
|
||||
#include "scene/animation/animation_player.h"
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/panel.h"
|
||||
#include "scene/main/viewport.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/color.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/list.h"
|
||||
#include "core/math/geometry.h"
|
||||
#include "core/math/math_defs.h"
|
||||
#include "core/math/transform_2d.h"
|
||||
#include "core/os/input_event.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/typedefs.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "core/variant.h"
|
||||
#include "editor/editor_file_dialog.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "scene/2d/canvas_item.h"
|
||||
#include "scene/gui/base_button.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/label.h"
|
||||
#include "scene/gui/line_edit.h"
|
||||
#include "scene/gui/option_button.h"
|
||||
#include "scene/gui/panel_container.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "scene/gui/scroll_bar.h"
|
||||
#include "scene/gui/separator.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/resources/font.h"
|
||||
#include "scene/resources/style_box.h"
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
bool AnimationNodeStateMachineEditor::can_edit(const Ref<AnimationNode> &p_node) {
|
||||
Ref<AnimationNodeStateMachine> ansm = p_node;
|
||||
|
@ -39,6 +39,28 @@
|
||||
#include "scene/gui/graph_edit.h"
|
||||
#include "scene/gui/popup.h"
|
||||
#include "scene/gui/tree.h"
|
||||
#include "core/math/rect2.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/string_name.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/vector.h"
|
||||
#include "scene/animation/animation_tree.h"
|
||||
#include "scene/gui/control.h"
|
||||
|
||||
class EditorFileDialog;
|
||||
class HBoxContainer;
|
||||
class HScrollBar;
|
||||
class InputEvent;
|
||||
class Label;
|
||||
class LineEdit;
|
||||
class OptionButton;
|
||||
class PanelContainer;
|
||||
class PopupMenu;
|
||||
class ToolButton;
|
||||
class UndoRedo;
|
||||
class VScrollBar;
|
||||
|
||||
class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin {
|
||||
GDCLASS(AnimationNodeStateMachineEditor, AnimationTreeNodeEditorPlugin);
|
||||
|
@ -34,18 +34,28 @@
|
||||
#include "animation_blend_space_2d_editor.h"
|
||||
#include "animation_blend_tree_editor_plugin.h"
|
||||
#include "animation_state_machine_editor.h"
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "core/math/delaunay.h"
|
||||
#include "core/os/input.h"
|
||||
#include "core/os/keyboard.h"
|
||||
#include "core/project_settings.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "scene/animation/animation_blend_tree.h"
|
||||
#include "scene/animation/animation_player.h"
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/panel.h"
|
||||
#include "scene/main/viewport.h"
|
||||
#include "scene/scene_string_names.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/list.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/string_name.h"
|
||||
#include "core/variant.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "scene/animation/animation_tree.h"
|
||||
#include "scene/gui/base_button.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/label.h"
|
||||
#include "scene/gui/margin_container.h"
|
||||
#include "scene/gui/scroll_container.h"
|
||||
#include "scene/gui/separator.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "scene/main/node.h"
|
||||
|
||||
void AnimationTreeEditor::edit(AnimationTree *p_tree) {
|
||||
if (tree == p_tree) {
|
||||
|
@ -38,6 +38,19 @@
|
||||
#include "scene/gui/graph_edit.h"
|
||||
#include "scene/gui/popup.h"
|
||||
#include "scene/gui/tree.h"
|
||||
#include "core/object.h"
|
||||
#include "core/object_id.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/vector.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
|
||||
class AnimationNode;
|
||||
class AnimationTree;
|
||||
class Button;
|
||||
class EditorNode;
|
||||
class MarginContainer;
|
||||
class ScrollContainer;
|
||||
|
||||
class AnimationTreeNodeEditorPlugin : public VBoxContainer {
|
||||
GDCLASS(AnimationTreeNodeEditorPlugin, VBoxContainer);
|
||||
|
@ -38,8 +38,48 @@
|
||||
#include "scene/3d/skeleton.h"
|
||||
#include "scene/animation/animation_player.h"
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/panel.h"
|
||||
#include "scene/main/viewport.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/color.h"
|
||||
#include "core/engine.h"
|
||||
#include "core/error_list.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/map.h"
|
||||
#include "core/math/math_defs.h"
|
||||
#include "core/math/math_funcs.h"
|
||||
#include "core/math/rect2.h"
|
||||
#include "core/node_path.h"
|
||||
#include "core/os/input_event.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/ref_ptr.h"
|
||||
#include "core/resource.h"
|
||||
#include "core/rid.h"
|
||||
#include "core/typedefs.h"
|
||||
#include "core/variant.h"
|
||||
#include "core/vector.h"
|
||||
#include "editor/editor_file_dialog.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/property_editor.h"
|
||||
#include "scene/2d/canvas_item.h"
|
||||
#include "scene/animation/animation_tree_player.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/check_button.h"
|
||||
#include "scene/gui/dialogs.h"
|
||||
#include "scene/gui/label.h"
|
||||
#include "scene/gui/line_edit.h"
|
||||
#include "scene/gui/option_button.h"
|
||||
#include "scene/gui/popup.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "scene/gui/scroll_bar.h"
|
||||
#include "scene/gui/slider.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "scene/gui/tree.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/main/scene_tree.h"
|
||||
#include "scene/resources/animation.h"
|
||||
#include "scene/resources/font.h"
|
||||
#include "scene/resources/style_box.h"
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
void AnimationTreePlayerEditor::edit(AnimationTreePlayer *p_anim_tree) {
|
||||
anim_tree = p_anim_tree;
|
||||
|
@ -37,6 +37,34 @@
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/popup.h"
|
||||
#include "scene/gui/tree.h"
|
||||
#include "core/list.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/set.h"
|
||||
#include "core/string_name.h"
|
||||
#include "core/ustring.h"
|
||||
#include "scene/gui/control.h"
|
||||
|
||||
class AcceptDialog;
|
||||
class AnimationTreePlayer;
|
||||
class Button;
|
||||
class CheckButton;
|
||||
class CustomPropertyEditor;
|
||||
class EditorFileDialog;
|
||||
class EditorNode;
|
||||
class HScrollBar;
|
||||
class HSlider;
|
||||
class InputEvent;
|
||||
class Label;
|
||||
class LineEdit;
|
||||
class MenuButton;
|
||||
class OptionButton;
|
||||
class Popup;
|
||||
class PopupMenu;
|
||||
class Tree;
|
||||
class VScrollBar;
|
||||
struct Color;
|
||||
|
||||
class AnimationTreePlayerEditor : public Control {
|
||||
GDCLASS(AnimationTreePlayerEditor, Control);
|
||||
|
@ -30,12 +30,29 @@
|
||||
|
||||
#include "audio_stream_editor_plugin.h"
|
||||
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "core/os/keyboard.h"
|
||||
#include "core/project_settings.h"
|
||||
#include "editor/audio_stream_preview.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/color.h"
|
||||
#include "core/math/math_funcs.h"
|
||||
#include "core/math/rect2.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/os/input_event.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/typedefs.h"
|
||||
#include "core/vector.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "scene/2d/canvas_item.h"
|
||||
#include "scene/audio/audio_stream_player.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/label.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/resources/texture.h"
|
||||
#include "servers/visual_server.h"
|
||||
|
||||
void AudioStreamEditor::_notification(int p_what) {
|
||||
if (p_what == NOTIFICATION_READY) {
|
||||
|
@ -35,6 +35,19 @@
|
||||
#include "scene/audio/audio_stream_player.h"
|
||||
#include "scene/gui/color_rect.h"
|
||||
#include "scene/resources/texture.h"
|
||||
#include "core/math/math_defs.h"
|
||||
#include "core/object.h"
|
||||
#include "core/object_id.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/ustring.h"
|
||||
#include "servers/audio/audio_stream.h"
|
||||
|
||||
class AudioStreamPlayer;
|
||||
class Control;
|
||||
class EditorNode;
|
||||
class InputEvent;
|
||||
class Label;
|
||||
class ToolButton;
|
||||
|
||||
class AudioStreamEditor : public ColorRect {
|
||||
GDCLASS(AudioStreamEditor, ColorRect);
|
||||
|
@ -31,6 +31,14 @@
|
||||
#include "camera_editor_plugin.h"
|
||||
|
||||
#include "spatial_editor_plugin.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/math/math_defs.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "scene/3d/camera.h"
|
||||
#include "scene/gui/button.h"
|
||||
|
||||
class EditorNode;
|
||||
class Node;
|
||||
|
||||
void CameraEditor::_node_removed(Node *p_node) {
|
||||
if (p_node == node) {
|
||||
|
@ -33,6 +33,14 @@
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "scene/3d/camera.h"
|
||||
#include "core/object.h"
|
||||
#include "core/ustring.h"
|
||||
#include "scene/gui/control.h"
|
||||
|
||||
class Button;
|
||||
class EditorNode;
|
||||
class Node;
|
||||
class Panel;
|
||||
|
||||
class CameraEditor : public Control {
|
||||
GDCLASS(CameraEditor, Control);
|
||||
|
@ -32,7 +32,6 @@
|
||||
|
||||
#include "core/os/input.h"
|
||||
#include "core/os/keyboard.h"
|
||||
#include "core/print_string.h"
|
||||
#include "core/project_settings.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_scale.h"
|
||||
@ -52,8 +51,48 @@
|
||||
#include "scene/main/viewport.h"
|
||||
#include "scene/resources/dynamic_font.h"
|
||||
#include "scene/resources/packed_scene.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "core/array.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/color.h"
|
||||
#include "core/engine.h"
|
||||
#include "core/error_list.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "core/math/geometry.h"
|
||||
#include "core/math/math_funcs.h"
|
||||
#include "core/node_path.h"
|
||||
#include "core/os/input_event.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/pool_vector.h"
|
||||
#include "core/resource.h"
|
||||
#include "core/rid.h"
|
||||
#include "core/string_name.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "editor/animation_track_editor.h"
|
||||
#include "editor/editor_data.h"
|
||||
#include "editor/scene_tree_dock.h"
|
||||
#include "scene/2d/node_2d.h"
|
||||
#include "scene/gui/base_button.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/check_box.h"
|
||||
#include "scene/gui/container.h"
|
||||
#include "scene/gui/dialogs.h"
|
||||
#include "scene/gui/label.h"
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/panel_container.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "scene/gui/scroll_bar.h"
|
||||
#include "scene/gui/separator.h"
|
||||
#include "scene/gui/spin_box.h"
|
||||
#include "scene/gui/split_container.h"
|
||||
#include "scene/gui/texture_rect.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/main/scene_tree.h"
|
||||
#include "scene/main/timer.h"
|
||||
#include "scene/resources/font.h"
|
||||
#include "scene/resources/theme.h"
|
||||
#include "servers/visual_server.h"
|
||||
|
||||
// Min and Max are power of two in order to play nicely with successive increment.
|
||||
// That way, we can naturally reach a 100% zoom from boundaries.
|
||||
|
@ -38,8 +38,49 @@
|
||||
#include "scene/gui/label.h"
|
||||
#include "scene/gui/panel_container.h"
|
||||
#include "scene/gui/spin_box.h"
|
||||
#include "core/dictionary.h"
|
||||
#include "core/list.h"
|
||||
#include "core/map.h"
|
||||
#include "core/math/math_defs.h"
|
||||
#include "core/math/rect2.h"
|
||||
#include "core/math/transform_2d.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/object.h"
|
||||
#include "core/object_id.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/typedefs.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/variant.h"
|
||||
#include "core/vector.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/shortcut.h"
|
||||
#include "scene/resources/style_box.h"
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
class CanvasItemEditorViewport;
|
||||
class AcceptDialog;
|
||||
class Button;
|
||||
class ButtonGroup;
|
||||
class ConfirmationDialog;
|
||||
class EditorData;
|
||||
class EditorNode;
|
||||
class EditorSelection;
|
||||
class HScrollBar;
|
||||
class HSplitContainer;
|
||||
class InputEvent;
|
||||
class Label;
|
||||
class MenuButton;
|
||||
class Node2D;
|
||||
class Node;
|
||||
class PanelContainer;
|
||||
class PopupMenu;
|
||||
class Timer;
|
||||
class ToolButton;
|
||||
class UndoRedo;
|
||||
class VScrollBar;
|
||||
class VSplitContainer;
|
||||
class WindowDialog;
|
||||
struct Color;
|
||||
|
||||
class CanvasItemEditorSelectedItem : public Object {
|
||||
GDCLASS(CanvasItemEditorSelectedItem, Object);
|
||||
|
@ -30,6 +30,14 @@
|
||||
|
||||
#include "collision_polygon_2d_editor_plugin.h"
|
||||
|
||||
#include "core/os/memory.h"
|
||||
#include "core/ustring.h"
|
||||
#include "scene/2d/collision_polygon_2d.h"
|
||||
#include "scene/main/node.h"
|
||||
|
||||
class EditorNode;
|
||||
class Node2D;
|
||||
|
||||
Node2D *CollisionPolygon2DEditor::_get_node() const {
|
||||
return node;
|
||||
}
|
||||
|
@ -32,6 +32,12 @@
|
||||
|
||||
#include "editor/plugins/abstract_polygon_2d_editor.h"
|
||||
#include "scene/2d/collision_polygon_2d.h"
|
||||
#include "core/object.h"
|
||||
|
||||
class CollisionPolygon2D;
|
||||
class EditorNode;
|
||||
class Node2D;
|
||||
class Node;
|
||||
|
||||
class CollisionPolygon2DEditor : public AbstractPolygon2DEditor {
|
||||
GDCLASS(CollisionPolygon2DEditor, AbstractPolygon2DEditor);
|
||||
|
@ -30,13 +30,40 @@
|
||||
|
||||
#include "collision_polygon_editor_plugin.h"
|
||||
|
||||
#include "canvas_item_editor_plugin.h"
|
||||
#include "core/os/file_access.h"
|
||||
#include "core/os/input.h"
|
||||
#include "core/os/keyboard.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "scene/3d/camera.h"
|
||||
#include "spatial_editor_plugin.h"
|
||||
#include "core/array.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/color.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/math/aabb.h"
|
||||
#include "core/math/basis.h"
|
||||
#include "core/math/geometry.h"
|
||||
#include "core/math/math_defs.h"
|
||||
#include "core/math/plane.h"
|
||||
#include "core/math/rect2.h"
|
||||
#include "core/math/transform.h"
|
||||
#include "core/math/vector3.h"
|
||||
#include "core/os/input_event.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/pool_vector.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "core/variant.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "scene/3d/immediate_geometry.h"
|
||||
#include "scene/3d/mesh_instance.h"
|
||||
#include "scene/3d/spatial.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/separator.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/main/scene_tree.h"
|
||||
#include "scene/resources/material.h"
|
||||
#include "scene/resources/mesh.h"
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
void Polygon3DEditor::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
|
@ -36,8 +36,27 @@
|
||||
#include "scene/3d/immediate_geometry.h"
|
||||
#include "scene/3d/mesh_instance.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/vector.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
|
||||
class CanvasItemEditor;
|
||||
class ArrayMesh;
|
||||
class Camera;
|
||||
class EditorNode;
|
||||
class ImmediateGeometry;
|
||||
class InputEvent;
|
||||
class MenuButton;
|
||||
class MeshInstance;
|
||||
class Node;
|
||||
class Panel;
|
||||
class Spatial;
|
||||
class SpatialMaterial;
|
||||
class ToolButton;
|
||||
class UndoRedo;
|
||||
|
||||
class Polygon3DEditor : public HBoxContainer {
|
||||
GDCLASS(Polygon3DEditor, HBoxContainer);
|
||||
|
@ -38,6 +38,20 @@
|
||||
#include "scene/resources/line_shape_2d.h"
|
||||
#include "scene/resources/rectangle_shape_2d.h"
|
||||
#include "scene/resources/segment_shape_2d.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/math/math_defs.h"
|
||||
#include "core/math/math_funcs.h"
|
||||
#include "core/os/input.h"
|
||||
#include "core/os/input_event.h"
|
||||
#include "core/os/keyboard.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "scene/2d/collision_shape_2d.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/main/scene_tree.h"
|
||||
#include "scene/resources/shape_2d.h"
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
void CollisionShape2DEditor::_node_removed(Node *p_node) {
|
||||
if (p_node == node) {
|
||||
|
@ -34,10 +34,22 @@
|
||||
#include "core/os/keyboard.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_plugin.h"
|
||||
|
||||
#include "scene/2d/collision_shape_2d.h"
|
||||
#include "core/math/transform_2d.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/variant.h"
|
||||
#include "core/vector.h"
|
||||
#include "scene/gui/control.h"
|
||||
|
||||
class CanvasItemEditor;
|
||||
class CollisionShape2D;
|
||||
class EditorNode;
|
||||
class InputEvent;
|
||||
class Node;
|
||||
class UndoRedo;
|
||||
|
||||
class CollisionShape2DEditor : public Control {
|
||||
GDCLASS(CollisionShape2DEditor, Control);
|
||||
|
@ -30,11 +30,31 @@
|
||||
|
||||
#include "cpu_particles_2d_editor_plugin.h"
|
||||
|
||||
#include "canvas_item_editor_plugin.h"
|
||||
#include "core/io/image_loader.h"
|
||||
#include "scene/2d/cpu_particles_2d.h"
|
||||
#include "scene/gui/separator.h"
|
||||
#include "scene/resources/particles_material.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/color.h"
|
||||
#include "core/error_list.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/image.h"
|
||||
#include "core/list.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/pool_vector.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/variant.h"
|
||||
#include "core/vector.h"
|
||||
#include "editor/editor_file_dialog.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/check_box.h"
|
||||
#include "scene/gui/dialogs.h"
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/option_button.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "scene/gui/spin_box.h"
|
||||
#include "scene/main/node.h"
|
||||
|
||||
void CPUParticles2DEditorPlugin::edit(Object *p_object) {
|
||||
particles = Object::cast_to<CPUParticles2D>(p_object);
|
||||
|
@ -36,6 +36,19 @@
|
||||
#include "scene/2d/cpu_particles_2d.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/file_dialog.h"
|
||||
#include "core/object.h"
|
||||
#include "core/ustring.h"
|
||||
|
||||
class CPUParticles2D;
|
||||
class CheckBox;
|
||||
class ConfirmationDialog;
|
||||
class EditorFileDialog;
|
||||
class EditorNode;
|
||||
class HBoxContainer;
|
||||
class MenuButton;
|
||||
class OptionButton;
|
||||
class SpinBox;
|
||||
class UndoRedo;
|
||||
|
||||
class CPUParticles2DEditorPlugin : public EditorPlugin {
|
||||
GDCLASS(CPUParticles2DEditorPlugin, EditorPlugin);
|
||||
|
@ -31,6 +31,19 @@
|
||||
#include "cpu_particles_editor_plugin.h"
|
||||
|
||||
#include "editor/plugins/spatial_editor_plugin.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/math/vector3.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/pool_vector.h"
|
||||
#include "editor/editor_file_dialog.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/scene_tree_editor.h"
|
||||
#include "scene/3d/cpu_particles.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "scene/main/node.h"
|
||||
|
||||
void CPUParticlesEditor::_node_removed(Node *p_node) {
|
||||
if (p_node == node) {
|
||||
|
@ -32,6 +32,13 @@
|
||||
|
||||
#include "editor/plugins/particles_editor_plugin.h"
|
||||
#include "scene/3d/cpu_particles.h"
|
||||
#include "core/object.h"
|
||||
#include "core/ustring.h"
|
||||
#include "editor/editor_plugin.h"
|
||||
|
||||
class CPUParticles;
|
||||
class EditorNode;
|
||||
class Node;
|
||||
|
||||
class CPUParticlesEditor : public ParticlesEditorBase {
|
||||
GDCLASS(CPUParticlesEditor, ParticlesEditorBase);
|
||||
|
@ -30,11 +30,30 @@
|
||||
|
||||
#include "curve_editor_plugin.h"
|
||||
|
||||
#include "canvas_item_editor_plugin.h"
|
||||
#include "core/core_string_names.h"
|
||||
#include "core/os/input.h"
|
||||
#include "core/os/keyboard.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/color.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/image.h"
|
||||
#include "core/math/math_defs.h"
|
||||
#include "core/math/math_funcs.h"
|
||||
#include "core/math/rect2.h"
|
||||
#include "core/os/input_event.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/resource.h"
|
||||
#include "core/string_name.h"
|
||||
#include "core/typedefs.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "core/variant.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "scene/2d/canvas_item.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "scene/resources/font.h"
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
CurveEditor::CurveEditor() {
|
||||
_selected_point = -1;
|
||||
|
@ -34,6 +34,20 @@
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "editor/editor_resource_preview.h"
|
||||
#include "scene/resources/curve.h"
|
||||
#include "core/array.h"
|
||||
#include "core/math/transform_2d.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/ustring.h"
|
||||
#include "editor/editor_inspector.h"
|
||||
#include "scene/gui/control.h"
|
||||
|
||||
class EditorNode;
|
||||
class InputEvent;
|
||||
class PopupMenu;
|
||||
class Resource;
|
||||
class Texture;
|
||||
|
||||
// Edits a y(x) curve
|
||||
class CurveEditor : public Control {
|
||||
|
@ -30,19 +30,44 @@
|
||||
|
||||
#include "editor_preview_plugins.h"
|
||||
|
||||
#include "core/io/file_access_memory.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "core/os/os.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "scene/resources/bit_map.h"
|
||||
#include "scene/resources/dynamic_font.h"
|
||||
#include "scene/resources/material.h"
|
||||
#include "scene/resources/mesh.h"
|
||||
#include "servers/audio/audio_stream.h"
|
||||
|
||||
#include "core/project_settings.h"
|
||||
#include "core/array.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/color.h"
|
||||
#include "core/error_list.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/image.h"
|
||||
#include "core/list.h"
|
||||
#include "core/math/aabb.h"
|
||||
#include "core/math/audio_frame.h"
|
||||
#include "core/math/basis.h"
|
||||
#include "core/math/math_defs.h"
|
||||
#include "core/math/math_funcs.h"
|
||||
#include "core/math/transform.h"
|
||||
#include "core/math/vector3.h"
|
||||
#include "core/os/file_access.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/pool_vector.h"
|
||||
#include "core/rid_handle.h"
|
||||
#include "core/script_language.h"
|
||||
#include "core/set.h"
|
||||
#include "core/typedefs.h"
|
||||
#include "core/vector.h"
|
||||
#include "scene/resources/font.h"
|
||||
#include "scene/resources/shader.h"
|
||||
#include "scene/resources/texture.h"
|
||||
#include "servers/audio_server.h"
|
||||
#include "servers/visual_server.h"
|
||||
|
||||
void post_process_preview(Ref<Image> p_image) {
|
||||
if (p_image->get_format() != Image::FORMAT_RGBA8) {
|
||||
|
@ -31,8 +31,17 @@
|
||||
/*************************************************************************/
|
||||
|
||||
#include "editor/editor_resource_preview.h"
|
||||
|
||||
#include "core/safe_refcount.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/resource.h"
|
||||
#include "core/rid.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/variant.h"
|
||||
|
||||
class Image;
|
||||
class Texture;
|
||||
|
||||
void post_process_preview(Ref<Image> p_image);
|
||||
|
||||
|
@ -30,9 +30,12 @@
|
||||
|
||||
#include "gradient_editor_plugin.h"
|
||||
|
||||
#include "canvas_item_editor_plugin.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "spatial_editor_plugin.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "core/vector.h"
|
||||
#include "editor/editor_node.h"
|
||||
|
||||
Size2 GradientEditor::get_minimum_size() const {
|
||||
return Size2(0, 60) * EDSCALE;
|
||||
|
@ -33,6 +33,14 @@
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "scene/gui/gradient_edit.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/ustring.h"
|
||||
#include "editor/editor_inspector.h"
|
||||
#include "scene/resources/gradient.h"
|
||||
|
||||
class EditorNode;
|
||||
|
||||
class GradientEditor : public GradientEdit {
|
||||
GDCLASS(GradientEditor, GradientEdit);
|
||||
|
@ -30,8 +30,20 @@
|
||||
|
||||
#include "item_list_editor_plugin.h"
|
||||
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "editor/editor_inspector.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/plugins/canvas_item_editor_plugin.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/dialogs.h"
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/main/scene_tree.h"
|
||||
|
||||
bool ItemListPlugin::_set(const StringName &p_name, const Variant &p_value) {
|
||||
String name = p_name;
|
||||
|
@ -37,6 +37,24 @@
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/option_button.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "core/list.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/string_name.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/variant.h"
|
||||
#include "core/vector.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/item_list.h"
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
class AcceptDialog;
|
||||
class Button;
|
||||
class EditorInspector;
|
||||
class EditorNode;
|
||||
class Node;
|
||||
class ToolButton;
|
||||
class Tree;
|
||||
|
||||
class ItemListPlugin : public Object {
|
||||
GDCLASS(ItemListPlugin, Object);
|
||||
|
@ -30,6 +30,18 @@
|
||||
|
||||
#include "light_occluder_2d_editor_plugin.h"
|
||||
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/pool_vector.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/vector.h"
|
||||
#include "scene/2d/light_occluder_2d.h"
|
||||
#include "scene/main/node.h"
|
||||
|
||||
class EditorNode;
|
||||
class Node2D;
|
||||
|
||||
Ref<OccluderPolygon2D> LightOccluder2DEditor::_ensure_occluder() const {
|
||||
Ref<OccluderPolygon2D> occluder = node->get_occluder_polygon();
|
||||
if (!occluder.is_valid()) {
|
||||
|
@ -32,6 +32,15 @@
|
||||
|
||||
#include "editor/plugins/abstract_polygon_2d_editor.h"
|
||||
#include "scene/2d/light_occluder_2d.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/variant.h"
|
||||
|
||||
class EditorNode;
|
||||
class LightOccluder2D;
|
||||
class Node2D;
|
||||
class Node;
|
||||
class OccluderPolygon2D;
|
||||
|
||||
class LightOccluder2DEditor : public AbstractPolygon2DEditor {
|
||||
GDCLASS(LightOccluder2DEditor, AbstractPolygon2DEditor);
|
||||
|
@ -30,6 +30,15 @@
|
||||
|
||||
#include "line_2d_editor_plugin.h"
|
||||
|
||||
#include "core/os/memory.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "core/ustring.h"
|
||||
#include "scene/2d/line_2d.h"
|
||||
#include "scene/2d/node_2d.h"
|
||||
#include "scene/main/node.h"
|
||||
|
||||
class EditorNode;
|
||||
|
||||
Node2D *Line2DEditor::_get_node() const {
|
||||
return node;
|
||||
}
|
||||
|
@ -32,6 +32,13 @@
|
||||
|
||||
#include "editor/plugins/abstract_polygon_2d_editor.h"
|
||||
#include "scene/2d/line_2d.h"
|
||||
#include "core/object.h"
|
||||
#include "core/variant.h"
|
||||
|
||||
class EditorNode;
|
||||
class Line2D;
|
||||
class Node2D;
|
||||
class Node;
|
||||
|
||||
class Line2DEditor : public AbstractPolygon2DEditor {
|
||||
GDCLASS(Line2DEditor, AbstractPolygon2DEditor);
|
||||
|
@ -38,6 +38,32 @@
|
||||
#include "scene/resources/particles_material.h"
|
||||
#include "scene/resources/sky.h"
|
||||
#include "scene/resources/world.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/color.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/list.h"
|
||||
#include "core/math/basis.h"
|
||||
#include "core/math/math_funcs.h"
|
||||
#include "core/math/rect2.h"
|
||||
#include "core/math/transform.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/math/vector3.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/resource.h"
|
||||
#include "core/variant.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "scene/2d/canvas_item.h"
|
||||
#include "scene/3d/camera.h"
|
||||
#include "scene/3d/light.h"
|
||||
#include "scene/3d/mesh_instance.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/resources/mesh.h"
|
||||
#include "scene/resources/shader.h"
|
||||
#include "scene/resources/texture.h"
|
||||
#include "servers/visual_server.h"
|
||||
|
||||
class EditorNode;
|
||||
|
||||
void MaterialEditor::_notification(int p_what) {
|
||||
if (p_what == NOTIFICATION_READY) {
|
||||
|
@ -32,15 +32,28 @@
|
||||
|
||||
#include "editor/property_editor.h"
|
||||
#include "scene/resources/primitive_meshes.h"
|
||||
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "scene/3d/camera.h"
|
||||
#include "scene/3d/light.h"
|
||||
#include "scene/3d/mesh_instance.h"
|
||||
#include "scene/resources/material.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/ustring.h"
|
||||
#include "editor/editor_inspector.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/resources/environment.h"
|
||||
|
||||
class ViewportContainer;
|
||||
class Camera;
|
||||
class DirectionalLight;
|
||||
class EditorNode;
|
||||
class MeshInstance;
|
||||
class Node;
|
||||
class Resource;
|
||||
class TextureButton;
|
||||
class Viewport;
|
||||
|
||||
class MaterialEditor : public Control {
|
||||
GDCLASS(MaterialEditor, Control);
|
||||
|
@ -35,6 +35,27 @@
|
||||
#include "scene/main/viewport.h"
|
||||
#include "scene/resources/world.h"
|
||||
#include "scene/resources/mesh.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/color.h"
|
||||
#include "core/math/aabb.h"
|
||||
#include "core/math/basis.h"
|
||||
#include "core/math/math_defs.h"
|
||||
#include "core/math/math_funcs.h"
|
||||
#include "core/math/transform.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/math/vector3.h"
|
||||
#include "core/os/input_event.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/variant.h"
|
||||
#include "scene/3d/camera.h"
|
||||
#include "scene/3d/light.h"
|
||||
#include "scene/3d/mesh_instance.h"
|
||||
#include "scene/3d/spatial.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/main/node.h"
|
||||
|
||||
class EditorNode;
|
||||
|
||||
void MeshEditor::_gui_input(Ref<InputEvent> p_event) {
|
||||
Ref<InputEventMouseMotion> mm = p_event;
|
||||
|
@ -37,6 +37,21 @@
|
||||
#include "scene/3d/mesh_instance.h"
|
||||
#include "scene/gui/viewport_container.h"
|
||||
#include "scene/resources/material.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/ustring.h"
|
||||
#include "editor/editor_inspector.h"
|
||||
#include "scene/resources/mesh.h"
|
||||
|
||||
class Camera;
|
||||
class DirectionalLight;
|
||||
class EditorNode;
|
||||
class InputEvent;
|
||||
class MeshInstance;
|
||||
class Node;
|
||||
class Spatial;
|
||||
class TextureButton;
|
||||
class Viewport;
|
||||
|
||||
class MeshEditor : public ViewportContainer {
|
||||
GDCLASS(MeshEditor, ViewportContainer);
|
||||
|
@ -37,6 +37,31 @@
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/resources/navigation_mesh.h"
|
||||
#include "spatial_editor_plugin.h"
|
||||
#include "core/array.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/color.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/list.h"
|
||||
#include "core/math/math_funcs.h"
|
||||
#include "core/math/rect2.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/pool_vector.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/set.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "core/variant.h"
|
||||
#include "editor/editor_data.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "scene/3d/mesh_instance.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/dialogs.h"
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "scene/gui/spin_box.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/main/scene_tree.h"
|
||||
#include "scene/resources/mesh.h"
|
||||
#include "scene/resources/shape.h"
|
||||
|
||||
void MeshInstanceEditor::_node_removed(Node *p_node) {
|
||||
if (p_node == node) {
|
||||
|
@ -34,6 +34,19 @@
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "scene/3d/mesh_instance.h"
|
||||
#include "scene/gui/spin_box.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/object.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/vector.h"
|
||||
#include "scene/gui/control.h"
|
||||
|
||||
class AcceptDialog;
|
||||
class ConfirmationDialog;
|
||||
class EditorNode;
|
||||
class MenuButton;
|
||||
class MeshInstance;
|
||||
class Node;
|
||||
class SpinBox;
|
||||
|
||||
class MeshInstanceEditor : public Control {
|
||||
GDCLASS(MeshInstanceEditor, Control);
|
||||
|
@ -34,6 +34,35 @@
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/resources/multimesh.h"
|
||||
#include "spatial_editor_plugin.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/map.h"
|
||||
#include "core/math/basis.h"
|
||||
#include "core/math/face3.h"
|
||||
#include "core/math/math_defs.h"
|
||||
#include "core/math/math_funcs.h"
|
||||
#include "core/math/plane.h"
|
||||
#include "core/math/transform.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/math/vector3.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/pool_vector.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/typedefs.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/scene_tree_editor.h"
|
||||
#include "scene/3d/multimesh_instance.h"
|
||||
#include "scene/3d/visual_instance.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/dialogs.h"
|
||||
#include "scene/gui/line_edit.h"
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/option_button.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "scene/gui/slider.h"
|
||||
#include "scene/gui/spin_box.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/resources/mesh.h"
|
||||
|
||||
void MultiMeshEditor::_node_removed(Node *p_node) {
|
||||
if (p_node == node) {
|
||||
|
@ -34,6 +34,23 @@
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "scene/3d/multimesh_instance.h"
|
||||
#include "scene/gui/spin_box.h"
|
||||
#include "core/node_path.h"
|
||||
#include "core/object.h"
|
||||
#include "core/ustring.h"
|
||||
#include "scene/gui/control.h"
|
||||
|
||||
class AcceptDialog;
|
||||
class ConfirmationDialog;
|
||||
class EditorNode;
|
||||
class HSlider;
|
||||
class LineEdit;
|
||||
class MenuButton;
|
||||
class MultiMeshInstance;
|
||||
class Node;
|
||||
class OptionButton;
|
||||
class Panel;
|
||||
class SceneTreeDialog;
|
||||
class SpinBox;
|
||||
|
||||
class MultiMeshEditor : public Control {
|
||||
GDCLASS(MultiMeshEditor, Control);
|
||||
|
@ -30,6 +30,17 @@
|
||||
|
||||
#include "navigation_polygon_editor_plugin.h"
|
||||
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/vector.h"
|
||||
#include "scene/2d/navigation_polygon.h"
|
||||
#include "scene/main/node.h"
|
||||
|
||||
class EditorNode;
|
||||
class Node2D;
|
||||
|
||||
Ref<NavigationPolygon> NavigationPolygonEditor::_ensure_navpoly() const {
|
||||
Ref<NavigationPolygon> navpoly = node->get_navigation_polygon();
|
||||
if (!navpoly.is_valid()) {
|
||||
|
@ -32,6 +32,15 @@
|
||||
|
||||
#include "editor/plugins/abstract_polygon_2d_editor.h"
|
||||
#include "scene/2d/navigation_polygon.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/variant.h"
|
||||
|
||||
class EditorNode;
|
||||
class NavigationPolygon;
|
||||
class NavigationPolygonInstance;
|
||||
class Node2D;
|
||||
class Node;
|
||||
|
||||
class NavigationPolygonEditor : public AbstractPolygon2DEditor {
|
||||
GDCLASS(NavigationPolygonEditor, AbstractPolygon2DEditor);
|
||||
|
@ -31,10 +31,32 @@
|
||||
#include "particles_editor_plugin.h"
|
||||
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "editor/plugins/spatial_editor_plugin.h"
|
||||
#include "scene/3d/cpu_particles.h"
|
||||
#include "scene/resources/particles_material.h"
|
||||
#include "scene/resources/world.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/list.h"
|
||||
#include "core/map.h"
|
||||
#include "core/math/aabb.h"
|
||||
#include "core/math/math_defs.h"
|
||||
#include "core/math/math_funcs.h"
|
||||
#include "core/math/plane.h"
|
||||
#include "core/math/transform.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/math/vector3.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/typedefs.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/variant.h"
|
||||
#include "editor/editor_file_dialog.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/scene_tree_editor.h"
|
||||
#include "scene/3d/spatial.h"
|
||||
#include "scene/3d/visual_instance.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/dialogs.h"
|
||||
#include "scene/gui/option_button.h"
|
||||
#include "scene/gui/spin_box.h"
|
||||
#include "scene/main/node.h"
|
||||
|
||||
bool ParticlesEditorBase::_generate(PoolVector<Vector3> &points, PoolVector<Vector3> &normals) {
|
||||
bool use_normals = emission_fill->get_selected() == 1;
|
||||
|
@ -33,6 +33,22 @@
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "scene/gui/spin_box.h"
|
||||
#include "core/math/face3.h"
|
||||
#include "core/node_path.h"
|
||||
#include "core/object.h"
|
||||
#include "core/pool_vector.h"
|
||||
#include "scene/gui/control.h"
|
||||
|
||||
class ConfirmationDialog;
|
||||
class EditorFileDialog;
|
||||
class HBoxContainer;
|
||||
class MenuButton;
|
||||
class OptionButton;
|
||||
class Panel;
|
||||
class SceneTreeDialog;
|
||||
class Spatial;
|
||||
class SpinBox;
|
||||
struct Vector3;
|
||||
|
||||
class ParticlesEditorBase : public Control {
|
||||
GDCLASS(ParticlesEditorBase, Control);
|
||||
|
@ -31,11 +31,29 @@
|
||||
#include "path_2d_editor_plugin.h"
|
||||
|
||||
#include "canvas_item_editor_plugin.h"
|
||||
#include "core/os/file_access.h"
|
||||
#include "core/os/keyboard.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "scene/resources/world.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/color.h"
|
||||
#include "core/math/math_defs.h"
|
||||
#include "core/math/math_funcs.h"
|
||||
#include "core/math/rect2.h"
|
||||
#include "core/math/transform_2d.h"
|
||||
#include "core/os/input_event.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "core/variant.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "scene/2d/path_2d.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "scene/gui/separator.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/resources/curve.h"
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
void Path2DEditor::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
|
@ -34,8 +34,23 @@
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "scene/2d/path_2d.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/ustring.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
|
||||
class CanvasItemEditor;
|
||||
class Control;
|
||||
class EditorNode;
|
||||
class InputEvent;
|
||||
class MenuButton;
|
||||
class Node;
|
||||
class Panel;
|
||||
class Path2D;
|
||||
class Separator;
|
||||
class ToolButton;
|
||||
class UndoRedo;
|
||||
|
||||
class Path2DEditor : public HBoxContainer {
|
||||
GDCLASS(Path2DEditor, HBoxContainer);
|
||||
|
@ -32,8 +32,31 @@
|
||||
|
||||
#include "core/os/keyboard.h"
|
||||
#include "scene/resources/curve.h"
|
||||
#include "scene/resources/world.h"
|
||||
#include "spatial_editor_plugin.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/color.h"
|
||||
#include "core/math/basis.h"
|
||||
#include "core/math/geometry.h"
|
||||
#include "core/math/math_defs.h"
|
||||
#include "core/math/plane.h"
|
||||
#include "core/math/transform.h"
|
||||
#include "core/os/input_event.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/pool_vector.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "core/vector.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "scene/3d/camera.h"
|
||||
#include "scene/3d/path.h"
|
||||
#include "scene/3d/spatial.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "scene/gui/separator.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/resources/material.h"
|
||||
|
||||
String PathSpatialGizmo::get_handle_name(int p_idx) const {
|
||||
Ref<Curve3D> c = path->get_curve();
|
||||
|
@ -32,6 +32,23 @@
|
||||
|
||||
#include "editor/spatial_editor_gizmos.h"
|
||||
#include "scene/3d/path.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/math/vector3.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/variant.h"
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "editor/plugins/spatial_editor_plugin.h"
|
||||
|
||||
class Camera;
|
||||
class EditorNode;
|
||||
class InputEvent;
|
||||
class MenuButton;
|
||||
class Path;
|
||||
class Separator;
|
||||
class Spatial;
|
||||
class ToolButton;
|
||||
|
||||
class PathSpatialGizmo : public EditorSpatialGizmo {
|
||||
GDCLASS(PathSpatialGizmo, EditorSpatialGizmo);
|
||||
|
@ -29,9 +29,18 @@
|
||||
/*************************************************************************/
|
||||
|
||||
#include "physical_bone_plugin.h"
|
||||
|
||||
#include "editor/plugins/spatial_editor_plugin.h"
|
||||
#include "scene/3d/physics_body.h"
|
||||
#include "scene/resources/world.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/separator.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
|
||||
class EditorNode;
|
||||
|
||||
void PhysicalBoneEditor::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("_on_toggle_button_transform_joint", "is_pressed"), &PhysicalBoneEditor::_on_toggle_button_transform_joint);
|
||||
|
@ -31,8 +31,14 @@
|
||||
/*************************************************************************/
|
||||
|
||||
#include "editor/editor_node.h"
|
||||
#include "core/object.h"
|
||||
#include "core/ustring.h"
|
||||
#include "editor/editor_plugin.h"
|
||||
|
||||
class PhysicalBone;
|
||||
class EditorNode;
|
||||
class HBoxContainer;
|
||||
class ToolButton;
|
||||
|
||||
class PhysicalBoneEditor : public Object {
|
||||
GDCLASS(PhysicalBoneEditor, Object);
|
||||
|
@ -31,14 +31,50 @@
|
||||
#include "polygon_2d_editor_plugin.h"
|
||||
|
||||
#include "canvas_item_editor_plugin.h"
|
||||
#include "core/os/file_access.h"
|
||||
#include "core/os/input.h"
|
||||
#include "core/os/keyboard.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "scene/2d/skeleton_2d.h"
|
||||
#include "scene/gui/panel.h"
|
||||
#include "scene/resources/world.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/math/geometry.h"
|
||||
#include "core/math/math_defs.h"
|
||||
#include "core/math/math_funcs.h"
|
||||
#include "core/math/rect2.h"
|
||||
#include "core/math/transform_2d.h"
|
||||
#include "core/node_path.h"
|
||||
#include "core/os/input_event.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/string_name.h"
|
||||
#include "core/typedefs.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/variant.h"
|
||||
#include "scene/2d/canvas_item.h"
|
||||
#include "scene/2d/polygon_2d.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/check_box.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/dialogs.h"
|
||||
#include "scene/gui/label.h"
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "scene/gui/scroll_bar.h"
|
||||
#include "scene/gui/scroll_container.h"
|
||||
#include "scene/gui/separator.h"
|
||||
#include "scene/gui/slider.h"
|
||||
#include "scene/gui/spin_box.h"
|
||||
#include "scene/gui/split_container.h"
|
||||
#include "scene/gui/texture_rect.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/resources/texture.h"
|
||||
#include "servers/visual_server.h"
|
||||
|
||||
class EditorNode;
|
||||
class Node2D;
|
||||
|
||||
Node2D *Polygon2DEditor::_get_node() const {
|
||||
return node;
|
||||
|
@ -32,6 +32,33 @@
|
||||
|
||||
#include "editor/plugins/abstract_polygon_2d_editor.h"
|
||||
#include "scene/gui/scroll_container.h"
|
||||
#include "core/array.h"
|
||||
#include "core/color.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/object.h"
|
||||
#include "core/pool_vector.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/vector.h"
|
||||
#include "scene/gui/base_button.h"
|
||||
|
||||
class AcceptDialog;
|
||||
class Button;
|
||||
class EditorNode;
|
||||
class HScrollBar;
|
||||
class HSlider;
|
||||
class InputEvent;
|
||||
class Label;
|
||||
class MenuButton;
|
||||
class Node2D;
|
||||
class Node;
|
||||
class Panel;
|
||||
class Polygon2D;
|
||||
class ScrollContainer;
|
||||
class SpinBox;
|
||||
class TextureRect;
|
||||
class ToolButton;
|
||||
class VBoxContainer;
|
||||
class VScrollBar;
|
||||
|
||||
class Polygon2DEditor : public AbstractPolygon2DEditor {
|
||||
GDCLASS(Polygon2DEditor, AbstractPolygon2DEditor);
|
||||
|
@ -31,10 +31,30 @@
|
||||
#include "resource_preloader_editor_plugin.h"
|
||||
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "core/project_settings.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "scene/resources/world.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/dictionary.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/list.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/resource.h"
|
||||
#include "core/string_name.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "core/vector.h"
|
||||
#include "editor/editor_file_dialog.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "scene/2d/canvas_item.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/dialogs.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "scene/gui/tree.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/main/resource_preloader.h"
|
||||
|
||||
class InputEvent;
|
||||
|
||||
void ResourcePreloaderEditor::_gui_input(Ref<InputEvent> p_event) {
|
||||
}
|
||||
|
@ -36,6 +36,23 @@
|
||||
#include "scene/gui/file_dialog.h"
|
||||
#include "scene/gui/tree.h"
|
||||
#include "scene/main/resource_preloader.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/variant.h"
|
||||
#include "scene/gui/panel_container.h"
|
||||
|
||||
class AcceptDialog;
|
||||
class Button;
|
||||
class Control;
|
||||
class EditorFileDialog;
|
||||
class EditorNode;
|
||||
class InputEvent;
|
||||
class ResourcePreloader;
|
||||
class Tree;
|
||||
class UndoRedo;
|
||||
template <class T> class Vector;
|
||||
|
||||
class ResourcePreloaderEditor : public PanelContainer {
|
||||
GDCLASS(ResourcePreloaderEditor, PanelContainer);
|
||||
|
@ -32,7 +32,27 @@
|
||||
|
||||
#include "editor/spatial_editor_gizmos.h"
|
||||
#include "scene/resources/occluder_shape.h"
|
||||
#include "scene/resources/world.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/engine.h"
|
||||
#include "core/local_vector.h"
|
||||
#include "core/math/math_defs.h"
|
||||
#include "core/math/transform.h"
|
||||
#include "core/math/vector3.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/pool_vector.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/string_name.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/plugins/spatial_editor_plugin.h"
|
||||
#include "scene/3d/occluder.h"
|
||||
#include "scene/3d/portal.h"
|
||||
#include "scene/3d/room.h"
|
||||
#include "scene/3d/room_manager.h"
|
||||
#include "scene/3d/spatial.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "scene/main/node.h"
|
||||
|
||||
void RoomManagerEditorPlugin::_flip_portals() {
|
||||
if (_room_manager) {
|
||||
|
@ -37,6 +37,16 @@
|
||||
#include "scene/3d/room.h"
|
||||
#include "scene/3d/room_manager.h"
|
||||
#include "scene/resources/material.h"
|
||||
#include "core/object.h"
|
||||
#include "core/ustring.h"
|
||||
|
||||
class EditorNode;
|
||||
class Occluder;
|
||||
class Portal;
|
||||
class Room;
|
||||
class RoomManager;
|
||||
class ToolButton;
|
||||
class UndoRedo;
|
||||
|
||||
class RoomManagerEditorPlugin : public EditorPlugin {
|
||||
GDCLASS(RoomManagerEditorPlugin, EditorPlugin);
|
||||
|
@ -29,9 +29,30 @@
|
||||
/*************************************************************************/
|
||||
|
||||
#include "root_motion_editor_plugin.h"
|
||||
|
||||
#include "editor/editor_node.h"
|
||||
#include "scene/3d/skeleton.h"
|
||||
#include "scene/main/viewport.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/list.h"
|
||||
#include "core/map.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/set.h"
|
||||
#include "core/string_name.h"
|
||||
#include "core/typedefs.h"
|
||||
#include "scene/animation/animation_player.h"
|
||||
#include "scene/animation/animation_tree.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/dialogs.h"
|
||||
#include "scene/gui/tree.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/main/scene_tree.h"
|
||||
#include "scene/resources/animation.h"
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
void EditorPropertyRootMotion::_confirmed() {
|
||||
TreeItem *ti = filters->get_selected();
|
||||
|
@ -34,6 +34,14 @@
|
||||
#include "editor/editor_spin_slider.h"
|
||||
#include "editor/property_selector.h"
|
||||
#include "scene/animation/animation_tree.h"
|
||||
#include "core/node_path.h"
|
||||
#include "core/object.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/variant.h"
|
||||
|
||||
class Button;
|
||||
class ConfirmationDialog;
|
||||
class Tree;
|
||||
|
||||
class EditorPropertyRootMotion : public EditorProperty {
|
||||
GDCLASS(EditorPropertyRootMotion, EditorProperty);
|
||||
|
@ -36,7 +36,6 @@
|
||||
#include "core/os/keyboard.h"
|
||||
#include "core/os/os.h"
|
||||
#include "core/project_settings.h"
|
||||
#include "core/version.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_run_script.h"
|
||||
#include "editor/editor_scale.h"
|
||||
@ -50,6 +49,49 @@
|
||||
#include "scene/scene_string_names.h"
|
||||
#include "script_text_editor.h"
|
||||
#include "text_editor.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/color.h"
|
||||
#include "core/dictionary.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/io/config_file.h"
|
||||
#include "core/io/resource_saver.h"
|
||||
#include "core/map.h"
|
||||
#include "core/math/math_funcs.h"
|
||||
#include "core/math/transform_2d.h"
|
||||
#include "core/os/input_event.h"
|
||||
#include "core/os/main_loop.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/pair.h"
|
||||
#include "core/string_name.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "core/version_generated.gen.h"
|
||||
#include "editor/editor_data.h"
|
||||
#include "editor/editor_file_dialog.h"
|
||||
#include "editor/editor_file_system.h"
|
||||
#include "editor/editor_help.h"
|
||||
#include "editor/editor_help_search.h"
|
||||
#include "editor/inspector_dock.h"
|
||||
#include "editor/script_create_dialog.h"
|
||||
#include "scene/2d/canvas_item.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/item_list.h"
|
||||
#include "scene/gui/label.h"
|
||||
#include "scene/gui/line_edit.h"
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "scene/gui/separator.h"
|
||||
#include "scene/gui/split_container.h"
|
||||
#include "scene/gui/tab_container.h"
|
||||
#include "scene/gui/text_edit.h"
|
||||
#include "scene/gui/texture_rect.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "scene/gui/tree.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/main/scene_tree.h"
|
||||
#include "scene/main/timer.h"
|
||||
#include "scene/resources/text_file.h"
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
/*** SCRIPT EDITOR ****/
|
||||
|
||||
|
@ -46,6 +46,46 @@
|
||||
#include "scene/gui/tree.h"
|
||||
#include "scene/main/timer.h"
|
||||
#include "scene/resources/text_file.h"
|
||||
#include "core/array.h"
|
||||
#include "core/error_list.h"
|
||||
#include "core/list.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/resource.h"
|
||||
#include "core/set.h"
|
||||
#include "core/typedefs.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/variant.h"
|
||||
#include "core/vector.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/dialogs.h"
|
||||
#include "scene/gui/panel_container.h"
|
||||
|
||||
class Button;
|
||||
class ConfigFile;
|
||||
class Control;
|
||||
class EditorFileDialog;
|
||||
class EditorHelpSearch;
|
||||
class EditorNode;
|
||||
class HSplitContainer;
|
||||
class InputEvent;
|
||||
class ItemList;
|
||||
class Label;
|
||||
class LineEdit;
|
||||
class MenuButton;
|
||||
class Node;
|
||||
class PopupMenu;
|
||||
class ScriptCreateDialog;
|
||||
class SyntaxHighlighter;
|
||||
class TabContainer;
|
||||
class TextFile;
|
||||
class Texture;
|
||||
class TextureRect;
|
||||
class Timer;
|
||||
class ToolButton;
|
||||
class Tree;
|
||||
class VSplitContainer;
|
||||
|
||||
class ScriptEditorQuickOpen : public ConfirmationDialog {
|
||||
GDCLASS(ScriptEditorQuickOpen, ConfirmationDialog);
|
||||
|
@ -38,6 +38,37 @@
|
||||
#include "editor/editor_scale.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "editor/script_editor_debugger.h"
|
||||
#include "core/array.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/dictionary.h"
|
||||
#include "core/error_list.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "core/math/math_defs.h"
|
||||
#include "core/math/transform_2d.h"
|
||||
#include "core/node_path.h"
|
||||
#include "core/os/file_access.h"
|
||||
#include "core/os/input_event.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/script_language.h"
|
||||
#include "core/set.h"
|
||||
#include "core/string_name.h"
|
||||
#include "core/typedefs.h"
|
||||
#include "editor/plugins/script_editor_plugin.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/color_picker.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/label.h"
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/popup.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "scene/gui/rich_text_label.h"
|
||||
#include "scene/gui/split_container.h"
|
||||
#include "scene/gui/text_edit.h"
|
||||
#include "scene/gui/tree.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/main/scene_tree.h"
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
void ConnectionInfoDialog::ok_pressed() {
|
||||
}
|
||||
|
@ -36,6 +36,31 @@
|
||||
#include "scene/gui/dialogs.h"
|
||||
#include "scene/gui/tree.h"
|
||||
#include "script_editor_plugin.h"
|
||||
#include "core/color.h"
|
||||
#include "core/list.h"
|
||||
#include "core/map.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/object.h"
|
||||
#include "core/resource.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/variant.h"
|
||||
#include "editor/code_editor.h"
|
||||
|
||||
class ColorPicker;
|
||||
class Control;
|
||||
class HBoxContainer;
|
||||
class InputEvent;
|
||||
class Label;
|
||||
class MenuButton;
|
||||
class Node;
|
||||
class PopupMenu;
|
||||
class PopupPanel;
|
||||
class RichTextLabel;
|
||||
class Script;
|
||||
class SyntaxHighlighter;
|
||||
class Texture;
|
||||
class Tree;
|
||||
struct ScriptCodeCompletionOption;
|
||||
|
||||
class ConnectionInfoDialog : public AcceptDialog {
|
||||
GDCLASS(ConnectionInfoDialog, AcceptDialog);
|
||||
|
@ -38,8 +38,34 @@
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "editor/property_editor.h"
|
||||
#include "servers/visual/shader_types.h"
|
||||
#include "core/array.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/color.h"
|
||||
#include "core/error_list.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/map.h"
|
||||
#include "core/math/transform_2d.h"
|
||||
#include "core/os/file_access.h"
|
||||
#include "core/os/input_event.h"
|
||||
#include "core/os/main_loop.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/string_name.h"
|
||||
#include "core/variant.h"
|
||||
#include "core/vector.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/dialogs.h"
|
||||
#include "scene/gui/label.h"
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "scene/gui/text_edit.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "servers/visual/shader_language.h"
|
||||
#include "servers/visual_server.h"
|
||||
|
||||
struct ScriptCodeCompletionOption;
|
||||
|
||||
/*** SHADER SCRIPT EDITOR ****/
|
||||
|
||||
|
@ -39,6 +39,19 @@
|
||||
#include "scene/main/timer.h"
|
||||
#include "scene/resources/shader.h"
|
||||
#include "servers/visual/shader_language.h"
|
||||
#include "core/list.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/ustring.h"
|
||||
|
||||
class Button;
|
||||
class ConfirmationDialog;
|
||||
class EditorNode;
|
||||
class InputEvent;
|
||||
class MenuButton;
|
||||
class PopupMenu;
|
||||
struct ScriptCodeCompletionOption;
|
||||
|
||||
class ShaderTextEditor : public CodeTextEditor {
|
||||
GDCLASS(ShaderTextEditor, CodeTextEditor);
|
||||
|
@ -31,10 +31,16 @@
|
||||
#include "skeleton_2d_editor_plugin.h"
|
||||
|
||||
#include "canvas_item_editor_plugin.h"
|
||||
#include "scene/2d/mesh_instance_2d.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/resources/world.h"
|
||||
#include "thirdparty/misc/clipper.hpp"
|
||||
#include "core/class_db.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "scene/2d/skeleton_2d.h"
|
||||
#include "scene/gui/dialogs.h"
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
|
||||
class Node;
|
||||
|
||||
void Skeleton2DEditor::_node_removed(Node *p_node) {
|
||||
if (p_node == node) {
|
||||
|
@ -34,6 +34,15 @@
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "scene/2d/skeleton_2d.h"
|
||||
#include "scene/gui/spin_box.h"
|
||||
#include "core/object.h"
|
||||
#include "core/ustring.h"
|
||||
#include "scene/gui/control.h"
|
||||
|
||||
class AcceptDialog;
|
||||
class EditorNode;
|
||||
class MenuButton;
|
||||
class Node;
|
||||
class Skeleton2D;
|
||||
|
||||
class Skeleton2DEditor : public Control {
|
||||
GDCLASS(Skeleton2DEditor, Control);
|
||||
|
@ -32,6 +32,11 @@
|
||||
|
||||
#include "scene/3d/skeleton.h"
|
||||
#include "scene/animation/skeleton_ik.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/control.h"
|
||||
|
||||
void SkeletonIKEditorPlugin::_play() {
|
||||
if (!skeleton_ik) {
|
||||
|
@ -32,8 +32,12 @@
|
||||
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "core/object.h"
|
||||
#include "core/ustring.h"
|
||||
|
||||
class SkeletonIK;
|
||||
class Button;
|
||||
class EditorNode;
|
||||
|
||||
class SkeletonIKEditorPlugin : public EditorPlugin {
|
||||
GDCLASS(SkeletonIKEditorPlugin, EditorPlugin);
|
||||
|
@ -33,9 +33,7 @@
|
||||
#include "core/math/camera_matrix.h"
|
||||
#include "core/os/input.h"
|
||||
#include "core/os/keyboard.h"
|
||||
#include "core/print_string.h"
|
||||
#include "core/project_settings.h"
|
||||
#include "core/sort_array.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "editor/editor_settings.h"
|
||||
@ -48,15 +46,58 @@
|
||||
#include "scene/3d/mesh_instance.h"
|
||||
#include "scene/3d/physics_body.h"
|
||||
#include "scene/3d/room_manager.h"
|
||||
#include "scene/3d/skeleton.h"
|
||||
#include "scene/3d/visual_instance.h"
|
||||
#include "scene/gui/viewport_container.h"
|
||||
#include "scene/main/viewport.h"
|
||||
#include "scene/resources/environment.h"
|
||||
#include "scene/resources/packed_scene.h"
|
||||
#include "scene/resources/skin.h"
|
||||
#include "scene/resources/surface_tool.h"
|
||||
#include "scene/resources/world.h"
|
||||
#include "core/array.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/engine.h"
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "core/map.h"
|
||||
#include "core/math/basis.h"
|
||||
#include "core/math/geometry.h"
|
||||
#include "core/math/math_funcs.h"
|
||||
#include "core/math/plane.h"
|
||||
#include "core/math/rect2.h"
|
||||
#include "core/node_path.h"
|
||||
#include "core/os/input_event.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/os/os.h"
|
||||
#include "core/pool_vector.h"
|
||||
#include "core/rid_handle.h"
|
||||
#include "core/script_language.h"
|
||||
#include "core/set.h"
|
||||
#include "core/string_name.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "editor/animation_track_editor.h"
|
||||
#include "editor/editor_data.h"
|
||||
#include "editor/inspector_dock.h"
|
||||
#include "editor/scene_tree_dock.h"
|
||||
#include "editor/scene_tree_editor.h"
|
||||
#include "scene/2d/canvas_item.h"
|
||||
#include "scene/gui/check_box.h"
|
||||
#include "scene/gui/dialogs.h"
|
||||
#include "scene/gui/label.h"
|
||||
#include "scene/gui/line_edit.h"
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/option_button.h"
|
||||
#include "scene/gui/panel_container.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "scene/gui/separator.h"
|
||||
#include "scene/gui/shortcut.h"
|
||||
#include "scene/gui/split_container.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "scene/main/scene_tree.h"
|
||||
#include "scene/resources/font.h"
|
||||
#include "scene/resources/gradient.h"
|
||||
#include "scene/resources/shader.h"
|
||||
#include "scene/resources/shape.h"
|
||||
#include "scene/resources/style_box.h"
|
||||
#include "servers/physics_server.h"
|
||||
|
||||
#define DISTANCE_DEFAULT 4
|
||||
|
||||
|
@ -39,6 +39,35 @@
|
||||
#include "scene/3d/skeleton.h"
|
||||
#include "scene/3d/visual_instance.h"
|
||||
#include "scene/gui/panel_container.h"
|
||||
#include "core/color.h"
|
||||
#include "core/dictionary.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/hash_map.h"
|
||||
#include "core/list.h"
|
||||
#include "core/math/aabb.h"
|
||||
#include "core/math/math_defs.h"
|
||||
#include "core/math/transform.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/math/vector3.h"
|
||||
#include "core/object.h"
|
||||
#include "core/object_id.h"
|
||||
#include "core/resource.h"
|
||||
#include "core/rid.h"
|
||||
#include "core/typedefs.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/variant.h"
|
||||
#include "core/vector.h"
|
||||
#include "scene/3d/spatial.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/container.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/spin_box.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/resources/material.h"
|
||||
#include "scene/resources/mesh.h"
|
||||
#include "scene/resources/texture.h"
|
||||
#include "servers/visual_server.h"
|
||||
|
||||
class Camera;
|
||||
class SpatialEditor;
|
||||
@ -46,6 +75,30 @@ class EditorSpatialGizmoPlugin;
|
||||
class ViewportContainer;
|
||||
class SpatialEditorViewport;
|
||||
class Environment;
|
||||
class AcceptDialog;
|
||||
class CheckBox;
|
||||
class ConfirmationDialog;
|
||||
class EditorData;
|
||||
class EditorNode;
|
||||
class EditorSelection;
|
||||
class Gradient;
|
||||
class HSplitContainer;
|
||||
class InputEvent;
|
||||
class InputEventMouseButton;
|
||||
class InputEventMouseMotion;
|
||||
class InputEventWithModifiers;
|
||||
class Label;
|
||||
class LineEdit;
|
||||
class MenuButton;
|
||||
class OptionButton;
|
||||
class PanelContainer;
|
||||
class Plane;
|
||||
class PopupMenu;
|
||||
class SkinReference;
|
||||
class TriangleMesh;
|
||||
class UndoRedo;
|
||||
class VSplitContainer;
|
||||
class Viewport;
|
||||
|
||||
class EditorSpatialGizmo : public SpatialGizmo {
|
||||
GDCLASS(EditorSpatialGizmo, SpatialGizmo);
|
||||
|
@ -1,966 +0,0 @@
|
||||
/*************************************************************************/
|
||||
/* spatial_editor_plugin.h */
|
||||
/*************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
/* "Software"), to deal in the Software without restriction, including */
|
||||
/* without limitation the rights to use, copy, modify, merge, publish, */
|
||||
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
||||
/* permit persons to whom the Software is furnished to do so, subject to */
|
||||
/* the following conditions: */
|
||||
/* */
|
||||
/* The above copyright notice and this permission notice shall be */
|
||||
/* included in all copies or substantial portions of the Software. */
|
||||
/* */
|
||||
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
||||
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
||||
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
|
||||
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
||||
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef SPATIAL_EDITOR_PLUGIN_H
|
||||
#define SPATIAL_EDITOR_PLUGIN_H
|
||||
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "scene/3d/immediate_geometry.h"
|
||||
#include "scene/3d/light.h"
|
||||
#include "scene/3d/visual_instance.h"
|
||||
#include "scene/gui/panel_container.h"
|
||||
|
||||
class Camera;
|
||||
class SpatialEditor;
|
||||
class EditorSpatialGizmoPlugin;
|
||||
class ViewportContainer;
|
||||
class SpatialEditorViewport;
|
||||
|
||||
class EditorSpatialGizmo : public SpatialGizmo {
|
||||
GDCLASS(EditorSpatialGizmo, SpatialGizmo);
|
||||
|
||||
bool selected;
|
||||
bool instanced;
|
||||
|
||||
public:
|
||||
void set_selected(bool p_selected) { selected = p_selected; }
|
||||
bool is_selected() const { return selected; }
|
||||
|
||||
struct Instance {
|
||||
RID instance;
|
||||
Ref<Mesh> mesh;
|
||||
Ref<Material> material;
|
||||
Ref<SkinReference> skin_reference;
|
||||
RID skeleton;
|
||||
bool billboard;
|
||||
bool unscaled;
|
||||
bool can_intersect;
|
||||
bool extra_margin;
|
||||
Instance() {
|
||||
billboard = false;
|
||||
unscaled = false;
|
||||
can_intersect = false;
|
||||
extra_margin = false;
|
||||
}
|
||||
|
||||
void create_instance(Spatial *p_base, bool p_hidden = false);
|
||||
};
|
||||
|
||||
Vector<Vector3> collision_segments;
|
||||
Ref<TriangleMesh> collision_mesh;
|
||||
|
||||
struct Handle {
|
||||
Vector3 pos;
|
||||
bool billboard;
|
||||
};
|
||||
|
||||
Vector<Vector3> handles;
|
||||
Vector<Vector3> secondary_handles;
|
||||
float selectable_icon_size;
|
||||
bool billboard_handle;
|
||||
|
||||
bool valid;
|
||||
bool hidden;
|
||||
Spatial *base;
|
||||
Vector<Instance> instances;
|
||||
Spatial *spatial_node;
|
||||
EditorSpatialGizmoPlugin *gizmo_plugin;
|
||||
|
||||
void _set_spatial_node(Node *p_node) { set_spatial_node(Object::cast_to<Spatial>(p_node)); }
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
void add_lines(const Vector<Vector3> &p_lines, const Ref<Material> &p_material, bool p_billboard = false, const Color &p_modulate = Color(1, 1, 1));
|
||||
void add_vertices(const Vector<Vector3> &p_vertices, const Ref<Material> &p_material, Mesh::PrimitiveType p_primitive_type, bool p_billboard = false, const Color &p_modulate = Color(1, 1, 1));
|
||||
void add_mesh(const Ref<Mesh> &p_mesh, bool p_billboard = false, const Ref<SkinReference> &p_skin_reference = Ref<SkinReference>(), const Ref<Material> &p_material = Ref<Material>());
|
||||
void add_collision_segments(const Vector<Vector3> &p_lines);
|
||||
void add_collision_triangles(const Ref<TriangleMesh> &p_tmesh);
|
||||
void add_unscaled_billboard(const Ref<Material> &p_material, float p_scale = 1, const Color &p_modulate = Color(1, 1, 1));
|
||||
void add_handles(const Vector<Vector3> &p_handles, const Ref<Material> &p_material, bool p_billboard = false, bool p_secondary = false);
|
||||
void add_solid_box(Ref<Material> &p_material, Vector3 p_size, Vector3 p_position = Vector3());
|
||||
|
||||
virtual bool is_handle_highlighted(int p_idx) const;
|
||||
virtual String get_handle_name(int p_idx) const;
|
||||
virtual Variant get_handle_value(int p_idx);
|
||||
virtual void set_handle(int p_idx, Camera *p_camera, const Point2 &p_point);
|
||||
virtual void commit_handle(int p_idx, const Variant &p_restore, bool p_cancel = false);
|
||||
|
||||
void set_spatial_node(Spatial *p_node);
|
||||
Spatial *get_spatial_node() const { return spatial_node; }
|
||||
Ref<EditorSpatialGizmoPlugin> get_plugin() const { return gizmo_plugin; }
|
||||
Vector3 get_handle_pos(int p_idx) const;
|
||||
bool intersect_frustum(const Camera *p_camera, const Vector<Plane> &p_frustum);
|
||||
bool intersect_ray(Camera *p_camera, const Point2 &p_point, Vector3 &r_pos, Vector3 &r_normal, int *r_gizmo_handle = nullptr, bool p_sec_first = false);
|
||||
|
||||
virtual void clear();
|
||||
virtual void create();
|
||||
virtual void transform();
|
||||
virtual void redraw();
|
||||
virtual void free();
|
||||
|
||||
virtual bool is_editable() const;
|
||||
|
||||
void set_hidden(bool p_hidden);
|
||||
void set_plugin(EditorSpatialGizmoPlugin *p_plugin);
|
||||
|
||||
EditorSpatialGizmo();
|
||||
~EditorSpatialGizmo();
|
||||
};
|
||||
|
||||
class ViewportRotationControl : public Control {
|
||||
GDCLASS(ViewportRotationControl, Control);
|
||||
|
||||
struct Axis2D {
|
||||
Vector2 screen_point;
|
||||
float z_axis = -99.0;
|
||||
int axis = -1;
|
||||
};
|
||||
|
||||
struct Axis2DCompare {
|
||||
_FORCE_INLINE_ bool operator()(const Axis2D &l, const Axis2D &r) const {
|
||||
return l.z_axis < r.z_axis;
|
||||
}
|
||||
};
|
||||
|
||||
SpatialEditorViewport *viewport = nullptr;
|
||||
Vector<Color> axis_colors;
|
||||
Vector<int> axis_menu_options;
|
||||
Vector2i orbiting_mouse_start;
|
||||
bool orbiting = false;
|
||||
int focused_axis = -2;
|
||||
|
||||
const float AXIS_CIRCLE_RADIUS = 8.0f * EDSCALE;
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
void _notification(int p_what);
|
||||
void _gui_input(Ref<InputEvent> p_event);
|
||||
void _draw();
|
||||
void _draw_axis(const Axis2D &p_axis);
|
||||
void _get_sorted_axis(Vector<Axis2D> &r_axis);
|
||||
void _update_focus();
|
||||
void _on_mouse_exited();
|
||||
|
||||
public:
|
||||
void set_viewport(SpatialEditorViewport *p_viewport);
|
||||
};
|
||||
|
||||
class SpatialEditorViewport : public Control {
|
||||
GDCLASS(SpatialEditorViewport, Control);
|
||||
friend class SpatialEditor;
|
||||
friend class ViewportRotationControl;
|
||||
enum {
|
||||
|
||||
VIEW_TOP,
|
||||
VIEW_BOTTOM,
|
||||
VIEW_LEFT,
|
||||
VIEW_RIGHT,
|
||||
VIEW_FRONT,
|
||||
VIEW_REAR,
|
||||
VIEW_CENTER_TO_ORIGIN,
|
||||
VIEW_CENTER_TO_SELECTION,
|
||||
VIEW_ALIGN_TRANSFORM_WITH_VIEW,
|
||||
VIEW_ALIGN_ROTATION_WITH_VIEW,
|
||||
VIEW_PERSPECTIVE,
|
||||
VIEW_ENVIRONMENT,
|
||||
VIEW_ORTHOGONAL,
|
||||
VIEW_HALF_RESOLUTION,
|
||||
VIEW_AUDIO_LISTENER,
|
||||
VIEW_AUDIO_DOPPLER,
|
||||
VIEW_GIZMOS,
|
||||
VIEW_INFORMATION,
|
||||
VIEW_FPS,
|
||||
VIEW_DISPLAY_NORMAL,
|
||||
VIEW_DISPLAY_WIREFRAME,
|
||||
VIEW_DISPLAY_OVERDRAW,
|
||||
VIEW_DISPLAY_SHADELESS,
|
||||
VIEW_LOCK_ROTATION,
|
||||
VIEW_CINEMATIC_PREVIEW,
|
||||
VIEW_AUTO_ORTHOGONAL,
|
||||
VIEW_PORTAL_CULLING,
|
||||
};
|
||||
|
||||
enum ViewType {
|
||||
VIEW_TYPE_USER,
|
||||
VIEW_TYPE_TOP,
|
||||
VIEW_TYPE_BOTTOM,
|
||||
VIEW_TYPE_LEFT,
|
||||
VIEW_TYPE_RIGHT,
|
||||
VIEW_TYPE_FRONT,
|
||||
VIEW_TYPE_REAR,
|
||||
};
|
||||
|
||||
public:
|
||||
enum {
|
||||
GIZMO_BASE_LAYER = 27,
|
||||
GIZMO_EDIT_LAYER = 26,
|
||||
GIZMO_GRID_LAYER = 25,
|
||||
MISC_TOOL_LAYER = 24
|
||||
};
|
||||
|
||||
enum NavigationScheme {
|
||||
NAVIGATION_GODOT,
|
||||
NAVIGATION_MAYA,
|
||||
NAVIGATION_MODO,
|
||||
};
|
||||
|
||||
enum FreelookNavigationScheme {
|
||||
FREELOOK_DEFAULT,
|
||||
FREELOOK_PARTIALLY_AXIS_LOCKED,
|
||||
FREELOOK_FULLY_AXIS_LOCKED,
|
||||
};
|
||||
|
||||
private:
|
||||
int index;
|
||||
bool _project_settings_change_pending;
|
||||
ViewType view_type;
|
||||
void _menu_option(int p_option);
|
||||
void _set_auto_orthogonal();
|
||||
Spatial *preview_node;
|
||||
AABB *preview_bounds;
|
||||
Vector<String> selected_files;
|
||||
AcceptDialog *accept;
|
||||
|
||||
Node *target_node;
|
||||
Point2 drop_pos;
|
||||
|
||||
EditorNode *editor;
|
||||
EditorData *editor_data;
|
||||
EditorSelection *editor_selection;
|
||||
UndoRedo *undo_redo;
|
||||
|
||||
CheckBox *preview_camera;
|
||||
ViewportContainer *viewport_container;
|
||||
|
||||
MenuButton *view_menu;
|
||||
|
||||
Control *surface;
|
||||
Viewport *viewport;
|
||||
Camera *camera;
|
||||
bool transforming;
|
||||
bool orthogonal;
|
||||
bool auto_orthogonal;
|
||||
bool lock_rotation;
|
||||
float gizmo_scale;
|
||||
|
||||
bool freelook_active;
|
||||
real_t freelook_speed;
|
||||
Vector2 previous_mouse_position;
|
||||
|
||||
Label *info_label;
|
||||
Label *cinema_label;
|
||||
Label *locked_label;
|
||||
Label *zoom_limit_label;
|
||||
|
||||
VBoxContainer *top_right_vbox;
|
||||
ViewportRotationControl *rotation_control;
|
||||
Gradient *frame_time_gradient;
|
||||
Label *fps_label;
|
||||
|
||||
struct _RayResult {
|
||||
Spatial *item;
|
||||
float depth;
|
||||
int handle;
|
||||
_FORCE_INLINE_ bool operator<(const _RayResult &p_rr) const { return depth < p_rr.depth; }
|
||||
};
|
||||
|
||||
void _update_name();
|
||||
void _compute_edit(const Point2 &p_point);
|
||||
void _clear_selected();
|
||||
void _select_clicked(bool p_append, bool p_single, bool p_allow_locked = false);
|
||||
void _select(Node *p_node, bool p_append, bool p_single);
|
||||
ObjectID _select_ray(const Point2 &p_pos, bool p_append, bool &r_includes_current, int *r_gizmo_handle = nullptr, bool p_alt_select = false);
|
||||
void _find_items_at_pos(const Point2 &p_pos, bool &r_includes_current, Vector<_RayResult> &results, bool p_alt_select = false);
|
||||
Vector3 _get_ray_pos(const Vector2 &p_pos) const;
|
||||
Vector3 _get_ray(const Vector2 &p_pos) const;
|
||||
Point2 _point_to_screen(const Vector3 &p_point);
|
||||
Transform _get_camera_transform() const;
|
||||
int get_selected_count() const;
|
||||
|
||||
Vector3 _get_camera_position() const;
|
||||
Vector3 _get_camera_normal() const;
|
||||
Vector3 _get_screen_to_space(const Vector3 &p_vector3);
|
||||
|
||||
void _select_region();
|
||||
bool _gizmo_select(const Vector2 &p_screenpos, bool p_highlight_only = false);
|
||||
|
||||
void _nav_pan(Ref<InputEventWithModifiers> p_event, const Vector2 &p_relative);
|
||||
void _nav_zoom(Ref<InputEventWithModifiers> p_event, const Vector2 &p_relative);
|
||||
void _nav_orbit(Ref<InputEventWithModifiers> p_event, const Vector2 &p_relative);
|
||||
void _nav_look(Ref<InputEventWithModifiers> p_event, const Vector2 &p_relative);
|
||||
|
||||
float get_znear() const;
|
||||
float get_zfar() const;
|
||||
float get_fov() const;
|
||||
|
||||
ObjectID clicked;
|
||||
Vector<_RayResult> selection_results;
|
||||
bool clicked_includes_current;
|
||||
bool clicked_wants_append;
|
||||
bool selection_in_progress = false;
|
||||
|
||||
PopupMenu *selection_menu;
|
||||
|
||||
enum NavigationZoomStyle {
|
||||
NAVIGATION_ZOOM_VERTICAL,
|
||||
NAVIGATION_ZOOM_HORIZONTAL
|
||||
};
|
||||
|
||||
enum NavigationMode {
|
||||
NAVIGATION_NONE,
|
||||
NAVIGATION_PAN,
|
||||
NAVIGATION_ZOOM,
|
||||
NAVIGATION_ORBIT,
|
||||
NAVIGATION_LOOK
|
||||
};
|
||||
|
||||
public:
|
||||
enum TransformMode {
|
||||
TRANSFORM_NONE,
|
||||
TRANSFORM_ROTATE,
|
||||
TRANSFORM_TRANSLATE,
|
||||
TRANSFORM_SCALE
|
||||
|
||||
};
|
||||
enum TransformPlane {
|
||||
TRANSFORM_VIEW,
|
||||
TRANSFORM_X_AXIS,
|
||||
TRANSFORM_Y_AXIS,
|
||||
TRANSFORM_Z_AXIS,
|
||||
TRANSFORM_YZ,
|
||||
TRANSFORM_XZ,
|
||||
TRANSFORM_XY,
|
||||
};
|
||||
|
||||
struct EditData {
|
||||
TransformMode mode;
|
||||
TransformPlane plane;
|
||||
Transform original;
|
||||
Vector3 click_ray;
|
||||
Vector3 click_ray_pos;
|
||||
Vector3 center;
|
||||
Vector3 orig_gizmo_pos;
|
||||
int edited_gizmo;
|
||||
Point2 mouse_pos;
|
||||
Point2 original_mouse_pos;
|
||||
bool snap;
|
||||
Ref<EditorSpatialGizmo> gizmo;
|
||||
int gizmo_handle;
|
||||
Variant gizmo_initial_value;
|
||||
Vector3 gizmo_initial_pos;
|
||||
} _edit;
|
||||
|
||||
private:
|
||||
struct Cursor {
|
||||
Vector3 pos;
|
||||
float x_rot, y_rot, distance, fov_scale;
|
||||
Vector3 eye_pos; // Used in freelook mode
|
||||
bool region_select;
|
||||
Point2 region_begin, region_end;
|
||||
|
||||
Cursor() {
|
||||
// These rotations place the camera in +X +Y +Z, aka south east, facing north west.
|
||||
x_rot = 0.5;
|
||||
y_rot = -0.5;
|
||||
distance = 4;
|
||||
fov_scale = 1.0;
|
||||
region_select = false;
|
||||
}
|
||||
};
|
||||
// Viewport camera supports movement smoothing,
|
||||
// so one cursor is the real cursor, while the other can be an interpolated version.
|
||||
Cursor cursor; // Immediate cursor
|
||||
Cursor camera_cursor; // That one may be interpolated (don't modify this one except for smoothing purposes)
|
||||
|
||||
void scale_fov(real_t p_fov_offset);
|
||||
void reset_fov();
|
||||
void scale_cursor_distance(real_t scale);
|
||||
|
||||
void set_freelook_active(bool active_now);
|
||||
void scale_freelook_speed(real_t scale);
|
||||
|
||||
real_t zoom_indicator_delay;
|
||||
int zoom_failed_attempts_count = 0;
|
||||
|
||||
RID move_gizmo_instance[3], move_plane_gizmo_instance[3], rotate_gizmo_instance[4], scale_gizmo_instance[3], scale_plane_gizmo_instance[3];
|
||||
|
||||
String last_message;
|
||||
String message;
|
||||
float message_time;
|
||||
|
||||
void set_message(String p_message, float p_time = 5);
|
||||
|
||||
void _view_settings_confirmed(float p_interp_delta);
|
||||
void _update_camera(float p_interp_delta);
|
||||
Transform to_camera_transform(const Cursor &p_cursor) const;
|
||||
void _draw();
|
||||
|
||||
void _surface_mouse_enter();
|
||||
void _surface_mouse_exit();
|
||||
void _surface_focus_enter();
|
||||
void _surface_focus_exit();
|
||||
|
||||
void _sinput(const Ref<InputEvent> &p_event);
|
||||
void _update_freelook(real_t delta);
|
||||
SpatialEditor *spatial_editor;
|
||||
|
||||
Camera *previewing;
|
||||
Camera *preview;
|
||||
|
||||
bool previewing_cinema;
|
||||
bool _is_node_locked(const Node *p_node);
|
||||
void _preview_exited_scene();
|
||||
void _toggle_camera_preview(bool);
|
||||
void _toggle_cinema_preview(bool);
|
||||
void _init_gizmo_instance(int p_idx);
|
||||
void _finish_gizmo_instances();
|
||||
void _selection_result_pressed(int);
|
||||
void _selection_menu_hide();
|
||||
void _list_select(Ref<InputEventMouseButton> b);
|
||||
Point2i _get_warped_mouse_motion(const Ref<InputEventMouseMotion> &p_ev_mouse_motion) const;
|
||||
|
||||
Vector3 _get_instance_position(const Point2 &p_pos) const;
|
||||
static AABB _calculate_spatial_bounds(const Spatial *p_parent, bool p_exclude_toplevel_transform = true);
|
||||
|
||||
Node *_sanitize_preview_node(Node *p_node) const;
|
||||
|
||||
void _create_preview(const Vector<String> &files) const;
|
||||
void _remove_preview();
|
||||
bool _cyclical_dependency_exists(const String &p_target_scene_path, Node *p_desired_node);
|
||||
bool _create_instance(Node *parent, String &path, const Point2 &p_point);
|
||||
void _perform_drop_data();
|
||||
|
||||
bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
|
||||
void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
|
||||
|
||||
void _project_settings_changed();
|
||||
|
||||
protected:
|
||||
void _notification(int p_what);
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
void update_surface() { surface->update(); }
|
||||
void update_transform_gizmo_view();
|
||||
|
||||
void set_can_preview(Camera *p_preview);
|
||||
void set_state(const Dictionary &p_state);
|
||||
Dictionary get_state() const;
|
||||
void reset();
|
||||
bool is_freelook_active() const { return freelook_active; }
|
||||
|
||||
void focus_selection();
|
||||
|
||||
void assign_pending_data_pointers(
|
||||
Spatial *p_preview_node,
|
||||
AABB *p_preview_bounds,
|
||||
AcceptDialog *p_accept);
|
||||
|
||||
Viewport *get_viewport_node() { return viewport; }
|
||||
Camera *get_camera() { return camera; } // return the default camera object.
|
||||
|
||||
SpatialEditorViewport(SpatialEditor *p_spatial_editor, EditorNode *p_editor, int p_index);
|
||||
<<<<<<< HEAD
|
||||
|
||||
public:
|
||||
ViewportContainer *get_viewport_container() const { return viewport_container; }
|
||||
float get_gizmo_scale() { return gizmo_scale; };
|
||||
|
||||
Vector3 get_camera_normal() const;
|
||||
Vector3 get_ray_pos(const Vector2 &p_pos) const;
|
||||
Vector3 get_ray(const Vector2 &p_pos) const;
|
||||
=======
|
||||
~SpatialEditorViewport();
|
||||
>>>>>>> upstream/3.x
|
||||
};
|
||||
|
||||
class SpatialEditorSelectedItem : public Object {
|
||||
GDCLASS(SpatialEditorSelectedItem, Object);
|
||||
|
||||
public:
|
||||
AABB aabb;
|
||||
Transform original; // original location when moving
|
||||
Transform original_local;
|
||||
Transform last_xform; // last transform
|
||||
bool last_xform_dirty;
|
||||
Spatial *sp;
|
||||
RID sbox_instance;
|
||||
RID sbox_instance_offset;
|
||||
RID sbox_instance_xray;
|
||||
RID sbox_instance_xray_offset;
|
||||
|
||||
SpatialEditorSelectedItem() {
|
||||
sp = nullptr;
|
||||
last_xform_dirty = true;
|
||||
}
|
||||
~SpatialEditorSelectedItem();
|
||||
};
|
||||
|
||||
class SpatialEditorViewportContainer : public Container {
|
||||
GDCLASS(SpatialEditorViewportContainer, Container);
|
||||
|
||||
public:
|
||||
enum View {
|
||||
VIEW_USE_1_VIEWPORT,
|
||||
VIEW_USE_2_VIEWPORTS,
|
||||
VIEW_USE_2_VIEWPORTS_ALT,
|
||||
VIEW_USE_3_VIEWPORTS,
|
||||
VIEW_USE_3_VIEWPORTS_ALT,
|
||||
VIEW_USE_4_VIEWPORTS,
|
||||
};
|
||||
|
||||
private:
|
||||
View view;
|
||||
bool mouseover;
|
||||
float ratio_h;
|
||||
float ratio_v;
|
||||
|
||||
bool hovering_v;
|
||||
bool hovering_h;
|
||||
|
||||
bool dragging_v;
|
||||
bool dragging_h;
|
||||
Vector2 drag_begin_pos;
|
||||
Vector2 drag_begin_ratio;
|
||||
|
||||
void _gui_input(const Ref<InputEvent> &p_event);
|
||||
|
||||
protected:
|
||||
void _notification(int p_what);
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
void set_view(View p_view);
|
||||
View get_view();
|
||||
|
||||
SpatialEditorViewportContainer();
|
||||
};
|
||||
|
||||
class SpatialEditor : public VBoxContainer {
|
||||
GDCLASS(SpatialEditor, VBoxContainer);
|
||||
|
||||
public:
|
||||
static const unsigned int VIEWPORTS_COUNT = 4;
|
||||
|
||||
//Make sure the entries has the same order as in the MenuOption enum!
|
||||
enum ToolMode {
|
||||
TOOL_MODE_SELECT = 0,
|
||||
TOOL_MODE_MOVE,
|
||||
TOOL_MODE_ROTATE,
|
||||
TOOL_MODE_SCALE,
|
||||
TOOL_MODE_LIST_SELECT,
|
||||
TOOL_LOCK_SELECTED,
|
||||
TOOL_UNLOCK_SELECTED,
|
||||
TOOL_GROUP_SELECTED,
|
||||
TOOL_UNGROUP_SELECTED,
|
||||
TOOL_CONVERT_ROOMS,
|
||||
|
||||
TOOL_MODE_EXTERNAL,
|
||||
|
||||
TOOL_MAX
|
||||
};
|
||||
|
||||
enum ToolOptions {
|
||||
|
||||
TOOL_OPT_LOCAL_COORDS,
|
||||
TOOL_OPT_USE_SNAP,
|
||||
TOOL_OPT_OVERRIDE_CAMERA,
|
||||
TOOL_OPT_MAX
|
||||
|
||||
};
|
||||
|
||||
enum ExternalToolMode {
|
||||
|
||||
EX_TOOL_MODE_SELECT,
|
||||
EX_TOOL_MODE_MOVE,
|
||||
EX_TOOL_MODE_ROTATE,
|
||||
EX_TOOL_MODE_SCALE,
|
||||
EX_TOOL_MAX
|
||||
};
|
||||
|
||||
private:
|
||||
EditorNode *editor;
|
||||
EditorSelection *editor_selection;
|
||||
|
||||
SpatialEditorViewportContainer *viewport_base;
|
||||
SpatialEditorViewport *viewports[VIEWPORTS_COUNT];
|
||||
VSplitContainer *shader_split;
|
||||
HSplitContainer *left_panel_split;
|
||||
HSplitContainer *right_panel_split;
|
||||
|
||||
/////
|
||||
|
||||
ToolMode tool_mode;
|
||||
|
||||
VisualServer::ScenarioDebugMode scenario_debug;
|
||||
|
||||
RID origin;
|
||||
RID origin_instance;
|
||||
bool origin_enabled;
|
||||
RID grid[3];
|
||||
RID grid_instance[3];
|
||||
bool grid_visible[3]; //currently visible
|
||||
bool grid_enable[3]; //should be always visible if true
|
||||
bool grid_enabled;
|
||||
|
||||
Ref<ArrayMesh> move_gizmo[3], move_plane_gizmo[3], rotate_gizmo[4], scale_gizmo[3], scale_plane_gizmo[3];
|
||||
Ref<SpatialMaterial> gizmo_color[3];
|
||||
Ref<SpatialMaterial> plane_gizmo_color[3];
|
||||
Ref<ShaderMaterial> rotate_gizmo_color[3];
|
||||
Ref<SpatialMaterial> gizmo_color_hl[3];
|
||||
Ref<SpatialMaterial> plane_gizmo_color_hl[3];
|
||||
Ref<ShaderMaterial> rotate_gizmo_color_hl[3];
|
||||
|
||||
int over_gizmo_handle;
|
||||
float snap_translate_value;
|
||||
float snap_rotate_value;
|
||||
float snap_scale_value;
|
||||
|
||||
Ref<ArrayMesh> selection_box_xray;
|
||||
Ref<ArrayMesh> selection_box;
|
||||
RID indicators;
|
||||
RID indicators_instance;
|
||||
RID cursor_mesh;
|
||||
RID cursor_instance;
|
||||
Ref<SpatialMaterial> indicator_mat;
|
||||
Ref<ShaderMaterial> grid_mat[3];
|
||||
Ref<SpatialMaterial> cursor_material;
|
||||
|
||||
// Scene drag and drop support
|
||||
Spatial *preview_node;
|
||||
AABB preview_bounds;
|
||||
|
||||
struct Gizmo {
|
||||
bool visible;
|
||||
float scale;
|
||||
Transform transform;
|
||||
} gizmo;
|
||||
|
||||
//Make sure the entries has the same order as in the ToolMode enum!
|
||||
enum MenuOption {
|
||||
MENU_TOOL_SELECT = 0,
|
||||
MENU_TOOL_MOVE,
|
||||
MENU_TOOL_ROTATE,
|
||||
MENU_TOOL_SCALE,
|
||||
MENU_TOOL_LIST_SELECT,
|
||||
MENU_LOCK_SELECTED,
|
||||
MENU_UNLOCK_SELECTED,
|
||||
MENU_GROUP_SELECTED,
|
||||
MENU_UNGROUP_SELECTED,
|
||||
MENU_TOOL_CONVERT_ROOMS,
|
||||
MENU_TOOL_EXTERNAL,
|
||||
MENU_TOOL_LOCAL_COORDS,
|
||||
MENU_TOOL_USE_SNAP,
|
||||
MENU_TOOL_OVERRIDE_CAMERA,
|
||||
MENU_TRANSFORM_CONFIGURE_SNAP,
|
||||
MENU_TRANSFORM_DIALOG,
|
||||
MENU_VIEW_USE_1_VIEWPORT,
|
||||
MENU_VIEW_USE_2_VIEWPORTS,
|
||||
MENU_VIEW_USE_2_VIEWPORTS_ALT,
|
||||
MENU_VIEW_USE_3_VIEWPORTS,
|
||||
MENU_VIEW_USE_3_VIEWPORTS_ALT,
|
||||
MENU_VIEW_USE_4_VIEWPORTS,
|
||||
MENU_VIEW_ORIGIN,
|
||||
MENU_VIEW_GRID,
|
||||
MENU_VIEW_PORTAL_CULLING,
|
||||
MENU_VIEW_OCCLUSION_CULLING,
|
||||
MENU_VIEW_GIZMOS_3D_ICONS,
|
||||
MENU_VIEW_CAMERA_SETTINGS,
|
||||
MENU_SNAP_TO_FLOOR,
|
||||
};
|
||||
|
||||
Button *tool_button[TOOL_MAX];
|
||||
Button *tool_option_button[TOOL_OPT_MAX];
|
||||
|
||||
MenuButton *transform_menu;
|
||||
PopupMenu *gizmos_menu;
|
||||
MenuButton *view_menu = nullptr;
|
||||
|
||||
AcceptDialog *accept;
|
||||
|
||||
ConfirmationDialog *snap_dialog;
|
||||
ConfirmationDialog *xform_dialog;
|
||||
ConfirmationDialog *settings_dialog;
|
||||
|
||||
bool snap_enabled;
|
||||
bool snap_key_enabled;
|
||||
LineEdit *snap_translate;
|
||||
LineEdit *snap_rotate;
|
||||
LineEdit *snap_scale;
|
||||
PanelContainer *menu_panel;
|
||||
|
||||
LineEdit *xform_translate[3];
|
||||
LineEdit *xform_rotate[3];
|
||||
LineEdit *xform_scale[3];
|
||||
OptionButton *xform_type;
|
||||
|
||||
VBoxContainer *settings_vbc;
|
||||
SpinBox *settings_fov;
|
||||
SpinBox *settings_znear;
|
||||
SpinBox *settings_zfar;
|
||||
|
||||
void _snap_changed();
|
||||
void _snap_update();
|
||||
void _xform_dialog_action();
|
||||
void _menu_item_pressed(int p_option);
|
||||
void _menu_item_toggled(bool pressed, int p_option);
|
||||
void _menu_gizmo_toggled(int p_option);
|
||||
void _update_camera_override_button(bool p_game_running);
|
||||
void _update_camera_override_viewport(Object *p_viewport);
|
||||
|
||||
HBoxContainer *hbc_menu;
|
||||
// Used for secondary menu items which are displayed depending on the currently selected node
|
||||
// (such as MeshInstance's "Mesh" menu).
|
||||
PanelContainer *context_menu_container;
|
||||
HBoxContainer *hbc_context_menu;
|
||||
|
||||
void _generate_selection_boxes();
|
||||
UndoRedo *undo_redo;
|
||||
|
||||
int camera_override_viewport_id;
|
||||
|
||||
void _init_indicators();
|
||||
void _update_context_menu_stylebox();
|
||||
void _update_gizmos_menu();
|
||||
void _update_gizmos_menu_theme();
|
||||
void _init_grid();
|
||||
void _finish_indicators();
|
||||
void _finish_grid();
|
||||
|
||||
void _toggle_maximize_view(Object *p_viewport);
|
||||
|
||||
Node *custom_camera;
|
||||
|
||||
Object *_get_editor_data(Object *p_what);
|
||||
|
||||
Ref<Environment> viewport_environment;
|
||||
|
||||
Spatial *selected;
|
||||
|
||||
void _request_gizmo(Object *p_obj);
|
||||
|
||||
static SpatialEditor *singleton;
|
||||
|
||||
void _node_removed(Node *p_node);
|
||||
Vector<Ref<EditorSpatialGizmoPlugin>> gizmo_plugins_by_priority;
|
||||
Vector<Ref<EditorSpatialGizmoPlugin>> gizmo_plugins_by_name;
|
||||
|
||||
void _register_all_gizmos();
|
||||
|
||||
bool is_any_freelook_active() const;
|
||||
|
||||
void _refresh_menu_icons();
|
||||
|
||||
protected:
|
||||
void _notification(int p_what);
|
||||
//void _gui_input(InputEvent p_event);
|
||||
void _unhandled_key_input(Ref<InputEvent> p_event);
|
||||
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
static SpatialEditor *get_singleton() { return singleton; }
|
||||
void snap_cursor_to_plane(const Plane &p_plane);
|
||||
|
||||
Vector3 snap_point(Vector3 p_target, Vector3 p_start = Vector3(0, 0, 0)) const;
|
||||
|
||||
float get_znear() const { return settings_znear->get_value(); }
|
||||
float get_zfar() const { return settings_zfar->get_value(); }
|
||||
float get_fov() const { return settings_fov->get_value(); }
|
||||
|
||||
Transform get_gizmo_transform() const { return gizmo.transform; }
|
||||
bool is_gizmo_visible() const { return gizmo.visible; }
|
||||
|
||||
ToolMode get_tool_mode() const { return tool_mode; }
|
||||
bool are_local_coords_enabled() const { return tool_option_button[SpatialEditor::TOOL_OPT_LOCAL_COORDS]->is_pressed(); }
|
||||
bool is_snap_enabled() const { return snap_enabled ^ snap_key_enabled; }
|
||||
float get_translate_snap() const;
|
||||
float get_rotate_snap() const;
|
||||
float get_scale_snap() const;
|
||||
|
||||
Ref<ArrayMesh> get_move_gizmo(int idx) const { return move_gizmo[idx]; }
|
||||
Ref<ArrayMesh> get_move_plane_gizmo(int idx) const { return move_plane_gizmo[idx]; }
|
||||
Ref<ArrayMesh> get_rotate_gizmo(int idx) const { return rotate_gizmo[idx]; }
|
||||
Ref<ArrayMesh> get_scale_gizmo(int idx) const { return scale_gizmo[idx]; }
|
||||
Ref<ArrayMesh> get_scale_plane_gizmo(int idx) const { return scale_plane_gizmo[idx]; }
|
||||
|
||||
void update_grid();
|
||||
void update_transform_gizmo();
|
||||
void update_portal_tools();
|
||||
void show_advanced_portal_tools(bool p_show);
|
||||
void update_all_gizmos(Node *p_node = nullptr);
|
||||
void snap_selected_nodes_to_floor();
|
||||
void select_gizmo_highlight_axis(int p_axis);
|
||||
void set_custom_camera(Node *p_camera) { custom_camera = p_camera; }
|
||||
|
||||
void set_undo_redo(UndoRedo *p_undo_redo) { undo_redo = p_undo_redo; }
|
||||
Dictionary get_state() const;
|
||||
void set_state(const Dictionary &p_state);
|
||||
|
||||
Ref<Environment> get_viewport_environment() { return viewport_environment; }
|
||||
|
||||
UndoRedo *get_undo_redo() { return undo_redo; }
|
||||
|
||||
void add_control_to_menu_panel(Control *p_control);
|
||||
void remove_control_from_menu_panel(Control *p_control);
|
||||
|
||||
void add_control_to_left_panel(Control *p_control);
|
||||
void remove_control_from_left_panel(Control *p_control);
|
||||
|
||||
void add_control_to_right_panel(Control *p_control);
|
||||
void remove_control_from_right_panel(Control *p_control);
|
||||
|
||||
void move_control_to_left_panel(Control *p_control);
|
||||
void move_control_to_right_panel(Control *p_control);
|
||||
|
||||
VSplitContainer *get_shader_split();
|
||||
|
||||
Spatial *get_selected() { return selected; }
|
||||
|
||||
int get_over_gizmo_handle() const { return over_gizmo_handle; }
|
||||
void set_over_gizmo_handle(int idx) { over_gizmo_handle = idx; }
|
||||
|
||||
void set_can_preview(Camera *p_preview);
|
||||
void set_message(String p_message, float p_time = 5);
|
||||
|
||||
SpatialEditorViewport *get_editor_viewport(int p_idx) {
|
||||
ERR_FAIL_INDEX_V(p_idx, static_cast<int>(VIEWPORTS_COUNT), nullptr);
|
||||
return viewports[p_idx];
|
||||
}
|
||||
|
||||
void add_gizmo_plugin(Ref<EditorSpatialGizmoPlugin> p_plugin);
|
||||
void remove_gizmo_plugin(Ref<EditorSpatialGizmoPlugin> p_plugin);
|
||||
|
||||
void edit(Spatial *p_spatial);
|
||||
void clear();
|
||||
|
||||
SpatialEditor(EditorNode *p_editor);
|
||||
~SpatialEditor();
|
||||
|
||||
private:
|
||||
ExternalToolMode external_tool_mode = EX_TOOL_MODE_SELECT;
|
||||
Vector<Transform> externals;
|
||||
|
||||
public:
|
||||
void set_tool_mode(ToolMode p_tool_mode);
|
||||
|
||||
bool is_tool_external() const { return tool_mode == TOOL_MODE_EXTERNAL; }
|
||||
ExternalToolMode get_external_tool_mode() const { return external_tool_mode; }
|
||||
void set_external_tool_mode(ExternalToolMode p_external_tool_mode) { external_tool_mode = p_external_tool_mode; }
|
||||
|
||||
void append_to_externals(Transform p_transform) { externals.push_back(p_transform); }
|
||||
void append_array_to_externals(Vector<Transform> p_transforms) { externals.append_array(p_transforms); }
|
||||
void clear_externals() { externals.clear(); }
|
||||
Vector<Transform> get_externals() const { return externals; }
|
||||
|
||||
public:
|
||||
Ref<EditorSpatialGizmoPlugin> get_gizmo_plugin(const String &p_plugin);
|
||||
};
|
||||
|
||||
class SpatialEditorPlugin : public EditorPlugin {
|
||||
GDCLASS(SpatialEditorPlugin, EditorPlugin);
|
||||
|
||||
SpatialEditor *spatial_editor;
|
||||
EditorNode *editor;
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
void snap_cursor_to_plane(const Plane &p_plane);
|
||||
|
||||
SpatialEditor *get_spatial_editor() { return spatial_editor; }
|
||||
virtual String get_name() const { return "3D"; }
|
||||
bool has_main_screen() const { return true; }
|
||||
virtual void make_visible(bool p_visible);
|
||||
virtual void edit(Object *p_object);
|
||||
virtual bool handles(Object *p_object) const;
|
||||
|
||||
virtual Dictionary get_state() const;
|
||||
virtual void set_state(const Dictionary &p_state);
|
||||
virtual void clear() { spatial_editor->clear(); }
|
||||
|
||||
virtual void edited_scene_changed();
|
||||
|
||||
SpatialEditorPlugin(EditorNode *p_node);
|
||||
~SpatialEditorPlugin();
|
||||
};
|
||||
|
||||
class EditorSpatialGizmoPlugin : public Resource {
|
||||
GDCLASS(EditorSpatialGizmoPlugin, Resource);
|
||||
|
||||
public:
|
||||
static const int VISIBLE = 0;
|
||||
static const int HIDDEN = 1;
|
||||
static const int ON_TOP = 2;
|
||||
|
||||
protected:
|
||||
int current_state;
|
||||
List<EditorSpatialGizmo *> current_gizmos;
|
||||
HashMap<String, Vector<Ref<SpatialMaterial>>> materials;
|
||||
|
||||
static void _bind_methods();
|
||||
virtual bool has_gizmo(Spatial *p_spatial);
|
||||
virtual Ref<EditorSpatialGizmo> create_gizmo(Spatial *p_spatial);
|
||||
|
||||
public:
|
||||
void create_material(const String &p_name, const Color &p_color, bool p_billboard = false, bool p_on_top = false, bool p_use_vertex_color = false);
|
||||
void create_icon_material(const String &p_name, const Ref<Texture> &p_texture, bool p_on_top = false, const Color &p_albedo = Color(1, 1, 1, 1));
|
||||
void create_handle_material(const String &p_name, bool p_billboard = false, const Ref<Texture> &p_icon = nullptr);
|
||||
void add_material(const String &p_name, Ref<SpatialMaterial> p_material);
|
||||
|
||||
Ref<SpatialMaterial> get_material(const String &p_name, const Ref<EditorSpatialGizmo> &p_gizmo = Ref<EditorSpatialGizmo>());
|
||||
|
||||
virtual String get_name() const;
|
||||
virtual int get_priority() const;
|
||||
virtual bool can_be_hidden() const;
|
||||
virtual bool is_selectable_when_hidden() const;
|
||||
|
||||
virtual void redraw(EditorSpatialGizmo *p_gizmo);
|
||||
virtual String get_handle_name(const EditorSpatialGizmo *p_gizmo, int p_idx) const;
|
||||
virtual Variant get_handle_value(EditorSpatialGizmo *p_gizmo, int p_idx) const;
|
||||
virtual void set_handle(EditorSpatialGizmo *p_gizmo, int p_idx, Camera *p_camera, const Point2 &p_point);
|
||||
virtual void commit_handle(EditorSpatialGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false);
|
||||
virtual bool is_handle_highlighted(const EditorSpatialGizmo *p_gizmo, int p_idx) const;
|
||||
|
||||
Ref<EditorSpatialGizmo> get_gizmo(Spatial *p_spatial);
|
||||
void set_state(int p_state);
|
||||
int get_state() const;
|
||||
void unregister_gizmo(EditorSpatialGizmo *p_gizmo);
|
||||
|
||||
EditorSpatialGizmoPlugin();
|
||||
virtual ~EditorSpatialGizmoPlugin();
|
||||
};
|
||||
|
||||
#endif
|
@ -40,6 +40,32 @@
|
||||
#include "scene/resources/bit_map.h"
|
||||
#include "thirdparty/misc/clipper.hpp"
|
||||
#include "scene/resources/mesh.h"
|
||||
#include "core/array.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/color.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/image.h"
|
||||
#include "core/math/geometry.h"
|
||||
#include "core/math/rect2.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/pool_vector.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "core/variant.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/scene_tree_dock.h"
|
||||
#include "scene/2d/node_2d.h"
|
||||
#include "scene/2d/sprite.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/dialogs.h"
|
||||
#include "scene/gui/label.h"
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "scene/gui/scroll_container.h"
|
||||
#include "scene/gui/spin_box.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/main/scene_tree.h"
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
void SpriteEditor::_node_removed(Node *p_node) {
|
||||
if (p_node == node) {
|
||||
|
@ -34,6 +34,20 @@
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "scene/2d/sprite.h"
|
||||
#include "scene/gui/spin_box.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/object.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/vector.h"
|
||||
#include "scene/gui/control.h"
|
||||
|
||||
class AcceptDialog;
|
||||
class Button;
|
||||
class ConfirmationDialog;
|
||||
class EditorNode;
|
||||
class MenuButton;
|
||||
class Node;
|
||||
class SpinBox;
|
||||
class Sprite;
|
||||
|
||||
class SpriteEditor : public Control {
|
||||
GDCLASS(SpriteEditor, Control);
|
||||
|
@ -33,14 +33,47 @@
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "core/os/input.h"
|
||||
#include "core/os/keyboard.h"
|
||||
#include "core/project_settings.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "scene/3d/sprite_3d.h"
|
||||
#include "scene/gui/center_container.h"
|
||||
#include "scene/gui/margin_container.h"
|
||||
#include "scene/gui/panel_container.h"
|
||||
#include "scene/resources/world.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/color.h"
|
||||
#include "core/dictionary.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/list.h"
|
||||
#include "core/math/math_defs.h"
|
||||
#include "core/math/math_funcs.h"
|
||||
#include "core/math/rect2.h"
|
||||
#include "core/os/input_event.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/pool_vector.h"
|
||||
#include "core/resource.h"
|
||||
#include "core/typedefs.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "core/vector.h"
|
||||
#include "editor/editor_file_dialog.h"
|
||||
#include "editor/editor_file_system.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "scene/2d/animated_sprite.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/check_button.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/dialogs.h"
|
||||
#include "scene/gui/item_list.h"
|
||||
#include "scene/gui/label.h"
|
||||
#include "scene/gui/line_edit.h"
|
||||
#include "scene/gui/scroll_container.h"
|
||||
#include "scene/gui/separator.h"
|
||||
#include "scene/gui/spin_box.h"
|
||||
#include "scene/gui/texture_rect.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "scene/gui/tree.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
void SpriteFramesEditor::_gui_input(Ref<InputEvent> p_event) {
|
||||
}
|
||||
|
@ -38,6 +38,31 @@
|
||||
#include "scene/gui/split_container.h"
|
||||
#include "scene/gui/texture_rect.h"
|
||||
#include "scene/gui/tree.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/set.h"
|
||||
#include "core/string_name.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/variant.h"
|
||||
|
||||
class AcceptDialog;
|
||||
class Button;
|
||||
class CheckButton;
|
||||
class ConfirmationDialog;
|
||||
class Control;
|
||||
class EditorFileDialog;
|
||||
class EditorNode;
|
||||
class InputEvent;
|
||||
class ItemList;
|
||||
class ScrollContainer;
|
||||
class SpinBox;
|
||||
class SpriteFrames;
|
||||
class TextureRect;
|
||||
class ToolButton;
|
||||
class Tree;
|
||||
class UndoRedo;
|
||||
template <class T> class PoolVector;
|
||||
|
||||
class SpriteFramesEditor : public HSplitContainer {
|
||||
GDCLASS(SpriteFramesEditor, HSplitContainer);
|
||||
|
@ -31,6 +31,13 @@
|
||||
#include "style_box_editor_plugin.h"
|
||||
|
||||
#include "editor/editor_scale.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/math/rect2.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "scene/gui/control.h"
|
||||
|
||||
class EditorNode;
|
||||
|
||||
bool EditorInspectorPluginStyleBox::can_handle(Object *p_object) {
|
||||
return Object::cast_to<StyleBox>(p_object) != nullptr;
|
||||
|
@ -35,6 +35,15 @@
|
||||
#include "scene/gui/option_button.h"
|
||||
#include "scene/gui/texture_rect.h"
|
||||
#include "scene/resources/style_box.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/variant.h"
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
|
||||
class Control;
|
||||
class EditorNode;
|
||||
|
||||
class StyleBoxPreview : public VBoxContainer {
|
||||
GDCLASS(StyleBoxPreview, VBoxContainer);
|
||||
|
@ -32,6 +32,24 @@
|
||||
|
||||
#include "core/os/keyboard.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "core/array.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/dictionary.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/math/transform_2d.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/os/input_event.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/typedefs.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "editor/plugins/script_editor_plugin.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "scene/gui/text_edit.h"
|
||||
#include "scene/resources/text_file.h"
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
void TextEditor::add_syntax_highlighter(SyntaxHighlighter *p_highlighter) {
|
||||
highlighters[p_highlighter->get_name()] = p_highlighter;
|
||||
|
@ -31,6 +31,26 @@
|
||||
/*************************************************************************/
|
||||
|
||||
#include "script_editor_plugin.h"
|
||||
#include "core/color.h"
|
||||
#include "core/list.h"
|
||||
#include "core/map.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/resource.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/variant.h"
|
||||
#include "core/vector.h"
|
||||
#include "editor/code_editor.h"
|
||||
|
||||
class Control;
|
||||
class HBoxContainer;
|
||||
class InputEvent;
|
||||
class MenuButton;
|
||||
class PopupMenu;
|
||||
class SyntaxHighlighter;
|
||||
class TextFile;
|
||||
class Texture;
|
||||
struct Vector2;
|
||||
|
||||
class TextEditor : public ScriptEditorBase {
|
||||
GDCLASS(TextEditor, ScriptEditorBase);
|
||||
|
@ -32,6 +32,19 @@
|
||||
|
||||
#include "editor/editor_scale.h"
|
||||
#include "scene/resources/dynamic_font.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/color.h"
|
||||
#include "core/image.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/label.h"
|
||||
#include "scene/gui/texture_rect.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/resources/font.h"
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
class EditorNode;
|
||||
|
||||
TextureRect *TexturePreview::get_texture_display() {
|
||||
return texture_display;
|
||||
|
@ -33,6 +33,16 @@
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "scene/resources/texture.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/ustring.h"
|
||||
#include "editor/editor_inspector.h"
|
||||
#include "scene/gui/margin_container.h"
|
||||
|
||||
class EditorNode;
|
||||
class Label;
|
||||
class Texture;
|
||||
class TextureRect;
|
||||
|
||||
class TexturePreview : public MarginContainer {
|
||||
GDCLASS(TexturePreview, MarginContainer);
|
||||
|
@ -34,8 +34,35 @@
|
||||
#include "core/os/input.h"
|
||||
#include "core/os/keyboard.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "scene/gui/check_box.h"
|
||||
#include "scene/gui/panel.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/color.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/math/math_defs.h"
|
||||
#include "core/math/math_funcs.h"
|
||||
#include "core/math/transform_2d.h"
|
||||
#include "core/os/input_event.h"
|
||||
#include "core/os/main_loop.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/string_name.h"
|
||||
#include "core/typedefs.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "core/variant.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "scene/2d/canvas_item.h"
|
||||
#include "scene/2d/sprite.h"
|
||||
#include "scene/3d/sprite_3d.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/label.h"
|
||||
#include "scene/gui/nine_patch_rect.h"
|
||||
#include "scene/gui/option_button.h"
|
||||
#include "scene/gui/scroll_bar.h"
|
||||
#include "scene/gui/separator.h"
|
||||
#include "scene/gui/spin_box.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "servers/visual_server.h"
|
||||
|
||||
/**
|
||||
@author Mariano Suligoy
|
||||
|
@ -38,6 +38,30 @@
|
||||
#include "scene/gui/nine_patch_rect.h"
|
||||
#include "scene/resources/style_box.h"
|
||||
#include "scene/resources/texture.h"
|
||||
#include "core/dictionary.h"
|
||||
#include "core/list.h"
|
||||
#include "core/map.h"
|
||||
#include "core/math/rect2.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/rid.h"
|
||||
#include "core/ustring.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
|
||||
class Button;
|
||||
class EditorNode;
|
||||
class HScrollBar;
|
||||
class InputEvent;
|
||||
class NinePatchRect;
|
||||
class OptionButton;
|
||||
class Panel;
|
||||
class SpinBox;
|
||||
class Sprite3D;
|
||||
class Sprite;
|
||||
class ToolButton;
|
||||
class UndoRedo;
|
||||
class VScrollBar;
|
||||
|
||||
/**
|
||||
@author Mariano Suligoy
|
||||
|
@ -34,6 +34,43 @@
|
||||
#include "editor/editor_resource_picker.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "editor/progress_dialog.h"
|
||||
#include "core/array.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/color.h"
|
||||
#include "core/error_macros.h"
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/os/input_event.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/typedefs.h"
|
||||
#include "core/variant.h"
|
||||
#include "editor/editor_file_dialog.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/plugins/theme_editor_preview.h"
|
||||
#include "scene/2d/canvas_item.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/check_button.h"
|
||||
#include "scene/gui/color_picker.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/item_list.h"
|
||||
#include "scene/gui/label.h"
|
||||
#include "scene/gui/line_edit.h"
|
||||
#include "scene/gui/option_button.h"
|
||||
#include "scene/gui/panel_container.h"
|
||||
#include "scene/gui/scroll_container.h"
|
||||
#include "scene/gui/separator.h"
|
||||
#include "scene/gui/spin_box.h"
|
||||
#include "scene/gui/split_container.h"
|
||||
#include "scene/gui/tab_container.h"
|
||||
#include "scene/gui/tabs.h"
|
||||
#include "scene/gui/texture_rect.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "scene/gui/tree.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/main/scene_tree.h"
|
||||
#include "scene/main/timer.h"
|
||||
#include "scene/resources/font.h"
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
void ThemeItemImportTree::_update_items_tree() {
|
||||
import_items_tree->clear();
|
||||
|
@ -38,8 +38,42 @@
|
||||
#include "scene/gui/texture_rect.h"
|
||||
#include "scene/resources/theme.h"
|
||||
#include "theme_editor_preview.h"
|
||||
|
||||
#include "editor/editor_node.h"
|
||||
#include "core/list.h"
|
||||
#include "core/map.h"
|
||||
#include "core/object.h"
|
||||
#include "core/ordered_hash_map.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/resource.h"
|
||||
#include "core/string_name.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/vector.h"
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/resources/style_box.h"
|
||||
|
||||
class Button;
|
||||
class CheckButton;
|
||||
class Control;
|
||||
class EditorFileDialog;
|
||||
class EditorNode;
|
||||
class Font;
|
||||
class InputEvent;
|
||||
class ItemList;
|
||||
class Label;
|
||||
class LineEdit;
|
||||
class Node;
|
||||
class OptionButton;
|
||||
class PanelContainer;
|
||||
class TabContainer;
|
||||
class Tabs;
|
||||
class Texture;
|
||||
class TextureRect;
|
||||
class ThemeEditorPreview;
|
||||
class Timer;
|
||||
class Tree;
|
||||
class TreeItem;
|
||||
struct Color;
|
||||
|
||||
class ThemeItemImportTree : public VBoxContainer {
|
||||
GDCLASS(ThemeItemImportTree, VBoxContainer);
|
||||
|
@ -30,12 +30,45 @@
|
||||
|
||||
#include "theme_editor_preview.h"
|
||||
|
||||
#include "core/math/math_funcs.h"
|
||||
#include "core/os/input.h"
|
||||
#include "core/project_settings.h"
|
||||
#include "scene/resources/packed_scene.h"
|
||||
|
||||
#include "editor/editor_scale.h"
|
||||
#include "core/class_db.h"
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "core/math/math_defs.h"
|
||||
#include "core/math/rect2.h"
|
||||
#include "core/math/transform_2d.h"
|
||||
#include "core/math/vector2.h"
|
||||
#include "core/os/input_event.h"
|
||||
#include "core/os/memory.h"
|
||||
#include "core/string_name.h"
|
||||
#include "core/typedefs.h"
|
||||
#include "core/variant.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/check_box.h"
|
||||
#include "scene/gui/check_button.h"
|
||||
#include "scene/gui/color_picker.h"
|
||||
#include "scene/gui/color_rect.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/label.h"
|
||||
#include "scene/gui/line_edit.h"
|
||||
#include "scene/gui/margin_container.h"
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/option_button.h"
|
||||
#include "scene/gui/panel.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "scene/gui/progress_bar.h"
|
||||
#include "scene/gui/scroll_bar.h"
|
||||
#include "scene/gui/scroll_container.h"
|
||||
#include "scene/gui/separator.h"
|
||||
#include "scene/gui/slider.h"
|
||||
#include "scene/gui/spin_box.h"
|
||||
#include "scene/gui/tab_container.h"
|
||||
#include "scene/gui/text_edit.h"
|
||||
#include "scene/gui/tree.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/resources/theme.h"
|
||||
|
||||
constexpr double REFRESH_TIMER = 1.5;
|
||||
|
||||
|
@ -48,8 +48,23 @@
|
||||
#include "scene/gui/text_edit.h"
|
||||
#include "scene/gui/tree.h"
|
||||
#include "scene/resources/theme.h"
|
||||
|
||||
#include "editor/editor_node.h"
|
||||
#include "core/color.h"
|
||||
#include "core/object.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/ustring.h"
|
||||
#include "scene/resources/font.h"
|
||||
#include "scene/resources/packed_scene.h"
|
||||
#include "scene/resources/style_box.h"
|
||||
|
||||
class Button;
|
||||
class ColorRect;
|
||||
class Control;
|
||||
class InputEvent;
|
||||
class MarginContainer;
|
||||
class ScrollContainer;
|
||||
class Theme;
|
||||
struct Vector2;
|
||||
|
||||
class ThemeEditorPreview : public VBoxContainer {
|
||||
GDCLASS(ThemeEditorPreview, VBoxContainer);
|
||||
|
@ -30,6 +30,15 @@
|
||||
|
||||
#include "viewport_preview_editor_plugin.h"
|
||||
|
||||
#include "core/os/memory.h"
|
||||
#include "core/reference.h"
|
||||
#include "editor/editor_inspector.h"
|
||||
#include "scene/gui/texture_rect.h"
|
||||
#include "scene/main/viewport.h"
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
class EditorNode;
|
||||
|
||||
bool EditorInspectorPluginViewportPreview::can_handle(Object *p_object) {
|
||||
return Object::cast_to<Viewport>(p_object) != nullptr;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user