Commit Graph

192 Commits

Author SHA1 Message Date
9cd2927fcc Move the editor's script text editor into the new code_editor module. 2023-02-17 20:57:16 +01:00
Haoyu Qiu
fb88b9813f Fix error when dropping script into script editor 2023-01-16 14:25:15 +01:00
2cd4e4d828 Renamed Set to RBSet. 2023-01-15 19:42:08 +01:00
1b0aac6028 Renamed Map to RBMap. 2023-01-15 19:12:50 +01:00
213f393293 Fix typos with codespell. 2022-12-22 19:51:25 +01:00
f668ceb512 Ported: Update the visibility logic for the spatial editor navigation controls - m4gr3d
0825859a94
2022-12-22 18:01:19 +01:00
bad1d64314 Fix compile and small cleanups after the backports. 2022-12-22 15:24:53 +01:00
Haoyu Qiu
4a51392d12 Add open scene button in Inspector for PackedScene resource 2022-12-22 14:35:00 +01:00
Anilforextra
522c324760 Enable material editor preview to be rotated.
(cherry picked from commit d4ee903004637b6ba12eef004a4d9006462c83b6)
2022-12-22 14:16:06 +01:00
94a9792d02 Rearranged ViewportNavigationControl. 2022-12-12 15:55:25 +01:00
422629c281 Bind ViewportNavigationControl::_on_mouse_entered. 2022-12-11 20:06:18 +01:00
ea67b36916 Ported: Minor tweaks/polish to the navigation controls to prevent interference:
- Reduce controls size
- Enable opacity on hover to increase visibility
- m4gr3d
f1e6ecd3b5
2022-12-11 19:30:42 +01:00
asalazar516
8c306efe22 Add missing argument to AnimationNodeBlendTreeEditor::_delete_nodes_request 2022-12-11 19:06:49 +01:00
kleonc
16b4bc25e9 Fix checking if script is attached to any node belonging to scene
(cherry picked from commit 7f7966e10aa6b193012a36751dfc9f8c570b8659)
2022-11-30 19:27:33 +01:00
kleonc
781b1915d3 SpriteFramesEditor Fix calculating frame index from mouse position
(cherry picked from commit d1359579874b747ab34bdbdb23411b5dc733a609)
2022-11-30 19:22:23 +01:00
Alfred Reinold Baudisch
1d8716a903 Cast dragged file extension name to lowercase, closes #68104
(cherry picked from commit 07e367cb0b07f02fef92420fde53e05be3d4b247)
2022-11-30 19:21:43 +01:00
bdf4922a1e Ported:
Add navigation control to the spatial editor viewport for the Android editor.
- m4gr3d
cc59e18c9b
2022-11-30 18:30:32 +01:00
aae204935b Fix compile. 2022-11-30 15:07:06 +01:00
Hendrik Brucker
b85a3cbce3 Add Gradient resource preview generator
Co-Authored-By: Haoyu Qiu <timothyqiu32@gmail.com>
2022-11-30 14:51:39 +01:00
Haoyu Qiu
7ee4ed4647 Fix wrong owner for editor plugin created nodes in instanced scene 2022-11-30 14:30:02 +01:00
3f86c49d1e Now all gozmo plugins return gizmo names properly. 2022-10-09 00:52:52 +02:00
e003437196 Get gizmo names using the proper method for the toggle popup in the SpatialEditor. 2022-10-09 00:34:31 +02:00
5a4bcf4be3 Fix errors on new scene creation. 2022-10-09 00:21:43 +02:00
Micky
042b592de5 Fix crash when ScriptEditor accesses Script with no language set 2022-10-08 16:59:54 +02:00
Michael Alexsander
6730fc8f0f Shrink shader editor's oversized borders
(cherry picked from commit c2553f530be9c137fe992d5d4521e13de92a32b2)
2022-10-08 16:21:25 +02:00
dzil123
ace2a22838 Ignore node rename if already exited blend tree
(cherry picked from commit f9bee9099457a7e582ad785f5134a86ed1f8fac5)
2022-10-08 16:20:50 +02:00
lawnjelly
41cc0cd554 Fix RayCast2DEditor uninitialized value
node was previously read before being set. Found by Valgrind.
2022-09-16 23:35:04 +02:00
Fredia Huya-Kouadio
58e935b746 Disable logic that triggers automatic focus gain as the Godot Editor is loaded
For the Godot Android Editor, this is an inconvenience as it causes the soft keyboard to show and block half of the view
2022-09-16 23:28:31 +02:00
Kongfa Waroros
1f3b5fde4e Update all AnimationTree's editors when editing
(cherry picked from commit 0f17fe642c8ec21b7877cd3f6911f22ba0874255)
2022-09-16 22:35:12 +02:00
Jummit
059d393d42 Keep Perspective menu open on selection
Makes the Perspective menu consistent with the View menu in the 3D
viewport. This allows for quicker inspection of the scene, and makes
missclicks more forgiving.

(cherry picked from commit e3ab344af9839bbe1ffa690093acd9ea7ffde554)
2022-09-16 21:19:38 +02:00
b886d14cf5 Added _3d postfix to the end of the World3D related getters and setters in Viewport. 2022-08-29 17:54:41 +02:00
24a1580dbf Renamed the files aswell. 2022-08-29 17:33:10 +02:00
e4ae7f2ebc Renamed Environment to Environment3D, and WorldEnvironment to WorldEnvironment3D. 2022-08-29 17:21:40 +02:00
2aee6ab0bb Renamed World to World3D. 2022-08-29 16:49:00 +02:00
e558e0f700 Fix build when the new skeleton 3d module is disabled. 2022-08-28 16:01:50 +02:00
dc28777321 Moved Skeleton and it's related classes to a module. 2022-08-28 15:46:12 +02:00
b9f3d3b26a Moved Skeleton2D and it's related classes into a module. 2022-08-28 13:57:25 +02:00
bfc1679f14 Actually register EditorInterface, SpatialEditor, CanvasItemEditor, and WebNodeEditor as globals. 2022-08-23 13:21:09 +02:00
bafd6d1d8d Renamed AFTER_GUI_INPUT_DESELECT to AFTER_GUI_INPUT_NO_DESELECT. 2022-08-20 01:01:18 +02:00
e2d42db711 Also renamed the files. 2022-08-19 21:24:36 +02:00
cffe742085 Renamed the VisualServer to RenderringServer like in Godot4, as I think it's a lot better name for it. I did not yet rename the files. 2022-08-19 20:50:20 +02:00
1cab11a1c1 Removed tool mode external support from the spatial editor. 2022-08-19 14:53:18 +02:00
dfe183d3e0 Ported: Use FlowContainer to handle toolbar overflow more gracefully - YuriSizov
842c3a644f
2022-08-19 14:46:00 +02:00
0438da9841 Ported: [3.x] Add ShapeCast and ShapeCast2D nodes - PrecisionRender
47a62e28ac
2022-08-19 03:12:32 +02:00
521934ff55 Ported from Godot4: New and improved IK system for Skeleton2D
This PR and commit adds a new IK system for 2D with the Skeleton2D node
that adds several new IK solvers, a way to control bones in a Skeleton2D
node similar to that in Skeleton3D. It also adds additional changes
and functionality.
This work was sponsored by GSoC 2020 and TwistedTwigleg.
Full list of changes:
* Adds a SkeletonModifier2D resource
  * This resource is the base where all IK code is written and executed
  * Has a function for clamping angles, since it is so commonly used
  * Modifiers are unique when duplicated so it works with instancing
* Adds a SkeletonModifierStack2D resource
  * This resource manages a series of SkeletonModification2Ds
  * This is what the Skeleton2D directly interfaces with to make IK possible
* Adds SkeletonModifier2D resources for LookAt, CCDIK, FABRIK, Jiggle, and TwoBoneIK
  * Each modification is in its own file
  * There is also a SkeletonModifier2D resource that acts as a stack for using multiple stacks together
* Adds a PhysicalBone2D node
  * Works similar to the PhysicalBone3D node, but uses a RigidBody2D node
* Changes to Skeleton2D listed below:
  * Skeleton2D now holds a single SkeletonModificationStack2D for IK
  * Skeleton2D now has a local_pose_override, which overrides the Bone2D position similar to how the overrides work in Skeleton3D
* Changes to Bone2D listed below:
  * The default_length property has been changed to length. Length is the length of the bone to its child bone node
  * New bone_angle property, which is the angle the bone has to its first child bone node
  * Bone2D caches its transform when not modified by IK for IK interpolation purposes
  * Bone2D draws its own editor gizmo, though this is stated to change in the future
* Changes to CanvasItemEditor listed below:
  * Bone2D gizmo drawing code removed
  * The 2D IK code is removed. Now Bone2D is the only bone system for 2D
* Transform2D now has a looking_at function for rotating to face a position
* Two new node notifications: NOTIFICATION_EDITOR_PRE_SAVE and NOTIFICATION_EDITOR_POST_SAVE
  * These notifications only are called in the editor right before and after saving a scene
  * Needed for not saving the IK position when executing IK in the editor
