Welcome to mirror list, hosted at ThFree Co, Russian Federation.

space_view3d.py « ui « release - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bc133cbff484dc3ea839a19aa68052646dcc52a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353

import bpy

# ********** Header **********

class VIEW3D_HT_header(bpy.types.Header):
	__space_type__ = 'VIEW_3D'

	def draw(self, context):
		layout = self.layout
		
		view = context.space_data
		mode_string = context.mode
		edit_object = context.edit_object
		object = context.active_object
		
		row = layout.row(align=True)
		row.template_header()

		# Menus
		if context.area.show_menus:
			sub = row.row(align=True)

			sub.itemM("VIEW3D_MT_view")
			
			# Select Menu
			if mode_string not in ('EDIT_TEXT', 'SCULPT', 'PAINT_WEIGHT', 'PAINT_VERTEX', 'PAINT_TEXTURE'):
				sub.itemM("VIEW3D_MT_select_%s" % mode_string)
			
			if edit_object:
				sub.itemM("VIEW3D_MT_edit_%s" % edit_object.type)
			elif object:
				ob_mode_string = object.mode
				
				if mode_string not in ['PAINT_WEIGHT', 'PAINT_TEXTURE']:
					sub.itemM("VIEW3D_MT_%s" % mode_string)

		layout.template_header_3D()

# ********** Menu **********

# ********** Utilities **********

class VIEW3D_MT_showhide(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Show/Hide"
	_operator_name = ""

	def draw(self, context):
		layout = self.layout
		
		layout.itemO("%s.reveal" % self._operator_name, text="Show Hidden")
		layout.itemO("%s.hide" % self._operator_name, text="Hide Selected")
		layout.item_booleanO("%s.hide" % self._operator_name, "unselected", True, text="Hide Unselected")

class VIEW3D_MT_snap(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Snap"

	def draw(self, context):
		layout = self.layout
		
		layout.itemO("view3d.snap_selected_to_grid", text="Selection to Grid")
		layout.itemO("view3d.snap_selected_to_cursor", text="Selection to Cursor")
		layout.itemO("view3d.snap_selected_to_center", text="Selection to Center")
		
		layout.itemS()
		
		layout.itemO("view3d.snap_cursor_to_selected", text="Cursor to Selected")
		layout.itemO("view3d.snap_cursor_to_grid", text="Cursor to Grid")
		layout.itemO("view3d.snap_cursor_to_active", text="Cursor to Active")

# ********** View menus **********

class VIEW3D_MT_view(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "View"

	def draw(self, context):
		layout = self.layout

		layout.itemO("view3d.properties", icon='ICON_MENU_PANEL')
		layout.itemO("view3d.toolbar", icon='ICON_MENU_PANEL')
		
		layout.itemS()
		
		layout.item_enumO("view3d.viewnumpad", "type", 'CAMERA')
		layout.item_enumO("view3d.viewnumpad", "type", 'TOP')
		layout.item_enumO("view3d.viewnumpad", "type", 'FRONT')
		layout.item_enumO("view3d.viewnumpad", "type", 'RIGHT')
		
		layout.itemM("VIEW3D_MT_view_cameras", text="Cameras")
		
		layout.itemS()
		
		layout.itemO("view3d.view_persportho")
		
		layout.itemS()
		
		layout.itemM("VIEW3D_MT_view_navigation")
		layout.itemM("VIEW3D_MT_view_align")
		
		layout.itemS()

		layout.operator_context = "INVOKE_REGION_WIN"
		
		layout.itemO("view3d.clip_border", text="Clipping Border...")
		layout.itemO("view3d.zoom_border", text="Zoom Border...")
		
		layout.itemS()
		
		layout.itemO("view3d.view_center")
		layout.itemO("view3d.view_all")
		
		layout.itemS()
		
		layout.itemO("screen.region_foursplit", text="Toggle Quad View")
		layout.itemO("screen.screen_full_area", text="Toggle Full Screen")

class VIEW3D_MT_view_navigation(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Navigation"

	def draw(self, context):
		layout = self.layout

		layout.items_enumO("view3d.view_orbit", "type")
		
		layout.itemS()
		
		layout.items_enumO("view3d.view_pan", "type")
		
		layout.itemS()
		
		layout.item_floatO("view3d.zoom", "delta", 1.0, text="Zoom In")
		layout.item_floatO("view3d.zoom", "delta", -1.0, text="Zoom Out")

class VIEW3D_MT_view_align(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Align View"

	def draw(self, context):
		layout = self.layout
		
		layout.itemO("view3d.view_center")
		
class VIEW3D_MT_view_cameras(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Cameras"

	def draw(self, context):
		layout = self.layout

# ********** Select menus, suffix from context.mode **********

class VIEW3D_MT_select_OBJECT(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Select"

	def draw(self, context):
		layout = self.layout

		layout.itemO("view3d.select_border")

		layout.itemS()

		layout.itemO("object.select_all_toggle", text="Select/Deselect All")
		layout.itemO("object.select_inverse", text="Inverse")
		layout.itemO("object.select_random", text="Random")
		layout.itemO("object.select_mirror", text="Mirror")
		layout.itemO("object.select_by_layer", text="Select All by Layer")
		layout.item_enumO("object.select_by_type", "type", "", text="Select All by Type...")
		layout.itemO("object.select_grouped", text="Select Grouped...")

class VIEW3D_MT_select_POSE(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Select"

	def draw(self, context):
		layout = self.layout

		layout.itemO("view3d.select_border", text="Border Select...")

		layout.itemS()
		
		layout.itemO("pose.select_all_toggle", text="Select/Deselect All")
		layout.itemO("pose.select_inverse", text="Inverse")
		layout.itemO("pose.select_constraint_target", text="Constraint Target")
		layout.itemO("pose.select_linked", text="Linked")
		
		layout.itemS()
		
		layout.item_enumO("pose.select_hierarchy", "direction", 'PARENT')
		layout.item_enumO("pose.select_hierarchy", "direction", 'CHILD')
		
		layout.itemS()
		
		props = layout.itemO("pose.select_hierarchy", properties=True, text="Extend Parent")
		props.extend = True
		props.direction = 'PARENT'

		props = layout.itemO("pose.select_hierarchy", properties=True, text="Extend Child")
		props.extend = True
		props.direction = 'CHILD'

class VIEW3D_MT_select_PARTICLE(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Select"

	def draw(self, context):
		layout = self.layout

		layout.itemO("view3d.select_border")

		layout.itemS()
		
		layout.itemO("particle.select_all_toggle", text="Select/Deselect All")
		layout.itemO("particle.select_linked")
		
		layout.itemS()
		
		layout.itemO("particle.select_more")
		layout.itemO("particle.select_less")

class VIEW3D_MT_select_EDIT_MESH(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Select"

	def draw(self, context):
		layout = self.layout

		layout.itemO("view3d.select_border", text="Border Select...")

		layout.itemS()

		layout.itemO("mesh.select_all_toggle", text="Select/Deselect All")
		layout.itemO("mesh.select_inverse", text="Inverse")

		layout.itemS()

		layout.itemO("mesh.select_random", text="Random...")
		layout.itemO("mesh.edges_select_sharp", text="Sharp Edges")
		layout.itemO("mesh.faces_select_linked_flat", text="Linked Flat Faces")

		layout.itemS()

		layout.item_enumO("mesh.select_by_number_vertices", "type", 'TRIANGLES', text="Triangles")
		layout.item_enumO("mesh.select_by_number_vertices", "type", 'QUADS', text="Quads")
		layout.item_enumO("mesh.select_by_number_vertices", "type", 'OTHER', text="Loose Verts/Edges")
		layout.itemO("mesh.select_similar", text="Similar...")

		layout.itemS()

		layout.itemO("mesh.select_less", text="Less")
		layout.itemO("mesh.select_more", text="More")

		layout.itemS()

		layout.itemO("mesh.select_linked", text="Linked")
		layout.itemO("mesh.select_vertex_path", text="Vertex Path")
		layout.itemO("mesh.loop_multi_select", text="Edge Loop")
		layout.item_booleanO("mesh.loop_multi_select", "ring", True, text="Edge Ring")

		layout.itemS()

		layout.itemO("mesh.loop_to_region")
		layout.itemO("mesh.region_to_loop")

class VIEW3D_MT_select_EDIT_CURVE(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Select"

	def draw(self, context):
		layout = self.layout

		layout.itemO("view3d.select_border", text="Border Select...")
		layout.itemO("view3d.select_circle", text="Circle Select...")

		layout.itemS()
		
		layout.itemO("curve.select_all_toggle", text="Select/Deselect All")
		layout.itemO("curve.select_inverse")
		layout.itemO("curve.select_random")
		layout.itemO("curve.select_every_nth")

		layout.itemS()
		
		layout.itemO("curve.de_select_first")
		layout.itemO("curve.de_select_last")
		layout.itemO("curve.select_next")
		layout.itemO("curve.select_previous")

		layout.itemS()
		
		layout.itemO("curve.select_more")
		layout.itemO("curve.select_less")

class VIEW3D_MT_select_EDIT_SURFACE(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Select"

	def draw(self, context):
		layout = self.layout

		layout.itemO("view3d.select_border", text="Border Select...")
		layout.itemO("view3d.select_circle", text="Circle Select...")

		layout.itemS()
		
		layout.itemO("curve.select_all_toggle", text="Select/Deselect All")
		layout.itemO("curve.select_inverse")
		layout.itemO("curve.select_random")
		layout.itemO("curve.select_every_nth")

		layout.itemS()
		
		layout.itemO("curve.select_row")

		layout.itemS()
		
		layout.itemO("curve.select_more")
		layout.itemO("curve.select_less")

class VIEW3D_MT_select_EDIT_METABALL(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Select"

	def draw(self, context):
		layout = self.layout

		layout.itemO("view3d.select_border")
		
		layout.itemS()
		
		layout.itemO("mball.select_deselect_all_metaelems")
		layout.itemO("mball.select_inverse_metaelems")
		
		layout.itemS()
		
		layout.itemO("mball.select_random_metaelems")

class VIEW3D_MT_select_EDIT_LATTICE(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Select"

	def draw(self, context):
		layout = self.layout

		layout.itemO("view3d.select_border")

		layout.itemS()
		
		layout.itemO("lattice.select_all_toggle", text="Select/Deselect All")

class VIEW3D_MT_select_EDIT_ARMATURE(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Select"

	def draw(self, context):
		layout = self.layout

		layout.itemO("view3d.select_border", text="Border Select...")

		layout.itemS()
		
		layout.itemO("armature.select_all_toggle", text="Select/Deselect All")
		layout.itemO("armature.select_inverse", text="Inverse")

		layout.itemS()
		
		layout.item_enumO("armature.select_hierarchy", "direction", 'PARENT', text="Parent")
		layout.item_enumO("armature.select_hierarchy", "direction", 'CHILD', text="Child")
		
		layout.itemS()
		
		props = layout.itemO("armature.select_hierarchy", properties=True, text="Extend Parent")
		props.extend = True
		props.direction = 'PARENT'

		props = layout.itemO("armature.select_hierarchy", properties=True, text="Extend Child")
		props.extend = True
		props.direction = 'CHILD'

class VIEW3D_MT_select_FACE(bpy.types.Menu):# XXX no matching enum
	__space_type__ = 'VIEW_3D'
	__label__ = "Select"

	def draw(self, context):
		layout = self.layout

		layout.view3d_select_faceselmenu()

# ********** Object menu **********

class VIEW3D_MT_OBJECT(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__context__ = "objectmode"
	__label__ = "Object"

	def draw(self, context):
		layout = self.layout

		layout.itemM("VIEW3D_MT_OBJECT_clear")
		layout.itemM("VIEW3D_MT_snap")
		
		layout.itemS()
		
		layout.itemO("anim.insert_keyframe_menu", text="Insert Keyframe...")
		layout.itemO("anim.delete_keyframe_v3d", text="Delete Keyframe...")
		
		layout.itemS()
		
		layout.itemO("object.duplicate")
		layout.item_booleanO("object.duplicate", "linked", True, text="Duplicate Linked")
		layout.itemO("object.delete", text="Delete...")
		layout.itemO("object.proxy_make", text="Make Proxy...")
		
		layout.itemS()
		
		layout.itemM("VIEW3D_MT_OBJECT_parent")
		layout.itemM("VIEW3D_MT_OBJECT_track")
		layout.itemM("VIEW3D_MT_OBJECT_group")
		layout.itemM("VIEW3D_MT_OBJECT_constraints")
		
		layout.itemS()
		
		layout.itemO("object.join")
		
		layout.itemS()
		
		layout.itemM("VIEW3D_MT_OBJECT_showhide")
		
class VIEW3D_MT_OBJECT_clear(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Clear"

	def draw(self, context):
		layout = self.layout
		
		layout.itemO("object.location_clear", text="Location")
		layout.itemO("object.rotation_clear", text="Rotation")
		layout.itemO("object.scale_clear", text="Scale")
		layout.itemO("object.origin_clear", text="Origin")
		
class VIEW3D_MT_OBJECT_parent(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Parent"

	def draw(self, context):
		layout = self.layout
		
		layout.itemO("object.parent_set", text="Set")
		layout.itemO("object.parent_clear", text="Clear")
		
class VIEW3D_MT_OBJECT_track(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Track"

	def draw(self, context):
		layout = self.layout
		
		layout.itemO("object.track_set", text="Set")
		layout.itemO("object.track_clear", text="Clear")
		
class VIEW3D_MT_OBJECT_group(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Group"

	def draw(self, context):
		layout = self.layout
		
		layout.itemO("group.group_create")
		layout.itemO("group.objects_remove")
		
		layout.itemS()
		
		layout.itemO("group.objects_add_active")
		layout.itemO("group.objects_remove_active")
		
class VIEW3D_MT_OBJECT_constraints(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Constraints"

	def draw(self, context):
		layout = self.layout
		
		layout.itemO("object.constraint_add_with_targets")
		layout.itemO("object.constraints_clear")
		
class VIEW3D_MT_OBJECT_showhide(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Show/Hide"

	def draw(self, context):
		layout = self.layout
		
		layout.itemO("object.restrictview_clear", text="Show Hidden")
		layout.itemO("object.restrictview_set", text="Hide Selected")
		layout.item_booleanO("object.restrictview_set", "unselected", True, text="Hide Unselected")

# ********** Vertex paint menu **********	
	
class VIEW3D_MT_PAINT_VERTEX(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Paint"

	def draw(self, context):
		layout = self.layout
		
		sculpt = context.tool_settings.sculpt

		layout.itemO("paint.vertex_color_set")
		props = layout.itemO("paint.vertex_color_set", text="Set Selected Vertex Colors", properties=True)
		props.selected = True

# ********** Sculpt menu **********	
	
class VIEW3D_MT_SCULPT(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Sculpt"

	def draw(self, context):
		layout = self.layout
		
		sculpt = context.tool_settings.sculpt
		brush = context.tool_settings.sculpt.brush
		
		layout.itemR(sculpt, "symmetry_x")
		layout.itemR(sculpt, "symmetry_y")
		layout.itemR(sculpt, "symmetry_z")
		layout.itemS()
		layout.itemR(sculpt, "lock_x")
		layout.itemR(sculpt, "lock_y")
		layout.itemR(sculpt, "lock_z")
		layout.itemS()
		layout.item_menu_enumO("brush.curve_preset", property="shape")
		layout.itemS()
		
		if brush.sculpt_tool != 'GRAB':
			layout.itemR(brush, "airbrush")
			
			if brush.sculpt_tool != 'LAYER':
				layout.itemR(brush, "anchored")
			
			if brush.sculpt_tool in ('DRAW', 'PINCH', 'INFLATE', 'LAYER', 'CLAY'):
				layout.itemR(brush, "flip_direction")

			if brush.sculpt_tool == 'LAYER':
				layout.itemR(brush, "persistent")
				layout.itemO("sculpt.set_persistent_base")

# ********** Particle menu **********	
	
class VIEW3D_MT_PARTICLE(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Particle"

	def draw(self, context):
		layout = self.layout
		
		particle_edit = context.tool_settings.particle_edit
		
		layout.itemO("particle.mirror")
		
		layout.itemS()
		
		layout.itemO("particle.remove_doubles")
		layout.itemO("particle.delete")
		
		if particle_edit.selection_mode == 'POINT':
			layout.itemO("particle.subdivide")
		
		layout.itemO("particle.rekey")
		
		layout.itemS()
		
		layout.itemM("VIEW3D_MT_PARTICLE_showhide")

class VIEW3D_MT_PARTICLE_showhide(VIEW3D_MT_showhide):
	_operator_name = "particle"

# ********** Pose Menu **********

class VIEW3D_MT_POSE(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Pose"

	def draw(self, context):
		layout = self.layout
		
		arm = context.active_object.data
		
		if arm.drawtype in ('BBONE', 'ENVELOPE'):
			layout.item_enumO("tfm.transform", "mode", 'BONESIZE', text="Scale Envelope Distance")
		
		layout.itemM("VIEW3D_MT_POSE_transform")
		
		layout.itemS()
		
		layout.itemO("anim.insert_keyframe_menu", text="Insert Keyframe...")
		layout.itemO("anim.delete_keyframe_v3d", text="Delete Keyframe...")
		
		layout.itemS()
		
		layout.itemO("pose.apply")
		
		layout.itemS()
		
		layout.itemO("pose.copy")
		layout.itemO("pose.paste")
		layout.item_booleanO("pose.paste", "flipped", True, text="Paste X-Flipped Pose")
		
		layout.itemS()
		
		layout.itemM("VIEW3D_MT_POSE_pose")
		layout.itemM("VIEW3D_MT_POSE_motion")
		layout.itemM("VIEW3D_MT_POSE_group")
		
		layout.itemS()
		
		layout.itemM("VIEW3D_MT_POSE_ik")
		layout.itemM("VIEW3D_MT_POSE_constraints")
		
		layout.itemS()
		
		layout.operator_context = "EXEC_AREA"
		layout.item_enumO("pose.autoside_names", "axis", 'XAXIS', text="AutoName Left/Right")
		layout.item_enumO("pose.autoside_names", "axis", 'YAXIS', text="AutoName Front/Back")
		layout.item_enumO("pose.autoside_names", "axis", 'ZAXIS', text="AutoName Top/Bottom")
		
		layout.itemO("pose.flip_names")
		
		layout.itemS()
		
		layout.operator_context = "INVOKE_AREA"
		layout.itemO("pose.armature_layers", text="Change Armature Layers...")
		layout.itemO("pose.bone_layers", text="Change Bone Layers...")
		
		layout.itemS()
		
		layout.itemM("VIEW3D_MT_POSE_showhide")
		layout.item_menu_enumO("pose.flags_set", 'mode', text="Bone Settings")

class VIEW3D_MT_POSE_transform(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Clear Transform"

	def draw(self, context):
		layout = self.layout
		
		layout.itemL(text="User Transform")
		
		layout.itemO("pose.loc_clear", text="Location")
		layout.itemO("pose.rot_clear", text="Rotation")
		layout.itemO("pose.scale_clear", text="Scale")
		
		layout.itemL(text="Origin")
		
class VIEW3D_MT_POSE_pose(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Pose Library"

	def draw(self, context):
		layout = self.layout
		
		layout.itemO("poselib.browse_interactive", text="Browse Poses...")
		
		layout.itemS()
		
		layout.itemO("poselib.pose_add", text="Add Pose...")
		layout.itemO("poselib.pose_rename", text="Rename Pose...")
		layout.itemO("poselib.pose_remove", text="Remove Pose...")

class VIEW3D_MT_POSE_motion(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Motion Paths"

	def draw(self, context):
		layout = self.layout
		
		layout.itemO("pose.paths_calculate", text="Calculate")
		layout.itemO("pose.paths_clear", text="Clear")
		
class VIEW3D_MT_POSE_group(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Bone Groups"

	def draw(self, context):
		layout = self.layout
		layout.itemO("pose.group_add")
		layout.itemO("pose.group_remove")
		
		layout.itemS()
		
		layout.itemO("pose.group_assign")
		layout.itemO("pose.group_unassign")
		
		
class VIEW3D_MT_POSE_ik(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Inverse Kinematics"

	def draw(self, context):
		layout = self.layout
		
		layout.itemO("pose.ik_add")
		layout.itemO("pose.ik_clear")
		
class VIEW3D_MT_POSE_constraints(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Constraints"

	def draw(self, context):
		layout = self.layout
		
		layout.itemO("pose.constraint_add_with_targets", text="Add (With Targets)...")
		layout.itemO("pose.constraints_clear")
		
class VIEW3D_MT_POSE_showhide(VIEW3D_MT_showhide):
	_operator_name = "pose"

# ********** Edit Menus, suffix from ob.type **********

# Edit MESH
class VIEW3D_MT_edit_MESH(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Mesh"

	def draw(self, context):
		layout = self.layout
		
		settings = context.tool_settings

		layout.itemO("ed.undo")
		layout.itemO("ed.redo")
		
		layout.itemS()
		
		layout.itemM("VIEW3D_MT_snap")
		
		layout.itemS()
		
		layout.itemO("uv.mapping_menu", text="UV Unwrap...")
		
		layout.itemS()
		
		layout.itemO("mesh.extrude")
		layout.itemO("mesh.duplicate")
		layout.itemO("mesh.delete", text="Delete...")
		
		layout.itemS()
		
		layout.itemM("VIEW3D_MT_edit_MESH_vertices")
		layout.itemM("VIEW3D_MT_edit_MESH_edges")
		layout.itemM("VIEW3D_MT_edit_MESH_faces")
		layout.itemM("VIEW3D_MT_edit_MESH_normals")
		
		layout.itemS()
		
		layout.itemR(settings, "automerge_editing")
		layout.itemR(settings, "proportional_editing")
		layout.item_menu_enumR(settings, "proportional_editing_falloff")
		
		layout.itemS()
		
		layout.itemM("VIEW3D_MT_edit_MESH_showhide")

class VIEW3D_MT_edit_MESH_vertices(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Vertices"

	def draw(self, context):
		layout = self.layout
		
		layout.itemO("mesh.merge")
		layout.itemO("mesh.rip")
		layout.itemO("mesh.split")
		layout.itemO("mesh.separate")

		layout.itemS()
		
		layout.itemO("mesh.vertices_smooth")
		layout.itemO("mesh.remove_doubles")

class VIEW3D_MT_edit_MESH_edges(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Edges"

	def draw(self, context):
		layout = self.layout

		layout.itemO("mesh.edge_face_add")
		layout.itemO("mesh.subdivide")

		layout.itemS()
		
		layout.itemO("mesh.mark_seam")
		layout.item_booleanO("mesh.mark_seam", "clear", True, text="Clear Seam")
		
		layout.itemS()
		
		layout.itemO("mesh.mark_sharp")
		layout.item_booleanO("mesh.mark_sharp", "clear", True, text="Clear Sharp")
		
		layout.itemS()
		
		layout.item_enumO("mesh.edge_rotate", "direction", 'CW', text="Rotate Edge CW")
		layout.item_enumO("mesh.edge_rotate", "direction", 'CCW', text="Rotate Edge CCW")

class VIEW3D_MT_edit_MESH_faces(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Faces"

	def draw(self, context):
		layout = self.layout

		layout.itemO("mesh.edge_face_add")
		layout.itemO("mesh.fill")
		layout.itemO("mesh.beauty_fill")

		layout.itemS()
		
		layout.itemO("mesh.quads_convert_to_tris")
		layout.itemO("mesh.tris_convert_to_quads")
		layout.itemO("mesh.edge_flip")
		
		layout.itemS()
		
		layout.itemO("mesh.faces_shade_smooth")
		layout.itemO("mesh.faces_shade_flat")

class VIEW3D_MT_edit_MESH_normals(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Normals"

	def draw(self, context):
		layout = self.layout

		layout.itemO("mesh.normals_make_consistent", text="Recalculate Outside")
		layout.item_booleanO("mesh.normals_make_consistent", "inside", True, text="Recalculate Inside")

		layout.itemS()
		
		layout.itemO("mesh.flip_normals")
		
class VIEW3D_MT_edit_MESH_showhide(VIEW3D_MT_showhide):
	_operator_name = "mesh"

# Edit CURVE

# draw_CURVE is used by VIEW3D_MT_edit_CURVE and VIEW3D_MT_edit_SURFACE
def draw_CURVE(self, context):
	layout = self.layout
	
	settings = context.tool_settings
	
	layout.itemM("VIEW3D_MT_snap")
	
	layout.itemS()
	
	layout.itemO("curve.extrude")
	layout.itemO("curve.duplicate")
	layout.itemO("curve.separate")
	layout.itemO("curve.make_segment")
	layout.itemO("curve.cyclic_toggle")
	layout.itemO("curve.delete", text="Delete...")
	
	layout.itemS()
	
	layout.itemM("VIEW3D_MT_edit_CURVE_ctrlpoints")
	layout.itemM("VIEW3D_MT_edit_CURVE_segments")
	
	layout.itemS()
	
	layout.itemR(settings, "proportional_editing")
	layout.item_menu_enumR(settings, "proportional_editing_falloff")
	
	layout.itemS()
	
	layout.itemM("VIEW3D_MT_edit_CURVE_showhide")

class VIEW3D_MT_edit_CURVE(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Curve"

	draw = draw_CURVE
	
class VIEW3D_MT_edit_CURVE_ctrlpoints(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Control Points"

	def draw(self, context):
		layout = self.layout
		
		edit_object = context.edit_object
		
		if edit_object.type == 'CURVE':
			layout.item_enumO("tfm.transform", "mode", 'TILT')
			layout.itemO("curve.tilt_clear")
			layout.itemO("curve.separate")
			
			layout.itemS()
			
			layout.item_menu_enumO("curve.handle_type_set", "type")
		
class VIEW3D_MT_edit_CURVE_segments(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Segments"

	def draw(self, context):
		layout = self.layout
		
		layout.itemO("curve.subdivide")
		layout.itemO("curve.switch_direction")

class VIEW3D_MT_edit_CURVE_showhide(VIEW3D_MT_showhide):
	_operator_name = "curve"

# Edit SURFACE
class VIEW3D_MT_edit_SURFACE(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Surface"

	draw = draw_CURVE

# Edit TEXT
class VIEW3D_MT_edit_TEXT(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Text"

	def draw(self, context):
		layout = self.layout
		
		layout.itemO("font.file_paste")
		
		layout.itemS()
		
		layout.itemM("VIEW3D_MT_edit_TEXT_chars")

class VIEW3D_MT_edit_TEXT_chars(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Special Characters"

	def draw(self, context):
		layout = self.layout
		
		layout.item_stringO("font.text_insert", "text", b'\xC2\xA9'.decode(), text="Copyright|Alt C")
		layout.item_stringO("font.text_insert", "text", b'\xC2\xAE'.decode(), text="Registered Trademark|Alt R")
		
		layout.itemS()
		
		layout.item_stringO("font.text_insert", "text", b'\xC2\xB0'.decode(), text="Degree Sign|Alt G")
		layout.item_stringO("font.text_insert", "text", b'\xC3\x97'.decode(), text="Multiplication Sign|Alt x")
		layout.item_stringO("font.text_insert", "text", b'\xC2\x8A'.decode(), text="Circle|Alt .")
		layout.item_stringO("font.text_insert", "text", b'\xC2\xB9'.decode(), text="Superscript 1|Alt 1")
		layout.item_stringO("font.text_insert", "text", b'\xC2\xB2'.decode(), text="Superscript 2|Alt 2")
		layout.item_stringO("font.text_insert", "text", b'\xC2\xB3'.decode(), text="Superscript 3|Alt 3")
		layout.item_stringO("font.text_insert", "text", b'\xC2\xBB'.decode(), text="Double >>|Alt >")
		layout.item_stringO("font.text_insert", "text", b'\xC2\xAB'.decode(), text="Double <<|Alt <")
		layout.item_stringO("font.text_insert", "text", b'\xE2\x80\xB0'.decode(), text="Promillage|Alt %")
		
		layout.itemS()
		
		layout.item_stringO("font.text_insert", "text", b'\xC2\xA4'.decode(), text="Dutch Florin|Alt F")
		layout.item_stringO("font.text_insert", "text", b'\xC2\xA3'.decode(), text="British Pound|Alt L")
		layout.item_stringO("font.text_insert", "text", b'\xC2\xA5'.decode(), text="Japanese Yen|Alt Y")
		
		layout.itemS()
		
		layout.item_stringO("font.text_insert", "text", b'\xC3\x9F'.decode(), text="German S|Alt S")
		layout.item_stringO("font.text_insert", "text", b'\xC2\xBF'.decode(), text="Spanish Question Mark|Alt ?")
		layout.item_stringO("font.text_insert", "text", b'\xC2\xA1'.decode(), text="Spanish Exclamation Mark|Alt !")

# Edit META
class VIEW3D_MT_edit_META(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Metaball"

	def draw(self, context):
		layout = self.layout
		
		settings = context.tool_settings

		layout.itemO("ed.undo")
		layout.itemO("ed.redo")
		
		layout.itemS()
		
		layout.itemM("VIEW3D_MT_snap")
		
		layout.itemS()
		
		layout.itemO("mball.delete_metaelems", text="Delete...")
		layout.itemO("mball.duplicate_metaelems")
		
		layout.itemS()
		
		layout.itemR(settings, "proportional_editing")
		layout.item_menu_enumR(settings, "proportional_editing_falloff")
		
		layout.itemS()
		
		layout.itemM("VIEW3D_MT_edit_META_showhide")

class VIEW3D_MT_edit_META_showhide(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Show/Hide"

	def draw(self, context):
		layout = self.layout
		
		layout.itemO("mball.reveal_metaelems", text="Show Hidden")
		layout.itemO("mball.hide_metaelems", text="Hide Selected")
		layout.item_booleanO("mball.hide_metaelems", "unselected", True, text="Hide Unselected")

# Edit LATTICE
class VIEW3D_MT_edit_LATTICE(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Lattice"

	def draw(self, context):
		layout = self.layout
		
		settings = context.tool_settings

		layout.itemM("VIEW3D_MT_snap")
		
		layout.itemS()
		
		layout.itemO("lattice.make_regular")
		
		layout.itemS()
		
		layout.itemR(settings, "proportional_editing")
		layout.item_menu_enumR(settings, "proportional_editing_falloff")

# Edit ARMATURE
class VIEW3D_MT_edit_ARMATURE(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Armature"

	def draw(self, context):
		layout = self.layout
		
		edit_object = context.edit_object
		arm = edit_object.data
		
		layout.itemM("VIEW3D_MT_snap")
		layout.itemM("VIEW3D_MT_edit_ARMATURE_roll")
		
		if arm.drawtype == 'ENVELOPE':
			layout.item_enumO("tfm.transform", "mode", 'BONESIZE', text="Scale Envelope Distance")
		else:
			layout.item_enumO("tfm.transform", "mode", 'BONESIZE', text="Scale B-Bone Width")
				
		layout.itemS()
		
		layout.itemO("armature.extrude")
		
		if arm.x_axis_mirror:
			layout.item_booleanO("armature.extrude", "forked", True, text="Extrude Forked")
		
		layout.itemO("armature.duplicate")
		layout.itemO("armature.merge")
		layout.itemO("armature.fill")
		layout.itemO("armature.delete")
		layout.itemO("armature.separate")

		layout.itemS()

		layout.itemO("armature.subdivide_multi", text="Subdivide")
		
		layout.itemS()
		
		layout.operator_context = "EXEC_AREA"
		layout.item_enumO("armature.autoside_names", "type", 'XAXIS', text="AutoName Left/Right")
		layout.item_enumO("armature.autoside_names", "type", 'YAXIS', text="AutoName Front/Back")
		layout.item_enumO("armature.autoside_names", "type", 'ZAXIS', text="AutoName Top/Bottom")
		layout.itemO("armature.flip_names")

		layout.itemS()
		
		layout.operator_context = "INVOKE_DEFAULT"
		layout.itemO("armature.armature_layers")
		layout.itemO("armature.bone_layers")

		layout.itemS()

		layout.itemM("VIEW3D_MT_edit_ARMATURE_parent")

		layout.itemS()
		
		layout.item_menu_enumO("armature.flags_set", "mode", text="Bone Settings")

class VIEW3D_MT_edit_ARMATURE_parent(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Parent"

	def draw(self, context):
		layout = self.layout
		
		layout.itemO("armature.parent_set", text="Make")
		layout.itemO("armature.parent_clear", text="Clear")

class VIEW3D_MT_edit_ARMATURE_roll(bpy.types.Menu):
	__space_type__ = 'VIEW_3D'
	__label__ = "Bone Roll"

	def draw(self, context):
		layout = self.layout
		
		layout.item_enumO("armature.calculate_roll", "type", 'GLOBALUP', text="Clear Roll (Z-Axis Up)")
		layout.item_enumO("armature.calculate_roll", "type", 'CURSOR', text="Roll to Cursor")
		
		layout.itemS()
		
		layout.item_enumO("tfm.transform", "mode", 'BONE_ROLL', text="Set Roll")

# ********** Panel **********

class VIEW3D_PT_3dview_properties(bpy.types.Panel):
	__space_type__ = 'VIEW_3D'
	__region_type__ = 'UI'
	__label__ = "View"

	def poll(self, context):
		view = context.space_data
		return (view)

	def draw(self, context):
		layout = self.layout
		
		view = context.space_data
		scene = context.scene
		
		col = layout.column()
		col.itemR(view, "camera")
		col.itemR(view, "lens")
		
		layout.itemL(text="Clip:")
		col = layout.column(align=True)
		col.itemR(view, "clip_start", text="Start")
		col.itemR(view, "clip_end", text="End")
		
		layout.itemL(text="Grid:")
		col = layout.column(align=True)
		col.itemR(view, "grid_lines", text="Lines")
		col.itemR(view, "grid_spacing", text="Spacing")
		col.itemR(view, "grid_subdivisions", text="Subdivisions")
		
		layout.column().itemR(scene, "cursor_location", text="3D Cursor:")
		
class VIEW3D_PT_3dview_display(bpy.types.Panel):
	__space_type__ = 'VIEW_3D'
	__region_type__ = 'UI'
	__label__ = "Display"

	def poll(self, context):
		view = context.space_data
		return (view)

	def draw(self, context):
		layout = self.layout
		view = context.space_data
		
		col = layout.column()
		col.itemR(view, "display_floor", text="Grid Floor")
		col.itemR(view, "display_x_axis", text="X Axis")
		col.itemR(view, "display_y_axis", text="Y Axis")
		col.itemR(view, "display_z_axis", text="Z Axis")
		col.itemR(view, "outline_selected")
		col.itemR(view, "all_object_centers")
		col.itemR(view, "relationship_lines")
		col.itemR(view, "textured_solid")
		
		layout.itemS()
		
		layout.itemO("screen.region_foursplit")
		
		col = layout.column()
		col.itemR(view, "lock_rotation")
		col.itemR(view, "box_preview")
		col.itemR(view, "box_clip")

class VIEW3D_PT_3dview_meshdisplay(bpy.types.Panel):
	__space_type__ = 'VIEW_3D'
	__region_type__ = 'UI'
	__label__ = "Mesh Display"

	def poll(self, context):
		editmesh = context.mode == 'EDIT_MESH'
		return (editmesh)

	def draw(self, context):
		layout = self.layout

		mesh = context.active_object.data
		
		col = layout.column()
		col.itemL(text="Overlays:")
		col.itemR(mesh, "draw_edges", text="Edges")
		col.itemR(mesh, "draw_faces", text="Faces")
		col.itemR(mesh, "draw_creases", text="Creases")
		col.itemR(mesh, "draw_bevel_weights", text="Bevel Weights")
		col.itemR(mesh, "draw_seams", text="Seams")
		col.itemR(mesh, "draw_sharp", text="Sharp")
		
		col.itemS()
		col.itemL(text="Normals:")
		col.itemR(mesh, "draw_normals", text="Face")
		col.itemR(mesh, "draw_vertex_normals", text="Vertex")
		col.itemR(context.scene.tool_settings, "normal_size", text="Normal Size")
		
		col.itemS()
		col.itemL(text="Numerics:")
		col.itemR(mesh, "draw_edge_lenght")
		col.itemR(mesh, "draw_edge_angle")
		col.itemR(mesh, "draw_face_area")


class VIEW3D_PT_3dview_curvedisplay(bpy.types.Panel):
	__space_type__ = 'VIEW_3D'
	__region_type__ = 'UI'
	__label__ = "Curve Display"

	def poll(self, context):
		editmesh = context.mode == 'EDIT_CURVE'
		return (editmesh)

	def draw(self, context):
		layout = self.layout

		curve = context.active_object.data
		
		col = layout.column()
		col.itemL(text="Overlays:")
		col.itemR(curve, "draw_handles", text="Handles")
		col.itemR(curve, "draw_normals", text="Normals")
		col.itemR(context.scene.tool_settings, "normal_size", text="Normal Size")
		
	
class VIEW3D_PT_background_image(bpy.types.Panel):
	__space_type__ = 'VIEW_3D'
	__region_type__ = 'UI'
	__label__ = "Background Image"
	__default_closed__ = True

	def poll(self, context):
		view = context.space_data
		bg = context.space_data.background_image
		return (view)

	def draw_header(self, context):
		layout = self.layout
		view = context.space_data

		layout.itemR(view, "display_background_image", text="")

	def draw(self, context):
		layout = self.layout
		
		view = context.space_data
		bg = view.background_image

		if bg:
			layout.active = view.display_background_image

			col = layout.column()
			col.itemR(bg, "image", text="")
			#col.itemR(bg, "image_user")
			col.itemR(bg, "size")
			col.itemR(bg, "transparency", slider=True)
			col.itemL(text="Offset:")
			
			col = layout.column(align=True)
			col.itemR(bg, "offset_x", text="X")
			col.itemR(bg, "offset_y", text="Y")

bpy.types.register(VIEW3D_HT_header) # Header

bpy.types.register(VIEW3D_MT_view) #View Menus
bpy.types.register(VIEW3D_MT_view_navigation)
bpy.types.register(VIEW3D_MT_view_align)
bpy.types.register(VIEW3D_MT_view_cameras)

bpy.types.register(VIEW3D_MT_select_OBJECT) # Select Menus
bpy.types.register(VIEW3D_MT_select_POSE)
bpy.types.register(VIEW3D_MT_select_PARTICLE)
bpy.types.register(VIEW3D_MT_select_EDIT_MESH)
bpy.types.register(VIEW3D_MT_select_EDIT_CURVE)
bpy.types.register(VIEW3D_MT_select_EDIT_SURFACE)
bpy.types.register(VIEW3D_MT_select_EDIT_METABALL)
bpy.types.register(VIEW3D_MT_select_EDIT_LATTICE)
bpy.types.register(VIEW3D_MT_select_EDIT_ARMATURE)
bpy.types.register(VIEW3D_MT_select_FACE) # XXX todo

bpy.types.register(VIEW3D_MT_OBJECT) # Object Menu
bpy.types.register(VIEW3D_MT_OBJECT_clear)
bpy.types.register(VIEW3D_MT_OBJECT_parent)
bpy.types.register(VIEW3D_MT_OBJECT_track)
bpy.types.register(VIEW3D_MT_OBJECT_group)
bpy.types.register(VIEW3D_MT_OBJECT_constraints)
bpy.types.register(VIEW3D_MT_OBJECT_showhide)

bpy.types.register(VIEW3D_MT_SCULPT) # Sculpt Menu

bpy.types.register(VIEW3D_MT_PAINT_VERTEX)

bpy.types.register(VIEW3D_MT_PARTICLE) # Particle Menu
bpy.types.register(VIEW3D_MT_PARTICLE_showhide)

bpy.types.register(VIEW3D_MT_POSE) # POSE Menu
bpy.types.register(VIEW3D_MT_POSE_transform)
bpy.types.register(VIEW3D_MT_POSE_pose)
bpy.types.register(VIEW3D_MT_POSE_motion)
bpy.types.register(VIEW3D_MT_POSE_group)
bpy.types.register(VIEW3D_MT_POSE_ik)
bpy.types.register(VIEW3D_MT_POSE_constraints)
bpy.types.register(VIEW3D_MT_POSE_showhide)

bpy.types.register(VIEW3D_MT_snap) # Edit Menus

bpy.types.register(VIEW3D_MT_edit_MESH)
bpy.types.register(VIEW3D_MT_edit_MESH_vertices)
bpy.types.register(VIEW3D_MT_edit_MESH_edges)
bpy.types.register(VIEW3D_MT_edit_MESH_faces)
bpy.types.register(VIEW3D_MT_edit_MESH_normals)
bpy.types.register(VIEW3D_MT_edit_MESH_showhide)

bpy.types.register(VIEW3D_MT_edit_CURVE)
bpy.types.register(VIEW3D_MT_edit_CURVE_ctrlpoints)
bpy.types.register(VIEW3D_MT_edit_CURVE_segments)
bpy.types.register(VIEW3D_MT_edit_CURVE_showhide)

bpy.types.register(VIEW3D_MT_edit_SURFACE)

bpy.types.register(VIEW3D_MT_edit_TEXT)
bpy.types.register(VIEW3D_MT_edit_TEXT_chars)

bpy.types.register(VIEW3D_MT_edit_META)
bpy.types.register(VIEW3D_MT_edit_META_showhide)

bpy.types.register(VIEW3D_MT_edit_LATTICE)

bpy.types.register(VIEW3D_MT_edit_ARMATURE)
bpy.types.register(VIEW3D_MT_edit_ARMATURE_parent)
bpy.types.register(VIEW3D_MT_edit_ARMATURE_roll)

bpy.types.register(VIEW3D_PT_3dview_properties) # Panels
bpy.types.register(VIEW3D_PT_3dview_display)
bpy.types.register(VIEW3D_PT_3dview_meshdisplay)
bpy.types.register(VIEW3D_PT_3dview_curvedisplay)
bpy.types.register(VIEW3D_PT_background_image)