summaryrefslogtreecommitdiff
path: root/scene/animation/animation_node_state_machine.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: Enforce separation line between function definitionsRémi Verschelde
I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
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-02Replace NULL with nullptrlupoDharkael
2020-04-01Fix out of bound array access caused by unassigned variableRafał Mikrut
2020-03-16Merge pull request #36491 from AndreaCatania/edit_node_anim_state_macRémi Verschelde
Added new method to edit an already added node to anim state machine
2020-03-16Added new method to replace an already added node to the animation state machineAndrea Catania
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-21Added StringName as a variant type.Juan Linietsky
Also changed all relevant properties defined manually to StringName.
2020-02-20Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky
objects and made them default.
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-30Handle state machine travel before the start node is processedPouleyKetchoupp
This change allows travel() to be called on AnimationNodeStateMachinePlayback during _ready(), before the start node has been processed and the state machine is considered playing.
2019-08-09Remove ERR_EXPLAIN from scene/* codeTomasz Chabora
2019-08-06Fixed AnimationTreeStateMachine transition priority (last transition was ↵PouleyKetchoupp
always chosen instead of least cost) Fixes #31132
2019-06-26Some code changed with Clang-Tidyqarmin
2019-06-19added forgotten err_fail_index checkFurkan Türkal
2019-05-19[StateMachine] Fix error message for travel methodGuilherme Felipe
2019-04-09Fill out some of the AnimationNode docs.Ryan Roden-Corrent
The API docs for various animation nodes are pretty empty, yet the tutorial at https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html contains some details. These details should be included in the API docs so looking up a particular class actually provides some information rather than requiring the user to hunt for a different tutorial. This also links the AnimationTree tutorial and demo in the docs. I've found the TPS demo to be the best resource so far for learning how to use the AnimationTree. This should be easy to find if someone looks up the AnimationTree API docs. Finally, this fixes a param typo in AnimationNodeStateMachine.
2019-03-17StateMachine: Fix sync modeGuilherme Felipe
2019-02-12Fix state machine priority for auto advanceGuilherme Felipe
2019-01-27Fix problem blending from state to state in statemachine node, closes #21944Juan Linietsky
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-12-16Fix sub-transitions not using end_node correctlyGuilherme Felipe
Fix #22389
2018-11-04Removed unnecessary assignmentsWilson E. Alvarez
2018-09-12Misc. typosluz.paz
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
2018-08-29Add missing copyright headersRémi Verschelde
2018-08-25Fix advancing based on condition in AnimationNodeStateMachinePlaybackAndy Brenneke
2018-08-24Remove unnecessary print with AnimationNodeStateMachinePlaybackvolzhs
2018-08-21Fix arg name in docs, some copy-paste errorsPoommetee Ketson
2018-08-20Massive rewrite to AnimationTree. Many APIs changed in order to:Juan Linietsky
-Reuse resources -Expose properties in AnimationTree
2018-07-26Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam
This commit makes operator[] on Vector const and adds a write proxy to it. From now on writes to Vectors need to happen through the .write proxy. So for instance: Vector<int> vec; vec.push_back(10); std::cout << vec[0] << std::endl; vec.write[0] = 20; Failing to use the .write proxy will cause a compilation error. In addition COWable datatypes can now embed a CowData pointer to their data. This means that String, CharString, and VMap no longer use or derive from Vector. _ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug builds. This is a lot faster for Vector in the editor and while running tests. The reason why this difference used to exist is because force-inlined methods used to give a bad debugging experience. After extensive testing with modern compilers this is no longer the case.
2018-07-08Fix some enum export in new Animation editor.Fabio Alessandrelli
2018-06-25renamed AnimationGraphPlayer to AnimationTreeJuan Linietsky
2018-06-25removed printJuan Linietsky
2018-06-25State machine animation nodeJuan Linietsky