Skip to content

Commit

Permalink
Improvements of state machine
Browse files Browse the repository at this point in the history
- 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)`.
  • Loading branch information
guilhermefelipecgs committed May 2, 2022
1 parent 7819378 commit e7056c1
Show file tree
Hide file tree
Showing 6 changed files with 1,494 additions and 370 deletions.
26 changes: 0 additions & 26 deletions doc/classes/AnimationNodeStateMachine.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@
Adds a transition between the given nodes.
</description>
</method>
<method name="get_end_node" qualifiers="const">
<return type="String" />
<description>
Returns the graph's end node.
</description>
</method>
<method name="get_graph_offset" qualifiers="const">
<return type="Vector2" />
<description>
Expand Down Expand Up @@ -72,12 +66,6 @@
Returns the given node's coordinates. Used for display in the editor.
</description>
</method>
<method name="get_start_node" qualifiers="const">
<return type="String" />
<description>
Returns the graph's end node.
</description>
</method>
<method name="get_transition" qualifiers="const">
<return type="AnimationNodeStateMachineTransition" />
<argument index="0" name="idx" type="int" />
Expand Down Expand Up @@ -157,13 +145,6 @@
<description>
</description>
</method>
<method name="set_end_node">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
Sets the given node as the graph end point.
</description>
</method>
<method name="set_graph_offset">
<return type="void" />
<argument index="0" name="offset" type="Vector2" />
Expand All @@ -179,12 +160,5 @@
Sets the node's coordinates. Used for display in the editor.
</description>
</method>
<method name="set_start_node">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
Sets the given node as the graph start point.
</description>
</method>
</methods>
</class>
Loading

0 comments on commit e7056c1

Please sign in to comment.