本文整理汇总了Python中suit.cf.BaseModeLogic._onRootChanged方法的典型用法代码示例。如果您正苦于以下问题:Python BaseModeLogic._onRootChanged方法的具体用法?Python BaseModeLogic._onRootChanged怎么用?Python BaseModeLogic._onRootChanged使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类suit.cf.BaseModeLogic
的用法示例。
在下文中一共展示了BaseModeLogic._onRootChanged方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _onRootChanged
# 需要导入模块: from suit.cf import BaseModeLogic [as 别名]
# 或者: from suit.cf.BaseModeLogic import _onRootChanged [as 别名]
def _onRootChanged(self, isRoot):
"""Root changed event
"""
global prev_background
global prev_back_visible
BaseModeLogic._onRootChanged(self, isRoot)
if isRoot:
render_engine.setMode(render_engine.Mode_Perspective)
self.prev_cam_pos = render_engine._ogreCameraNode.getPosition()
self.prev_cam_dir = render_engine._ogreCameraNode.getOrientation()
prev_background = render_engine._ogreViewport.getBackgroundColour()
render_engine._ogreViewport.setBackgroundColour(ogre.ColourValue(0, 0, 0))
# space_panel.activate(self._getSheet().getChilds())
prev_back_visible = render_engine.SceneManager.isBackVisible()
if prev_back_visible:
render_engine.SceneManager.hideBack()
else:
render_engine.setMode(render_engine.Mode_Isometric)
render_engine._ogreCameraNode.setPosition(self.prev_cam_pos)
render_engine._ogreCameraNode.setOrientation(self.prev_cam_dir)
render_engine._ogreViewport.setBackgroundColour(prev_background)
# space_panel.deactivate()
space_window.deactivate()
if prev_back_visible:
render_engine.SceneManager.showBack()
self.is_root = isRoot
示例2: _onRootChanged
# 需要导入模块: from suit.cf import BaseModeLogic [as 别名]
# 或者: from suit.cf.BaseModeLogic import _onRootChanged [as 别名]
def _onRootChanged(self, _isRoot):
"""Root state changed event
@param _isRoot: new root state
@type _isRoot: bool
"""
BaseModeLogic._onRootChanged(self, _isRoot)
if _isRoot:
render_engine.SceneManager.setBackMaterial("Back/Lime")
else:
render_engine.SceneManager.setDefaultBackMaterial()
示例3: _onRootChanged
# 需要导入模块: from suit.cf import BaseModeLogic [as 别名]
# 或者: from suit.cf.BaseModeLogic import _onRootChanged [as 别名]
def _onRootChanged(self, _isRoot):
"""Root mode changing
"""
import suit.core.render.engine as render_engine
import ogre.renderer.OGRE as ogre
if _isRoot:
self._old_color_back = render_engine._ogreViewport.getBackgroundColour()
clr = chem_env.color_back
render_engine._ogreViewport.setBackgroundColour(ogre.ColourValue(clr[0], clr[1], clr[2], clr[3]))
else:
if self._old_color_back is not None:
render_engine._ogreViewport.setBackgroundColour(self._old_color_back)
BaseModeLogic._onRootChanged(self, _isRoot)
示例4: _onRootChanged
# 需要导入模块: from suit.cf import BaseModeLogic [as 别名]
# 或者: from suit.cf.BaseModeLogic import _onRootChanged [as 别名]
def _onRootChanged(self, _isRoot):
"""Notification message on sheet root changed
"""
self._viewer._onRootChanged(_isRoot)
BaseModeLogic._onRootChanged(self, _isRoot)
示例5: _onRootChanged
# 需要导入模块: from suit.cf import BaseModeLogic [as 别名]
# 或者: from suit.cf.BaseModeLogic import _onRootChanged [as 别名]
def _onRootChanged(self, _isRoot):
"""Root changing
"""
self._viewer._onRootChanged(_isRoot)
BaseModeLogic._onRootChanged(self, _isRoot)