本页内容

SubtreeEnabler QML Type

启用或禁用帧图节点的整个子树。更多...

Import Statement: import Qt3D.Render 2.12
In C++: QSubtreeEnabler
Inherits:

FrameGraphNode

Status: Deprecated

此类型已弃用。我们强烈建议不要在新代码中使用它。

属性

方法

详细说明

虽然可以通过enabled 属性单独启用或禁用FrameGraphNodes,但当需要开启或关闭整个路径时,这种操作会变得非常繁琐。SubtreeEnabler是一个便捷节点,它使这种用例变得非常简单,允许通过一个开关来控制其所有子节点。

例如,以下简化的帧图包含一个用于调试渲染的子树,该子树可轻松地仅在调试时启用。

SubtreeEnabler 默认处于启用状态。

属性文档

enablement : enumeration

控制子树启用状态是持久性的还是暂时的。

常量描述
Persistentenabled 的值是持久的。这是默认值。
SingleShotenabled 的值将持续一个帧,然后重置为 false。这可用于子树在 FBO 上的绘制,例如,仅在场景的相关部分发生变化时更新 FBO。

方法文档

void requestUpdate()

请求启用该子树。

这是一个方便的方法,旨在配合SingleShot 的启用功能使用。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.