godot/editor/editor_properties.cpp

/**************************************************************************/
/*  editor_properties.cpp                                                 */
/**************************************************************************/
/*                         This file is part of:                          */
/*                             GODOT ENGINE                               */
/*                        https://godotengine.org                         */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
/*                                                                        */
/* 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.                 */
/**************************************************************************/

#include "editor_properties.h"

#include "core/config/project_settings.h"
#include "editor/create_dialog.h"
#include "editor/editor_node.h"
#include "editor/editor_properties_array_dict.h"
#include "editor/editor_properties_vector.h"
#include "editor/editor_resource_picker.h"
#include "editor/editor_settings.h"
#include "editor/editor_string_names.h"
#include "editor/gui/editor_file_dialog.h"
#include "editor/gui/editor_spin_slider.h"
#include "editor/gui/scene_tree_editor.h"
#include "editor/inspector_dock.h"
#include "editor/plugins/script_editor_plugin.h"
#include "editor/project_settings_editor.h"
#include "editor/property_selector.h"
#include "editor/scene_tree_dock.h"
#include "editor/themes/editor_scale.h"
#include "editor/themes/editor_theme_manager.h"
#include "scene/2d/gpu_particles_2d.h"
#include "scene/3d/fog_volume.h"
#include "scene/3d/gpu_particles_3d.h"
#include "scene/gui/color_picker.h"
#include "scene/main/window.h"
#include "scene/resources/font.h"
#include "scene/resources/mesh.h"
#include "scene/resources/packed_scene.h"
#include "scene/resources/visual_shader_nodes.h"

///////////////////// Nil /////////////////////////

void EditorPropertyNil::update_property() {}

EditorPropertyNil::EditorPropertyNil() {}

///////////////////// TEXT /////////////////////////

void EditorPropertyText::_set_read_only(bool p_read_only) {}

void EditorPropertyText::_text_submitted(const String &p_string) {}

void EditorPropertyText::_text_changed(const String &p_string) {}

void EditorPropertyText::update_property() {}

void EditorPropertyText::set_string_name(bool p_enabled) {}

void EditorPropertyText::set_secret(bool p_enabled) {}

void EditorPropertyText::set_placeholder(const String &p_string) {}

EditorPropertyText::EditorPropertyText() {}

///////////////////// MULTILINE TEXT /////////////////////////

void EditorPropertyMultilineText::_set_read_only(bool p_read_only) {}

void EditorPropertyMultilineText::_big_text_changed() {}

void EditorPropertyMultilineText::_text_changed() {}

void EditorPropertyMultilineText::_open_big_text() {}

void EditorPropertyMultilineText::update_property() {}

void EditorPropertyMultilineText::_notification(int p_what) {}

EditorPropertyMultilineText::EditorPropertyMultilineText(bool p_expression) {}

///////////////////// TEXT ENUM /////////////////////////

void EditorPropertyTextEnum::_set_read_only(bool p_read_only) {}

void EditorPropertyTextEnum::_emit_changed_value(const String &p_string) {}

void EditorPropertyTextEnum::_option_selected(int p_which) {}

void EditorPropertyTextEnum::_edit_custom_value() {}

void EditorPropertyTextEnum::_custom_value_submitted(const String &p_value) {}

void EditorPropertyTextEnum::_custom_value_accepted() {}

void EditorPropertyTextEnum::_custom_value_canceled() {}

void EditorPropertyTextEnum::update_property() {}

void EditorPropertyTextEnum::setup(const Vector<String> &p_options, bool p_string_name, bool p_loose_mode) {}

void EditorPropertyTextEnum::_notification(int p_what) {}

EditorPropertyTextEnum::EditorPropertyTextEnum() {}

//////////////////// LOCALE ////////////////////////

void EditorPropertyLocale::_locale_selected(const String &p_locale) {}

void EditorPropertyLocale::_locale_pressed() {}

void EditorPropertyLocale::update_property() {}

