PDA

View Full Version : execute "menuitem pressed" from script?


bdeda
03-06-2006, 06:27 PM
I'm working with AI Implant trying to script some of it's native functionality into some batch processes. I've used the macrorecorder to pick up some of the function calls the menu selections execute, but cannot reliably get those to work.

for example, when creating a MeshBarrier via the menu selection, the macrorecorder returns Global_Menu.Global_Interface.Create MeshBarrier ()

using "MeshBarrier()" in a script works most of the time.

when creating a NavMesh, the macrorecorder returns
Global_Menu.Global_Interface.Create NavMesh ()

trying to execute "NavMesh()" in the listener spits out
-- Type error: Call needs function or class, got: undefined

I was wondering if there is a way to mimic the menuitem pressed action from the menuitem interface, possibly finding the menu, then submenu, then execute the command it calls within the plugin?

stebbing
04-19-2006, 02:02 PM
It could be that you must have the currently selected item in Max be your AI Implant barrier when the NavMesh command is run. If something else is selected then it would fail.
--Randy

I'm working with AI Implant trying to script some of it's native functionality into some batch processes. I've used the macrorecorder to pick up some of the function calls the menu selections execute, but cannot reliably get those to work.

for example, when creating a MeshBarrier via the menu selection, the macrorecorder returns Global_Menu.Global_Interface.Create MeshBarrier ()

using "MeshBarrier()" in a script works most of the time.

when creating a NavMesh, the macrorecorder returns
Global_Menu.Global_Interface.Create NavMesh ()

trying to execute "NavMesh()" in the listener spits out
-- Type error: Call needs function or class, got: undefined

I was wondering if there is a way to mimic the menuitem pressed action from the menuitem interface, possibly finding the menu, then submenu, then execute the command it calls within the plugin?

CGTalk Moderation
04-19-2006, 02:02 PM
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.