summaryrefslogtreecommitdiff
path: root/scene/animation/tween.cpp
AgeCommit message (Collapse)Author
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-05-10Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde
Part of #33027.
2020-05-10Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde
Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
2020-05-05Fix: Tween always return true for _get(), _set()Thakee Nathees
2020-04-02Replace NULL with nullptrlupoDharkael
2020-03-06Removed boolean return type from majority of method in TweenYuri Roubinsky
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-23Merge pull request #36411 from Janglee123/rect2-tweenRémi Verschelde
Added tween support for Rect2
2020-02-23Added tween support for Rect2janglee
Fixes #34575
2020-02-20Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky
objects and made them default.
2020-02-15Changed logic and optimized ObjectID in ObjectDB and Variant, removed RefPtr.Juan Linietsky
2020-01-22Fixed Tween::start() with pending updatesPouleyKetchoupp
Start was canceled instead of deferred in case of an update in progress. Fixes #35441
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-12-12Provide default Tween values for transition and easing typesAndrii Doroshenko (Xrayez)
TRANS_LINEAR and EASE_IN_OUT are chosen as defaults for interpolation and follow methods.
2019-11-20Fix some overflows and unitialized variablesRafał Mikrut
2019-10-23Fix Tween follow_property finishing with nullMark Riedesel
2019-09-19Fix misc. source comment typosluz.paz
Found using `codespell -q 3 -S ./thirdparty,*.po -L ang,ba,cas,dof,doubleclick,fave,hist,leapyear,lod,nd,numer,ois,paket,seeked,sinc,switchs,te,uint -D ~/Projects/codespell/codespell_lib/data/dictionary.txt `
2019-09-03Added is_inside_tree() check in both Timer and Tweenshaderbeast
Tween now throws error and doesnt even execute.
2019-08-09Remove ERR_EXPLAIN from scene/* codeTomasz Chabora
2019-06-26Some code changed with Clang-Tidyqarmin
2019-06-14Implementing 0-duration tweensDevin Pentecost
Some light refactor Adding comments in functions
2019-04-03Added signal for Tween emitted at completionChaosus
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-09-27Fix warnings about unhandled enum value in switch [-Wswitch]Rémi Verschelde
Fixes GCC 5 warnings of the form: core/io/http_client.cpp:288:9: warning: enumeration value 'STATUS_SSL_HANDSHAKE_ERROR' not handled in switch [-Wswitch] core/io/marshalls.cpp:806:9: warning: enumeration value 'AABB' not handled in switch [-Wswitch] Those can be trivial cases where adding a default fallback is the solution, or more complex issues/hidden bugs where missed values are actually meant to be handled.
2018-09-12Merge pull request #21913 from DualMatrix/tween_remove_allRémi Verschelde
Fixed calling start() after remove_all() on tween not working
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-09-11Fixed calling start() emmediately after remove_all() on tween not wrokingDualMatrix
Fixed calling start() emmediately after remove_all() on tween not wroking Fixes #19901
2018-08-16Tween: Add a unique identifier to InterpolateData to be able to remove the ↵James
right one when finished
2018-08-09interpolation was not removed because of id mismatchJames
2018-06-27Check "done" state in original loopRăzvan C. Rădulescu
My first attepmt I added a second loop to check if processing should stop. This attempts to optimize by using the original loop (one loop). Also resets `elapsed` time on finish of tween which fixes `tell()`.
2018-06-26Fix and make Tween node less confusingRăzvan C. Rădulescu
I've made the following changes: - make `is_active` the main way of keeping track of tween processing/activity, meaning that `is_active` will now return `false` if all tween actions have finished or if it isn't started or if it was stopped via `set_active(false)` or any other mode - removed is_stopped because is redundand now The above meant that we don't have to keep track of yet another variable `available` since everything is based on `*processing_internal` so I removed it, likewise it's own local `processing` variable was removed, as well as the "double" `_set_process` which it feels more like a hack. What wasn't changed: - `tell()` still returns max value (i.e. `== get_runtime()` when all tweens `finish`) *More testing is needed*. So far I've tested repeat on/off, delay, `is_active()` working corretly, `set_active(true), set_active(false)`, but probably more tests are necessary, all the resets, stops, resume etc.
2018-06-07Adding is_stopped method to Tweensteincodes
2018-05-25Take tween speed into account when calculating runtimeRasmus Ketelsen
2018-01-23update signals' MethodInfo in TweenPaul Joannon
key is a NodePath, not a String
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 #15161 from volzhs/tween-followRémi Verschelde
Fix Tween follow not working
2018-01-01Update copyright statements to 2018Rémi Verschelde
Happy new year to the wonderful Godot community!
2017-12-29Fix Tween follow not workingvolzhs
Fix regression from 7609efe7571733a38a4c372d9c69ea9c71601936
2017-11-21Merge pull request #12284 from bojidar-bg/allow-subproperty-setRémi Verschelde
Allow for getting/setting "dotted" properties of objects
2017-11-21Allow for getting/setting indexed properties of objects using get/set_indexedBojidar Marinov
Performance is around the same as using pure set() through GDScript.
2017-11-17Rename Rect3 to AABB.Ferenc Arn
Fixes #12973.
2017-11-13Make Tween::interpolate_property's able to get() the initial valueBojidar Marinov
To use this behavior, pass `null` in place of the initial_value parameter.
2017-10-21Refactor Fixed to PhysicsPoommetee Ketson
2017-09-30Renamed fixed_process to physics_processAndreaCatania
2017-08-29Cleaned up logic in Tween::_tween_process(), fixes #9187cryptonaut
2017-08-27Use HTTPS URL for Godot's website in the headersRémi Verschelde
2017-08-20ClassDB: Provide the enum name of integer constantsIgnacio Etcheverry
2017-08-07Makes all Godot API's methods Lower CaseIndah Sylvia