void EditorPropertyLocale::setup(const String &p_hint_text) {}

void EditorPropertyLocale::_notification(int p_what) {}

void EditorPropertyLocale::_locale_focus_exited() {}

EditorPropertyLocale::EditorPropertyLocale() {}

///////////////////// PATH /////////////////////////

void EditorPropertyPath::_set_read_only(bool p_read_only) {}

void EditorPropertyPath::_path_selected(const String &p_path) {}

void EditorPropertyPath::_path_pressed() {}

void EditorPropertyPath::update_property() {}

void EditorPropertyPath::setup(const Vector<String> &p_extensions, bool p_folder, bool p_global) {}

void EditorPropertyPath::set_save_mode() {}

void EditorPropertyPath::_notification(int p_what) {}

void EditorPropertyPath::_path_focus_exited() {}

void EditorPropertyPath::_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {}

bool EditorPropertyPath::_can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {}

EditorPropertyPath::EditorPropertyPath() {}

///////////////////// CLASS NAME /////////////////////////

void EditorPropertyClassName::_set_read_only(bool p_read_only) {}

void EditorPropertyClassName::setup(const String &p_base_type, const String &p_selected_type) {}

void EditorPropertyClassName::update_property() {}

void EditorPropertyClassName::_property_selected() {}

void EditorPropertyClassName::_dialog_created() {}

EditorPropertyClassName::EditorPropertyClassName() {}

///////////////////// CHECK /////////////////////////

void EditorPropertyCheck::_set_read_only(bool p_read_only) {}

void EditorPropertyCheck::_checkbox_pressed() {}

void EditorPropertyCheck::update_property() {}

EditorPropertyCheck::EditorPropertyCheck() {}

///////////////////// ENUM /////////////////////////

void EditorPropertyEnum::_set_read_only(bool p_read_only) {}

void EditorPropertyEnum::_option_selected(int p_which) {}

void EditorPropertyEnum::update_property() {}

void EditorPropertyEnum::setup(const Vector<String> &p_options) {}

void EditorPropertyEnum::set_option_button_clip(bool p_enable) {}

EditorPropertyEnum::EditorPropertyEnum() {}

///////////////////// FLAGS /////////////////////////

void EditorPropertyFlags::_set_read_only(bool p_read_only) {}

void EditorPropertyFlags::_flag_toggled(int p_index) {}

void EditorPropertyFlags::update_property() {}

void EditorPropertyFlags::setup(const Vector<String> &p_options) {}

EditorPropertyFlags::EditorPropertyFlags() {}

///////////////////// LAYERS /////////////////////////

void EditorPropertyLayersGrid::_rename_pressed(int p_menu) {}

void EditorPropertyLayersGrid::_rename_operation_confirm() {}

EditorPropertyLayersGrid::EditorPropertyLayersGrid() {}

Size2 EditorPropertyLayersGrid::get_grid_size() const {}

void EditorPropertyLayersGrid::set_read_only(bool p_read_only) {}

Size2 EditorPropertyLayersGrid::get_minimum_size() const {}

String EditorPropertyLayersGrid::get_tooltip(const Point2 &p_pos) const {}

void EditorPropertyLayersGrid::_update_hovered(const Vector2 &p_position) {}

void EditorPropertyLayersGrid::_on_hover_exit() {}

void EditorPropertyLayersGrid::_update_flag(bool p_replace) {}

void EditorPropertyLayersGrid::gui_input(const Ref<InputEvent> &p_ev) {}

void EditorPropertyLayersGrid::_notification(int p_what) {}

void EditorPropertyLayersGrid::set_flag(uint32_t p_flag) {}

void EditorPropertyLayersGrid::_bind_methods() {}

void EditorPropertyLayers::_notification(int p_what) {}

void EditorPropertyLayers::_set_read_only(bool p_read_only) {}

void EditorPropertyLayers::_grid_changed(uint32_t p_grid) {}

void EditorPropertyLayers::update_property() {}

void EditorPropertyLayers::setup(LayerType p_layer_type) {}

void EditorPropertyLayers::set_layer_name(int p_index, const String &p_name) {}

String EditorPropertyLayers::get_layer_name(int p_index) const {}

void EditorPropertyLayers::_button_pressed() {}

void EditorPropertyLayers::_menu_pressed(int p_menu) {}

void EditorPropertyLayers::_refresh_names() {}

EditorPropertyLayers::EditorPropertyLayers() {}

///////////////////// INT /////////////////////////

void EditorPropertyInteger::_set_read_only(bool p_read_only) {}

void EditorPropertyInteger::_value_changed(int64_t val) {}

void EditorPropertyInteger::update_property() {}

void EditorPropertyInteger::setup(int64_t p_min, int64_t p_max, int64_t p_step, bool p_hide_slider, bool p_allow_greater, bool p_allow_lesser, const String &p_suffix) {}

EditorPropertyInteger::EditorPropertyInteger() {}

///////////////////// OBJECT ID /////////////////////////

void EditorPropertyObjectID::_set_read_only(bool p_read_only) {}

void EditorPropertyObjectID::_edit_pressed() {}

void EditorPropertyObjectID::update_property() {}

void EditorPropertyObjectID::setup(const String &p_base_type) {}

EditorPropertyObjectID::EditorPropertyObjectID() {}

///////////////////// SIGNAL /////////////////////////

void EditorPropertySignal::_edit_pressed() {}

void EditorPropertySignal::update_property() {}

EditorPropertySignal::EditorPropertySignal() {}

///////////////////// CALLABLE /////////////////////////

void EditorPropertyCallable::update_property() {}

EditorPropertyCallable::EditorPropertyCallable() {}

///////////////////// FLOAT /////////////////////////

void EditorPropertyFloat::_set_read_only(bool p_read_only) {}

void EditorPropertyFloat::_value_changed(double val) {}

void EditorPropertyFloat::update_property() {}

void EditorPropertyFloat::setup(double p_min, double p_max, double p_step, bool p_hide_slider, bool p_exp_range, bool p_greater, bool p_lesser, const String &p_suffix, bool p_radians_as_degrees) {}

EditorPropertyFloat::EditorPropertyFloat() {}

///////////////////// EASING /////////////////////////

void EditorPropertyEasing::_set_read_only(bool p_read_only) {}

void EditorPropertyEasing::_drag_easing(const Ref<InputEvent> &p_ev) {}

void EditorPropertyEasing::_draw_easing() {}

void EditorPropertyEasing::update_property() {}

void EditorPropertyEasing::_set_preset(int p_preset) {}

void EditorPropertyEasing::_setup_spin() {}

void EditorPropertyEasing::_spin_value_changed(double p_value) {}

void EditorPropertyEasing::_spin_focus_exited() {}

void EditorPropertyEasing::setup(bool p_positive_only, bool p_flip) {}

void EditorPropertyEasing::_notification(int p_what) {}

EditorPropertyEasing::EditorPropertyEasing() {}

///////////////////// RECT2 /////////////////////////

void EditorPropertyRect2::_set_read_only(bool p_read_only) {}

void EditorPropertyRect2::_value_changed(double val, const String &p_name) {}

void EditorPropertyRect2::update_property() {}

void EditorPropertyRect2::_notification(int p_what) {}

void EditorPropertyRect2::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {}

EditorPropertyRect2::EditorPropertyRect2(bool p_force_wide) {}

///////////////////// RECT2i /////////////////////////

void EditorPropertyRect2i::_set_read_only(bool p_read_only) {}

void EditorPropertyRect2i::_value_changed(double val, const String &p_name) {}

void EditorPropertyRect2i::update_property() {}

void EditorPropertyRect2i::_notification(int p_what) {}

void EditorPropertyRect2i::setup(int p_min, int p_max, const String &p_suffix) {}

