In the version of the upbge alpha 0.3, there is an error with the script below to load the cutscene of my game, it does not replace the material with the video, I would like to report this error I do not know if I am in the right place, grateful for the attention
######################################################
Movie.py Blender 2.6
Tutorial for using Video.py can be found at
www.tutorialsforblender3d.com
Released under the Creative Commons Attribution 3.0 Unported License.
If you use this code, please include this information header.
######################################################
#import bge
import bge
get the current controller
controller = bge.logic.getCurrentController()
get object script is attached to
obj = controller.owner
check to see variable Video has been created
if “Video” in obj:
# get video
video = obj["Video"]
# update the video
video.refresh(True)
if variable Video hasn’t been created
else:
# get current scene
scene = bge.logic.getCurrentScene()
# get matID for the movie screen
matID = bge.texture.materialID(obj, "MA" + obj['material'])
# get the texture
video = bge.texture.Texture(obj, matID)
# get the name of the movie
movieName = obj['movie']
# get movie path
movie = bge.logic.expandPath('//' + movieName)
# get movie
video.source = bge.texture.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:
video.source.repeat = -1
# no looping
else:
video.source.repeat = 0
# start the video
video.source.play()