当前位置: 首页>>代码示例>>Python>>正文


Python WorldEditor.getOptionVector3方法代码示例

本文整理汇总了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] ) )
开发者ID:siredblood,项目名称:tree-bumpkin-project,代码行数:12,代码来源:UIAdapter.py

示例2: edtMiscSnapsXUpdate

# 需要导入模块: import WorldEditor [as 别名]
# 或者: from WorldEditor import getOptionVector3 [as 别名]
def edtMiscSnapsXUpdate():
	snaps = WorldEditor.getOptionVector3( "snaps/movement" )
	return "%0.1fm" % (snaps[0], )
开发者ID:siredblood,项目名称:tree-bumpkin-project,代码行数:5,代码来源:UIAdapter.py

示例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]) )
开发者ID:siredblood,项目名称:tree-bumpkin-project,代码行数:8,代码来源:ToolbarUIAdapter.py

示例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" ) )
开发者ID:siredblood,项目名称:tree-bumpkin-project,代码行数:8,代码来源:ToolbarUIAdapter.py


注:本文中的WorldEditor.getOptionVector3方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。