EditorPropertyRect2i::EditorPropertyRect2i(bool p_force_wide) {}

///////////////////// PLANE /////////////////////////

void EditorPropertyPlane::_set_read_only(bool p_read_only) {}

void EditorPropertyPlane::_value_changed(double val, const String &p_name) {}

void EditorPropertyPlane::update_property() {}

void EditorPropertyPlane::_notification(int p_what) {}

void EditorPropertyPlane::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {}

EditorPropertyPlane::EditorPropertyPlane(bool p_force_wide) {}

///////////////////// QUATERNION /////////////////////////

void EditorPropertyQuaternion::_set_read_only(bool p_read_only) {}

void EditorPropertyQuaternion::_edit_custom_value() {}

void EditorPropertyQuaternion::_custom_value_changed(double val) {}

void EditorPropertyQuaternion::_value_changed(double val, const String &p_name) {}

bool EditorPropertyQuaternion::is_grabbing_euler() {}

void EditorPropertyQuaternion::update_property() {}

void EditorPropertyQuaternion::_warning_pressed() {}

void EditorPropertyQuaternion::_notification(int p_what) {}

void EditorPropertyQuaternion::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix, bool p_hide_editor) {}

EditorPropertyQuaternion::EditorPropertyQuaternion() {}

///////////////////// AABB /////////////////////////

void EditorPropertyAABB::_set_read_only(bool p_read_only) {}

void EditorPropertyAABB::_value_changed(double val, const String &p_name) {}

void EditorPropertyAABB::update_property() {}

void EditorPropertyAABB::_notification(int p_what) {}

void EditorPropertyAABB::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {}

EditorPropertyAABB::EditorPropertyAABB() {}

///////////////////// TRANSFORM2D /////////////////////////

void EditorPropertyTransform2D::_set_read_only(bool p_read_only) {}

void EditorPropertyTransform2D::_value_changed(double val, const String &p_name) {}

void EditorPropertyTransform2D::update_property() {}

void EditorPropertyTransform2D::_notification(int p_what) {}

void EditorPropertyTransform2D::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {}

EditorPropertyTransform2D::EditorPropertyTransform2D(bool p_include_origin) {}

///////////////////// BASIS /////////////////////////

void EditorPropertyBasis::_set_read_only(bool p_read_only) {}

void EditorPropertyBasis::_value_changed(double val, const String &p_name) {}

void EditorPropertyBasis::update_property() {}

void EditorPropertyBasis::_notification(int p_what) {}

void EditorPropertyBasis::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {}

EditorPropertyBasis::EditorPropertyBasis() {}

///////////////////// TRANSFORM3D /////////////////////////

void EditorPropertyTransform3D::_set_read_only(bool p_read_only) {}

void EditorPropertyTransform3D::_value_changed(double val, const String &p_name) {}

void EditorPropertyTransform3D::update_property() {}

void EditorPropertyTransform3D::update_using_transform(Transform3D p_transform) {}

void EditorPropertyTransform3D::_notification(int p_what) {}

void EditorPropertyTransform3D::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {}

EditorPropertyTransform3D::EditorPropertyTransform3D() {}

///////////////////// PROJECTION /////////////////////////

void EditorPropertyProjection::_set_read_only(bool p_read_only) {}

void EditorPropertyProjection::_value_changed(double val, const String &p_name) {}

void EditorPropertyProjection::update_property() {}

void EditorPropertyProjection::update_using_transform(Projection p_transform) {}

void EditorPropertyProjection::_notification(int p_what) {}

void EditorPropertyProjection::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {}

EditorPropertyProjection::EditorPropertyProjection() {}
////////////// COLOR PICKER //////////////////////

void EditorPropertyColor::_set_read_only(bool p_read_only) {}

void EditorPropertyColor::_color_changed(const Color &p_color) {}

void EditorPropertyColor::_popup_closed() {}

void EditorPropertyColor::_picker_opening() {}

