#!BPY
"""
Name: 'Local Html Tutorial'
Blender: 234
Group: 'Help'
Tooltip: 'This script adds a local html address in the help menu.'
"""
__author__ = "jean-michel soler"
__version__ = "0.1 12/08/04"
__email__ = ('scripts', 'Author, jmsoler:free*fr')
__url__ = ("Script's homepage, http://jmsoler.free.fr/didacticiel/blender/tutor/cpl_helpwebdoc.htm",
"Communicate problems and errors, http://www.zoo-logique.org/3D.Blender/newsportal/thread.php?group=3D.Blender",'blender',
'elysiun')
__bpydoc__ ="""\ Ce script ajoute dans le menu help un lien vers un
tutorial html local.
"""
# --------------------------------------------------------------------------
# Add Local Html Tutorial, 12/08/04 by Jean-michel Soler AKA jms
# --------------------------------------------------------------------------
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# ***** END GPL LICENCE BLOCK *****
# --------------------------------------------------------------------------
import Blender
name=""
Tip= "Tutorial sur disque local"
website = ""
def autoDocHelp_script(website):
global name,Tip
try:
name = Blender.Draw.PupStrInput('Name
: ', '', 32)
if name == None: name=
"Tutorial sur disque local"
website=website.replace('\\','/')
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\nGroup: 'Help'\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()
except:
pass
Blender.Window.FileSelector(autoDocHelp_script, "Add this local tutorial")
|