Ok, this is a bit of a tricky one... I've got a tool that pumps out multiple different playblasts. Each of them loads up in it's respective player.
What I need to do is to get these things to play sequentially in a player... probably in a playlist of sorts. My problem is that I can't find any appropriate module to get access to the controls of a media player. I know there's pywin, but that's only good for 32 bit systems (if there is a 64 bit version, I can't find it...).
Has anybody any ideas? Suggestions?
Well media player can be commanded form command line also. Sp ypu culd just opt for that, if you really need com you could use powershell.
Aside from this pyWin does even in 32 bitness work on 64 bit os with a few caveats. (32 bitness in it self does not mean it wont work in a 64 bit sytem, because quite frankly half of everything wouldn't if thet was the case)
Thanks once again Joojaa! It seemed to be as simple as calling the maya.mel command "system" and using the path of the media player executable and the files I want to load afterwards!
python has its own sytstem module that you should use insetad of the mel equivalent.
Really? How would you do it in Python? I (with my limited experience) couldn't find it. ![]()
QUOTE(robchis @ 05/07/08, 11:38 AM) [snapback]285187[/snapback]
Really? How would you do it in Python? I (with my limited experience) couldn't find it. ![]()
Maya documentation documents maya interfaces, not python (atodesk does NOT make python so its not their job to document pythons own modules, they document their interoperability document thats it. Theres far too much stuff t document in python for one player in the field, henece each module maker documents their module).
So go to:
http://docs.python.org/lib/lib.html
more accurately:
http://docs.python.org/lib/os-process.html
but basically:
CODE
import os
#use sytemn for launching stuff
os.system("type your command here")
Now mayas system returns the output of said string but python is just a c implementation of system call so youd better use:
CODE
import os
#use file opened pipes if you need to return stuff.
handle=os.popen("dir")
data=hande.read(-1)
returnStatus=handle.close()
For more esoteric stuff read the doecs of the os module
Jooja, l'm gonna buy you a beer when you cruise through Sydney, Australia! Thanks bro! ![]()