Commit Graph

295 Commits

Author SHA1 Message Date
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
8d4e878ff6 Don't treat a hidden main button as an indicator that their editor plugin is disabled. This behavior was used to be a part of editor feature profiles, which I removed a long time ago. 2022-08-20 19:36:33 +02:00
98acdf8270 Now full screen editor plugins have the ability to hide their tab button in the top bar. 2022-08-20 17:20:34 +02:00
7e7126f2b0 Reorganized classes in editor_node.h so the public methods are at the top. 2022-08-20 16:52:17 +02:00
31ffaa1f9a New icon for Projection. 2022-08-20 02:51:15 +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
56f71c7275 Ported: Refactor the export checking logic to improve separation of concerns - m4gr3d
d2213f76a9
2022-08-19 12:08:35 +02:00
0438da9841 Ported: [3.x] Add ShapeCast and ShapeCast2D nodes - PrecisionRender
47a62e28ac
2022-08-19 03:12:32 +02:00
0cbc01144d Now custom file creation entries can be added to the editor's FilesystemDock. 2022-08-18 21:33:55 +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
e71e3ed897 Now Vector4, Vector4i, Projection, PoolVector4Array, PoolVector4iArray, are built in variant types. Also reordered the Variant's Type enum, renamed _RID in it to RID, fixed a few smaller issues and removed some very old compat code. 2022-08-16 21:55:56 +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
170a41ca82 Backported improvements to Basis from Godot4. Also bound all eligible methods. 2022-08-14 00:18:21 +02:00
d9e094ab9a Renamed elements in Basis to rows. 2022-08-13 19:07:59 +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
e3918692a3 Backported from Godot 4: Fixed animation insertion in SkeletonEditor - TokageItLab
653e2a550c
2022-08-12 01:34:45 +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
e3e39a1b2a Now EditorNode3DGizmo::add_mesh accepts a Mesh instead of an ArrayMesh. 2022-08-11 01:30:54 +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
22ce231a4e Backported from Godot 4: New and improved IK system for Skeleton3D
This PR and commit adds a new IK system for 3D with the Skeleton3D node
that adds several new IK solvers, as well as additional changes and functionality
for making bone manipulation in Godot easier.
This work was sponsored by GSoC 2020 and TwistedTwigleg
Full list of changes:
* Adds a SkeletonModification3D resource
  * This resource is the base where all IK code is written and executed
* Adds a SkeletonModificationStack3D resource
  * This node oversees the execution of the modifications and acts as a bridge of sorts for the modifications to the Skeleton3D node
* Adds SkeletonModification3D resources for LookAt, CCDIK, FABRIK, Jiggle, and TwoBoneIK
  * Each modification is in it's own file
* Several changes to Skeletons, listed below:
  * Added local_pose_override, which acts just like global_pose_override but keeps bone-child relationships intract
    * So if you move a bone using local_pose_override, all of the bones that are children will also be moved. This is different than global_pose_override, which only affects the individual bone
  * Internally bones keep track of their children. This removes the need of a processing list, makes it possible to update just a few select bones at a time, and makes it easier to traverse down the bone chain
  * Additional functions added for converting from world transform to global poses, global poses to local poses, and all the same changes but backwards (local to global, global to world). This makes it much easier to work with bone transforms without needing to think too much about how to convert them.
  * New signal added, bone_pose_changed, that can be used to tell if a specific bone changed its transform. Needed for BoneAttachment3D
  * Added functions for getting the forward position of a bone
* BoneAttachment3D node refactored heavily
  * BoneAttachment3D node is now completely standalone in its functionality.
    * This makes the code easier and less interconnected, as well as allowing them to function properly without being direct children of Skeleton3D nodes
  * BoneAttachment3D now can be set either using the index or the bone name.
  * BoneAttachment3D nodes can now set the bone transform instead of just following it. This is disabled by default for compatibility
  * BoneAttachment3D now shows a warning when not configured correctly
