[Bf-python] a function to document the web sites menu
jmsoler
jmsoler at free.fr
Sun Aug 8 14:05:21 CEST 2004
## Hi,
##
## It is a function to write a Help_"name".py file in the .blender/scripts
## folder. Does anybody see a problem if use this kind of function in my script ?
name="UnWeld"
Tip= "Unweld all faces from a selected and common vertex. Made vertex bevelling"
website = "http://jmsoler.free.fr/didacticiel/blender/tutor/cpl_faces2vertex.htm#exemple"
def autoDocHelp_script(name,Tip,website):
try:
dir = Blender.Get('datadir')
scriptdir=dir[:dir.find(dir.split(Blender.sys.sep)[-2])]+'scripts'+Blender.sys.sep
ttt="""#!BPY\n\"\"\"\nName: '%s'\nBlender: 234
Group: 'HelpWebsites'\nTooltip: '%s'\n\"\"\"
import Blender, webbrowser\nwebbrowser.open('%s')\n"""%(name,Tip,website)
fil=open(scriptdir+'Help_%s.py'%name.replace(' ','_'),'w')
fil.write(ttt)
fil.close()
ttt="""#!BPY\n\"\"\"\nName: 'A french speaking users community'\nBlender: 234\nGroup: 'HelpWebsites'\nTooltip:
'aA french community News Portal, zoo-Blender.'\n\"\"\"
import Blender,webbrowser
webbrowser.open('http://www.zoo-logique.org/3D.Blender/newsportal/thread.php?group=3D.Blender')\n"""
fil=open(scriptdir+'Help_frenchusers.py','w')
fil.write(ttt)
fil.close()
except:
pass
## Regards,
## -jm-
More information about the Bf-python
mailing list