Functions | |
None | convert_all_nodes (ET.Element root_node) |
None | convert_single_node (ET.Element node) |
def | convert_stream (typing.TextIO in_stream, typing.TextIO out_stream) |
def | main () |
bool | strtobool (typing.Union[str, int, bool] val) |
Variables | |
logger = logging.getLogger(__name__) | |
list | SCRIPT_DIRECTIVES |
Converts BehaviorTree.CPP V3 compatible tree xml files to V4 format.
None convert_v3_to_v4.convert_all_nodes | ( | ET.Element | root_node | ) |
recursively converts all nodes inside a root node. Args: root_node (ET.Element): the root node to start the conversion.
Definition at line 93 of file convert_v3_to_v4.py.
None convert_v3_to_v4.convert_single_node | ( | ET.Element | node | ) |
converts a leaf node from V3 to V4. Args: node (ET.Element): the node to convert.
Definition at line 35 of file convert_v3_to_v4.py.
def convert_v3_to_v4.convert_stream | ( | typing.TextIO | in_stream, |
typing.TextIO | out_stream | ||
) |
Converts the behavior tree V3 xml from in_file to V4, and writes to out_file. Args: in_stream (typing.TextIO): The input file stream. out_stream (typing.TextIO): The output file stream.
Definition at line 107 of file convert_v3_to_v4.py.
def convert_v3_to_v4.main | ( | ) |
the main function when used in cli mode
Definition at line 129 of file convert_v3_to_v4.py.
bool convert_v3_to_v4.strtobool | ( | typing.Union[str, int, bool] | val | ) |
``distutils.util.strtobool`` equivalent, since it will be deprecated. origin: https://stackoverflow.com/a/715468/17094594
Definition at line 15 of file convert_v3_to_v4.py.
convert_v3_to_v4.logger = logging.getLogger(__name__) |
Definition at line 12 of file convert_v3_to_v4.py.
list convert_v3_to_v4.SCRIPT_DIRECTIVES |
Definition at line 23 of file convert_v3_to_v4.py.