View Full Version : Passing a variable to a web interface?

04 April 2006, 01:12 AM
Is it in any way possible to pass a value/variable to a web interface? either using mel, java, or a combination. im not familiar with c++ at all, so api is probably out of the question. however i might be able to use perl if neccesary.

04 April 2006, 09:35 PM
i don't think mel offers this option. but you can execute any programm from within mel with the system-command. if your programm is command-line driven you should be able to overgive it any parameter.
another idea would be to write out an ascii-file which contains all things you want to do from the command line as a batch-file and execute it.
good luck !

04 April 2006, 01:49 AM
I had in mind a javascript based slider or something along those lines linked to an attribute in realtime. not sure if that method would be fast enough to make it work properly.

04 April 2006, 02:10 AM
If you're using PHP, you can have it load a website, like page.php?variable=variablevalue

That's what I'd suggest.

04 April 2006, 02:45 AM
One thing you might consider is using `commandPort.` Basically, you can open up a communication port with Maya using this command, and then whatever language you're using could get the values of variables just by sending the MEL commands to print them out, because the output of the command is sent back over the port by default when you use commandPort.
I know that most of the major scripting languages - perl, python, php, ruby, etc. - can handle this without a problem, so you could definitely use commandPort to get variables, attributes, pretty much anything into a web interface.

CGTalk Moderation
04 April 2006, 02:45 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.