Control via command port

Forums: Control via command port
A public forum for discussing and asking questions about OctaneVR.

Control via command port

Postby akc » Thu Jul 30, 2015 10:20 am

akc Thu Jul 30, 2015 10:20 am
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,
akc
 
Posts: 5
Joined: Fri Jun 12, 2015 8:28 pm

Re: Control via command port

Postby bepeg4d » Thu Jul 30, 2015 2:43 pm

bepeg4d Thu Jul 30, 2015 2:43 pm
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
User avatar
bepeg4d
Octane Guru
Octane Guru
 
Posts: 6705
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy

Re: Control via command port

Postby akc » Thu Jul 30, 2015 10:17 pm

akc Thu Jul 30, 2015 10:17 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
akc
 
Posts: 5
Joined: Fri Jun 12, 2015 8:28 pm

Re: Control via command port

Postby bepeg4d » Fri Jul 31, 2015 8:30 am

bepeg4d Fri Jul 31, 2015 8:30 am
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
User avatar
bepeg4d
Octane Guru
Octane Guru
 
Posts: 6705
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy

Return to OctaneVR Questions & Discussion


Who is online

Users browsing this forum: No registered users and 1 guest

Thu Nov 21, 2019 12:54 am [ UTC ]