* Added rotate_to_align function in Basis
* Added class reference documentation for all changes
- TwistedTwigleg
5ffed49907
Note: It still needs some work.
2022-08-10 01:01:38 +02:00
a478334d4a Backported from Godot master: Made low level changes to the Skeleton3D class and Skeleton3D inspector. Changes listed below:
* Added helper functions to Skeleton3D for converting transforms from bone space to global space, and vice versa.
* Updated the Skeleton3D class reference.
* Changed the icon used for bones in the Skeleton3D inspector to use BoneAttachement3D's icon.
* Changed the Skeleton3D inspector to use EditorPropertyTransform and EditorPropertyVector3 when possible.
* Placed the Transform/Matrix for each bone in a sub-section, so it is visually similar to the Node3D inspector.
- TwistedTwigleg
24905becb2
- Also fixed smaller issues.
2022-08-09 21:57:46 +02:00
6d293dc7a3 Removed Transform type track from the Animation. This leaves a few things, like the skeleton editor broken, it will be fixed soon. 2022-08-09 17:40:42 +02:00
8fd473f685 Backported: "Remove animation 3D transform track, replace by loc/rot/scale tracks" from Godot4.
ec19ed3723
Its a bit broken right now, more patches need to be ported. Also I kept the Transform track for now, and I did not touch the gltf module yet.
2022-08-08 23:49:18 +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
4204828965 Ported: Improve some export error messages. - bruvzg
e0101e511c
2022-08-02 18:01:58 +02:00
c4e7bc1c45 Reused the old unused PROPERTY_HINT_SPRITE_FRAMES as PROPERTY_HINT_BUTTON. It allows you to add buttons to the inspectors. 2022-07-31 00:01:58 +02:00
Pedro J. Estébanez
285c2acefc Keep crash handler status on editor restart
(cherry picked from commit 116f03a1b68ecc59f9755cd0219e256c63955f55)
2022-07-29 23:49:10 +02:00
Hugo Locurcio
ed1a3f632f Require ScriptInstance to be valid in the editor debugger
This fixes an issue with visual scripts spamming error messages
in the editor when running the project with the remote scene tree
visible.

(cherry picked from commit 829c8247559a21d0b6f540e4a548d935c3a24643)
2022-07-29 23:20:46 +02:00
Alfred R. Baudisch
3354642b33 Script Editor: Don't switch to 2D/3D viewports when selecting nodes
Selecting nodes in the Scene dock automatically switches to the relevant 2D
or 3D viewport. This behavior can be annoying while using the Script Editor
and wanting to inspect node properties, so it's now disabled by default when
the Script Editor is active.

This new behavior can be changed back to the previous auto-switching using
the `text_editor/navigation/stay_in_script_editor_on_node_selected` editor
setting.

(cherry picked from commit c4433c37932aca14b45e76a0b3498561532a0055)
2022-07-29 23:20:27 +02:00
9596474a36 Ported: [Command line export] return 0 exit code when export is finished with warnings. - bruvzg
d6698c1f81
2022-07-29 23:01:04 +02:00
45a1c98332 Ported: SpriteFramesEditor Add animation searchbox - kleonc
728a725b7b
2022-07-29 22:45:57 +02:00
Nathan Franke
56779597de dependency editor: set current directory to closest existing directory
(cherry picked from commit 905c43119133ab244d81c06e3e2d14d32dea1e91)
2022-07-29 22:38:17 +02:00
kobewi
7b02b1df64 Fix node dragging not working when dock is moved
(cherry picked from commit b42bbca2666bb0b52156b8b396af54a1429c7077)
2022-07-29 22:35:27 +02:00
Haoyu Qiu
a7b0364908 Fix heap-use-after-free when closing a scene with its builtin script open
(cherry picked from commit 61bc7d65768ebe4baa9b2f888d656cce5109dd5b)
2022-07-29 19:59:39 +02:00
Thakee Nathees
cb93141c27 Fix FileDialog file name autocompletion with filters
Fixes #38195.

