summaryrefslogtreecommitdiffstats
path: root/scene/animation/animation_node_state_machine.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | Rename Curve/Curve2D/Curve3D/Gradient `interpolate()` to `sample()`Hugo Locurcio2022-08-301-1/+1
| | | | | | | | | | "sampling" is a more accurate term than "interpolating" for what's happening when using that function.
* | Merge pull request #54456 from rafallus/fix/anim_state_machine_startRémi Verschelde2022-08-261-1/+1
|\ \ | | | | | | Fix AnimationTree state machine start()
| * | Fix AnimationTree state machine start()rafallus2021-10-301-1/+1
| | |
* | | added Curve in animation node transition for better control over cros…Silc Renew2022-08-181-2/+19
| |/ |/| | | | | Co-authored-by: jeronimo-schreyer <jeronimo.schreyer@gmail.com>
* | Fix AnimationNodeStateMachine::rename_nodeGuilherme Felipe de C. G. da Silva2022-07-311-14/+14
| |
* | Remove Signal connect bindsJuan Linietsky2022-07-291-3/+3
| | | | | | | | | | Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind(). Changed all uses of it to Callable.bind()
* | Fix incorrect expression base in ↵João Pedro São Gregorio Silva2022-07-211-1/+1
| | | | | | | | `AnimationNodeStateMachinePlayback::_check_advance_condition`
* | refactor sync in AnimationTreeSilc Renew2022-07-161-6/+6
| |
* | Add AnimationTree Advance ExpressionsSaracenOne2022-06-281-2/+64
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge pull request #61826 from guilhermefelipecgs/fix_leakRémi Verschelde2022-06-231-11/+11
|\ \ | | | | | | Fix ObjectDB instances leaked on state machine when editor closes
| * | Fix ObjectDB instances leaked on state machine when editor closesGuilherme Felipe de C. G. da Silva2022-06-081-11/+11
| | |
* | | Add suffixes to all nodes and resourcesFireForge2022-06-111-1/+1
|/ /
* | Fix typos with codespellRémi Verschelde2022-05-231-1/+1
| | | | | | | | Using codespell 2.2-dev from current git.
* | Merge pull request #60774 from TokageItLab/root-seek-modeRémi Verschelde2022-05-181-9/+9
|\ \ | | | | | | Fixed broken root motion calculation in internal process of `AnimationBlendTree` such as `NodeOneShot`
| * | Fixed delta & Implement selection of whether or not to seek rootSilc Renew2022-05-091-9/+9
| | |
* | | Replace most uses of Map by HashMapreduz2022-05-161-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | * 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!
* | Improvements of state machineGuilherme Felipe2022-05-021-125/+432
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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)`.
* | Replaced loops_current with end_loopScottVMariotte2022-04-141-12/+4
| |
* | Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde2022-02-151-3/+0
| |
* | String: Add contains().Anilforextra2022-02-041-3/+3
| |
* | Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | | | | | Happy new year to the wonderful Godot community!
* | Replace String comparisons with "", String() to is_empty()Nathan Franke2021-12-091-1/+1
| | | | | | | | | | | | Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
* | Rename `remove()` to `remove_at()` when removing by indexLightning_A2021-11-231-4/+4
| |
* | Rename `PROPERTY_USAGE_NOEDITOR` to `PROPERTY_USAGE_NO_EDITOR`Hugo Locurcio2021-11-031-6/+6
|/ | | | | This is consistent with other constants that include `NO`, such as `PROPERTY_HINT_COLOR_NO_ALPHA`.
* Merge pull request #44964 from Dragoncraft89/animation_tree_bugRémi Verschelde2021-10-031-5/+11
|\
| * Fix AnimationNodeStateMachinePlayback start() on nonexistent nodeFlorian Kothmeier2021-01-061-5/+11
| |
* | Use range iterators for `Map`Lightning_A2021-09-301-9/+9
| |
* | Use doubles for time in animation codeAaron Franke2021-08-091-2/+2
| |
* | Use const references where possible for List range iteratorsRémi Verschelde2021-07-251-3/+3
| |
* | Use C++ iterators for Lists in many situationsAaron Franke2021-07-231-6/+5
| |
* | Optimize StringName usagereduz2021-07-181-7/+7
| | | | | | | | | | | | | | | | | | | | | | * 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.
* | Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-191-2/+2
| |
* | Tweak dozens of editor property hints for consistencyHugo Locurcio2021-05-251-1/+1
| | | | | | | | | | | | - Update Viewport MSAA property hints to match the currently exposed values. - Add some performance hints to property hints.
* | Rename Array.invert() to Array.reverse()Marcel Admiraal2021-03-211-1/+1
| | | | | | | | | | Does the same internally for List and Vector<>, which includes all PackedArray types.
* | improve error message when travel() is called on an ↵nc2021-02-151-1/+1
| | | | | | | | AnimationNodeStateMachine when the state machine is not playing
* | Improve resource load cachereduz2021-02-111-0/+12
| | | | | | | | | | | | -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.
* | Initialize class variables with default values in scene/ [2/2]Rafał Mikrut2021-02-091-1/+1
| |
* | Initialize class variables with default values in scene/ [1/2]Rafał Mikrut2021-02-071-16/+0
|/
* Merge pull request #42188 from ↵Rémi Verschelde2021-01-021-0/+2
|\ | | | | | | | | Eoin-ONeill-Yokai/animationstateplayback/missing_binds AnimationStateMachinePlayback: Added Missing Method Bindings
| * StateMachinePlayback: Added missing bindings to `get_current_play_pos` and ↵Eoin O'Neill2021-01-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | `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`
* | 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 🎆
* Remove connect *_compat methodsAaron Franke2020-12-051-2/+2
|
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-3/+6
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+12
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-48/+0
| | | | | | | | | | | | | | 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.
* Replace NULL with nullptrlupoDharkael2020-04-021-2/+2
|
* Fix out of bound array access caused by unassigned variableRafał Mikrut2020-04-011-0/+5
|
* Merge pull request #36491 from AndreaCatania/edit_node_anim_state_macRémi Verschelde2020-03-161-0/+22
|\ | | | | Added new method to edit an already added node to anim state machine
| * Added new method to replace an already added node to the animation state machineAndrea Catania2020-03-161-0/+22
| |
* | Signals: Port connect calls to use callable_mpRémi Verschelde2020-02-281-8/+6
| | | | | | | | | | | | | | | | | | 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.)