Calling an online MAXScript from 3DSMAX?

Hi!

As I slowly tidy some of my auto-rigging scripts for the public release, I wondered one thing, and wanted to know if you guys knew something about it. I e-mailed the code to a friend in order to help me clean it, and probably one of the best ways to manage changes and commits is through GitHub. So I wanted to know if you guys knew if there was a way to call an on-line script from 3DSMAX (or even Maya), located in a remote server (not local, but Internet). Meaning that I have the onlne path to my code and I just import it and use it, but the code is not local. What I was picturing in my mind is something like the ‘import’ from Python or the ‘fileIn’ command in MAXScript. Or even referencing the code as if it was a scene.

Do you know if this is possible? Maybe it’s a silly question, so please bear with me on this :slight_smile:

Thanks a lot!

It’s possible:
you can use dotnet ( System.Net.WebClient ) to pull the source from some url ( using webclient’s DownloadStringAsync() ). Assign a DownloadStringCompleted event handler to the web component, once triggered the downloaded text is in the events .Result property. Which is the downloaded string in that case. If that’s a valid maxscript source, you can simply use maxscript’s execute() on it

Why would you want to do that? The way you should do it is setup a git repository and work locally along with your friend and commit/sync changes as much as you can.

The question here in my opinion would be on how can you commit changes to a github repository in an easy way using max or maya. Maxplus might come to your help here and I’m sure there are tons of scripts to do this for Maya.

If not you will end up writing your own versioning/control system and thus waste time you should be doing developing other cool stuff!

Hope this helps, if you need some more tips just drop me a note.

[QUOTE=Kameleon;24027]

The question here in my opinion would be on how can you commit changes to a github repository in an easy way using max or maya.[/QUOTE]

Not that I’ve done it, but theoretically from Max you can run Git command lines via mxs using DOSCommand , ShellLaunch, or HiddenDoscommand

Thanks for all the answers! I’ll look in more detail to all of them, to see what I come up with (if I find the time to do so…).

Kameleon, my idea was to develop a script that the user does not have to update for every release I do, as that script will always call the same code from the same location. I agree git is the way to handle the code between me and my friend, and even for the users to download the latest versions and stuff. But I tried to picture a more direct way for not-advanced users to use my scripts: my code is usable but it needs a lot of redo and error-checking. So instead to tell the user ‘hey, download this because I fixed this and this and that’ every week I thought that maybe it could be avoided if the user could always launch the same tool, which launches the latest commited version. Think about it as an ‘automatic deployment’ script, but without doing anything on the client side.

Thanks again!

Sure, seems like a plan, but like Mambo4 said, can’t you do a git push for example? This in a startup script would ensure your users always have your latest version.

Sounds like a plan? :slight_smile: Cheers, let us know where you got to.