Closed juggernate closed 11 years ago
What about execfile
instead of trying to manipulate sys.path
? The executed file can do those manipulations itself for instance.
Ya if it is going to run the full file at all, the execfile approach at least removed the need for the pythonpath mods. I think we should split off and merge your other contributions and then address this full file run in another pass.
My master branch no longer sends the full file if you want to merge. Others and I like to work this way (sending the whole file), so I will look into execfile
in another branch.
Thanks! If you end up doing the execfile approach, I will merge that too.
Added the ability to source MEL file or import and reload python module. This sends the current view/file if nothing is selected via the same command. Added language detection to the command so removed the explicit language arg. This also allows for a single context menu item which was added.
Perhaps the language arg could stay in, but I couldn't quite figure out a single "Send to Maya" context menu item with it, plus it gets ignored with the language detection in the command.
Tested on Windows and Mac, but not on Linux.