* Documentation for all the changes listed above.
- TwistedTwigleg
8aa3c2f091
2022-08-18 18:47:30 +02:00
4c4e19223e Added _theme_ infix to the theme helper methods in Control. 2022-08-17 20:57:16 +02:00
9757c39f05 Moved a few more core classes. 2022-08-17 17:43:49 +02:00
99e94b08c4 Moved base input related classes to core/input. 2022-08-17 17:02:24 +02:00
686663d3e4 Moved around more classes in core. 2022-08-17 16:01:01 +02:00
04feb63860 Moved Engine and projectSettings. 2022-08-17 15:35:28 +02:00
be16fe23ad Moved the error macros. 2022-08-17 15:14:19 +02:00
220b2db443 Moved String and related classes under a string folder in core. 2022-08-17 14:19:55 +02:00
dc9cc716c7 Moved Object related classes under core/object. 2022-08-17 13:45:14 +02:00
9555ee56b9 Moved Variant related classes under a variant folder in core. 2022-08-17 13:17:12 +02:00
388b88678e Moved container related classes in core under a new containers directory. 2022-08-17 12:53:49 +02:00
0d2fc2e9f2 Moved color to core/math. 2022-08-17 11:38:15 +02:00
9e1588160f Now all Variant math types are structs. 2022-08-16 22:09:26 +02:00
8c2e76840c Removed CameraMatrix, and switched to Projection. 2022-08-16 10:26:35 +02:00
220954cf08 Backported most of the improvements to String from Godot4. 2022-08-15 22:54:03 +02:00
5cd44e02d0 Backported the improvements to Transform from Godot4. 2022-08-14 20:35:11 +02:00
e4cad690a3 Renamed elements in Transform2D to columns. 2022-08-14 15:37:05 +02:00
d9a8497546 Renamed translate in Transform2D to translate_local. 2022-08-14 14:59:46 +02:00
730bce8587 Renamed Quat to Quaternion for consistency with the other engine math classes. 2022-08-13 15:22:33 +02:00
f423b30714 Backported from Godot4: Fix secondary handles in editor gizmos
Primary and secondary handles are no longer differentiated by their ids, so a bool was added to tell them apart in all the handle-related methods.
Includes a minor fix in CollisionPolygon3DEditor, unrelated to editor gizmos.
- JFonS
5ebea2d120
2022-08-12 22:21:00 +02:00
2bc7355910 Ported from Godot4: Fixes to editor subgizmos
* Fixed subgizmo editing on scaled nodes.
* Added more clarifications on the coordinate space of subgizmos.
* Given input priority to the transform gizmo over subgizmo selection.
- JFonS
d7b58ebc9c
2022-08-12 00:43:53 +02:00
4b939998a7 Removed AnimationTreePlayer, as it was deprecated (and also practically unusable). 2022-08-11 23:01:27 +02:00
92600420ba Backported from Godot4: Implemented SkeletonEditorGizmo.
-TokageItLab, lyuma
f2e9867e9f
- It still has some issues, as this one works differently than the 3.x version, they will be fixed later.
2022-08-11 17:31:02 +02:00
aebf3ecc9d Ported some missing changes. 2022-08-11 11:20:37 +02:00
b6eb2db442 Backported returning AfterGUIInput from forward_spatial_gui_input from Godot4. Also removed the first index parameter. This fully broke the skeleton editor, it will be fixed soon. 2022-08-11 02:24:30 +02:00
061bdd1f2e Fix shadowed declaration. 2022-08-11 01:33:57 +02:00
58539a22b6 Backported from Godot4: Node3D gizmo improvements
* Clean-up of node_3d_editor_plugin.{h,cpp}: removed unused code, fixed some bugs.
* Moved node_3d_editor_gizmos.{h,cpp} to editor/plugins.
* Added support for multiple gizmos per node. This means custom gizmos will no longer override the built-in ones and that multiple gizmos can be used in more complex nodes.
* Added support for handle IDs. When adding handles to a gizmo, an ID can be specified for each one, making it easier to work with gizmos that have a variable number of handles.
* Added support for subgizmos, selectable elements that can be transformed without needing a node of their own. By overriding _subgizmo_intersect_frustum() and/or _subgizmo_intersect_ray() gizmos can define which subgizmos should be selected on a region or click selection. Subgizmo transformations are applied using get/set/commit virtual methods, similar to how handles work.
- JFonS
cfb555a081
- Note: MeshDataResourceEditor is now kind of painful to use, it will be fixed a bit later.
2022-08-11 01:24:29 +02:00
ed5024d3c3 Moved AnimationPlayerEditor::singleton to private, and added getter method for it. 2022-08-10 18:53:15 +02:00
7e451e0f30 Removed the built in SkeletonSpatialGizmoPlugin. (The skeleton editor module used to remove it anyway.) 2022-08-10 14:44:15 +02:00
42607ee8ca Lots of work on GLTFDocument. 2022-08-08 02:53:46 +02:00
53f274de2f Ported: AnimatedSprite Fix updating inspector when SpriteFrames is modified - kleonc
8ae246f15e
2022-08-07 16:20:57 +02:00
45a1c98332 Ported: SpriteFramesEditor Add animation searchbox - kleonc
728a725b7b
2022-07-29 22:45:57 +02:00
Haoyu Qiu
0ed75059cc Update TextureRegion editor when NinePatchRect/StyleBoxTexture changes
Updates the editor when the region rect or margins change.
2022-07-29 19:57:55 +02:00
d480073228 Ported: Use % when dropping unique scene nodes into script
This expands uppon #60708, using `get_node("%NodeName")` for nodes that
have a unique scene name to avoid having to change the onready
statements when the paths of the nodes change.
- Jummit
63f35d24c6
2022-07-29 19:36:33 +02:00
Haoyu Qiu
dea38c63e2 Fix prompt dialog title for Animation operations 2022-07-29 11:10:38 +02:00
Hugo Locurcio
3268544299 Rename "Convert to Mesh2D" to "Convert to MeshInstance2D" in the editor
These actions create MeshInstance2D nodes, not Mesh2D resources.
2022-07-28 19:04:16 +02:00
Danny Chung
737942ac85 Increase AnimationPlayer position SpinBox to fit more decimals
Fixed UI bug where it appeared that pushing the up or down incrementing
arrows did not increment the SpinBox value appropriately. Just needed
to increase the size of the box horizontally, to display four decimal
points consistently.