void EditorPropertyColor::_notification(int p_what) {}

void EditorPropertyColor::update_property() {}

void EditorPropertyColor::setup(bool p_show_alpha) {}

void EditorPropertyColor::set_live_changes_enabled(bool p_enabled) {}

EditorPropertyColor::EditorPropertyColor() {}

////////////// NODE PATH //////////////////////

void EditorPropertyNodePath::_set_read_only(bool p_read_only) {
	assign->set_disabled(p_read_only);
	menu->set_disabled(p_read_only);
};

Variant EditorPropertyNodePath::_get_cache_value(const StringName &p_prop, bool &r_valid) const {}

void EditorPropertyNodePath::_node_selected(const NodePath &p_path) {}

void EditorPropertyNodePath::_node_assign() {}

void EditorPropertyNodePath::_update_menu() {}

void EditorPropertyNodePath::_menu_option(int p_idx) {}

void EditorPropertyNodePath::_accept_text() {}

void EditorPropertyNodePath::_text_submitted(const String &p_text) {}

const NodePath EditorPropertyNodePath::_get_node_path() const {}

bool EditorPropertyNodePath::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {}

void EditorPropertyNodePath::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {}

bool EditorPropertyNodePath::is_drop_valid(const Dictionary &p_drag_data) const {}

void EditorPropertyNodePath::update_property() {}

void EditorPropertyNodePath::setup(const Vector<StringName> &p_valid_types, bool p_use_path_from_scene_root, bool p_editing_node) {}

void EditorPropertyNodePath::_notification(int p_what) {}

Node *EditorPropertyNodePath::get_base_node() {}

EditorPropertyNodePath::EditorPropertyNodePath() {}

///////////////////// RID /////////////////////////

void EditorPropertyRID::update_property() {}

EditorPropertyRID::EditorPropertyRID() {}

////////////// RESOURCE //////////////////////

void EditorPropertyResource::_set_read_only(bool p_read_only) {}

void EditorPropertyResource::_resource_selected(const Ref<Resource> &p_resource, bool p_inspect) {}

static bool _find_recursive_resources(const Variant &v, HashSet<Resource *> &resources_found) {}

void EditorPropertyResource::_resource_changed(const Ref<Resource> &p_resource) {}

void EditorPropertyResource::_sub_inspector_property_keyed(const String &p_property, const Variant &p_value, bool p_advance) {}

void EditorPropertyResource::_sub_inspector_resource_selected(const Ref<Resource> &p_resource, const String &p_property) {}

void EditorPropertyResource::_sub_inspector_object_id_selected(int p_id) {}

void EditorPropertyResource::_open_editor_pressed() {}

void EditorPropertyResource::_update_preferred_shader() {}

bool EditorPropertyResource::_should_stop_editing() const {}

void EditorPropertyResource::_viewport_selected(const NodePath &p_path) {}

void EditorPropertyResource::setup(Object *p_object, const String &p_path, const String &p_base_type) {}

void EditorPropertyResource::update_property() {}

void EditorPropertyResource::collapse_all_folding() {}

void EditorPropertyResource::expand_all_folding() {}

void EditorPropertyResource::expand_revertable() {}

void EditorPropertyResource::set_use_sub_inspector(bool p_enable) {}

void EditorPropertyResource::fold_resource() {}

bool EditorPropertyResource::is_colored(ColorationMode p_mode) {}

void EditorPropertyResource::_notification(int p_what) {}

void EditorPropertyResource::_bind_methods() {}

EditorPropertyResource::EditorPropertyResource() {}

////////////// DEFAULT PLUGIN //////////////////////

bool EditorInspectorDefaultPlugin::can_handle(Object *p_object) {}

bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {}

struct EditorPropertyRangeHint {};

static EditorPropertyRangeHint _parse_range_hint(PropertyHint p_hint, const String &p_hint_text, double p_default_step, bool is_int = false) {}

EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {}