1 # 3D NAVIGATION TOOLBAR v1.2 - 3Dview Addon - Blender 2.5x
3 # THIS SCRIPT IS LICENSED UNDER GPL,
4 # please read the license block.
6 # ##### BEGIN GPL LICENSE BLOCK #####
8 # This program is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public License
10 # as published by the Free Software Foundation; either version 2
11 # of the License, or (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software Foundation,
20 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 # ##### END GPL LICENSE BLOCK #####
25 "name": "3D Navigation",
26 "author": "Demohero, uriel",
30 "location": "View3D > Toolbar",
31 "description": "Navigate the Camera & 3d Views",
33 "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"\
34 "Scripts/3D_interaction/3D_Navigation",
35 "tracker_url": "http://projects.blender.org/tracker/index.php?"\
36 "func=detail&aid=23530&group_id=153&atid=468",
37 "category": "3D View"}
39 # import the basic library
42 # main class of this toolbar
43 class VIEW3D_PT_3dnavigationPanel(bpy
.types
.Panel
):
44 bl_space_type
= "VIEW_3D"
45 bl_region_type
= "TOOLS"
46 bl_label
= "3D Views "
48 def draw(self
, context
):
50 view
= context
.space_data
53 col
= layout
.column(align
=True)
55 row
.operator("view3d.viewnumpad", text
="View Camera", icon
='CAMERA_DATA').type='CAMERA'
57 row
.operator("view3d.localview", text
="View Global/Local")
59 row
.operator("view3d.view_persportho", text
="View Persp/Ortho")
62 col
= layout
.column(align
=True)
63 col
.label(text
="Align view from:")
65 row
.operator("view3d.viewnumpad", text
="Front").type='FRONT'
66 row
.operator("view3d.viewnumpad", text
="Back").type='BACK'
68 row
.operator("view3d.viewnumpad", text
="Left").type='LEFT'
69 row
.operator("view3d.viewnumpad", text
="Right").type='RIGHT'
71 row
.operator("view3d.viewnumpad", text
="Top").type='TOP'
72 row
.operator("view3d.viewnumpad", text
="Bottom").type='BOTTOM'
76 col
= layout
.column(align
=True)
77 col
.label(text
="View to Object:")
78 col
.prop(view
, "lock_object", text
="")
80 row
.operator("view3d.view_selected", text
="View to Selected")
81 col
= layout
.column(align
=True)
82 col
.label(text
="Cursor:")
84 row
.operator("view3d.snap_cursor_to_center", text
="Center")
85 row
.operator("view3d.view_center_cursor", text
="View")
87 row
.operator("view3d.snap_cursor_to_selected", text
="Cursor to Selected")
96 if __name__
== "__main__":