Advertisement

You're blocking ads, which pay for BlenderNation. Read about other ways to support us.

Blender Python bindings for Notepad++

31

Notepad++ is an open source text editor for Windows. With Murat Egretli's Python bindings, it becomes a nice tool for editing Blender Python scripts.

Murat Egretli (Demohero) writes:

Hi there,

I wrote an xml file for Nodepad ++ This xml file contains every Blender 2.5 Python API modules. There are totally 7687 code in it. You can easily autocomplete them. I'm going to update this xml file until the stable version.

Here are the modules contained:

Application Modules

  • Data Access (bpy.data)
  • Operators (bpy.ops)
  • Types (bpy.types)
  • Utilities (bpy.utils)
  • Application Data (bpy.app)
  • Property Definitions (bpy.props)

Standalone Modules

  • Math Types & Utilities (mathutils)
  • Font Drawing (blf)

Game Engine Modules

  • Game Engine bge.types Module
  • Game Engine bge.logic Module
  • Game Engine bge.render Module
  • Game Engine bge.events module

What you need to do:

  1. Install notepad ++ . Click here to download.
  2. From Program Files, open Notepad++ > plugins > APIs folder.
  3. Dowload python.xml file and copy it this folder and replace the original one.Click here to download the xml file.
  4. Open nodepad++, change language to Python and create perfect Python scripts with the help of autocomplete function. (Ctrl Spacebar)
  5. Linux users can install this text editor with wine. Click here to download wine.

31 Comments

  1. brilliant stuff! I use Notepad++ to write python for blender and this is exactly what I've been wishing for. Thanks!

  2. Yeah I use N++ for all my text, SQL, PHP..... in fact..... all my text needs. It simply rocks!!

    When you have a language selected, press Ctl + Space, and you have member selection!!!

    Trust me this is a GREAT tool!

  3. :) very very nice. At times I want to scream.. stop with all the progress. I simply can not keep track of it all.. :)

  4. this is really great !!!
    I can't stand the text editor in Blender.
    but is it possible to run the py from N++ to blender or do you have to copy&paste the code in blender then ?

  5. Nice to see that you like it.

    Nodepad++ has intelligence feature like Visual Studio. You don't have to press Ctrl Spacebar every time. Open Nodepad++, go to Settings > Preferences > Backup/Auto-Completion tab and enable auto completion on each input. When you want to write a piece of code, it automatically suggests structures without pressing any hotkeys.

    Demohero.

  6. What ever happened to the GSoC improvements to the internal Blender text editor? It could do code completion as well. It was very nice, but not in Blender anymore...

  7. Good contribution. It's accelerating the Python coding process.
    francoisgfx if I understand your question you ask if it is possible to write code in N++ then having it work directly in Blender. That is correct.

    Just edit the script in N++.

    Save the script.

    Back in blender text editor interface with the same script displayed you will see a little red icon.

    When you mouseover the icon you get the popup:
    "External Text out of sync"

    Click on the icon and select
    "Reload from disk"

    You will have the fresh code right there :)

  8. I'm confused. There's already a file called python.xml in me APIs folder. Should I replace it or just rename one of the two?

  9. Hey, any chance this might be convertable to Kate, the KDE Advanced Text Editor? Here on Linux, it's what I use (though I use Notepad++ on Windows).

    This is awesome though. Very awesome.

  10. I wish we had compatibility with the very same XML system for the blender text editor to use all the syntax plugins available for notepad++ .

  11. Question: How about the regular python stuff already in notepad... is it a good idea to overwrite that? Wouldn't you want both the regular python autocomplete to work and the blender stuff?

  12. Tynach

    I'm not a Linux user. I'm very new to it. I wish I knew how to convert this xml file into Kate.

    Btw, you can always edit this xml file. You can create your own syntax structures.

    macouno

    Original Notepad++ python stuff is already in this xml file. I didn't delete them; overwriting is not a problem.

    Demohero.

  13. Blending BriGuy on

    How about eventually making use of the open-source nature of Notepad++ by integrating it directly into the Blender installation? I remember all the unnecessary effort of keeping old Yafray integrated with new versions of Blender, putzing around trying to locate and delete all old traces of helper files and environment variables and pointers every time it broke. Manually configuring a text editor might not be anywhere near as difficult as all that, but it also seems like something that could be fully integrated into a stable Blender 2.6 distribution! Would it be a large undertaking or just a matter of tweaking a few lines of code to fit it into the trunk?

  14. Hello.
    Macuno, I too think that instead of overwriting the python.xml file (that contain aprox 290 python keywords).
    An idea would be to:

    One time edit the current N++ python.xml
    Paste the 7687 codes into that file then save.

    The next time N++ would open, the standard Python auto-complete keywords and the Blender's specifcs will be available. I will test that if if works.

  15. I've been using Notepad++ for a couple of years now and never regretted it. Before that I used "Less Than Slash" but it was totally blown out of the water by Notepad++.

    :)

  16. Blending BriGuy on

    Direct native integration into Blender 2.6 please, by the time bmesh is completed. Major win if that could be done.

  17. Hey, it seems to be the solution I was looking for for decades at least.
    But still.
    The link's dead.
    I feel very frustrated.

Leave A Reply

To add a profile picture to your message, register your email address with Gravatar.com. To protect your email address, create an account on BlenderNation and log in when posting a message.

Advertisement

×