Page 1 of 1

Control via command port

PostPosted: Thu Jul 30, 2015 10:20 am
by akc
Hello everybody,

there is a MEL/Python command in Maya called commandPort, which makes it possible to control Maya from other application or even other workstation via port. Can we do the same with Octane? I could for example write my application in Python and then just send Lua commands via port to Octane.

I can imagine that such port communication could be a part of core Lua functionality (which is the case in Python), but then we need something like eval-function to execute commands as text inside of the running Lua instance. It would be great to have something like Maya's mel.eval() for Octane. I'm not a Lua programmer and if I search in Lua API Browser for ports or script evaluations I get only 'scriptExecuteType'., but it does not really answer my question.

Best regards,

Re: Control via command port

PostPosted: Thu Jul 30, 2015 2:43 pm
by bepeg4d
as far as I know, there is no python support, so the only way is Lua for now, but you can launch Octane via command line and execute a Lua script: ... and%20Line
Is this something similar to what you are looking for?
ciao beppe

Re: Control via command port

PostPosted: Thu Jul 30, 2015 10:17 pm
by akc
Hi beppe,

it's similar idea, though the important difference is that the command line script can be executed only once.

Take a look at this example:

The one step you can not see in this video is the port opening in Maya.

If I would use words instead of commands, then it could look like this (U means User, M means Maya):
U (from Maya): Soo, Maya, please open the port "12345"
M: Ok, now it's open and I'm listening to it.
U (from custom app): Nice. Now I'm sending message 'create a sphere' to port "12345".
M: Got message "create a sphere" from port "12345". Ok, the sphere is created.
U (from custom app): Cool, now move it to (0,0,1)
M: No problem, moved sphere to (0,0,1)
and so on...

Do know what I mean?


Re: Control via command port

PostPosted: Fri Jul 31, 2015 8:30 am
by bepeg4d
since I am not a Maya user, I have asked to JimStar (the Maya developer) and he has confirmed my thought. Here is his answer:

No, this is not possible.
Any LUA functionality can only be supported on the Octane engine level, so it's nothing to do with Maya plugin...
But if the user can access the MEL/Python using this Maya functionality - they should be able to call the Maya's "octane" command (which is supported by the plugin) and do some things using this command...

ciao beppe