Remove workaround for uuid, resolved with the Python3.4x and MSVC2013 move.
[blender-addons.git] / space_view3d_3d_navigation.py
blob93c6afc71f0bf2cb9606d0e5cc05ae9e1d14f66d
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 # ##### END GPL LICENSE BLOCK #####
24 bl_info = {
25 "name": "3D Navigation",
26 "author": "Demohero, uriel",
27 "version": (1, 2),
28 "blender": (2, 57, 0),
29 "location": "View3D > Tool Shelf > 3D Nav",
30 "description": "Navigate the Camera & 3D View from the Toolshelf",
31 "warning": "",
32 "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
33 "Scripts/3D_interaction/3D_Navigation",
34 "tracker_url": "https://developer.blender.org/T23530",
35 "category": "3D View"}
37 # import the basic library
38 import bpy
40 # main class of this toolbar
41 class VIEW3D_PT_3dnavigationPanel(bpy.types.Panel):
42 bl_category = "Navigation"
43 bl_space_type = "VIEW_3D"
44 bl_region_type = "TOOLS"
45 bl_label = "3D Nav"
47 def draw(self, context):
48 layout = self.layout
49 view = context.space_data
51 # Triple boutons
52 col = layout.column(align=True)
53 col.operator("view3d.viewnumpad", text="View Camera", icon='CAMERA_DATA').type='CAMERA'
54 col.operator("view3d.localview", text="View Global/Local")
55 col.operator("view3d.view_persportho", text="View Persp/Ortho")
57 # group of 6 buttons
58 col = layout.column(align=True)
59 col.label(text="Align view from:")
60 row = col.row()
61 row.operator("view3d.viewnumpad", text="Front").type='FRONT'
62 row.operator("view3d.viewnumpad", text="Back").type='BACK'
63 row = col.row()
64 row.operator("view3d.viewnumpad", text="Left").type='LEFT'
65 row.operator("view3d.viewnumpad", text="Right").type='RIGHT'
66 row = col.row()
67 row.operator("view3d.viewnumpad", text="Top").type='TOP'
68 row.operator("view3d.viewnumpad", text="Bottom").type='BOTTOM'
70 # group of 2 buttons
71 col = layout.column(align=True)
72 col.label(text="View to Object:")
73 col.prop(view, "lock_object", text="")
74 col.operator("view3d.view_selected", text="View to Selected")
76 col = layout.column(align=True)
77 col.label(text="Cursor:")
79 row = col.row()
80 row.operator("view3d.snap_cursor_to_center", text="Center")
81 row.operator("view3d.view_center_cursor", text="View")
83 col.operator("view3d.snap_cursor_to_selected", text="Cursor to Selected")
85 # register the class
86 def register():
87 bpy.utils.register_module(__name__)
89 pass
91 def unregister():
92 bpy.utils.unregister_module(__name__)
94 pass
96 if __name__ == "__main__":
97 register()