5801f9e79414f488858248d8af98900d52bf9910
[blender.git] / release / ui / space_view3d.py
1
2 import bpy
3
4 # ********** Header **********
5
6 class VIEW3D_HT_header(bpy.types.Header):
7         __space_type__ = 'VIEW_3D'
8
9         def draw(self, context):
10                 layout = self.layout
11                 
12                 view = context.space_data
13                 mode_string = context.mode
14                 edit_object = context.edit_object
15                 object = context.active_object
16                 
17                 row = layout.row(align=True)
18                 row.template_header()
19
20                 # Menus
21                 if context.area.show_menus:
22                         sub = row.row(align=True)
23
24                         sub.itemM("VIEW3D_MT_view")
25                         
26                         # Select Menu
27                         if mode_string not in ('EDIT_TEXT', 'SCULPT', 'PAINT_WEIGHT', 'PAINT_VERTEX', 'PAINT_TEXTURE'):
28                                 sub.itemM("VIEW3D_MT_select_%s" % mode_string)
29                         
30                         if edit_object:
31                                 sub.itemM("VIEW3D_MT_edit_%s" % edit_object.type)
32                         elif object:
33                                 ob_mode_string = object.mode
34                                 
35                                 if mode_string not in ['PAINT_WEIGHT', 'PAINT_TEXTURE']:
36                                         sub.itemM("VIEW3D_MT_%s" % mode_string)
37
38                 layout.template_header_3D()
39
40 # ********** Menu **********
41
42 # ********** Utilities **********
43
44 class VIEW3D_MT_showhide(bpy.types.Menu):
45         __space_type__ = "VIEW_3D"
46         __label__ = "Show/Hide"
47         _operator_name = ""
48
49         def draw(self, context):
50                 layout = self.layout
51                 
52                 layout.itemO("%s.reveal" % self._operator_name, text="Show Hidden")
53                 layout.itemO("%s.hide" % self._operator_name, text="Hide Selected")
54                 layout.item_booleanO("%s.hide" % self._operator_name, "unselected", True, text="Hide Unselected")
55
56 class VIEW3D_MT_snap(bpy.types.Menu):
57         __space_type__ = "VIEW_3D"
58         __label__ = "Snap"
59
60         def draw(self, context):
61                 layout = self.layout
62                 
63                 layout.itemO("view3d.snap_selected_to_grid", text="Selection to Grid")
64                 layout.itemO("view3d.snap_selected_to_cursor", text="Selection to Cursor")
65                 layout.itemO("view3d.snap_selected_to_center", text="Selection to Center")
66                 
67                 layout.itemS()
68                 
69                 layout.itemO("view3d.snap_cursor_to_selected", text="Cursor to Selected")
70                 layout.itemO("view3d.snap_cursor_to_grid", text="Cursor to Grid")
71                 layout.itemO("view3d.snap_cursor_to_active", text="Cursor to Active")
72
73 # ********** View menus **********
74
75 class VIEW3D_MT_view(bpy.types.Menu):
76         __space_type__ = 'VIEW_3D'
77         __label__ = "View"
78
79         def draw(self, context):
80                 layout = self.layout
81
82                 layout.itemO("view3d.properties", icon='ICON_MENU_PANEL')
83                 layout.itemO("view3d.toolbar", icon='ICON_MENU_PANEL')
84                 
85                 layout.itemS()
86                 
87                 layout.item_enumO("view3d.viewnumpad", "type", 'CAMERA')
88                 layout.item_enumO("view3d.viewnumpad", "type", 'TOP')
89                 layout.item_enumO("view3d.viewnumpad", "type", 'FRONT')
90                 layout.item_enumO("view3d.viewnumpad", "type", 'RIGHT')
91                 
92                 layout.itemM("VIEW3D_MT_view_cameras", text="Cameras")
93                 
94                 layout.itemS()
95                 
96                 layout.itemO("view3d.view_persportho")
97                 
98                 layout.itemS()
99                 
100                 layout.itemM("VIEW3D_MT_view_navigation")
101                 layout.itemM("VIEW3D_MT_view_align")
102                 
103                 layout.itemS()
104
105                 layout.operator_context = "INVOKE_REGION_WIN"
106                 
107                 layout.itemO("view3d.clip_border", text="Clipping Border...")
108                 layout.itemO("view3d.zoom_border", text="Zoom Border...")
109                 
110                 layout.itemS()
111                 
112                 layout.itemO("view3d.view_center")
113                 layout.itemO("view3d.view_all")
114                 
115                 layout.itemS()
116                 
117                 layout.itemO("screen.region_foursplit", text="Toggle Quad View")
118                 layout.itemO("screen.screen_full_area", text="Toggle Full Screen")
119
120 class VIEW3D_MT_view_navigation(bpy.types.Menu):
121         __space_type__ = 'VIEW_3D'
122         __label__ = "Navigation"
123
124         def draw(self, context):
125                 layout = self.layout
126
127                 layout.items_enumO("view3d.view_orbit", "type")
128                 
129                 layout.itemS()
130                 
131                 layout.items_enumO("view3d.view_pan", "type")
132                 
133                 layout.itemS()
134                 
135                 layout.item_floatO("view3d.zoom", "delta", 1.0, text="Zoom In")
136                 layout.item_floatO("view3d.zoom", "delta", -1.0, text="Zoom Out")
137
138 class VIEW3D_MT_view_align(bpy.types.Menu):
139         __space_type__ = "VIEW_3D"
140         __label__ = "Align View"
141
142         def draw(self, context):
143                 layout = self.layout
144                 
145                 layout.itemO("view3d.view_center")
146                 
147 class VIEW3D_MT_view_cameras(bpy.types.Menu):
148         __space_type__ = "VIEW_3D"
149         __label__ = "Cameras"
150
151         def draw(self, context):
152                 layout = self.layout
153
154 # ********** Select menus, suffix from context.mode **********
155
156 class VIEW3D_MT_select_OBJECT(bpy.types.Menu):
157         __space_type__ = 'VIEW_3D'
158         __label__ = "Select"
159
160         def draw(self, context):
161                 layout = self.layout
162
163                 layout.itemO("view3d.select_border")
164
165                 layout.itemS()
166
167                 layout.itemO("object.select_all_toggle", text="Select/Deselect All")
168                 layout.itemO("object.select_inverse", text="Inverse")
169                 layout.itemO("object.select_random", text="Random")
170                 layout.itemO("object.select_by_layer", text="Select All by Layer")
171                 layout.item_enumO("object.select_by_type", "type", "", text="Select All by Type...")
172                 layout.itemO("object.select_grouped", text="Select Grouped...")
173
174 class VIEW3D_MT_select_POSE(bpy.types.Menu):
175         __space_type__ = 'VIEW_3D'
176         __label__ = "Select"
177
178         def draw(self, context):
179                 layout = self.layout
180
181                 layout.itemO("view3d.select_border", text="Border Select...")
182
183                 layout.itemS()
184                 
185                 layout.itemO("pose.select_all_toggle", text="Select/Deselect All")
186                 layout.itemO("pose.select_inverse", text="Inverse")
187                 layout.itemO("pose.select_constraint_target", text="Constraint Target")
188                 
189                 layout.itemS()
190                 
191                 layout.item_enumO("pose.select_hierarchy", "direction", 'PARENT')
192                 layout.item_enumO("pose.select_hierarchy", "direction", 'CHILD')
193                 
194                 layout.itemS()
195                 
196                 props = layout.itemO("pose.select_hierarchy", properties=True, text="Extend Parent")
197                 props.extend = True
198                 props.direction = 'PARENT'
199
200                 props = layout.itemO("pose.select_hierarchy", properties=True, text="Extend Child")
201                 props.extend = True
202                 props.direction = 'CHILD'
203
204 class VIEW3D_MT_select_PARTICLE(bpy.types.Menu):
205         __space_type__ = 'VIEW_3D'
206         __label__ = "Select"
207
208         def draw(self, context):
209                 layout = self.layout
210
211                 layout.itemO("view3d.select_border")
212
213                 layout.itemS()
214                 
215                 layout.itemO("particle.select_all_toggle", text="Select/Deselect All")
216                 layout.itemO("particle.select_linked")
217                 
218                 layout.itemS()
219                 
220                 layout.itemO("particle.select_more")
221                 layout.itemO("particle.select_less")
222
223 class VIEW3D_MT_select_EDIT_MESH(bpy.types.Menu):
224         __space_type__ = 'VIEW_3D'
225         __label__ = "Select"
226
227         def draw(self, context):
228                 layout = self.layout
229
230                 layout.itemO("view3d.select_border", text="Border Select...")
231
232                 layout.itemS()
233
234                 layout.itemO("mesh.select_all_toggle", text="Select/Deselect All")
235                 layout.itemO("mesh.select_inverse", text="Inverse")
236
237                 layout.itemS()
238
239                 layout.itemO("mesh.select_random", text="Random...")
240                 layout.itemO("mesh.edges_select_sharp", text="Sharp Edges")
241                 layout.itemO("mesh.faces_select_linked_flat", text="Linked Flat Faces")
242
243                 layout.itemS()
244
245                 layout.item_enumO("mesh.select_by_number_vertices", "type", 'TRIANGLES', text="Triangles")
246                 layout.item_enumO("mesh.select_by_number_vertices", "type", 'QUADS', text="Quads")
247                 layout.item_enumO("mesh.select_by_number_vertices", "type", 'OTHER', text="Loose Verts/Edges")
248                 layout.itemO("mesh.select_similar", text="Similar...")
249
250                 layout.itemS()
251
252                 layout.itemO("mesh.select_less", text="Less")
253                 layout.itemO("mesh.select_more", text="More")
254
255                 layout.itemS()
256
257                 layout.itemO("mesh.select_linked", text="Linked")
258                 layout.itemO("mesh.select_vertex_path", text="Vertex Path")
259                 layout.itemO("mesh.loop_multi_select", text="Edge Loop")
260                 layout.item_booleanO("mesh.loop_multi_select", "ring", True, text="Edge Ring")
261
262                 layout.itemS()
263
264                 layout.itemO("mesh.loop_to_region")
265                 layout.itemO("mesh.region_to_loop")
266
267 class VIEW3D_MT_select_EDIT_CURVE(bpy.types.Menu):
268         __space_type__ = 'VIEW_3D'
269         __label__ = "Select"
270
271         def draw(self, context):
272                 layout = self.layout
273
274                 layout.itemO("view3d.select_border", text="Border Select...")
275                 layout.itemO("view3d.select_circle", text="Circle Select...")
276
277                 layout.itemS()
278                 
279                 layout.itemO("curve.select_all_toggle", text="Select/Deselect All")
280                 layout.itemO("curve.select_inverse")
281                 layout.itemO("curve.select_random")
282                 layout.itemO("curve.select_every_nth")
283
284                 layout.itemS()
285                 
286                 layout.itemO("curve.de_select_first")
287                 layout.itemO("curve.de_select_last")
288                 layout.itemO("curve.select_next")
289                 layout.itemO("curve.select_previous")
290
291                 layout.itemS()
292                 
293                 layout.itemO("curve.select_more")
294                 layout.itemO("curve.select_less")
295
296 class VIEW3D_MT_select_EDIT_SURFACE(bpy.types.Menu):
297         __space_type__ = 'VIEW_3D'
298         __label__ = "Select"
299
300         def draw(self, context):
301                 layout = self.layout
302
303                 layout.itemO("view3d.select_border", text="Border Select...")
304                 layout.itemO("view3d.select_circle", text="Circle Select...")
305
306                 layout.itemS()
307                 
308                 layout.itemO("curve.select_all_toggle", text="Select/Deselect All")
309                 layout.itemO("curve.select_inverse")
310                 layout.itemO("curve.select_random")
311                 layout.itemO("curve.select_every_nth")
312
313                 layout.itemS()
314                 
315                 layout.itemO("curve.select_row")
316
317                 layout.itemS()
318                 
319                 layout.itemO("curve.select_more")
320                 layout.itemO("curve.select_less")
321
322 class VIEW3D_MT_select_EDIT_METABALL(bpy.types.Menu):
323         __space_type__ = 'VIEW_3D'
324         __label__ = "Select"
325
326         def draw(self, context):
327                 layout = self.layout
328
329                 layout.itemO("view3d.select_border")
330                 
331                 layout.itemS()
332                 
333                 layout.itemO("mball.select_deselect_all_metaelems")
334                 layout.itemO("mball.select_inverse_metaelems")
335                 
336                 layout.itemS()
337                 
338                 layout.itemO("mball.select_random_metaelems")
339
340 class VIEW3D_MT_select_EDIT_LATTICE(bpy.types.Menu):
341         __space_type__ = 'VIEW_3D'
342         __label__ = "Select"
343
344         def draw(self, context):
345                 layout = self.layout
346
347                 layout.itemO("view3d.select_border")
348
349                 layout.itemS()
350                 
351                 layout.itemO("lattice.select_all_toggle", text="Select/Deselect All")
352
353 class VIEW3D_MT_select_EDIT_ARMATURE(bpy.types.Menu):
354         __space_type__ = 'VIEW_3D'
355         __label__ = "Select"
356
357         def draw(self, context):
358                 layout = self.layout
359
360                 layout.itemO("view3d.select_border", text="Border Select...")
361
362                 layout.itemS()
363                 
364                 layout.itemO("armature.select_all_toggle", text="Select/Deselect All")
365                 layout.itemO("armature.select_inverse", text="Inverse")
366
367                 layout.itemS()
368                 
369                 layout.item_enumO("armature.select_hierarchy", "direction", 'PARENT', text="Parent")
370                 layout.item_enumO("armature.select_hierarchy", "direction", 'CHILD', text="Child")
371                 
372                 layout.itemS()
373                 
374                 props = layout.itemO("armature.select_hierarchy", properties=True, text="Extend Parent")
375                 props.extend = True
376                 props.direction = 'PARENT'
377
378                 props = layout.itemO("armature.select_hierarchy", properties=True, text="Extend Child")
379                 props.extend = True
380                 props.direction = 'CHILD'
381
382 class VIEW3D_MT_select_FACE(bpy.types.Menu):# XXX no matching enum
383         __space_type__ = 'VIEW_3D'
384         __label__ = "Select"
385
386         def draw(self, context):
387                 layout = self.layout
388
389                 layout.view3d_select_faceselmenu()
390
391 # ********** Object menu **********
392
393 class VIEW3D_MT_OBJECT(bpy.types.Menu):
394         __space_type__ = 'VIEW_3D'
395         __context__ = "objectmode"
396         __label__ = "Object"
397
398         def draw(self, context):
399                 layout = self.layout
400
401                 layout.itemM("VIEW3D_MT_OBJECT_clear")
402                 layout.itemM("VIEW3D_MT_snap")
403                 
404                 layout.itemS()
405                 
406                 layout.itemO("anim.insert_keyframe_menu", text="Insert Keyframe...")
407                 layout.itemO("anim.delete_keyframe_v3d", text="Delete Keyframe...")
408                 
409                 layout.itemS()
410                 
411                 layout.itemO("object.duplicate")
412                 layout.item_booleanO("object.duplicate", "linked", True, text="Duplicate Linked")
413                 layout.itemO("object.delete", text="Delete...")
414                 layout.itemO("object.proxy_make", text="Make Proxy...")
415                 
416                 layout.itemS()
417                 
418                 layout.itemM("VIEW3D_MT_OBJECT_parent")
419                 layout.itemM("VIEW3D_MT_OBJECT_track")
420                 layout.itemM("VIEW3D_MT_OBJECT_group")
421                 layout.itemM("VIEW3D_MT_OBJECT_constraints")
422                 
423                 layout.itemS()
424                 
425                 layout.itemO("object.join")
426                 
427                 layout.itemS()
428                 
429                 layout.itemM("VIEW3D_MT_OBJECT_showhide")
430                 
431 class VIEW3D_MT_OBJECT_clear(bpy.types.Menu):
432         __space_type__ = 'VIEW_3D'
433         __label__ = "Clear"
434
435         def draw(self, context):
436                 layout = self.layout
437                 
438                 layout.itemO("object.location_clear", text="Location")
439                 layout.itemO("object.rotation_clear", text="Rotation")
440                 layout.itemO("object.scale_clear", text="Scale")
441                 layout.itemO("object.origin_clear", text="Origin")
442                 
443 class VIEW3D_MT_OBJECT_parent(bpy.types.Menu):
444         __space_type__ = 'VIEW_3D'
445         __label__ = "Parent"
446
447         def draw(self, context):
448                 layout = self.layout
449                 
450                 layout.itemO("object.parent_set", text="Set")
451                 layout.itemO("object.parent_clear", text="Clear")
452                 
453 class VIEW3D_MT_OBJECT_track(bpy.types.Menu):
454         __space_type__ = 'VIEW_3D'
455         __label__ = "Track"
456
457         def draw(self, context):
458                 layout = self.layout
459                 
460                 layout.itemO("object.track_set", text="Set")
461                 layout.itemO("object.track_clear", text="Clear")
462                 
463 class VIEW3D_MT_OBJECT_group(bpy.types.Menu):
464         __space_type__ = 'VIEW_3D'
465         __label__ = "Group"
466
467         def draw(self, context):
468                 layout = self.layout
469                 
470                 layout.itemO("group.group_create")
471                 layout.itemO("group.objects_remove")
472                 
473                 layout.itemS()
474                 
475                 layout.itemO("group.objects_add_active")
476                 layout.itemO("group.objects_remove_active")
477                 
478 class VIEW3D_MT_OBJECT_constraints(bpy.types.Menu):
479         __space_type__ = 'VIEW_3D'
480         __label__ = "Constraints"
481
482         def draw(self, context):
483                 layout = self.layout
484                 
485                 layout.itemO("object.constraint_add_with_targets")
486                 layout.itemO("object.constraints_clear")
487                 
488 class VIEW3D_MT_OBJECT_showhide(bpy.types.Menu):
489         __space_type__ = 'VIEW_3D'
490         __label__ = "Show/Hide"
491
492         def draw(self, context):
493                 layout = self.layout
494                 
495                 layout.itemO("object.restrictview_clear", text="Show Hidden")
496                 layout.itemO("object.restrictview_set", text="Hide Selected")
497                 layout.item_booleanO("object.restrictview_set", "unselected", True, text="Hide Unselected")
498
499 # ********** Vertex paint menu **********       
500         
501 class VIEW3D_MT_PAINT_VERTEX(bpy.types.Menu):
502         __space_type__ = 'VIEW_3D'
503         __label__ = "Paint"
504
505         def draw(self, context):
506                 layout = self.layout
507                 
508                 sculpt = context.tool_settings.sculpt
509
510                 layout.itemO("paint.vertex_color_set")
511                 props = layout.itemO("paint.vertex_color_set", text="Set Selected Vertex Colors", properties=True)
512                 props.selected = True
513
514 # ********** Sculpt menu **********     
515         
516 class VIEW3D_MT_SCULPT(bpy.types.Menu):
517         __space_type__ = 'VIEW_3D'
518         __label__ = "Sculpt"
519
520         def draw(self, context):
521                 layout = self.layout
522                 
523                 sculpt = context.tool_settings.sculpt
524                 brush = context.tool_settings.sculpt.brush
525                 
526                 layout.itemR(sculpt, "symmetry_x")
527                 layout.itemR(sculpt, "symmetry_y")
528                 layout.itemR(sculpt, "symmetry_z")
529                 layout.itemS()
530                 layout.itemR(sculpt, "lock_x")
531                 layout.itemR(sculpt, "lock_y")
532                 layout.itemR(sculpt, "lock_z")
533                 layout.itemS()
534                 layout.item_menu_enumO("brush.curve_preset", property="shape")
535                 layout.itemS()
536                 
537                 if brush.sculpt_tool != 'GRAB':
538                         layout.itemR(brush, "airbrush")
539                         
540                         if brush.sculpt_tool != 'LAYER':
541                                 layout.itemR(brush, "anchored")
542                         
543                         if brush.sculpt_tool in ('DRAW', 'PINCH', 'INFLATE', 'LAYER', 'CLAY'):
544                                 layout.itemR(brush, "flip_direction")
545
546                         if brush.sculpt_tool == 'LAYER':
547                                 layout.itemR(brush, "persistent")
548                                 layout.itemO("sculpt.set_persistent_base")
549
550 # ********** Particle menu **********   
551         
552 class VIEW3D_MT_PARTICLE(bpy.types.Menu):
553         __space_type__ = 'VIEW_3D'
554         __label__ = "Particle"
555
556         def draw(self, context):
557                 layout = self.layout
558                 
559                 particle_edit = context.tool_settings.particle_edit
560                 
561                 layout.itemO("particle.mirror")
562                 
563                 layout.itemS()
564                 
565                 layout.itemO("particle.remove_doubles")
566                 layout.itemO("particle.delete")
567                 
568                 if particle_edit.selection_mode == 'POINT':
569                         layout.itemO("particle.subdivide")
570                 
571                 layout.itemO("particle.rekey")
572                 
573                 layout.itemS()
574                 
575                 layout.itemM("VIEW3D_MT_PARTICLE_showhide")
576
577 class VIEW3D_MT_PARTICLE_showhide(VIEW3D_MT_showhide):
578         _operator_name = "particle"
579
580 # ********** Pose Menu **********
581
582 class VIEW3D_MT_POSE(bpy.types.Menu):
583         __space_type__ = "VIEW_3D"
584         __label__ = "Pose"
585
586         def draw(self, context):
587                 layout = self.layout
588                 
589                 arm = context.active_object.data
590                 
591                 if arm.drawtype in ('BBONE', 'ENVELOPE'):
592                         layout.item_enumO("tfm.transform", "mode", 'BONESIZE', text="Scale Envelope Distance")
593                 
594                 layout.itemM("VIEW3D_MT_POSE_transform")
595                 
596                 layout.itemS()
597                 
598                 layout.itemO("anim.insert_keyframe_menu", text="Insert Keyframe...")
599                 layout.itemO("anim.delete_keyframe_v3d", text="Delete Keyframe...")
600                 
601                 layout.itemS()
602                 
603                 layout.itemO("pose.apply")
604                 
605                 layout.itemS()
606                 
607                 layout.itemO("pose.copy")
608                 layout.itemO("pose.paste")
609                 layout.item_booleanO("pose.paste", "flipped", True, text="Paste X-Flipped Pose")
610                 
611                 layout.itemS()
612                 
613                 layout.itemM("VIEW3D_MT_POSE_pose")
614                 layout.itemM("VIEW3D_MT_POSE_motion")
615                 layout.itemM("VIEW3D_MT_POSE_group")
616                 
617                 layout.itemS()
618                 
619                 layout.itemM("VIEW3D_MT_POSE_ik")
620                 layout.itemM("VIEW3D_MT_POSE_constraints")
621                 
622                 layout.itemS()
623                 
624                 layout.item_enumO("pose.autoside_names", "axis", 'XAXIS', text="AutoName Left/Right")
625                 layout.item_enumO("pose.autoside_names", "axis", 'YAXIS', text="AutoName Front/Back")
626                 layout.item_enumO("pose.autoside_names", "axis", 'ZAXIS', text="AutoName Top/Bottom")
627                 
628                 layout.itemO("pose.flip_names")
629                 
630                 layout.itemS()
631                 
632                 layout.itemO("pose.armature_layers", text="Change Armature Layers...")
633                 layout.itemO("pose.bone_layers", text="Change Bone Layers...")
634                 
635                 layout.itemS()
636                 
637                 layout.itemM("VIEW3D_MT_POSE_showhide")
638                 layout.item_menu_enumO("pose.flags_set", 'mode', text="Bone Settings")
639
640 class VIEW3D_MT_POSE_transform(bpy.types.Menu):
641         __space_type__ = "VIEW_3D"
642         __label__ = "Clear Transform"
643
644         def draw(self, context):
645                 layout = self.layout
646                 
647                 layout.itemL(text="User Transform")
648                 
649                 layout.itemO("pose.loc_clear", text="Location")
650                 layout.itemO("pose.rot_clear", text="Rotation")
651                 layout.itemO("pose.scale_clear", text="Scale")
652                 
653                 layout.itemL(text="Origin")
654                 
655 class VIEW3D_MT_POSE_pose(bpy.types.Menu):
656         __space_type__ = "VIEW_3D"
657         __label__ = "Pose Library"
658
659         def draw(self, context):
660                 layout = self.layout
661                 
662                 layout.itemO("poselib.browse_interactive", text="Browse Poses...")
663                 
664                 layout.itemS()
665                 
666                 layout.itemO("poselib.pose_add", text="Add Pose...")
667                 layout.itemO("poselib.pose_rename", text="Rename Pose...")
668                 layout.itemO("poselib.pose_remove", text="Remove Pose...")
669
670 class VIEW3D_MT_POSE_motion(bpy.types.Menu):
671         __space_type__ = "VIEW_3D"
672         __label__ = "Motion Paths"
673
674         def draw(self, context):
675                 layout = self.layout
676                 
677                 layout.itemO("pose.paths_calculate", text="Calculate")
678                 layout.itemO("pose.paths_clear", text="Clear")
679                 
680 class VIEW3D_MT_POSE_group(bpy.types.Menu):
681         __space_type__ = "VIEW_3D"
682         __label__ = "Bone Groups"
683
684         def draw(self, context):
685                 layout = self.layout
686                 layout.itemO("pose.group_add")
687                 layout.itemO("pose.group_remove")
688                 
689                 layout.itemS()
690                 
691                 layout.itemO("pose.group_assign")
692                 layout.itemO("pose.group_unassign")
693                 
694                 
695 class VIEW3D_MT_POSE_ik(bpy.types.Menu):
696         __space_type__ = "VIEW_3D"
697         __label__ = "Inverse Kinematics"
698
699         def draw(self, context):
700                 layout = self.layout
701                 
702                 layout.itemO("pose.ik_add")
703                 layout.itemO("pose.ik_clear")
704                 
705 class VIEW3D_MT_POSE_constraints(bpy.types.Menu):
706         __space_type__ = "VIEW_3D"
707         __label__ = "Constraints"
708
709         def draw(self, context):
710                 layout = self.layout
711                 
712                 layout.itemO("pose.constraint_add_with_targets", text="Add (With Targets)...")
713                 layout.itemO("pose.constraints_clear")
714                 
715 class VIEW3D_MT_POSE_showhide(VIEW3D_MT_showhide):
716         _operator_name = "pose"
717
718 # ********** Edit Menus, suffix from ob.type **********
719
720 # Edit MESH
721 class VIEW3D_MT_edit_MESH(bpy.types.Menu):
722         __space_type__ = 'VIEW_3D'
723         __label__ = "Mesh"
724
725         def draw(self, context):
726                 layout = self.layout
727                 
728                 settings = context.tool_settings
729
730                 layout.itemO("ed.undo")
731                 layout.itemO("ed.redo")
732                 
733                 layout.itemS()
734                 
735                 layout.itemM("VIEW3D_MT_snap")
736                 
737                 layout.itemS()
738                 
739                 layout.itemO("uv.mapping_menu", text="UV Unwrap...")
740                 
741                 layout.itemS()
742                 
743                 layout.itemO("mesh.extrude")
744                 layout.itemO("mesh.duplicate")
745                 layout.itemO("mesh.delete", text="Delete...")
746                 
747                 layout.itemS()
748                 
749                 layout.itemM("VIEW3D_MT_edit_MESH_vertices")
750                 layout.itemM("VIEW3D_MT_edit_MESH_edges")
751                 layout.itemM("VIEW3D_MT_edit_MESH_faces")
752                 layout.itemM("VIEW3D_MT_edit_MESH_normals")
753                 
754                 layout.itemS()
755                 
756                 layout.itemR(settings, "automerge_editing")
757                 layout.itemR(settings, "proportional_editing")
758                 layout.item_menu_enumR(settings, "proportional_editing_falloff")
759                 
760                 layout.itemS()
761                 
762                 layout.itemM("VIEW3D_MT_edit_MESH_showhide")
763
764 class VIEW3D_MT_edit_MESH_vertices(bpy.types.Menu):
765         __space_type__ = 'VIEW_3D'
766         __label__ = "Vertices"
767
768         def draw(self, context):
769                 layout = self.layout
770                 
771                 layout.itemO("mesh.merge")
772                 layout.itemO("mesh.rip")
773                 layout.itemO("mesh.split")
774                 layout.itemO("mesh.separate")
775
776                 layout.itemS()
777                 
778                 layout.itemO("mesh.vertices_smooth")
779                 layout.itemO("mesh.remove_doubles")
780
781 class VIEW3D_MT_edit_MESH_edges(bpy.types.Menu):
782         __space_type__ = 'VIEW_3D'
783         __label__ = "Edges"
784
785         def draw(self, context):
786                 layout = self.layout
787
788                 layout.itemO("mesh.edge_face_add")
789                 layout.itemO("mesh.subdivide")
790
791                 layout.itemS()
792                 
793                 layout.itemO("mesh.mark_seam")
794                 layout.item_booleanO("mesh.mark_seam", "clear", True, text="Clear Seam")
795                 
796                 layout.itemS()
797                 
798                 layout.itemO("mesh.mark_sharp")
799                 layout.item_booleanO("mesh.mark_sharp", "clear", True, text="Clear Sharp")
800                 
801                 layout.itemS()
802                 
803                 layout.item_enumO("mesh.edge_rotate", "direction", 'CW', text="Rotate Edge CW")
804                 layout.item_enumO("mesh.edge_rotate", "direction", 'CCW', text="Rotate Edge CCW")
805
806 class VIEW3D_MT_edit_MESH_faces(bpy.types.Menu):
807         __space_type__ = 'VIEW_3D'
808         __label__ = "Faces"
809
810         def draw(self, context):
811                 layout = self.layout
812
813                 layout.itemO("mesh.edge_face_add")
814                 layout.itemO("mesh.fill")
815                 layout.itemO("mesh.beauty_fill")
816
817                 layout.itemS()
818                 
819                 layout.itemO("mesh.quads_convert_to_tris")
820                 layout.itemO("mesh.tris_convert_to_quads")
821                 layout.itemO("mesh.edge_flip")
822                 
823                 layout.itemS()
824                 
825                 layout.itemO("mesh.faces_shade_smooth")
826                 layout.itemO("mesh.faces_shade_flat")
827
828 class VIEW3D_MT_edit_MESH_normals(bpy.types.Menu):
829         __space_type__ = 'VIEW_3D'
830         __label__ = "Normals"
831
832         def draw(self, context):
833                 layout = self.layout
834
835                 layout.itemO("mesh.normals_make_consistent", text="Recalculate Outside")
836                 layout.item_booleanO("mesh.normals_make_consistent", "inside", True, text="Recalculate Inside")
837
838                 layout.itemS()
839                 
840                 layout.itemO("mesh.flip_normals")
841                 
842 class VIEW3D_MT_edit_MESH_showhide(VIEW3D_MT_showhide):
843         _operator_name = "mesh"
844
845 # Edit CURVE
846
847 # draw_CURVE is used by VIEW3D_MT_edit_CURVE and VIEW3D_MT_edit_SURFACE
848 def draw_CURVE(self, context):
849         layout = self.layout
850         
851         settings = context.tool_settings
852         
853         layout.itemM("VIEW3D_MT_snap")
854         
855         layout.itemS()
856         
857         layout.itemO("curve.extrude")
858         layout.itemO("curve.duplicate")
859         layout.itemO("curve.separate")
860         layout.itemO("curve.make_segment")
861         layout.itemO("curve.cyclic_toggle")
862         layout.itemO("curve.delete", text="Delete...")
863         
864         layout.itemS()
865         
866         layout.itemM("VIEW3D_MT_edit_CURVE_ctrlpoints")
867         layout.itemM("VIEW3D_MT_edit_CURVE_segments")
868         
869         layout.itemS()
870         
871         layout.itemR(settings, "proportional_editing")
872         layout.item_menu_enumR(settings, "proportional_editing_falloff")
873         
874         layout.itemS()
875         
876         layout.itemM("VIEW3D_MT_edit_CURVE_showhide")
877
878 class VIEW3D_MT_edit_CURVE(bpy.types.Menu):
879         __space_type__ = 'VIEW_3D'
880         __label__ = "Curve"
881
882         draw = draw_CURVE
883         
884 class VIEW3D_MT_edit_CURVE_ctrlpoints(bpy.types.Menu):
885         __space_type__ = 'VIEW_3D'
886         __label__ = "Control Points"
887
888         def draw(self, context):
889                 layout = self.layout
890                 
891                 edit_object = context.edit_object
892                 
893                 if edit_object.type == 'CURVE':
894                         layout.item_enumO("tfm.transform", "mode", 'TILT')
895                         layout.itemO("curve.tilt_clear")
896                         layout.itemO("curve.separate")
897                         
898                         layout.itemS()
899                         
900                         layout.item_menu_enumO("curve.handle_type_set", "type")
901                 
902 class VIEW3D_MT_edit_CURVE_segments(bpy.types.Menu):
903         __space_type__ = 'VIEW_3D'
904         __label__ = "Segments"
905
906         def draw(self, context):
907                 layout = self.layout
908                 
909                 layout.itemO("curve.subdivide")
910                 layout.itemO("curve.switch_direction")
911
912 class VIEW3D_MT_edit_CURVE_showhide(VIEW3D_MT_showhide):
913         _operator_name = "curve"
914
915 # Edit SURFACE
916 class VIEW3D_MT_edit_SURFACE(bpy.types.Menu):
917         __space_type__ = 'VIEW_3D'
918         __label__ = "Surface"
919
920         draw = draw_CURVE
921
922 # Edit TEXT
923 class VIEW3D_MT_edit_TEXT(bpy.types.Menu):
924         __space_type__ = 'VIEW_3D'
925         __label__ = "Text"
926
927         def draw(self, context):
928                 layout = self.layout
929                 
930                 layout.itemO("font.file_paste")
931                 
932                 layout.itemS()
933                 
934                 layout.itemM("VIEW3D_MT_edit_TEXT_chars")
935
936 class VIEW3D_MT_edit_TEXT_chars(bpy.types.Menu):
937         __space_type__ = 'VIEW_3D'
938         __label__ = "Special Characters"
939
940         def draw(self, context):
941                 layout = self.layout
942                 
943                 layout.item_stringO("font.text_insert", "text", b'\xC2\xA9'.decode(), text="Copyright|Alt C")
944                 layout.item_stringO("font.text_insert", "text", b'\xC2\xAE'.decode(), text="Registered Trademark|Alt R")
945                 
946                 layout.itemS()
947                 
948                 layout.item_stringO("font.text_insert", "text", b'\xC2\xB0'.decode(), text="Degree Sign|Alt G")
949                 layout.item_stringO("font.text_insert", "text", b'\xC3\x97'.decode(), text="Multiplication Sign|Alt x")
950                 layout.item_stringO("font.text_insert", "text", b'\xC2\x8A'.decode(), text="Circle|Alt .")
951                 layout.item_stringO("font.text_insert", "text", b'\xC2\xB9'.decode(), text="Superscript 1|Alt 1")
952                 layout.item_stringO("font.text_insert", "text", b'\xC2\xB2'.decode(), text="Superscript 2|Alt 2")
953                 layout.item_stringO("font.text_insert", "text", b'\xC2\xB3'.decode(), text="Superscript 3|Alt 3")
954                 layout.item_stringO("font.text_insert", "text", b'\xC2\xBB'.decode(), text="Double >>|Alt >")
955                 layout.item_stringO("font.text_insert", "text", b'\xC2\xAB'.decode(), text="Double <<|Alt <")
956                 layout.item_stringO("font.text_insert", "text", b'\xE2\x80\xB0'.decode(), text="Promillage|Alt %")
957                 
958                 layout.itemS()
959                 
960                 layout.item_stringO("font.text_insert", "text", b'\xC2\xA4'.decode(), text="Dutch Florin|Alt F")
961                 layout.item_stringO("font.text_insert", "text", b'\xC2\xA3'.decode(), text="British Pound|Alt L")
962                 layout.item_stringO("font.text_insert", "text", b'\xC2\xA5'.decode(), text="Japanese Yen|Alt Y")
963                 
964                 layout.itemS()
965                 
966                 layout.item_stringO("font.text_insert", "text", b'\xC3\x9F'.decode(), text="German S|Alt S")
967                 layout.item_stringO("font.text_insert", "text", b'\xC2\xBF'.decode(), text="Spanish Question Mark|Alt ?")
968                 layout.item_stringO("font.text_insert", "text", b'\xC2\xA1'.decode(), text="Spanish Exclamation Mark|Alt !")
969
970 # Edit META
971 class VIEW3D_MT_edit_META(bpy.types.Menu):
972         __space_type__ = 'VIEW_3D'
973         __label__ = "Metaball"
974
975         def draw(self, context):
976                 layout = self.layout
977                 
978                 settings = context.tool_settings
979
980                 layout.itemO("ed.undo")
981                 layout.itemO("ed.redo")
982                 
983                 layout.itemS()
984                 
985                 layout.itemM("VIEW3D_MT_snap")
986                 
987                 layout.itemS()
988                 
989                 layout.itemO("mball.delete_metaelems", text="Delete...")
990                 layout.itemO("mball.duplicate_metaelems")
991                 
992                 layout.itemS()
993                 
994                 layout.itemR(settings, "proportional_editing")
995                 layout.item_menu_enumR(settings, "proportional_editing_falloff")
996                 
997                 layout.itemS()
998                 
999                 layout.itemM("VIEW3D_MT_edit_META_showhide")
1000
1001 class VIEW3D_MT_edit_META_showhide(bpy.types.Menu):
1002         __space_type__ = 'VIEW_3D'
1003         __label__ = "Show/Hide"
1004
1005         def draw(self, context):
1006                 layout = self.layout
1007                 
1008                 layout.itemO("mball.reveal_metaelems", text="Show Hidden")
1009                 layout.itemO("mball.hide_metaelems", text="Hide Selected")
1010                 layout.item_booleanO("mball.hide_metaelems", "unselected", True, text="Hide Unselected")
1011
1012 # Edit LATTICE
1013 class VIEW3D_MT_edit_LATTICE(bpy.types.Menu):
1014         __space_type__ = 'VIEW_3D'
1015         __label__ = "Lattice"
1016
1017         def draw(self, context):
1018                 layout = self.layout
1019                 
1020                 settings = context.tool_settings
1021
1022                 layout.itemM("VIEW3D_MT_snap")
1023                 
1024                 layout.itemS()
1025                 
1026                 layout.itemO("lattice.make_regular")
1027                 
1028                 layout.itemS()
1029                 
1030                 layout.itemR(settings, "proportional_editing")
1031                 layout.item_menu_enumR(settings, "proportional_editing_falloff")
1032
1033 # Edit ARMATURE
1034 class VIEW3D_MT_edit_ARMATURE(bpy.types.Menu):
1035         __space_type__ = 'VIEW_3D'
1036         __label__ = "Armature"
1037
1038         def draw(self, context):
1039                 layout = self.layout
1040                 
1041                 edit_object = context.edit_object
1042                 arm = edit_object.data
1043                 
1044                 layout.itemM("VIEW3D_MT_snap")
1045                 layout.itemM("VIEW3D_MT_edit_ARMATURE_roll")
1046                 
1047                 if arm.drawtype == 'ENVELOPE':
1048                         layout.item_enumO("tfm.transform", "mode", 'BONESIZE', text="Scale Envelope Distance")
1049                 else:
1050                         layout.item_enumO("tfm.transform", "mode", 'BONESIZE', text="Scale B-Bone Width")
1051                                 
1052                 layout.itemS()
1053                 
1054                 layout.itemO("armature.extrude")
1055                 
1056                 if arm.x_axis_mirror:
1057                         layout.item_booleanO("armature.extrude", "forked", True, text="Extrude Forked")
1058                 
1059                 layout.itemO("armature.duplicate")
1060                 layout.itemO("armature.merge")
1061                 layout.itemO("armature.fill")
1062                 layout.itemO("armature.delete")
1063                 layout.itemO("armature.separate")
1064
1065                 layout.itemS()
1066
1067                 layout.itemO("armature.subdivide_multi", text="Subdivide")
1068                 
1069                 layout.itemS()
1070
1071                 layout.item_enumO("armature.autoside_names", "axis", 'XAXIS', text="AutoName Left/Right")
1072                 layout.item_enumO("armature.autoside_names", "axis", 'YAXIS', text="AutoName Front/Back")
1073                 layout.item_enumO("armature.autoside_names", "axis", 'ZAXIS', text="AutoName Top/Bottom")
1074                 layout.itemO("armature.flip_names")
1075
1076                 layout.itemS()
1077
1078                 layout.itemO("armature.armature_layers")
1079                 layout.itemO("armature.bone_layers")
1080
1081                 layout.itemS()
1082
1083                 layout.itemM("VIEW3D_MT_edit_ARMATURE_parent")
1084
1085                 layout.itemS()
1086
1087                 layout.item_menu_enumO("armature.flags_set", "mode", text="Bone Settings")
1088
1089 class VIEW3D_MT_edit_ARMATURE_parent(bpy.types.Menu):
1090         __space_type__ = 'VIEW_3D'
1091         __label__ = "Parent"
1092
1093         def draw(self, context):
1094                 layout = self.layout
1095                 
1096                 layout.itemO("armature.parent_set", text="Make")
1097                 layout.itemO("armature.parent_clear", text="Clear")
1098
1099 class VIEW3D_MT_edit_ARMATURE_roll(bpy.types.Menu):
1100         __space_type__ = 'VIEW_3D'
1101         __label__ = "Bone Roll"
1102
1103         def draw(self, context):
1104                 layout = self.layout
1105                 
1106                 layout.item_enumO("armature.calculate_roll", "type", 'GLOBALUP', text="Clear Roll (Z-Axis Up)")
1107                 layout.item_enumO("armature.calculate_roll", "type", 'CURSOR', text="Roll to Cursor")
1108                 
1109                 layout.itemS()
1110                 
1111                 layout.item_enumO("tfm.transform", "mode", 'BONE_ROLL', text="Set Roll")
1112
1113 # ********** Panel **********
1114
1115 class VIEW3D_PT_3dview_properties(bpy.types.Panel):
1116         __space_type__ = 'VIEW_3D'
1117         __region_type__ = 'UI'
1118         __label__ = "View"
1119
1120         def poll(self, context):
1121                 view = context.space_data
1122                 return (view)
1123
1124         def draw(self, context):
1125                 layout = self.layout
1126                 
1127                 view = context.space_data
1128                 scene = context.scene
1129                 
1130                 col = layout.column()
1131                 col.itemR(view, "camera")
1132                 col.itemR(view, "lens")
1133                 
1134                 layout.itemL(text="Clip:")
1135                 col = layout.column(align=True)
1136                 col.itemR(view, "clip_start", text="Start")
1137                 col.itemR(view, "clip_end", text="End")
1138                 
1139                 layout.itemL(text="Grid:")
1140                 col = layout.column(align=True)
1141                 col.itemR(view, "grid_lines", text="Lines")
1142                 col.itemR(view, "grid_spacing", text="Spacing")
1143                 col.itemR(view, "grid_subdivisions", text="Subdivisions")
1144                 
1145                 layout.column().itemR(scene, "cursor_location", text="3D Cursor:")
1146                 
1147 class VIEW3D_PT_3dview_display(bpy.types.Panel):
1148         __space_type__ = 'VIEW_3D'
1149         __region_type__ = 'UI'
1150         __label__ = "Display"
1151
1152         def poll(self, context):
1153                 view = context.space_data
1154                 return (view)
1155
1156         def draw(self, context):
1157                 layout = self.layout
1158                 view = context.space_data
1159                 
1160                 col = layout.column()
1161                 col.itemR(view, "display_floor", text="Grid Floor")
1162                 col.itemR(view, "display_x_axis", text="X Axis")
1163                 col.itemR(view, "display_y_axis", text="Y Axis")
1164                 col.itemR(view, "display_z_axis", text="Z Axis")
1165                 col.itemR(view, "outline_selected")
1166                 col.itemR(view, "all_object_centers")
1167                 col.itemR(view, "relationship_lines")
1168                 col.itemR(view, "textured_solid")
1169                 
1170                 layout.itemS()
1171                 
1172                 layout.itemO("screen.region_foursplit")
1173                 
1174                 col = layout.column()
1175                 col.itemR(view, "lock_rotation")
1176                 col.itemR(view, "box_preview")
1177                 col.itemR(view, "box_clip")
1178
1179 class VIEW3D_PT_3dview_meshdisplay(bpy.types.Panel):
1180         __space_type__ = 'VIEW_3D'
1181         __region_type__ = 'UI'
1182         __label__ = "Mesh Display"
1183
1184         def poll(self, context):
1185                 editmesh = context.mode == 'EDIT_MESH'
1186                 return (editmesh)
1187
1188         def draw(self, context):
1189                 layout = self.layout
1190
1191                 mesh = context.active_object.data
1192                 
1193                 col = layout.column()
1194                 col.itemL(text="Overlays:")
1195                 col.itemR(mesh, "draw_edges", text="Edges")
1196                 col.itemR(mesh, "draw_faces", text="Faces")
1197                 col.itemR(mesh, "draw_creases", text="Creases")
1198                 col.itemR(mesh, "draw_bevel_weights", text="Bevel Weights")
1199                 col.itemR(mesh, "draw_seams", text="Seams")
1200                 col.itemR(mesh, "draw_sharp", text="Sharp")
1201                 
1202                 col.itemS()
1203                 col.itemL(text="Normals:")
1204                 col.itemR(mesh, "draw_normals", text="Face")
1205                 col.itemR(mesh, "draw_vertex_normals", text="Vertex")
1206                 
1207                 col.itemS()
1208                 col.itemL(text="Numerics:")
1209                 col.itemR(mesh, "draw_edge_lenght")
1210                 col.itemR(mesh, "draw_edge_angle")
1211                 col.itemR(mesh, "draw_face_area")
1212         
1213 class VIEW3D_PT_background_image(bpy.types.Panel):
1214         __space_type__ = 'VIEW_3D'
1215         __region_type__ = 'UI'
1216         __label__ = "Background Image"
1217         __default_closed__ = True
1218
1219         def poll(self, context):
1220                 view = context.space_data
1221                 bg = context.space_data.background_image
1222                 return (view)
1223
1224         def draw_header(self, context):
1225                 layout = self.layout
1226                 view = context.space_data
1227
1228                 layout.itemR(view, "display_background_image", text="")
1229
1230         def draw(self, context):
1231                 layout = self.layout
1232                 
1233                 view = context.space_data
1234                 bg = view.background_image
1235
1236                 if bg:
1237                         layout.active = view.display_background_image
1238
1239                         col = layout.column()
1240                         col.itemR(bg, "image", text="")
1241                         #col.itemR(bg, "image_user")
1242                         col.itemR(bg, "size")
1243                         col.itemR(bg, "transparency", slider=True)
1244                         col.itemL(text="Offset:")
1245                         
1246                         col = layout.column(align=True)
1247                         col.itemR(bg, "offset_x", text="X")
1248                         col.itemR(bg, "offset_y", text="Y")
1249
1250 bpy.types.register(VIEW3D_HT_header) # Header
1251
1252 bpy.types.register(VIEW3D_MT_view) #View Menus
1253 bpy.types.register(VIEW3D_MT_view_navigation)
1254 bpy.types.register(VIEW3D_MT_view_align)
1255 bpy.types.register(VIEW3D_MT_view_cameras)
1256
1257 bpy.types.register(VIEW3D_MT_select_OBJECT) # Select Menus
1258 bpy.types.register(VIEW3D_MT_select_POSE)
1259 bpy.types.register(VIEW3D_MT_select_PARTICLE)
1260 bpy.types.register(VIEW3D_MT_select_EDIT_MESH)
1261 bpy.types.register(VIEW3D_MT_select_EDIT_CURVE)
1262 bpy.types.register(VIEW3D_MT_select_EDIT_SURFACE)
1263 bpy.types.register(VIEW3D_MT_select_EDIT_METABALL)
1264 bpy.types.register(VIEW3D_MT_select_EDIT_LATTICE)
1265 bpy.types.register(VIEW3D_MT_select_EDIT_ARMATURE)
1266 bpy.types.register(VIEW3D_MT_select_FACE) # XXX todo
1267
1268 bpy.types.register(VIEW3D_MT_OBJECT) # Object Menu
1269 bpy.types.register(VIEW3D_MT_OBJECT_clear)
1270 bpy.types.register(VIEW3D_MT_OBJECT_parent)
1271 bpy.types.register(VIEW3D_MT_OBJECT_track)
1272 bpy.types.register(VIEW3D_MT_OBJECT_group)
1273 bpy.types.register(VIEW3D_MT_OBJECT_constraints)
1274 bpy.types.register(VIEW3D_MT_OBJECT_showhide)
1275
1276 bpy.types.register(VIEW3D_MT_SCULPT) # Sculpt Menu
1277
1278 bpy.types.register(VIEW3D_MT_PAINT_VERTEX)
1279
1280 bpy.types.register(VIEW3D_MT_PARTICLE) # Particle Menu
1281 bpy.types.register(VIEW3D_MT_PARTICLE_showhide)
1282
1283 bpy.types.register(VIEW3D_MT_POSE) # POSE Menu
1284 bpy.types.register(VIEW3D_MT_POSE_transform)
1285 bpy.types.register(VIEW3D_MT_POSE_pose)
1286 bpy.types.register(VIEW3D_MT_POSE_motion)
1287 bpy.types.register(VIEW3D_MT_POSE_group)
1288 bpy.types.register(VIEW3D_MT_POSE_ik)
1289 bpy.types.register(VIEW3D_MT_POSE_constraints)
1290 bpy.types.register(VIEW3D_MT_POSE_showhide)
1291
1292 bpy.types.register(VIEW3D_MT_snap) # Edit Menus
1293
1294 bpy.types.register(VIEW3D_MT_edit_MESH)
1295 bpy.types.register(VIEW3D_MT_edit_MESH_vertices)
1296 bpy.types.register(VIEW3D_MT_edit_MESH_edges)
1297 bpy.types.register(VIEW3D_MT_edit_MESH_faces)
1298 bpy.types.register(VIEW3D_MT_edit_MESH_normals)
1299 bpy.types.register(VIEW3D_MT_edit_MESH_showhide)
1300
1301 bpy.types.register(VIEW3D_MT_edit_CURVE)
1302 bpy.types.register(VIEW3D_MT_edit_CURVE_ctrlpoints)
1303 bpy.types.register(VIEW3D_MT_edit_CURVE_segments)
1304 bpy.types.register(VIEW3D_MT_edit_CURVE_showhide)
1305
1306 bpy.types.register(VIEW3D_MT_edit_SURFACE)
1307
1308 bpy.types.register(VIEW3D_MT_edit_TEXT)
1309 bpy.types.register(VIEW3D_MT_edit_TEXT_chars)
1310
1311 bpy.types.register(VIEW3D_MT_edit_META)
1312 bpy.types.register(VIEW3D_MT_edit_META_showhide)
1313
1314 bpy.types.register(VIEW3D_MT_edit_LATTICE)
1315
1316 bpy.types.register(VIEW3D_MT_edit_ARMATURE)
1317 bpy.types.register(VIEW3D_MT_edit_ARMATURE_parent)
1318 bpy.types.register(VIEW3D_MT_edit_ARMATURE_roll)
1319
1320 bpy.types.register(VIEW3D_PT_3dview_properties) # Panels
1321 bpy.types.register(VIEW3D_PT_3dview_display)
1322 bpy.types.register(VIEW3D_PT_3dview_meshdisplay)
1323 bpy.types.register(VIEW3D_PT_background_image)