Updating version ids in Blender addons automatically with Notepad++

Blender addons use a version identifier that consists of three numbers, for example:
bl_info = {
 "name": "Awesome object generator",
 "author": "Me",
 "version": (1, 0, 20150425140302),
 "blender": (2, 74, 0),
 "location": "View3D > Add > Mesh",
 "description": "Adds an awesome object at the 3d cursor",
 "warning": "",
 "wiki_url": "",
 "tracker_url": "",
 "category": "Add Mesh"}
I do virtually all addon development with the help of Notepad++ and I really wanted to have a way to automatically update this version information when I change something. Cvs (and svn) have functionality to update specific strings but I wanted to use this addon version information because having two different tags doesn't sound logical to me. Fortunately with the help of the Python Script plugin for Notepad++ it is quite simple to create a save event listener that does exactly what I want:
from datetime import datetime

# Just in case, we'll clear all the existing callbacks for FILEBEFORESAVE
notepad.clearCallbacks([NOTIFICATION.FILEBEFORESAVE])

def ts(m):
 dt=datetime.now()
 ds=dt.strftime("%Y%m%d%H%M%S")
 return m.group(1)+ds+m.group(3)
 
# Define the function to call just before the file is saved
def addSaveStamp(args):
 currentBufferID = notepad.getCurrentBufferID()
 notepad.activateBufferID(args["bufferID"])
 editor.rereplace(r"(version.*?\(\s*?\d+\s*,\s*\d+\s*,\s*)(\d+)(\s*\))", ts)
 notepad.activateBufferID(currentBufferID)
    
# ... and register the callback 
notepad.callback(addSaveStamp, [NOTIFICATION.FILEBEFORESAVE])
If you place that code in the startup.py file (typically in your roaming profile, for example: C:\Users\Michel\AppData\Roaming\Notepad++\plugins\config\PythonScript\scripts\startup.py ) and make sure the Python Script plugin is activated on startup (by selecting Plugins -> Python script -> Configuration -> Initialization = ATSTARTUP and restarting Notepad++) then any subsequent save will look for a version identifier and will replace the third number with a timestamp.

WeightLifter add-on: small bugfix release

Version 20150418 fixes a small bug that could show an error when using WeightLifter on a mesh with an associated particle system. The new version is of course available free of charge to people who have already purchased the add-on. Check the BlenderMarket page for more details.

Floor boards: additional pattern

The latest version (20150404) of the floor board addon adds a border option to the square pattern. Besides parquetry this might come in handy for wooden patio tiles and the like

Overview

The floor boards addon has quite some history on this blog and elsewhere so for convienience I've gathered the most important links here.

Download

The addon is available on GitHub. (Click to download it to any location on your PC, then in Blender go to File->User Preferences->Addons and choose Install from file. If you have a previous version of this addon you should not forget to remove the addon first by locating it in the list of addons and clicking Remove. The addon can be found under the Add Mesh category.)

Discussion

If you like you can give feedback on this addon in this blog or in this BlenderArtists thread.

History

Full Review: Blender Cycles Materials and Textures Cookbook, 3rd edition

Bigger and better


many revised editions of books offer just minor improvements but this book offers much, much more. Expanded to just under 400 pages it covers everything about Cycles in a clear and extremely detailed manner.

(click to go to publisher's site)
The author clearly knows what he is talking about and explains in a structured manner how Cycles works, how to set up node based materials and to design materials from the bottom up. That last part is crucial: in order to create a material that is believable or even photorealistic a lot of detail is needed. The best way to get results is to design from the bottom up and add layers of detail step by step and in this book this is illustrated in minute detail.

Another great addition to this edition is attention for special effects: features like fog, fire, global illumination or shadeless materials. Cycles is quite capable to create those effects but these are not always easy to configure. The new sections in this edition do an excellent job in explaining them.

pros:
  • up to date
  • detailed description of general concepts and specific materials
  • well structured
  • featurmaterials (like leather, stone) as well as effects (like fog, fire)
  • downloadable materials are a good starting library
  • quality of materials is excellent
cons:
  • hi-res illustrations must be downloaded separately (there are only lo-res ones in the pdf. This distracts greatly from the reading experience)
  • some more information on lighting would have been useful. This could easily fill a whole book itself but some information on this subject would make it easier to get the most out of these materials.
Conclusion:

Good value for your money.