summaryrefslogtreecommitdiff
path: root/scene/2d/path_2d.cpp
AgeCommit message (Collapse)Author
2020-06-12Object: Add usage hint to instantiate Object properties in editorRémi Verschelde
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>
2020-05-27Split `Geometry` singleton into `Geometry2D` and `Geometry3D`Andrii Doroshenko (Xrayez)
Extra `_2d` suffixes are removed from 2D methods accoringly.
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
2020-04-27Merge pull request #36035 from Xrayez/path2d-fix-self-modulateRémi Verschelde
Do not override Path2D.self_modulate property
2020-04-13Handle huge offset values in Path2D and Path3D set_offsetMickeMakaron
2020-04-02Replace NULL with nullptrlupoDharkael
2020-02-28Signals: Port connect calls to use callable_mpRémi Verschelde
Remove now unnecessary bindings of signal callbacks in the public API. There might be some false positives that need rebinding if they were meant to be public. No regular expressions were harmed in the making of this commit. (Nah, just kidding.)
2020-02-25Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky
- Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
2020-02-20Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky
objects and made them default.
2020-02-11Bugfixes and ability to better specify filter and repeat modes everywhere.Juan Linietsky
Removes antialiased flag for draw_* methods.
2020-02-09Do not override Path2D.self_modulate propertyAndrii Doroshenko (Xrayez)
Self-modulation was forcefully used for the curve drawing which can interfere with scripted drawing. The curve color is specified by the `draw_line()` method instead.
2020-02-03Updates Path2D in debugging if navigation is visibleHaoyu Qiu
2020-01-24Allow greater values in unit_offsetTomasz Chabora
2020-01-09Don't compile editor-only function when tools=noGilles Roudière
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-11-30Remove unnecessary bounded_offset from PathFollow2DTomasz Chabora
2019-08-18Improve the appearance of 2D path editorsHugo Locurcio
- Add new handle icons for path/polygon editors - Add smooth path point icons and curve tangent icons - Use a gray color for tangent lines in the Path2D and Path editors - Use antialiasing for Path2D lines
2019-07-08Fix some issue with TileMap's and other nodes' boundariesBojidar Marinov
Fixes #30348 Addresses a small part of #30012
2019-05-25Don't allow PathFollow offset outside boundsTomasz Chabora
2019-04-05Replace a few #if/#elif with #ifdef and "#elif defined"Ignacio Etcheverry
2019-02-23Do not crash on empty path, closes #23701Juan Linietsky
2019-01-03Allow offset and unit_offset to be set higher than one loopTimo Schwarzer
Fixes #24745
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-12-04#24131: fix for PathFollow offset slider overlapping with the inspectorGleb Mineev
2018-10-30Fix crash adding point to a Curve2D from the editorlupoDharkael
Adding point to a Path2D with null Curve2D from the canvas was causing a crash after trying to use a null object.
2018-09-12Make core/ includes absolute, remove subfolders from include pathRémi Verschelde
This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
2018-05-16Allow editing of some unbound properties when hinted (or no range hinted)Juan Linietsky
2018-04-17Ability to change path color with self modulatevolzhs
Fix #18164
2018-04-03Remove the selection rect for nodes that do not require itGilles Roudiere
2018-01-22defend Path2D against a null curveTodd Ross
2018-01-12Bind many more properties to scriptsBojidar Marinov
Notable potentially breaking changes: - PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL - Some properties were renamed, and sometimes even shadowed by new ones - New getter methods (some virtual) were added
2018-01-05Add missing copyright headers and fix formattingRémi Verschelde
Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
2018-01-03Merge pull request #15093 from poke1024/canvas-editor-selectRémi Verschelde
More exact picking for canvas editor
2018-01-01Update copyright statements to 2018Rémi Verschelde
Happy new year to the wonderful Godot community!
2017-12-27More exact picking for canvas editorBernhard Liebl
2017-12-06Reworked PathFollow2D behaviour, based on such in version 2.1.Ibrahn Sahir
When rotation is enabled, the follower's rotation will be set to that of the tangent to the path at it's current offset. For closed looping paths the lookahead will now wrap around at the end of the path. fixes #13434
2017-11-30Fix PathFollow2D motion.Ferenc Arn
Fixes #13361.
2017-11-19Use parallel transport in PathFollow2D.Ferenc Arn
Fixes #12995.
2017-09-20Rename pos to position in user facing methods and variablesletheed
Rename user facing methods and variables as well as the corresponding C++ methods according to the folloming changes: * pos -> position * rot -> rotation * loc -> location C++ variables are left as is.
2017-09-08Remove assignment and declarations in if statementsHein-Pieter van Braam
After discussing with @reduz and @akien-mga it was decided that we do not allow assignments or declarations in if statements. This PR removes the instances of this I could find by automated means.
2017-08-27Use HTTPS URL for Godot's website in the headersRémi Verschelde
2017-08-24Convert Object::cast_to() to the static versionHein-Pieter van Braam
Currently we rely on some undefined behavior when Object->cast_to() gets called with a Null pointer. This used to work fine with GCC < 6 but newer versions of GCC remove all codepaths in which the this pointer is Null. However, the non-static cast_to() was supposed to be null safe. This patch makes cast_to() Null safe and removes the now redundant Null checks where they existed. It is explained in this article: https://www.viva64.com/en/b/0226/
2017-08-19Removes editor_hint from SceneTreeIgnacio Etcheverry
2017-08-10Fixes method definitions with extra number of argumentsIgnacio Etcheverry
2017-08-10Removes type information from method bindsIgnacio Etcheverry
2017-04-08Add "Godot Engine contributors" copyright lineRémi Verschelde
2017-03-05A Whole New World (clang-format edition)Rémi Verschelde
I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
2017-02-13Rename the _MD macro to D_METHODHein-Pieter van Braam
This new name also makes its purpose a little clearer This is a step towards fixing #56
2017-02-13Remove use of _SCS from ADD_METHODHein-Pieter van Braam
This saves typing and is a step towards fixing #56