(cherry picked from commit 09658f7e3ba7ffc87ae9f90aa42f64dfeeb33f40)
2022-07-28 15:04:58 +02:00
kobewi
f23274bbf2 Properly release LMB even while panning 2022-07-28 15:00:05 +02:00
Arsh Panesar
a55cfb671b Fixed Populating MultimeshInstance Crash
When populating a MultimeshInstance (node), Godot would set the
new Multimesh's color and custom data format as the current node's
multimesh, which would cause a crash if node's multimesh is null.

Populate Function will now check if node has a multimesh or not, and
set the new multimesh with default (NONE) values if node's multimesh is
null.

Fixes Issue #61553
2022-07-28 13:46:23 +02:00
7fd0b29642 Ported: Backport Label3D node implementation and Sprite*3D material render priority. - bruvzg
dc6d8d6098
2022-07-27 23:40:35 +02:00
85776387c5 Fix compile. 2022-07-27 20:07:29 +02:00
53f8707713 Ported: Add node list param to GraphEdit::delete_nodes_request signal - Chaosus
32b9818965
2022-07-27 20:01:38 +02:00
Haoyu Qiu
9912a99675 Fix crash when editing pinned StyleBox
(cherry picked from commit 4b013a9c967ecc063801b3d4a0e833dcbc865f83)
2022-07-27 19:07:26 +02:00
FireForge
71d20ea670 Add interpolation modes to Gradient - Linear, Constant, and Cubic interpolation modes - Partial backport of #53321 2022-07-27 18:12:14 +02:00
Hugo Locurcio
263c6ab535 Use physical keys for numpad emulation in the 3D editor
This makes numpad emulation work on non-QWERTY keyboard layouts
more reliably.
2022-07-27 14:17:52 +02:00
Gustav
7126f79cc6 Stop reset of MultiMesh properties on populate
ColorFormat and CustomFormat is not changed when populate is called.
2022-07-27 14:17:19 +02:00
3a4cd703ac Fix compile. 2022-07-27 14:07:52 +02:00
37413614eb Ported: Add an inspector preview for BitMap - fire-forge, timothyqiu
e8d1552af2
2022-07-27 14:04:48 +02:00
FireForge
57bdac4e2b Add a RayCast2D.cast_to editor handle 2022-07-27 14:02:38 +02:00
9eee70dbb7 Ported: Add an external link editor icon
This replaces the existing "chainlink" instance icon that was
used for external links. That icon is still used for scene instancing.
The icon was designed by redlamp.
Co-authored-by: Taylor Wright <taylor@redlamp.org>
- Calinou
2bc036dad5
2022-07-27 09:02:28 +02:00
FireForge
3f22cc9f3b Fix UndoRedo in Gradient editor
(cherry picked from commit a384031326b96dd1185b7ba33809660ba5551549)
2022-07-27 08:54:15 +02:00
2b6b95db1f Fix compile. 2022-07-26 12:55:53 +02:00
Haoyu Qiu
6191e0f0b8 Add option to paste animation as duplicate
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
2022-07-26 12:45:49 +02:00
9d9a394af6 Ported: Add an explicit way to remove a theme type. - timothyqiu and YuriSizov
f6251724af
2022-07-25 23:46:08 +02:00
79c193aabb Ported: Improve Select Frames dialog of SpriteFrames editor. - timothyqiu
32488b46a6
2022-07-25 22:25:18 +02:00
Haoyu Qiu
168b1c2ae5 Fix popup dialog UI in AnimationTreePlayer editor 2022-07-25 18:48:32 +02:00