[Bf-committers] Some Ideas for a Blender Plugin System

Martin Felke martin.felke at t-online.de
Sun Nov 1 16:11:54 CET 2015

Hi, today i was thinking a bit about possible approaches on how to 
add a C / C++ Plugin system to blender.
This is a short (a bit unsorted) list of my thoughts and might serve as
discussion start point perhaps.

Blender Plugin System 
- Idea: Have a modularized approach, add C/C++ to core without
  modifying it later
- track presence of modules and status (OK, Not Functional, Changed)
- store Plugin Data separately from Blend (e.g. FM simulation / 
  shard data), so core can start with basic blend only if plugin is 
  absent can try to load plugin while loading data
- dynamic compilation of module sources via Python / CFFI or LLVM, 
  as in OSL Nodes
- access core api thru bpy or directly thru RNA or even DNA
- source distribution of plugins is C / C++  + some py Wrapper 
  for autocompile or binary distribution in case no compiler is present
- plugins have certain structure and versions for all OS; 
  Hash, Version, source, binaries
- should be installable and activatable like addons
- pack CFFI and distutils to python distro of blender
- windows fix: declspec, symbol export so linking will work
- plugin development addon: provide DNA / RNA headers 
  (and C sources or precompiled stuff) + project generators
  for standard IDEs, to give a starting point for plugin devs
- core support: - Plugin Management system which handles plugins
                - modify ID and Non-ID base structures to include 
		  info about plugin origin
                - save,load data per plugin / chunked 
		  (and bundle differently together)
                - plugin crash handler 
		  (so not the entire core goes down with a 
		  failing plugin)

- plugins should expose py api too, so addons can build upon them too
- plugin repos and updating / automatic compilation system 
  (after update) ?       

More information about the Bf-committers mailing list