Compiling Blender to Increase Vertex Colour Layers

Blender usually comes with a limit of 8 vertex colour layers that can be applied to an object. As the VI-Suite uses vertex colour layers to visualise results this means that, in effect, only 8 steps of an animation can be visualised. To increase the permitted number vertex colour layers some changes are required to the Blender source code, and then Blender must be compiled. The Blender source code can be downloaded from http://www.blender.org/download/. In side the source archive file is a directory called source. Relative to this source directory the source code changes required to the 2.69 version are as follows:

  • Line 182 in the file source/blender/makesdna/DNA_customdata_types.h should be changed from ‘#define MAX_MCOL    8’ to  ‘#define MAX_MCOL   256’ or however many vertex colour layers you want. I have tested up to 256.
  • Line 143 in source/blender/render/extern/include/RE_shader_ext.h should be changed from ‘ShadeInputCol col[8];’ to ‘ShadeInputCol col[256];’

Instructions for compiling Blender for different platforms can be found here http://wiki.blender.org/index.php/Dev:Doc/Building_Blender

Leave a Reply

Your email address will not be published. Required fields are marked *