summaryrefslogtreecommitdiff
path: root/scene/animation/animation_node_state_machine.cpp
AgeCommit message (Collapse)Author
2022-08-18added Curve in animation node transition for better control over cros…Silc Renew
Co-authored-by: jeronimo-schreyer <jeronimo.schreyer@gmail.com>
2022-07-31Fix AnimationNodeStateMachine::rename_nodeGuilherme Felipe de C. G. da Silva
2022-07-29Remove Signal connect bindsJuan Linietsky
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind(). Changed all uses of it to Callable.bind()
2022-07-21Fix incorrect expression base in ↵João Pedro São Gregorio Silva
`AnimationNodeStateMachinePlayback::_check_advance_condition`
2022-07-16refactor sync in AnimationTreeSilc Renew
2022-06-28Add AnimationTree Advance ExpressionsSaracenOne
Allows specifying an expression as a condition for state machine transitions. This gives much greater flexibility for creating complex state machines. By directly interfacing with the script code, it is possible to create complex animation advance condition for switching between states. Ensure assigning AnimationTreeStateMachineTransition base expression node in editor is relative to current AnimationTree node. Allow setting an expression base node on the AnimationTree itself. Co-Authored-By: reduz <reduzio@gmail.com>
2022-06-23Merge pull request #61826 from guilhermefelipecgs/fix_leakRémi Verschelde
Fix ObjectDB instances leaked on state machine when editor closes
2022-06-11Add suffixes to all nodes and resourcesFireForge
2022-06-08Fix ObjectDB instances leaked on state machine when editor closesGuilherme Felipe de C. G. da Silva
2022-05-23Fix typos with codespellRémi Verschelde
Using codespell 2.2-dev from current git.
2022-05-18Merge pull request #60774 from TokageItLab/root-seek-modeRémi Verschelde
Fixed broken root motion calculation in internal process of `AnimationBlendTree` such as `NodeOneShot`
2022-05-16Replace most uses of Map by HashMapreduz
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
2022-05-09Fixed delta & Implement selection of whether or not to seek rootSilc Renew
2022-05-02Improvements of state machineGuilherme Felipe
- Open the menu to add new animation nodes by dragging the transitions to empty areas and automatically connecting them. - Adds box selection to the state machine. - Add feature to group/ungroup selected nodes in a "sub" state machine. - Add start/end node by default. In addition, add new color to these nodes to differentiate then. - Add tooltip for transitions to show the connection "from -> to". - Add new "type" of transition line when multiple transitions are grouped. - Add popup to connect nodes in sub state machine. - Add dialog to select which nodes can be deleted when they are grouped. - Add classes: AnimationNodeStartState AnimationNodeEndState EditorAnimationMultiTransitionEdit - Implements disabled transition API Changes: - Now it's posible to add transitions between state machines, `AnimationNodeStateMachine::add_transition` will works with relative path, this means you can use it like this `add_transition("Idle", "Walk", tr)` or `add_transition("Idle", "StateMachine/Shoot)`.
2022-04-14Replaced loops_current with end_loopScottVMariotte
2022-02-15Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde
2022-02-04String: Add contains().Anilforextra
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-09Replace String comparisons with "", String() to is_empty()Nathan Franke
Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
2021-11-23Rename `remove()` to `remove_at()` when removing by indexLightning_A
2021-11-03Rename `PROPERTY_USAGE_NOEDITOR` to `PROPERTY_USAGE_NO_EDITOR`Hugo Locurcio
This is consistent with other constants that include `NO`, such as `PROPERTY_HINT_COLOR_NO_ALPHA`.
2021-10-03Merge pull request #44964 from Dragoncraft89/animation_tree_bugRémi Verschelde
2021-09-30Use range iterators for `Map`Lightning_A
2021-08-09Use doubles for time in animation codeAaron Franke
2021-07-25Use const references where possible for List range iteratorsRémi Verschelde
2021-07-23Use C++ iterators for Lists in many situationsAaron Franke
2021-07-18Optimize StringName usagereduz
* Added a new macro SNAME() that constructs and caches a local stringname. * Subsequent usages use the cached version. * Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time. * Replaced all theme usages by this new macro. * Replace all signal emission usages by this new macro. * Replace all call_deferred usages by this new macro. This is part of ongoing work to optimize GUI and the editor.
2021-06-19Rename `instance()`->`instantiate()` when it's a verbLightning_A
2021-05-25Tweak dozens of editor property hints for consistencyHugo Locurcio
- Update Viewport MSAA property hints to match the currently exposed values. - Add some performance hints to property hints.
2021-03-21Rename Array.invert() to Array.reverse()Marcel Admiraal
Does the same internally for List and Vector<>, which includes all PackedArray types.
2021-02-15improve error message when travel() is called on an ↵nc
AnimationNodeStateMachine when the state machine is not playing
2021-02-11Improve resource load cachereduz
-Added a new method in Resource: reset_state , used for reloading the same resource from disk -Added a new cache mode "replace" in ResourceLoader, which reuses existing loaded sub-resources but resets their data from disk (or replaces them if they chaged type) -Because the correct sub-resource paths are always loaded now, this fixes bugs with subresource folding or subresource ordering when saving.
2021-02-09Initialize class variables with default values in scene/ [2/2]Rafał Mikrut
2021-02-07Initialize class variables with default values in scene/ [1/2]Rafał Mikrut
2021-01-06Fix AnimationNodeStateMachinePlayback start() on nonexistent nodeFlorian Kothmeier
2021-01-02Merge pull request #42188 from ↵Rémi Verschelde
Eoin-ONeill-Yokai/animationstateplayback/missing_binds AnimationStateMachinePlayback: Added Missing Method Bindings
2021-01-01StateMachinePlayback: Added missing bindings to `get_current_play_pos` and ↵Eoin O'Neill
`get_current_length`. This allows the user to query the AnimationNodeStateMachinePlayback's current play position and total length of current animation state. These methods are currently used in the editor plugin, but can also be useful for querying general playback state information. Added documentation for AnimationNodeStateMachinePlayback's `get_current_play_position`
2021-01-01Update copyright statements to 2021Rémi Verschelde
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 🎆
2020-12-05Remove connect *_compat methodsAaron Franke
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.