Add-target-camera add-on

Hello everybody. This is my first script. Thanks to ValterVB for help.
It adds a new camera with the target alredy setted. The target empty is created at the 3D cursor and the camera 5 units higher. The emty takes the name of the with a “target” suffix.
Here the result.


I have only a problem. The add target camera button appears in add-object menu only if i acces it from the dinamic space bar. It doesn’t appear if i press shift-a. This is the relative code:

def register():
bpy.utils.register_class(SimpleOperator)
bpy.types.VIEW3D_MT_AddMenu.append(menu_func)

def unregister():
bpy.utils.unregister_class(SimpleOperator)
bpy.types.VIEW3D_MT_AddMenu.remove(menu_func)

What do i have to write to make it appear in the shift-A menu? Thanks.

P.S. Please try it and send feedback. The script in the next post.



Simple but it will be 1 of the most used add-ons.
Good luck and write more add-ons.

http://www.blender.it/ipb_forum/index.php?app=core&module=attach&section=attach&attach_id=4661

Thank you! The link’s over. I’ll create the wiki page as soon as possible, when i’ll learn to do it! :smiley: