本文整理汇总了Python中GameLogic.expandPath方法的典型用法代码示例。如果您正苦于以下问题:Python GameLogic.expandPath方法的具体用法?Python GameLogic.expandPath怎么用?Python GameLogic.expandPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameLogic
的用法示例。
在下文中一共展示了GameLogic.expandPath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: print
# 需要导入模块: import GameLogic [as 别名]
# 或者: from GameLogic import expandPath [as 别名]
import dao
import numpy as np
import serial
import xinput
import gnoomutils as gu
import sys
import time
import GameLogic
try:
GameLogic.Object
init = 0
except:
init = 1
blenderpath = GameLogic.expandPath('//')
if init:
print(blenderpath)
GameLogic.Object = {}
print("BLENDER: GameLogic object created")
GameLogic.Object['closed'] = False
GameLogic.setLogicTicRate(60)
mice = xinput.find_mice(model="Mouse")
m = [mice[0],mice[1]]
for mouse in m:
xinput.set_owner(mouse) # Don't need this if using correct udev rule
xinput.switch_mode(mouse)
示例2:
# 需要导入模块: import GameLogic [as 别名]
# 或者: from GameLogic import expandPath [as 别名]
# if video hasn't been added
else:
# import VideoTexture module
import VideoTexture
# get matID for the movie screen
matID = VideoTexture.materialID(obj, "MA" + obj['material'])
# get the texture
video = VideoTexture.Texture(obj, matID)
movieName = obj['movie']
# get movie path
movie = GameLogic.expandPath('//' + movieName)
# get movie
video.source = VideoTexture.VideoFFmpeg(movie)
# set scaling
video.source.scale = True
# save mirror as an object variable
obj["Video"] = video
# check for optional loop property
if "loop" in obj:
# loop it forever
if obj['loop'] == True: