Set Root Name
SUMMARY
set_root_name sets the name of the tree's root frame.
The Skill
python
tree.set_root_name("map")The Code
python
"""
Example of TransformTree.set_root_name.
"""
from loguru import logger
from telekinesis.tf import tftree
def main():
"""
Set the name of the tree's root frame.
"""
tree = tftree.TransformTree("world")
logger.info(f"Root name before: {tree.get_root_name()}")
tree.set_root_name("map")
logger.info(f"Root name after: {tree.get_root_name()}")
if __name__ == "__main__":
main()Parameter Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
root_name | str | required | The new name for the tree's root frame. |
Raises
| Exception | Condition |
|---|---|
TypeError | root_name is not a string. |