(cherry picked from commit 446f1b70522d86b9afe93b6543028cbab60ffb61)
2022-07-29 19:58:34 +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
Sosasees
7eca7de502 recolor FlowContainer icons to the same color as Control icon according to the discussion in issue #62553, the FlowContainer icons don't get color-adjusted for Light theme and it's because the color code is off.
to fix this issue, i recolored them to be the same icon as the Control icon,
an icon that i already know Does get recolored for Light theme.
2022-07-29 16:48:55 +02:00
Sosasees
ac81f33921 recolor Remove Theme Items icons from Godot 4 colors to Godot 3 follow-up to #62559. we found more icons that mistakenly had the Godot 4 colors, so i fixed them too. 2022-07-29 16:33:24 +02:00
648b9fce40 Ported: Add an option to drag'n'drop selected text in TextEdit - ConteZero
a13b3028a2
2022-07-29 16:29:53 +02:00
Haoyu Qiu
dea38c63e2 Fix prompt dialog title for Animation operations 2022-07-29 11:10:38 +02:00
Hugo Locurcio
55a9d5bc55 Tweak editor icons for navigation nodes and SkeletonIK
Co-authored-by: Haoyu Qiu <timothyqiu32@gmail.com>
2022-07-29 11:04:26 +02:00
cow-neaz
d25bae8559 Stop game on reloading project
(cherry picked from commit 8935cf17cf674b0cb027e5c82a21a64d3a43feb1)
2022-07-29 11:01:55 +02:00
8ca3043a28 Ported: ProjectSettings: Ensure 'editor/' settings aren't nested
Having a mix of settings with and without subcategory makes the 'Editor'
section stand out with a weird UX, as instead of simply being a foldable
section like the others, it also holds its own top-level settings and is
therefore selectable.
This wasn't the case in 3.4, and is fixed in 4.0 by refactoring, so for
3.5 we should preserve the 3.4 UX, even if it's not the best.
- akien-mga
acd4a01b8c
2022-07-29 10:45:12 +02:00
Haoyu Qiu
36afe803a9 Fix EditorFileDialog filename default selection 2022-07-29 10:37:28 +02:00
FireForge
0609c362bc Allow folding in sub-inspectors in Array and Dictionary editors
(cherry picked from commit 4e469886e803793c9c2dc7d402da8e9cf98343f9)
2022-07-29 09:07:24 +02:00
kobewi
8a60933e6d Fix NodePath property dragging 2022-07-29 09:03:29 +02:00
bb5acfd745 Ported: [3.5] Update NavigationServer backport
Backports features and bugfixes from current Godot 4.0 to 3.5 and brings functions and codebase of both version largely in sync to make tutorials more compatible and future backports easier.
- smix8
8bd7c6188b
2022-07-28 22:34:28 +02:00
152f9728b0 Ported: [Windows, 3.x] Add support for handling network share paths. - bruvzg
11a7997a67
2022-07-28 19:33:43 +02:00
Hugo Locurcio
309d538703 Print messages when textures are detected as used in 3D/normal map
This detection automatically changes some import options, so it's
important that users are aware of this.
2022-07-28 19:22:55 +02:00
Haoyu Qiu
52d0f7eef9 Fix scene tree dock focus after using "Add Child Node" button 2022-07-28 19:05:03 +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
kobewi
24a7bbc9ea Don't handle pending clicks outside scene tree
(cherry picked from commit ec6bbd486f31245af3764c466431ffc2d13d52ed)
2022-07-28 19:03:25 +02:00
43131ad4cb Ported: Add readable export errors. Add RTL image vertical alignment support. - bruvzg
f5fa1ca944
2022-07-28 18:40:46 +02:00
Haoyu Qiu
ddac7ae8ed Add tooltips to Export dialog icon buttons
(cherry picked from commit f78943b08b4568dc1c7aa85e1d6b351f18f9472c)
2022-07-28 15:16:08 +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
kobewi
bbf62e97b8 Improve title of DependencyEditorOwners
(cherry picked from commit 847eee71dfb9462df69195e8415a29258994584c)
2022-07-28 14:57:30 +02:00
Johannes Witt
eb1fa27364 Fix EditorSpinSlider mouse reset position on tree exit
(cherry picked from commit 784b1adb188f6003f01201d8cff3dab574c6beab)
2022-07-28 14:56:09 +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
a8a140af27 Ported: Fix empty space after project sort options - timothyqiu
03e84abfa5
2022-07-28 13:42:15 +02:00
Hugo Locurcio
0f28c94c91 Increase the editor profiler frame history default and maximum limit
The new default value (1800) allows storing 30 seconds of profiling
at 60 FPS.

The new maximum value (10000) allows storing about 3 minutes of
profiling at 60 FPS.

The profiler graph will scale accordingly to the chosen setting,
so the default value is kept relatively low to prevent the graph
from looking too squished on narrow displays.
2022-07-28 11:35:24 +02:00
FireForge
2c0ca59835 Remove extra space in property editors - NodePath, Resource, and multiline string 2022-07-28 11:16:23 +02:00
lawnjelly
fb4c62b273 Fix Occluder Poly gizmo warning spam
The call to draw the handles in the OccluderPoly was spamming errors when the hole has no points. This PR prevents trying to draw the gizmo for the hole when there are no points, which prevents the spam.
2022-07-28 11:11:37 +02:00
132fd3ad10 Ported: Only switch to node when not dragging it - KoBeWi
8f52320310
2022-07-28 10:18:16 +02:00
Hugo Locurcio
0177073d53 Increase saturation of accent color on the Grey editor theme preset
This makes activated icons easier to distinguish from non-activated icons.
2022-07-28 00:01:51 +02:00
d161a30a4b Ported: Backport TextMesh and expose dynamic font vector outlines - bruvzg
d502bd4847
2022-07-28 00:01:20 +02:00
7fd0b29642 Ported: Backport Label3D node implementation and Sprite*3D material render priority. - bruvzg
dc6d8d6098
2022-07-27 23:40:35 +02:00