Results 1 to 13 of 13
  1. #1
    Member Nutti's Avatar
    Join Date
    Sep 2014
    Location
    (x, y, z) / Colorful Pico
    Posts
    207

    Fake bpy modules (For Code Auto-completion on IDE)

    Hi,

    Blender does not python API as python files, so only few APIs can be completed code automatically by IDE (PyCharm, Eclipse).
    Therefore, I made a fake python modules for a code auto-completion on IDE.

    https://github.com/nutti/fake-bpy-module

    Supported Blender Version: 2.79

    If you want to try the fake modules, copy whole files on https://github.com/nutti/fake-bpy-mo...r/modules/2.79 to your project directory.

    I will show you an example in PyCharm.

    twi_20171028.png

    Any requests and comments are welcome.

    Have a fun for bpy coding!!



  2. #2
    You're so awesome for this.

    In Pycharm you can add it as a "Path For The Selected Interpreter", so you don't have to copy folder to your project directory.
    Last edited by cmomoney; 27-Oct-17 at 22:37.
    "Yeah, well, some people meditate, some people get massages. I blend." -Will Smith in Enemy of the State
    AddOn:Store Cameras AddOn:MakeRope AddonOn:Background Image Settings to Frame



  3. #3
    Member rombout's Avatar
    Join Date
    May 2011
    Location
    Curaçao
    Posts
    1,045
    Does this work with Brackets?

    Do i need to follow the steps in the gitHub page and then add "from gen.py import * orso? Not sure what to do with the gen.py file



  4. #4
    No homo, but I love you...
    Currently working on my game idea, modeling all day long, not a bad life.
    Check out my 3D models on TurboSquid: http://www.turbosquid.com/Search/Art...ral=antoni4040



  5. #5
    Interesting addon(?)! It seems like there's some stuff missing though, like scene, data, things under context.



  6. #6
    Member Nutti's Avatar
    Join Date
    Sep 2014
    Location
    (x, y, z) / Colorful Pico
    Posts
    207
    @cmomoney

    Thanks.
    You are right.


    @rombout

    sorry, the procedure in GitHub is for module generation.
    if you want to fake bpy module, you only need to add modules on https://github.com/nutti/fake-bpy-mo...r/modules/2.79 to the path on IDE's project .


    @antoni4040

    you are welcome


    @Cyaoeu

    ah..., you are right.
    but we can not get these things from Blender's documentation.
    If there is idea to get them, please tell me...



  7. #7
    Originally Posted by Nutti View Post
    @Cyaoeu

    ah..., you are right.
    but we can not get these things from Blender's documentation.
    If there is idea to get them, please tell me...
    Yeah I'm not sure either. Besides it's pretty obvious that stuff like context won't work because there's no Blender scene anyway. :P Still it would be interesting if you could "fake" objects too. But I guess I do things like this in the python console anyway (and then copy paste) so it doesn't matter too much.



  8. #8
    Member Nutti's Avatar
    Join Date
    Sep 2014
    Location
    (x, y, z) / Colorful Pico
    Posts
    207
    @Cyaoeu

    yes, it's future tasks about it.
    Anyway, thanks for your pointing out.



  9. #9
    Member rombout's Avatar
    Join Date
    May 2011
    Location
    Curaçao
    Posts
    1,045
    I will need to dive into this and see if this is helpfull.

    I dont compelte understand what the benefit of this addon is. Does this addon autocomplete you code in PyCharm and also check for possible errors in the code and functions, classes etc etc?



  10. #10
    Member Nutti's Avatar
    Join Date
    Sep 2014
    Location
    (x, y, z) / Colorful Pico
    Posts
    207
    @rombout

    I dont compelte understand what the benefit of this addon is
    No, it is not add-on.
    it is modules for only add-on developers.

    we can auto-complete add-on codes in PyCharm or VSCode.
    I was in trouble about that there is no module which can auto-complete bpy code.
    so, i use this modules for auto-completion and make the development faster.



  11. #11
    Member pitiwazou's Avatar
    Join Date
    Jul 2013
    Location
    France
    Posts
    2,833
    We did something similar !



    Pycharm is really great with template and auto complete !



  12. #12
    Originally Posted by pitiwazou View Post
    We did something similar !

    Pycharm is really great with template and auto complete !
    Thanks, this worked great. Would have been easier with an english video though.



  13. #13
    Member Nutti's Avatar
    Join Date
    Sep 2014
    Location
    (x, y, z) / Colorful Pico
    Posts
    207
    @pitiwazou

    nice tutorial !!
    my module can be adapted same way



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •