本文整理汇总了Python中WorldEditor.getUserMode方法的典型用法代码示例。如果您正苦于以下问题:Python WorldEditor.getUserMode方法的具体用法?Python WorldEditor.getUserMode怎么用?Python WorldEditor.getUserMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WorldEditor
的用法示例。
在下文中一共展示了WorldEditor.getUserMode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: enterItemSnapMode
# 需要导入模块: import WorldEditor [as 别名]
# 或者: from WorldEditor import getUserMode [as 别名]
def enterItemSnapMode( self ):
newLoc = None
newLoc = Locator.ChunkObstacleToolLocator()
t = self.itemTool
if self.itemSnapMode == 0:
newLoc = self.itemToolXZLocator
t.delView( "stdView" )
t.size = 1
#½øÈë±à¼Ä£Ê½
if ( WorldEditor.getUserMode() == 0 ):
t.addView( self.itemToolPlaneView, "stdView" )
WorldEditor.addCommentaryMsg( "Entering free snap mode" )
elif self.itemSnapMode == 1:
newLoc = Locator.TerrainToolLocator()
t.delView( "stdView" )
t.size = 1
if ( WorldEditor.getUserMode() == 0 ):
t.addView( self.itemToolTextureView, "stdView" )
WorldEditor.addCommentaryMsg( "Entering terrain snap mode" )
elif self.itemSnapMode == 2:
newLoc = Locator.ChunkObstacleToolLocator()
t.delView( "stdView" )
t.size = 1
if ( WorldEditor.getUserMode() == 0 ):
t.addView( self.itemToolModelView, "stdView" )
WorldEditor.addCommentaryMsg( "Entering obstacle snap mode" )
else:
#WorldEditor.addCommentaryMsg( "Unknown snap mode" )
WorldEditor.addCommentaryMsg( "" )
#finally, recreate the functor
self.itemTool.locator.subLocator = newLoc