summaryrefslogtreecommitdiffstats
path: root/scene/2d/path_2d.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Compile certain `CanvasItem._edit_*()` functions with `DEBUG_ENABLED`Michael Alexsander2024-11-021-1/+1
|
* Merge pull request #96629 from ditiem-games/path2dThaddeus Crews2024-10-211-5/+4
|\ | | | | | | Fix Animated Path2D doesn't update PathFollow2D progress when scene is running.
| * Update FollowPath2D children of Path2D when a curve_changed event occursDavid Trallero2024-09-061-5/+4
| |
* | Fix super call in various `get_configuration_warnings` methodsA Thousand Ships2024-09-051-1/+1
|/
* Add error checks for bad configuration in `PathFollow2D/3D` `set_progress_ratio`Guillaume Turri2024-09-041-3/+4
| | | | | | | | | | | | When a PathFollow is badly configured it's possible to have code that call get_progress_ratio just after set_progress_ratio does not return the value just set, which may be confusing for developer (ie that myPathFollow2D.set_progress_ratio(0.5) myPathFollow2D.get_progress_ratio() does not return 0.5) This commit makes ensures the developer has useful error messages in such case, to make it easier to troubleshot it.
* Revert "Update Node::get_configuration_warnings signature"Rémi Verschelde2024-02-171-2/+2
| | | | This reverts commit d3852deaa450d77edb30df2bb1c77bd7bc45befc.
* Update Node::get_configuration_warnings signatureRedMser2024-02-081-2/+2
|
* Reorganize code related to editor themingYuri Sizov2024-01-161-1/+1
| | | | | | | | | | | | | This change introduces a new EditorThemeManager class to abstract theme generatio and its subroutines. Logic related to EditorTheme, EditorColorMap, and editor icons has been extracted into their respective files with includes cleaned up. All related files have been moved to a separate folder to better scope them in the project. This includes relevant generated files as well.
* Changed the way the rotation of a curve at a point is evaluated to match ↵Andrés Botero2023-10-281-4/+4
| | | | PathFollow2D
* Unify and streamline connecting to Resource changeskobewi2023-07-171-2/+2
|
* Fix Pathfollow directionSilc Renew2023-05-241-22/+10
| | | | Co-authored-by: aaronfranke <arnfranke@yahoo.com>
* Update PathFollow2D when curve is changedTomasz Chabora2023-01-151-0/+25
|
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Fix Path2D fish bone directionYaohua Xiong2022-12-061-1/+1
|
* Path2D: Fix build issue after conflicts between #68860 and #69115Rémi Verschelde2022-12-061-1/+1
|
* Merge pull request #68860 from xiongyaohua/path3d_fishbonesRémi Verschelde2022-12-061-10/+49
|\ | | | | | | Draw fish bones for Path3D and Path2D in the Editor
| * draw fish bones for Path2D and Path3DYaohua Xiong2022-12-051-10/+49
| | | | | | | | These fish bones are add to indicate the direction and local transforms alone the path.
* | Refactor baking code for Curve2DYaohua Xiong2022-12-051-1/+1
|/ | | | | | | | | The main change is to caculate tangent directly from bezier curve, without going through discretized polyline, avoiding pitfalls of discretization. A similar refacor had been applied to Curve3D. The test cases for Curve2D is updated, comparing floating point with is_equal_approxmiate() instead of `==`, in order to avoid float precision problem.
* Move rotation sampling from Path2D to Curve2DYaohua Xiong2022-11-011-39/+6
| | | | | The rotation sampling code is moved from Path2D to a new method `sample_baked_with_rotation` on Curve2D.
* Change return type of `get_configuration_warnings` to `PackedStringArray`Marc Gilleron2022-09-191-2/+2
|
* Rename `or_lesser` range property hint to `or_less`Hugo Locurcio2022-09-021-3/+3
| | | | | | | "less" should be used for quantity, rather than "lesser". Existing scripts that use `or_lesser` in `_get_property_list()` will need to be updated to account for this change.
* Rename Curve/Curve2D/Curve3D/Gradient `interpolate()` to `sample()`Hugo Locurcio2022-08-301-6/+6
| | | | | "sampling" is a more accurate term than "interpolating" for what's happening when using that function.
* Rename `CanvasItem.update()` to `queue_redraw()`Micky2022-08-291-1/+1
| | | | | | | | | | Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on. Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency. Just a few comments have also been changed to say "redraw". In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
* Rename PathFollow's `offset`s to `progress` & `progress_ratio`Micky2022-08-241-22/+22
| | | | Applies for both PathFollow2D and PathFollow3D
* Make `_validate_property` a multilevel methodYuri Sizov2022-08-221-3/+3
|
* prevent crash on NaN offset in path_follower 2d and 3dHayden Leete2022-07-141-0/+1
|
* Add Path2D/3D debug optionssmix82022-06-201-8/+6
| | | | Add Path2D/3D debug options.
* Use suffixes for units in nodes and resourcesAaron Franke2022-05-191-1/+1
|
* PathFollow2D and PathFollow3D: don't set offset to NaNRicardo Buring2022-04-171-1/+1
|
* String: Remove TTR and DTR defines in non-tools buildRémi Verschelde2022-03-281-1/+1
| | | | | This ensures we don't use TTR in runtime code, as it's specifically meant to source translations for the editor.
* Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde2022-02-151-21/+26
|
* Path2D: Check points count before rendering.Anilforextra2022-01-091-0/+4
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Faster Path2D drawing with polylinelawnjelly2021-12-011-6/+8
| | | | Changes the Path2D drawing to use POLYLINE instead of thick lines.
* Fix some unnecessary includesAaron Franke2021-08-131-2/+0
|
* Use Array for node configuration warningsNathan Franke2021-04-111-11/+6
| | | | Previously, the warnings were passed as a string and delimitation of which were hard coded at each implementation.
* Use real_t in non-physics 2D nodesAaron Franke2021-03-191-16/+16
|
* Removed _change_notifyreduz2021-02-101-2/+0
| | | | | | -For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap. -For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed() -Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
* Initialize class variables with default values in scene/ [1/2]Rafał Mikrut2021-02-071-1/+1
|
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* Merge pull request #44149 from madmiraal/rename-tangent-orthogonalRémi Verschelde2020-12-281-1/+1
|\ | | | | Rename Vector2.tangent() to Vector2.orthogonal()
| * Rename Vector2.tangent() to Vector2.orthogonal()Marcel Admiraal2020-12-061-1/+1
| |
* | Rename empty() to is_empty()Marcel Admiraal2020-12-281-1/+1
| |
* | Move initialization of some classes to headersTomasz Chabora2020-12-111-11/+0
|/
* Rename PathFollow2D rotate boolAaron Franke2020-12-041-7/+7
|
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-1/+1
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Merge pull request #38743 from arrowinaknee/node-config-warningsRémi Verschelde2020-10-011-2/+7
|\ | | | | Update all get_configuration_warning() to retrieve warnings from the parent
| * Update all get_configuration_warning to retrieve warnings from the parentArrowInAKnee2020-05-161-2/+7
| |
* | Object: Add usage hint to instantiate Object properties in editorRémi Verschelde2020-06-121-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #36372 as Path2D/Path3D's `curve` property no longer uses a Curve instance as default value, but instead it gets a (unique) default Curve instance when created through the editor (CreateDialog). ClassDB gets a sanity check to ensure that we don't do the same mistake for other properties in the future, but instead use the dedicated property usage hint. Fixes #36372. Fixes #36650. Supersedes #36644 and #36656. Co-authored-by: Thakee Nathees <thakeenathees@gmail.com> Co-authored-by: simpuid <utkarsh.email@yahoo.com>
* | Split `Geometry` singleton into `Geometry2D` and `Geometry3D`Andrii Doroshenko (Xrayez)2020-05-271-1/+2
|/ | | | Extra `_2d` suffixes are removed from 2D methods accoringly.