// AUTO-GENERATED
///
declare module "godot" {
class EditorFileServer extends Object {
constructor(identifier?: any)
}
/** Resource filesystem, as the editor sees it.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorfilesystem.html
*/
class EditorFileSystem = Record> extends Node {
constructor(identifier?: any)
/** Gets the root directory object. */
get_filesystem(): EditorFileSystemDirectory
/** Returns `true` if the filesystem is being scanned. */
is_scanning(): boolean
/** Returns the scan progress for 0 to 1 if the FS is being scanned. */
get_scanning_progress(): float64
/** Scan the filesystem for changes. */
scan(): void
/** Check if the source of any imported resource changed. */
scan_sources(): void
/** Add a file in an existing directory, or schedule file information to be updated on editor restart. Can be used to update text files saved by an external program.
* This will not import the file. To reimport, call [method reimport_files] or [method scan] methods.
*/
update_file(path: string): void
/** Returns a view into the filesystem at [param path]. */
get_filesystem_path(path: string): EditorFileSystemDirectory
/** Returns the resource type of the file, given the full path. This returns a string such as `"Resource"` or `"GDScript"`, *not* a file extension such as `".gd"`. */
get_file_type(path: string): string
/** Reimports a set of files. Call this if these files or their `.import` files were directly edited by script or an external program.
* If the file type changed or the file was newly created, use [method update_file] or [method scan].
*
* **Note:** This function blocks until the import is finished. However, the main loop iteration, including timers and [method Node._process], will occur during the import process due to progress bar updates. Avoid calls to [method reimport_files] or [method scan] while an import is in progress.
*/
reimport_files(files: PackedStringArray | string[]): void
/** Emitted if the filesystem changed. */
readonly filesystem_changed: Signal0
/** Emitted when the list of global script classes gets updated. */
readonly script_classes_updated: Signal0
/** Emitted if the source of any imported file changed. */
readonly sources_changed: Signal1
/** Emitted before a resource is reimported. */
readonly resources_reimporting: Signal1
/** Emitted if a resource is reimported. */
readonly resources_reimported: Signal1
/** Emitted if at least one resource is reloaded when the filesystem is scanned. */
readonly resources_reload: Signal1
}
/** A directory for the resource filesystem.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorfilesystemdirectory.html
*/
class EditorFileSystemDirectory extends Object {
constructor(identifier?: any)
/** Returns the number of subdirectories in this directory. */
get_subdir_count(): int64
/** Returns the subdirectory at index [param idx]. */
get_subdir(idx: int64): EditorFileSystemDirectory
/** Returns the number of files in this directory. */
get_file_count(): int64
/** Returns the name of the file at index [param idx]. */
get_file(idx: int64): string
/** Returns the path to the file at index [param idx]. */
get_file_path(idx: int64): string
/** Returns the resource type of the file at index [param idx]. This returns a string such as `"Resource"` or `"GDScript"`, *not* a file extension such as `".gd"`. */
get_file_type(idx: int64): StringName
/** Returns the name of the script class defined in the file at index [param idx]. If the file doesn't define a script class using the `class_name` syntax, this will return an empty string. */
get_file_script_class_name(idx: int64): string
/** Returns the base class of the script class defined in the file at index [param idx]. If the file doesn't define a script class using the `class_name` syntax, this will return an empty string. */
get_file_script_class_extends(idx: int64): string
/** Returns `true` if the file at index [param idx] imported properly. */
get_file_import_is_valid(idx: int64): boolean
/** Returns the name of this directory. */
get_name(): string
/** Returns the path to this directory. */
get_path(): string
/** Returns the parent directory for this directory or `null` if called on a directory at `res://` or `user://`. */
get_parent(): EditorFileSystemDirectory
/** Returns the index of the file with name [param name] or `-1` if not found. */
find_file_index(name: string): int64
/** Returns the index of the directory with name [param name] or `-1` if not found. */
find_dir_index(name: string): int64
}
/** Used to query and configure import format support.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorfilesystemimportformatsupportquery.html
*/
class EditorFileSystemImportFormatSupportQuery extends RefCounted {
constructor(identifier?: any)
/** Return whether this importer is active. */
/* gdvirtual */ _is_active(): boolean
/** Return the file extensions supported. */
/* gdvirtual */ _get_file_extensions(): PackedStringArray
/** Query support. Return `false` if import must not continue. */
/* gdvirtual */ _query(): boolean
}
class EditorFileSystemImportFormatSupportQueryBlend extends EditorFileSystemImportFormatSupportQuery {
constructor(identifier?: any)
}
class EditorFontPreviewPlugin extends EditorResourcePreviewGenerator {
constructor(identifier?: any)
}
class EditorGradientPreviewPlugin extends EditorResourcePreviewGenerator {
constructor(identifier?: any)
}
class EditorHelpBit = Record> extends VBoxContainer {
constructor(identifier?: any)
readonly request_hide: Signal0
}
class EditorHelpSearch = Record> extends ConfirmationDialog {
constructor(identifier?: any)
readonly go_to_help: Signal0
}
class EditorImagePreviewPlugin extends EditorResourcePreviewGenerator {
constructor(identifier?: any)
}
class EditorImportBlendRunner = Record> extends Node {
constructor(identifier?: any)
}
/** Registers a custom resource importer in the editor. Use the class to parse any file and import it as a new resource type.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorimportplugin.html
*/
class EditorImportPlugin extends ResourceImporter {
constructor(identifier?: any)
/** Gets the unique name of the importer. */
/* gdvirtual */ _get_importer_name(): string
/** Gets the name to display in the import window. You should choose this name as a continuation to "Import as", e.g. "Import as Special Mesh". */
/* gdvirtual */ _get_visible_name(): string
/** Gets the number of initial presets defined by the plugin. Use [method _get_import_options] to get the default options for the preset and [method _get_preset_name] to get the name of the preset. */
/* gdvirtual */ _get_preset_count(): int64
/** Gets the name of the options preset at this index. */
/* gdvirtual */ _get_preset_name(preset_index: int64): string
/** Gets the list of file extensions to associate with this loader (case-insensitive). e.g. `["obj"]`. */
/* gdvirtual */ _get_recognized_extensions(): PackedStringArray
/** Gets the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: `name`, `default_value`, `property_hint` (optional), `hint_string` (optional), `usage` (optional). */
/* gdvirtual */ _get_import_options(path: string, preset_index: int64): GArray
/** Gets the extension used to save this resource in the `.godot/imported` directory (see [member ProjectSettings.application/config/use_hidden_project_data_directory]). */
/* gdvirtual */ _get_save_extension(): string
/** Gets the Godot resource type associated with this loader. e.g. `"Mesh"` or `"Animation"`. */
/* gdvirtual */ _get_resource_type(): string
/** Gets the priority of this plugin for the recognized extension. Higher priority plugins will be preferred. The default priority is `1.0`. */
/* gdvirtual */ _get_priority(): float64
/** Gets the order of this importer to be run when importing resources. Importers with *lower* import orders will be called first, and higher values will be called later. Use this to ensure the importer runs after the dependencies are already imported. The default import order is `0` unless overridden by a specific importer. See [enum ResourceImporter.ImportOrder] for some predefined values. */
/* gdvirtual */ _get_import_order(): int64
/** Gets the format version of this importer. Increment this version when making incompatible changes to the format of the imported resources. */
/* gdvirtual */ _get_format_version(): int64
/** This method can be overridden to hide specific import options if conditions are met. This is mainly useful for hiding options that depend on others if one of them is disabled.
*
* Returns `true` to make all options always visible.
*/
/* gdvirtual */ _get_option_visibility(path: string, option_name: StringName, options: GDictionary): boolean
/** Imports [param source_file] into [param save_path] with the import [param options] specified. The [param platform_variants] and [param gen_files] arrays will be modified by this function.
* This method must be overridden to do the actual importing work. See this class' description for an example of overriding this method.
*/
/* gdvirtual */ _import(source_file: string, save_path: string, options: GDictionary, platform_variants: GArray, gen_files: GArray): GError
/** Tells whether this importer can be run in parallel on threads, or, on the contrary, it's only safe for the editor to call it from the main thread, for one file at a time.
* If this method is not overridden, it will return `false` by default.
* If this importer's implementation is thread-safe and can be run in parallel, override this with `true` to optimize for concurrency.
*/
/* gdvirtual */ _can_import_threaded(): boolean
/** This function can only be called during the [method _import] callback and it allows manually importing resources from it. This is useful when the imported file generates external resources that require importing (as example, images). Custom parameters for the ".import" file can be passed via the [param custom_options]. Additionally, in cases where multiple importers can handle a file, the [param custom_importer] can be specified to force a specific one. This function performs a resource import and returns immediately with a success or error code. [param generator_parameters] defines optional extra metadata which will be stored as [code skip-lint]generator_parameters` in the `remap` section of the `.import` file, for example to store a md5 hash of the source data. */
append_import_external_resource(path: string, custom_options: GDictionary = new GDictionary(), custom_importer: string = '', generator_parameters: any = {}): GError
}
/** A control used to edit properties of an object.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorinspector.html
*/
class EditorInspector = Record> extends ScrollContainer {
constructor(identifier?: any)
/** Shows the properties of the given [param object] in this inspector for editing. To clear the inspector, call this method with `null`.
*
* **Note:** If you want to edit an object in the editor's main inspector, use the `edit_*` methods in [EditorInterface] instead.
*/
edit(object: Object): void
_edit_request_change(_unnamed_arg0: Object, _unnamed_arg1: string): void
/** Gets the path of the currently selected property. */
get_selected_path(): string
/** Returns the object currently selected in this inspector. */
get_edited_object(): Object
/** Creates a property editor that can be used by plugin UI to edit the specified property of an [param object]. */
static instantiate_property_editor(object: Object, type: Variant.Type, path: string, hint: PropertyHint, hint_text: string, usage: int64, wide: boolean = false): EditorProperty
/** Emitted when a property is selected in the inspector. */
readonly property_selected: Signal1
/** Emitted when a property is keyed in the inspector. Properties can be keyed by clicking the "key" icon next to a property when the Animation panel is toggled. */
readonly property_keyed: Signal3
/** Emitted when a property is removed from the inspector. */
readonly property_deleted: Signal1
/** Emitted when a resource is selected in the inspector. */
readonly resource_selected: Signal2
/** Emitted when the Edit button of an [Object] has been pressed in the inspector. This is mainly used in the remote scene tree Inspector. */
readonly object_id_selected: Signal1
/** Emitted when a property is edited in the inspector. */
readonly property_edited: Signal1
/** Emitted when a boolean property is toggled in the inspector.
*
* **Note:** This signal is never emitted if the internal `autoclear` property enabled. Since this property is always enabled in the editor inspector, this signal is never emitted by the editor itself.
*/
readonly property_toggled: Signal2
/** Emitted when the object being edited by the inspector has changed. */
readonly edited_object_changed: Signal0
/** Emitted when a property that requires a restart to be applied is edited in the inspector. This is only used in the Project Settings and Editor Settings. */
readonly restart_requested: Signal0
}
class EditorInspectorCategory = Record> extends Control {
constructor(identifier?: any)
}
class EditorInspectorDefaultPlugin extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorParticleProcessMaterialPlugin extends EditorInspectorPlugin {
constructor(identifier?: any)
}
/** Plugin for adding custom property editors on the inspector.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorinspectorplugin.html
*/
class EditorInspectorPlugin extends RefCounted {
constructor(identifier?: any)
/** Returns `true` if this object can be handled by this plugin. */
/* gdvirtual */ _can_handle(object: Object): boolean
/** Called to allow adding controls at the beginning of the property list for [param object]. */
/* gdvirtual */ _parse_begin(object: Object): void
/** Called to allow adding controls at the beginning of a category in the property list for [param object]. */
/* gdvirtual */ _parse_category(object: Object, category: string): void
/** Called to allow adding controls at the beginning of a group or a sub-group in the property list for [param object]. */
/* gdvirtual */ _parse_group(object: Object, group: string): void
/** Called to allow adding property-specific editors to the property list for [param object]. The added editor control must extend [EditorProperty]. Returning `true` removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one. */
/* gdvirtual */ _parse_property(object: Object, type: Variant.Type, name: string, hint_type: PropertyHint, hint_string: string, usage_flags: PropertyUsageFlags, wide: boolean): boolean
/** Called to allow adding controls at the end of the property list for [param object]. */
/* gdvirtual */ _parse_end(object: Object): void
/** Adds a custom control, which is not necessarily a property editor. */
add_custom_control(control: Control): void
/** Adds a property editor for an individual property. The [param editor] control must extend [EditorProperty].
* There can be multiple property editors for a property. If [param add_to_end] is `true`, this newly added editor will be displayed after all the other editors of the property whose [param add_to_end] is `false`. For example, the editor uses this parameter to add an "Edit Region" button for [member Sprite2D.region_rect] below the regular [Rect2] editor.
* [param label] can be used to choose a custom label for the property editor in the inspector. If left empty, the label is computed from the name of the property instead.
*/
add_property_editor(property: string, editor: Control, add_to_end: boolean = false, label: string = ''): void
/** Adds an editor that allows modifying multiple properties. The [param editor] control must extend [EditorProperty]. */
add_property_editor_for_multiple_properties(label: string, properties: PackedStringArray | string[], editor: Control): void
}
class EditorInspectorPlugin3DTexture extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorPluginAnimationMarkerKeyEdit extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorPluginAnimationNodeAnimation extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorPluginAnimationTrackKeyEdit extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorPluginAudioStream extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorPluginAudioStreamInteractive extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorPluginBitMap extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorPluginBoneMap extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorPluginCamera3DPreview extends EditorInspectorPluginTexture {
constructor(identifier?: any)
}
class EditorInspectorPluginControl extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorPluginCurve extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorPluginFontPreview extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorPluginFontVariation extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorPluginGradient extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorPluginGradientTexture2D extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorPluginInputEvent extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorPluginLayeredTexture extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorPluginMaterial extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorPluginMesh extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorPluginPackedScene extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorPluginSkeleton extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorPluginStyleBox extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorPluginSubViewportPreview extends EditorInspectorPluginTexture {
constructor(identifier?: any)
}
class EditorInspectorPluginSystemFont extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorPluginTexture extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorPluginTextureRegion extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorPluginTileData extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorRootMotionPlugin extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorSection = Record> extends Container {
constructor(identifier?: any)
setup(section: string, label: string, object: Object, bg_color: Color, foldable: boolean, indent_depth: int64 = 0, level: int64 = 1): void
get_vbox(): VBoxContainer
unfold(): void
fold(): void
}
class EditorInspectorToolButtonPlugin extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorInspectorVisualShaderModePlugin extends EditorInspectorPlugin {
constructor(identifier?: any)
}
class EditorJSONSyntaxHighlighter extends EditorSyntaxHighlighter {
constructor(identifier?: any)
}
class EditorLayoutsDialog = Record> extends ConfirmationDialog {
constructor(identifier?: any)
readonly name_confirmed: Signal1
}
class EditorLocaleDialog = Record> extends ConfirmationDialog {
constructor(identifier?: any)
readonly locale_selected: Signal1
}
class EditorLog = Record> extends HBoxContainer {
constructor(identifier?: any)
}
class EditorMainScreen = Record> extends PanelContainer {
constructor(identifier?: any)
}
class EditorMarkdownSyntaxHighlighter extends EditorSyntaxHighlighter {
constructor(identifier?: any)
}
class EditorMaterialPreviewPlugin extends EditorResourcePreviewGenerator {
constructor(identifier?: any)
}
class EditorMeshPreviewPlugin extends EditorResourcePreviewGenerator {
constructor(identifier?: any)
}
class EditorNativeShaderSourceVisualizer = Record> extends AcceptDialog {
constructor(identifier?: any)
_inspect_shader(_unnamed_arg0: RID): void
}
class EditorNetworkProfiler = Record> extends VBoxContainer {
constructor(identifier?: any)
readonly enable_profiling: Signal1
readonly open_request: Signal1
}
class EditorNode = Record> extends Node {
constructor(identifier?: any)
push_item(object: Object, property: string = '', inspector_only: boolean = false): void
set_edited_scene(_unnamed_arg0: Node): void
stop_child_process(_unnamed_arg0: int64): void
readonly request_help_search: Signal0
readonly script_add_function_request: Signal3
readonly resource_saved: Signal1
readonly scene_saved: Signal1
readonly scene_changed: Signal0
readonly scene_closed: Signal1
}
/** Gizmo for editing [Node3D] objects.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editornode3dgizmo.html
*/
class EditorNode3DGizmo extends Node3DGizmo {
constructor(identifier?: any)
/** Override this method to add all the gizmo elements whenever a gizmo update is requested. It's common to call [method clear] at the beginning of this method and then add visual elements depending on the node's properties. */
/* gdvirtual */ _redraw(): void
/** Override this method to return the name of an edited handle (handles must have been previously added by [method add_handles]). Handles can be named for reference to the user when editing.
* The [param secondary] argument is `true` when the requested handle is secondary (see [method add_handles] for more information).
*/
/* gdvirtual */ _get_handle_name(id: int64, secondary: boolean): string
/** Override this method to return `true` whenever the given handle should be highlighted in the editor.
* The [param secondary] argument is `true` when the requested handle is secondary (see [method add_handles] for more information).
*/
/* gdvirtual */ _is_handle_highlighted(id: int64, secondary: boolean): boolean
/** Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the `restore` argument in [method _commit_handle].
* The [param secondary] argument is `true` when the requested handle is secondary (see [method add_handles] for more information).
*/
/* gdvirtual */ _get_handle_value(id: int64, secondary: boolean): any
/* gdvirtual */ _begin_handle_action(id: int64, secondary: boolean): void
/** Override this method to update the node properties when the user drags a gizmo handle (previously added with [method add_handles]). The provided [param point] is the mouse position in screen coordinates and the [param camera] can be used to convert it to raycasts.
* The [param secondary] argument is `true` when the edited handle is secondary (see [method add_handles] for more information).
*/
/* gdvirtual */ _set_handle(id: int64, secondary: boolean, camera: Camera3D, point: Vector2): void
/** Override this method to commit a handle being edited (handles must have been previously added by [method add_handles]). This usually means creating an [UndoRedo] action for the change, using the current handle value as "do" and the [param restore] argument as "undo".
* If the [param cancel] argument is `true`, the [param restore] value should be directly set, without any [UndoRedo] action.
* The [param secondary] argument is `true` when the committed handle is secondary (see [method add_handles] for more information).
*/
/* gdvirtual */ _commit_handle(id: int64, secondary: boolean, restore: any, cancel: boolean): void
/** Override this method to allow selecting subgizmos using mouse clicks. Given a [param camera] and a [param point] in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. */
/* gdvirtual */ _subgizmos_intersect_ray(camera: Camera3D, point: Vector2): int64
/** Override this method to allow selecting subgizmos using mouse drag box selection. Given a [param camera] and a [param frustum], this method should return which subgizmos are contained within the frustum. The [param frustum] argument consists of an array with all the [Plane]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. */
/* gdvirtual */ _subgizmos_intersect_frustum(camera: Camera3D, frustum: GArray): PackedInt32Array
/** Override this method to update the node properties during subgizmo editing (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). The [param transform] is given in the [Node3D]'s local coordinate system. */
/* gdvirtual */ _set_subgizmo_transform(id: int64, transform: Transform3D): void
/** Override this method to return the current transform of a subgizmo. This transform will be requested at the start of an edit and used as the `restore` argument in [method _commit_subgizmos]. */
/* gdvirtual */ _get_subgizmo_transform(id: int64): Transform3D
/** Override this method to commit a group of subgizmos being edited (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). This usually means creating an [UndoRedo] action for the change, using the current transforms as "do" and the [param restores] transforms as "undo".
* If the [param cancel] argument is `true`, the [param restores] transforms should be directly set, without any [UndoRedo] action.
*/
/* gdvirtual */ _commit_subgizmos(ids: PackedInt32Array | int32[], restores: GArray, cancel: boolean): void
/** Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this method during [method _redraw]. */
add_lines(lines: PackedVector3Array | Vector3[], material: Material, billboard: boolean = false, modulate: Color = new Color(1, 1, 1, 1)): void
/** Adds a mesh to the gizmo with the specified [param material], local [param transform] and [param skeleton]. Call this method during [method _redraw]. */
add_mesh(mesh: Mesh, material: Material = undefined, transform: Transform3D = new Transform3D(), skeleton: SkinReference = undefined): void
/** Adds the specified [param segments] to the gizmo's collision shape for picking. Call this method during [method _redraw]. */
add_collision_segments(segments: PackedVector3Array | Vector3[]): void
/** Adds collision triangles to the gizmo for picking. A [TriangleMesh] can be generated from a regular [Mesh] too. Call this method during [method _redraw]. */
add_collision_triangles(triangles: TriangleMesh): void
/** Adds an unscaled billboard for visualization and selection. Call this method during [method _redraw]. */
add_unscaled_billboard(material: Material, default_scale: float64 = 1, modulate: Color = new Color(1, 1, 1, 1)): void
/** Adds a list of handles (points) which can be used to edit the properties of the gizmo's [Node3D]. The [param ids] argument can be used to specify a custom identifier for each handle, if an empty array is passed, the ids will be assigned automatically from the [param handles] argument order.
* The [param secondary] argument marks the added handles as secondary, meaning they will normally have lower selection priority than regular handles. When the user is holding the shift key secondary handles will switch to have higher priority than regular handles. This change in priority can be used to place multiple handles at the same point while still giving the user control on their selection.
* There are virtual methods which will be called upon editing of these handles. Call this method during [method _redraw].
*/
add_handles(handles: PackedVector3Array | Vector3[], material: Material, ids: PackedInt32Array | int32[], billboard: boolean = false, secondary: boolean = false): void
/** Sets the reference [Node3D] node for the gizmo. [param node] must inherit from [Node3D]. */
set_node_3d(node: Node): void
/** Returns the [Node3D] node associated with this gizmo. */
get_node_3d(): Node3D
/** Returns the [EditorNode3DGizmoPlugin] that owns this gizmo. It's useful to retrieve materials using [method EditorNode3DGizmoPlugin.get_material]. */
get_plugin(): EditorNode3DGizmoPlugin
/** Removes everything in the gizmo including meshes, collisions and handles. */
clear(): void
/** Sets the gizmo's hidden state. If `true`, the gizmo will be hidden. If `false`, it will be shown. */
set_hidden(hidden: boolean): void
/** Returns `true` if the given subgizmo is currently selected. Can be used to highlight selected elements during [method _redraw]. */
is_subgizmo_selected(id: int64): boolean
/** Returns a list of the currently selected subgizmos. Can be used to highlight selected elements during [method _redraw]. */
get_subgizmo_selection(): PackedInt32Array
}
/** A class used by the editor to define Node3D gizmo types.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editornode3dgizmoplugin.html
*/
class EditorNode3DGizmoPlugin extends Resource {
constructor(identifier?: any)
/** Override this method to define which Node3D nodes have a gizmo from this plugin. Whenever a [Node3D] node is added to a scene this method is called, if it returns `true` the node gets a generic [EditorNode3DGizmo] assigned and is added to this plugin's list of active gizmos. */
/* gdvirtual */ _has_gizmo(for_node_3d: Node3D): boolean
/** Override this method to return a custom [EditorNode3DGizmo] for the 3D nodes of your choice, return `null` for the rest of nodes. See also [method _has_gizmo]. */
/* gdvirtual */ _create_gizmo(for_node_3d: Node3D): EditorNode3DGizmo
/** Override this method to provide the name that will appear in the gizmo visibility menu. */
/* gdvirtual */ _get_gizmo_name(): string
/** Override this method to set the gizmo's priority. Gizmos with higher priority will have precedence when processing inputs like handles or subgizmos selection.
* All built-in editor gizmos return a priority of `-1`. If not overridden, this method will return `0`, which means custom gizmos will automatically get higher priority than built-in gizmos.
*/
/* gdvirtual */ _get_priority(): int64
/** Override this method to define whether the gizmos handled by this plugin can be hidden or not. Returns `true` if not overridden. */
/* gdvirtual */ _can_be_hidden(): boolean
/** Override this method to define whether Node3D with this gizmo should be selectable even when the gizmo is hidden. */
/* gdvirtual */ _is_selectable_when_hidden(): boolean
/** Override this method to add all the gizmo elements whenever a gizmo update is requested. It's common to call [method EditorNode3DGizmo.clear] at the beginning of this method and then add visual elements depending on the node's properties. */
/* gdvirtual */ _redraw(gizmo: EditorNode3DGizmo): void
/** Override this method to provide gizmo's handle names. The [param secondary] argument is `true` when the requested handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). Called for this plugin's active gizmos. */
/* gdvirtual */ _get_handle_name(gizmo: EditorNode3DGizmo, handle_id: int64, secondary: boolean): string
/** Override this method to return `true` whenever to given handle should be highlighted in the editor. The [param secondary] argument is `true` when the requested handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). Called for this plugin's active gizmos. */
/* gdvirtual */ _is_handle_highlighted(gizmo: EditorNode3DGizmo, handle_id: int64, secondary: boolean): boolean
/** Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the `restore` argument in [method _commit_handle].
* The [param secondary] argument is `true` when the requested handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information).
* Called for this plugin's active gizmos.
*/
/* gdvirtual */ _get_handle_value(gizmo: EditorNode3DGizmo, handle_id: int64, secondary: boolean): any
/* gdvirtual */ _begin_handle_action(gizmo: EditorNode3DGizmo, handle_id: int64, secondary: boolean): void
/** Override this method to update the node's properties when the user drags a gizmo handle (previously added with [method EditorNode3DGizmo.add_handles]). The provided [param screen_pos] is the mouse position in screen coordinates and the [param camera] can be used to convert it to raycasts.
* The [param secondary] argument is `true` when the edited handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information).
* Called for this plugin's active gizmos.
*/
/* gdvirtual */ _set_handle(gizmo: EditorNode3DGizmo, handle_id: int64, secondary: boolean, camera: Camera3D, screen_pos: Vector2): void
/** Override this method to commit a handle being edited (handles must have been previously added by [method EditorNode3DGizmo.add_handles] during [method _redraw]). This usually means creating an [UndoRedo] action for the change, using the current handle value as "do" and the [param restore] argument as "undo".
* If the [param cancel] argument is `true`, the [param restore] value should be directly set, without any [UndoRedo] action.
* The [param secondary] argument is `true` when the committed handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information).
* Called for this plugin's active gizmos.
*/
/* gdvirtual */ _commit_handle(gizmo: EditorNode3DGizmo, handle_id: int64, secondary: boolean, restore: any, cancel: boolean): void
/** Override this method to allow selecting subgizmos using mouse clicks. Given a [param camera] and a [param screen_pos] in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. Called for this plugin's active gizmos. */
/* gdvirtual */ _subgizmos_intersect_ray(gizmo: EditorNode3DGizmo, camera: Camera3D, screen_pos: Vector2): int64
/** Override this method to allow selecting subgizmos using mouse drag box selection. Given a [param camera] and [param frustum_planes], this method should return which subgizmos are contained within the frustums. The [param frustum_planes] argument consists of an array with all the [Plane]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, these identifiers can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. Called for this plugin's active gizmos. */
/* gdvirtual */ _subgizmos_intersect_frustum(gizmo: EditorNode3DGizmo, camera: Camera3D, frustum_planes: GArray): PackedInt32Array
/** Override this method to return the current transform of a subgizmo. As with all subgizmo methods, the transform should be in local space respect to the gizmo's Node3D. This transform will be requested at the start of an edit and used in the `restore` argument in [method _commit_subgizmos]. Called for this plugin's active gizmos. */
/* gdvirtual */ _get_subgizmo_transform(gizmo: EditorNode3DGizmo, subgizmo_id: int64): Transform3D
/** Override this method to update the node properties during subgizmo editing (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). The [param transform] is given in the Node3D's local coordinate system. Called for this plugin's active gizmos. */
/* gdvirtual */ _set_subgizmo_transform(gizmo: EditorNode3DGizmo, subgizmo_id: int64, transform: Transform3D): void
/** Override this method to commit a group of subgizmos being edited (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). This usually means creating an [UndoRedo] action for the change, using the current transforms as "do" and the [param restores] transforms as "undo".
* If the [param cancel] argument is `true`, the [param restores] transforms should be directly set, without any [UndoRedo] action. As with all subgizmo methods, transforms are given in local space respect to the gizmo's Node3D. Called for this plugin's active gizmos.
*/
/* gdvirtual */ _commit_subgizmos(gizmo: EditorNode3DGizmo, ids: PackedInt32Array | int32[], restores: GArray, cancel: boolean): void
/** Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_mesh] and [method EditorNode3DGizmo.add_lines]. Should not be overridden. */
create_material(name: string, color: Color, billboard: boolean = false, on_top: boolean = false, use_vertex_color: boolean = false): void
/** Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_unscaled_billboard]. Should not be overridden. */
create_icon_material(name: string, texture: Texture2D, on_top: boolean = false, color: Color = new Color(1, 1, 1, 1)): void
/** Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_handles]. Should not be overridden.
* You can optionally provide a texture to use instead of the default icon.
*/
create_handle_material(name: string, billboard: boolean = false, texture: Texture2D = undefined): void
/** Adds a new material to the internal material list for the plugin. It can then be accessed with [method get_material]. Should not be overridden. */
add_material(name: string, material: StandardMaterial3D): void
/** Gets material from the internal list of materials. If an [EditorNode3DGizmo] is provided, it will try to get the corresponding variant (selected and/or editable). */
get_material(name: string, gizmo: EditorNode3DGizmo = undefined): StandardMaterial3D
}
class EditorOBJImporter extends EditorSceneFormatImporter {
constructor(identifier?: any)
}
class EditorObjectSelector = Record> extends Button {
constructor(identifier?: any)
}
class EditorPackedScenePreviewPlugin extends EditorResourcePreviewGenerator {
constructor(identifier?: any)
}
/** Editor-only singleton that returns paths to various OS-specific data folders and files.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorpaths.html
*/
class EditorPaths extends Object {
constructor(identifier?: any)
/** Returns the absolute path to the user's data folder. This folder should be used for *persistent* user data files such as installed export templates.
* **Default paths per platform:**
* [codeblock lang=text]
* - Windows: %APPDATA%\Godot\ (same as `get_config_dir()`)
* - macOS: ~/Library/Application Support/Godot/ (same as `get_config_dir()`)
* - Linux: ~/.local/share/godot/
* [/codeblock]
*/
get_data_dir(): string
/** Returns the absolute path to the user's configuration folder. This folder should be used for *persistent* user configuration files.
* **Default paths per platform:**
* [codeblock lang=text]
* - Windows: %APPDATA%\Godot\ (same as `get_data_dir()`)
* - macOS: ~/Library/Application Support/Godot/ (same as `get_data_dir()`)
* - Linux: ~/.config/godot/
* [/codeblock]
*/
get_config_dir(): string
/** Returns the absolute path to the user's cache folder. This folder should be used for temporary data that can be removed safely whenever the editor is closed (such as generated resource thumbnails).
* **Default paths per platform:**
* [codeblock lang=text]
* - Windows: %LOCALAPPDATA%\Godot\
* - macOS: ~/Library/Caches/Godot/
* - Linux: ~/.cache/godot/
* [/codeblock]
*/
get_cache_dir(): string
/** Returns `true` if the editor is marked as self-contained, `false` otherwise. When self-contained mode is enabled, user configuration, data and cache files are saved in an `editor_data/` folder next to the editor binary. This makes portable usage easier and ensures the Godot editor minimizes file writes outside its own folder. Self-contained mode is not available for exported projects.
* Self-contained mode can be enabled by creating a file named `._sc_` or `_sc_` in the same folder as the editor binary or macOS .app bundle while the editor is not running. See also [method get_self_contained_file].
*
* **Note:** On macOS, quarantine flag should be manually removed before using self-contained mode, see [url=https://docs.godotengine.org/en/stable/tutorials/export/running_on_macos.html]Running on macOS[/url].
*
* **Note:** On macOS, placing `_sc_` or any other file inside .app bundle will break digital signature and make it non-portable, consider placing it in the same folder as the .app bundle instead.
*
* **Note:** The Steam release of Godot uses self-contained mode by default.
*/
is_self_contained(): boolean
/** Returns the absolute path to the self-contained file that makes the current Godot editor instance be considered as self-contained. Returns an empty string if the current Godot editor instance isn't self-contained. See also [method is_self_contained]. */
get_self_contained_file(): string
/** Returns the project-specific editor settings path. Projects all have a unique subdirectory inside the settings path where project-specific editor settings are saved. */
get_project_settings_dir(): string
}
class EditorPerformanceProfiler = Record> extends HSplitContainer {
constructor(identifier?: any)
}
namespace EditorPlugin {
enum CustomControlContainer {
/** Main editor toolbar, next to play buttons. */
CONTAINER_TOOLBAR = 0,
/** The toolbar that appears when 3D editor is active. */
CONTAINER_SPATIAL_EDITOR_MENU = 1,
/** Left sidebar of the 3D editor. */
CONTAINER_SPATIAL_EDITOR_SIDE_LEFT = 2,
/** Right sidebar of the 3D editor. */
CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT = 3,
/** Bottom panel of the 3D editor. */
CONTAINER_SPATIAL_EDITOR_BOTTOM = 4,
/** The toolbar that appears when 2D editor is active. */
CONTAINER_CANVAS_EDITOR_MENU = 5,
/** Left sidebar of the 2D editor. */
CONTAINER_CANVAS_EDITOR_SIDE_LEFT = 6,
/** Right sidebar of the 2D editor. */
CONTAINER_CANVAS_EDITOR_SIDE_RIGHT = 7,
/** Bottom panel of the 2D editor. */
CONTAINER_CANVAS_EDITOR_BOTTOM = 8,
/** Bottom section of the inspector. */
CONTAINER_INSPECTOR_BOTTOM = 9,
/** Tab of Project Settings dialog, to the left of other tabs. */
CONTAINER_PROJECT_SETTING_TAB_LEFT = 10,
/** Tab of Project Settings dialog, to the right of other tabs. */
CONTAINER_PROJECT_SETTING_TAB_RIGHT = 11,
}
enum DockSlot {
/** Dock slot, left side, upper-left (empty in default layout). */
DOCK_SLOT_LEFT_UL = 0,
/** Dock slot, left side, bottom-left (empty in default layout). */
DOCK_SLOT_LEFT_BL = 1,
/** Dock slot, left side, upper-right (in default layout includes Scene and Import docks). */
DOCK_SLOT_LEFT_UR = 2,
/** Dock slot, left side, bottom-right (in default layout includes FileSystem dock). */
DOCK_SLOT_LEFT_BR = 3,
/** Dock slot, right side, upper-left (in default layout includes Inspector, Node, and History docks). */
DOCK_SLOT_RIGHT_UL = 4,
/** Dock slot, right side, bottom-left (empty in default layout). */
DOCK_SLOT_RIGHT_BL = 5,
/** Dock slot, right side, upper-right (empty in default layout). */
DOCK_SLOT_RIGHT_UR = 6,
/** Dock slot, right side, bottom-right (empty in default layout). */
DOCK_SLOT_RIGHT_BR = 7,
/** Represents the size of the [enum DockSlot] enum. */
DOCK_SLOT_MAX = 8,
}
enum AfterGUIInput {
/** Forwards the [InputEvent] to other EditorPlugins. */
AFTER_GUI_INPUT_PASS = 0,
/** Prevents the [InputEvent] from reaching other Editor classes. */
AFTER_GUI_INPUT_STOP = 1,
/** Pass the [InputEvent] to other editor plugins except the main [Node3D] one. This can be used to prevent node selection changes and work with sub-gizmos instead. */
AFTER_GUI_INPUT_CUSTOM = 2,
}
}
/** Used by the editor to extend its functionality.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorplugin.html
*/
class EditorPlugin = Record> extends Node {
constructor(identifier?: any)
/** Called when there is a root node in the current edited scene, [method _handles] is implemented, and an [InputEvent] happens in the 2D viewport. If this method returns `true`, [param event] is intercepted by this [EditorPlugin], otherwise [param event] is forwarded to other Editor classes.
*
* This method must return `false` in order to forward the [InputEvent] to other Editor classes.
*
*/
/* gdvirtual */ _forward_canvas_gui_input(event: InputEvent): boolean
/** Called by the engine when the 2D editor's viewport is updated. Use the `overlay` [Control] for drawing. You can update the viewport manually by calling [method update_overlays].
*
*/
/* gdvirtual */ _forward_canvas_draw_over_viewport(viewport_control: Control): void
/** This method is the same as [method _forward_canvas_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else.
* You need to enable calling of this method by using [method set_force_draw_over_forwarding_enabled].
*/
/* gdvirtual */ _forward_canvas_force_draw_over_viewport(viewport_control: Control): void
/** Called when there is a root node in the current edited scene, [method _handles] is implemented, and an [InputEvent] happens in the 3D viewport. The return value decides whether the [InputEvent] is consumed or forwarded to other [EditorPlugin]s. See [enum AfterGUIInput] for options.
*
* This method must return [constant AFTER_GUI_INPUT_PASS] in order to forward the [InputEvent] to other Editor classes.
*
*/
/* gdvirtual */ _forward_3d_gui_input(viewport_camera: Camera3D, event: InputEvent): int64
/** Called by the engine when the 3D editor's viewport is updated. Use the `overlay` [Control] for drawing. You can update the viewport manually by calling [method update_overlays].
*
*/
/* gdvirtual */ _forward_3d_draw_over_viewport(viewport_control: Control): void
/** This method is the same as [method _forward_3d_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else.
* You need to enable calling of this method by using [method set_force_draw_over_forwarding_enabled].
*/
/* gdvirtual */ _forward_3d_force_draw_over_viewport(viewport_control: Control): void
/** Override this method in your plugin to provide the name of the plugin when displayed in the Godot editor.
* For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons.
*/
/* gdvirtual */ _get_plugin_name(): string
/** Override this method in your plugin to return a [Texture2D] in order to give it an icon.
* For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons.
* Ideally, the plugin icon should be white with a transparent background and 16×16 pixels in size.
*
*/
/* gdvirtual */ _get_plugin_icon(): Texture2D
/** Returns `true` if this is a main screen editor plugin (it goes in the workspace selector together with **2D**, **3D**, **Script** and **AssetLib**).
* When the plugin's workspace is selected, other main screen plugins will be hidden, but your plugin will not appear automatically. It needs to be added as a child of [method EditorInterface.get_editor_main_screen] and made visible inside [method _make_visible].
* Use [method _get_plugin_name] and [method _get_plugin_icon] to customize the plugin button's appearance.
*
*/
/* gdvirtual */ _has_main_screen(): boolean
/** This function will be called when the editor is requested to become visible. It is used for plugins that edit a specific object type.
* Remember that you have to manage the visibility of all your editor controls manually.
*/
/* gdvirtual */ _make_visible(visible: boolean): void
/** This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object.
* [param object] can be `null` if the plugin was editing an object, but there is no longer any selected object handled by this plugin. It can be used to cleanup editing state.
*/
/* gdvirtual */ _edit(object: Object): void
/** Implement this function if your plugin edits a specific type of object (Resource or Node). If you return `true`, then you will get the functions [method _edit] and [method _make_visible] called when the editor requests them. If you have declared the methods [method _forward_canvas_gui_input] and [method _forward_3d_gui_input] these will be called too.
*
* **Note:** Each plugin should handle only one type of objects at a time. If a plugin handles more types of objects and they are edited at the same time, it will result in errors.
*/
/* gdvirtual */ _handles(object: Object): boolean
/** Override this method to provide a state data you want to be saved, like view position, grid settings, folding, etc. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns). This data is automatically saved for each scene in an `editstate` file in the editor metadata folder. If you want to store global (scene-independent) editor data for your plugin, you can use [method _get_window_layout] instead.
* Use [method _set_state] to restore your saved state.
*
* **Note:** This method should not be used to save important settings that should persist with the project.
*
* **Note:** You must implement [method _get_plugin_name] for the state to be stored and restored correctly.
*
*/
/* gdvirtual */ _get_state(): GDictionary
/** Restore the state saved by [method _get_state]. This method is called when the current scene tab is changed in the editor.
*
* **Note:** Your plugin must implement [method _get_plugin_name], otherwise it will not be recognized and this method will not be called.
*
*/
/* gdvirtual */ _set_state(state: GDictionary): void
/** Clear all the state and reset the object being edited to zero. This ensures your plugin does not keep editing a currently existing node, or a node from the wrong scene. */
/* gdvirtual */ _clear(): void
/** Override this method to provide a custom message that lists unsaved changes. The editor will call this method when exiting or when closing a scene, and display the returned string in a confirmation dialog. Return empty string if the plugin has no unsaved changes.
* When closing a scene, [param for_scene] is the path to the scene being closed. You can use it to handle built-in resources in that scene.
* If the user confirms saving, [method _save_external_data] will be called, before closing the editor.
*
* If the plugin has no scene-specific changes, you can ignore the calls when closing scenes:
*
*/
/* gdvirtual */ _get_unsaved_status(for_scene: string): string
/** This method is called after the editor saves the project or when it's closed. It asks the plugin to save edited external scenes/resources. */
/* gdvirtual */ _save_external_data(): void
/** This method is called when the editor is about to save the project, switch to another tab, etc. It asks the plugin to apply any pending state changes to ensure consistency.
* This is used, for example, in shader editors to let the plugin know that it must apply the shader code being written by the user to the object.
*/
/* gdvirtual */ _apply_changes(): void
/** This is for editors that edit script-based objects. You can return a list of breakpoints in the format (`script:line`), for example: `res://path_to_script.gd:25`. */
/* gdvirtual */ _get_breakpoints(): PackedStringArray
/** Restore the plugin GUI layout and data saved by [method _get_window_layout]. This method is called for every plugin on editor startup. Use the provided [param configuration] file to read your saved data.
*
*/
/* gdvirtual */ _set_window_layout(configuration: ConfigFile): void
/** Override this method to provide the GUI layout of the plugin or any other data you want to be stored. This is used to save the project's editor layout when [method queue_save_layout] is called or the editor layout was changed (for example changing the position of a dock). The data is stored in the `editor_layout.cfg` file in the editor metadata directory.
* Use [method _set_window_layout] to restore your saved layout.
*
*/
/* gdvirtual */ _get_window_layout(configuration: ConfigFile): void
/** This method is called when the editor is about to run the project. The plugin can then perform required operations before the project runs.
* This method must return a boolean. If this method returns `false`, the project will not run. The run is aborted immediately, so this also prevents all other plugins' [method _build] methods from running.
*/
/* gdvirtual */ _build(): boolean
/** Called by the engine when the user enables the [EditorPlugin] in the Plugin tab of the project settings window. */
/* gdvirtual */ _enable_plugin(): void
/** Called by the engine when the user disables the [EditorPlugin] in the Plugin tab of the project settings window. */
/* gdvirtual */ _disable_plugin(): void
/** Adds a custom control to a container (see [enum CustomControlContainer]). There are many locations where custom controls can be added in the editor UI.
* Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it).
* When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_container] and free it with [method Node.queue_free].
*/
add_control_to_container(container: EditorPlugin.CustomControlContainer, control: Control): void
/** Adds a control to the bottom panel (together with Output, Debug, Animation, etc.). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_bottom_panel] and free it with [method Node.queue_free].
* Optionally, you can specify a shortcut parameter. When pressed, this shortcut will toggle the bottom panel's visibility. See the default editor bottom panel shortcuts in the Editor Settings for inspiration. Per convention, they all use [kbd]Alt[/kbd] modifier.
*/
add_control_to_bottom_panel(control: Control, title: string, shortcut: Shortcut = undefined): Button
/** Adds the control to a specific dock slot (see [enum DockSlot] for options).
* If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions.
* When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_docks] and free it with [method Node.queue_free].
* Optionally, you can specify a shortcut parameter. When pressed, this shortcut will toggle the dock's visibility once it's moved to the bottom panel (this shortcut does not affect the dock otherwise). See the default editor bottom panel shortcuts in the Editor Settings for inspiration. Per convention, they all use [kbd]Alt[/kbd] modifier.
*/
add_control_to_dock(slot: EditorPlugin.DockSlot, control: Control, shortcut: Shortcut = undefined): void
/** Removes the control from the dock. You have to manually [method Node.queue_free] the control. */
remove_control_from_docks(control: Control): void
/** Removes the control from the bottom panel. You have to manually [method Node.queue_free] the control. */
remove_control_from_bottom_panel(control: Control): void
/** Removes the control from the specified container. You have to manually [method Node.queue_free] the control. */
remove_control_from_container(container: EditorPlugin.CustomControlContainer, control: Control): void
/** Sets the tab icon for the given control in a dock slot. Setting to `null` removes the icon. */
set_dock_tab_icon(control: Control, icon: Texture2D): void
/** Adds a custom menu item to **Project > Tools** named [param name]. When clicked, the provided [param callable] will be called. */
add_tool_menu_item(name: string, callable: Callable): void
/** Adds a custom [PopupMenu] submenu under **Project > Tools >** [param name]. Use [method remove_tool_menu_item] on plugin clean up to remove the menu. */
add_tool_submenu_item(name: string, submenu: PopupMenu): void
/** Removes a menu [param name] from **Project > Tools**. */
remove_tool_menu_item(name: string): void
/** Returns the [PopupMenu] under **Scene > Export As...**. */
get_export_as_menu(): PopupMenu
/** Adds a custom type, which will appear in the list of nodes or resources.
* When a given node or resource is selected, the base type will be instantiated (e.g. "Node3D", "Control", "Resource"), then the script will be loaded and set to this object.
*
* **Note:** The base type is the base engine class which this type's class hierarchy inherits, not any custom type parent classes.
* You can use the virtual method [method _handles] to check if your custom object is being edited by checking the script or using the `is` keyword.
* During run-time, this will be a simple object with a script so this function does not need to be called then.
*
* **Note:** Custom types added this way are not true classes. They are just a helper to create a node with specific script.
*/
add_custom_type(type: string, base: string, script: Script, icon: Texture2D): void
/** Removes a custom type added by [method add_custom_type]. */
remove_custom_type(type: string): void
/** Adds a script at [param path] to the Autoload list as [param name]. */
add_autoload_singleton(name: string, path: string): void
/** Removes an Autoload [param name] from the list. */
remove_autoload_singleton(name: string): void
/** Updates the overlays of the 2D and 3D editor viewport. Causes methods [method _forward_canvas_draw_over_viewport], [method _forward_canvas_force_draw_over_viewport], [method _forward_3d_draw_over_viewport] and [method _forward_3d_force_draw_over_viewport] to be called. */
update_overlays(): int64
/** Makes a specific item in the bottom panel visible. */
make_bottom_panel_item_visible(item: Control): void
/** Minimizes the bottom panel. */
hide_bottom_panel(): void
/** Gets the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it. */
get_undo_redo(): EditorUndoRedoManager
/** Hooks a callback into the undo/redo action creation when a property is modified in the inspector. This allows, for example, to save other properties that may be lost when a given property is modified.
* The callback should have 4 arguments: [Object] `undo_redo`, [Object] `modified_object`, [String] `property` and [Variant] `new_value`. They are, respectively, the [UndoRedo] object used by the inspector, the currently modified object, the name of the modified property and the new value the property is about to take.
*/
add_undo_redo_inspector_hook_callback(callable: Callable): void
/** Removes a callback previously added by [method add_undo_redo_inspector_hook_callback]. */
remove_undo_redo_inspector_hook_callback(callable: Callable): void
/** Queue save the project's editor layout. */
queue_save_layout(): void
/** Registers a custom translation parser plugin for extracting translatable strings from custom files. */
add_translation_parser_plugin(parser: EditorTranslationParserPlugin): void
/** Removes a custom translation parser plugin registered by [method add_translation_parser_plugin]. */
remove_translation_parser_plugin(parser: EditorTranslationParserPlugin): void
/** Registers a new [EditorImportPlugin]. Import plugins are used to import custom and unsupported assets as a custom [Resource] type.
* If [param first_priority] is `true`, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins.
*
* **Note:** If you want to import custom 3D asset formats use [method add_scene_format_importer_plugin] instead.
* See [method add_inspector_plugin] for an example of how to register a plugin.
*/
add_import_plugin(importer: EditorImportPlugin, first_priority: boolean = false): void
/** Removes an import plugin registered by [method add_import_plugin]. */
remove_import_plugin(importer: EditorImportPlugin): void
/** Registers a new [EditorSceneFormatImporter]. Scene importers are used to import custom 3D asset formats as scenes.
* If [param first_priority] is `true`, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins.
*/
add_scene_format_importer_plugin(scene_format_importer: EditorSceneFormatImporter, first_priority: boolean = false): void
/** Removes a scene format importer registered by [method add_scene_format_importer_plugin]. */
remove_scene_format_importer_plugin(scene_format_importer: EditorSceneFormatImporter): void
/** Add a [EditorScenePostImportPlugin]. These plugins allow customizing the import process of 3D assets by adding new options to the import dialogs.
* If [param first_priority] is `true`, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins.
*/
add_scene_post_import_plugin(scene_import_plugin: EditorScenePostImportPlugin, first_priority: boolean = false): void
/** Remove the [EditorScenePostImportPlugin], added with [method add_scene_post_import_plugin]. */
remove_scene_post_import_plugin(scene_import_plugin: EditorScenePostImportPlugin): void
/** Registers a new [EditorExportPlugin]. Export plugins are used to perform tasks when the project is being exported.
* See [method add_inspector_plugin] for an example of how to register a plugin.
*/
add_export_plugin(plugin: EditorExportPlugin): void
/** Removes an export plugin registered by [method add_export_plugin]. */
remove_export_plugin(plugin: EditorExportPlugin): void
/** Registers a new [EditorExportPlatform]. Export platforms provides functionality of exporting to the specific platform. */
add_export_platform(platform: EditorExportPlatform): void
/** Removes an export platform registered by [method add_export_platform]. */
remove_export_platform(platform: EditorExportPlatform): void
/** Registers a new [EditorNode3DGizmoPlugin]. Gizmo plugins are used to add custom gizmos to the 3D preview viewport for a [Node3D].
* See [method add_inspector_plugin] for an example of how to register a plugin.
*/
add_node_3d_gizmo_plugin(plugin: EditorNode3DGizmoPlugin): void
/** Removes a gizmo plugin registered by [method add_node_3d_gizmo_plugin]. */
remove_node_3d_gizmo_plugin(plugin: EditorNode3DGizmoPlugin): void
/** Registers a new [EditorInspectorPlugin]. Inspector plugins are used to extend [EditorInspector] and provide custom configuration tools for your object's properties.
*
* **Note:** Always use [method remove_inspector_plugin] to remove the registered [EditorInspectorPlugin] when your [EditorPlugin] is disabled to prevent leaks and an unexpected behavior.
*
*/
add_inspector_plugin(plugin: EditorInspectorPlugin): void
/** Removes an inspector plugin registered by [method add_inspector_plugin]. */
remove_inspector_plugin(plugin: EditorInspectorPlugin): void
/** Registers a new [EditorResourceConversionPlugin]. Resource conversion plugins are used to add custom resource converters to the editor inspector.
* See [EditorResourceConversionPlugin] for an example of how to create a resource conversion plugin.
*/
add_resource_conversion_plugin(plugin: EditorResourceConversionPlugin): void
/** Removes a resource conversion plugin registered by [method add_resource_conversion_plugin]. */
remove_resource_conversion_plugin(plugin: EditorResourceConversionPlugin): void
/** Use this method if you always want to receive inputs from 3D view screen inside [method _forward_3d_gui_input]. It might be especially usable if your plugin will want to use raycast in the scene. */
set_input_event_forwarding_always_enabled(): void
/** Enables calling of [method _forward_canvas_force_draw_over_viewport] for the 2D editor and [method _forward_3d_force_draw_over_viewport] for the 3D editor when their viewports are updated. You need to call this method only once and it will work permanently for this plugin. */
set_force_draw_over_forwarding_enabled(): void
/** Adds a plugin to the context menu. [param slot] is the context menu where the plugin will be added.
* See [enum EditorContextMenuPlugin.ContextMenuSlot] for available context menus. A plugin instance can belong only to a single context menu slot.
*/
add_context_menu_plugin(slot: EditorContextMenuPlugin.ContextMenuSlot, plugin: EditorContextMenuPlugin): void
/** Removes the specified context menu plugin. */
remove_context_menu_plugin(plugin: EditorContextMenuPlugin): void
/** Returns the [EditorInterface] singleton instance. */
get_editor_interface(): EditorInterface
/** Gets the Editor's dialog used for making scripts.
*
* **Note:** Users can configure it before use.
* **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash.
*/
get_script_create_dialog(): ScriptCreateDialog
/** Adds a [Script] as debugger plugin to the Debugger. The script must extend [EditorDebuggerPlugin]. */
add_debugger_plugin(script: EditorDebuggerPlugin): void
/** Removes the debugger plugin with given script from the Debugger. */
remove_debugger_plugin(script: EditorDebuggerPlugin): void
/** Provide the version of the plugin declared in the `plugin.cfg` config file. */
get_plugin_version(): string
/** Emitted when the scene is changed in the editor. The argument will return the root node of the scene that has just become active. If this scene is new and empty, the argument will be `null`. */
readonly scene_changed: Signal1
/** Emitted when user closes a scene. The argument is a file path to the closed scene. */
readonly scene_closed: Signal1
/** Emitted when user changes the workspace (**2D**, **3D**, **Script**, **AssetLib**). Also works with custom screens defined by plugins. */
readonly main_screen_changed: Signal1
/** Emitted when the given [param resource] was saved on disc. See also [signal scene_saved]. */
readonly resource_saved: Signal1
/** Emitted when a scene was saved on disc. The argument is a file path to the saved scene. See also [signal resource_saved]. */
readonly scene_saved: Signal1
/** Emitted when any project setting has changed. */
readonly project_settings_changed: Signal0
}
class EditorPluginCSG = Record> extends EditorPlugin {
constructor(identifier?: any)
}
class EditorPluginSettings = Record> extends VBoxContainer {
constructor(identifier?: any)
}
class EditorProfiler = Record> extends VBoxContainer {
constructor(identifier?: any)
readonly enable_profiling: Signal1
readonly break_request: Signal0
}
/** Custom control for editing properties that can be added to the [EditorInspector].
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorproperty.html
*/
class EditorProperty = Record> extends Container {
constructor(identifier?: any)
/** When this virtual function is called, you must update your editor. */
/* gdvirtual */ _update_property(): void
/** Called when the read-only status of the property is changed. It may be used to change custom controls into a read-only or modifiable state. */
/* gdvirtual */ _set_read_only(read_only: boolean): void
/** Gets the edited property. If your editor is for a single property (added via [method EditorInspectorPlugin._parse_property]), then this will return the property. */
get_edited_property(): StringName
/** Gets the edited object. */
get_edited_object(): Object
/** Forces refresh of the property display. */
update_property(): void
/** If any of the controls added can gain keyboard focus, add it here. This ensures that focus will be restored if the inspector is refreshed. */
add_focusable(control: Control): void
/** Puts the [param editor] control below the property label. The control must be previously added using [method Node.add_child]. */
set_bottom_editor(editor: Control): void
/** Draw property as not selected. Used by the inspector. */
deselect(): void
/** Returns `true` if property is drawn as selected. Used by the inspector. */
is_selected(): boolean
/** Draw property as selected. Used by the inspector. */
select(focusable: int64 = -1): void
/** Assigns object and property to edit. */
set_object_and_property(object: Object, property: StringName): void
/** Used by the inspector, set to a control that will be used as a reference to calculate the size of the label. */
set_label_reference(control: Control): void
/** If one or several properties have changed, this must be called. [param field] is used in case your editor can modify fields separately (as an example, Vector3.x). The [param changing] argument avoids the editor requesting this property to be refreshed (leave as `false` if unsure). */
emit_changed(property: StringName, value: any, field: StringName = '', changing: boolean = false): void
_update_editor_property_status(): void
/** Set this property to change the label (if you want to show one). */
get label(): string
set label(value: string)
/** Used by the inspector, set to `true` when the property is read-only. */
get read_only(): boolean
set read_only(value: boolean)
/** Used by the inspector, set to `true` when the property background is drawn. */
get draw_label(): boolean
set draw_label(value: boolean)
/** Used by the inspector, set to `true` when the property label is drawn. */
get draw_background(): boolean
set draw_background(value: boolean)
/** Used by the inspector, set to `true` when the property is checkable. */
get checkable(): boolean
set checkable(value: boolean)
/** Used by the inspector, set to `true` when the property is checked. */
get checked(): boolean
set checked(value: boolean)
/** Used by the inspector, set to `true` when the property is drawn with the editor theme's warning color. This is used for editable children's properties. */
get draw_warning(): boolean
set draw_warning(value: boolean)
/** Used by the inspector, set to `true` when the property can add keys for animation. */
get keying(): boolean
set keying(value: boolean)
/** Used by the inspector, set to `true` when the property can be deleted by the user. */
get deletable(): boolean
set deletable(value: boolean)
/** Used by the inspector, set to `true` when the property is selectable. */
get selectable(): boolean
set selectable(value: boolean)
/** Used by the inspector, set to `true` when the property is using folding. */
get use_folding(): boolean
set use_folding(value: boolean)
/** Space distribution ratio between the label and the editing field. */
get name_split_ratio(): float64
set name_split_ratio(value: float64)
/** Do not emit this manually, use the [method emit_changed] method instead. */
readonly property_changed: Signal4
/** Emit it if you want multiple properties modified at the same time. Do not use if added via [method EditorInspectorPlugin._parse_property]. */
readonly multiple_properties_changed: Signal2
/** Emit it if you want to add this value as an animation key (check for keying being enabled first). */
readonly property_keyed: Signal1
/** Emitted when a property was deleted. Used internally. */
readonly property_deleted: Signal1
/** Emit it if you want to key a property with a single value. */
readonly property_keyed_with_value: Signal2
/** Emitted when a property was checked. Used internally. */
readonly property_checked: Signal2
/** Emit it if you want to mark a property as favorited, making it appear at the top of the inspector. */
readonly property_favorited: Signal2
/** Emit it if you want to mark (or unmark) the value of a property for being saved regardless of being equal to the default value.
* The default value is the one the property will get when the node is just instantiated and can come from an ancestor scene in the inheritance/instantiation chain, a script or a builtin class.
*/
readonly property_pinned: Signal2
/** Emitted when the revertability (i.e., whether it has a non-default value and thus is displayed with a revert icon) of a property has changed. */
readonly property_can_revert_changed: Signal2
/** If you want a sub-resource to be edited, emit this signal with the resource. */
readonly resource_selected: Signal2
/** Used by sub-inspectors. Emit it if what was selected was an Object ID. */
readonly object_id_selected: Signal2
/** Emitted when selected. Used internally. */
readonly selected: Signal2
}
class EditorPropertyCheck = Record> extends EditorProperty {
constructor(identifier?: any)
}
class EditorPropertyDictionaryObject extends RefCounted {
constructor(identifier?: any)
}
class EditorPropertyEnum = Record> extends EditorProperty {
constructor(identifier?: any)
}
class EditorPropertyFloat = Record> extends EditorProperty {
constructor(identifier?: any)
}
class EditorPropertyInteger = Record> extends EditorProperty {
constructor(identifier?: any)
}
class EditorPropertyLayers = Record> extends EditorProperty {
constructor(identifier?: any)
}
class EditorPropertyLayersGrid = Record> extends Control {
constructor(identifier?: any)
readonly flag_changed: Signal1
readonly rename_confirmed: Signal2
}
class EditorPropertyLocalizableString = Record> extends EditorProperty {
constructor(identifier?: any)
}
class EditorPropertyMultilineText = Record> extends EditorProperty {
constructor(identifier?: any)
}
class EditorPropertyNameProcessor = Record> extends Node {
constructor(identifier?: any)
}
class EditorPropertyNodePath = Record> extends EditorProperty {
constructor(identifier?: any)
}
class EditorPropertyPath = Record> extends EditorProperty {
constructor(identifier?: any)
}
class EditorPropertyResource = Record> extends EditorProperty {
constructor(identifier?: any)
_should_stop_editing(): boolean
}
class EditorPropertyText = Record> extends EditorProperty {
constructor(identifier?: any)
}
class EditorPropertyVector2i = Record> extends EditorPropertyVectorN {
constructor(identifier?: any)
}
class EditorPropertyVector3 = Record> extends EditorPropertyVectorN {
constructor(identifier?: any)
}
class EditorPropertyVectorN = Record> extends EditorProperty {
constructor(identifier?: any)
}
class EditorQuickOpenDialog = Record> extends AcceptDialog {
constructor(identifier?: any)
}
/** Plugin for adding custom converters from one resource format to another in the editor resource picker context menu; for example, converting a [StandardMaterial3D] to a [ShaderMaterial].
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorresourceconversionplugin.html
*/
class EditorResourceConversionPlugin extends RefCounted {
constructor(identifier?: any)
/** Returns the class name of the target type of [Resource] that this plugin converts source resources to. */
/* gdvirtual */ _converts_to(): string
/** Called to determine whether a particular [Resource] can be converted to the target resource type by this plugin. */
/* gdvirtual */ _handles(resource: Resource): boolean
/** Takes an input [Resource] and converts it to the type given in [method _converts_to]. The returned [Resource] is the result of the conversion, and the input [Resource] remains unchanged. */
/* gdvirtual */ _convert(resource: Resource): Resource
}
/** Godot editor's control for selecting [Resource] type properties.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorresourcepicker.html
*/
class EditorResourcePicker = Record> extends HBoxContainer {
constructor(identifier?: any)
/** This virtual method is called when updating the context menu of [EditorResourcePicker]. Implement this method to override the "New ..." items with your own options. [param menu_node] is a reference to the [PopupMenu] node.
*
* **Note:** Implement [method _handle_menu_selected] to handle these custom items.
*/
/* gdvirtual */ _set_create_options(menu_node: Object): void
/** This virtual method can be implemented to handle context menu items not handled by default. See [method _set_create_options]. */
/* gdvirtual */ _handle_menu_selected(id: int64): boolean
_update_resource_preview(_unnamed_arg0: string, _unnamed_arg1: Texture2D, _unnamed_arg2: Texture2D, _unnamed_arg3: int64): void
/** Returns a list of all allowed types and subtypes corresponding to the [member base_type]. If the [member base_type] is empty, an empty list is returned. */
get_allowed_types(): PackedStringArray
/** Sets the toggle mode state for the main button. Works only if [member toggle_mode] is set to `true`. */
set_toggle_pressed(pressed: boolean): void
/** The base type of allowed resource types. Can be a comma-separated list of several options. */
get base_type(): string
set base_type(value: string)
/** The edited resource value. */
get edited_resource(): Resource
set edited_resource(value: Resource)
/** If `true`, the value can be selected and edited. */
get editable(): boolean
set editable(value: boolean)
/** If `true`, the main button with the resource preview works in the toggle mode. Use [method set_toggle_pressed] to manually set the state. */
get toggle_mode(): boolean
set toggle_mode(value: boolean)
/** Emitted when the resource value was set and user clicked to edit it. When [param inspect] is `true`, the signal was caused by the context menu "Edit" or "Inspect" option. */
readonly resource_selected: Signal2
/** Emitted when the value of the edited resource was changed. */
readonly resource_changed: Signal1
}
/** A node used to generate previews of resources or files.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorresourcepreview.html
*/
class EditorResourcePreview = Record> extends Node {
constructor(identifier?: any)
/** Queue a resource file located at [param path] for preview. Once the preview is ready, the [param receiver]'s [param receiver_func] will be called. The [param receiver_func] must take the following four arguments: [String] path, [Texture2D] preview, [Texture2D] thumbnail_preview, [Variant] userdata. [param userdata] can be anything, and will be returned when [param receiver_func] is called.
*
* **Note:** If it was not possible to create the preview the [param receiver_func] will still be called, but the preview will be `null`.
*/
queue_resource_preview(path: string, receiver: Object, receiver_func: StringName, userdata: any): void
/** Queue the [param resource] being edited for preview. Once the preview is ready, the [param receiver]'s [param receiver_func] will be called. The [param receiver_func] must take the following four arguments: [String] path, [Texture2D] preview, [Texture2D] thumbnail_preview, [Variant] userdata. [param userdata] can be anything, and will be returned when [param receiver_func] is called.
*
* **Note:** If it was not possible to create the preview the [param receiver_func] will still be called, but the preview will be `null`.
*/
queue_edited_resource_preview(resource: Resource, receiver: Object, receiver_func: StringName, userdata: any): void
/** Create an own, custom preview generator. */
add_preview_generator(generator: EditorResourcePreviewGenerator): void
/** Removes a custom preview generator. */
remove_preview_generator(generator: EditorResourcePreviewGenerator): void
/** Check if the resource changed, if so, it will be invalidated and the corresponding signal emitted. */
check_for_invalidation(path: string): void
/** Emitted if a preview was invalidated (changed). [param path] corresponds to the path of the preview. */
readonly preview_invalidated: Signal1
}
/** Custom generator of previews.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorresourcepreviewgenerator.html
*/
class EditorResourcePreviewGenerator extends RefCounted {
constructor(identifier?: any)
/** Returns `true` if your generator supports the resource of type [param type]. */
/* gdvirtual */ _handles(type: string): boolean
/** Generate a preview from a given resource with the specified size. This must always be implemented.
* Returning `null` is an OK way to fail and let another generator take care.
* Care must be taken because this function is always called from a thread (not the main thread).
* [param metadata] dictionary can be modified to store file-specific metadata that can be used in [method EditorResourceTooltipPlugin._make_tooltip_for_path] (like image size, sample length etc.).
*/
/* gdvirtual */ _generate(resource: Resource, size: Vector2i, metadata: GDictionary): Texture2D
/** Generate a preview directly from a path with the specified size. Implementing this is optional, as default code will load and call [method _generate].
* Returning `null` is an OK way to fail and let another generator take care.
* Care must be taken because this function is always called from a thread (not the main thread).
* [param metadata] dictionary can be modified to store file-specific metadata that can be used in [method EditorResourceTooltipPlugin._make_tooltip_for_path] (like image size, sample length etc.).
*/
/* gdvirtual */ _generate_from_path(path: string, size: Vector2i, metadata: GDictionary): Texture2D
/** If this function returns `true`, the generator will automatically generate the small previews from the normal preview texture generated by the methods [method _generate] or [method _generate_from_path].
* By default, it returns `false`.
*/
/* gdvirtual */ _generate_small_preview_automatically(): boolean
/** If this function returns `true`, the generator will call [method _generate] or [method _generate_from_path] for small previews as well.
* By default, it returns `false`.
*/
/* gdvirtual */ _can_generate_small_preview(): boolean
}
/** A plugin that advanced tooltip for its handled resource type.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorresourcetooltipplugin.html
*/
class EditorResourceTooltipPlugin extends RefCounted {
constructor(identifier?: any)
/** Return `true` if the plugin is going to handle the given [Resource] [param type]. */
/* gdvirtual */ _handles(type: string): boolean
/** Create and return a tooltip that will be displayed when the user hovers a resource under the given [param path] in filesystem dock.
* The [param metadata] dictionary is provided by preview generator (see [method EditorResourcePreviewGenerator._generate]).
* [param base] is the base default tooltip, which is a [VBoxContainer] with a file name, type and size labels. If another plugin handled the same file type, [param base] will be output from the previous plugin. For best result, make sure the base tooltip is part of the returned [Control].
*
* **Note:** It's unadvised to use [method ResourceLoader.load], especially with heavy resources like models or textures, because it will make the editor unresponsive when creating the tooltip. You can use [method request_thumbnail] if you want to display a preview in your tooltip.
*
* **Note:** If you decide to discard the [param base], make sure to call [method Node.queue_free], because it's not freed automatically.
*
*/
/* gdvirtual */ _make_tooltip_for_path(path: string, metadata: GDictionary, base: Control): Control
_thumbnail_ready(_unnamed_arg0: string, _unnamed_arg1: Texture2D, _unnamed_arg2: Texture2D, _unnamed_arg3: any): void
/** Requests a thumbnail for the given [TextureRect]. The thumbnail is created asynchronously by [EditorResourcePreview] and automatically set when available. */
request_thumbnail(path: string, control: TextureRect): void
}
class EditorRunBar = Record> extends MarginContainer {
constructor(identifier?: any)
readonly play_pressed: Signal0
readonly stop_pressed: Signal0
}
class EditorRunNative = Record> extends HBoxContainer {
constructor(identifier?: any)
readonly native_run: Signal1
}
class EditorSceneExporterGLTFSettings extends RefCounted {
constructor(identifier?: any)
get copyright(): string
set copyright(value: string)
get bake_fps(): float64
set bake_fps(value: float64)
}
/** Imports scenes from third-parties' 3D files.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorsceneformatimporter.html
*/
class EditorSceneFormatImporter extends RefCounted {
static readonly IMPORT_SCENE = 1
static readonly IMPORT_ANIMATION = 2
static readonly IMPORT_FAIL_ON_MISSING_DEPENDENCIES = 4
static readonly IMPORT_GENERATE_TANGENT_ARRAYS = 8
static readonly IMPORT_USE_NAMED_SKIN_BINDS = 16
static readonly IMPORT_DISCARD_MESHES_AND_MATERIALS = 32
static readonly IMPORT_FORCE_DISABLE_MESH_COMPRESSION = 64
constructor(identifier?: any)
/** Return supported file extensions for this scene importer. */
/* gdvirtual */ _get_extensions(): PackedStringArray
/** Perform the bulk of the scene import logic here, for example using [GLTFDocument] or [FBXDocument]. */
/* gdvirtual */ _import_scene(path: string, flags: int64, options: GDictionary): Object
/** Override to add general import options. These will appear in the main import dock on the editor. Add options via [method add_import_option] and [method add_import_option_advanced].
*
* **Note:** All [EditorSceneFormatImporter] and [EditorScenePostImportPlugin] instances will add options for all files. It is good practice to check the file extension when [param path] is non-empty.
* When the user is editing project settings, [param path] will be empty. It is recommended to add all options when [param path] is empty to allow the user to customize Import Defaults.
*/
/* gdvirtual */ _get_import_options(path: string): void
/** Should return `true` to show the given option, `false` to hide the given option, or `null` to ignore. */
/* gdvirtual */ _get_option_visibility(path: string, for_animation: boolean, option: string): any
/** Add a specific import option (name and default value only). This function can only be called from [method _get_import_options]. */
add_import_option(name: string, value: any): void
/** Add a specific import option. This function can only be called from [method _get_import_options]. */
add_import_option_advanced(type: Variant.Type, name: string, default_value: any, hint: PropertyHint = 0, hint_string: string = '', usage_flags: int64 = 6): void
}
/** Importer for Blender's `.blend` scene file format.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorsceneformatimporterblend.html
*/
class EditorSceneFormatImporterBlend extends EditorSceneFormatImporter {
constructor(identifier?: any)
}
class EditorSceneFormatImporterCollada extends EditorSceneFormatImporter {
constructor(identifier?: any)
}
class EditorSceneFormatImporterESCN extends EditorSceneFormatImporter {
constructor(identifier?: any)
}
/** Importer for the `.fbx` scene file format.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorsceneformatimporterfbx2gltf.html
*/
class EditorSceneFormatImporterFBX2GLTF extends EditorSceneFormatImporter {
constructor(identifier?: any)
}
/** @link https://docs.godotengine.org/en/4.4/classes/class_editorsceneformatimportergltf.html */
class EditorSceneFormatImporterGLTF extends EditorSceneFormatImporter {
constructor(identifier?: any)
}
/** Import FBX files using the ufbx library.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorsceneformatimporterufbx.html
*/
class EditorSceneFormatImporterUFBX extends EditorSceneFormatImporter {
constructor(identifier?: any)
}
/** Post-processes scenes after import.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorscenepostimport.html
*/
class EditorScenePostImport extends RefCounted {
constructor(identifier?: any)
/** Called after the scene was imported. This method must return the modified version of the scene. */
/* gdvirtual */ _post_import(scene: Node): Object
/** Returns the source file path which got imported (e.g. `res://scene.dae`). */
get_source_file(): string
}
namespace EditorScenePostImportPlugin {
enum InternalImportCategory {
INTERNAL_IMPORT_CATEGORY_NODE = 0,
INTERNAL_IMPORT_CATEGORY_MESH_3D_NODE = 1,
INTERNAL_IMPORT_CATEGORY_MESH = 2,
INTERNAL_IMPORT_CATEGORY_MATERIAL = 3,
INTERNAL_IMPORT_CATEGORY_ANIMATION = 4,
INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE = 5,
INTERNAL_IMPORT_CATEGORY_SKELETON_3D_NODE = 6,
INTERNAL_IMPORT_CATEGORY_MAX = 7,
}
}
/** Plugin to control and modifying the process of importing a scene.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorscenepostimportplugin.html
*/
class EditorScenePostImportPlugin extends RefCounted {
constructor(identifier?: any)
/** Override to add internal import options. These will appear in the 3D scene import dialog. Add options via [method add_import_option] and [method add_import_option_advanced]. */
/* gdvirtual */ _get_internal_import_options(category: int64): void
/** Should return `true` to show the given option, `false` to hide the given option, or `null` to ignore. */
/* gdvirtual */ _get_internal_option_visibility(category: int64, for_animation: boolean, option: string): any
/** Should return `true` if the 3D view of the import dialog needs to update when changing the given option. */
/* gdvirtual */ _get_internal_option_update_view_required(category: int64, option: string): any
/** Process a specific node or resource for a given category. */
/* gdvirtual */ _internal_process(category: int64, base_node: Node, node: Node, resource: Resource): void
/** Override to add general import options. These will appear in the main import dock on the editor. Add options via [method add_import_option] and [method add_import_option_advanced]. */
/* gdvirtual */ _get_import_options(path: string): void
/** Should return `true` to show the given option, `false` to hide the given option, or `null` to ignore. */
/* gdvirtual */ _get_option_visibility(path: string, for_animation: boolean, option: string): any
/** Pre Process the scene. This function is called right after the scene format loader loaded the scene and no changes have been made.
* Pre process may be used to adjust internal import options in the `"nodes"`, `"meshes"`, `"animations"` or `"materials"` keys inside `get_option_value("_subresources")`.
*/
/* gdvirtual */ _pre_process(scene: Node): void
/** Post process the scene. This function is called after the final scene has been configured. */
/* gdvirtual */ _post_process(scene: Node): void
/** Query the value of an option. This function can only be called from those querying visibility, or processing. */
get_option_value(name: StringName): any
/** Add a specific import option (name and default value only). This function can only be called from [method _get_import_options] and [method _get_internal_import_options]. */
add_import_option(name: string, value: any): void
/** Add a specific import option. This function can only be called from [method _get_import_options] and [method _get_internal_import_options]. */
add_import_option_advanced(type: Variant.Type, name: string, default_value: any, hint: PropertyHint = 0, hint_string: string = '', usage_flags: int64 = 6): void
}
class EditorSceneTabs = Record> extends MarginContainer {
constructor(identifier?: any)
_tab_preview_done(_unnamed_arg0: string, _unnamed_arg1: Texture2D, _unnamed_arg2: Texture2D, _unnamed_arg3: any): void
readonly tab_changed: Signal1
readonly tab_closed: Signal1
}
/** Base script that can be used to add extension functions to the editor.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorscript.html
*/
class EditorScript extends RefCounted {
constructor(identifier?: any)
/** This method is executed by the Editor when **File > Run** is used. */
/* gdvirtual */ _run(): void
/** Makes [param node] root of the currently opened scene. Only works if the scene is empty. If the [param node] is a scene instance, an inheriting scene will be created. */
add_root_node(node: Node): void
/** Returns the edited (current) scene's root [Node]. Equivalent of [method EditorInterface.get_edited_scene_root]. */
get_scene(): Node
/** Returns the [EditorInterface] singleton instance. */
get_editor_interface(): EditorInterface
}
/** Godot editor's control for selecting the `script` property of a [Node].
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorscriptpicker.html
*/
class EditorScriptPicker = Record> extends EditorResourcePicker {
constructor(identifier?: any)
/** The owner [Node] of the script property that holds the edited resource. */
get script_owner(): Node
set script_owner(value: Node)
}
class EditorScriptPreviewPlugin extends EditorResourcePreviewGenerator {
constructor(identifier?: any)
}
/** Manages the SceneTree selection in the editor.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorselection.html
*/
class EditorSelection extends Object {
constructor(identifier?: any)
/** Clear the selection. */
clear(): void
/** Adds a node to the selection.
*
* **Note:** The newly selected node will not be automatically edited in the inspector. If you want to edit a node, use [method EditorInterface.edit_node].
*/
add_node(node: Node): void
/** Removes a node from the selection. */
remove_node(node: Node): void
/** Returns the list of selected nodes. */
get_selected_nodes(): GArray
/** Returns the list of selected nodes, optimized for transform operations (i.e. moving them, rotating, etc.). This list can be used to avoid situations where a node is selected and is also a child/grandchild. */
get_transformable_selected_nodes(): GArray
/** Emitted when the selection changes. */
readonly selection_changed: Signal0
}
/** Object that holds the project-independent editor settings.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorsettings.html
*/
class EditorSettings extends Resource {
/** Emitted after any editor setting has changed. It's used by various editor plugins to update their visuals on theme changes or logic on configuration changes. */
static readonly NOTIFICATION_EDITOR_SETTINGS_CHANGED = 10000
constructor(identifier?: any)
/** Returns `true` if the setting specified by [param name] exists, `false` otherwise. */
has_setting(name: string): boolean
/** Sets the [param value] of the setting specified by [param name]. This is equivalent to using [method Object.set] on the EditorSettings instance. */
set_setting(name: string, value: any): void
/** Returns the value of the setting specified by [param name]. This is equivalent to using [method Object.get] on the EditorSettings instance. */
get_setting(name: string): any
/** Erases the setting whose name is specified by [param property]. */
erase(property: string): void
/** Sets the initial value of the setting specified by [param name] to [param value]. This is used to provide a value for the Revert button in the Editor Settings. If [param update_current] is `true`, the setting is reset to [param value] as well. */
set_initial_value(name: StringName, value: any, update_current: boolean): void
/** Adds a custom property info to a property. The dictionary must contain:
* - `name`: [String] (the name of the property)
* - `type`: [int] (see [enum Variant.Type])
* - optionally `hint`: [int] (see [enum PropertyHint]) and `hint_string`: [String]
*
*/
add_property_info(info: GDictionary): void
/** Sets project-specific metadata with the [param section], [param key] and [param data] specified. This metadata is stored outside the project folder and therefore won't be checked into version control. See also [method get_project_metadata]. */
set_project_metadata(section: string, key: string, data: any): void
/** Returns project-specific metadata for the [param section] and [param key] specified. If the metadata doesn't exist, [param default] will be returned instead. See also [method set_project_metadata]. */
get_project_metadata(section: string, key: string, default_: any = {}): any
/** Sets the list of favorite files and directories for this project. */
set_favorites(dirs: PackedStringArray | string[]): void
/** Returns the list of favorite files and directories for this project. */
get_favorites(): PackedStringArray
/** Sets the list of recently visited folders in the file dialog for this project. */
set_recent_dirs(dirs: PackedStringArray | string[]): void
/** Returns the list of recently visited folders in the file dialog for this project. */
get_recent_dirs(): PackedStringArray
/** Overrides the built-in editor action [param name] with the input actions defined in [param actions_list]. */
set_builtin_action_override(name: string, actions_list: GArray): void
/** Checks if any settings with the prefix [param setting_prefix] exist in the set of changed settings. See also [method get_changed_settings]. */
check_changed_settings_in_group(setting_prefix: string): boolean
/** Gets an array of the settings which have been changed since the last save. Note that internally `changed_settings` is cleared after a successful save, so generally the most appropriate place to use this method is when processing [constant NOTIFICATION_EDITOR_SETTINGS_CHANGED]. */
get_changed_settings(): PackedStringArray
/** Marks the passed editor setting as being changed, see [method get_changed_settings]. Only settings which exist (see [method has_setting]) will be accepted. */
mark_setting_changed(setting: string): void
/** Emitted after any editor setting has changed. */
readonly settings_changed: Signal0
}
class EditorSettingsDialog = Record> extends AcceptDialog {
constructor(identifier?: any)
_update_shortcuts(): void
_settings_changed(): void
}
/** Godot editor's control for editing numeric values.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorspinslider.html
*/
class EditorSpinSlider = Record> extends Range {
constructor(identifier?: any)
/** The text that displays to the left of the value. */
get label(): string
set label(value: string)
/** The suffix to display after the value (in a faded color). This should generally be a plural word. You may have to use an abbreviation if the suffix is too long to be displayed. */
get suffix(): string
set suffix(value: string)
/** If `true`, the slider can't be interacted with. */
get read_only(): boolean
set read_only(value: boolean)
/** If `true`, the slider will not draw background. */
get flat(): boolean
set flat(value: boolean)
/** If `true`, the slider and up/down arrows are hidden. */
get hide_slider(): boolean
set hide_slider(value: boolean)
/** If `true`, the [EditorSpinSlider] is considered to be editing an integer value. If `false`, the [EditorSpinSlider] is considered to be editing a floating-point value. This is used to determine whether a slider should be drawn. The slider is only drawn for floats; integers use up-down arrows similar to [SpinBox] instead. */
get editing_integer(): boolean
set editing_integer(value: boolean)
/** Emitted when the spinner/slider is grabbed. */
readonly grabbed: Signal0
/** Emitted when the spinner/slider is ungrabbed. */
readonly ungrabbed: Signal0
/** Emitted when the updown button is pressed. */
readonly updown_pressed: Signal0
/** Emitted when the value form gains focus. */
readonly value_focus_entered: Signal0
/** Emitted when the value form loses focus. */
readonly value_focus_exited: Signal0
}
/** Base class for [SyntaxHighlighter] used by the [ScriptEditor].
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorsyntaxhighlighter.html
*/
class EditorSyntaxHighlighter extends SyntaxHighlighter {
constructor(identifier?: any)
/** Virtual method which can be overridden to return the syntax highlighter name. */
/* gdvirtual */ _get_name(): string
/** Virtual method which can be overridden to return the supported language names. */
/* gdvirtual */ _get_supported_languages(): PackedStringArray
_get_edited_resource(): RefCounted
}
class EditorTexturePreviewPlugin extends EditorResourcePreviewGenerator {
constructor(identifier?: any)
}
class EditorTextureTooltipPlugin extends EditorResourceTooltipPlugin {
constructor(identifier?: any)
}
class EditorTheme extends Theme {
constructor(identifier?: any)
}
class EditorTitleBar = Record> extends HBoxContainer {
constructor(identifier?: any)
}
namespace EditorToaster {
enum Severity {
/** Toast will display with an INFO severity. */
SEVERITY_INFO = 0,
/** Toast will display with a WARNING severity and have a corresponding color. */
SEVERITY_WARNING = 1,
/** Toast will display with an ERROR severity and have a corresponding color. */
SEVERITY_ERROR = 2,
}
}
/** Manages toast notifications within the editor.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editortoaster.html
*/
class EditorToaster = Record> extends HBoxContainer {
constructor(identifier?: any)
/** Pushes a toast notification to the editor for display. */
push_toast(message: string, severity: EditorToaster.Severity = 0, tooltip: string = ''): void
}
/** Plugin for adding custom parsers to extract strings that are to be translated from custom files (.csv, .json etc.).
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editortranslationparserplugin.html
*/
class EditorTranslationParserPlugin extends RefCounted {
constructor(identifier?: any)
/** Override this method to define a custom parsing logic to extract the translatable strings. */
/* gdvirtual */ _parse_file(path: string): GArray
/** Gets the list of file extensions to associate with this parser, e.g. `["csv"]`. */
/* gdvirtual */ _get_recognized_extensions(): PackedStringArray
}
namespace EditorUndoRedoManager {
enum SpecialHistory {
/** Global history not associated with any scene, but with external resources etc. */
GLOBAL_HISTORY = 0,
/** History associated with remote inspector. Used when live editing a running project. */
REMOTE_HISTORY = -9,
/** Invalid "null" history. It's a special value, not associated with any object. */
INVALID_HISTORY = -99,
}
}
/** Manages undo history of scenes opened in the editor.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorundoredomanager.html
*/
class EditorUndoRedoManager extends Object {
constructor(identifier?: any)
/** Create a new action. After this is called, do all your calls to [method add_do_method], [method add_undo_method], [method add_do_property], and [method add_undo_property], then commit the action with [method commit_action].
* The way actions are merged is dictated by the [param merge_mode] argument. See [enum UndoRedo.MergeMode] for details.
* If [param custom_context] object is provided, it will be used for deducing target history (instead of using the first operation).
* The way undo operation are ordered in actions is dictated by [param backward_undo_ops]. When [param backward_undo_ops] is `false` undo option are ordered in the same order they were added. Which means the first operation to be added will be the first to be undone.
*/
create_action(name: string, merge_mode: UndoRedo.MergeMode = 0, custom_context: Object = undefined, backward_undo_ops: boolean = false): void
/** Commits the action. If [param execute] is `true` (default), all "do" methods/properties are called/set when this function is called. */
commit_action(execute: boolean = true): void
/** Returns `true` if the [EditorUndoRedoManager] is currently committing the action, i.e. running its "do" method or property change (see [method commit_action]). */
is_committing_action(): boolean
/** Forces the next operation (e.g. [method add_do_method]) to use the action's history rather than guessing it from the object. This is sometimes needed when a history can't be correctly determined, like for a nested resource that doesn't have a path yet.
* This method should only be used when absolutely necessary, otherwise it might cause invalid history state. For most of complex cases, the `custom_context` parameter of [method create_action] is sufficient.
*/
force_fixed_history(): void
/** Register a method that will be called when the action is committed (i.e. the "do" action).
* If this is the first operation, the [param object] will be used to deduce target undo history.
*/
add_do_method(object: Object, method: StringName, ...vargargs: any[]): void
/** Register a method that will be called when the action is undone (i.e. the "undo" action).
* If this is the first operation, the [param object] will be used to deduce target undo history.
*/
add_undo_method(object: Object, method: StringName, ...vargargs: any[]): void
/** Register a property value change for "do".
* If this is the first operation, the [param object] will be used to deduce target undo history.
*/
add_do_property(object: Object, property: StringName, value: any): void
/** Register a property value change for "undo".
* If this is the first operation, the [param object] will be used to deduce target undo history.
*/
add_undo_property(object: Object, property: StringName, value: any): void
/** Register a reference for "do" that will be erased if the "do" history is lost. This is useful mostly for new nodes created for the "do" call. Do not use for resources. */
add_do_reference(object: Object): void
/** Register a reference for "undo" that will be erased if the "undo" history is lost. This is useful mostly for nodes removed with the "do" call (not the "undo" call!). */
add_undo_reference(object: Object): void
/** Returns the history ID deduced from the given [param object]. It can be used with [method get_history_undo_redo]. */
get_object_history_id(object: Object): int64
/** Returns the [UndoRedo] object associated with the given history [param id].
* [param id] above `0` are mapped to the opened scene tabs (but it doesn't match their order). [param id] of `0` or lower have special meaning (see [enum SpecialHistory]).
* Best used with [method get_object_history_id]. This method is only provided in case you need some more advanced methods of [UndoRedo] (but keep in mind that directly operating on the [UndoRedo] object might affect editor's stability).
*/
get_history_undo_redo(id: int64): UndoRedo
/** Clears the given undo history. You can clear history for a specific scene, global history, or for all scenes at once if [param id] is [constant INVALID_HISTORY].
* If [param increase_version] is `true`, the undo history version will be increased, marking it as unsaved. Useful for operations that modify the scene, but don't support undo.
*
*
* **Note:** If you want to mark an edited scene as unsaved without clearing its history, use [method EditorInterface.mark_scene_as_unsaved] instead.
*/
clear_history(id: int64 = -99, increase_version: boolean = true): void
/** Emitted when the list of actions in any history has changed, either when an action is committed or a history is cleared. */
readonly history_changed: Signal0
/** Emitted when the version of any history has changed as a result of undo or redo call. */
readonly version_changed: Signal0
}
namespace EditorVCSInterface {
enum ChangeType {
/** A new file has been added. */
CHANGE_TYPE_NEW = 0,
/** An earlier added file has been modified. */
CHANGE_TYPE_MODIFIED = 1,
/** An earlier added file has been renamed. */
CHANGE_TYPE_RENAMED = 2,
/** An earlier added file has been deleted. */
CHANGE_TYPE_DELETED = 3,
/** An earlier added file has been typechanged. */
CHANGE_TYPE_TYPECHANGE = 4,
/** A file is left unmerged. */
CHANGE_TYPE_UNMERGED = 5,
}
enum TreeArea {
/** A commit is encountered from the commit area. */
TREE_AREA_COMMIT = 0,
/** A file is encountered from the staged area. */
TREE_AREA_STAGED = 1,
/** A file is encountered from the unstaged area. */
TREE_AREA_UNSTAGED = 2,
}
}
/** Version Control System (VCS) interface, which reads and writes to the local VCS in use.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_editorvcsinterface.html
*/
class EditorVCSInterface extends Object {
constructor(identifier?: any)
/** Initializes the VCS plugin when called from the editor. Returns whether or not the plugin was successfully initialized. A VCS project is initialized at [param project_path]. */
/* gdvirtual */ _initialize(project_path: string): boolean
/** Set user credentials in the underlying VCS. [param username] and [param password] are used only during HTTPS authentication unless not already mentioned in the remote URL. [param ssh_public_key_path], [param ssh_private_key_path], and [param ssh_passphrase] are only used during SSH authentication. */
/* gdvirtual */ _set_credentials(username: string, password: string, ssh_public_key_path: string, ssh_private_key_path: string, ssh_passphrase: string): void
/** Returns an [Array] of [Dictionary] items (see [method create_status_file]), each containing the status data of every modified file in the project folder. */
/* gdvirtual */ _get_modified_files_data(): GArray
/** Stages the file present at [param file_path] to the staged area. */
/* gdvirtual */ _stage_file(file_path: string): void
/** Unstages the file present at [param file_path] from the staged area to the unstaged area. */
/* gdvirtual */ _unstage_file(file_path: string): void
/** Discards the changes made in a file present at [param file_path]. */
/* gdvirtual */ _discard_file(file_path: string): void
/** Commits the currently staged changes and applies the commit [param msg] to the resulting commit. */
/* gdvirtual */ _commit(msg: string): void
/** Returns an array of [Dictionary] items (see [method create_diff_file], [method create_diff_hunk], [method create_diff_line], [method add_line_diffs_into_diff_hunk] and [method add_diff_hunks_into_diff_file]), each containing information about a diff. If [param identifier] is a file path, returns a file diff, and if it is a commit identifier, then returns a commit diff. */
/* gdvirtual */ _get_diff(identifier: string, area: int64): GArray
/** Shuts down VCS plugin instance. Called when the user either closes the editor or shuts down the VCS plugin through the editor UI. */
/* gdvirtual */ _shut_down(): boolean
/** Returns the name of the underlying VCS provider. */
/* gdvirtual */ _get_vcs_name(): string
/** Returns an [Array] of [Dictionary] items (see [method create_commit]), each containing the data for a past commit. */
/* gdvirtual */ _get_previous_commits(max_commits: int64): GArray
/** Gets an instance of an [Array] of [String]s containing available branch names in the VCS. */
/* gdvirtual */ _get_branch_list(): GArray
/** Returns an [Array] of [String]s, each containing the name of a remote configured in the VCS. */
/* gdvirtual */ _get_remotes(): GArray
/** Creates a new branch named [param branch_name] in the VCS. */
/* gdvirtual */ _create_branch(branch_name: string): void
/** Remove a branch from the local VCS. */
/* gdvirtual */ _remove_branch(branch_name: string): void
/** Creates a new remote destination with name [param remote_name] and points it to [param remote_url]. This can be an HTTPS remote or an SSH remote. */
/* gdvirtual */ _create_remote(remote_name: string, remote_url: string): void
/** Remove a remote from the local VCS. */
/* gdvirtual */ _remove_remote(remote_name: string): void
/** Gets the current branch name defined in the VCS. */
/* gdvirtual */ _get_current_branch_name(): string
/** Checks out a [param branch_name] in the VCS. */
/* gdvirtual */ _checkout_branch(branch_name: string): boolean
/** Pulls changes from the remote. This can give rise to merge conflicts. */
/* gdvirtual */ _pull(remote: string): void
/** Pushes changes to the [param remote]. If [param force] is `true`, a force push will override the change history already present on the remote. */
/* gdvirtual */ _push(remote: string, force: boolean): void
/** Fetches new changes from the [param remote], but doesn't write changes to the current working directory. Equivalent to `git fetch`. */
/* gdvirtual */ _fetch(remote: string): void
/** Returns an [Array] of [Dictionary] items (see [method create_diff_hunk]), each containing a line diff between a file at [param file_path] and the [param text] which is passed in. */
/* gdvirtual */ _get_line_diff(file_path: string, text: string): GArray
/** Helper function to create a [Dictionary] for storing a line diff. [param new_line_no] is the line number in the new file (can be `-1` if the line is deleted). [param old_line_no] is the line number in the old file (can be `-1` if the line is added). [param content] is the diff text. [param status] is a single character string which stores the line origin. */
create_diff_line(new_line_no: int64, old_line_no: int64, content: string, status: string): GDictionary
/** Helper function to create a [Dictionary] for storing diff hunk data. [param old_start] is the starting line number in old file. [param new_start] is the starting line number in new file. [param old_lines] is the number of lines in the old file. [param new_lines] is the number of lines in the new file. */
create_diff_hunk(old_start: int64, new_start: int64, old_lines: int64, new_lines: int64): GDictionary
/** Helper function to create a [Dictionary] for storing old and new diff file paths. */
create_diff_file(new_file: string, old_file: string): GDictionary
/** Helper function to create a commit [Dictionary] item. [param msg] is the commit message of the commit. [param author] is a single human-readable string containing all the author's details, e.g. the email and name configured in the VCS. [param id] is the identifier of the commit, in whichever format your VCS may provide an identifier to commits. [param unix_timestamp] is the UTC Unix timestamp of when the commit was created. [param offset_minutes] is the timezone offset in minutes, recorded from the system timezone where the commit was created. */
create_commit(msg: string, author: string, id: string, unix_timestamp: int64, offset_minutes: int64): GDictionary
/** Helper function to create a [Dictionary] used by editor to read the status of a file. */
create_status_file(file_path: string, change_type: EditorVCSInterface.ChangeType, area: EditorVCSInterface.TreeArea): GDictionary
/** Helper function to add an array of [param diff_hunks] into a [param diff_file]. */
add_diff_hunks_into_diff_file(diff_file: GDictionary, diff_hunks: GArray): GDictionary
/** Helper function to add an array of [param line_diffs] into a [param diff_hunk]. */
add_line_diffs_into_diff_hunk(diff_hunk: GDictionary, line_diffs: GArray): GDictionary
/** Pops up an error message in the editor which is shown as coming from the underlying VCS. Use this to show VCS specific error messages. */
popup_error(msg: string): void
}
class EditorValidationPanel = Record> extends PanelContainer {
constructor(identifier?: any)
}
class EditorVersionButton = Record> extends LinkButton {
constructor(identifier?: any)
}
class EditorVisualProfiler = Record> extends VBoxContainer {
constructor(identifier?: any)
readonly enable_profiling: Signal1
}
class EditorZoomWidget = Record> extends HBoxContainer {
constructor(identifier?: any)
set_zoom_by_increments(increment: int64, integer_only: boolean): void
get zoom(): float64
set zoom(value: float64)
readonly zoom_changed: Signal1
}
class EmbeddedProcess = Record> extends Control {
constructor(identifier?: any)
readonly embedding_completed: Signal0
readonly embedding_failed: Signal0
readonly embedded_process_updated: Signal0
readonly embedded_process_focused: Signal0
}
/** Holds a reference to an [Object]'s instance ID.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_encodedobjectasid.html
*/
class EncodedObjectAsID extends RefCounted {
constructor(identifier?: any)
/** The [Object] identifier stored in this [EncodedObjectAsID] instance. The object instance can be retrieved with [method @GlobalScope.instance_from_id]. */
get object_id(): int64
set object_id(value: int64)
}
/** Base class for creating custom profilers.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_engineprofiler.html
*/
class EngineProfiler extends RefCounted {
constructor(identifier?: any)
/** Called when the profiler is enabled/disabled, along with a set of [param options]. */
/* gdvirtual */ _toggle(enable: boolean, options: GArray): void
/** Called when data is added to profiler using [method EngineDebugger.profiler_add_frame_data]. */
/* gdvirtual */ _add_frame(data: GArray): void
/** Called once every engine iteration when the profiler is active with information about the current frame. All time values are in seconds. Lower values represent faster processing times and are therefore considered better. */
/* gdvirtual */ _tick(frame_time: float64, process_time: float64, physics_time: float64, physics_frame_time: float64): void
}
namespace Environment {
enum BGMode {
/** Clears the background using the clear color defined in [member ProjectSettings.rendering/environment/defaults/default_clear_color]. */
BG_CLEAR_COLOR = 0,
/** Clears the background using a custom clear color. */
BG_COLOR = 1,
/** Displays a user-defined sky in the background. */
BG_SKY = 2,
/** Displays a [CanvasLayer] in the background. */
BG_CANVAS = 3,
/** Keeps on screen every pixel drawn in the background. This is the fastest background mode, but it can only be safely used in fully-interior scenes (no visible sky or sky reflections). If enabled in a scene where the background is visible, "ghost trail" artifacts will be visible when moving the camera. */
BG_KEEP = 4,
/** Displays a camera feed in the background. */
BG_CAMERA_FEED = 5,
/** Represents the size of the [enum BGMode] enum. */
BG_MAX = 6,
}
enum AmbientSource {
/** Gather ambient light from whichever source is specified as the background. */
AMBIENT_SOURCE_BG = 0,
/** Disable ambient light. This provides a slight performance boost over [constant AMBIENT_SOURCE_SKY]. */
AMBIENT_SOURCE_DISABLED = 1,
/** Specify a specific [Color] for ambient light. This provides a slight performance boost over [constant AMBIENT_SOURCE_SKY]. */
AMBIENT_SOURCE_COLOR = 2,
/** Gather ambient light from the [Sky] regardless of what the background is. */
AMBIENT_SOURCE_SKY = 3,
}
enum ReflectionSource {
/** Use the background for reflections. */
REFLECTION_SOURCE_BG = 0,
/** Disable reflections. This provides a slight performance boost over other options. */
REFLECTION_SOURCE_DISABLED = 1,
/** Use the [Sky] for reflections regardless of what the background is. */
REFLECTION_SOURCE_SKY = 2,
}
enum ToneMapper {
/** Does not modify color data, resulting in a linear tonemapping curve which unnaturally clips bright values, causing bright lighting to look blown out. The simplest and fastest tonemapper. */
TONE_MAPPER_LINEAR = 0,
/** A simple tonemapping curve that rolls off bright values to prevent clipping. This results in an image that can appear dull and low contrast. Slower than [constant TONE_MAPPER_LINEAR].
*
* **Note:** When [member tonemap_white] is left at the default value of `1.0`, [constant TONE_MAPPER_REINHARDT] produces an identical image to [constant TONE_MAPPER_LINEAR].
*/
TONE_MAPPER_REINHARDT = 1,
/** Uses a film-like tonemapping curve to prevent clipping of bright values and provide better contrast than [constant TONE_MAPPER_REINHARDT]. Slightly slower than [constant TONE_MAPPER_REINHARDT]. */
TONE_MAPPER_FILMIC = 2,
/** Uses a high-contrast film-like tonemapping curve and desaturates bright values for a more realistic appearance. Slightly slower than [constant TONE_MAPPER_FILMIC].
*
* **Note:** This tonemapping operator is called "ACES Fitted" in Godot 3.x.
*/
TONE_MAPPER_ACES = 3,
/** Uses a film-like tonemapping curve and desaturates bright values for a more realistic appearance. Better than other tonemappers at maintaining the hue of colors as they become brighter. The slowest tonemapping option.
*
* **Note:** [member tonemap_white] is fixed at a value of `16.29`, which makes [constant TONE_MAPPER_AGX] unsuitable for use with the Mobile rendering method.
*/
TONE_MAPPER_AGX = 4,
}
enum GlowBlendMode {
/** Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources. */
GLOW_BLEND_MODE_ADDITIVE = 0,
/** Screen glow blending mode. Increases brightness, used frequently with bloom. */
GLOW_BLEND_MODE_SCREEN = 1,
/** Soft light glow blending mode. Modifies contrast, exposes shadows and highlights (vivid bloom). */
GLOW_BLEND_MODE_SOFTLIGHT = 2,
/** Replace glow blending mode. Replaces all pixels' color by the glow value. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness. */
GLOW_BLEND_MODE_REPLACE = 3,
/** Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect. */
GLOW_BLEND_MODE_MIX = 4,
}
enum FogMode {
/** Use a physically-based fog model defined primarily by fog density. */
FOG_MODE_EXPONENTIAL = 0,
/** Use a simple fog model defined by start and end positions and a custom curve. While not physically accurate, this model can be useful when you need more artistic control. */
FOG_MODE_DEPTH = 1,
}
enum SDFGIYScale {
/** Use 50% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be twice as short as they are wide. This allows providing increased GI detail and reduced light leaking with thin floors and ceilings. This is usually the best choice for scenes that don't feature much verticality. */
SDFGI_Y_SCALE_50_PERCENT = 0,
/** Use 75% scale for SDFGI on the Y (vertical) axis. This is a balance between the 50% and 100% SDFGI Y scales. */
SDFGI_Y_SCALE_75_PERCENT = 1,
/** Use 100% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be as tall as they are wide. This is usually the best choice for highly vertical scenes. The downside is that light leaking may become more noticeable with thin floors and ceilings. */
SDFGI_Y_SCALE_100_PERCENT = 2,
}
}
/** Resource for environment nodes (like [WorldEnvironment]) that define multiple rendering options.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_environment.html
*/
class Environment extends Resource {
constructor(identifier?: any)
/** Sets the intensity of the glow level [param idx]. A value above `0.0` enables the level. Each level relies on the previous level. This means that enabling higher glow levels will slow down the glow effect rendering, even if previous levels aren't enabled. */
set_glow_level(idx: int64, intensity: float64): void
/** Returns the intensity of the glow level [param idx]. */
get_glow_level(idx: int64): float64
/** The background mode. See [enum BGMode] for possible values. */
get background_mode(): int64
set background_mode(value: int64)
/** The [Color] displayed for clear areas of the scene. Only effective when using the [constant BG_COLOR] background mode. */
get background_color(): Color
set background_color(value: Color)
/** Multiplier for background energy. Increase to make background brighter, decrease to make background dimmer. */
get background_energy_multiplier(): float64
set background_energy_multiplier(value: float64)
/** Luminance of background measured in nits (candela per square meter). Only used when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is enabled. The default value is roughly equivalent to the sky at midday. */
get background_intensity(): float64
set background_intensity(value: float64)
/** The maximum layer ID to display. Only effective when using the [constant BG_CANVAS] background mode. */
get background_canvas_max_layer(): int64
set background_canvas_max_layer(value: int64)
/** The ID of the camera feed to show in the background. */
get background_camera_feed_id(): int64
set background_camera_feed_id(value: int64)
/** The [Sky] resource used for this [Environment]. */
get sky(): Sky
set sky(value: Sky)
/** If set to a value greater than `0.0`, overrides the field of view to use for sky rendering. If set to `0.0`, the same FOV as the current [Camera3D] is used for sky rendering. */
get sky_custom_fov(): float64
set sky_custom_fov(value: float64)
/** The rotation to use for sky rendering. */
get sky_rotation(): Vector3
set sky_rotation(value: Vector3)
/** The ambient light source to use for rendering materials and global illumination. */
get ambient_light_source(): int64
set ambient_light_source(value: int64)
/** The ambient light's [Color]. Only effective if [member ambient_light_sky_contribution] is lower than `1.0` (exclusive). */
get ambient_light_color(): Color
set ambient_light_color(value: Color)
/** Defines the amount of light that the sky brings on the scene. A value of `0.0` means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of `1.0` means that *all* the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene.
*
* **Note:** [member ambient_light_sky_contribution] is internally clamped between `0.0` and `1.0` (inclusive).
*/
get ambient_light_sky_contribution(): float64
set ambient_light_sky_contribution(value: float64)
/** The ambient light's energy. The higher the value, the stronger the light. Only effective if [member ambient_light_sky_contribution] is lower than `1.0` (exclusive). */
get ambient_light_energy(): float64
set ambient_light_energy(value: float64)
/** The reflected (specular) light source. */
get reflected_light_source(): int64
set reflected_light_source(value: int64)
/** The tonemapping mode to use. Tonemapping is the process that "converts" HDR values to be suitable for rendering on an LDR display. (Godot doesn't support rendering on HDR displays yet.) */
get tonemap_mode(): int64
set tonemap_mode(value: int64)
/** Adjusts the brightness of values before they are provided to the tonemapper. Higher [member tonemap_exposure] values result in a brighter image. See also [member tonemap_white].
*
* **Note:** Values provided to the tonemapper will also be multiplied by `2.0` and `1.8` for [constant TONE_MAPPER_FILMIC] and [constant TONE_MAPPER_ACES] respectively to produce a similar apparent brightness as [constant TONE_MAPPER_LINEAR].
*/
get tonemap_exposure(): float64
set tonemap_exposure(value: float64)
/** The white reference value for tonemapping, which indicates where bright white is located in the scale of values provided to the tonemapper. For photorealistic lighting, recommended values are between `6.0` and `8.0`. Higher values result in less blown out highlights, but may make the scene appear lower contrast. See also [member tonemap_exposure].
*
* **Note:** [member tonemap_white] is ignored when using [constant TONE_MAPPER_LINEAR] or [constant TONE_MAPPER_AGX].
*/
get tonemap_white(): float64
set tonemap_white(value: float64)
/** If `true`, screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from [VoxelGI]s or [ReflectionProbe]s, but are slower and can't reflect surfaces occluded by others.
*
* **Note:** SSR is only supported in the Forward+ rendering method, not Mobile or Compatibility.
*/
get ssr_enabled(): boolean
set ssr_enabled(value: boolean)
/** The maximum number of steps for screen-space reflections. Higher values are slower. */
get ssr_max_steps(): int64
set ssr_max_steps(value: int64)
/** The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection. Only positive values are valid (negative values will be clamped to `0.0`). */
get ssr_fade_in(): float64
set ssr_fade_in(value: float64)
/** The fade-out distance for screen-space reflections. Affects the area from the screen-space reflection to the "global" reflection. Only positive values are valid (negative values will be clamped to `0.0`). */
get ssr_fade_out(): float64
set ssr_fade_out(value: float64)
/** The depth tolerance for screen-space reflections. */
get ssr_depth_tolerance(): float64
set ssr_depth_tolerance(value: float64)
/** If `true`, the screen-space ambient occlusion effect is enabled. This darkens objects' corners and cavities to simulate ambient light not reaching the entire object as in real life. This works well for small, dynamic objects, but baked lighting or ambient occlusion textures will do a better job at displaying ambient occlusion on large static objects. Godot uses a form of SSAO called Adaptive Screen Space Ambient Occlusion which is itself a form of Horizon Based Ambient Occlusion.
*
* **Note:** SSAO is only supported in the Forward+ rendering method, not Mobile or Compatibility.
*/
get ssao_enabled(): boolean
set ssao_enabled(value: boolean)
/** The distance at which objects can occlude each other when calculating screen-space ambient occlusion. Higher values will result in occlusion over a greater distance at the cost of performance and quality. */
get ssao_radius(): float64
set ssao_radius(value: float64)
/** The primary screen-space ambient occlusion intensity. Acts as a multiplier for the screen-space ambient occlusion effect. A higher value results in darker occlusion. */
get ssao_intensity(): float64
set ssao_intensity(value: float64)
/** The distribution of occlusion. A higher value results in darker occlusion, similar to [member ssao_intensity], but with a sharper falloff. */
get ssao_power(): float64
set ssao_power(value: float64)
/** Sets the strength of the additional level of detail for the screen-space ambient occlusion effect. A high value makes the detail pass more prominent, but it may contribute to aliasing in your final image. */
get ssao_detail(): float64
set ssao_detail(value: float64)
/** The threshold for considering whether a given point on a surface is occluded or not represented as an angle from the horizon mapped into the `0.0-1.0` range. A value of `1.0` results in no occlusion. */
get ssao_horizon(): float64
set ssao_horizon(value: float64)
/** The amount that the screen-space ambient occlusion effect is allowed to blur over the edges of objects. Setting too high will result in aliasing around the edges of objects. Setting too low will make object edges appear blurry. */
get ssao_sharpness(): float64
set ssao_sharpness(value: float64)
/** The screen-space ambient occlusion intensity in direct light. In real life, ambient occlusion only applies to indirect light, which means its effects can't be seen in direct light. Values higher than `0` will make the SSAO effect visible in direct light. */
get ssao_light_affect(): float64
set ssao_light_affect(value: float64)
/** The screen-space ambient occlusion intensity on materials that have an AO texture defined. Values higher than `0` will make the SSAO effect visible in areas darkened by AO textures. */
get ssao_ao_channel_affect(): float64
set ssao_ao_channel_affect(value: float64)
/** If `true`, the screen-space indirect lighting effect is enabled. Screen space indirect lighting is a form of indirect lighting that allows diffuse light to bounce between nearby objects. Screen-space indirect lighting works very similarly to screen-space ambient occlusion, in that it only affects a limited range. It is intended to be used along with a form of proper global illumination like SDFGI or [VoxelGI]. Screen-space indirect lighting is not affected by individual light's [member Light3D.light_indirect_energy].
*
* **Note:** SSIL is only supported in the Forward+ rendering method, not Mobile or Compatibility.
*/
get ssil_enabled(): boolean
set ssil_enabled(value: boolean)
/** The distance that bounced lighting can travel when using the screen space indirect lighting effect. A larger value will result in light bouncing further in a scene, but may result in under-sampling artifacts which look like long spikes surrounding light sources. */
get ssil_radius(): float64
set ssil_radius(value: float64)
/** The brightness multiplier for the screen-space indirect lighting effect. A higher value will result in brighter light. */
get ssil_intensity(): float64
set ssil_intensity(value: float64)
/** The amount that the screen-space indirect lighting effect is allowed to blur over the edges of objects. Setting too high will result in aliasing around the edges of objects. Setting too low will make object edges appear blurry. */
get ssil_sharpness(): float64
set ssil_sharpness(value: float64)
/** Amount of normal rejection used when calculating screen-space indirect lighting. Normal rejection uses the normal of a given sample point to reject samples that are facing away from the current pixel. Normal rejection is necessary to avoid light leaking when only one side of an object is illuminated. However, normal rejection can be disabled if light leaking is desirable, such as when the scene mostly contains emissive objects that emit light from faces that cannot be seen from the camera. */
get ssil_normal_rejection(): float64
set ssil_normal_rejection(value: float64)
/** If `true`, enables signed distance field global illumination for meshes that have their [member GeometryInstance3D.gi_mode] set to [constant GeometryInstance3D.GI_MODE_STATIC]. SDFGI is a real-time global illumination technique that works well with procedurally generated and user-built levels, including in situations where geometry is created during gameplay. The signed distance field is automatically generated around the camera as it moves. Dynamic lights are supported, but dynamic occluders and emissive surfaces are not.
*
* **Note:** SDFGI is only supported in the Forward+ rendering method, not Mobile or Compatibility.
* **Performance:** SDFGI is relatively demanding on the GPU and is not suited to low-end hardware such as integrated graphics (consider [LightmapGI] instead). To improve SDFGI performance, enable [member ProjectSettings.rendering/global_illumination/gi/use_half_resolution] in the Project Settings.
*
* **Note:** Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh.
*/
get sdfgi_enabled(): boolean
set sdfgi_enabled(value: boolean)
/** If `true`, SDFGI uses an occlusion detection approach to reduce light leaking. Occlusion may however introduce dark blotches in certain spots, which may be undesired in mostly outdoor scenes. [member sdfgi_use_occlusion] has a performance impact and should only be enabled when needed. */
get sdfgi_use_occlusion(): boolean
set sdfgi_use_occlusion(value: boolean)
/** If `true`, SDFGI takes the environment lighting into account. This should be set to `false` for interior scenes. */
get sdfgi_read_sky_light(): boolean
set sdfgi_read_sky_light(value: boolean)
/** The energy multiplier applied to light every time it bounces from a surface when using SDFGI. Values greater than `0.0` will simulate multiple bounces, resulting in a more realistic appearance. Increasing [member sdfgi_bounce_feedback] generally has no performance impact. See also [member sdfgi_energy].
*
* **Note:** Values greater than `0.5` can cause infinite feedback loops and should be avoided in scenes with bright materials.
*
* **Note:** If [member sdfgi_bounce_feedback] is `0.0`, indirect lighting will not be represented in reflections as light will only bounce one time.
*/
get sdfgi_bounce_feedback(): float64
set sdfgi_bounce_feedback(value: float64)
/** The number of cascades to use for SDFGI (between 1 and 8). A higher number of cascades allows displaying SDFGI further away while preserving detail up close, at the cost of performance. When using SDFGI on small-scale levels, [member sdfgi_cascades] can often be decreased between `1` and `4` to improve performance. */
get sdfgi_cascades(): int64
set sdfgi_cascades(value: int64)
/** The cell size to use for the closest SDFGI cascade (in 3D units). Lower values allow SDFGI to be more precise up close, at the cost of making SDFGI updates more demanding. This can cause stuttering when the camera moves fast. Higher values allow SDFGI to cover more ground, while also reducing the performance impact of SDFGI updates.
*
* **Note:** This property is linked to [member sdfgi_max_distance] and [member sdfgi_cascade0_distance]. Changing its value will automatically change those properties as well.
*/
get sdfgi_min_cell_size(): float64
set sdfgi_min_cell_size(value: float64)
/**
* **Note:** This property is linked to [member sdfgi_min_cell_size] and [member sdfgi_max_distance]. Changing its value will automatically change those properties as well.
*/
get sdfgi_cascade0_distance(): float64
set sdfgi_cascade0_distance(value: float64)
/** The maximum distance at which SDFGI is visible. Beyond this distance, environment lighting or other sources of GI such as [ReflectionProbe] will be used as a fallback.
*
* **Note:** This property is linked to [member sdfgi_min_cell_size] and [member sdfgi_cascade0_distance]. Changing its value will automatically change those properties as well.
*/
get sdfgi_max_distance(): float64
set sdfgi_max_distance(value: float64)
/** The Y scale to use for SDFGI cells. Lower values will result in SDFGI cells being packed together more closely on the Y axis. This is used to balance between quality and covering a lot of vertical ground. [member sdfgi_y_scale] should be set depending on how vertical your scene is (and how fast your camera may move on the Y axis). */
get sdfgi_y_scale(): int64
set sdfgi_y_scale(value: int64)
/** The energy multiplier to use for SDFGI. Higher values will result in brighter indirect lighting and reflections. See also [member sdfgi_bounce_feedback]. */
get sdfgi_energy(): float64
set sdfgi_energy(value: float64)
/** The normal bias to use for SDFGI probes. Increasing this value can reduce visible streaking artifacts on sloped surfaces, at the cost of increased light leaking. */
get sdfgi_normal_bias(): float64
set sdfgi_normal_bias(value: float64)
/** The constant bias to use for SDFGI probes. Increasing this value can reduce visible streaking artifacts on sloped surfaces, at the cost of increased light leaking. */
get sdfgi_probe_bias(): float64
set sdfgi_probe_bias(value: float64)
/** If `true`, the glow effect is enabled. This simulates real world eye/camera behavior where bright pixels bleed onto surrounding pixels.
*
* **Note:** When using the Mobile rendering method, glow looks different due to the lower dynamic range available in the Mobile rendering method.
*
* **Note:** When using the Compatibility rendering method, glow uses a different implementation with some properties being unavailable and hidden from the inspector: `glow_levels/*`, [member glow_normalized], [member glow_strength], [member glow_blend_mode], [member glow_mix], [member glow_map], and [member glow_map_strength]. This implementation is optimized to run on low-end devices and is less flexible as a result.
*/
get glow_enabled(): boolean
set glow_enabled(value: boolean)
/** The intensity of the 1st level of glow. This is the most "local" level (least blurry).
*
* **Note:** [member glow_levels/1] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
*/
get "glow_levels/1"(): float64
set "glow_levels/1"(value: float64)
/** The intensity of the 2nd level of glow.
*
* **Note:** [member glow_levels/2] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
*/
get "glow_levels/2"(): float64
set "glow_levels/2"(value: float64)
/** The intensity of the 3rd level of glow.
*
* **Note:** [member glow_levels/3] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
*/
get "glow_levels/3"(): float64
set "glow_levels/3"(value: float64)
/** The intensity of the 4th level of glow.
*
* **Note:** [member glow_levels/4] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
*/
get "glow_levels/4"(): float64
set "glow_levels/4"(value: float64)
/** The intensity of the 5th level of glow.
*
* **Note:** [member glow_levels/5] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
*/
get "glow_levels/5"(): float64
set "glow_levels/5"(value: float64)
/** The intensity of the 6th level of glow.
*
* **Note:** [member glow_levels/6] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
*/
get "glow_levels/6"(): float64
set "glow_levels/6"(value: float64)
/** The intensity of the 7th level of glow. This is the most "global" level (blurriest).
*
* **Note:** [member glow_levels/7] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
*/
get "glow_levels/7"(): float64
set "glow_levels/7"(value: float64)
/** If `true`, glow levels will be normalized so that summed together their intensities equal `1.0`.
*
* **Note:** [member glow_normalized] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
*/
get glow_normalized(): boolean
set glow_normalized(value: boolean)
/** The overall brightness multiplier of the glow effect. When using the Mobile rendering method (which only supports a lower dynamic range up to `2.0`), this should be increased to `1.5` to compensate. */
get glow_intensity(): float64
set glow_intensity(value: float64)
/** The strength of the glow effect. This applies as the glow is blurred across the screen and increases the distance and intensity of the blur. When using the Mobile rendering method, this should be increased to compensate for the lower dynamic range.
*
* **Note:** [member glow_strength] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
*/
get glow_strength(): float64
set glow_strength(value: float64)
/** When using the [constant GLOW_BLEND_MODE_MIX] [member glow_blend_mode], this controls how much the source image is blended with the glow layer. A value of `0.0` makes the glow rendering invisible, while a value of `1.0` is equivalent to [constant GLOW_BLEND_MODE_REPLACE].
*
* **Note:** [member glow_mix] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
*/
get glow_mix(): float64
set glow_mix(value: float64)
/** The bloom's intensity. If set to a value higher than `0`, this will make glow visible in areas darker than the [member glow_hdr_threshold]. */
get glow_bloom(): float64
set glow_bloom(value: float64)
/** The glow blending mode.
*
* **Note:** [member glow_blend_mode] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
*/
get glow_blend_mode(): int64
set glow_blend_mode(value: int64)
/** The lower threshold of the HDR glow. When using the Mobile rendering method (which only supports a lower dynamic range up to `2.0`), this may need to be below `1.0` for glow to be visible. A value of `0.9` works well in this case. This value also needs to be decreased below `1.0` when using glow in 2D, as 2D rendering is performed in SDR. */
get glow_hdr_threshold(): float64
set glow_hdr_threshold(value: float64)
/** The bleed scale of the HDR glow. */
get glow_hdr_scale(): float64
set glow_hdr_scale(value: float64)
/** The higher threshold of the HDR glow. Areas brighter than this threshold will be clamped for the purposes of the glow effect. */
get glow_hdr_luminance_cap(): float64
set glow_hdr_luminance_cap(value: float64)
/** How strong of an influence the [member glow_map] should have on the overall glow effect. A strength of `0.0` means the glow map has no influence, while a strength of `1.0` means the glow map has full influence.
*
* **Note:** If the glow map has black areas, a value of `1.0` can also turn off the glow effect entirely in specific areas of the screen.
*
* **Note:** [member glow_map_strength] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
*/
get glow_map_strength(): float64
set glow_map_strength(value: float64)
/** The texture that should be used as a glow map to *multiply* the resulting glow color according to [member glow_map_strength]. This can be used to create a "lens dirt" effect. The texture's RGB color channels are used for modulation, but the alpha channel is ignored.
*
* **Note:** The texture will be stretched to fit the screen. Therefore, it's recommended to use a texture with an aspect ratio that matches your project's base aspect ratio (typically 16:9).
*
* **Note:** [member glow_map] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
*/
get glow_map(): Texture2D
set glow_map(value: Texture2D)
/** If `true`, fog effects are enabled. */
get fog_enabled(): boolean
set fog_enabled(value: boolean)
/** The fog mode. See [enum FogMode] for possible values. */
get fog_mode(): int64
set fog_mode(value: int64)
/** The fog's color. */
get fog_light_color(): Color
set fog_light_color(value: Color)
/** The fog's brightness. Higher values result in brighter fog. */
get fog_light_energy(): float64
set fog_light_energy(value: float64)
/** If set above `0.0`, renders the scene's directional light(s) in the fog color depending on the view angle. This can be used to give the impression that the sun is "piercing" through the fog. */
get fog_sun_scatter(): float64
set fog_sun_scatter(value: float64)
/** The fog density to be used. This is demonstrated in different ways depending on the [member fog_mode] mode chosen:
* **Exponential Fog Mode:** Higher values result in denser fog. The fog rendering is exponential like in real life.
* **Depth Fog mode:** The maximum intensity of the deep fog, effect will appear in the distance (relative to the camera). At `1.0` the fog will fully obscure the scene, at `0.0` the fog will not be visible.
*/
get fog_density(): float64
set fog_density(value: float64)
/** If set above `0.0` (exclusive), blends between the fog's color and the color of the background [Sky], as read from the radiance cubemap. This has a small performance cost when set above `0.0`. Must have [member background_mode] set to [constant BG_SKY].
* This is useful to simulate [url=https://en.wikipedia.org/wiki/Aerial_perspective]aerial perspective[/url] in large scenes with low density fog. However, it is not very useful for high-density fog, as the sky will shine through. When set to `1.0`, the fog color comes completely from the [Sky]. If set to `0.0`, aerial perspective is disabled.
* Notice that this does not sample the [Sky] directly, but rather the radiance cubemap. The cubemap is sampled at a mipmap level depending on the depth of the rendered pixel; the farther away, the higher the resolution of the sampled mipmap. This results in the actual color being a blurred version of the sky, with more blur closer to the camera. The highest mipmap resolution is used at a depth of [member Camera3D.far].
*/
get fog_aerial_perspective(): float64
set fog_aerial_perspective(value: float64)
/** The factor to use when affecting the sky with non-volumetric fog. `1.0` means that fog can fully obscure the sky. Lower values reduce the impact of fog on sky rendering, with `0.0` not affecting sky rendering at all.
*
* **Note:** [member fog_sky_affect] has no visual effect if [member fog_aerial_perspective] is `1.0`.
*/
get fog_sky_affect(): float64
set fog_sky_affect(value: float64)
/** The height at which the height fog effect begins. */
get fog_height(): float64
set fog_height(value: float64)
/** The density used to increase fog as height decreases. To make fog increase as height increases, use a negative value. */
get fog_height_density(): float64
set fog_height_density(value: float64)
/** The fog depth's intensity curve. A number of presets are available in the Inspector by right-clicking the curve. Only available when [member fog_mode] is set to [constant FOG_MODE_DEPTH]. */
get fog_depth_curve(): float64
set fog_depth_curve(value: float64)
/** The fog's depth starting distance from the camera. Only available when [member fog_mode] is set to [constant FOG_MODE_DEPTH]. */
get fog_depth_begin(): float64
set fog_depth_begin(value: float64)
/** The fog's depth end distance from the camera. If this value is set to `0`, it will be equal to the current camera's [member Camera3D.far] value. Only available when [member fog_mode] is set to [constant FOG_MODE_DEPTH]. */
get fog_depth_end(): float64
set fog_depth_end(value: float64)
/** Enables the volumetric fog effect. Volumetric fog uses a screen-aligned froxel buffer to calculate accurate volumetric scattering in the short to medium range. Volumetric fog interacts with [FogVolume]s and lights to calculate localized and global fog. Volumetric fog uses a PBR single-scattering model based on extinction, scattering, and emission which it exposes to users as density, albedo, and emission.
*
* **Note:** Volumetric fog is only supported in the Forward+ rendering method, not Mobile or Compatibility.
*/
get volumetric_fog_enabled(): boolean
set volumetric_fog_enabled(value: boolean)
/** The base *exponential* density of the volumetric fog. Set this to the lowest density you want to have globally. [FogVolume]s can be used to add to or subtract from this density in specific areas. Fog rendering is exponential as in real life.
* A value of `0.0` disables global volumetric fog while allowing [FogVolume]s to display volumetric fog in specific areas.
* To make volumetric fog work as a volumetric *lighting* solution, set [member volumetric_fog_density] to the lowest non-zero value (`0.0001`) then increase lights' [member Light3D.light_volumetric_fog_energy] to values between `10000` and `100000` to compensate for the very low density.
*/
get volumetric_fog_density(): float64
set volumetric_fog_density(value: float64)
/** The [Color] of the volumetric fog when interacting with lights. Mist and fog have an albedo close to `Color(1, 1, 1, 1)` while smoke has a darker albedo. */
get volumetric_fog_albedo(): Color
set volumetric_fog_albedo(value: Color)
/** The emitted light from the volumetric fog. Even with emission, volumetric fog will not cast light onto other surfaces. Emission is useful to establish an ambient color. As the volumetric fog effect uses single-scattering only, fog tends to need a little bit of emission to soften the harsh shadows. */
get volumetric_fog_emission(): Color
set volumetric_fog_emission(value: Color)
/** The brightness of the emitted light from the volumetric fog. */
get volumetric_fog_emission_energy(): float64
set volumetric_fog_emission_energy(value: float64)
/** Scales the strength of Global Illumination used in the volumetric fog's albedo color. A value of `0.0` means that Global Illumination will not impact the volumetric fog. [member volumetric_fog_gi_inject] has a small performance cost when set above `0.0`.
*
* **Note:** This has no visible effect if [member volumetric_fog_density] is `0.0` or if [member volumetric_fog_albedo] is a fully black color.
*
* **Note:** Only [VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) are taken into account when using [member volumetric_fog_gi_inject]. Global illumination from [LightmapGI], [ReflectionProbe] and SSIL (see [member ssil_enabled]) will be ignored by volumetric fog.
*/
get volumetric_fog_gi_inject(): float64
set volumetric_fog_gi_inject(value: float64)
/** The direction of scattered light as it goes through the volumetric fog. A value close to `1.0` means almost all light is scattered forward. A value close to `0.0` means light is scattered equally in all directions. A value close to `-1.0` means light is scattered mostly backward. Fog and mist scatter light slightly forward, while smoke scatters light equally in all directions. */
get volumetric_fog_anisotropy(): float64
set volumetric_fog_anisotropy(value: float64)
/** The distance over which the volumetric fog is computed. Increase to compute fog over a greater range, decrease to add more detail when a long range is not needed. For best quality fog, keep this as low as possible. See also [member ProjectSettings.rendering/environment/volumetric_fog/volume_depth]. */
get volumetric_fog_length(): float64
set volumetric_fog_length(value: float64)
/** The distribution of size down the length of the froxel buffer. A higher value compresses the froxels closer to the camera and places more detail closer to the camera. */
get volumetric_fog_detail_spread(): float64
set volumetric_fog_detail_spread(value: float64)
/** Scales the strength of ambient light used in the volumetric fog. A value of `0.0` means that ambient light will not impact the volumetric fog. [member volumetric_fog_ambient_inject] has a small performance cost when set above `0.0`.
*
* **Note:** This has no visible effect if [member volumetric_fog_density] is `0.0` or if [member volumetric_fog_albedo] is a fully black color.
*/
get volumetric_fog_ambient_inject(): float64
set volumetric_fog_ambient_inject(value: float64)
/** The factor to use when affecting the sky with volumetric fog. `1.0` means that volumetric fog can fully obscure the sky. Lower values reduce the impact of volumetric fog on sky rendering, with `0.0` not affecting sky rendering at all.
*
* **Note:** [member volumetric_fog_sky_affect] also affects [FogVolume]s, even if [member volumetric_fog_density] is `0.0`. If you notice [FogVolume]s are disappearing when looking towards the sky, set [member volumetric_fog_sky_affect] to `1.0`.
*/
get volumetric_fog_sky_affect(): float64
set volumetric_fog_sky_affect(value: float64)
/** Enables temporal reprojection in the volumetric fog. Temporal reprojection blends the current frame's volumetric fog with the last frame's volumetric fog to smooth out jagged edges. The performance cost is minimal; however, it leads to moving [FogVolume]s and [Light3D]s "ghosting" and leaving a trail behind them. When temporal reprojection is enabled, try to avoid moving [FogVolume]s or [Light3D]s too fast. Short-lived dynamic lighting effects should have [member Light3D.light_volumetric_fog_energy] set to `0.0` to avoid ghosting. */
get volumetric_fog_temporal_reprojection_enabled(): boolean
set volumetric_fog_temporal_reprojection_enabled(value: boolean)
/** The amount by which to blend the last frame with the current frame. A higher number results in smoother volumetric fog, but makes "ghosting" much worse. A lower value reduces ghosting but can result in the per-frame temporal jitter becoming visible. */
get volumetric_fog_temporal_reprojection_amount(): float64
set volumetric_fog_temporal_reprojection_amount(value: float64)
/** If `true`, enables the `adjustment_*` properties provided by this resource. If `false`, modifications to the `adjustment_*` properties will have no effect on the rendered scene. */
get adjustment_enabled(): boolean
set adjustment_enabled(value: boolean)
/** The global brightness value of the rendered scene. Effective only if [member adjustment_enabled] is `true`. */
get adjustment_brightness(): float64
set adjustment_brightness(value: float64)
/** The global contrast value of the rendered scene (default value is 1). Effective only if [member adjustment_enabled] is `true`. */
get adjustment_contrast(): float64
set adjustment_contrast(value: float64)
/** The global color saturation value of the rendered scene (default value is 1). Effective only if [member adjustment_enabled] is `true`. */
get adjustment_saturation(): float64
set adjustment_saturation(value: float64)
/** The [Texture2D] or [Texture3D] lookup table (LUT) to use for the built-in post-process color grading. Can use a [GradientTexture1D] for a 1-dimensional LUT, or a [Texture3D] for a more complex LUT. Effective only if [member adjustment_enabled] is `true`. */
get adjustment_color_correction(): Texture2D | Texture3D
set adjustment_color_correction(value: Texture2D | Texture3D)
}
class EventListenerLineEdit = Record> extends LineEdit {
constructor(identifier?: any)
readonly event_changed: Signal1
}
class ExportTemplateManager = Record> extends AcceptDialog {
constructor(identifier?: any)
}
/** A class that stores an expression you can execute.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_expression.html
*/
class Expression extends RefCounted {
constructor(identifier?: any)
/** Parses the expression and returns an [enum Error] code.
* You can optionally specify names of variables that may appear in the expression with [param input_names], so that you can bind them when it gets executed.
*/
parse(expression: string, input_names: PackedStringArray | string[] = []): GError
/** Executes the expression that was previously parsed by [method parse] and returns the result. Before you use the returned object, you should check if the method failed by calling [method has_execute_failed].
* If you defined input variables in [method parse], you can specify their values in the inputs array, in the same order.
*/
execute(inputs: GArray = [], base_instance: Object = undefined, show_error: boolean = true, const_calls_only: boolean = false): any
/** Returns `true` if [method execute] has failed. */
has_execute_failed(): boolean
/** Returns the error text if [method parse] or [method execute] has failed. */
get_error_text(): string
}
/** Texture which displays the content of an external buffer.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_externaltexture.html
*/
class ExternalTexture extends Texture2D {
constructor(identifier?: any)
/** Returns the external texture ID.
* Depending on your use case, you may need to pass this to platform APIs, for example, when creating an `android.graphics.SurfaceTexture` on Android.
*/
get_external_texture_id(): int64
/** Sets the external buffer ID.
* Depending on your use case, you may need to call this with data received from a platform API, for example, `SurfaceTexture.getHardwareBuffer()` on Android.
*/
set_external_buffer_id(external_buffer_id: int64): void
/** External texture size. */
get size(): Vector2
set size(value: Vector2)
}
/** Handles FBX documents.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_fbxdocument.html
*/
class FBXDocument extends GLTFDocument {
constructor(identifier?: any)
}
class FBXImporterManager = Record> extends ConfirmationDialog {
constructor(identifier?: any)
}
/** @link https://docs.godotengine.org/en/4.4/classes/class_fbxstate.html */
class FBXState extends GLTFState {
constructor(identifier?: any)
/** If `true`, the import process used auxiliary nodes called geometry helper nodes. These nodes help preserve the pivots and transformations of the original 3D model during import. */
get allow_geometry_helper_nodes(): boolean
set allow_geometry_helper_nodes(value: boolean)
}
namespace FastNoiseLite {
enum NoiseType {
/** A lattice of points are assigned random values then interpolated based on neighboring values. */
TYPE_VALUE = 5,
/** Similar to Value noise, but slower. Has more variance in peaks and valleys.
* Cubic noise can be used to avoid certain artifacts when using value noise to create a bumpmap. In general, you should always use this mode if the value noise is being used for a heightmap or bumpmap.
*/
TYPE_VALUE_CUBIC = 4,
/** A lattice of random gradients. Their dot products are interpolated to obtain values in between the lattices. */
TYPE_PERLIN = 3,
/** Cellular includes both Worley noise and Voronoi diagrams which creates various regions of the same value. */
TYPE_CELLULAR = 2,
/** As opposed to [constant TYPE_PERLIN], gradients exist in a simplex lattice rather than a grid lattice, avoiding directional artifacts. Internally uses FastNoiseLite's OpenSimplex2 noise type. */
TYPE_SIMPLEX = 0,
/** Modified, higher quality version of [constant TYPE_SIMPLEX], but slower. Internally uses FastNoiseLite's OpenSimplex2S noise type. */
TYPE_SIMPLEX_SMOOTH = 1,
}
enum FractalType {
/** No fractal noise. */
FRACTAL_NONE = 0,
/** Method using Fractional Brownian Motion to combine octaves into a fractal. */
FRACTAL_FBM = 1,
/** Method of combining octaves into a fractal resulting in a "ridged" look. */
FRACTAL_RIDGED = 2,
/** Method of combining octaves into a fractal with a ping pong effect. */
FRACTAL_PING_PONG = 3,
}
enum CellularDistanceFunction {
/** Euclidean distance to the nearest point. */
DISTANCE_EUCLIDEAN = 0,
/** Squared Euclidean distance to the nearest point. */
DISTANCE_EUCLIDEAN_SQUARED = 1,
/** Manhattan distance (taxicab metric) to the nearest point. */
DISTANCE_MANHATTAN = 2,
/** Blend of [constant DISTANCE_EUCLIDEAN] and [constant DISTANCE_MANHATTAN] to give curved cell boundaries. */
DISTANCE_HYBRID = 3,
}
enum CellularReturnType {
/** The cellular distance function will return the same value for all points within a cell. */
RETURN_CELL_VALUE = 0,
/** The cellular distance function will return a value determined by the distance to the nearest point. */
RETURN_DISTANCE = 1,
/** The cellular distance function returns the distance to the second-nearest point. */
RETURN_DISTANCE2 = 2,
/** The distance to the nearest point is added to the distance to the second-nearest point. */
RETURN_DISTANCE2_ADD = 3,
/** The distance to the nearest point is subtracted from the distance to the second-nearest point. */
RETURN_DISTANCE2_SUB = 4,
/** The distance to the nearest point is multiplied with the distance to the second-nearest point. */
RETURN_DISTANCE2_MUL = 5,
/** The distance to the nearest point is divided by the distance to the second-nearest point. */
RETURN_DISTANCE2_DIV = 6,
}
enum DomainWarpType {
/** The domain is warped using the simplex noise algorithm. */
DOMAIN_WARP_SIMPLEX = 0,
/** The domain is warped using a simplified version of the simplex noise algorithm. */
DOMAIN_WARP_SIMPLEX_REDUCED = 1,
/** The domain is warped using a simple noise grid (not as smooth as the other methods, but more performant). */
DOMAIN_WARP_BASIC_GRID = 2,
}
enum DomainWarpFractalType {
/** No fractal noise for warping the space. */
DOMAIN_WARP_FRACTAL_NONE = 0,
/** Warping the space progressively, octave for octave, resulting in a more "liquified" distortion. */
DOMAIN_WARP_FRACTAL_PROGRESSIVE = 1,
/** Warping the space independently for each octave, resulting in a more chaotic distortion. */
DOMAIN_WARP_FRACTAL_INDEPENDENT = 2,
}
}
/** Generates noise using the FastNoiseLite library.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_fastnoiselite.html
*/
class FastNoiseLite extends Noise {
constructor(identifier?: any)
_changed(): void
/** The noise algorithm used. See [enum NoiseType]. */
get noise_type(): int64
set noise_type(value: int64)
/** The random number seed for all noise types. */
get seed(): int64
set seed(value: int64)
/** The frequency for all noise types. Low frequency results in smooth noise while high frequency results in rougher, more granular noise. */
get frequency(): float64
set frequency(value: float64)
/** Translate the noise input coordinates by the given [Vector3]. */
get offset(): Vector3
set offset(value: Vector3)
/** The method for combining octaves into a fractal. See [enum FractalType]. */
get fractal_type(): int64
set fractal_type(value: int64)
/** The number of noise layers that are sampled to get the final value for fractal noise types. */
get fractal_octaves(): int64
set fractal_octaves(value: int64)
/** Frequency multiplier between subsequent octaves. Increasing this value results in higher octaves producing noise with finer details and a rougher appearance. */
get fractal_lacunarity(): float64
set fractal_lacunarity(value: float64)
/** Determines the strength of each subsequent layer of noise in fractal noise.
* A low value places more emphasis on the lower frequency base layers, while a high value puts more emphasis on the higher frequency layers.
*/
get fractal_gain(): float64
set fractal_gain(value: float64)
/** Higher weighting means higher octaves have less impact if lower octaves have a large impact. */
get fractal_weighted_strength(): float64
set fractal_weighted_strength(value: float64)
/** Sets the strength of the fractal ping pong type. */
get fractal_ping_pong_strength(): float64
set fractal_ping_pong_strength(value: float64)
/** Determines how the distance to the nearest/second-nearest point is computed. See [enum CellularDistanceFunction] for options. */
get cellular_distance_function(): int64
set cellular_distance_function(value: int64)
/** Maximum distance a point can move off of its grid position. Set to `0` for an even grid. */
get cellular_jitter(): float64
set cellular_jitter(value: float64)
/** Return type from cellular noise calculations. See [enum CellularReturnType]. */
get cellular_return_type(): int64
set cellular_return_type(value: int64)
/** If enabled, another FastNoiseLite instance is used to warp the space, resulting in a distortion of the noise. */
get domain_warp_enabled(): boolean
set domain_warp_enabled(value: boolean)
/** Sets the warp algorithm. See [enum DomainWarpType]. */
get domain_warp_type(): int64
set domain_warp_type(value: int64)
/** Sets the maximum warp distance from the origin. */
get domain_warp_amplitude(): float64
set domain_warp_amplitude(value: float64)
/** Frequency of the noise which warps the space. Low frequency results in smooth noise while high frequency results in rougher, more granular noise. */
get domain_warp_frequency(): float64
set domain_warp_frequency(value: float64)
/** The method for combining octaves into a fractal which is used to warp the space. See [enum DomainWarpFractalType]. */
get domain_warp_fractal_type(): int64
set domain_warp_fractal_type(value: int64)
/** The number of noise layers that are sampled to get the final value for the fractal noise which warps the space. */
get domain_warp_fractal_octaves(): int64
set domain_warp_fractal_octaves(value: int64)
/** Octave lacunarity of the fractal noise which warps the space. Increasing this value results in higher octaves producing noise with finer details and a rougher appearance. */
get domain_warp_fractal_lacunarity(): float64
set domain_warp_fractal_lacunarity(value: float64)
/** Determines the strength of each subsequent layer of the noise which is used to warp the space.
* A low value places more emphasis on the lower frequency base layers, while a high value puts more emphasis on the higher frequency layers.
*/
get domain_warp_fractal_gain(): float64
set domain_warp_fractal_gain(value: float64)
}
namespace FileAccess {
enum ModeFlags {
/** Opens the file for read operations. The cursor is positioned at the beginning of the file. */
READ = 1,
/** Opens the file for write operations. The file is created if it does not exist, and truncated if it does.
*
* **Note:** When creating a file it must be in an already existing directory. To recursively create directories for a file path, see [method DirAccess.make_dir_recursive].
*/
WRITE = 2,
/** Opens the file for read and write operations. Does not truncate the file. The cursor is positioned at the beginning of the file. */
READ_WRITE = 3,
/** Opens the file for read and write operations. The file is created if it does not exist, and truncated if it does. The cursor is positioned at the beginning of the file.
*
* **Note:** When creating a file it must be in an already existing directory. To recursively create directories for a file path, see [method DirAccess.make_dir_recursive].
*/
WRITE_READ = 7,
}
enum CompressionMode {
/** Uses the [url=https://fastlz.org/]FastLZ[/url] compression method. */
COMPRESSION_FASTLZ = 0,
/** Uses the [url=https://en.wikipedia.org/wiki/DEFLATE]DEFLATE[/url] compression method. */
COMPRESSION_DEFLATE = 1,
/** Uses the [url=https://facebook.github.io/zstd/]Zstandard[/url] compression method. */
COMPRESSION_ZSTD = 2,
/** Uses the [url=https://www.gzip.org/]gzip[/url] compression method. */
COMPRESSION_GZIP = 3,
/** Uses the [url=https://github.com/google/brotli]brotli[/url] compression method (only decompression is supported). */
COMPRESSION_BROTLI = 4,
}
enum UnixPermissionFlags {
/** Read for owner bit. */
UNIX_READ_OWNER = 256,
/** Write for owner bit. */
UNIX_WRITE_OWNER = 128,
/** Execute for owner bit. */
UNIX_EXECUTE_OWNER = 64,
/** Read for group bit. */
UNIX_READ_GROUP = 32,
/** Write for group bit. */
UNIX_WRITE_GROUP = 16,
/** Execute for group bit. */
UNIX_EXECUTE_GROUP = 8,
/** Read for other bit. */
UNIX_READ_OTHER = 4,
/** Write for other bit. */
UNIX_WRITE_OTHER = 2,
/** Execute for other bit. */
UNIX_EXECUTE_OTHER = 1,
/** Set user id on execution bit. */
UNIX_SET_USER_ID = 2048,
/** Set group id on execution bit. */
UNIX_SET_GROUP_ID = 1024,
/** Restricted deletion (sticky) bit. */
UNIX_RESTRICTED_DELETE = 512,
}
}
/** Provides methods for file reading and writing operations.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_fileaccess.html
*/
class FileAccess extends RefCounted {
constructor(identifier?: any)
/** Creates a new [FileAccess] object and opens the file for writing or reading, depending on the flags.
* Returns `null` if opening the file failed. You can use [method get_open_error] to check the error that occurred.
*/
static open(path: string, flags: FileAccess.ModeFlags): FileAccess
/** Creates a new [FileAccess] object and opens an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it.
*
* **Note:** The provided key must be 32 bytes long.
* Returns `null` if opening the file failed. You can use [method get_open_error] to check the error that occurred.
*/
static open_encrypted(path: string, mode_flags: FileAccess.ModeFlags, key: PackedByteArray | byte[] | ArrayBuffer, iv: PackedByteArray | byte[] | ArrayBuffer = []): FileAccess
/** Creates a new [FileAccess] object and opens an encrypted file in write or read mode. You need to pass a password to encrypt/decrypt it.
* Returns `null` if opening the file failed. You can use [method get_open_error] to check the error that occurred.
*/
static open_encrypted_with_pass(path: string, mode_flags: FileAccess.ModeFlags, pass: string): FileAccess
/** Creates a new [FileAccess] object and opens a compressed file for reading or writing.
*
* **Note:** [method open_compressed] can only read files that were saved by Godot, not third-party compression formats. See [url=https://github.com/godotengine/godot/issues/28999]GitHub issue #28999[/url] for a workaround.
* Returns `null` if opening the file failed. You can use [method get_open_error] to check the error that occurred.
*/
static open_compressed(path: string, mode_flags: FileAccess.ModeFlags, compression_mode: FileAccess.CompressionMode = 0): FileAccess
/** Returns the result of the last [method open] call in the current thread. */
static get_open_error(): GError
/** Creates a temporary file. This file will be freed when the returned [FileAccess] is freed.
* If [param prefix] is not empty, it will be prefixed to the file name, separated by a `-`.
* If [param extension] is not empty, it will be appended to the temporary file name.
* If [param keep] is `true`, the file is not deleted when the returned [FileAccess] is freed.
* Returns `null` if opening the file failed. You can use [method get_open_error] to check the error that occurred.
*/
static create_temp(mode_flags: int64, prefix: string = '', extension: string = '', keep: boolean = false): FileAccess
/** Returns the whole [param path] file contents as a [PackedByteArray] without any decoding.
* Returns an empty [PackedByteArray] if an error occurred while opening the file. You can use [method get_open_error] to check the error that occurred.
*/
static get_file_as_bytes(path: string): PackedByteArray
/** Returns the whole [param path] file contents as a [String]. Text is interpreted as being UTF-8 encoded.
* Returns an empty [String] if an error occurred while opening the file. You can use [method get_open_error] to check the error that occurred.
*/
static get_file_as_string(path: string): string
/** Resizes the file to a specified length. The file must be open in a mode that permits writing. If the file is extended, NUL characters are appended. If the file is truncated, all data from the end file to the original length of the file is lost. */
resize(length: int64): GError
/** Writes the file's buffer to disk. Flushing is automatically performed when the file is closed. This means you don't need to call [method flush] manually before closing a file. Still, calling [method flush] can be used to ensure the data is safe even if the project crashes instead of being closed gracefully.
*
* **Note:** Only call [method flush] when you actually need it. Otherwise, it will decrease performance due to constant disk writes.
*/
flush(): void
/** Returns the path as a [String] for the current open file. */
get_path(): string
/** Returns the absolute path as a [String] for the current open file. */
get_path_absolute(): string
/** Returns `true` if the file is currently opened. */
is_open(): boolean
/** Changes the file reading/writing cursor to the specified position (in bytes from the beginning of the file). */
seek(position: int64): void
/** Changes the file reading/writing cursor to the specified position (in bytes from the end of the file).
*
* **Note:** This is an offset, so you should use negative numbers or the cursor will be at the end of the file.
*/
seek_end(position: int64 = 0): void
/** Returns the file cursor's position. */
get_position(): int64
/** Returns the size of the file in bytes. For a pipe, returns the number of bytes available for reading from the pipe. */
get_length(): int64
/** Returns `true` if the file cursor has already read past the end of the file.
*
* **Note:** `eof_reached() == false` cannot be used to check whether there is more data available. To loop while there is more data available, use:
*
*/
eof_reached(): boolean
/** Returns the next 8 bits from the file as an integer. See [method store_8] for details on what values can be stored and retrieved this way. */
get_8(): int64
/** Returns the next 16 bits from the file as an integer. See [method store_16] for details on what values can be stored and retrieved this way. */
get_16(): int64
/** Returns the next 32 bits from the file as an integer. See [method store_32] for details on what values can be stored and retrieved this way. */
get_32(): int64
/** Returns the next 64 bits from the file as an integer. See [method store_64] for details on what values can be stored and retrieved this way. */
get_64(): int64
/** Returns the next 16 bits from the file as a half-precision floating-point number. */
get_half(): float64
/** Returns the next 32 bits from the file as a floating-point number. */
get_float(): float64
/** Returns the next 64 bits from the file as a floating-point number. */
get_double(): float64
/** Returns the next bits from the file as a floating-point number. */
get_real(): float64
/** Returns next [param length] bytes of the file as a [PackedByteArray]. */
get_buffer(length: int64): PackedByteArray
/** Returns the next line of the file as a [String]. The returned string doesn't include newline (`\n`) or carriage return (`\r`) characters, but does include any other leading or trailing whitespace.
* Text is interpreted as being UTF-8 encoded.
*/
get_line(): string
/** Returns the next value of the file in CSV (Comma-Separated Values) format. You can pass a different delimiter [param delim] to use other than the default `","` (comma). This delimiter must be one-character long, and cannot be a double quotation mark.
* Text is interpreted as being UTF-8 encoded. Text values must be enclosed in double quotes if they include the delimiter character. Double quotes within a text value can be escaped by doubling their occurrence.
* For example, the following CSV lines are valid and will be properly parsed as two strings each:
* [codeblock lang=text]
* Alice,"Hello, Bob!"
* Bob,Alice! What a surprise!
* Alice,"I thought you'd reply with ""Hello, world""."
* [/codeblock]
* Note how the second line can omit the enclosing quotes as it does not include the delimiter. However it *could* very well use quotes, it was only written without for demonstration purposes. The third line must use `""` for each quotation mark that needs to be interpreted as such instead of the end of a text value.
*/
get_csv_line(delim: string = ','): PackedStringArray
/** Returns the whole file as a [String]. Text is interpreted as being UTF-8 encoded.
* If [param skip_cr] is `true`, carriage return characters (`\r`, CR) will be ignored when parsing the UTF-8, so that only line feed characters (`\n`, LF) represent a new line (Unix convention).
*/
get_as_text(skip_cr: boolean = false): string
/** Returns an MD5 String representing the file at the given path or an empty [String] on failure. */
static get_md5(path: string): string
/** Returns an SHA-256 [String] representing the file at the given path or an empty [String] on failure. */
static get_sha256(path: string): string
/** Returns the last error that happened when trying to perform operations. Compare with the `ERR_FILE_*` constants from [enum Error]. */
get_error(): GError
/** Returns the next [Variant] value from the file. If [param allow_objects] is `true`, decoding objects is allowed.
* Internally, this uses the same decoding mechanism as the [method @GlobalScope.bytes_to_var] method.
* **Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.
*/
get_var(allow_objects: boolean = false): any
/** Stores an integer as 8 bits in the file.
*
* **Note:** The [param value] should lie in the interval `[0, 255]`. Any other value will overflow and wrap around.
*
* **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate.
* To store a signed integer, use [method store_64], or convert it manually (see [method store_16] for an example).
*/
store_8(value: int64): boolean
/** Stores an integer as 16 bits in the file.
*
* **Note:** The [param value] should lie in the interval `[0, 2^16 - 1]`. Any other value will overflow and wrap around.
*
* **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate.
* To store a signed integer, use [method store_64] or store a signed integer from the interval `[-2^15, 2^15 - 1]` (i.e. keeping one bit for the signedness) and compute its sign manually when reading. For example:
*
*/
store_16(value: int64): boolean
/** Stores an integer as 32 bits in the file.
*
* **Note:** The [param value] should lie in the interval `[0, 2^32 - 1]`. Any other value will overflow and wrap around.
*
* **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate.
* To store a signed integer, use [method store_64], or convert it manually (see [method store_16] for an example).
*/
store_32(value: int64): boolean
/** Stores an integer as 64 bits in the file.
*
* **Note:** The [param value] must lie in the interval `[-2^63, 2^63 - 1]` (i.e. be a valid [int] value).
*
* **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate.
*/
store_64(value: int64): boolean
/** Stores a half-precision floating-point number as 16 bits in the file. */
store_half(value: float64): boolean
/** Stores a floating-point number as 32 bits in the file.
*
* **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate.
*/
store_float(value: float64): boolean
/** Stores a floating-point number as 64 bits in the file.
*
* **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate.
*/
store_double(value: float64): boolean
/** Stores a floating-point number in the file.
*
* **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate.
*/
store_real(value: float64): boolean
/** Stores the given array of bytes in the file.
*
* **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate.
*/
store_buffer(buffer: PackedByteArray | byte[] | ArrayBuffer): boolean
/** Stores [param line] in the file followed by a newline character (`\n`), encoding the text as UTF-8.
*
* **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate.
*/
store_line(line: string): boolean
/** Store the given [PackedStringArray] in the file as a line formatted in the CSV (Comma-Separated Values) format. You can pass a different delimiter [param delim] to use other than the default `","` (comma). This delimiter must be one-character long.
* Text will be encoded as UTF-8.
*
* **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate.
*/
store_csv_line(values: PackedStringArray | string[], delim: string = ','): boolean
/** Stores [param string] in the file without a newline character (`\n`), encoding the text as UTF-8.
*
* **Note:** This method is intended to be used to write text files. The string is stored as a UTF-8 encoded buffer without string length or terminating zero, which means that it can't be loaded back easily. If you want to store a retrievable string in a binary file, consider using [method store_pascal_string] instead. For retrieving strings from a text file, you can use `get_buffer(length).get_string_from_utf8()` (if you know the length) or [method get_as_text].
*
* **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate.
*/
store_string(string_: string): boolean
/** Stores any Variant value in the file. If [param full_objects] is `true`, encoding objects is allowed (and can potentially include code).
* Internally, this uses the same encoding mechanism as the [method @GlobalScope.var_to_bytes] method.
*
* **Note:** Not all properties are included. Only properties that are configured with the [constant PROPERTY_USAGE_STORAGE] flag set will be serialized. You can add a new usage flag to a property by overriding the [method Object._get_property_list] method in your class. You can also check how property usage is configured by calling [method Object._get_property_list]. See [enum PropertyUsageFlags] for the possible usage flags.
*
* **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate.
*/
store_var(value: any, full_objects: boolean = false): boolean
/** Stores the given [String] as a line in the file in Pascal format (i.e. also store the length of the string).
* Text will be encoded as UTF-8.
*
* **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate.
*/
store_pascal_string(string_: string): boolean
/** Returns a [String] saved in Pascal format from the file.
* Text is interpreted as being UTF-8 encoded.
*/
get_pascal_string(): string
/** Closes the currently opened file and prevents subsequent read/write operations. Use [method flush] to persist the data to disk without closing the file.
*
* **Note:** [FileAccess] will automatically close when it's freed, which happens when it goes out of scope or when it gets assigned with `null`. In C# the reference must be disposed after we are done using it, this can be done with the `using` statement or calling the `Dispose` method directly.
*/
close(): void
/** Returns `true` if the file exists in the given path.
*
* **Note:** Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. See [method ResourceLoader.exists] for an alternative approach that takes resource remapping into account.
* For a non-static, relative equivalent, use [method DirAccess.file_exists].
*/
static file_exists(path: string): boolean
/** Returns the last time the [param file] was modified in Unix timestamp format, or `0` on error. This Unix timestamp can be converted to another format using the [Time] singleton. */
static get_modified_time(file: string): int64
/** Returns file UNIX permissions.
*
* **Note:** This method is implemented on iOS, Linux/BSD, and macOS.
*/
static get_unix_permissions(file: string): FileAccess.UnixPermissionFlags
/** Sets file UNIX permissions.
*
* **Note:** This method is implemented on iOS, Linux/BSD, and macOS.
*/
static set_unix_permissions(file: string, permissions: FileAccess.UnixPermissionFlags): GError
/** Returns `true`, if file `hidden` attribute is set.
*
* **Note:** This method is implemented on iOS, BSD, macOS, and Windows.
*/
static get_hidden_attribute(file: string): boolean
/** Sets file **hidden** attribute.
*
* **Note:** This method is implemented on iOS, BSD, macOS, and Windows.
*/
static set_hidden_attribute(file: string, hidden: boolean): GError
/** Sets file **read only** attribute.
*
* **Note:** This method is implemented on iOS, BSD, macOS, and Windows.
*/
static set_read_only_attribute(file: string, ro: boolean): GError
/** Returns `true`, if file `read only` attribute is set.
*
* **Note:** This method is implemented on iOS, BSD, macOS, and Windows.
*/
static get_read_only_attribute(file: string): boolean
/** If `true`, the file is read with big-endian [url=https://en.wikipedia.org/wiki/Endianness]endianness[/url]. If `false`, the file is read with little-endian endianness. If in doubt, leave this to `false` as most files are written with little-endian endianness.
*
* **Note:** [member big_endian] is only about the file format, not the CPU type. The CPU endianness doesn't affect the default endianness for files written.
*
* **Note:** This is always reset to `false` whenever you open the file. Therefore, you must set [member big_endian] *after* opening the file, not before.
*/
get big_endian(): boolean
set big_endian(value: boolean)
}
namespace FileDialog {
enum FileMode {
/** The dialog allows selecting one, and only one file. */
FILE_MODE_OPEN_FILE = 0,
/** The dialog allows selecting multiple files. */
FILE_MODE_OPEN_FILES = 1,
/** The dialog only allows selecting a directory, disallowing the selection of any file. */
FILE_MODE_OPEN_DIR = 2,
/** The dialog allows selecting one file or directory. */
FILE_MODE_OPEN_ANY = 3,
/** The dialog will warn when a file exists. */
FILE_MODE_SAVE_FILE = 4,
}
enum Access {
/** The dialog only allows accessing files under the [Resource] path (`res://`). */
ACCESS_RESOURCES = 0,
/** The dialog only allows accessing files under user data path (`user://`). */
ACCESS_USERDATA = 1,
/** The dialog allows accessing files on the whole file system. */
ACCESS_FILESYSTEM = 2,
}
}
/** A dialog for selecting files or directories in the filesystem.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_filedialog.html
*/
class FileDialog = Record> extends ConfirmationDialog {
constructor(identifier?: any)
_cancel_pressed(): void
/** Clear all the added filters in the dialog. */
clear_filters(): void
/** Adds a comma-delimited file name [param filter] option to the [FileDialog] with an optional [param description], which restricts what files can be picked.
* A [param filter] should be of the form `"filename.extension"`, where filename and extension can be `*` to match any string. Filters starting with `.` (i.e. empty filenames) are not allowed.
* For example, a [param filter] of `"*.png, *.jpg"` and a [param description] of `"Images"` results in filter text "Images (*.png, *.jpg)".
*/
add_filter(filter: string, description: string = ''): void
/** Clear the filter for file names. */
clear_filename_filter(): void
/** Returns the name of the [OptionButton] or [CheckBox] with index [param option]. */
get_option_name(option: int64): string
/** Returns an array of values of the [OptionButton] with index [param option]. */
get_option_values(option: int64): PackedStringArray
/** Returns the default value index of the [OptionButton] or [CheckBox] with index [param option]. */
get_option_default(option: int64): int64
/** Sets the name of the [OptionButton] or [CheckBox] with index [param option]. */
set_option_name(option: int64, name: string): void
/** Sets the option values of the [OptionButton] with index [param option]. */
set_option_values(option: int64, values: PackedStringArray | string[]): void
/** Sets the default value index of the [OptionButton] or [CheckBox] with index [param option]. */
set_option_default(option: int64, default_value_index: int64): void
/** Adds an additional [OptionButton] to the file dialog. If [param values] is empty, a [CheckBox] is added instead.
* [param default_value_index] should be an index of the value in the [param values]. If [param values] is empty it should be either `1` (checked), or `0` (unchecked).
*/
add_option(name: string, values: PackedStringArray | string[], default_value_index: int64): void
/** Returns a [Dictionary] with the selected values of the additional [OptionButton]s and/or [CheckBox]es. [Dictionary] keys are names and values are selected value indices. */
get_selected_options(): GDictionary
/** Returns the vertical box container of the dialog, custom controls can be added to it.
* **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
*
* **Note:** Changes to this node are ignored by native file dialogs, use [method add_option] to add custom elements to the dialog instead.
*/
get_vbox(): VBoxContainer
/** Returns the LineEdit for the selected file.
* **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
*/
get_line_edit(): LineEdit
/** Clear all currently selected items in the dialog. */
deselect_all(): void
/** Invalidate and update the current dialog content list.
*
* **Note:** This method does nothing on native file dialogs.
*/
invalidate(): void
/** If `true`, changing the [member file_mode] property will set the window title accordingly (e.g. setting [member file_mode] to [constant FILE_MODE_OPEN_FILE] will change the window title to "Open a File"). */
get mode_overrides_title(): boolean
set mode_overrides_title(value: boolean)
/** The dialog's open or save mode, which affects the selection behavior. See [enum FileMode]. */
get file_mode(): int64
set file_mode(value: int64)
/** The file system access scope. See [enum Access] constants.
* **Warning:** In Web builds, FileDialog cannot access the host file system. In sandboxed Linux and macOS environments, [member use_native_dialog] is automatically used to allow limited access to host file system.
*/
get access(): int64
set access(value: int64)
/** If non-empty, the given sub-folder will be "root" of this [FileDialog], i.e. user won't be able to go to its parent directory.
*
* **Note:** This property is ignored by native file dialogs.
*/
get root_subfolder(): string
set root_subfolder(value: string)
/** The available file type filters. Each filter string in the array should be formatted like this: `*.png,*.jpg,*.jpeg;Image Files;image/png,image/jpeg`. The description text of the filter is optional and can be omitted. Both file extensions and MIME type should be always set.
*
* **Note:** Embedded file dialog and Windows file dialog support only file extensions, while Android, Linux, and macOS file dialogs also support MIME types.
*/
get filters(): PackedStringArray
set filters(value: PackedStringArray | string[])
/** The filter for file names (case-insensitive). When set to a non-empty string, only files that contains the substring will be shown. [member filename_filter] can be edited by the user with the filter button at the top of the file dialog.
* See also [member filters], which should be used to restrict the file types that can be selected instead of [member filename_filter] which is meant to be set by the user.
*/
get filename_filter(): string
set filename_filter(value: string)
/** The number of additional [OptionButton]s and [CheckBox]es in the dialog. */
get option_count(): any /*Options,option_*/
set option_count(value: any /*Options,option_*/)
/** If `true`, the dialog will show hidden files.
*
* **Note:** This property is ignored by native file dialogs on Android and Linux.
*/
get show_hidden_files(): boolean
set show_hidden_files(value: boolean)
/** If `true`, and if supported by the current [DisplayServer], OS native dialog will be used instead of custom one.
*
* **Note:** On Android, it is only supported when using [constant ACCESS_FILESYSTEM]. For access mode [constant ACCESS_RESOURCES] and [constant ACCESS_USERDATA], the system will fall back to custom FileDialog.
*
* **Note:** On Linux and macOS, sandboxed apps always use native dialogs to access the host file system.
*
* **Note:** On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use [method OS.get_granted_permissions] to get a list of saved bookmarks.
*
* **Note:** Native dialogs are isolated from the base process, file dialog properties can't be modified once the dialog is shown.
*/
get use_native_dialog(): boolean
set use_native_dialog(value: boolean)
/** The current working directory of the file dialog.
*
* **Note:** For native file dialogs, this property is only treated as a hint and may not be respected by specific OS implementations.
*/
get current_dir(): string
set current_dir(value: string)
/** The currently selected file of the file dialog. */
get current_file(): string
set current_file(value: string)
/** The currently selected file path of the file dialog. */
get current_path(): string
set current_path(value: string)
/** Emitted when the user selects a file by double-clicking it or pressing the **OK** button. */
readonly file_selected: Signal1
/** Emitted when the user selects multiple files. */
readonly files_selected: Signal1
/** Emitted when the user selects a directory. */
readonly dir_selected: Signal1
/** Emitted when the filter for file names changes. */
readonly filename_filter_changed: Signal1
}
/** Godot editor's dock for managing files in the project.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_filesystemdock.html
*/
class FileSystemDock = Record> extends VBoxContainer {
constructor(identifier?: any)
_file_list_thumbnail_done(_unnamed_arg0: string, _unnamed_arg1: Texture2D, _unnamed_arg2: Texture2D, _unnamed_arg3: any): void
_tree_thumbnail_done(_unnamed_arg0: string, _unnamed_arg1: Texture2D, _unnamed_arg2: Texture2D, _unnamed_arg3: any): void
/** Sets the given [param path] as currently selected, ensuring that the selected file/directory is visible. */
navigate_to_path(path: string): void
/** Registers a new [EditorResourceTooltipPlugin]. */
add_resource_tooltip_plugin(plugin: EditorResourceTooltipPlugin): void
/** Removes an [EditorResourceTooltipPlugin]. Fails if the plugin wasn't previously added. */
remove_resource_tooltip_plugin(plugin: EditorResourceTooltipPlugin): void
_set_dock_horizontal(enable: boolean): void
_can_dock_horizontal(): boolean
_save_layout_to_config(_unnamed_arg0: ConfigFile, _unnamed_arg1: string): void
_load_layout_from_config(_unnamed_arg0: ConfigFile, _unnamed_arg1: string): void
/** Emitted when a new scene is created that inherits the scene at [param file] path. */
readonly inherit: Signal1
/** Emitted when the given scenes are being instantiated in the editor. */
readonly instantiate: Signal1
/** Emitted when an external [param resource] had its file removed. */
readonly resource_removed: Signal1
/** Emitted when the given [param file] was removed. */
readonly file_removed: Signal1
/** Emitted when the given [param folder] was removed. */
readonly folder_removed: Signal1
/** Emitted when a file is moved from [param old_file] path to [param new_file] path. */
readonly files_moved: Signal2
/** Emitted when a folder is moved from [param old_folder] path to [param new_folder] path. */
readonly folder_moved: Signal2
/** Emitted when folders change color. */
readonly folder_color_changed: Signal0
/** Emitted when the user switches file display mode or split mode. */
readonly display_mode_changed: Signal0
}
class FileSystemList = Record> extends ItemList {
constructor(identifier?: any)
readonly item_edited: Signal0
}
class FindInFiles = Record> extends Node {
constructor(identifier?: any)
readonly result_found: Signal5
readonly finished: Signal0
}
class FindInFilesDialog = Record> extends AcceptDialog {
constructor(identifier?: any)
readonly find_requested: Signal0
readonly replace_requested: Signal0
}
class FindInFilesPanel = Record> extends Control {
constructor(identifier?: any)
_on_result_found(_unnamed_arg0: string, _unnamed_arg1: int64, _unnamed_arg2: int64, _unnamed_arg3: int64, _unnamed_arg4: string): void
_on_finished(): void
readonly result_selected: Signal4
readonly files_modified: Signal1
readonly close_button_clicked: Signal0
}
class FindReplaceBar = Record> extends HBoxContainer {
constructor(identifier?: any)
_search_current(): boolean
readonly error: Signal0
}
namespace FlowContainer {
enum AlignmentMode {
/** The child controls will be arranged at the beginning of the container, i.e. top if orientation is vertical, left if orientation is horizontal (right for RTL layout). */
ALIGNMENT_BEGIN = 0,
/** The child controls will be centered in the container. */
ALIGNMENT_CENTER = 1,
/** The child controls will be arranged at the end of the container, i.e. bottom if orientation is vertical, right if orientation is horizontal (left for RTL layout). */
ALIGNMENT_END = 2,
}
enum LastWrapAlignmentMode {
/** The last partially filled row or column will wrap aligned to the previous row or column in accordance with [member alignment]. */
LAST_WRAP_ALIGNMENT_INHERIT = 0,
/** The last partially filled row or column will wrap aligned to the beginning of the previous row or column. */
LAST_WRAP_ALIGNMENT_BEGIN = 1,
/** The last partially filled row or column will wrap aligned to the center of the previous row or column. */
LAST_WRAP_ALIGNMENT_CENTER = 2,
/** The last partially filled row or column will wrap aligned to the end of the previous row or column. */
LAST_WRAP_ALIGNMENT_END = 3,
}
}
/** A container that arranges its child controls horizontally or vertically and wraps them around at the borders.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_flowcontainer.html
*/
class FlowContainer = Record