[Bf-python] BpyMenus naming conventions

Willian Padovani Germano wgermano at ig.com.br
Sun Aug 22 06:39:19 CEST 2004


Matt Ebb wrote:

> Hi,
>
> I was adding a Python menu insertion point for Campbell's face select 
> mode selection scripts, when I realised there don't seem to be any 
> sort of guidelines for how we're naming these menu groups.

Hi Matt,

No problem with your suggestions.  It can be simpler, like FaceSelect, 
and the "pretty print" strings for menus can be done with a second 
function as I told you, but a well defined naming convention is not a 
bad idea.  About having all scripts in the Scripts menu, it'll surely 
need to be reduced, of course.  No problem there.  The issue I'm 
thinking about is this:

I'll add a way to display help info from scripts, similar to the menu 
registration code-wise:

#!BPY
"""
Name: 'Script Name'
...
"""

""" <- here starts the help text
URL: http://www.somewhere.net/pageAboutThisScript.htm 'Main Page'
URL: http://www.elysiun.com/pythonforum/blahblah 'Forum Thread'
...
Help text goes here...
"""

# Here the actual script code

Any script with this setup will then be parsed (when help for it is 
accessed someway(*)) for its help text on demand, not on startup like 
with menus.  There will also be a way to load the whole script text in 
the Text Editor.

(*) - So how to access the help?  One way is by having a "Help" menu in 
the Scripts win header, just like the Scripts menu, but that opens the 
help page instead of running the chosen script (actually more than one 
Help menu for size matters, maybe "Help A-F" and "Help G-Z" -- something 
like that).  Another way is opening the help for a script if you select 
the script from a menu while say CTRL is pressed.  This is cumbersome 
because some users won't know it, and others can start trying all menu 
entries for help texts, not knowing which ones refer to scripts.  A 
third option is adding small square buttons to the script menu entries, 
like "?" for help and "C" for config (some automated config system will 
be added later).

But ... just informing you, still need to code the basics, presentation 
can come later.

-- 
Willian




More information about the Bf-python mailing list