Groot2 icon indicating copy to clipboard operation
Groot2 copied to clipboard

Pre- and post-conditions of sub-trees are shown as ports

Open kdhansen opened this issue 7 months ago • 0 comments

Describe the bug When I put in a script snippet in the pre- or post-conditions of a sub-tree, save and close the project, and then reopen it, the pre- and post-condition shows up as both a port and a pre-/post-condition.

To Reproduce

  1. I make a new project, add a second tree and add that to the first tree.
  2. Then I input a snippet into a pre- or post-condition.
  3. I save the project.
  4. Close it.
  5. Reopen the project.

This is the resulting XML file:

<?xml version="1.0" encoding="UTF-8"?>
<root BTCPP_format="4">
  <BehaviorTree ID="Main">
    <SubTree ID="MySub"
             _post="test:=true"
             _autoremap="false"/>
  </BehaviorTree>

  <BehaviorTree ID="MySub">
    <AlwaysSuccess/>
  </BehaviorTree>

  <!-- Description of Node Models (used by Groot) -->
  <TreeNodesModel/>

</root>

Expected behavior I expected the _post part in the example above to not be shown in Groot2 as a port.

Screenshots and videos behavior_tree

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • Groot2 version 1.6.0

kdhansen avatar Jul 01 '24 12:07 kdhansen