Blender Python bindings for Notepad++

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.

Twitter



Please support us

  • http://mikepan.com mike pan

    VERY nice, I’ll be using this for sure.

  • Kove

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

  • Grandmaster B

    Nice! I’ll also use this :)

  • saKamal

    Nice! :)

  • http://www.dustyghost.com dusty

    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!

  • Gregzilla

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

  • http://www.francois-tarlier.com francoisgfx

    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 ?

  • http://4museman.wordpress.com 4museman

    Cooool! That is very handy thing. Thanks a lot!!

  • kattkieru

    Brilliant! Thanks for that!

  • http://www.løl.com Jasper

    I doubt that i can write perfect pythonscripts even with this, but I was looking for a program like Notepad++ !!

  • http://foreverblender.blogspot.com Demohero

    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.

  • ijstaart

    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…

  • http://guerrierhardcore.com guerrierhardcore

    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 :)

  • http://www.dustyghost.com dusty

    @Demohero Thanks for the tip!! I’ll use that allot.

  • http://arnaud.ile.nc/sce Piiichan

    Cool thanks!

  • Thomas

    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?

  • http://www.qso.com/carlautta/colin/Beta/ Tynach

    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.

  • Ray

    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++ .

  • http://www.macouno.com macouno

    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?

  • http://foreverblender.blogspot.com Demohero

    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.

  • George

    I’ve heard of Notepad++ before and just never gotten around to installing it. Now, I definitely will!

  • Blending BriGuy

    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?

  • http://portfolio.plecxus.com/ kursad

    Hey Murat

    Thanks for the file. I am a Vim user so I probably turn this into a Vim Python dictionary file.

  • http://guerrierhardcore.com guerrierhardcore

    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.

  • http://imagivation.org Paul Hastings

    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++.

    :)

  • http://whimsycoll.com Whimsy Collective

    Hmmm… hooking textmate to Blender Python.

  • Blending BriGuy

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

  • Aristocrata

    Very nice! I love Blender and I Love NPP!

    Some chance of a Netbeans plugin for Blender?

  • http://www.wraybowling.com Wray Bowling

    YESSS!! I started using NOtepad++ just this year. This is like a dream come true. :)