autocompletion for maya python API on linux

fabsnip
2009-01-30
2013-03-15
  • fabsnip

    fabsnip - 2009-01-30

    Hi,
    I'm using pyDev (1.4.2) on eclipse (3.4.1) to work with maya python plugin API. On windows xp 32, I can get autocompletion working fine but on linux (opensuse 10.3 64 bits) autocompletion is not working. Except from that launching maya python plugins from eclipse work well on both platforms. I've seen a thread here saying that the issue was coming from autodesk. Could you confirm that? I've seen too that people didn't have autocompletion on macosx. Just wanted to know if it's coming from pyDev or autodesk.

    Cheers

     
    • Fabio Zadrozny

      Fabio Zadrozny - 2009-01-31

      Well, if it's working in one system, I see no reason why it's not working on another (maybe the pythonpath is not configured correctly on linux?).

      Do you have some error in your error log?

      Cheers,

      Fabio

       
    • fabsnip

      fabsnip - 2009-02-02

      Ok I've found the answer. It was not coming from the pythonpath (which is correctly set by eclispe) but your answer helped me anyway because you've said it HAS to work and... well... yes it works. The LD_LIBRARY_PATH has to be set before launching eclipse. I was setting it only at runtime with run configurations.

      Thanks,
      Fabrice

       
      • Fabio Zadrozny

        Fabio Zadrozny - 2009-02-02

        Nice to know :)

        In the next release, Pydev should be able to configure environment variables associated to each interpreter, so, this will be probably spotted more easily (as it's not always clear that the shells used from Pydev for code-completion inherit the settings where eclipse was started).

        Cheers,

        Fabio

         
  • Joao Montenegro

    Joao Montenegro - 2009-10-21

    Hi guys,

    I'm using PyDev 1.5.0 and Eclipse 3.5.1 to develop stuff for Maya (the 3d/vfx software package) . I've associated all the necessary Maya python libs with the interpreter (python 2.5) and everything seems to work fine except for the autocompletion/code analysis for the maya.cmds and maya.mel modules (which apparently dynamically create their functions). Which means that whenever I call anything from these modules (example: maya.cmds.sphere() ) pylint detects a "Undefined variable from import" because "sphere()" is generated dynamically in runtime.

    Is there any way of saying eclipse / pydev  / pylint to not analyse these maya.cmds and maya.mel modules to avoid these errors?

    So far I added a #@UndefinedVariable at each and every line of code that uses these modules, which is a pain and ugly (especially if someone else who doesn't use eclipse picks up these files)…

    Cheers,
      Joao

     
  • Joao Montenegro

    Joao Montenegro - 2009-10-21

    Forgot to say that I'm running this on Linux 64bit

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2009-10-22

    I haven't checked it here, but adding 'maya' to your forced builtins should work (to force that module to be dynamically analyzed).

    See: http://pydev.org/manual_101_interpreter.html

    Note: if that doesn't work, adding maya.cmds and maya.mel would be a 2nd try

    Cheers,

    Fabio

     
  • som3d

    som3d - 2010-05-07

    Hi,

    I updated my Eclipse-Suite from 3.4.2 to 3.5.2 and Pydev from ??? to 1.5.6.
    Now I have the same problem with 'Undefined variable from import' like jmont.
    I already added maya, maya.mel and maya.cmds to my forced builtins. A downgrade to 3.4.2 with the newest Pydev-version also didn't help.

    Any other suggestions to fix this problem?

    Thanks in advance,
    Markus

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks