本文整理汇总了Python中UM.Scene.SceneNode.SceneNode.removeChild方法的典型用法代码示例。如果您正苦于以下问题:Python SceneNode.removeChild方法的具体用法?Python SceneNode.removeChild怎么用?Python SceneNode.removeChild使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UM.Scene.SceneNode.SceneNode
的用法示例。
在下文中一共展示了SceneNode.removeChild方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_addRemoveDouble
# 需要导入模块: from UM.Scene.SceneNode import SceneNode [as 别名]
# 或者: from UM.Scene.SceneNode.SceneNode import removeChild [as 别名]
def test_addRemoveDouble(self):
# Adding a child that's already a child of a node should not cause issues. Same for trying to remove one that isn't a child
node_1 = SceneNode()
node_2 = SceneNode()
# Should work
node_1.addChild(node_2)
# Should still work!
node_1.addChild(node_2)
# This has already been tested somewhere else, so no problems are expected
node_1.removeChild(node_2)
# Doing it again shouldn't break.
node_1.removeChild(node_2)