[Bf-python] Python Scripts Error

Willian Padovani Germano wgermano at superig.com.br
Mon Jan 15 16:53:03 CET 2007


Hi,

Roger wrote:
> What does #!BPY mean in Blender Python Scripts.

Blender checks this when looking for scripts to register in menus. 
Without it, the file is ignored and so will not appear in a menu.

> Why do some scripts work when placed in the scripts folder and others do 
> not.

To be registered in Blender menus a script needs to be in one of the 
supported dirs (default or user defined scripts folder) and have a 
proper header, like this one (starting each line with '#' is optional) :

#!BPY

# """
# Name: 'Script Name'
# Blender: 233
# Group: 'Export'
# Submenu: 'All' all
# Submenu: 'Selected' sel
# Submenu: 'Configure (gui)' gui
# Tooltip: 'Export to some format.'
# """

More information here (check the section "Registering scripts") :

http://www.blender3d.org/documentation/242PythonDoc/API_related-module.html

-- 
Willian



More information about the Bf-python mailing list