[Bf-committers] Languages other then python in Blender 2.5?

GSR gsr.b3d at infernal-iceberg.com
Fri Feb 13 18:34:31 CET 2009

allen at soard-web.com (2009-02-12 at 2211.14 -0800):
> I don't think which language a script is written in will be a big issue, 
> as even now the scripts already shipping with blender have a hash bang 
> prompt which tells the interpreter which language it was written in.  
> That could be part of the extension specification.  If you write a api 
> hook, you need to specify what hash bang prompt to look for.  If you're 
> running a preexisting script, it will already be embedded. For those non 
> Linux types who don't know what a has bang prompt is,  here's an example 
> from one of blender's bundled scripts
> #!BPY

The best would be to keep a magic string, but stop misusing the Unix
traditional shebang. Yes, I know it is rare to have an exec named BPY
in the working directory, but it does not mean it will never happen.
The correct line exec would be something like "#!/usr/bin/env blender
-P" if sheband has to be used.


More information about the Bf-committers mailing list