Hello!
I decided to create a little asset manager on my spare time for my future personnal projects. I know the basics in programming (mostly MEL), so I thought it’ll be nice to do this manager to improve my script knowledge.
I managed to do a lot of things, like browse into a specific directory, show specific files depending their extensions, etc. I also wanted to make a screenshot of my files, in order to have a thumbnail, but I’m stuck there.
Here’s the thing:
Let’s say I have a scene opened - work.ma.
I load my asset manager and I realize that a file (toto.ma) doesn’t have a thumbnail; I click on the button “update toto.ma thumbnail” and a thumbnail is made.
So far I got the thumbnail procedure (creating the cam, doing the playblast on one frame, saving the pic etc), but I don’t want to merge my current opened scene (work.ma) with the toto.ma scene as the file -o does.
Basically, what I want to do is something like that:
> Start a new instance of Maya
> Open toto.ma in it (I got this part with the system command)
> Run my thumbnail creator script in this new Maya
> Close toto.ma scene.
So after long researches on internet, I read that command lines could be a solution for what I want, like creating a .bat calling something like “maya -batch -file toto.ma -script thumbnail.mel”, but every try I make is unsuccessful (maya isn’t recognized as a command, the path doesn’t exist …) and it’s still very hard to understand for me.
Can anyone help me
?
Thank you very much in advance!
!