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.