Control via command port

A public forum for discussing and asking questions about OctaneVR.
Post Reply
akc
Posts: 5
Joined: Fri Jun 12, 2015 8:28 pm

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,
akc,
User avatar
bepeg4d
Octane Guru
Posts: 10345
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy
Contact:

Hi,
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:
http://render.otoy.com/universe.php#51L ... and%20Line
Is this something similar to what you are looking for?
ciao beppe
akc
Posts: 5
Joined: Fri Jun 12, 2015 8:28 pm

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:
https://www.youtube.com/watch?v=8ZUA2nRm0GM

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?

Ciao,
akc
User avatar
bepeg4d
Octane Guru
Posts: 10345
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy
Contact:

hi,
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
Post Reply

Return to “OctaneVR Questions & Discussion”