""" Registration info for Blender menus: <- these words are ignored
Name:'Camera Changer'
Blender:234
Group:'Animation'
Tip:'Create script link to change cameras (based on their names) during an animation'
"""
__author__='3R - R3gis'
__version__='1.2'
__url__=["Author's site , http://cybercreator.free.fr","French Blender support forum, http://www.zoo-logique.org/3D.Blender/newsportal/thread.php?group=3D.Blender"]
ret=Blender.Draw.PupMenu("WARNING: An old camera.py exists%t|Overwrite|Rename old version text")
ifret==-1:return# EXIT DO NOTHING
elifret==1:Text.unlink(cam_text)
elifret==2:cam_text.name='old_camera.txt'
cam_text=None
ifnotcam_text:
scripting=Blender.Text.New('camera.py')
scripting.write(camera_change_scriptlink)
scn=Scene.GetCurrent()
scriptlinks=scn.getScriptLinks('FrameChanged')
ifnotscriptlinksor('camera.py'notinscriptlinks):
scn.addScriptLink('camera.py','FrameChanged')
Blender.Draw.PupMenu('FrameChange Scriptlink Added%t|Name camera objects to their activation frame numbers(s) seperated by commas|valid names are "1,10,46" or "1,10,200" or "200" (without quotation marks)')