本文整理汇总了Python中WorldEditor.getOptionVector3方法的典型用法代码示例。如果您正苦于以下问题:Python WorldEditor.getOptionVector3方法的具体用法?Python WorldEditor.getOptionVector3怎么用?Python WorldEditor.getOptionVector3使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WorldEditor
的用法示例。
在下文中一共展示了WorldEditor.getOptionVector3方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: edtMiscSnapsXExit
# 需要导入模块: import WorldEditor [as 别名]
# 或者: from WorldEditor import getOptionVector3 [as 别名]
def edtMiscSnapsXExit( value ):
if value[-2:] == "cm":
floatValue = float(value[:-2])/100.0
elif value[-1] == "m":
floatValue = float(value[:-1])
else:
floatValue = float(value)
ns = WorldEditor.getOptionVector3( "snaps/movement" )
WorldEditor.setOptionVector3( "snaps/movement", ( floatValue, ns[1], ns[2] ) )
示例2: edtMiscSnapsXUpdate
# 需要导入模块: import WorldEditor [as 别名]
# 或者: from WorldEditor import getOptionVector3 [as 别名]
def edtMiscSnapsXUpdate():
snaps = WorldEditor.getOptionVector3( "snaps/movement" )
return "%0.1fm" % (snaps[0], )
示例3: spdMiscSnapsZAdjust
# 需要导入模块: import WorldEditor [as 别名]
# 或者: from WorldEditor import getOptionVector3 [as 别名]
def spdMiscSnapsZAdjust( value, min, max ):
snaps = WorldEditor.getOptionVector3( "snaps/movement" )
newSnaps = (snaps[0], snaps[1], value)
WorldEditor.setOptionVector3( "snaps/movement", newSnaps )
WorldEditor.addCommentaryMsg( "Movement snaps are %0.1f,%0.1f,%0.1f" %
(newSnaps[0],newSnaps[1],newSnaps[2]) )
示例4: actShellSnapsExecute
# 需要导入模块: import WorldEditor [as 别名]
# 或者: from WorldEditor import getOptionVector3 [as 别名]
def actShellSnapsExecute():
WorldEditor.setOptionVector3( "snaps/movement", WorldEditor.getOptionVector3( "shellSnaps/movement" ) )
WorldEditor.setOptionFloat( "snaps/angle", WorldEditor.getOptionFloat( "shellSnaps/angle" ) )
newSnaps = WorldEditor.getOptionVector3( "snaps/movement" )
WorldEditor.addCommentaryMsg( "Movement snaps are %f,%f,%f" % (newSnaps[0],newSnaps[1],newSnaps[2]) )
WorldEditor.addCommentaryMsg( "Rotation snaps are %f" % WorldEditor.getOptionFloat( "snaps/angle" ) )